This file contains 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>webgpu-test</title> | |
</head> | |
<body> | |
<canvas id="canvas"></canvas> | |
<script> |
This file contains 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 python | |
# -*- coding:utf-8 -*- | |
import math | |
from PIL import Image | |
class Point : | |
def __init__ (self, x, y) : |
This file contains 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 python | |
# -*- coding:utf-8 -*- | |
import binascii | |
if __name__ == '__main__' : | |
s = 'e3808ce3828ce3819fe3819de381aee5a0b4e68' + \ | |
'980e381afe38081e381bee3828be381a7e5a4a9' + \ |
This file contains 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 python | |
# -*- coding:utf-8 -*- | |
def display_towers(towers): | |
for i in range(3): | |
tower_string = ', '.join(['{0:2d}'.format(num) for num in towers[i]]) | |
print 'tower {0} | {1}'.format(i, tower_string) | |
This file contains 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 python | |
# -*- coding:utf-8 -*- | |
def display_towers(towers): | |
for i in range(3): | |
tower_string = ', '.join(['{0:2d}'.format(num) for num in towers[i]]) | |
print 'tower {0} | {1}'.format(i, tower_string) | |
This file contains 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
def drawLine (point1, point2) : | |
points = [] | |
try : | |
slope = 1.0 * (point2.y - point1.y) / (point2.x - point1.x) | |
if abs(slope) > 1.0 : | |
top, bottom = (point1, point2) if point1.y > point2.y else (point2, point1) | |
for y in range(bottom.y, top.y + 1) : | |
progress = 1.0 * (y - bottom.y) / (top.y - bottom.y) | |
x = int(bottom.x + progress * (top.x - bottom.x)) | |
points.append(Vector2(x, y)) |
This file contains 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>Web Worker 99</title> | |
</head> | |
<body> | |
<script type="text/javascript"> |
This file contains 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
object SysEnv { | |
def main(args: Array[String]) { | |
sys.env.getOrElse("USER", "default") match { | |
case value: String => | |
println(value) | |
case _ => | |
println("not string") | |
} | |
} |
This file contains 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
package process | |
import scala.sys.process._ | |
/** | |
* Created by shogo on 2016/10/19. | |
*/ | |
object ProcessSample { | |
def main(args: Array[String]) { |
This file contains 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
package process | |
import scala.sys.process._ | |
/** | |
* Created by shogo on 2016/10/19. | |
*/ | |
object ProcessSample { | |
def main(args: Array[String]) { |
NewerOlder