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
#Requires AutoHotkey v2.0 | |
;; | |
;; An autohotkey script that provides emacs-like keybinding on Windows | |
;; | |
;; global constants | |
DEBUG_MODE := 0 | |
;; global variables |
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
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import numpy as np | |
from matplotlib.patches import Ellipse | |
from sklearn.linear_model import LinearRegression | |
from sklearn.metrics import r2_score | |
def plot_iris_petal_scatter_with_regression(): | |
""" |
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
from p5 import * | |
import random | |
width = 1280 | |
height = 720 | |
circle_count = 500 | |
circles = [] | |
def setup(): | |
size(width, height) |
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
from p5 import * | |
import random | |
width = 1280 | |
height = 720 | |
circle_count = 400 | |
circles = [] | |
def setup(): | |
size(width, height) |
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
/* | |
* Markdown PDF CSS | |
*/ | |
body { | |
/* font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif, "Meiryo";*/ | |
font-family: 'Roboto Mono', 'Noto Sans JP', sans-serif; | |
/* font-size: 14px; */ | |
/* padding: 0 12px; */ | |
padding: 0 12.5%; |
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
int val = 123; // 値を代入 | |
cout << "val: " << val << endl; // 値を表示 | |
cout << "&val: " << &val << endl; // 値が格納されているアドレスを表示 | |
int* ptr; // ポインタを作成 | |
ptr = &val; // ポインタにアドレスを格納 | |
cout << "ptr: " << ptr << endl; // 値が格納されているアドレスを表示 | |
cout << "*ptr: " << *ptr << endl; // ポインタに格納された値を表示 | |
int* intPtr = new int(); // Int型値を格納する領域をメモリーに新規生成 |
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
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
colorMode(HSB, 360, 100, 100, 100); | |
locationX = width / 2; | |
locationY = height / 2; | |
velocityX = random(-50, 50); | |
velocityY = random(-50, 50); | |
} | |
function draw() { |
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
#include "ofApp.h" | |
void ofApp::setup() { | |
} | |
void ofApp::update() { | |
for (int i = 0; i < location.size(); i++) { | |
location[i] += velocity[i]; | |
if (location[i].x < 0 || location[i].x > ofGetWidth()) { | |
velocity[i].x *= -1; |
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
#include "ofApp.h" | |
void ofApp::setup() { | |
} | |
void ofApp::update() { | |
for (int i = 0; i < location.size(); i++) { | |
location[i] += velocity[i]; | |
if (location[i].x < 0 || location[i].x > ofGetWidth()) { | |
velocity[i].x *= -1; |
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
#include "ofApp.h" | |
void ofApp::setup() { | |
locationX = ofGetWidth() / 2.0; | |
locationY = ofGetHeight() / 2.0; | |
velocityX = ofRandom(-10, 10); | |
velocityY = ofRandom(-10, 10); | |
} | |
void ofApp::update() { |
NewerOlder