Skip to content

Instantly share code, notes, and snippets.

View antonio-catalano's full-sized avatar

Antonio Catalano antonio-catalano

View GitHub Profile
@antonio-catalano
antonio-catalano / DynamicAlgo.py
Created April 19, 2018 13:11
dynamic programming code
"It's a reworked version of Problem 14 that you find here: http://interactivepython.org/runestone/static/pythonds/Recursion/pythondsProgrammingExercises.html"
dizio_1 = { (2,2): 1, (3,4): 2, (4,6): 3, (5,7): 4, (9,10): 5, (9,11): 6, (13,15): 7, (16,19): 8, \
(25,37): 9, (35,45):10 }
def createTab ( _Dict ): #create the graphic tab
dizio = _Dict
print('','Item', 'Weight', 'Value','\n', sep=" " )
for key in dizio:
spazio = " "
@antonio-catalano
antonio-catalano / bubblesortquiz.py
Last active April 24, 2018 12:33
bubble sort quiz
''' In this link the description of problem: https://twitter.com/CutTheKnotMath/status/988401818915999744 '''
import random
def bubblesortOnePass(l):
if len(l) == 1:
return l
else:
for i in range(len(l)):
try:
import numpy as np
import matplotlib.pyplot as plt
def IQ(IQ_mean, IQ_std):
IQ_value_low = []
IQ_value_high = []
IQ_all = []
for i in range(10000):
IQ_value = np.random.normal(IQ_mean, IQ_std)
IQ_all.append(IQ_value)
@antonio-catalano
antonio-catalano / history
Created February 22, 2019 16:31
history file
==> 2018-05-07 05:54:59 <==
# cmd: C:\Users\Admin\Anaconda3\Scripts\conda install pandas-datareader
+defaults::_ipyw_jlab_nb_ext_conf-0.1.0-py36he6757f0_0
+defaults::alabaster-0.7.10-py36hcd07829_0
+defaults::anaconda-5.1.0-py36_2
+defaults::anaconda-client-1.6.9-py36_0
+defaults::anaconda-navigator-1.7.0-py36_0
+defaults::anaconda-project-0.8.2-py36hfad2e28_0
+defaults::asn1crypto-0.24.0-py36_0
+defaults::astroid-1.6.1-py36_0