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
// ==UserScript== | |
// @name YouTube Recommended Remove Old Videos | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Removes old videos from YouTube's recommended page | |
// @author @OlafurW | |
// @include https://www.youtube.com/* | |
// @grant none | |
// @require https://code.jquery.com/jquery-3.4.1.min.js | |
// ==/UserScript== |
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 <random> | |
#include <map> | |
#include <vector> | |
#include <iostream> | |
#include <iomanip> | |
unsigned int | |
Disarrange( | |
const unsigned int aMax, | |
std::mt19937& aGenerator, |
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
bool | |
Meow::Foo( | |
const int aBar, | |
const std::string& aCrazy, | |
float& aOutGrr) | |
{ | |
} |
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
class Meow | |
{ | |
public: | |
Meow(); | |
int myWhateverValue; | |
const public: // const to the public, could also be "public const:" for parsing reasons | |
int myDelicateState; |
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
int main() | |
{ | |
int x = 4; // vanilla variable | |
int& y = x; // reference to the one above | |
int* z = &x; // pointer, without having to teach them about malloc or new, that can come later, just complicates things at first | |
return 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
#include <iostream> | |
int main() | |
{ | |
int height = 4; | |
int width = 5; | |
std::cout << height << " " << width << std::endl; | |
return 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
double Foo( | |
const double aBar, | |
const double aBaz) | |
{ | |
return aBar + aBaz; | |
} | |
int main() | |
{ | |
const auto result = Foo(1.2, 2.3); |
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
# Create 3 files, A.txt, B.txt, C.txt with your dice rolls, you can use https://www.random.org/integers/ | |
# Make Magic(a,b,c) do the formula you think works. | |
# It will return how often each dice value was rolled | |
# A fair formula would result in equal results in each bracket for each dice | |
def FileToArray(aFilename): | |
with open(aFilename, 'r') as myFile: | |
return myFile.read().splitlines() | |
return [] |
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
# This is regarding https://www.youtube.com/watch?v=SOgn6J12NWE | |
import math | |
def FiveSquareRoot(aNumber): | |
return math.sqrt(math.sqrt(math.sqrt(math.sqrt(math.sqrt(aNumber))))) | |
def FirstSix(aString): | |
decimalStr = aString.split(".")[1] | |
return decimalStr[:6] |
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 hashlib | |
iteration_length = 10 | |
hash_length = 5 | |
set_length = pow(16, hash_length) | |
fs = set() | |
for i in range(0, set_length): | |
x = format(i, 'x').zfill(hash_length) | |
fs.add(x) |