Skip to content

Instantly share code, notes, and snippets.

steam228 / wosScopusMerge.r
Created Nov 29, 2021
R Bibliometrix WOS/SCOPUS merge
View wosScopusMerge.r
WOS_df <- convert2df(file = './WOS/wos.bib', dbsource = "wos", format = "bibtex")
SCOPUS_df <- convert2df(file = './SCOPUS/scopus.bib', dbsource = "scopus", format = "bibtex")
Merge_SCO_WOS <- mergeDbSources(SCOPUS_df, WOS_df, remove.duplicated=TRUE)
phanan / runner.js
Last active Sep 22, 2022
Record a webpage with PhantomJS and FFMpeg
View runner.js
// Run this from the commandline:
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4
var page = require('webpage').create(),
address = '',
duration = 3, // duration of the video, in seconds
framerate = 24, // number of frames per second. 24 is a good value.
counter = 0,
width = 500,
height = 500;
macagua /
Created Jun 20, 2014
Python Gravatar Example for Gource software
# -*- coding: utf-8 -*-
#fetch Gravatars
import os
import requests
import subprocess
import hashlib
brianckeegan /
Last active Nov 15, 2022
Given a networkx graph containing weighted edges and a threshold parameter alpha, this code will return another networkx graph with the "backbone" of the graph containing a subset of weighted edges that fall above the threshold following the method in Serrano et al. 2008.
# Serrano, Boguna, Vespigani backbone extractor
# from
# Thanks to Michael Conover and Qian Zhang at Indiana with help on earlier versions
# Thanks to Clay Davis for pointing out an error
import networkx as nx
import numpy as np
def extract_backbone(g, weight='weight', alpha=.05):
backbone_graph = nx.Graph()
tito /
Created Nov 12, 2013
Bluetooth example on Android using Python / Pyjnius
Bluetooth/Pyjnius example
This was used to send some bytes to an arduino via bluetooth.
The app must have BLUETOOTH and BLUETOOTH_ADMIN permissions (well, i didn't
tested without BLUETOOTH_ADMIN, maybe it works.)
Connect your device to your phone, via the bluetooth menu. After the
pairing is done, you'll be able to use it in the app.
aanastasiou / README.MD
Created Jul 28, 2013
Generate a Cypher query to store a Python Networkx directed graph

Exporting a Networkx graph as a Cypher query

This little project defines a function that can be used to construct a Cypher query which when executed against a Neo4j database server will store the graph to the server.


  • A Graph is an abstract mathematical model composed of Nodes connected through Edges that can be used to describe complex systems composed of a set of parts (corresponding to nodes) and their connections (corresponding to edges).
  • Examples of graphs are road networks (junctions connected via roads), electronic circuit networks (components and their connections) and others
  • Networkx is an excellent Python module for manipulating such Graph objects of any kind.
  • Neo4j is a graph database. It uses the Graph as a data model to store such objects to a data store.
jbilcke /
Last active Dec 14, 2021
How to create a video using Gephi + Scripting plugin + ffmpeg
ts_min=1352261778000, # "from" timestamp..
ts_max=1352262378000, # .."to" timestamp
frames=20, # number of images in the video. eg 200 frames for a video at 20 frames per seconds = 10 seconds of video
output_prefix="/path/to/output/dir/frame_", # path where to write the png. images will be prefixed with "frame_"
output_format=".png" # you probably want to leave png here
MoritzStefaner / gist:3423911
Created Aug 22, 2012
Sample class for rendering a gephi layout with Java/processing
View gist:3423911
import org.gephi.filters.api.FilterController;
import org.gephi.graph.api.DirectedGraph;
import org.gephi.graph.api.Edge;
underhilllabs /
Created Apr 22, 2012
Export delicious bookmarks into a scuttle site
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# code originally from Michael Klier
# -- licensed unded CC-NC-SA
# 1. change username and password in urls below
# 2. change SCUTTLEDOMAIN to the domain of your scuttle site
benjaminjackson / kickstarter_csv.rb
Created Apr 19, 2012
Screen Scraping Script for Kickstarter Projects
View kickstarter_csv.rb
# Usage: ruby kickstarter_csv.rb output.csv
require 'rubygems'
require 'kickstarter'
LAST_REPORT_DATE = Date.parse("April 28, 2011")
FIELDS = [:name, :pledge_amount, :pledge_percent, :pledge_deadline, :owner]
def fetch_projects_for_category category, file