Skip to content

Instantly share code, notes, and snippets.

Avatar

Takuya Sakurai azyobuzin

View GitHub Profile
View di-container.test.ts
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")
View DatasetOverview.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View compose.inc.yml
- name: Create directory
file:
path: /var/src/{{ compose_name }}
state: directory
owner: root
group: docker
- name: Copy directory
synchronize:
src: '{{ compose_name }}/'
View flifdec.pu
@startuml
package rac {
class RacInput24 {
+ bool read_12bit_chance(uint16_t)
+ bool read_bit()
}
}
package symbol {
class UniformSymbolCoder {
View PetriNetReachability.cs
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
{
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TODO になる予定</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="app">Loading</div>
View VeronaLike.cs
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 Jul 15, 2019
F# で Parallel DEVS を実装したサンプル
View TrafficLight.html
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 Jun 13, 2019
DFT に SIMD を混ぜたけど速くならなかったので供養
View DftSimd.cs
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];
View Chromagram.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.