Skip to content

Instantly share code, notes, and snippets.

@KKostya
KKostya / index.html
Created September 28, 2015 19:22
Running chain
<style>
.line { fill: none; stroke: black; stroke-width: 0.5px; }
.force { fill: none; stroke: red; stroke-width: 0.5px; }
.circle { fill: none; stroke: black; stroke-width: 0.5px; }
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var N = 50, v0 = 1, k = 100, h = 0.01;
var beads = d3.range(N).map(function(i){
BASEDIR=$PWD
sudo apt-get update
sudo apt-get install build-essential g++ git libssl-dev libbz2-dev libncurses5-dev libyaml-dev make
sudo apt-get install libpng++-dev libfreetype6-dev pkg-config
mkdir -p install
mkdir -p sources
export INSTALLDIR=$(readlink -f install)
export SOURCESDIR=$(readlink -f sources)
@KKostya
KKostya / List.txt
Created December 1, 2015 19:54
REST API colleciton
http://www.bjs.gov/developer/ncvs/developers.cfm
@KKostya
KKostya / NR.ipynb
Created April 17, 2016 16:28
Newton-Raphson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KKostya
KKostya / MyDsl.xtext
Created November 24, 2016 18:45
Simple import instruction in XText
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals
generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"
Model:
('library' name=ID )?
(imports += Import )*
(classes += ClassDef )*;
Import:
'import' model=[Model];
@KKostya
KKostya / TxMain.java
Created November 30, 2016 17:27
Main function for Bitcoins coursera course
import java.security.InvalidKeyException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.MessageDigest;
import java.security.Signature;
import java.security.SignatureException;
public class TxMain {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KKostya
KKostya / TF.md
Last active June 6, 2017 13:58
Tensorflow on LXPLUS

Using the LCG installed stuff

source /cvmfs/sft.cern.ch/lcg/views/LCG_88/x86_64-slc6-gcc49-opt/setup.sh

I intall tensorflow into the local HOME folder.

pip install --user tensorflow

Unfortunately it doesn't run due to a GLIBC conflict

@KKostya
KKostya / CNAF2CERN.md
Last active November 28, 2017 15:52

Working folders.

You most probably is going to work on an LXPLUS cluster -- each time you log onto lxplus it usually gives you another machine to use. For example, here, I got onto lxplus069 at my first login and then lxplus026 after I relogged:

[user@home ~]$ ssh [email protected]
Welcome to lxplus069.cern.ch, SLC, 6.9
[user@lxplus069 ~]$ exit
Connection to lxplus.cern.ch closed.

[user@home ~]$ ssh [email protected]

Welcome to lxplus026.cern.ch, SLC, 6.9