Skip to content

Instantly share code, notes, and snippets.

View AndreyAkinshin's full-sized avatar

Andrey Akinshin AndreyAkinshin

View GitHub Profile
@AndreyAkinshin
AndreyAkinshin / model.R
Last active July 3, 2017 22:22
Simulation (2017-07-04)
################################################################################
# A simulation of the following system:
#
# dm1/dt = -k1 * m1 + f1(p9) dp1/dt = mu1 * m1 - nu1 * p1
# dm2/dt = -k2 * m2 + f2(p1) dp2/dt = mu2 * m2 - nu2 * p2
# dm3/dt = -k3 * m3 + f3(p2) dp3/dt = mu3 * m3 - nu3 * p3
# dm4/dt = -k1 * m1 + f1(p3) dp4/dt = mu1 * m1 - nu1 * p4
# dm5/dt = -k2 * m2 + f2(p4) dp5/dt = mu2 * m2 - nu2 * p5
# dm6/dt = -k3 * m3 + f3(p5) dp6/dt = mu3 * m3 - nu3 * p6
# dm7/dt = -k1 * m1 + f1(p6) dp7/dt = mu1 * m1 - nu1 * p7
@AndreyAkinshin
AndreyAkinshin / model.R
Last active June 15, 2017 10:37
Simulation (2017-06-15)
################################################################################
# A simulation of the following system:
#
# dm1/dt = -k1 * m1 + f1(p5) dp1/dt = mu1 * m1 - nu1 * p1
# dm2/dt = -k2 * m2 + f2(p1) dp2/dt = mu2 * m2 - nu2 * p2
# dm3/dt = -k3 * m3 + f3(p2) dp3/dt = mu3 * m3 - nu3 * p3
# dm4/dt = -k4 * m4 + f4(p3) dp4/dt = mu4 * m4 - nu4 * p4
# dm5/dt = -k5 * m5 + f5(p4) dp5/dt = mu5 * m5 - nu5 * p5
#
# Parameters:
@AndreyAkinshin
AndreyAkinshin / Simulation5D.R
Last active January 9, 2017 10:23
Simulation5D.R
library(deSolve)
library(dplyr)
library(ggplot2)
# Model
f <- function(x) 258 / (1 + x ^ 7)
model <- function(t, state, parameters) {
with(as.list(c(state)), {
dx1 <- f(x5) - x1
dx2 <- f(x1) - x2
@AndreyAkinshin
AndreyAkinshin / model.R
Last active October 18, 2016 09:07
Simulation (18-10-16)
################################################################################
# A simulation of the following system:
#
# dm1/dt = -k1 * m1 + f1(p3) dp1/dt = mu1 * (m1 - p1)
# dm2/dt = -k2 * m2 + f2(p1) dp2/dt = mu2 * (m2 - p2)
# dm3/dt = -k3 * m3 + f3(p2) dp3/dt = mu3 * (m3 - p3)
#
# Parameters:
# k1 = 1.5 k2 = 1.7 k3 = 2.0
# mu1 = 3.0 mu2 = 3.5 mu3 = 4.0
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
namespace NuGetUltimateBuilder
{
// Requires nuget.exe >= v3.5.0-rc1
internal class Program
<Colors>
<Foreground>12303291</Foreground>
<Background>4276028</Background>
<Background2>4276028</Background2>
<Mark>33023</Mark>
<Cursor>11497035</Cursor>
<CursorText>-2147483634</CursorText>
<UseInvertedSelection>False</UseInvertedSelection>
<InactivePanelBrightness>100</InactivePanelBrightness>
<UseFrameCursor>False</UseFrameCursor>
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance force
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetCapsLockState, AlwaysOff
; Based on https://gist.github.com/ronjouch/2428558
; Variables definition
################################################################################
# A simulation of the Elowitz's repressilator.
#
# References
# * A Synthetic Oscillatory Network of Transcriptional Regulators;
# Michael Elowitz and Stanislas Leibler; Nature. 2000 Jan 20;403(6767):335-8.
#
# Author: Andrey Akinshin
################################################################################
@AndreyAkinshin
AndreyAkinshin / JitModules.cs
Created February 8, 2016 09:56
JitModules.cs
using System;
using System.Diagnostics;
using System.Linq;
public static class JitModules
{
public static void Main()
{
Console.WriteLine("OS: " + Environment.OSVersion.VersionString);
Console.WriteLine("CLR: " + Environment.Version);
[alias]
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
lg = log --graph --date-order --pretty=format:'%C(bold blue)%h%C(reset) %C(bold green)[%an]%C(reset) %Cgreen%d%Creset %s, %C(yellow)%ad%C(reset)' --date=iso
lgl = log --graph --date-order --pretty=format:'%C(bold blue)%h%C(reset) %C(bold green)[%an]%C(reset) %Cgreen%d%Creset %s, %C(yellow)%ad%C(reset)' --date=iso -10
a = add
ap = add -p
c = commit --verbose
ca = commit -a --verbose
cm = commit -m