Skip to content

Instantly share code, notes, and snippets.

View matham's full-sized avatar

Matt Einhorn matham

View GitHub Profile
import h5py
import matplotlib.pyplot as plt
import numpy as np
import re
from elephant.statistics import time_histogram
import quantities
from neo import SpikeTrain
def arr2str(arr):
package com.cplab.jstripe;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import io.scif.ImageMetadata;
import io.scif.config.SCIFIOConfig;
comm = TeensyComm()
comm.create_serial_device('COM5')
comm.write_serial(comm.make_modio_create(15, 2, 0x12, ModIOFreq.freq_100k, ModIOPullup.disabled))
comm.write_serial(comm.make_modio_write_digital(46, 2, 0x12, False, True))
comm.write_serial(comm.make_modio_write_digital(46, 2, 0x12, False))
for i in range(200):
comm.write_serial(comm.make_modio_write_digital(46, 2, 0x12, *vals[i % 2]))
#comm.write_serial(comm.make_modio_write_digital(46, 2, 0x13, *vals[i % 2]))
import trio
import contextlib
from async_generator import aclosing
async def gen():
for i in range(10):
yield i
@matham
matham / _msvccompiler.py
Last active July 11, 2020 19:48
github action rc crash
"""distutils._msvccompiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.
The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
"""
# Written by Perry Stoll
@matham
matham / log
Last active July 22, 2019 19:13
$ PATH=$PATH:/e/Graphviz2.38/bin pytest ceed/tests/test_play.py
============================================================================================================= test session starts ============================================================================================================= platform win32 -- Python 3.7.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0
rootdir: G:\Python\libs\ceed, inifile: pytest.ini
plugins: cov-2.7.1, trio-0.5.2
collected 2 items
ceed\tests\test_play.py F. [100%]
================================================================================================================== FAILURES =================================================================================================================== _____________________________________________________________________
import os
import coverage
class KivyCoveragePlugin(coverage.plugin.CoveragePlugin):
def file_tracer(self, filename):
if filename.endswith('.kv'):
return KivyFileTracer(filename=filename)
return None
E:\Python\Python37\Scripts\python.exe G:/Python/libs/garden_vispy/kivy_garden/vispy/examples/simple.py
[INFO ] [Logger ] Record log in E:\msys64\home\matte\.kivy\logs\kivy_19-07-03_18.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer_dev" 0.1.17
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.1.9
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.1.12
[INFO ] [deps ] Successfully imported "kivy_deps.glew_dev" 0.1.12
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.1.22
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2_dev" 0.1.22
[INFO ] [Kivy ] v2.0.0.dev0, git-b8f7a23, 20190703
[INFO ] [Kivy ] Installed at "g:\python\libs\kivy\kivy\__init__.py"
from https://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
git clone <git repository A url>
cd <git repository A directory>
git remote rm origin
git filter-branch --subdirectory-filter <directory 1> -- --all
git filter-branch --index-filter '
git read-tree --empty
git reset $GIT_COMMIT -- cplcom/painter.py
' -- --all -- cplcom/painter.py
mkdir <directory 1>
  1. Create a new empty repo with the name graph.
  2. In coveralls sync the kivy-garden repos and then enable it.
  3. Clone the flower demo repo, if you haven't already. Otherwise make sure it is up to date with master:
    git clone git@github.com:kivy-garden/flower.git
  4. Push the flower repo to github:
    cd flower
    git push --mirror git@github.com:kivy-garden/graph.git