Skip to content

Instantly share code, notes, and snippets.

View MaxwellBo's full-sized avatar
🎈
please do not swear on my profile thanks

Max Bo MaxwellBo

🎈
please do not swear on my profile thanks
View GitHub Profile
('gin', 18)
('fresh lemon juice', 12)
('simple syrup', 12)
('fresh lime juice', 11)
('lemon juice', 9)
('cognac', 8)
('angostura bitters', 8)
('vodka', 8)
('white rum', 7)
('triple sec', 6)
cocktail_ingredients = {
"Alexander": ["3 cl cognac", "3 cl brown crème de cacao", "3 cl light cream"],
"Americano": ["3 cl Campari", "3 cl red vermouth", "A splash of soda water"],
"Angel Face": ["3 cl gin", "3 cl Apricot brandy", "3 cl Calvados"],
"Aviation": [
"45 ml gin",
"15 ml lemon juice",
"15 ml maraschino liqueur",
"1 barspoon crème de violette",
],
import io.circe.JsonObject
object BaseExError {
def generateErrorId(): String = UUID.randomUUID().toString.take(8)
def errorDataFromJsonObj(jsonObj: JsonObject): Map[String, String] =
jsonObj.toMap.mapValues(_.noSpaces)
/**
implicit val x: String = "up here"
def implicitString(implicit x: String) = x
// println(implicitString)
///////////////////////////////////////////////////////////////////////////////
implicit val booleanInstance: Boolean = true
implicit val intInstance: Int = 5

It may come as a surprise to many but Scala actually supports a flexible form Uniform Function Call Syntax (sometimes also referred to as Uniform Calling Syntax or Universal Function Call Syntax), henceforth referred to as UFCS. This feature can be seen in D, Rust and Nim. An example in Nim:

proc add(a: int, b: int): int =
  a + b

add(1, 2)
# OR 
1.add(2)

Hey folks, my name's Max, and I've been working on the free and open-source https://muncoordinated.io/, a collaborative browser-based MUN committee management app, for almost a year now.

Following its official release just a couple of months ago, it's been used at all large-scale Australian MUNs and over 20 other international MUNs. I've received a wealth of positive and helpful feedback, and have been working with directors to make sure that it's as easy to use as possible.

I created it because I wasn't really satisified with the apps on offer. Munrun is old and doesn't run on Macs. ChairMUN is non-free, closed-source, and lacks key features. CloudMUN is actually pretty cool from what I've seen, but it's also a non-free closed-source product, targetted at a Taiwanese audience.

Muncoordinated was built with a few key principles in mind:

  • It should reduce director burden as much as possible. Frequent and repetitive tasks should be able to be performed with minimal effort. It should pre-empt tasks, e.g.
val Pattern = "([a-cA-C])".r
def matchExample(x: AnyVal): Unit = {
x match {
case i: Int => "Matching on type"
case 1 => "Matching on a literal"
case 2 | 3 => "Matching on multiple literals"
case x if 0 until 10 contains x => "Matching with guard"
case ab@(a, b) => "Matching and destructuring a tuple, but keeping the original tuple bound to ab"
case x::xs => "Matching and destructuring a list"
sudo ln -s /Library/gurobi752/mac64/lib/libgurobi75.so ~/lib/libgurobi75.so\
sudo ln -s /Library/gurobi752/mac64/lib/libgurobi_g++4.2.a ~/lib/libgurobi_g++4.2.a\
sudo ln -s /Library/gurobi752/mac64/lib/libGurobiJni75.jnilib ~/lib/libGurobiJni75.jnilib\
sudo ln -s /Library/gurobi752/mac64/lib/libaes75.so ~/lib/libaes75.so\
sudo ln -s /Library/gurobi752/mac64/lib/libgurobi_c++.a ~/lib/libgurobi_c++.a\
sudo ln -s /Library/gurobi752/mac64/lib/libgurobi_stdc++.a ~/lib/libgurobi_stdc++.a