This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package albie; | |
class ListNode<T> { | |
ListNode(T x) { | |
value = x; | |
} | |
T value; | |
ListNode<T> next; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tudelft.sqt; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class RomanNumeral { | |
private static Map<Character, Integer> map; | |
static { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tudelft.sqt; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class RomanNumeral { | |
private static Map<Character, Integer> map; | |
static { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find(nums): | |
smallest = 9999 | |
highest = -9999 | |
for num in nums: | |
if num < smallest: | |
smallest = num | |
if num > highest: |