Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
Building castles of abstraction

Mateusz Gałażyn carbolymer

🤔
Building castles of abstraction
View GitHub Profile
@carbolymer
carbolymer / TChainProxy.cxx
Created Jul 30, 2012
Plik: /home/mgalazyn/workspace/tpi/TChainProxy.cxx
View TChainProxy.cxx
#include "TChainProxy.h"
TChainProxy::TChainProxy() : _type(NONE), _isSiniukowLoaded(false)
{
_types[0] = "particles"; // Therminator
_types[1] = "tf"; // Siniukow
_types[2] = "teposevent"; // EPOS
_chain = new TChain();
@carbolymer
carbolymer / Makefile
Created Jul 19, 2012
Makefile with root libraries
View Makefile
DIR_HPP=./inc/
DIR_CPP=./src/
DIR_OBJ=./tmp/
DIR_BIN=./
DIR_TMP=./tmp/
CXXFLAGS=`root-config --cflags` -I$(DIR_HPP) -O3 -g
LFLAGS=`root-config --libs` -lboost_regex -g
OBJS=fit1dcould.o fitshanalyticaaabackshdircovcoulpars.o plotter.o merger.o siniukow2therminator.o
View zadanie10.m
clear;
page_output_immediately(1);
% obliczanie energii lancucha
function E = energy(chain, J, H)
E = -sum(chain)*H;
E += -J*sum(chain.*[chain(end) ; chain(1:end-1)]);
endfunction
% generator LCG
function value = LCGrand()
View zadanie9.m
clear;
function X = generate(a,c,m)
X = zeros(1000,1);
X(1) = 1;
for i = 1:999
X(i+1) = mod(a*X(i)+c,m);
endfor
endfunction
View pythia2.C
int pythia2()
{
int i = 0, index = 0;
TCanvas *canv = 0;
TFile *files[7];
TH1F *multiplicity[4];
TH1F *multiplicity14[4];
@carbolymer
carbolymer / dist.m
Created Jun 9, 2012
Larges Lyapunov Exponent from time series
View dist.m
function D = dist(X)
s = length(X(1,:));
n = length(X(:,1));
D = zeros(s,s);
for i=1:s
for j=1:i
if i == j
D(i,j) = 0;
else
D(i,j) = sqrt(sum(power(X(:,i)-X(:,j),2)));
View 1N3716.asy
Version 4
SymbolType CELL
LINE Normal 0 44 32 44
LINE Normal 0 20 32 20
LINE Normal 32 20 16 44
LINE Normal 0 20 16 44
LINE Normal 16 0 16 20
LINE Normal 16 44 16 64
LINE Normal 0 38 0 44
LINE Normal 32 44 32 38
View zadanie5.m
clear;
global n = 50;
x = sort(rand(1,n).*10);
y = rand(1,n).*20-10;
function f = nwtn(x,known_x,a)
global n;
f = 0;
for i=1:n
elem = a(i);
View Specyfikacja komunikacji
0) struktura komunikacyjna:
typedef struct
{
char command;
char __nothing;
char body[254];
} message;
gdzie command to jednoliterowa komenda, a body to tablica znaków zawierająca parametr przesyłany w wiadomości, jeżeli przychodzi tekst:
r nick
@carbolymer
carbolymer / skynet.sh
Created Mar 8, 2012
skynet - Therminator2 manager
View skynet.sh
#!/bin/bash
#
# -== SKYNET ==-
# The Therminator 2 manager 0.1a
# by Mateusz Galazyn
#
# Therminator2 location
TH2_DIR="/data/home/galazyn/Therminator2"
You can’t perform that action at this time.