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 os | |
import sys | |
import re | |
from subprocess import check_output, call, CalledProcessError | |
from difflib import Differ | |
import requests | |
import json | |
red_begin = "\033[91m" | |
red_end = "\033[0m" |
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 | |
# exit on error | |
set -e | |
# run go test in each package that contains test files (once per package only) | |
find -iname "*test.go" -execdir [ ! -e covprof.part ] \; -execdir go test -v -covermode=count -coverprofile=covprof.part \; | |
# prepare global coverage profile | |
echo "mode: count" > profile.cov |
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/bash | |
set -e | |
gitconfig=( | |
"user.name annextester" | |
"user.email [email protected]" | |
"annex.addunlocked true" | |
"annex.largefiles largerthan=10M" | |
"annex.backends WORM" |
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 smtplib | |
session = smtplib.SMTP('smtp.gmail.com', 587) | |
session.starttls() | |
session.login("username", "password") | |
subject = "Subject" | |
headers = ("From: {fromaddress}\n" | |
"To: {toaddress}\n" | |
"Subject: {subject}\n" | |
"mime-version: 1.0\n" |
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/bash | |
set -e | |
user=achilleas | |
reponame=test-repo-${RANDOM} | |
dirone=/tmp/gin-test-repos/directory-one | |
dirtwo=/tmp/gin-test-repos/directory-two | |
cdprint() { |
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
:: GIN client local setup for Windows | |
:: | |
:: This file should be part of the gin client Windows bundle The purpose of the | |
:: file is to set up the environment and client configuration so that the | |
:: command line client can be used out of the box, without the need to install | |
:: or configure any packages. | |
:: | |
:: The following actions are taken: | |
:: | |
:: - The gin configuration file (config.yml) is created and the binary paths |
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 neo | |
import nixio as nix | |
import quantities as pq | |
import numpy as np | |
import time | |
import matplotlib.pyplot as plt | |
import cProfile | |
# n_segs = 150 |
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
# IMAP STUFF | |
source ~/keys/muttpass | |
set imap_user = $my_login | |
set imap_pass = $my_pass | |
set folder = imaps://mailin.lrz.de:993/ | |
set spoolfile = +Inbox | |
mailboxes = +Inbox +Inbox.Archive +Inbox.Drafts +Inbox.Sent +Inbox.Junk +Inbox.Trash | |
set header_cache = ~/.cache/mutt | |
set message_cachedir = ~/.cache/mutt |
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 nixio as nix | |
from time import time | |
from uuid import uuid4 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def verify_file(backend, N): | |
print("Verifying file") | |
nixfile = nix.File.open("/tmp/append-test.h5", nix.FileMode.ReadOnly, |
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 <nix.hpp> | |
int main(){ | |
nix::File file = nix::File::open("append_bug.nix", nix::FileMode::Overwrite); | |
nix::Block bone = file.createBlock("One", "test"); | |
nix::Block btwo = file.createBlock("Two", "test"); | |
nix::DataArray done = bone.createDataArray("DATA", "test", nix::DataType::Double, {1}); | |
nix::DataArray dtwo = btwo.createDataArray("DATA", "test", nix::DataType::Double, {1}); // same name |