Skip to content

Instantly share code, notes, and snippets.

View azyobuzin's full-sized avatar

Takuya Sakurai azyobuzin

View GitHub Profile
internal static byte[] Sha1(IEnumerable<byte> message)
{
Func<uint, uint, uint, uint> f00 = (b, c, d) => (b & c) | ((~b) & d);
Func<uint, uint, uint, uint> f20 = (b, c, d) => b ^ c ^ d;
Func<uint, uint, uint, uint> f40 = (b, c, d) => (b & c) | (b & d) | (c & d);
var f60 = f20;
var K = new uint[]
{
0x5A827999,
import { createContainerBuilder } from "./di-container"
test.concurrent("no dependency", () => {
const container = createContainerBuilder()
.add("a", () => ({ a: "Hello" }))
.add("b", () => ({ b: "World" }))
.build()
expect(container.get("a").a).toBe("Hello")
expect(container.get("b").b).toBe("World")
@azyobuzin
azyobuzin / DatasetOverview.ipynb
Created December 9, 2020 07:07
[Anime Face Dataset](https://www.kaggle.com/splcher/animefacedataset) の画像サイズを調べた
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@azyobuzin
azyobuzin / Dockerfile
Last active November 19, 2020 04:20
Wine 上で Mono を動かすやつ
FROM ubuntu:17.04
# apt-get update がクソ遅いので日本サーバーに変更
RUN sed -i 's|//archive\.ubuntu\.com|//jp\.archive\.ubuntu\.com|g' /etc/apt/sources.list
RUN dpkg --add-architecture i386 && \
apt-get update -y && \
apt-get install -y wget apt-transport-https software-properties-common && \
wget -O - https://dl.winehq.org/wine-builds/Release.key | apt-key add - && \
apt-add-repository -y https://dl.winehq.org/wine-builds/ubuntu/ && \
- name: Create directory
file:
path: /var/src/{{ compose_name }}
state: directory
owner: root
group: docker
- name: Copy directory
synchronize:
src: '{{ compose_name }}/'
@startuml
package rac {
class RacInput24 {
+ bool read_12bit_chance(uint16_t)
+ bool read_bit()
}
}
package symbol {
class UniformSymbolCoder {
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
{
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TODO になる予定</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="app">Loading</div>
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace VeronaLike
{
public delegate void WhenCallback<T>(ref T value);
public class Cown<T>
@azyobuzin
azyobuzin / TrafficLight.html
Last active July 15, 2019 19:26
F# で Parallel DEVS を実装したサンプル
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>TrafficLight</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>