I hereby claim:
- I am gustafsson on github.
- I am jeklof (https://keybase.io/jeklof) on keybase.
- I have a public key ASDWvgrbt_sa06wveS8xL9ugzfGB3Oo9oK_BalsegUh3rwo
To claim this, I am signing this object:
mypi |
%% Number of numeric palindromes in different bases | |
N = zeros(4096,36); | |
for i=2:size(N,1) | |
N(i,:) = N(i-1,:); | |
for b=2:size(N,2) | |
s = dec2base(i,b); | |
if all(s == fliplr(s)) | |
N(i,b) = N(i,b) + 1; | |
end | |
end |
#!/usr/bin/env sh | |
# ./mydeamon.sh TIMEOUT CHILDAPP | |
# | |
# Creates a watchdog file WATCHDOG and executes CHILDAPP WATCHDOG. | |
# If CHILDAPP exits it is restarted. | |
# If CHILDAPP does not touch WATCHDOG within TIMEOUT seconds it is killed and restarted. | |
# This script stops CHILDAPP when it is aborted (Ctrl-C or SIGTERM). | |
set -e # abort this script if anything fails | |
SECONDS_UNTIL_KILL=$1 |
multiple files! |
Här är ett exempel på hur man kan hantera textdokument med git i en webbläsare. | |
Man behöver inget konto för att skapa en gist eller redigera den. |
int MicrophoneRecorder:: | |
writeBuffer(const void *inputBuffer, | |
void */*outputBuffer*/, | |
unsigned long framesPerBuffer, | |
const PaStreamCallbackTimeInfo */*timeInfo*/, | |
PaStreamCallbackFlags /*statusFlags*/) | |
{ | |
BOOST_ASSERT( inputBuffer ); | |
const float **in = (const float **)inputBuffer; | |
const float *buffer = in[0]; |
function freqtime(f) | |
% The fourier transform below assumes that y is a periodic signal which it is if 'f' is an integer (i.e we don't do any windowing) | |
if 0==nargin | |
f = 2; | |
end | |
A = 1; |
obj | |
Temp | |
*.suo | |
*.user | |
*.pidb | |
*.userprefs | |
*.sln | |
*.csproj | |
Library/cache |
# Translation of @karpathy's pg-pong.py from Python to Julia | |
# https://gist.github.com/karpathy/a4166c7fe253700972fcbc77e4ea32c5 | |
# Note that it takes several days to learn a policy that wins most games. | |
# Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym through Gym.jl and PyCall.jl. | |
using Gym | |
using Serialization | |
using StatsBase: mean, std | |
# hyperparameters |
I hereby claim:
To claim this, I am signing this object: