Skip to content

Instantly share code, notes, and snippets.

Koutaro Chikuba mizchi

Block or report user

Report or block mizchi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View try-tfjs.ts
import "@babel/polyfill";
import * as tf from "@tensorflow/tfjs";
import "@tensorflow/tfjs-node-gpu"; // Intel Cuda の対応OSのみ有効
const fn = (a, b) => {
const n = Math.cos(a * Math.PI * 2) * b + Math.sin(b * Math.PI * 2) * a;
return a > b ? n : -n;
};
function buildModel() {
View e2e_parallel_runner.bash
#!/usr/bin/env bash
# ref. http://fahdshariff.blogspot.com/2014/02/retrying-commands-in-shell-scripts.html
retry() {
local -r -i max_attempts="$1"; shift
local -r cmd="$@"
local -i attempt_num=1
until $cmd
do
if (( attempt_num == max_attempts ))
then
View README.md

Minilink

comlink から proxy やらなんやら抜いたもの。 気が向いたら npm に投げる

使い方

// worker thread
import {expose} from './minilink'
View vue-precompiled-render.ts
import Vue from "vue";
import { createRenderer } from "vue-server-renderer";
import * as vueCompiler from "vue-template-compiler";
const renderer = createRenderer();
const directives = {};
export async function compile(
template: string,
View preact-code-evaluator.ts
import { h } from "preact";
import { useState, useEffect } from "preact/hooks";
import renderPreactToString from "preact-render-to-string";
import ts from "typescript";
import * as rollup from "rollup";
import virtual from "rollup-plugin-virtual";
async function renderToString(component: any, props: any) {
return renderPreactToString(h(component, props));
}
@mizchi
mizchi / bar_test.html
Last active Jul 24, 2019
karma + webpack + typescript settings
View bar_test.html
<script>
it("ok in html", (done) => {
done()
});
</script>
View Nondestructive_TypeScript.md

非破壊 TypeSctript

mizchi / TypeScript Meetup 2


About

  • mizchi / 竹馬光太郎
  • フロントエンドと Node.js
View tsmeetup-draft-wip2.md

非破壊 TypeSctript

mizchi / TypeScript Meetup 2


About Me

  • mizchi / 竹馬光太郎
  • フロントエンドと Node.js
View tsmeetup-draft-wip.md
  • イントロ
    • TypeScript コード品質を向上させて生産性を上げるもの
    • 導入時に頑張りすぎて苦労してるのをよく見る・解決したい
    • 同僚に書いてこいと言われた
  • TypeScript の型とは何か
    • 型アノテーションはドキュメント
    • 型は Lint
    • 型は IDE へのヒント
    • 型を通してJITと仲良く
View keymap.c
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
#define _L_BASE 0
#define _L_NUM 1
#define _L_FN 2
enum custom_keycodes {
QWERTY = SAFE_RANGE,
You can’t perform that action at this time.