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 numpy as np | |
from numba.decorators import jit | |
from numba import * | |
import time | |
mu = 0.1 | |
Lx, Ly = 601, 601 | |
@jit('void(double[:,:], double[:,:], int32)') | |
def diffusionObstacleStep(u, tempU, iterNum): |
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/bash | |
KEY=$(xauth list | grep "$(hostname)/unix:0" | awk '{ print $3 }' | head -n 1) | |
CONT_HOSTNAME=docker-skype | |
xauth add $CONT_HOSTNAME/unix:0 . $KEY | |
docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v $HOME/.Xauthority:/tmp/.Xauthority \ | |
-v /dev/snd:/dev/snd \ | |
-e DISPLAY=unix$DISPLAY \ |
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 -exu | |
dev=$1 | |
cd $(mktemp -d) | |
function umountboot { | |
umount boot || true | |
umount root || true | |
} | |
# RPi1/Zero (armv6h): |
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
# Print a black and white PNG file on the first available Brother label printer | |
# Requires https://github.com/pklaus/brother_ql | |
# Source (.) this file to set bash completion and add the print function. | |
function print-png-label() { | |
if [ -f "$1" ]; then | |
# Change these to match your printer: | |
local LBLPMODEL="QL-720NW" | |
local LBLPSIZE="62" |
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/env python | |
""" | |
From | |
https://github.com/gddc/ttfquery/blob/master/ttfquery/describe.py | |
and | |
http://www.starrhorne.com/2012/01/18/how-to-extract-font-names-from-ttf-files-using-python-and-our-old-friend-the-command-line.html | |
ported to Python 3 | |
""" |
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/env python | |
""" | |
Zeroconf Discovery for Rigol DS1000Z-series scopes | |
-------------------------------------------------- | |
Documentation worth looking at: | |
* http://lxistandard.org/Documents/Specifications/LXI%20Device%20Specification%202011%20rev%201.4.pdf | |
* http://lxistandard.org/GuidesForUsingLXI/Introducing%20LXI%20To%20Your%20Network%20Administrator%20May%2024_2013.pdf | |
* http://lxistandard.org/GuidesForUsingLXI/LXI_Getting_Started_Guide_May_1_2013.pdf |
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/env python | |
""" | |
Download data from a Rigol DS1052E oscilloscope and graph with matplotlib. | |
By Ken Shirriff, http://righto.com/rigol | |
Based on http://www.cibomahto.com/2010/04/controlling-a-rigol-oscilloscope-using-linux-and-python/ | |
by Cibo Mahto. | |
""" |
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
#include <string> | |
#include <iostream> | |
#include "H5Cpp.h" | |
#define MAX_NAME_LENGTH 32 | |
const std::string FileName("SimpleCompound.h5"); | |
const std::string DatasetName("PersonalInformation"); | |
const std::string member_age("Age"); | |
const std::string member_sex("Sex"); | |
const std::string member_name("Name"); |
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/env python | |
""" | |
LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
import argparse | |
import datetime | |
import sys | |
import time | |
import threading |
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
/************************************************************************ | |
* Arduino Due: Reading & Writing to I2C EEPROM Version: 1.00 * | |
* Function : Reads and Writes to Atmel 24C64 Serial EEPROM * | |
* Exp. Level : Beginner/Elementary * | |
************************************************************************ | |
* Arduino IDE v1.5.2 from http://arduino.cc/en/Main/Software * | |
* Configuration: Arduino Due (Programming Port) on /dev/ttyACM0 * | |
* Operating System: Xubuntu Linux 13.10 Saucy Salamander (32-bit) * | |
* Created: June 13, 2013 Latest Revision: June 13, 2013 * | |
************************************************************************ |
NewerOlder