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
int readInt(); | |
char readChar(); | |
float readFloat(); | |
string readWord(); | |
string readLine(); | |
void swapInt(int &a, int &b); | |
void swapChar(char &a, char &b); | |
void swapFloat(float &a, float &b); | |
void swapString(string &a, string &b); |
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 check_params(h, nbins): | |
assert type(nbins) == int | |
assert h > 0 | |
get_delta = lambda a, b, nbins: float(b - a) / nbins | |
def integLeft(a, b, f, nbins): | |
"""Return the integral from a to b of function f using the left hand method""" | |
h = get_delta(a, b, nbins) | |
assert type(nbins) == int |
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
if exist ".git" ( | |
rmdir /S /Q .git | |
) | |
git init | |
git remote add origin https://github.com/%1.git | |
git pull origin master | |
for %%A IN (%*) DO ( | |
if "%%A"=="--pause" ( |
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
#!/bin/bash | |
# Source: OpenSSL Certificate Authority: https://jamielinux.com/docs/openssl-certificate-authority/index.html | |
# A function which pauses execution until 'Enter' is pressed | |
# If at least one parameter is given, that parameter will be displayed instead | |
pause() { | |
if [ $# -eq 0 ] | |
then | |
read -rsp $'Press enter to continue...\n' |
NewerOlder