Skip to content

Instantly share code, notes, and snippets.

View azyobuzin's full-sized avatar

Takuya Sakurai azyobuzin

View GitHub Profile
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) の画像サイズを調べた
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
- 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>
@azyobuzin
azyobuzin / DftSimd.cs
Created June 13, 2019 17:27
DFT に SIMD を混ぜたけど速くならなかったので供養
public static float[] ForwardFloatSimd(IReadOnlyList<float> input)
{
if (input == null) throw new ArgumentNullException(nameof(input));
var inputArray = (float[])input; // TODO: 型検証
float[] factorVector = null;
if (Vector.IsHardwareAccelerated)
factorVector = new float[Vector<float>.Count * 2];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.