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
{"nodes":[{"degc":0.1135135135,"group":1,"name":"93\n","bwn":0.0302200404,"deg":21},{"degc":0.0810810811,"group":1,"name":"81\n","bwn":0.0132142387,"deg":15},{"degc":0.027027027,"group":1,"name":"28\n","bwn":0.0013243649,"deg":5},{"degc":0.0540540541,"group":1,"name":"54\n","bwn":0.005441404,"deg":10},{"degc":0.0486486486,"group":1,"name":"40\n","bwn":0.0040485988,"deg":9},{"degc":0.027027027,"group":1,"name":"34\n","bwn":0.0011102586,"deg":5},{"degc":0.1243243243,"group":1,"name":"69\n","bwn":0.0279832556,"deg":23},{"degc":0.0864864865,"group":1,"name":"24","bwn":0.0169650797,"deg":16},{"degc":0.0810810811,"group":1,"name":"25","bwn":0.0128248822,"deg":15},{"degc":0.0486486486,"group":1,"name":"26","bwn":0.0031609679,"deg":9},{"degc":0.0810810811,"group":1,"name":"27","bwn":0.015093073,"deg":15},{"degc":0.0702702703,"group":1,"name":"20","bwn":0.0086559008,"deg":13},{"degc":0.0972972973,"group":1,"name":"21","bwn":0.0197618924,"deg":18},{"degc":0.0540540541,"group":1,"name":"49\n","bwn":0.0051206979,"deg":10 |
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
1 2 | |
2 16 | |
3 19 | |
4 20 | |
5 12 | |
6 1 | |
7 8 | |
8 17 | |
9 11 | |
10 4 |
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 sys, random | |
fout = open('pairs.txt', 'w') | |
# total number of people participating | |
total_people = int(sys.argv[1]) | |
a, b = [], [] | |
for i in xrange(1, total_people+1): | |
a.append(i) |
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
Crime in India | |
Crime in India is a portal to track the number of crimes categorized by crime type. The data used by CIN is from NCRB (National Crime Records Bureau). | |
Category: Side project |
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
Mps Attending Parliament | |
This project tracks the number of MPs attending parliament in every parliament session. | |
Category: Side project |
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
sort filename.txt| uniq > test.txt; egrep -e 'pattern' test.txt |
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
"SELECT .... mysql_column IN('".implode("','", $str).'\')'."GROUP BY ...."; |
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
<?php | |
function csvToArrayTwo($file, $delimiter) { | |
if (($handle = fopen($file, 'r')) !== FALSE) { | |
$i = 0; | |
while (($lineArray = fgetcsv($handle, 4000, $delimiter, '"')) !== FALSE) { | |
for ($j = 0; $j < count($lineArray); $j++) { | |
$arr[$i][$j] = $lineArray[$j]; | |
} | |
$i++; | |
} |
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://stackoverflow.com/a/7389616/514874 | |
data_uri = open('/path/to/image/image.png', 'rb').read().encode('base64').replace('\n', '') | |
img_tag = '<img src="data:image/png;base64,{0}" width="400" height="275">'.format(data_uri) | |
# I embedded .png image generated by Pyplot. Full credit to Glider@SO (http://stackoverflow.com/users/940789/glider) for making this work! |