Skip to content

Instantly share code, notes, and snippets.

View secunit64's full-sized avatar

Madhu Srinivasan secunit64

View GitHub Profile
@secunit64
secunit64 / command line shell
Created July 24, 2012 11:38 — forked from blakmatrix/command line shell
Getting Meteor wordplay up on nodejitsu/jitsu
meteor create --example wordplay
meteor bundle myapp.tgz
tar xzf myapp.tgz
cd bundle
(create package json with settings below)
jitsu databases create mongo <dbname>
(grab dbstring)
jitsu env set PORT 3000
jitsu env set MONGO_URL <dbstring>
jitsu deploy
@secunit64
secunit64 / command line shell
Created July 24, 2012 11:38 — forked from blakmatrix/command line shell
Getting Meteor todos up on nodejitsu/jitsu
meteor create --example todos
meteor bundle myapp.tgz
tar xzf myapp.tgz
cd bundle
(create package json with settings below)
jitsu databases create mongo <dbname>
(grab dbstring)
jitsu env set PORT 3000
jitsu env set MONGO_URL <dbstring>
jitsu deploy
@secunit64
secunit64 / command line shell
Created July 24, 2012 11:38 — forked from blakmatrix/command line shell
Getting Meteor leaderboard up on nodejitsu/jitsu
meteor create --example leaderboard
meteor bundle myapp.tgz
tar xzf myapp.tgz
cd bundle
(create package json with settings below)
jitsu databases create mongo <dbname>
(grab dbstring)
jitsu env set PORT 3000
jitsu env set MONGO_URL <dbstring>
jitsu deploy
@secunit64
secunit64 / reactive-templates.js
Created August 5, 2012 20:54
Doing templates in meteor
if (Meteor.is_client) {
Meteor.startup(function(){
Session.set('first', 1);
Session.set('last', 'Srinivasan');
var fragment = Meteor.ui.render(function (){
return Template.hello({
first: Session.get('first'),
@secunit64
secunit64 / reactive-templates.js
Created August 5, 2012 20:55
Doing templates in meteor
if (Meteor.is_client) {
Meteor.startup(function(){
Session.set('first', 1);
Session.set('last', 'Srinivasan');
var fragment = Meteor.ui.render(function (){
return Template.hello({
first: Session.get('first'),
@secunit64
secunit64 / ArrayBuffers
Created November 5, 2012 11:49
ArrayBuffer-Buffer Conversion
function toArrayBuffer(buffer) {
var ab = new ArrayBuffer(buffer.length);
var view = new Uint8Array(ab);
for (var i = 0; i < buffer.length; ++i) {
view[i] = buffer[i];
}
return ab;
}
@secunit64
secunit64 / neser-pvserver.sh
Last active October 13, 2015 13:28
Job template file for llsubmit
#!/bin/sh
# @ account_no = xxxx
# @ error = $(job_name).$(jobid).outerr
# @ output = $(job_name).$(jobid).out
# @ job_name = paraview
# @ wall_clock_limit = 1:00:00
# @ environment = COPY_ALL
# @ job_type = parallel
# @ node = 4
# @ tasks_per_node = 4
@secunit64
secunit64 / tiff-extractor.sh
Last active December 11, 2015 21:58
Extracting a page from a pyramidal tiff file
vips im_tiff2vips CancerImage.tif:0 ~/test.png
#creating a tiff
vips im_vips2tiff view1.png test-image.tif:deflate,tile:256x256,pyramid
@secunit64
secunit64 / README.md
Created February 9, 2013 08:41 — forked from emeeks/README.md

The range sliders at the top change the values for the force-directed algorithm and the buttons load new graphs and apply various techniques. This will hopefully serve as a tool for teaching network analysis and visualization principles during my Gephi courses and general Networks in the Humanities presentations.

Notice this includes a pretty straightforward way to load CSV node and edge lists as exported from Gephi.

It also includes a pathfinding algorithm built for the standard data structure of force-directed networks in D3. This requires the addition of .id attributes for the nodes, however.

Now with Clustering Coefficients!

Also, it loads images for nodes but the images are not in the gist. The code also refers to different network types but the data files on Gist only refer to the transportation network.