This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"encoding/json" | |
"net/http" | |
"flag" | |
) | |
type Market struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ethers = require('ethers'); | |
class Signature { | |
constructor(ethereum) { | |
this.ethereum = ethereum; | |
} | |
provider() { | |
return new ethers.providers.Web3Provider(this.ethereum); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.5.12; | |
contract GasReserve { | |
uint256[] g; | |
function reserveGas(uint256 quantity) internal { | |
if (quantity > 0) | |
reserve(quantity); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
OlderNewer