This file contains hidden or 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
# To show the current link state | |
ip link show | |
# To disable the wlp3s0 interface (the built in one) | |
if=wlp3s0 | |
sudo ip link set $if down | |
# or | |
sudo ip link set wlp3s0 down |
This file contains hidden or 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
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } |
This file contains hidden or 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 unittest | |
import pairing_exercise | |
class TestPairingExercise(unittest.TestCase): | |
def test_calculate(self): | |
self.assertEqual(pairing_exercise.get_score('GUARDIAN1'), 10) |
This file contains hidden or 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 random import choices | |
name='Scrabble' | |
def split(word): | |
return [char for char in word] | |
score_map = { | |
"E": 1, |
This file contains hidden or 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
object fibonnaci { | |
var lastMinusOne = 0 | |
var last = 0 | |
for (count <- 1 to 10) { | |
if (count == 2) lastMinusOne = lastMinusOne + 1 | |
println({val current = last + lastMinusOne; current }) | |
val tempLast = last | |
last = last + lastMinusOne // aka current | |
lastMinusOne = tempLast |
This file contains hidden or 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
# WARNING: THIS WILL GET RID OF THE COMMITS ON YOUR FEATURE BRANCH TOO! | |
# Original steps | |
# 1. Start with a clean version branch. | |
# 2. git reset master | |
# 3. git add . (notice trailing dot in there) | |
# 4. git commit -m "A really meaningful commit message" | |
# 5. git push --force | |
git reset master && \ |
This file contains hidden or 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 goLeft(tree): | |
left_sum = 0 | |
power_count = 1 | |
descending = True | |
while descending: | |
for i in range( (2**power_count)-1, (2**(power_count+1))-1 ): | |
level_span = ((2**power_count)-1) | |
range_len = len(range( (2**power_count)-1, (2**(power_count+1))-1)) | |
try: |
NewerOlder