Find all csv files in a folder using Python and R

R

dir(pattern=’csv’)

Python

In [5]:
import os
import glob
In [6]:
os.getcwd()
Out[6]:
'C:\\Users\\Dell'
In [7]:
path = 'C:\\Users\\Dell\\Downloads'
In [8]:
extension = 'csv'
os.chdir(path)
In [9]:
result = [i for i in glob.glob('*.{}'.format(extension))]
print(result)
['AirPassengers.csv', 'BigDiamonds.csv', 'Boston (1).csv', 'Boston.csv', 'ccFraud.csv', 'class2.csv', 'data1.csv', 'datasets.csv', 'Diamond (1).csv', 'Diamond (2).csv', 'Diamond (3).csv', 'Diamond (4).csv', 'Diamond (5).csv', 'Diamond (6).csv', 'Diamond.csv', 'Hdma.csv', 'Hedonic.csv', 'pgd.csv', 'protein.csv', 'RidingMowers.csv', 'sales-of-shampoo-over-a-three-ye.csv', 'telecom.csv']

Hacking Elections As a Service

Imagine a world

  • Mainland China uses cyber weapons and tactics to influence Taiwan’s elections
  • Israel uses cyber tactics to influence Iran’s elections (yes Iran has elections)
  • Russia /Syria/ Iran uses cyber tactics to influence Israel’s elections
  • Pakistan uses cyber weapons and tactics to influence India”s elections
  • North Korea does it to one of South Korea’s parties /politicians
  • Lots of clients in Latin America for such specialists

The revelations of Russian (?) hacking (selectively) and leaking in an electoral cycle  to favor a candidate which is more friendly than the other to them, could unleash a new era of cyber tactics. What is the central premise? Every party has something to hide, and each party has a foreign policy stand

If this was 1960, the CIA could have used the internet to bring down Castro (no need of poisoned Cigars)

Hacking Elections as a Service!

fidel-castro-sm

 

Collateral Damage by Cyberattacks

Social media increasingly gives you access to friends and family of influential people. These digital assets are likely to be under renewed attack by cyberplayers including domestic and foreign hackers.

If DNC Campaign members can be hacked, then who stops or defends Ivanka Trump from being hacked by ideologues. The Secret Service lacks a cyber corps (as events have shown)

One man’s terrorist is another man’s freedom fighter. One man’s cyber terrorist is another man’s cyber activist.

Can self driving cars be used for terrorism

I wonder if self driving car enthusiasts have created a backdoor for failsafe driving. This is based on recent reports of ISIS using automobiles as weapons of mass destruction (esp in France et al) , as well as the convergence of self driving cars without human intervention. Same goes for drones unfortunately.