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 argparse | |
import requests | |
def get_allocation(address, blockchain): | |
id = { | |
"sol": 1, | |
"eth": 2, | |
"sui": 21, | |
"aptos": 22, | |
"inj": 19, |
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
from flask import Flask, request | |
from flask_restful import Resource, Api | |
import requests | |
app = Flask(__name__) | |
api = Api(app) | |
default_rpc = "https://rpc.builder0x69.io/" | |
rpcs = [ |
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 pandas as pd | |
import time | |
import requests | |
import time | |
import hmac | |
from requests import Request | |
import sys | |
import json | |
import os |
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
from ctc import evm | |
from scipy import sparse | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
transfers = await evm.async_get_erc20_transfers( | |
token='0x956f47f50a910163d8bf957cf5846d573e7f87ca', | |
event_name='Transfer', | |
) |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"bytes" | |
"math/big" | |
"encoding/json" | |
"io/ioutil" | |
"net/http" |
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
def get_jacobian(net, x, noutputs): | |
x = x.squeeze() | |
n = x.size()[0] | |
x = x.repeat(noutputs, 1) | |
x.requires_grad_(True) | |
y = net(x) | |
y.backward(torch.eye(noutputs)) | |
return x.grad.data |
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
""" | |
Author: Shane Barratt | |
Email: [email protected] | |
K-means script that works with NaN entries. | |
""" | |
import numpy as np | |
import IPython as ipy | |
import matplotlib.pyplot as plt |
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
""" | |
This script provides coordinate transformations from Geodetic -> ECEF, ECEF -> ENU | |
and Geodetic -> ENU (the composition of the two previous functions). Running the script | |
by itself runs tests. | |
based on https://gist.github.com/govert/1b373696c9a27ff4c72a. | |
""" | |
import math | |
a = 6378137 | |
b = 6356752.3142 |
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
"""CNN from https://www.microsoft.com/en-us/research/wp-content/uploads/2003/08/icdar03.pdf""" | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets('MNIST_data', one_hot=True) | |
import tensorflow as tf | |
def weight_variable(shape): | |
initial = tf.random_normal(shape, stddev=0.05) | |
return tf.Variable(initial) |
NewerOlder