Skip to content

Instantly share code, notes, and snippets.

View BastinRobin's full-sized avatar
🏠
Working from home

Bastin Robin BastinRobin

🏠
Working from home
View GitHub Profile
@AnnamalaiNagappan
AnnamalaiNagappan / conversion.py
Created September 26, 2016 12:33
python script to convert all python .py files inside the current directory and all its subdirectories into .pyc and remove all .py files
import compileall
import os
# Get current working directory
curr_dir = os.getcwd()
# Compiles all python files to pyc
compileall.compile_dir(curr_dir, force=True)
# Recursively iterates to find .py files and remove them
@JeffreyWay
JeffreyWay / .vimrc
Last active January 22, 2024 11:42
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@JohnCoogan
JohnCoogan / d3.geo.min.js
Created December 29, 2011 04:09
India Map in D3
(function(){function b(a,b){return function(c){return c&&c.type in a?a[c.type](c):b}}function c(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+ -2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function d(a,b){a.type in e&&e[a.type](a,b)}function f(a,b){d(a.geometry,b)}function g(a,b){for(var c=a.features,e=0,f=c.length;e<f;e++)d(c[e].geometry,b)}function h(a,b){for(var c=a.geometries,e=0,f=c.length;e<f;e++)d(c[e],b)}function i(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function j(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function k(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d][0],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function l(a,b){b.apply(null,a.coordinates)}function m(a,b){for(var c=a.coordinates[0],d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function n(a){return a.source}function o(a){return a.target}function p(b,c){function r(b){var c=Math.sin(p-(b*=p))/q,d=Math.sin(b)/q,g=c*h*e+d*n*k,j=c*h*f+d*n*l,m=c*i+d