Skip to content

Instantly share code, notes, and snippets.

View yumu19's full-sized avatar

Tsubasa Yumura yumu19

View GitHub Profile
#include<M5Stack.h>
// HC-SR04の値の読み出しと距離への変換は
// "超音波センサHC-SR04とArduinoで距離を測定する - Robo Station"
// https://rb-station.com/blogs/article/hc-sr04-arduino
// のサンプルコードを参考にしました
int TRIG = 22;
int ECHO = 35;
double duration = 0;
#include<M5Stack.h>
// HC-SR04の値の読み出しと距離への変換は
// "超音波センサHC-SR04とArduinoで距離を測定する - Robo Station"
// https://rb-station.com/blogs/article/hc-sr04-arduino
// のサンプルコードを参考にしました
int TRIG = 22;
int ECHO = 35;
double duration = 0;
import zmq
ctx = zmq.Context()
# The REQ talks to Pupil remote and receives the session unique IPC SUB PORT
pupil_remote = ctx.socket(zmq.REQ)
ip = '127.0.0.1' # Pupil Serverが稼働しているマシンのIPアドレス。このスクリプトを動かすPCでPupil Serverが稼働しているのであればローカルアドレスでOK
#ip = '10.124.52.242' # If you talk to a different machine use its IP.
port = 50020 # The port defaults to 50020. Set in Pupil Capture GUI.
pupil_remote.connect(f'tcp://{ip}:{port}')
#!/usr/bin/env python3
# 2020.08.17 Tsubasa Yumura 作成
# 2023.07.21 Tsubasa Yumura 作成
#
# ■これは何?
# EC2020実行委員(出版担当)の作業のために下記を実行するスクリプトです
# - 論文投稿フォームから著者情報をスクレイピングしTSVで保存
# - 著作権同意のスクリーンショットを取得
#
# ■前準備
@yumu19
yumu19 / RedisKeysSample.cs
Last active May 21, 2017 14:01
Sample C# Script File with TeamDev.Redis for Unity
// Working on Unity 5.6.1f1
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TeamDev.Redis;
public class RedisKeysSample : MonoBehaviour {
private RedisDataAccessProvider redis;
private string[] keys;
@yumu19
yumu19 / democamera.pde
Created September 22, 2016 15:58
プレゼンテーションのデモのときなどにWebカメラの映像を映すProcessingのプログラム(いろいろハードコーディング)
// This program needs library named 'Video'
import processing.video.*;
Capture video;
void setup() {
size(1280,960);
String[] cams = Capture.list();
video = new Capture(this, cams[1]);
video.start();
}
@yumu19
yumu19 / dockerBackup.rb
Created June 18, 2015 10:26
ruby script to backup(export) docker container
require 'clockwork'
include Clockwork
module Clockwork
@@rootDir = "/Users/yumu/dockerBackupDir/"
@@hourlyFormat = "%Y%m%d_%H%M"
@@dailyFormat = "%Y%m%d"
def getContainerNames
ps = `docker ps`.split("\n")
@yumu19
yumu19 / dress.pde
Created February 28, 2015 09:24
change color of dress (need dress.png file)
import controlP5.*;
ControlP5 ctls;
PImage img;
float bg_hue = 40.0;
float bg_sat = 0.1;
float bg_bri = 1.0;
float dress_hue = 0;
float dress_sat = 0.0;
@yumu19
yumu19 / a140.ws
Created February 26, 2015 16:37
whitespace script for output 140 times of 亞
@yumu19
yumu19 / saveCameraImage.pde
Last active August 29, 2015 14:14
Save Camera Image
import processing.video.*;
Capture cam;
PImage img;
String path;
String command;
int i;
void setup(){
size(640,384);
cam = new Capture(this, width, height, 10);