Skip to content

Instantly share code, notes, and snippets.

Avatar

Luca Pandini lpand

  • Milan – Italy
View GitHub Profile
View forward.js
function forward (receiver, methods, toProvider) {
methods.forEach(function (methodName) {
receiver[methodName] = function () {
var result = toProvider[methodName].apply(toProvider, arguments);
// for method chaining
return result === toProvider ? this : result;
};
});
return receiver;
View enrichment-network-test.js
var graph = (function (d3) {
"use strict";
return function graph (nodes, edges, options) {
options = options || {};
var container = d3.select(options.container);
var nthTerms = options.showNth || 5;
var margin = options.margin || { top: 20, right: 30, bottom: 20, left: 30 };
var width = (options.width || 1200) - margin.right - margin.left;
View enrichment-network-init.js
var data = {"graphs":{"Gene Ontology (GO)":{"edges":[{"source":"ACE","target":"GO:0048856"},{"source":"AIMP1","target":"GO:0048856"},{"source":"AMHR2","target":"GO:0048856"},{"source":"ANKRD1","target":"GO:0048856"},{"source":"APRT","target":"GO:0048856"},{"source":"ARHGAP26","target":"GO:0048856"},{"source":"ATP7A","target":"GO:0048856"},{"source":"BLNK","target":"GO:0048856"},{"source":"BMP4","target":"GO:0048856"},{"source":"BRAF","target":"GO:0048856"},{"source":"BSG","target":"GO:0048856"},{"source":"CASC5","target":"GO:0048856"},{"source":"CD8A","target":"GO:0048856"},{"source":"CDKL5","target":"GO:0048856"},{"source":"CDKN1B","target":"GO:0048856"},{"source":"CDSN","target":"GO:0048856"},{"source":"CHRND","target":"GO:0048856"},{"source":"COL11A2","target":"GO:0048856"},{"source":"COX7B","target":"GO:0048856"},{"source":"CRYAB","target":"GO:0048856"},{"source":"DNAAF1","target":"GO:0048856"},{"source":"DSP","target":"GO:0048856"},{"source":"FHL1","target":"GO:0048856"},{"source":"FOXN1","target":"GO:0
View hypg.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <time.h>
#define MAX 2000
#define UNDEF "NA"
View nt.gml
graph [
node [
id 0
label "0"
pathway [u'Hemostasis']
domain [u'pfam05109']
compartment [u'GO:0001931', u' GO:0005604', u' GO:0005615', u' GO:0005886', u' GO:0005887']
name "SPN"
disease [u'MYL003', u'MNT214', u'WSK001', u'MRG003', u'MYL040', u'BCL009']
]
View .emacs
(add-to-list 'load-path "~/.emacs.d/auto-complete/")
(add-to-list 'load-path "~/.emacs.d/elisp/")
(load-library "mac-keyboard")
(load-library "auto-complete")
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-0.8.0")
(add-to-list 'load-path "~/.emacs.d/multiple-cursors/")
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
View OverviewResource.java
package com.mediture.truchart.rest.resources;
import java.util.*;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
View simple-gold.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>lpand</string>
View simple-fire.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>lpand</string>
View ActCtrl.java
@RestController @RequestMapping(path = "/act-tracking")
public class ActivityTrackingController {
@RequestMapping(
path = { "", "/" },
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
public List<VActTracking> query(
@RequestParam(name="q", defaultValue="") String q,
@RequestParam(name="page", defaultValue="0") int page,
You can’t perform that action at this time.