I hereby claim:
- I am jckw on github.
- I am jckw (https://keybase.io/jckw) on keybase.
- I have a public key ASCtgz5vmmZ7V8Zkz2pkpzBot92btUibusolJ9aaVXMpFgo
To claim this, I am signing this object:
Practical 1: Factoring Numbers | |
Here is a simple method for finding the smallest prime factor of a positive | |
integer: | |
> factor :: Integer -> (Integer, Integer) | |
> factor n = factorFrom 2 n | |
> factorFrom :: Integer -> Integer -> (Integer, Integer) | |
> factorFrom m n | r == 0 = (m,q) |
I hereby claim:
To claim this, I am signing this object:
def mergeSort(sorting, first, last): | |
"""Recursive merge sort function that takes the indices of the | |
first and last values that are being sorted in this pass and methodically | |
splits down the `sorting` list, until it can start remerging the halves. | |
Recursion is the only way that merge sort makes sense. It's pretty neat. | |
""" | |
if first >= last: | |
# If the first and last pointers are the same or switched, we're done |
# en1 for WLAN | |
# en0 for Ethernet | |
sudo ifconfig en1 down | |
sudo route flush | |
sudo ifconfig en1 up |
import pi2go, time | |
def endCheck(): | |
start = time.time() | |
# While still on the line, go forwards | |
while not pi2go.irLineLeft and not pi2go.irLineRight(): | |
forward(slow) | |
# Now off the line |
import sys | |
dotTxt = sys.argv[1] | |
textfile = open(dotTxt) | |
string = textfile.read() | |
compressed = [] | |
noInRow = 1 |
no = int(input()) | |
final = [True, True, True, True, True, | |
True, True, True, True, True] | |
for i in range(0, no): | |
total = 0 | |
number = int(input()) # int | |
strNum = str(number) | |
nums = [False, False, False, False, False, |
import numpy as np | |
no = int(input()) | |
for i in range (1, no + 1): | |
case_text = "Case #" + str(i) + ": " | |
pcakes = input() | |
height = len(pcakes) | |
bool_stack = [] |