Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomoyuki Nohara peace098beat

View GitHub Profile
@peace098beat
peace098beat / python
Created May 18, 2019
Pythonのヴァージョン確認
View python
import sys
# Check Python Version
if sys.version_info.major < 3:
sys.stderr.write('Please use python 3.x\n')
sys.stderr.write(
'Your python version is as following:{}\n'.format(sys.version))
exit()
View webgl.sample2.js
<!DOCTYPE html>
<html>
<body>
<style type="text/css">
body {
border: 1;
background-color: gray;
}
View webgl.sample1.js
<!DOCTYPE html>
<html>
<body>
<style type="text/css">
body {
border: 1;
background-color: gray;
}
@peace098beat
peace098beat / webgl-sample.js
Created Nov 16, 2018
three.js WebGLのAPIを直接呼び出す形でコー
View webgl-sample.js
var utils;
(function (utils) {
/**
* 画像からピクセルカラー値を取得するユーティリティクラスです。
* @auther Kentaro Kawakatsu
*/
var ImageColorPicker = (function () {
function ImageColorPicker() {
}
ImageColorPicker.init = function ($canvas) {
View magma.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/89/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/stats.js/r16/Stats.min.js"></script>
<script src="js/controls/OrbitControls.js"></script>
<script src="js/loaders/TDSLoader.js"></script>
@peace098beat
peace098beat / file0.txt
Created Nov 2, 2018
AWS LightsailでGitlab環境をワンクリックで構築 (2018年11月) ref: https://qiita.com/peace098beat/items/3ac45e15e60fe6fd1b6f
View file0.txt
CPU: 2 cores is the recommended number of cores and supports up to 500 users
Memory: 8GB RAM is the recommended memory size for all installations and supports up to 100 users
@peace098beat
peace098beat / 20180205.php
Created Feb 6, 2018
クラスオブジェクトの洗い出し
View 20180205.php
<?php
declare(strict_types=1); // 型チェック
/**
* 残高を格納するクラス
*/
class Balance
{
View ticker.php
<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function (){
}
@peace098beat
peace098beat / download_csv_php.php
Created Dec 23, 2017
BTCのチャートデータの取得
View download_csv_php.php
<?php
/*
(使い方)
php download_csv_php.php
*/
// $r = file_get_contents("assets.json");
$res = file_get_contents("https://api.cryptowat.ch/assets/btc");
View s3_upload.py
def s3_upload(file_name:str):
import boto3
print("s3 ", file_name)
s3_client = boto3.client('s3')
bucket_name = 'nohara-dnn-workspace'
s3_client.upload_file(file_name, bucket_name, "dataset/"+Path(file_name).name)
You can’t perform that action at this time.