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
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <exception> | |
#include <numeric> | |
#include <functional> | |
#include <tuple> | |
#include <memory> | |
#include <variant> |
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
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <exception> | |
#include <numeric> | |
#include <functional> | |
#include <tuple> | |
#include <memory> | |
template <class T> |
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
[alias] | |
da = "! addprev() { while true; do \ | |
read -p \"Do you wish to add this file? ([Y]es, [N]o, [P]atch)\" yn ; \ | |
case $yn in \ | |
[Yy]* ) git add $1; break;; \ | |
[Pp]* ) git add -p $1; break;; \ | |
[Nn]* ) exit;; \ | |
* ) echo "Please answer yes, no or patch.";; \ | |
esac \ | |
done } ; \ |
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 | |
def get_random_numbers(amount): | |
random_numbers = random.sample(range(1, 1000), amount) | |
print([x for x in reversed(sorted(random_numbers))]) | |
return random_numbers | |
numbers = get_random_numbers(100) |
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 | |
def get_random_numbers(amount): | |
random_numbers = random.sample(range(1, 1000), amount) | |
print([x for x in reversed(sorted(random_numbers))]) | |
return random_numbers | |
def get_n_largest_elements_of_list(a_list, number_of_elements_to_get): |
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 sys | |
from collections import defaultdict | |
# send to multiples from one, if can | |
# if closest is enemy and three or two, bomb | |
# zero prod could bomb | |
class Increase(object): |