Skip to content

Instantly share code, notes, and snippets.

@ale64bit
ale64bit / categories.go
Created May 19, 2024 16:55
category EN translation for foxwq tsumego
var catTranslation = map[string]string{
// Opening
"初级-三三": "3-3 Point : Beginner", // https://senseis.xmp.net/?33Joseki
"中级-三三": "3-3 Point : Intermediate", // https://senseis.xmp.net/?33Joseki
"初级-小目小飞挂": "3-4 Point, Low Approach : Beginner", // https://senseis.xmp.net/?34PointLowApproach
"中级-小目小飞挂": "3-4 Point, Low Approach : Intermediate", // https://senseis.xmp.net/?34PointLowApproach
"高级-小目小飞挂": "3-4 Point, Low Approach : Advanced", // https://senseis.xmp.net/?34PointLowApproach
"初级-小目高挂": "3-4 Point, High Approach : Beginner", // https://senseis.xmp.net/?34PointHighApproach
"中级-小目高挂": "3-4 Point, High Approach : Intermediate", // https://senseis.xmp.net/?34PointHighApproach
"高级-小目高挂": "3-4 Point, High Approach : Advanced", // https://senseis.xmp.net/?34PointHighApproach
@ale64bit
ale64bit / play1n.cc
Last active April 17, 2024 08:53
Play 1xN Go minmax dirty and possibly buggy implementation
#include <algorithm>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
@ale64bit
ale64bit / foxwq_se.cpp
Created December 19, 2023 14:16
Using the foxwq score estimator in a standalone Windows program
#include <windows.h>
#include <iostream>
#include <vector>
#include <tuple>
#include <algorithm>
using namespace std;
enum Color : int {
kBlack = 1,
@ale64bit
ale64bit / a.ml
Created May 27, 2019 18:00
tagless final?
module type Types = sig
type 'dv repr
type basic
type compound
val name : string -> basic repr
val arr : int -> basic repr -> basic repr
@ale64bit
ale64bit / eval.py
Created October 25, 2016 19:44
compute cosine similarity for Inception bottleneck output of two images
import sys
import os.path
import numpy as np
import tensorflow as tf
from tensorflow.python.framework import graph_util
from tensorflow.python.framework import tensor_shape
from tensorflow.python.platform import gfile
BOTTLENECK_TENSOR_NAME = 'pool_3/_reshape:0'
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
final static int INF = Integer.MAX_VALUE>>1;
@ale64bit
ale64bit / Main.java
Created May 30, 2016 19:03
Timus 1846
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Map;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.Queue;
import java.util.ArrayDeque;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main implements Runnable {
import akka.actor._
import akka.persistence.PersistentActor
import akka.persistence.inmemory.query.journal.scaladsl.InMemoryReadJournal
import akka.persistence.query.{EventEnvelope, PersistenceQuery}
import akka.stream.scaladsl.Sink
import akka.stream.{ActorMaterializer, ActorMaterializerSettings}
import akka.testkit.{TestKit, TestProbe}
import com.typesafe.config.ConfigFactory
import org.scalatest._
n = int(raw_input('')) # read how many input strings follow next
for i in range(0, n): # remember, the interval [a, b] is from a to b-1
s = raw_input('') # read current line
print s # do something with it. It can be printing it, or something more complex.
# Here, you can do what the exercise requires and then print it out.