.
├── README.md
├── data
├── evaluation
├── models
├── notebook
├── requirements.txt
├── results
├── singularity_python.sh
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
╔══════════════════╦══════════════════════╗ | |
║ ecosystem ║ number of packages ║ | |
╠══════════════════╬══════════════════════╣ | |
║ Python’s `pip` ║ 235000 ║ | |
║ Ruby’s gem ║ 133000 ║ | |
║ Javascript’s NPM ║ 1m+ ║ | |
╚══════════════════╩══════════════════════╝ |
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
class Board | |
attr_accessor :board_config | |
def initialize | |
@board_config = [["_", "_", "_"], ["_", "_", "_"], ["_", "_", "_"]] # 3 by 3 | |
@dim = 3 | |
end | |
def lookup(coord) | |
return @board_config[coord[0]][coord[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
def bubble_sort(arr) | |
# drop ignores previous sorted elems | |
arr.each_with_index do |dum, drop_i| | |
arr.drop(drop_i).each_with_index do |elem, i| | |
if arr[i+1] != nil && arr[i] > arr[i + 1] | |
temp = arr[i] | |
arr[i] = arr[i+1] | |
arr[i+1] = temp | |
end | |
end |
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 stonk_picker(stonk_arr) | |
# find the max diff between elements | |
max_profit = 0 | |
max_idx = [0, 0] | |
stonk_arr.each_with_index do |buy, buy_idx| | |
stonk_arr.each_with_index do |sell, sell_idx| | |
# puts "%d %d" % [buy_idx, sell_idx] | |
if buy_idx < sell_idx && sell - buy > max_profit | |
max_idx[0] = buy_idx | |
max_idx[1] = sell_idx # get original idx |
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 substrings(words, dictionary) | |
result = Hash.new(0) | |
words = words.split(" ") | |
dictionary.map do |dict| | |
words.each do |word| | |
if word.downcase.include?(dict.downcase) | |
result[dict] += 1 | |
end | |
end | |
end |
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 caesar_cipher(msg, offset) | |
msg_arr = [] | |
msg.chars.each do |m_char| | |
if m_char.match(/[A-Z]/) | |
# wraps around 26 alphabets, mod 26 | |
msg_arr.push((m_char.ord + offset - 'A'.ord) % 26 + 'A'.ord) | |
elsif m_char.match(/[a-z]/) | |
msg_arr.push((m_char.ord + offset - 'a'.ord) % 26 + 'a'.ord) | |
else |
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
"""A simple tool to add the name of downloaded paper pdf's in front of the id. | |
(Written by [email protected]) | |
If there are multiple downloads of same paper, replaces the original with the | |
latest download. This can be useful in a downloads folder filled with copies. | |
For instance: | |
""" | |
import glob |
- apply the
--no-blob-protection
for all files tracked under.gitattibutes
- apply
--no-blob-protection
fot.gitattributes
itself
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
\documentclass{article} | |
\usepackage{algorithm} % algorithm | |
\usepackage[noend]{algpseudocode} % algorithm | |
\usepackage{bm} % bold in math | |
\usepackage{array} % thick column hline | |
\makeatletter | |
\def\BState{\State\hskip-\ALG@thistlm} |
NewerOlder