Skip to content

Instantly share code, notes, and snippets.

View mycarta's full-sized avatar
💭
Trying to live in the present moment

Matteo Niccoli mycarta

💭
Trying to live in the present moment
View GitHub Profile
@mycarta
mycarta / Plato.md
Last active September 24, 2023 18:04
Plato's Perspective on the Hundred Years' War

Plato’s Perspective on the Hundred Years’ War

Outline

    Introduction
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mycarta
mycarta / distcorr.py
Created September 24, 2019 15:27 — forked from satra/distcorr.py
Distance Correlation in Python
from scipy.spatial.distance import pdist, squareform
import numpy as np
from numbapro import jit, float32
def distcorr(X, Y):
""" Compute the distance correlation function
>>> a = [1,2,3,4,5]
>>> b = np.array([1,2,9,4,4])
@mycarta
mycarta / distcorr.py
Created September 24, 2019 15:27 — forked from satra/distcorr.py
Distance Correlation in Python
from scipy.spatial.distance import pdist, squareform
import numpy as np
from numbapro import jit, float32
def distcorr(X, Y):
""" Compute the distance correlation function
>>> a = [1,2,3,4,5]
>>> b = np.array([1,2,9,4,4])
from random import randint
print ('Hello, I am a talking calculator and my name is Jester.')
name = raw_input('What is your name? ')
print ('Hello ' + name.capitalize() + ', nice to meet you!')
while True:
operation = raw_input(name.capitalize() +
', would you like to subtract or add? (enter "q" to quit)')