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
var countries_data = {"type":"FeatureCollection","features":[ | |
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"}, | |
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"}, | |
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,3 |
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
import urllib | |
import simplejson as json | |
def get_followers_url(handle): | |
return 'https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=' + handle | |
def get_followers(handle): | |
return json.load(urllib.urlopen(get_followers_url(handle)))['ids'] | |
def get_friends_url(handle): |
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
[gauravm@dev675 ~] cowsay I\'m the cache cow | |
___________________ | |
< I'm the cache cow > | |
------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || |
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
gauravmenghani at localhost [~] | |
> curl -s http://andazapnapna.com/quote | cowsay | |
______________________________________ | |
/ "Jab koi bachcha nahin sota, to uski \ | |
| maa kehti hai ki... soja soja soja | | |
\ nahin toh Gogo aa jayega." / | |
-------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ |
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
export PS1="\n\[$(tput bold)\]\033[38;5;132m\\u\033[39m \[$(tput sgr0)\]at \033[38;5;180m\h \033[39m\\[$(tput sgr0)\][\033[38;5;191m\\W\033[39m]\n\[\033[38;5;208m\]>\[\033[39m\] " |
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
curl -s http://randquotes.com/qt?f=cowsay |
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
_________________________________________ | |
/ Walter White: If you don’t know who I \ | |
| am, maybe your best course would be to | | |
\ tread lightly. / | |
----------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || |
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
import java.util.Random; | |
class FooThread extends Thread { | |
int threadNum; | |
Random random; | |
FooThread(int threadNum) { | |
this.threadNum = threadNum; | |
this.random = new Random(System.currentTimeMillis() + threadNum); | |
} |
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 <iostream> | |
#include <cstring> | |
// This is a toy program, so please excuse the trivial flaws. | |
#define MAXN 2000 | |
#define MAXC 20 | |
// An N*C array, hard-coding the max N = 2000, C = 20. | |
int r[MAXN][MAXC]; | |
int cval[MAXC]; | |
int N, C; |
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
pttrns.com => For patterns. | |
Reference Counting (arc). | |
@ for NSLiteral, so that "" doesn't mean C-string. | |
Set tableView delegate and dataSource = self. | |
Set numberOfRowsInSection | |
Set cell | |