I hereby claim:
- I am noble-mushtak on github.
- I am noble_mushtak (https://keybase.io/noble_mushtak) on keybase.
- I have a public key ASCsHlXlReAN4kt5-ZDKSu1CVpGbledExE8CN3L9pupj6go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| def hexc2dec(bufp): | |
| """ | |
| Returns the decimal value of bufp[1:5], | |
| where bufp[1:5] is the hexadecimal representation of a 16-bit number | |
| in two's complement. | |
| """ | |
| # This variable accumulates our final answer | |
| newval = 0 | |
| divvy = 4096 |
| """ | |
| Script to find out who has taught previous Northeastern courses. | |
| Prerequisites: | |
| - Have Python bindings for Selenium installed (https://selenium-python.readthedocs.io/) | |
| - Have chromedriver installed and in PATH environment variable (http://chromedriver.storage.googleapis.com/index.html) | |
| Usage: python3 check_course.py `subject_name` `subject_code` `course_number` | |
| Examples: |
| """ | |
| Usage: python3 calc_putnam_places.py [score] | |
| If score is not provided, | |
| the script prints the place corresponding to every score | |
| any Putnam competitor got in the Putnam 2019 competition. | |
| If score is provided and is an integer, | |
| the script prints the place corresponding to that score. | |
| """ |
| import unittest | |
| UNKNOWN = None | |
| def ackermann(m, n): | |
| last_answer = None | |
| stack = [] | |
| stack.append((m, n)) | |
| while len(stack) > 0: |
| #!/usr/bin/env stack | |
| -- stack --resolver lts-13.30 script --package random | |
| import Control.Monad (foldM) | |
| import Data.List (elemIndex, minimumBy) | |
| import Data.Maybe (fromMaybe) | |
| import Debug.Trace (trace) | |
| import System.IO (getLine) | |
| import System.Random (randomIO, randomRIO) |
| //Based off https://gist.github.com/matthewaveryusa/a721aad80ae89a5c69f7c964fa20fec1 and https://www.kernel.org/doc/html/latest/input/uinput.html | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <time.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| #include <stdbool.h> |
| from math import pi, sqrt, atan2, asin | |
| def count_collisions(ratio): | |
| masses = [1, ratio] | |
| vels = [0, -1] | |
| collisions = 0 | |
| angles = [] | |
| while vels[0] < 0 or vels[1] < vels[0]: | |
| collisions += 1 |
| % Finds min between two numbers. | |
| min_nums(X,Y,X) :- X =< Y. | |
| min_nums(X,Y,Y) :- Y =< X. | |
| % Finds min of list. | |
| % Obviously, if there's only one item, then that's the minimum. | |
| min([Item|[]],Item). | |
| % If there's more than one item, find the minimum of the tail, | |
| % then take the minimum of the tail's minimum and the head element. | |
| min([Head|Tail],Min) :- |
| calculator.pro.user |