This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
class Token(object): | |
symbol = None | |
@classmethod | |
def can_read(cls, line, index): | |
return line[index] == cls.symbol | |
@classmethod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import argparse | |
import tensorflow as tf | |
class UVPQ: | |
def __init__(self, w, h, p, q): | |
indices_x = tf.range(w, dtype=tf.int32) | |
indices_y = tf.range(h, dtype=tf.int32) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>AlphaTrick</title> | |
</head> | |
<body> | |
<div> | |
<div>when bg is black: <input type="file" id="black"/></div> | |
<div>when bg is white: <input type="file" id="white"/></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>WebGL Image Processing</title> | |
</head> | |
<body> | |
<input style="display:block;" type="file" id="texture"/> | |
<canvas style="display:block;" id="canvas" width="512" height="512"></canvas> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2014 Google Inc. All rights reserved. | |
// | |
// 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using UnityEngine.Assertions; | |
using System.Collections.Generic; | |
using System.IO; | |
public class BlackWhite | |
{ | |
[MenuItem("Assets/Compose")] | |
static void Compose() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
#extension GL_OES_standard_derivatives : enable | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
using System.Linq; | |
using System.Collections.Generic; | |
public class TerrainEditor : EditorWindow | |
{ | |
int moveX = 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
using System.Linq; | |
/// <summary> | |
/// Touchのラッパー的なクラス。 | |
/// </summary> | |
public struct WrappedTouch | |
{ | |
public Touch original { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstdlib> | |
#include <cstdint> | |
#include <cmath> | |
#include <memory> | |
#include <fstream> | |
#include <sstream> | |
extern "C" { | |
#include <ft2build.h> |
NewerOlder