This file contains 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
#!/bin/bash | |
# Get list of urls by user and write those links to a temp file. | |
dialog --title "Download Manager" \ | |
--inputbox "Enter url(s): \n(Separate urls by comma)" 10 50 2> /tmp/inputbox.tmp.$$ | |
urls=$(cat /tmp/inputbox.tmp.$$) | |
rm -f /tmp/inputbox.tmp.$$ | |
# Extensions of files that we want to download | |
declare -a extensions=('pdf' 'ods' 'ppt' 'doc') |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#define M 3 | |
#define K 2 | |
#define N 3 | |
#define NUM_THREADS M * N | |
/* Global variables for threads to share */ |
This file contains 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
#!/usr/bin/env python | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
def shortest_path(graph, distance, previous, source): | |
queue = [] | |
# Initialization of distance and previous | |
for node in graph.nodes(): |
This file contains 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
#!/usr/bin/env python | |
import simplejson | |
import urllib2 | |
from pprint import pprint | |
req = urllib2.Request('https://api.twitter.com/1/trends/1.json') | |
opener = urllib2.build_opener() | |
f = opener.open(req) |