Skip to content

Instantly share code, notes, and snippets.

View jpcrespo's full-sized avatar
🏠
Working from home

Juan P. Crespo V. jpcrespo

🏠
Working from home
  • Descentralized
  • 20:27 (UTC -04:00)
  • X @jpcr3spo
View GitHub Profile
@jpcrespo
jpcrespo / MC_2for.py
Created April 24, 2020 04:46
Uso Monte Carlo para calcular Py con dos bucles
import numpy as np
import matplotlib.pyplot as plt
from time import time
A=[]
N = np.logspace(2,8,num=10,endpoint=True)
N = np.around(N).astype(int) #numeros enteros
@jpcrespo
jpcrespo / MC_PI_unbucle.py
Created April 24, 2020 05:14
Calcula el valor de Pi con MC, usando un solo bucle for
import numpy as np
import matplotlib.pyplot as plt
from time import time
N = np.logspace(2,8,num=10,endpoint=True)
N = np.around(N).astype(int)
A=[]
pis=[]
tiempo_inicial = time()
for i in N:
@jpcrespo
jpcrespo / mc_pisinbucles.py
Last active April 24, 2020 05:26
MC para calcular pi sin bucles
import numpy as np
import matplotlib.pyplot as plt
from time import time
#Obtenemos un vector que nos de el dato de N
#equiespaciado
N = np.logspace(2,8,num=10,endpoint=True)
N = np.around(N).astype(int)
#Se busca crear la matriz de datos x,y aleatorios
import numpy as np
import pandas as pd
import seaborn as sns
import os
from Bio import SeqIO
for sequence in SeqIO.parse('MN908947.fna', "fasta"):
a = sequence.seq
print('Análisis del genoma Covid19')
print(len(a),'Nucleotidos')

Keybase proof

I hereby claim:

  • I am jpcrespo on github.
  • I am jpcrespo (https://keybase.io/jpcrespo) on keybase.
  • I have a public key ASCD35CsP00FJK3fOINj9so6o4tjJ2i-Uw0BOQ722uRD2Ao

To claim this, I am signing this object: