Skip to content

Instantly share code, notes, and snippets.

View StrikingLoo's full-sized avatar
😄

Luciano StrikingLoo

😄
View GitHub Profile
@StrikingLoo
StrikingLoo / clientes-y-datos.markdown
Last active October 5, 2016 01:54
Clientes y Datos
@StrikingLoo
StrikingLoo / index.html
Created October 5, 2016 01:55
It's hip to be square
<body>
<div class='container-fluid' align='center'>
<div class = 'row'>
<svg width = '100' height = '100' >
<rect width = '100' height = '100'>
</rect>
</svg>
<svg width = '100' height = '100'>
<rect width = '100' height = '100'>
@StrikingLoo
StrikingLoo / index.html
Created October 5, 2016 01:55
Invisible Circles
<body>
<div class = 'container-fluid'>
<div class= 'row'>
<div class = 'col-xs-1'>
<button></button></div>
<div class = 'col-xs-1'>
<button></button></div>
<div class = 'col-xs-1'>
<button></button></div>
<div class = 'col-xs-1'>
@StrikingLoo
StrikingLoo / goldbach.js
Created March 23, 2017 04:58
Goldbach's Conjecture
//calling goldbach(n) will give you two prime numbers that add up to it, as long as n is even. Otherwise it will just return [-1,-1]
function findPrimesLowerThan(n){
//find all primes less than or equal to the given n number
primes = [2]
current = 3
while(current<n+1){
isPrime = true
for (i = 0; i<primes.length;i++){
@StrikingLoo
StrikingLoo / generate.py
Last active August 18, 2018 23:37
Generating random people in Python
import random
names = ["Albert","John","Richard","Henry","William"]
surnames = ["Goodman","Black","White","Green","Joneson"]
salaries = [500*random.randint(10,30) for _ in range(10)]
def generate_random_person(names, surnames, salaries):
return {"name":random.sample(names,1)[0],
"surname":random.sample(surnames,1)[0],
"salary":random.sample(salaries,1)[0]}
@StrikingLoo
StrikingLoo / generate_dataset.py
Created August 18, 2018 23:40
make a pd dataframe and csv
df = pd.DataFrame(generate_people(50),
columns=["name","surname","salary"])
df.to_csv("random_people.csv")
some_list = []
for i in range(10):
some_list.append(f(i))
some_list = [f(i) for i in range(10)]
def some_function(k):
# some lines of code doing something
# ...
another_list = []
for i in range(k):
if i%2 ==0:
another_list.append( (i*7 + 5) % 13 )
else:
another_list.append( (i*5 + 7) % 23 )