Skip to content

Instantly share code, notes, and snippets.

View peko's full-sized avatar

Vladimir Seregin peko

  • https://peko.github.io/about
  • Frankfurt
View GitHub Profile
@peko
peko / stupid.json
Last active September 5, 2016 15:57
два слоя по 10 нейронов
{"layers":[{"out_depth":59,"out_sx":1,"out_sy":1,"layer_type":"input"},{"out_depth":10,"out_sx":1,"out_sy":1,"layer_type":"fc","num_inputs":59,"l1_decay_mul":0,"l2_decay_mul":1,"filters":[{"sx":1,"sy":1,"depth":59,"w":{"0":0.09185641674540913,"1":-0.23482697419212847,"2":0.03610922694885955,"3":-0.26089903272219805,"4":-0.1931942419841784,"5":-0.05849364037585666,"6":-0.1440385490458202,"7":-0.014679453900823378,"8":0.06884464567158986,"9":-0.0627546155847871,"10":0.144897715278581,"11":0.046716292175682,"12":-0.13465435759025793,"13":0.022758477666650172,"14":0.06379224081052678,"15":-0.06495774375788134,"16":0.11988495814337947,"17":-0.07151786118954499,"18":-0.01626746018599668,"19":-0.06593568495121686,"20":0.12065461991703072,"21":0.1328802602541985,"22":-0.2057277386399549,"23":0.05200859173284947,"24":0.17106603589710476,"25":0.021563250649868037,"26":0.0544781910530498,"27":-0.18025379515587403,"28":0.04179389323721859,"29":-0.0298147856376088,"30":0.1780439233486908,"31":0.17371355786332354,"32":-0.1
@peko
peko / minimal-nn.py
Created September 4, 2016 17:10
Minimal neural network
import numpy as np
# sigmoid
def nonlin(x, deriv=False):
if deriv is True:
return x*(1-x)
return 1/(1+np.exp(-x))
# train data
X = np.array([
@peko
peko / emoji_sentiments.coffee
Last active September 1, 2016 23:00
Emoji sentiments
###
Format:
codePoint:[negative, neutral, positive, sentiment]
Details: http://kt.ijs.si/data/Emoji_sentiment_ranking/
Correct access:
> "emoji".getCodePointAt(0)
И я не умерла нет?
Когда ты здесь сам, я облетают...
Любимый камыши -
и эти я мне плыть,
Но дома в краю Канэми мог,
Точно цветущие клочок.
У заглохшего горы
@peko
peko / change.js
Last active July 13, 2016 10:58
change.js
function onEdit(e){
if(e) {
var range = e.range;
if(range.getA1Notation() == "A1") {
for(var i=2; i<=10; i++) {
SpreadsheetApp.getActiveSheet().getRange('A'+i).setValue(e.value);
Utilities.sleep(5000);
}
}
}
@peko
peko / triangle.md
Last active June 30, 2016 13:58
triangle encoding

triangle write

edges

9 bit

512 variants

@peko
peko / copy_files.sh
Last active January 31, 2024 15:41
Fastest rsync I ever know
#!/bin/bash
tar cf - * | mbuffer -m 1024M | ssh -i ~/.ssh/<key.pem> <destination_ip> '(cd /home/ubuntu/<destination_folder>; tar xf -)'
@peko
peko / start-tiddly.sh
Created May 29, 2016 23:48
Tiddly wki launch
#!/bin/bash
tiddlywiki wiki --init server
cd wiki
pm2 start --name tiddly-wiki /usr/local/lib/node_modules/tiddlywiki/tiddlywiki.js -- --server 8080 $:/core/save/all text/plain text/html user pass 0.0.0.0
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="apng-canvas.min.js"></script>
</head>
<body>
<canvas id="cvs" with="512px" height="512px">
<script type="text/javascript">
@peko
peko / irc-telegram.coffee
Last active April 20, 2016 16:17
Irc to telegram and back
irc = require 'irc'
TelegramBot = require 'node-telegram-bot-api'
token = '' # INSERT YOUR BOT TOKEN HERE
tele = new TelegramBot token, polling: true
channel = #INSERT YOUR IRC CHANNEL HERE "#mytestchannel"
chat_id = #INSERT YOUR TELEGRAM GROUP ID HERE -123456789