Skip to content

Instantly share code, notes, and snippets.

import nekoton as _nt
_giver_v2_abi = _nt.ContractAbi("""{"ABI version": 2,
"header": ["time", "expire"],
"functions": [
{
"name": "upgrade",
"inputs": [
{"name":"newcode","type":"cell"}
],
import json
from web3.contract import ConciseContract
from web3 import Web3, HTTPProvider
from zero_ex.order_utils import asset_data_utils, sign_hash
from zero_ex.order_utils import generate_order_hash_hex
import time
from random import randint
from eth_abi import encode_single
from binascii import unhexlify
@30mb1
30mb1 / ft.tsv
Last active October 23, 2018 13:01
fast text tensorflow embedding
We can't make this file beautiful and searchable because it's too large.
0.92936915 1.0414056 -0.23024276 0.16640696 0.70366764 0.46142748 1.3483905 -0.5745528 -1.3474073 -0.2229389 -1.491083 0.7810661 0.847414 0.4691152 -0.1877023 0.0314565 0.4278043 0.4843222 0.5250575 -0.29652098 -0.8108202 -0.04785503 -1.0256007 0.71417344 -0.2260331 -0.49301073 0.09537077 -0.71241355 0.19097689 0.9851781 -0.062173918 0.56006753 0.36138448 -0.5214201 -0.92435694 -1.0557709 0.793002 0.67078 1.1642567 0.9228797 0.17476746 0.6700892 0.3046447 0.03745122 -0.39548612 0.47396308 -0.029504305 -0.8702775 0.44984636 0.08213764 -0.36534002 -0.63393 0.25184143 0.22843856 -0.47513178 0.8074663 -0.20715603 -0.5054221 -0.5226831 0.55827314 -1.3008994 -1.0156045 0.16311888 -0.33729687 -1.3318952 0.8694466 0.95955557 0.7572387 -0.055340547 0.21298537 -0.7196858 0.19075024 0.31450254 -0.69388205 -0.0622596 -0.04050992 -0.38063532 1.1029934 -0.14894727 -0.13100845 0.03475275 -0.17974734 0.32508084 -0.5958979 -0.7807621 -0.68450296 -0.052195918 -0.9992915 1.3224492 0.72034276 -0.72756284 -0.042621236 -0.15555036
@30mb1
30mb1 / projector_config.json
Last active October 23, 2018 12:30
word2vec embedding tensorflow
{
"embeddings": [
{
"tensorName": "My tensor",
"tensorShape": [
1000,
50
],
"tensorPath": "https://gist.githubusercontent.com/30mb1/320500f5753f2bc41110dac1416a78d6/raw/d3ff3609a02f3bd70a6e8f9c15ce2566ea977c61/w2v.tsv",
"metadataPath": "https://gist.githubusercontent.com/30mb1/320500f5753f2bc41110dac1416a78d6/raw/d3ff3609a02f3bd70a6e8f9c15ce2566ea977c61/w2v_meta.tsv"

Keybase proof

I hereby claim:

  • I am 30mb1 on github.
  • I am magomed (https://keybase.io/magomed) on keybase.
  • I have a public key whose fingerprint is A929 A7CF 76AB 2978 A2D0 690B 607B 3DDC 0FDD 56D6

To claim this, I am signing this object:

@30mb1
30mb1 / main.py
Last active February 19, 2018 15:05
Simple program for connection to litecoin nodes.
import time
import socket
import struct
import random
import hashlib
import dns.resolver
import ipaddress
from messages import *
# list of hardcoded in chainparams.cpp dns seeders
@30mb1
30mb1 / A3
Created December 14, 2015 14:44
#include <iostream>
#include <map>
#include <utility>
#include <array>
#include <math.h>
template <typename T, int N>
class MultivariatePolynomial {
private:
std::map<std::array<int, N>, T> Monom;
template <typename SourceIterator, typename DestinationIterator, typename Predicate>
DestinationIterator copy_backward_if(SourceIterator source_first, SourceIterator source_last, DestinationIterator destination_last, Predicate condition) {
while (source_last != source_first) {
if (condition(*source_first)) {
*(--destination_last) = *source_first;
}
++source_first;
}
return destination_last;
}
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
void Rcage(int (&cage)[9][9], const int n) { //функция поворота решетки(матрицы) по часовой
int buffcage[9][9];
for (auto i = 1; i <= n; i++) {
for (auto j = 1; j <= n; j++) {
buffcage[i][j] = cage[n + 1 - j][i];
}
#include <algorithm>
#include <iostream>
#include <vector>
void rotate(std::vector<int> vect, int move, int n) {
int move1;
move = move % n;
std::vector<int> sortVec(n);
for (int ii = 0; ii < n; ii++) {
if (ii + move >= n) {