Skip to content

Instantly share code, notes, and snippets.


Dénes Csala csaladenes

View GitHub Profile
tomshaffner /
Created Jun 3, 2019 — forked from bbengfort/
Convert a networkx to graph-tool graph
# -*- coding: utf-8 -*-
import networkx as nx
import graph_tool as gt
def get_prop_type(value, key=None):
Performs typing and value conversion for the graph_tool PropertyMap class.
If a key is provided, it also ensures the key is in a format that can be
used with the PropertyMap. Returns a tuple, (type name, value, key)
jalcantarab /
Last active Jul 23, 2022 — forked from crstamps2/jsonPuller
A Google apps script to pull json from a spreadsheet

JSON Puller - Google Apps Script

Transforms the data of a given Spreadsheet Sheet to JSON.

  • The frozen rows are taken as keys for the JSON.
  • The data taken for the values is only that after the frozen rows

Set up:

exportJSON(Spreadsheet) - transforms the data in the given sheet to JSON.

jquacinella /
Last active Jun 10, 2020
Violin Plots for Weighted Data in Matplotlib
import weighted
from matplotlib.cbook import violin_stats
from scipy import stats
import statsmodels.api as sm
def vdensity_with_weights(weights):
''' Outer function allows innder function access to weights. Matplotlib
needs function to take in data and coords, so this seems like only way
to 'pass' custom density function a set of weights '''
ceilfors /
Last active Aug 2, 2022
ssh-copy-id for Windows
"""ssh-copy-id for Windows.
Example usage: python ceilfors@my-remote-machine
This script is dependent on msysgit by default as it requires scp and ssh.
For convenience you can also try that comes
import argparse, os
from subprocess import call
andreas-h /
Created Dec 5, 2013
Python-wrapper for R's STL
# -*- coding: utf-8 -*-
import datetime
from numpy import asarray, ceil
import pandas
import rpy2.robjects as robjects
def stl(data, ns, np=None, nt=None, nl=None, isdeg=0, itdeg=1, ildeg=1,
nsjump=None, ntjump=None, nljump=None, ni=2, no=0, fulloutput=False):