Skip to content

Instantly share code, notes, and snippets.

View gokceneraslan's full-sized avatar

Gökçen Eraslan gokceneraslan

View GitHub Profile
@thesamovar
thesamovar / Automatic scientific axes layout for matplotlib.ipynb
Last active June 7, 2024 19:35
Automatic scientific axes layout for matplotlib.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
from numpy.linalg import norm, solve
from scipy.spatial.distance import cdist
from sklearn.neighbors import kneighbors_graph
def phi(l, mu):
return (mu * (np.sqrt(l) - 1)**2)
@systemfreund
systemfreund / stream-twitter.sh
Last active November 9, 2021 17:14
Twitter stream integration for mattermost
#!/bin/bash
# dependencies:
# curl
# culicue - curl wrapper to make oauthv1 requests (https://github.com/decklin/curlicue/blob/master/curlicue)
# jq - filter json from twitter api and transform to a structure mattermost is expecting
# credentials file can be created with the curlicue-setup script
credentials=/home/me/credentials.conf
webhook='https://yourmattermost.server/hooks/1mjxx6amd52q8doxzy16o75adh'
@ntamas
ntamas / hlc.py
Created November 19, 2013 09:54
Hierarchical link clustering algorithm of Ahn et al (see http://barabasilab.neu.edu/projects/linkcommunities/), implemented using Python and igraph for fun.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Hierarchical link clustering
============================
:Author: Tamás Nepusz
This is an implementation of the hierarchical link clustering algorithm of Ahn
et al. The results provided by this implementation match those of the original