Skip to content

Instantly share code, notes, and snippets.

@DarinMao
DarinMao / ocr.md
Last active July 14, 2022 01:18
Google CTF 2022 Qualifier - ocr

Google CTF 2022 Qualifier - ocr

ocr was an easy-ish machine learning misc challenge from the Google CTF 2022 Qualifier.

Train our neural network to read handwritten letters! I'm sure with the newest technological advances, you'll be able to do it with a tiny network and just a handful of training images.

Attachment ocr.2022.ctfcompetition.com 1337

Neural Network Crash Course

Feel free to skip this section if you're already familiar with basic neural networks.

@DarinMao
DarinMao / code_args.py
Created April 27, 2021 14:25
function to get code object constructor arguments from a function
def code_args(func):
return (
func.__code__.co_argcount,
func.__code__.co_posonlyargcount,
func.__code__.co_kwonlyargcount,
func.__code__.co_nlocals,
func.__code__.co_stacksize,
func.__code__.co_flags,
func.__code__.co_code,
func.__code__.co_consts,
@DarinMao
DarinMao / MallCop.java
Created August 14, 2019 17:33
mallcop is a shit problem
import java.util.*;
import java.io.*;
import java.lang.*;
public class MallCop {
private static Graph graph;
private static int n;
private static int[] distLeaf;
private static int[] distStart;
private static int ans;
@DarinMao
DarinMao / psat.json
Last active October 15, 2018 01:48
questions list for meme site
[
{
"text": "Alexander Suh, one of the primary officers of Dev Club, assigned club members to [u]create[/u] a PSAT website.",
"choices": [
"creates",
"writing",
"PANIC because the sentence looks correct to you but \"NO CHANGE\" is not an option",
"DELETE Alexander Suh"
],
"correct": 3,
@DarinMao
DarinMao / ionflip.css
Last active October 6, 2018 18:39
Flips ion when applied
/*
Flips Ion!
Sets html height and body min-height so footer is in the right place
Margin fixes the navbar
transform: scaleX(-1) is the flipping
*/
html {
height: 100%;
}