Skip to content

Instantly share code, notes, and snippets.

View russelljjarvis's full-sized avatar
🔨
code carpentry

Russell Jarvis russelljjarvis

🔨
code carpentry
View GitHub Profile
@russelljjarvis
russelljjarvis / ShebangList.md
Created February 27, 2016 00:18 — forked from mitsu-ksgr/ShebangList.md
【Markdown】shebang list

Shebang List

Mac OS X 10.9.x (Mavericks)

Shell
#!/usr/bin/env sh

Python
@russelljjarvis
russelljjarvis / Fedora 21.md
Created September 1, 2016 02:00 — forked from jamespamplin/Fedora 21.md
Enable Mac Book Pro Wifi on Fedora 21

Click here for Fedora 24

The current kernel of Fedora 21 doesn't support the Wifi chip used on my Mac Book Pro. Proprietary Broadcom drivers are packaged and available in the rpmfusion repo.

Verify that your card is a Broadcom using: lspci -vnn -d 14e4:

Sample output:

02:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
@russelljjarvis
russelljjarvis / message_thread.md
Last active November 29, 2016 02:06
sciunit_GA_optimization dev

Hi Rick,

As discussed I am trying to integrate the GA development code I initially made here.

With sciunit judge, in order to use it to optomize the Allen Brian Institute example here.

Today I was occupied with fixing minor problems such as getting pyneuroml and allenbrainsdk into the dockerbuild I have made, that builds on scidash/neuronunit-scoop-deap. I am currently trying to replicate the AIBS.ipynb using the said docker image as substrate. Incidentally when I try to run the AIBS notebook it gets stuck on the line: NameError: name 'vm' is not defined. When reading over the code vm does not appear to be declared anywhere, I am not sure how it enters the name space in the notebook. Perhaps it comes from an imported module.

I did not get the sense that vm is used in a way that has consequences for the variables that I want to optomize so now I have commented out

int bluePin=6;
int lightPulsePin=5;
int solenoidPin=10;
int odorPulsePin=11;
//int matlabData[]={0,0,0,0,0,0,0};
float matlabData2[]={0,0,0,0,0,0,0};
unsigned long previousMillis = 0; // will store last time LED was updated
unsigned long interval_odor_on = 0;
#!pip install -e +git https://github.com/ckreibich/scholar.py
import sys
from scholar_scrape import scholar
import pandas as pd
unicode = str # pylint: disable-msg=W0622
encode = lambda s: unicode(s) # pylint: disable-msg=C0103 '''
@russelljjarvis
russelljjarvis / pythontojulia.md
Created April 15, 2020 01:43 — forked from svaksha/pythontojulia.md
Python to Julia Quick translation / conversion reference Guide

A quick and dirty syntax translation / conversion reference guide to ease the transition between Python and Julia. This is not meant as a reference to the language. For that you should read the manual.

Some important differences

  • Arrays in Julia are indexed starting from 1.
  • In Julia classes (i.e. types) don't own methods. Methods are implementations of generic functions and are invoked in a "static style", i.e. instead of Python's str1.rstrip(), we will have rstrip( str1 ), instead of file1.close(), close( file1 ).

Some important similarities.

@russelljjarvis
russelljjarvis / gist:ac5b54cd84738a5c31c9e5ff3cc390fd
Created May 14, 2020 08:24
chapter3 and jNeuroML backend broken due to dt of Neo `Vm` being 50% too brief.
We couldn’t find that file to show.
We couldn’t find that file to show.
@russelljjarvis
russelljjarvis / zscore.py
Created July 21, 2020 04:48 — forked from mnguyenngo/zscore.py
Code to calculate and plot the z-score
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as scs
def z_val(sig_level=0.05, two_tailed=True):
"""Returns the z value for a given significance level"""
z_dist = scs.norm()
if two_tailed:
sig_level = sig_level/2
area = 1 - sig_level
@russelljjarvis
russelljjarvis / 3dwiring.py
Last active April 29, 2021 12:01
parallel 3d spatial euclidian wiring of neuron morphologies with NEURON simulator.
'''
Author information. This is an extension to the Utils class from Allen Brain API.
The parallel wiring related functions are written by Russell Jarvis rjjarvis@asu.edu
'''
from allensdk.model.biophys_sim.neuron.hoc_utils import HocUtils
import logging
import glob
from mpi4py import MPI