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 -*- | |
# | |
# Minimal Working Example of a single neuron and a single spike source on NMPM1 | |
# | |
# Andreas Stöckel, October 2015 | |
# | |
import pylogging | |
import pyhmf as pynn |
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 | |
''' | |
Spikey Bug: Neuron Populations | |
''' | |
import pyNN.hardware.spikey as pynn | |
pynn.setup() |
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 | |
./clean.sh | |
FILES="`find chapters/ appendix/ frontmatter/ backmatter/ -name "*.tex" | sort` glossary.tex" | |
for FILE in $FILES; do | |
echo "=============" | |
echo $FILE | |
echo "=============" |
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 | |
# -*- coding: utf-8 -*- | |
# Test script which demonstrates a Bug in Spikey: | |
# If a SpikeSourceArray targets both excitatory and inhibitory synapses (of | |
# different target neurons), only inhibitory connections are made. | |
import numpy as np | |
import pyNN.hardware.spikey as sim |
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 <time.h> | |
#include <stdlib.h> | |
#include <iostream> | |
#include <vector> | |
struct A | |
{ | |
void a(unsigned n) { a_ = n; } | |
void b(unsigned n) { b_ = n; } | |
void c(unsigned n) { c_ = 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/env python3 | |
import xml.etree.ElementTree as ET | |
import sys | |
import unicodedata | |
import difflib | |
if len(sys.argv) != 4: | |
print("Usage: copy_rating <OLD DB> <NEW DB> <TARGET>") | |
sys.exit(1) |
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 <setjmp.h> | |
#include <signal.h> | |
#include <gtest/gtest.h> | |
static sigjmp_buf jmp_expect_signal; | |
static void handler(int) { siglongjmp(jmp_expect_signal, 1); } | |
#define EXPECT_SIGNAL(CODE, SIGNO) \ |
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 python3 | |
import sys | |
if len(sys.argv) != 3: | |
print("Usage ./leases_to_hosts.py <DHCPD LEASES FILE> <OUTFILE>") | |
sys.exit(1) | |
def parse_string(f): | |
res = b'' |
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 | |
pacat \ | |
--device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \ | |
--rate=48000 \ | |
--record | \ | |
opusenc \ | |
--expect-loss=25 \ | |
--max-delay=0 \ | |
--framesize=2.5 \ |
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 -e | |
# Fetch the number of pages in the pdf | |
NP=`pdfinfo "$1" | grep "Pages:" | sed 's/Pages:[ \t]*\(0-9\)*[ \t]*/\1/'` | |
# Fetch the title | |
TITLE=`pdfinfo "$1" | grep "Title:" | sed 's/Title:[ \t]*\(.*\)/\1/'` | |
# Create a target folder | |
NAME=`basename "$1" .pdf` |
OlderNewer