Skip to content

Instantly share code, notes, and snippets.

View alirioangel's full-sized avatar

Alirio Alejandro Angel Arenas alirioangel

  • Dcorp - IT Lead
  • Venezuela
View GitHub Profile
@alirioangel
alirioangel / Another way to calculate Pi.py
Created November 8, 2020 20:26
Si tienes un arreglo de pares de numeros aleatorios que van de 0 a 1 cual es el valor aproximado de PI ?
import random
def estimate_pi(number_of_needle):
needles_on_circle = 0
for _ in range(number_of_needle):
x = random.uniform(0,1)
y = random.uniform(0,1)
distance = x**2 + y**2
if distance <= 1:
needles_on_circle += 1
import os
import random as random
import math as math
import statistics as std
from bokeh.plotting import figure, output_file, show
os.system('cls')
tries = 10
puntos = 100
@alirioangel
alirioangel / gist:cb5e7c7fd67c29e546a7eb57339d6e49
Last active November 2, 2020 22:26
External Login with Social media.
// startup
.AddGoogle(options =>
{
IConfigurationSection googleAuthNSection =
config.GetSection("Authentication:Google");
options.ClientId = googleAuthNSection["ClientId"];
options.ClientSecret = googleAuthNSection["ClientSecret"];