git init
git remote add <name> <link>
git add .
git log <remote/branch>
git status
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
# algorithm to order sequence for optimal binary tree construction | |
import sys | |
def arrange(numArray): | |
if len(numArray) == 0: | |
return numArray | |
numArray.sort() |
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
# Collatz conjecture: | |
# https://en.wikipedia.org/wiki/Collatz_conjecture#Iterating_on_all_integers | |
import sys | |
# s,f=sys.stdin.readline().split() | |
# s=int(s) | |
# f=int(f) | |
s = 1 | |
f = 1000000 |
The return_value
configures the value returned when the mock is called. It will always return the same value when the mock is called.
The side_effect
argument can accept a function to be called when the mock is called, an iterable or an Exception.
By passing in an iterable we can mock multiple inputs inside the testing function,
because it will yield the next value everytime it’s called.
import unittest
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
#!/bin/bash | |
# Set the execute permission for this file: | |
# $ chmod +x arm_run.sh | |
# use: | |
# $ ./arm_run.sh path/to/file //file name without .s extension | |
echo "Assembling and running file: $1.s" |