Skip to content

Instantly share code, notes, and snippets.

@vogdb
vogdb / conf.json
Created August 14, 2014 08:39
log4js set level test
{
"appenders": [
{
"type": "file",
"filename": "info.log",
"maxLogSize": 20480,
"backups": 10,
"level": "INFO"
},
{
import scipy as sp
import pylab as plt
from scipy.integrate import odeint
from scipy import stats
import scipy.linalg as lin
## Full Hodgkin-Huxley Model (copied from Computational Lab 2)
# Constants
C_m = 1.0 # membrane capacitance, in uF/cm^2
@vogdb
vogdb / count_allele_frq.py
Created September 4, 2018 18:22
Allele frequencies count
# Usage example:
# > python count_allele_frq.py -f out.frq
import csv
import re
import argparse
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import ticker
@vogdb
vogdb / readme.md
Last active January 4, 2019 14:57
React in short

React Element

  • a plain js object.
  • Most of the time they are created as JSX.
  • React elements are immutable. Once you create an element, you can’t change its children or attributes.
  • An element is like a single frame in a movie: it represents the UI at a certain point in time.
const element = <h1>Hello, world!</h1>;
// pass an attribute
const element = ;
@vogdb
vogdb / README.md
Last active September 19, 2019 20:07 — forked from physacco/README.md
Python 3 extension example

Python 3 extension example

Build

python3 setup.py build

Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so

Run

@vogdb
vogdb / object_copy.js
Created February 3, 2019 15:52
Задача по копированию объектов в js
// пример глубокого копирования в Javascript. Берет на вход объект obj и возвращает его глубокую копию.
function deepCopy(obj) {
return JSON.parse(JSON.stringify(obj));
}
// Каковы значения `o_direct`, `o_shallow`, `o_deep` в каждом нижеприведенном блоке кода?
// Каждый блок кода отделен друг от друга длинным комментарием `/////////////////`.
// Считается, что каждый блок исполняется независимо друг от друга.
function a_b_numbers() {
@vogdb
vogdb / Android Privacy Policy Template
Last active March 12, 2019 13:48 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>Aleksei Sanin built the NGS Run Calculator (com.asanin.ngs.run.calculator) app as a free app. This SERVICE is provided by Aleksei Sanin at no cost and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding my policies with the collection, use, and
disclosure of Personal Information if anyone decided to use my Service.</p>
<p>If you choose to use my Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that I collect are used for providing and
improving the Service. I will not use or share your information with anyone except as described
#!/bin/sh
echo "IMPORTANT! INSTALL_DIR arg must be an absolute path!"
set -e
SRC_DIR=$1
INSTALL_DIR=$2
if [ ! -e ${INSTALL_DIR}/.install_finished ]
then
echo 'Neuron was not fully installed in previous build, installing ...'
@vogdb
vogdb / 472363762biophys.hoc
Last active August 18, 2019 13:59
biophycs of Allen Institute DB model 472363762
// is the name L5PCbiophys fine?
// How should we reference the cell? $o1?
// Should we use $o1.distribute_channels?
begintemplate L5PCbiophys
public biophys
proc biophys() {
forsec $o1.all {
insert pas
@vogdb
vogdb / main.dart
Last active August 19, 2022 18:45
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(