Skip to content

Instantly share code, notes, and snippets.

View chajath's full-sized avatar

In-Ho Yi chajath

  • Google
  • Seattle, WA
View GitHub Profile
pex: Selecting runtime interpreter :: Testing /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3.8 can resolve PEX at /Users/inho/.cache/pants/named_caches/pex_root/unzipped_pexes/ab6096279f40864812a3044e161a0fc435a080b6 :: Resolving gunicpex: Unresolved requirements:
pex: - SQLAlchemy>=1.3.0
pex: - PyYAML>=3.11
pex: - PyYAML<7,>=5.1
pex: - cffi>=1.12
pex: - PyYAML>=3.10; extra == "yaml"
pex: - SQLAlchemy>=0.8.0
pex: - SQLAlchemy>=1.2.0
pex: - SQLAlchemy<1.5
pex: - lazy-object-proxy
// ==UserScript==
// @name NewNetflixZoom2
// @namespace amazon.tld
// @version 0.1
// @description try to take over the world! ??? Profit.
// @author Anonymouse
// @include https://www.netflix.com/*
// @grant none
// ==/UserScript==
@chajath
chajath / Netflix Zoom2.user.js
Last active April 17, 2022 21:36 — forked from dazoe/Netflix Zoom.user.js
Zoom netflix videos by using "=" and "-"
// ==UserScript==
// @name Amazon Zoom2
// @namespace amazon.tld
// @version 0.1
// @description try to take over the world! ??? Profit.
// @author Anonymouse
// @include https://www.amazon.com/*
// @include https://www.youtube.com/*
// @grant none
// ==/UserScript==
@chajath
chajath / TreesAndBrackets.java
Created April 11, 2018 00:06
SRM 731 Div 1 Easy
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
class Tree {
List<Tree> branches;
Tree() {
this.branches = new ArrayList<>();
@chajath
chajath / TheFlippingGame.java
Created April 10, 2018 01:35
TheFlipping Game (Single Round Match 732 Round 1 - Division I, Level One)
import java.util.*;
import java.util.stream.Collectors;
enum Tile {
BLACK,
WHITE,
EMPTY
}
class Board {
;;;+':';;;:;;;;;++';;;;;+:+;;+:+;;;;;;;;;'';+;#+#'+++'+'+++'#''';#+;;'#;;';;;#+;'+++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;'''''+++''++++++++++'''''''';;;;;;;;;;;;;;;;;;
;;#++:';;;;;;';;;++;;;;;+:+'+;'';;+;;;++;+:#':++#;'+:+':+#':#;;###'##:##:+'+;++;'';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;''''''+##++##+#####++'''''''''';;;;;;;;;;;;;;;;
;;;;+:#''+;+::'#':+;;;;;+:;':'+;;';++:;+:'###:#;'###:++:+;+:+';';'#+;:#+:+;';+';'';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;'''''''+#+';''++'+##++'''''''''''';;;;;;;;;;;;;;
';;;#:##;;+;#+:##:+;;;;;':''+:';;+:+#+'+#':'#:+;;+;+:++:+;+:#';+;#:##:##:+++:'#;;+'#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;''''++;;;;;''''+++'''''''''''''';;;;;;;;;;;;;
';;;#:+:+:'++;:++:+;;;;;':;;;#:;'';;++'+'#';#:;+;;'';;':;;+:;;:;+#:;+;''++#+++##+##;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;';'''+';;'+++++++++'''''''''''''''';;;;;;;;;;;
+;;;+:+:#:#:+#:+#:
import java.util.*;
// https://community.topcoder.com/stat?c=problem_statement&pm=14218&rd=16708
public class Quacking {
private static char[] QUACK = {'q', 'u', 'a', 'c', 'k'};
class DuckMachine {
int currentState = 0;
boolean accept(char nextSound) {
if (QUACK[currentState] == nextSound) {
currentState = (currentState + 1) % 5;
@chajath
chajath / AlmostFibonacciKnapsack.java
Last active April 28, 2016 12:21
SRM 687 DIV 1 AlmostFibonacciKnapsack
import java.util.*;
import java.math.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import static java.lang.Math.*;
public class AlmostFibonacciKnapsack {
Map<Integer, Long> memoizedAFibo = new HashMap<Integer, Long>() {{
put(1, 2L);
package asia.blip.chocolateeasy
object ChocolateDividingEasy {
def findLowest(choco:Array[String], width:Int, height:Int, s:(Int, Int, Int, Int)): Int = {
s match {
case (x1, x2, y1, y2) =>
(
for(
xrange <- List((0,x1),(x1,x2),(x2,width));
/*
The MIT License (MIT)
Copyright (c) 2014 In-Ho Yi (chajath@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is