Skip to content

Instantly share code, notes, and snippets.

View michaelee's full-sized avatar

Michael Lee michaelee

View GitHub Profile
@michaelee
michaelee / mp4-test.http
Created November 8, 2023 16:06
Test HTTP calls for MP4 Battleship REST API
@hostname = 165.227.117.48
###
POST http://{{hostname}}/register
Content-type: application/json
{
"username": "michael",
"password": "aaa"
@michaelee
michaelee / main.dart
Created September 27, 2023 18:10
periwinkle-branch-3225
import 'package:collection/collection.dart';
import 'dart:math';
class Dice {
final List<int?> _values;
final List<bool> _held;
Dice(int numDice)
: _values = List<int?>.filled(numDice, null),
@michaelee
michaelee / main.dart
Created September 14, 2023 16:55
ensorcelled-sparkle-0927
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
a
about
above
after
again
against
all
am
an
and
# team members: Michael Lee & Jane Doe
# picobot rules follow.
@michaelee
michaelee / naive_bayes.py
Created November 13, 2015 14:43
CS 100 Naive Bayes Demo
import csv
import math
from pprint import pprint
CLASS_FIELD = 'Survived'
FIELD_SUMMARY_TYPES = {
'Sex': 'bin_prob',
'Age': 'mean_stdev',
'Pclass': 'bin_prob',
#
# js-scheme-0.4 is here: http://code.google.com/p/js-scheme/
#
diff -urN js-scheme-0.4.orig/.htaccess js-scheme-0.4-offline/.htaccess
--- js-scheme-0.4.orig/.htaccess 1970-01-01 09:00:00.000000000 +0900
+++ js-scheme-0.4-offline/.htaccess 2010-04-25 17:10:52.000000000 +0900
@@ -0,0 +1 @@
+AddType text/cache-manifest .manifest
diff -urN js-scheme-0.4.orig/cache.manifest js-scheme-0.4-offline/cache.manifest
int i = 1,
fact = 1;
// Invariant (fact == i!) is true here
while (i<N) {
i = i + 1;
fact = fact * i;
// Invariant (fact == i!) is true here
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
get_header();
?>
<div id="content" class="narrowcolumn">
html, body {
padding: 0;
margin: 0;
height: 100%; /* so that the page is "defined" to be 100% */
}
#page {
position: relative;
min-height: 100%; /* this way the page div stretches to occupy even a short page */
}
#content {