Skip to content

Instantly share code, notes, and snippets.

@elyase
elyase / Cargo.toml
Created May 14, 2024 11:19 — forked from kallydev/Cargo.toml
Alloy log subscriber.
[package]
name = "playground"
version = "0.1.0"
edition = "2021"
[dependencies]
alloy = { git = "https://github.com/alloy-rs/alloy.git", features = ["contract", "provider-ws", "rpc-types-eth"] }
anyhow = "1.0.82"
tokio = { version = "1.37.0", features = ["full"] }
tracing = "0.1.40"
@elyase
elyase / abi.py
Created January 18, 2024 11:26 — forked from reinforcementwonder/abi.py
uniswap v2 buy & sell
import json
MIN_ERC20_ABI = json.loads(
"""
[{"constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@elyase
elyase / convert_mysql_to_sqlite3.sh
Created December 15, 2017 17:04 — forked from grfiv/convert_mysql_to_sqlite3.sh
convert a mysql database to sqlite3
#!/bin/bash
#
# convert a mysql database to sqlite3
#
#see https://stackoverflow.com/questions/5164033/
# export-a-mysql-database-to-sqlite-database
mysql_host=localhost
mysql_user=george
#mysql_passwd=****************
@elyase
elyase / preprocess-twitter.py
Created April 29, 2016 08:26 — forked from tokestermw/preprocess-twitter.py
Python version of Ruby script to preprocess tweets for use in GloVe featurization http://nlp.stanford.edu/projects/glove/
"""
preprocess-twitter.py
python preprocess-twitter.py "Some random text with #hashtags, @mentions and http://t.co/kdjfkdjf (links). :)"
Script for preprocessing tweets by Romain Paulus
with small modifications by Jeffrey Pennington
with translation to Python by Motoki Wu
Translation of Ruby script to create features for GloVe vectors for Twitter data.
function svmStruct = best_svm_classifer_rbf(cdata,labels)
%Write a function called crossfun to calculate the predicted classification yfit from a test vector
%xtest, when the SVM is trained on a sample xtrain that has classification ytrain.
function yfit = crossfun(xtrain,ytrain,xtest, rbf_sigma, boxconstraint)
% Train the model on xtrain, ytrain,
% and get predictions of class of xtest and output it as yfit

Deploy Python app using Pandas on Heroku

2012-09-08

This document explains how to deploy a Python app that uses the Pandas library on Heroku.

Heroku builds Numpy (one of Pandas' requirements) fine. However, when trying to deploy an app with both numpy and pandas in its requirements.txt file (or even just pandas), for some reason it fails