Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom Brewe nylki

View GitHub Profile
@nylki
nylki / interval.js
Created Jun 15, 2020 — forked from ncou/interval.js
setTimeout and setInterval with pause and resume
View interval.js
// http://stackoverflow.com/questions/7279567/how-do-i-pause-a-window-setinterval-in-javascript
function RecurringTimer(callback, delay) {
var timerId, start, remaining = delay;
this.pause = function() {
window.clearTimeout(timerId);
remaining -= new Date() - start;
};
View 3d points
[[-7,13,-40],[-7,13,-40],[-6.78106524453624,12.938225200370885,-39.69901475220916],[-6.562463906329577,12.876344866163128,-39.39802950441832],[-6.344196554061829,12.814359158355714,-39.09704425662748],[-6.126263755545963,12.752268238201747,-38.796059008836636],[-5.908330957030098,12.69017731804778,-38.495073761045795],[-5.690733279208756,12.627981347074074,-38.194088513254954],[-5.473135601387415,12.565785376100369,-37.89310326546411],[-5.255537923566073,12.503589405126663,-37.59211801767327],[-5.037940245744731,12.441393434152957,-37.29113276988243],[-4.820342567923389,12.379197463179251,-36.99014752209159],[-4.602744890102048,12.317001492205545,-36.68916227430075],[-4.385147212280706,12.25480552123184,-36.38817702650991],[-4.167549534459364,12.192609550258133,-36.08719177871907],[-3.9499518566380223,12.130413579284427,-35.786206530928226],[-3.7323541788166805,12.068217608310722,-35.485221283137385],[-3.5147565009953388,12.006021637337016,-35.184236035346544],[-3.297158823173997,11.94382566636331,-34.8832507
View ffi.lua
local torch = require 'torch'
local ffi = require 'ffi'
local bit = require 'bit'
local stringx = require 'pl.stringx'
local path = require 'pl.path'
local function loadHDF5Library(libraryPaths)
local libraries = stringx.split(libraryPaths, ";")
local hdf5LibPath
for _, libPath in ipairs(libraries) do
@nylki
nylki / char-rnn recipes.md
Last active May 16, 2020
char-rnn cooking recipes
View char-rnn recipes.md

do androids dream of cooking?

The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.

The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training. The ZIP is also archived @ archive.org in case the original links becomes invalid in the future.

@nylki
nylki / redshift.conf
Created Oct 18, 2014
My redshift configuration for location Berlin
View redshift.conf
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=6300
temp-night=5400
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature
transition=1
View bibliography.bib
@article{powsner_graphical_1994,
title = {Graphical Summary of Patient Status},
volume = {344},
url = {http://www.sciencedirect.com/science/article/pii/S0140673694914060},
timestamp = {2015-09-09T18:25:01Z},
number = {8919},
journaltitle = {The Lancet},
author = {Powsner, Seth M. and Tufte, Edward R.},
urldate = {2015-09-09},
@nylki
nylki / ba.bib
Created Aug 6, 2014
BA Biblatex file
View ba.bib
% Better BibLaTeX: generated
@book{Kemp2006,
isbn = {0199295727},
location = {{Oxford ; New York}},
pagetotal = {352},
shorttitle = {{Seen/unseen}},
title = {{Seen/unseen: art, science, and intuition from Leonardo to the Hubble telescope}},
publisher = {{Oxford University Press}},
author = {Kemp, Martin},
@nylki
nylki / Artefact.cpp
Created Jul 12, 2014
vector getting empty in draw method problem
View Artefact.cpp
#include "Artefact.h"
Artefact::Artefact(string cascadepath_, string name_, string description_, ofImage mockup_){
cascadepath = cascadepath_;
name = name_;
description = description_;
mockup = mockup_;
}
Artefact::Artefact(){
View nspr brew formula
require 'formula'
class Nspr < Formula
homepage 'http://www.mozilla.org/projects/nspr/'
url 'https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.10/src/nspr-4.10.tar.gz'
sha256 '0cfbe561676b92e5af3ddc7ac77452014e3da8885da66baec811e7354138cc16'
def install
ENV.deparallelize
cd "nspr" do
@nylki
nylki / schattenschachtelung.css
Created Apr 13, 2013
Für eine Leuchtschrift. Sparsam verwenden.
View schattenschachtelung.css
div#glowtext{
padding-right: 25px;
opacity: 1;
color: rgba(10%,0%,0%,1);
font-weight: bold;
font-size: 45px;
font-family: sans-serif;
You can’t perform that action at this time.