Skip to content

Instantly share code, notes, and snippets.

View emilianobilli's full-sized avatar

Emiliano A. Billi emilianobilli

View GitHub Profile
@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
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
<!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', {
package main
import (
"fmt"
"encoding/json"
"net/http"
"flag"
)
type Market struct {
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
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}.
*
const ethers = require('ethers');
class Signature {
constructor(ethereum) {
this.ethereum = ethereum;
}
provider() {
return new ethers.providers.Web3Provider(this.ethereum);
}
pragma solidity 0.5.12;
contract GasReserve {
uint256[] g;
function reserveGas(uint256 quantity) internal {
if (quantity > 0)
reserve(quantity);
}
# Dadas las 4 notas obtenidas por un alumno se pide calcular e
# informar el promedio y una leyenda que indique si está aprobado.
# El dato de aprobación se hará a partir de un valor predeterminado
# que no podrá ser modificable a lo largo del programa.
def input_nota():
nota = input("Ingrese nota: ")
return int(nota)
criterio_aprobacion = 4
# Ingresar 5 números reales e informar el menor de ellos.
def ingresa_numero_real():
real = input("Ingresa numero real: ")
return float(real)
contador = 1
menor = 1000000 # opcion 1 con 0, opcion 2 primer valor que se ingrese
while contador <= 5:
numero = ingresa_numero_real()
if numero < menor or contador == 1: