Skip to content

Instantly share code, notes, and snippets.

View ericdwkim's full-sized avatar
🎯
always learning

Eric Kim ericdwkim

🎯
always learning
View GitHub Profile
@drmarshall
drmarshall / event_export.py
Created June 8, 2015 17:04
Example Mixpanel raw event export script
#! /usr/bin/env python
#
# Mixpanel, Inc. -- http://mixpanel.com/
#
# Python API client library to consume mixpanel.com analytics data.
import hashlib
import urllib
import time
try:
@datashaman
datashaman / resilientsession.py
Last active March 11, 2022 21:11
Decorator version of resilientsession
from requests import Session
from requests.exceptions import ConnectionError
import logging
import time
def is_recoverable(error, url, request, counter=1):
if hasattr(error,'status_code'):
if error.status_code in [502, 503, 504]:
error = "HTTP %s" % error.status_code
@karmacoma-eth
karmacoma-eth / sending-ether-cheat-sheet.md
Last active November 20, 2024 00:07
Sending Ether Cheat Sheet

Sending Ether Cheat Sheet

TLDR

🥇 Instead of sending Ether, use the withdrawal pattern

🥈 If you really need to send Ether, use a safe wrapper like OpenZeppelin's Address.sendValue(addr, amount)

🥉 If you really need to send Ether without dependencies, use (bool success, ) = addr.call{value: amount}("")