Skip to content

Instantly share code, notes, and snippets.

👨‍🔬
Everybody stand back! I'm doing science

Artëm Sobolev artsobolev

👨‍🔬
Everybody stand back! I'm doing science
Block or report user

Report or block artsobolev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View string_proto.js
(function(){
var _utils = { // String.prototype.utils
append : function(tail){
return this + tail;
}
},
utils = {}, // фронтэнд. на этот объект будут навешены геттеры.
// на _utils геттеры вешать нельзя т.к. тогда мы не сможем (вроде как) добраться до методов
self = null, // тут будет контекст
generateGetter = function(fnc){ // это геттер
View Memoizator.hpp
#ifndef MEMOIZATOR
#define MEMOIZATOR
#include <tuple>
#include <map>
template<class R, class... Args>
class Memoizator {
typedef std::tuple<Args...> tuple;
public:
View Memoizator.hpp
#ifndef MEMOIZATOR
#define MEMOIZATOR
#include <tuple>
#include <map>
template<class R, class... Args>
class Memoizator {
typedef std::tuple<Args...> tuple;
typedef std::map<tuple, R> map;
@artsobolev
artsobolev / main.cpp
Created Mar 29, 2013
Crazy expressions parser
View main.cpp
#include <iostream>
#include <string>
#include <vector>
class Token {
typedef std::vector<std::string> TokenList;
TokenList _tokens;
public:
Token(std::string t) {
@artsobolev
artsobolev / nsProto.js
Last active Dec 17, 2015
Namespaced Methods for [built-in types] in JavaScript
View nsProto.js
function extendPrototype(Class, name, obj) {
var nsProto = {},
self = null;
for (var prop in obj) {
if(!obj.hasOwnProperty(prop)) continue;
Object.defineProperty(nsProto, prop, {
enumerable: true,
configurable: false,
@artsobolev
artsobolev / main.cpp
Last active Dec 20, 2015
Circle map bifurcation generator
View main.cpp
#include <cv.h>
#include <highgui.h>
#include <cmath>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
View Stego.js
var revealJS = function(s) {
var hexAlphabet = Array.apply(null, {
length: 10
}).map(Number.call, Number).concat('abcdef'.split(''));
var codes = [8289, 8204, 8205, 8206, 8207, 8234, 8235, 8236, 8237, 8238, 8298, 8299, 8300, 8301, 8302, 8303];
return s.match(/(.{4})/g).map(function(b) {
return b.split('').map(function(i) {
return hexAlphabet[codes.indexOf(i.charCodeAt())]
})
@artsobolev
artsobolev / VAE MNIST.ipynb
Created Nov 25, 2015
Variational Autoencoder on MNIST
View VAE MNIST.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View nips.json
[["Stanford University","Stanford University","","Stanford University"],["Xi'an Jiaotong University","Xi'an Jiaotong University","",""],["Data61 and ANU","","Data61"],["UIUC","UIUC","UIUC"],["Data61 and ANU"],["Weizmann Institute of Science"],["ETH Zurich","ETH Zurich","ETH Zurich",""],["Google","","University of Washington"],[""],["","MIT","","",""],["","MIT","MIT",""],["",""],["University of South Carolina","University of South Carolina","University of South Carolina","University of South Carolina"],["HKUST","",""],["National Univ of Singapore","Sun Yat-sen University","National University of Singapo","NUS","National Univ of Singapore",""],["Tsinghua University","Tsinghua University","Tsinghua University",""],[""],["UC Berkeley","UC Berkeley","UC Berkeley","UC Berkeley"],["Columbia University","","",""],["UCLA","Adobe Research","","Adobe Research","",""],["Gatsby Unit","","Gatsby Unit",""],["","LAAS-CNRS"],["","Technion"],["Tel-Aviv University",""],["University of Michigan","Max Planck Institute for Informa
View vk_query.py
import time
import requests
import json
last_call = 0
def vk_query(method, **kwargs):
global last_call
ct = time.time()
if ct - last_call < 0.34:
time.sleep(0.34 - ct + last_call)
You can’t perform that action at this time.