This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.thegeekstuff.com/2012/06/c-directory/ | |
http://www.lemoda.net/c/recursive-directory/ | |
https://en.wikibooks.org/wiki/C_Programming/POSIX_Reference/dirent.h | |
GLIB DOCUMENTATION: https://developer.gnome.org/glib/2.30/ | |
DESCRIPTION OF STRUCT_DIRENT : http://www.gnu.org/software/libc/manual/html_node/Directory-Entries.html | |
GETTING FULL ABSOLUTE PATH OF DIRECTORY :http://stackoverflow.com/questions/19641798/get-the-full-path-of-the-files-in-c | |
CHECK IF FILE OR DIR : http://stackoverflow.com/questions/4553012/checking-if-a-file-is-a-directory-or-just-a-file | |
READINF A FILE LINE BY LINE IN C: http://stackoverflow.com/questions/3501338/c-read-file-line-by-line | |
SHELL COMMAND SIMULATION :http://www.cs.cornell.edu/Courses/cs414/2004su/homework/shell/shell.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
command_list = [] | |
with open ("history.txt",'r') as file_obj: | |
for line in file_obj: | |
temp = line.split(' ') | |
if temp[2] == '': | |
command_list.append(temp[3].strip()) | |
else: | |
command_list.append(temp[4].strip()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://gist.github.com/b9bfb3541d3d5f831b6f.js"></script> | |
<noscript><pre><code> | |
File: YouTubeMP3DownloadScript.py | |
--------------------------------- | |
import pafy | |
#warning supress | |
import logging | |
logging.getLogger().setLevel(logging.ERROR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import random | |
random.seed(5) #with same seed the random function gives same result everytime | |
for i in range(1,1000): | |
random.getstate() | |
x=random.randint(1,1000) | |
y=random.randint(1,1000) | |
plt.scatter(x,y) | |
plt.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pafy | |
#warning supress | |
import logging | |
logging.getLogger().setLevel(logging.ERROR) | |
with open('song.txt','r') as file: | |
for url in file: | |
video = pafy.new(url) | |
#audiostreams = video.audiostreams | |
bestaudio = video.getbestaudio() | |
bestaudio.download() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem Starting Namenode | |
Follow These TroubleShooting Tips: | |
1)Format NameNode | |
/bin/hadoop namenode -format | |
NOTE:-Do not format a running Hadoop filesystem as you will lose all the data currently in the cluster (in HDFS)! | |
2)Port is not available for namenode to bind itself (check logs or use command -netstat to check ports ) | |
Port address are specified in core-site.xml, change the port address |