Skip to content

Instantly share code, notes, and snippets.

View mauricioaniche's full-sized avatar

Maurício Aniche mauricioaniche

View GitHub Profile
def my_example_function():
print("Hi")
name = input("Tell me your name")
age = input("Tell me your age")
print("Hi {}, you are {} years old".format(name, age))
package albie;
class ListNode<T> {
ListNode(T x) {
value = x;
}
T value;
ListNode<T> next;
}
> c <- c(1.01,1.02,1.03,1.04,1.05,1.06,1.07,1.08,1.09,1.1)
> d <- c(1.5, 1.51,1.52,1.53,1.54,1.55,1.56,1.57,1.58,1.59, 1.6)
> wilcox.test(c,d)
Wilcoxon rank sum test
data: c and d
W = 0, p-value = 5.67e-06
alternative hypothesis: true location shift is not equal to 0
> library(effsize)
> a <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1)
> b <- c(1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1)
> wilcox.test(a)
Wilcoxon signed rank test with continuity correction
data: a
V = 105, p-value = 0.0002105
alternative hypothesis: true location is not equal to 0
package tudelft.sqt;
import java.util.HashMap;
import java.util.Map;
public class RomanNumeral {
private static Map<Character, Integer> map;
static {
package tudelft.sqt;
import java.util.HashMap;
import java.util.Map;
public class RomanNumeral {
private static Map<Character, Integer> map;
static {
> df
r_correct r_deserved_grade r_guess r_to_pass r_prob
1 0 0.00 40 23 0.001288255
2 1 0.25 39 22 0.002026315
3 2 0.50 38 21 0.003423564
4 3 0.75 37 20 0.006220180
5 4 1.00 36 19 0.012010891
6 5 1.25 35 18 0.024172832
7 6 1.50 34 17 0.049693691
8 7 1.75 33 16 0.102629931
@mauricioaniche
mauricioaniche / convert.py
Created October 25, 2018 20:33
Convert an Excel file to english
import os
from openpyxl import load_workbook
from google.cloud import translate
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "/DIRECTORY-TO-YOUR-GOOGLE-KEY/google.json"
translate_client = translate.Client()
target = 'en'
import random
from getkey import getkey, keys
# Initialize the map
# . -> empty space (ghosts and pacman can walk)
# | and - -> wall, no one can go through it
# @ -> our hero: pacman
# G -> ghosts, they are the bad folks
# P -> pills. Pacman needs to eat them
def find(nums):
smallest = 9999
highest = -9999
for num in nums:
if num < smallest:
smallest = num
if num > highest: