Skip to content

Instantly share code, notes, and snippets.

View Toshakins's full-sized avatar
👽
experience tranquility

Anton Ovinnikov Toshakins

👽
experience tranquility
View GitHub Profile
@Toshakins
Toshakins / pike.erl
Last active August 29, 2015 14:04
erloerl
-module (pike).
-export ([match/2, test/0]).
% Erlang version of R. Pike's beautiful regex matcher (modified).
% Modification lies in changing behaviour of `matchStar`, so even
% regexs like /.*b/ can be handled.
% For more information please see
% http://www.cs.princeton.edu/courses/archive/spr09/cos333/beautiful.html
% P.S.: special thanks to @dewitt for his tests.
@Toshakins
Toshakins / dict
Last active August 29, 2015 14:06
pylolo
{"decimalsDict": {"1": null, "2": "twenty", "3": "thirty", "4": "fourty", "5": "fifty", "6": "sixty", "7": "seventy", "8": "eighty", "9": "ninety"}, "teensDict": {"16": "sixteen", "17": "seventeen", "18": "eighteen", "19": "nineteen", "10": "ten", "11": "eleven", "12": "twelve", "13": "thirteen", "14": "fourteen", "15": "fifteen"}, "unitsDict": {"1": "one", "2": "two", "3": "three", "4": "four", "5": "five", "6": "six", "7": "seven", "8": "eight", "9": "nine"}}
@Toshakins
Toshakins / music.js
Last active August 29, 2015 14:10
substack
return function (t) {
return (70*base() + sin(0.5 * t % 0.2)*60) / 40 + sin(300) * 10
function tan(x) {
return Math.tan(Math.PI * t * x);
}
function sin(x) {
return Math.sin(Math.PI * t * x);
CXX/LD -o .build_release/test/test_all.testbin src/caffe/test/test_caffe_main.cpp
.build_release/tools/caffe
caffe: command line brew
usage: caffe <command> <args>
commands:
train train or finetune a model
test score a model
device_query show GPU diagnostic information
time benchmark model execution time
@Toshakins
Toshakins / wat.cs
Created September 2, 2012 20:13
BST
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace gurren_laggan
{
class Program
{
public delegate void ChangedEventHandler(object sender, EventArgs e);
@Toshakins
Toshakins / parallel1.cpp
Created November 12, 2012 00:07
Parallel programming course ass.1 sem.2
#include <iostream>
#include <vector>
#include "mpi.h"
int id;
const int n = 3, MSG = 99;
int a[n][n] = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}},
b[n][n] = {{1, 2, 3},
javascript:
(function () {
var v = "1.8.0";
if (window.jQuery === undefined/* || window.jQuery.fn.jquery < v*/) {
var done = false;
script = document.createElement("script");
script.src="http://code.jquery.com/jquery-1.9.1.min.js";
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == "loaded"
@Toshakins
Toshakins / index.html
Created March 14, 2013 09:57
shri css
<!doctype html>
<html>
<head>
<title>Calendar</title>
<link rel="stylesheet" href="styles.css">
<meta charset="UTF-8">
</head>
<body>
<section>
<div>пн</div>
@Toshakins
Toshakins / main.rb
Created December 13, 2013 00:33
ruby acrobatics
#recursive lexicographic permutations
def perm(str)
res = []
if str.length <= 1
return res << str
else
t = []
str.each_char do |chr|
t += perm(str.delete(chr))
@Toshakins
Toshakins / README.md
Created November 14, 2016 14:55
extremewindsorderok

README is empty