Skip to content

Instantly share code, notes, and snippets.

View glciampaglia's full-sized avatar

Giovanni Luca Ciampaglia glciampaglia

View GitHub Profile
#EXTM3U
#EXTINF:0,Radio France - FIP
https://stream.radiofrance.fr/fip/fip_hifi.m3u8
#EXTINF:0,Radio France - FIP Reggae
https://stream.radiofrance.fr/fipreggae/fipreggae_hifi.m3u8
#EXTINF:0,Radio France - FIP World
https://stream.radiofrance.fr/fipworld/fipworld_hifi.m3u8
#EXTINF:0,Radio France - FIP Nouveautés
https://stream.radiofrance.fr/fipnouveautes/fipnouveautes_hifi.m3u8
#EXTINF:0,Radio France - FIP Electro
@vladbabii
vladbabii / mount_x.service
Created January 29, 2018 16:54
Systemd run script after mount
# original: https://askubuntu.com/questions/25071/how-to-run-a-script-when-a-specific-flash-drive-is-mounted
# you can find your device unit with: sudo systemctl list-units -t mount
# put this into /etc/systemd/system/your.service
[Unit]
Description=SharedMountTrigger
Requires=mnt-shared.mount
After=mnt-shared.mount
[Service]
@Ezka77
Ezka77 / Radio.m3u
Last active May 14, 2024 19:00
RadioFrance m3u playlist
#EXTM3U
#EXTINF:0,France Culture - direct
http://direct.franceculture.fr/live/franceculture-midfi.mp3
#EXTINF:0,France Inter
http://icecast.radiofrance.fr/franceinter-hifi.aac?id=radiofrance
#EXTINF:0,France Musique
http://direct.francemusique.fr/live/francemusique-midfi.mp3
#EXTINF:0,France Info
https://stream.radiofrance.fr/franceinfo/franceinfo_hifi.m3u8
#EXTINF:0,France Culture - alternative link
@brianckeegan
brianckeegan / backbone_extractor.py
Last active August 2, 2023 19:26
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 http://www.pnas.org/content/106/16/6483.abstract
# 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()
@minrk
minrk / nbstripout
Last active June 6, 2023 06:23
git pre-commit hook for stripping output from IPython notebooks
#!/usr/bin/env python
"""strip outputs from an IPython Notebook
Opens a notebook, strips its output, and writes the outputless version to the original file.
Useful mainly as a git filter or pre-commit hook for users who don't want to track output in VCS.
This does mostly the same thing as the `Clear All Output` command in the notebook UI.
LICENSE: Public Domain
@KartikTalwar
KartikTalwar / Documentation.md
Last active June 25, 2024 10:55
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@GaelVaroquaux
GaelVaroquaux / 00README.rst
Last active September 15, 2023 03:58
Copy-less bindings of C-generated arrays with Cython

Cython example of exposing C-computed arrays in Python without data copies

The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.

The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy

@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000