Skip to content

Instantly share code, notes, and snippets.

View emilianobilli's full-sized avatar

Emiliano A. Billi emilianobilli

View GitHub Profile
pragma solidity 0.5.12;
contract GasReserve {
uint256[] g;
function reserveGas(uint256 quantity) internal {
if (quantity > 0)
reserve(quantity);
}
const ethers = require('ethers');
class Signature {
constructor(ethereum) {
this.ethereum = ethereum;
}
provider() {
return new ethers.providers.Web3Provider(this.ethereum);
}
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
class S3Bucket(object):
def __init__(self, bucket, aws_access_key_id, aws_secret_access_key):
self.client = boto3.client(
's3',
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key
)
self.bucket = bucket
package main
import (
"fmt"
"encoding/json"
"net/http"
"flag"
)
type Market struct {
<!DOCTYPE html>
<head>
<title>Pusher Test</title>
<script src="https://js.pusher.com/5.1/pusher.min.js"></script>
<script>
// Enable pusher logging - don't include this in production
Pusher.logToConsole = true;
var pusher = new Pusher('6c3d25b9b072a4c03090', {
from ethlite.Contracts import Contract
from ethlite.NetworkUtil import NetworkUtil
from json import loads
import requests
class Accounts(object):
endpoint = 'https://api.dydx.exchange/v1/accounts/'
@classmethod
@emilianobilli
emilianobilli / ftpserver.py
Last active October 20, 2015 02:08 — forked from scturtle/ftpserver.py
simple ftp server by python
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
#import traceback
allow_delete = False
#local_ip = socket.gethostbyname(socket.gethostname())
local_ip = "0.0.0.0"
local_port = 8888