This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var _utils = { // String.prototype.utils | |
append : function(tail){ | |
return this + tail; | |
} | |
}, | |
utils = {}, // фронтэнд. на этот объект будут навешены геттеры. | |
// на _utils геттеры вешать нельзя т.к. тогда мы не сможем (вроде как) добраться до методов | |
self = null, // тут будет контекст | |
generateGetter = function(fnc){ // это геттер |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MEMOIZATOR | |
#define MEMOIZATOR | |
#include <tuple> | |
#include <map> | |
template<class R, class... Args> | |
class Memoizator { | |
typedef std::tuple<Args...> tuple; | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
class Token { | |
typedef std::vector<std::string> TokenList; | |
TokenList _tokens; | |
public: | |
Token(std::string t) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cv.h> | |
#include <highgui.h> | |
#include <cmath> | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
#include <vector> | |
#include <algorithm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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())] | |
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[["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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
OlderNewer