Skip to content

Instantly share code, notes, and snippets.

f(x) = a*x + b
set terminal png size 1024,768
set xlabel "I [mA]"
set ylabel "U [V]"
set title "U=f(I)"
fit f(x) "rc.dat" via a,b
set output "rc.png"
plot f(x) notitle, "rc.dat" notitle with xyerrorbars ls 3
Laboratorium 2 - 9.11.2010 - korelacja
Korelacja - podobieństwo dwóch zjawisk (np. sygnalow, jak jeden jest podobny do drugiego)
Korelacja wzajemna (dla 2), autokorelacja (dla 1)
R_{xx}(\tau) = E[x(t)x(t+\tau)]
R_{x,y}(\tau) = E[x(t)y(t+\tau)]
@teamon
teamon / README
Created November 23, 2010 12:27
Teoria sygnalow, laboratorium nr 3
Laboratorum nr 3 - 23.11.2010 - Probkowanie i kwantowanie
1. Probkowanie
sinus
a) fpr > 2*f
b) fpr == 2*f
c) fpr < f
Jak wyglada sygnal w dziedzinie czasu i czestotliwosci?
@teamon
teamon / data.txt
Created November 28, 2010 13:57
LUC
# Tabela przejsc miedzy stanami
# q(t) z(t) q(t+1)
0 0 3
0 1 1
0 2 2
1 0 1
1 1 1
1 2 1
2 0 5
2 1 1
@teamon
teamon / lab4
Created December 7, 2010 12:37
Laboratorium nr 4 - 7.12.2010
Dyskretna transformata Fouriera
1. sinus
wyznaczyc widmo dla sygnalu ktory
a) w n probkach bedzie mial calkowita liczbe okresow
b) w n probkach bedzie mial niecalkowita liczbe okresow
fft/g + semilogy -> widmo
2. dyskretna transformata Fouriera (probkowanie widma ciaglego)
a) f_sin \in m*fpr/N, m \in {0,1,..,N-1}
@threetee
threetee / unicorn_wrapper.sh
Created January 20, 2012 19:52
Wrapper to allow runit to send signals to the unicorn master even when its PID changes
#!/bin/sh
set -e
APP=$1
APP_PATH="/srv/${APP}/current"
RAILS_ENV=$2
UNICORN_CONFIG="/etc/unicorn/${APP}.rb"
UNICORN_PID_FILE="/tmp/unicorn.${APP}.pid"
@jboner
jboner / latency.txt
Last active May 5, 2024 03:12
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@return1
return1 / trim_enabler.txt
Last active August 25, 2023 02:59
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@mlen
mlen / function.rb
Created December 15, 2012 08:55 — forked from rf-/function.rb
def self.method_missing(name, *args)
name
end
def function(*param_names, &block)
klass = Class.new { attr_accessor :this, *param_names }
this = TOPLEVEL_BINDING.eval('self')
proc do |*params|
context = klass.new
@twneale
twneale / gist:5245670
Last active April 19, 2023 11:08
.pythonrc file that adds command history and tab completion to my python shell.
'''
Save this file and add the following line to your ~/.bashrc"
export PYTHONSTARTUP="$HOME/.pythonrc"
'''
import os
import readline
import rlcompleter
import atexit