Skip to content

Instantly share code, notes, and snippets.

View amustafa's full-sized avatar

Adam Mustafa amustafa

  • Cedar Grove, NJ
View GitHub Profile
@amustafa
amustafa / Cargo.toml
Last active May 19, 2021 18:26
Datafusion Performance Example
[package]
name = "datafusion_playground"
version = "0.1.0"
authors = [""]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
arrow = { git = "https://github.com/apache/arrow-rs", branch = "master" }
@amustafa
amustafa / shapeshift_get_coins.py
Created August 3, 2017 02:28
Python API for Shapeshift.io's getcoins.
import requests
BASE_URL = 'https://shapeshift.io/%s'
def get_coins():
url_path = 'getcoins'
url = BASE_URL % url_path
response = requests.get(url)
return response.json()
@amustafa
amustafa / shapeshift_get_functions.py
Last active August 3, 2017 02:51
Python API of GET functions for Shapeshift.io
import requests
BASE_URL = 'https://shapeshift.io/%s'
def _shapeshift_get_request(url_path):
"""
Combines the provided url_path with Shapeshift's base url and performs a get request.
"""
@amustafa
amustafa / shapeshift_post_functions.py
Last active August 3, 2017 02:52
POST functions for Shapeshift.io
def _shapeshift_post_request(url_path, payload):
"""
Combines the provided url_path with Shapeshift's base url and performs
a post request with the provided payoad
"""
url = BASE_URL % url_path
# Filter out any values that are None
payload = {k: v for k, v in payload.items() if v is not None}
@amustafa
amustafa / shapeshift.py
Last active August 3, 2017 02:51
Python based API for Shapeshift.io
"""
Shapeshift.io API
Implements all the API calls on Shapeshift.io
All documentation is taken from https://info.shapeshift.io
"""
import requests
@amustafa
amustafa / shapeshift_create_normal_tx.py
Last active August 3, 2017 02:25
Create a Normal Shapeshift Transaction
def create_normal_tx(withdrawal_address, input_coin, output_coin,
return_address=None,
destination_tag=None,
rs_address=None,
api_key=None):
url_path = "shift"
url = BASE_URL % url_path
payload = {
'withdrawal': withdrawal_address,
### Keybase proof
I hereby claim:
* I am amustafa on github.
* I am amustafa (https://keybase.io/amustafa) on keybase.
* I have a public key ASC9Aa_-YDNYvM5hKyuh4c6GgMW5dqXTlOWK_eXz-8L_zQo
To claim this, I am signing this object:
Verifying that +adam_mustafa is my blockchain ID. https://onename.com/adam_mustafa