Skip to content

Instantly share code, notes, and snippets.

View mrecachinas's full-sized avatar
:bowtie:
Slingin' some code

Michael Recachinas mrecachinas

:bowtie:
Slingin' some code
View GitHub Profile
@mrecachinas
mrecachinas / README.md
Last active August 11, 2021 20:49
Websocket Trickery

To run:

python3 -m pip install websockets
python3 simple_websocket_server.py

Then in another terminal, run

@mrecachinas
mrecachinas / Cargo.toml
Last active April 14, 2020 15:05
Tiny-Keccac Testing
[package]
name = "keccak-test"
version = "0.1.0"
authors = ["Michael Recachinas <mike@recachinas.dev>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tiny-keccak = { version = "2.0", features = ["cshake", "kmac"] }

Keybase proof

I hereby claim:

  • I am mrecachinas on github.
  • I am mrecachinas (https://keybase.io/mrecachinas) on keybase.
  • I have a public key whose fingerprint is 9B9F D0FD E117 251A 2CC9 E954 1FFD 95E9 483C 6A66

To claim this, I am signing this object:

@mrecachinas
mrecachinas / wiki.py
Created May 7, 2017 16:08
The drinking game involving Wikipedia
#!/usr/bin/env python
from __future__ import print_function
import urllib2
import httplib
from bs4 import BeautifulSoup, SoupStrainer
import string
import time
def get_wiki(link):
try:
@mrecachinas
mrecachinas / Contents.swift
Last active December 7, 2016 17:39
Public Extension Submission
extension String {
subscript(i: Int) -> Character {
return self[index(startIndex, offsetBy: i)]
}
subscript(r: Range<Int>) -> String {
return substring(with: index(startIndex, offsetBy: r.startIndex)..<index(startIndex, offsetBy: r.endIndex))
}
}
@mrecachinas
mrecachinas / tax.py
Last active November 28, 2016 22:02
Comparison of Trump's Tax Plan vs Current Tax Plan (with 0 deductions)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:sw=4:sts=4:et
import math
import locale
def calc_taxes(annual_salary, plan, filing):
filing_plan = plan[filing]
taxes = 0
for salary_range in filing_plan:
@mrecachinas
mrecachinas / Is OPM Open or Closed Tomorrow?!
Last active October 30, 2016 18:59
Useful script for when it snows in the DC metro area
#!/usr/bin/env python
# vim:sw=4:sts=4:et
import bs4
import urllib2
import httplib
import datetime
def parse_html(html_str, now):
"""Parses HTML from OPM's current status website to return open/close
@mrecachinas
mrecachinas / toposort.swift
Last active October 9, 2021 02:01
First topological sort written in Apple's new language Swift.
// First Topological Sort in Apple's new language Swift
// Updated on 10/30/2016 to account for the newest version of Swift (3.0)
// Michael Recachinas
enum TopologicalSortError : Error {
case CycleError(String)
}
/// Simple helper method to check if a graph is empty
/// - parameters:
/// - dependency_list: a `Dictionary<String, [String]>` containing the graph structure
// First Brainf*** Interpreter in Swift
import Cocoa
func input() -> String {
var keyboard = NSFileHandle.fileHandleWithStandardInput()
var inputData = keyboard.availableData
return NSString(data: inputData, encoding:NSUTF8StringEncoding)
}

Questions

1. What programming languages do you think are fundamental for us - students who learned Java and C++ - to learn in the future and why? 2. Care to share any sources that helped you well to learn those languages?

Authors/Contributors

Contributions by [**Wil**](http://www.github.com/wbthomason), [**Mike**](http://www.github.com/mrecachinas), and [**Charles**](http://github.com/cceckman).

Answer

This is only my personal opinion, and other TAs probably will differ/should also post their opinions.