Skip to content

Instantly share code, notes, and snippets.

# 2nd July 2020
import numpy as np
import cv2
# use it if you wonna write video or ffmpeg
# from skvideo.io import FFmpegWriter
start = 1
duration = 10
fps = '30'
# 2nd July 2020
import numpy as np
import cv2
# use it if you wonna write video or ffmpeg
# from skvideo.io import FFmpegWriter
start = 1
duration = 10
fps = '30'
@QPeiran
QPeiran / push_data.js
Created May 8, 2020 05:00
Push data from "monitor sheet"
//
function extractInfo()
{
var current_sheet = SpreadsheetApp.openById("<MonitorSheetID>").getSheetByName("Monitor");
var array = []
for (var i = 2; i < 101; i++)
{
var value = current_sheet.getRange(i, 5).getValue();
if (value)
{
@QPeiran
QPeiran / validation.js
Created May 1, 2019 22:57
2 selection situations validation
//two pharse random -- 2/3
var A = ["R","R"], B = ["R","B"], C = ["B","B"];
var count = 0, result_ball1_red = 0, result_ball1and2_red = 0, result_ball1red_ball2blue = 0, result_ball1_blue = 0, result_ball1and2_blue = 0, result_ball1blue_ball1red = 0;
var randomBoxNumber, randomBallNumber, FirstBall, SecondBall;
for (count = 1; count <= 1000000; count++)
{
randomBoxNumber = Math.floor(Math.random() * 3 ) + 1;