Skip to content

Instantly share code, notes, and snippets.

View achilleas-k's full-sized avatar
🕹️

Achilleas Koutsou achilleas-k

🕹️
View GitHub Profile
@achilleas-k
achilleas-k / spike_distance_mp.py
Created November 12, 2013 19:22
Victor spike distance - average of all pairs for multiple spike trains - uses multiprocessing
import numpy as np
import multiprocessing
import itertools
def stdistance(tli, tlj, cost):
'''
Calculates the "spike time" distance (Victor & Purpura, 1996) for a single
cost.

Existing curves

Retail curve

The joystick curve found in the retail game's source.

n(x) = (9-x)/9
f(I) = I*(s/9)+(I^5)*n(s)

Current curve for Windows version

The Windows version of joy.cpp got a new curve at some point.

import sys
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
def plot_func(curve, name):
sens = np.arange(0, 10, 3.0)
x = mpl.mlab.frange(0, 1, 0.01)
plt.figure(name)
@achilleas-k
achilleas-k / cvimrc
Last active October 10, 2019 16:05
cVimrc
let barposition = "top"
let mapleader = " "
set noautofocus
set numerichints
set typelinkhints
set scalehints
set nocompleteonopen
set smoothscroll
let blacklists = ["https://playbeta.pocketcasts.com/*", "https://*netflix.com/*", "https://*mitarbeiterportal.bayern.de/*", "https://mail.google.com/*", "https://keep.google.com/*", "https://*.todoist.com/app*", "https://calendar.google.com/*", "https://youtube.com/*", "https://play.pocketcasts.com/*"]
@achilleas-k
achilleas-k / cvim.css
Last active June 5, 2018 21:38
cvim.css: CSS file for chromium-vim
#cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results,
.cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left,
.cVim-completion-item .cVim-right {
font-family: monospace;
font-size: 11pt !important;
-webkit-font-smoothing: antialiased !important;
}
#cVim-command-bar {
position: fixed;
@achilleas-k
achilleas-k / keybase.md
Created May 11, 2016 10:39
Keybase proof file

Keybase proof

I hereby claim:

  • I am achilleas-k on github.
  • I am achilleas (https://keybase.io/achilleas) on keybase.
  • I have a public key whose fingerprint is D755 AC11 03A2 5C59 9F2E 2726 1FF7 5E7A 0511 8DF3

To claim this, I am signing this object:

▶ gin

Usage:
        gin login    [<username>]
        gin create   [<name>] [-d <description>]
        gin upload   [<path>]
        gin download [<path>]
        gin repos    [<username>]
        gin info     [<username>]
        gin keys     [-v | --verbose]

▶ git remote -v

origin  git@gin.g-node.org:achilleas/testannex (fetch)
origin  git@gin.g-node.org:achilleas/testannex (push)

▶ git remote rm origin

▶ git remote add origin git@gin.g-node.org:/achilleas/testannex

@achilleas-k
achilleas-k / Dockerfile
Last active October 11, 2016 12:24
NIXPy install test dockerfile
FROM base/archlinux
# image is a bit old so we need to update the keyring first
RUN pacman -Sy --noconfirm archlinux-keyring
# and then pacman itself
RUN pacman -Sy --noconfirm pacman
# db version update - upgrading
RUN pacman-db-upgrade
[options]
# font = DejaVu Sans Mono for Powerline 8
font = Droid Sans Mono for Powerline 8
scrollback_lines = 9999
geometry = 800x510
# cursor
cursor_blink = off
cursor_shape = block