Skip to content

Instantly share code, notes, and snippets.

@shinout
shinout / LICENSE
Created September 21, 2011 16:15
Topological sort in JavaScript
Copyright 2012 Shin Suzuki<shinout310@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@matope
matope / NoSQLデータモデリング技法.markdown
Created April 16, 2012 03:35
NoSQLデータモデリング技法

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う

@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@SamyPesse
SamyPesse / README.md
Created May 24, 2016 22:34
Complete example of code highlight for Draft.js with Prism

How to test it?

Copy the prism.js file under examples/prism/ in Draft.js repository. Run npm install prismjs Then open it in your browser.

@okapies
okapies / mastodon-ostatus.md
Last active September 5, 2021 11:39
Mastodon OStatus API の叩き方

Mastodon が他のインスタンスと情報交換をする OStatus API の使い方。使ってるだけのユーザは知る必要がない裏側の話。

host-meta

Mastodon インスタンスに対して、RFC6415 が規定する /.well-known/host-meta というパスを要求すると以下の XML が返ってくる.

<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  <Link rel="lrdd" type="application/xrd+xml" template="https://[MASTODON_HOST]/.well-known/webfinger?resource={uri}"/>
</XRD>
@zombiezen
zombiezen / .profile
Last active November 15, 2023 07:34
zsh on Google Cloud Shell
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@tos-kamiya
tos-kamiya / py3-venv-activate-on-fish.md
Last active January 11, 2023 08:08
fishでpython3のvenvのactivateをする

fishでpython3のvenvを利用する方法

venv環境を作って入る (パスを設定した新しいシェルを作成する)

python3 -m venv ./venv
begin; set -lx PATH (realpath ./venv)/bin $PATH; fish; end

前書きとか

対象読者

Unityの殆どの機能を使ったことがある上級Unity開発者向けです。C# についてある程度理解している事を前提としています、またシェーダー最適化について初歩のCg言語の知識を要求します。

Chapter1: Persuing Performance Problems

ソフトウェアにおけるパフォーマンス計測は極めて科学的なプロセスで行います。最初にメモリ使用量やCPU使用率などの値の最大/最小値を計測します。 次に対象プラットフォームでの計測用シナリオ(最小の構成サンプル)を作り、ボトルネックを計測します。問題の箇所が特定できたら、その原因を見つけ出し、コードを書き換えて再計測を行うことを繰り返していきます。

もちろんゲーム開発は芸術的な側面を多く備えていますが、こういった地道なパフォーマンスチューニングを行うことは大切です。

@ksasao
ksasao / detect_marker.py
Last active December 10, 2023 02:38
ZOZOSUITのマーカーのIDを読み取るコードです。公開されている画像を元に独自に解析しているので、公式ではこのように処理しているかどうかは不明です。仕様等については https://twitter.com/ksasao/status/990779583682170881 のスレッドも参照してください。全身を読み取るコード https://twitter.com/ksasao/status/989842844243279872 ライセンスは Apache License 2.0 です。
import numpy as np
import random
import math
import cv2
from PIL import Image
import sys
def detect_markers(im):
markers = []
# 輪郭線抽出のための二値化