Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xarray as xr | |
import numpy as np | |
import holoviews as hv | |
from holoviews.streams import PointDraw | |
from holoviews.plotting.links import DataLink | |
import panel as pn | |
import param | |
hv.extension('bokeh') | |
class DataLoader(param.Parameterized): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Written by Nick Gammon | |
// February 2011 | |
/** | |
* Send arbitrary number of bits at whatever clock rate (tested at 500 KHZ and 500 HZ). | |
* This script will capture the SPI bytes, when a '\n' is recieved it will then output | |
* the captured byte stream via the serial. | |
*/ | |
#include <SPI.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import json | |
import sys | |
from ConfigParser import (ConfigParser, MissingSectionHeaderError, | |
ParsingError, DEFAULTSECT) | |
class StrictConfigParser(ConfigParser): | |
def _read(self, fp, fpname): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# To run this without copy/paste the whole thing: | |
# curl https://gist.githubusercontent.com/elerch/88ea951c9c4ec4c3c1604b8fc9167e53/raw/bootstrap.sh > bootstrap.sh && sh bootstrap.sh && rm bootstrap.sh | |
# mr is just a perl script | |
myrepos="http://source.myrepos.branchable.com/?p=source.git;a=blob_plain;f=mr;hb=HEAD" | |
# vcsh is just a bash script | |
vcsh=https://raw.githubusercontent.com/RichiH/vcsh/master/vcsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import time | |
import datetime | |
UNO = '/dev/ttyACM0' | |
ser = serial.Serial(UNO, 115200) | |
repeatTime = 1000 # milliseconds | |
def writeData(value): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Pandoc filter that grabs the BibTeX code block from each note file | |
# and then uses bibtexparser to add a "short title" entry in the "note" field, | |
# appending finished BibTeX entry to a bibliography file. | |
from pandocfilters import toJSONFilter, CodeBlock | |
# https://github.com/sciunto/python-bibtexparser | |
import bibtexparser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to clean (and sort) the bibfile exported by mendeley | |
# It is then apt for versioning | |
# Author: Carles F. Julià <carles.fernandez(AT)upf.edu> | |
# You will need bibtexparser package: | |
# $ pip install bibtexparser | |
# usage: cleanbib.py library.bib | |
# WARNING: it overwrites the original file |