Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
{
"Browser History": [
{
"favicon_url": "",
"page_transition": "LINK",
"title": "31469 Christina Groves\nEast Victoria, MA 89888",
"url": "boyer-perkins.baker-dudley.williams.hansen-thompson.harvey-powell.org",
"client_id": "6968111a1a3f439899e5c0==",
"time_usec": 1630853352480226
},
class Point {
constructor(x, y) {
this.x = x
this.y = y
}
}
class ClockHand {
constructor(center, r, theta=0){
this.center = center
import logging
import cv2
import numpy as np
logger = logging.getLogger(__name__)
class Kuwahara:
@staticmethod
(() => {
class SearchEngine {
constructor(text, engine) {
this.text = text;
this.engine = engine;
}
static search(text, engine) {
window.open(new SearchEngine(text, engine).url);
}
get url() {
class rot {
static rot(vec, theta) {
let sina = Math.sin(theta),
cosa = Math.cos(theta);
let mat = [
[cosa, 0 - sina, 0],
[0, 1, 0, 0],
[sina, 0, cosa, 0],
[0, 0, 0, 1],
@tomowarkar
tomowarkar / __init__.py
Last active May 21, 2021 03:49
プロ野球試合結果
from .extractor import CacheExtractor, Extractor
from .npb_games import BaseballExtractor
from .npb_games_detail import BaseballDetailsExtractor
class Vec2 {
constructor(x, y) {
this.x = x;
this.y = y;
}
static random() {
return new Vec2(Math.random(), Math.random());
}
}
import p5 from "p5";
const round = (value: number, base: number) =>
Math.round(value * 10 ** base) / 10 ** base;
class Vec2 {
x: number;
y: number;
constructor(x: number, y: number) {
this.x = x;
@tomowarkar
tomowarkar / bubbles.js
Last active April 11, 2021 12:40
https://editor.p5js.org/ コピペで動かせるぞ
class RotMat2 {
constructor(angle) {
this.cosa = Math.cos(angle)
this.sina = Math.sin(angle)
}
apply(v) {
return new Vec2(
this.cosa * v.x - this.sina * v.y,
this.sina * v.x + this.cosa * v.y
)
//
class Matrix {
height: number;
width: number;
data: number[];
constructor(height: number, width: number) {
this.height = height;
this.width = width;
this.data = new Array(height * width).fill(0);