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
| from google.cloud import bigquery | |
| import random | |
| import uuid | |
| from datetime import datetime, timedelta | |
| import sys | |
| # Ejectuar el script en la terminal | |
| # $> python bigquery_insert_parametrized_events_table.py "20230606" | |
| if len(sys.argv) > 1: |
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 matplotlib.pyplot as plt | |
| import numpy as np | |
| from matplotlib.widgets import Slider | |
| def likelihood_func(θ,y,n,togle_var): | |
| if(togle_var): | |
| return np.log(np.power(1-θ,y-n) * np.power(θ,n)) | |
| return np.power(1-θ,y-n) * np.power(θ,n) | |
| fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 5)) |
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 matplotlib.pyplot as plt | |
| from matplotlib.widgets import Slider | |
| import numpy as np | |
| fig, ax = plt.subplots() | |
| plt.subplots_adjust(bottom=0.25) | |
| x = np.array([1, 2, 3, 4, 5]) | |
| y = np.array([2, 4, 1, 5, 2]) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| from pyspark.context import SparkContext | |
| spark = SparkContext.getOrCreate() | |
| rdd1 = spark.textFile("inversiones.csv") | |
| mapping_function = lambda linea : (linea.split(",")[3],1) | |
| filter_function = lambda dato : (dato[0] != "date") |
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
| for(let i=0 ; i<10 ; i++){ | |
| let printN = ()=> console.log(i); | |
| setTimeout(printN , i*1000); | |
| } |
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
| class myAwesomeElement extends HTMLElement { | |
| constructor(){ | |
| super(); | |
| this.attachShadow({mode:"open"}); | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 matplotlib.pyplot as plt | |
| from scipy.special import gamma | |
| from math import exp as e | |
| def gaussian_distribution(vector_x,a,l): | |
| result = [((l*(l*x)**(a-1))*e(-l*x))/gamma(a) for x in vector_x] | |
| return np.array(result) | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder