This file contains hidden or 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" | |
"math/rand" | |
"time" | |
) | |
type Unit struct { | |
value int32 |
This file contains hidden or 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
cantidad = int(input("Cantidad a comprar:\t\t")) | |
compra = float(input("Precio de compra:\t\t")) | |
venta = float(input("Precio de venta:\t\t")) | |
try: | |
ingreso = float(input("Margend de ganancia (20%):\t")) / 100 | |
except: | |
ingreso = 0.2 | |
diferencia = venta-compra |
This file contains hidden or 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
import numpy as np | |
import math | |
import time | |
# General data accumulator. | |
BUFFER = [] | |
# Sets decimal precision to 10 digits, using truncation. | |
def fix(v): | |
return np.around(v, decimals=10) |
This file contains hidden or 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
import numpy as np | |
# Sets decimal precision to 10 digits, using truncation. | |
def fix(v): | |
return np.around(v, decimals=10) | |
def main(args): | |
# Multiplying a number by this factor is the equivalent of dividing it by 10 ^ 6 | |
FACTOR = 0.000001 |
This file contains hidden or 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
TARGETS: | |
KIC 10338279: | |
FILE: "./KIC10338279.csv" | |
############# | |
### STAR INFO | |
############# | |
STAR: | |
MASS: 0.778 | |
MASS_LOWER_ERROR: 0.052999973 | |
#MASS_UPPER_ERROR: |
This file contains hidden or 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
TARGETS: | |
KIC 4570326: | |
FILE: "./KIC4570326.csv" | |
############## | |
### STAR INFO | |
############## | |
STAR: | |
MASS: 1.620 | |
MASS_LOWER_ERROR: 0.2210000705719 | |
MASS_UPPER_ERROR: 0.061999921798706 |
This file contains hidden or 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
TARGETS: # Targets of the process | |
KIC 8197761: # Target Star | |
FILE: "./KIC8197761.csv" # Lightcurve source file | |
############# | |
### STAR INFO | |
############# | |
STAR: | |
MASS: 1.384 | |
# MASS_LOWER_ERROR: 0.27 |
This file contains hidden or 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
#include <EtherCard.h> | |
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 }; // Mac de la tarjeta ether... Debe ser unico en la red local | |
const static uint8_t ip[] = {10,14,0,56}; // Ip de la tarjeta | |
const static uint8_t gw[] = {10,14,0,1}; // Ip de la puerta de enlace | |
const static uint8_t mask[] = {255,255,255,0}; // Mascara de la tarjea | |
const static uint8_t dns[] = {10,14,0,1}; // Ip del servidor DNS, si existe | |
const static uint8_t hisip[] = {10,14,0,104}; // Ip de la aplicacion remota | |
const static int hisport = 8080; // Puerto de la aplicacion remota |
This file contains hidden or 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
import cherrypy | |
import json | |
class HelloWorld(object): | |
@cherrypy.expose | |
def index(self, data): | |
size = len(data) | |
NewerOlder