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
use std::io; | |
use std::time::Instant; | |
// 美術館(パズル)ソルバ | |
fn read_line() -> String{ | |
let mut s = String::new(); | |
io::stdin().read_line(&mut s).unwrap(); | |
s.trim().to_string() | |
} |
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
public static final int N = 12; | |
void setup() { | |
size(700, 335); | |
//size(1400, 670); | |
// 正N角形の座標 | |
FloatList xs = new FloatList(); | |
FloatList ys = new FloatList(); | |
int r = 1404; |
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 random | |
lines = [] | |
# 直前3文字から次の文字を予測する | |
n = 3 | |
# 1行に一文が並んだ文章 | |
with open("gingatetsudono_yoru.txt","r") as f: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
using System; | |
using System.Drawing; | |
class Program | |
{ | |
static void Main() | |
{ | |
Console.WriteLine("input file path"); | |
var input = Console.ReadLine(); | |
Console.WriteLine("input the number of copying"); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 cv2 | |
import numpy as np | |
im = cv2.imread("neri.jpeg") | |
rate = 0.1 | |
ret = (im*rate+255*(1-rate)).astype(np.uint8) | |
w,h,c=im.shape | |
mask = (np.arange(w) / 8)%2 == 0 |
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 <iostream> | |
#include <queue> | |
#include <vector> | |
#include <algorithm> | |
#include <map> | |
#include <string> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <ctime> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <SoftwareSerial.h> | |
#include "IM920Driver.h" | |
// シリアル通信に使うRX,TXピン | |
#define IM920_RX_PIN 10 | |
#define IM920_TX_PIN 11 | |
SoftwareSerial IM920Serial(IM920_RX_PIN, IM920_TX_PIN); | |
// SoftwareSerialのポインタを与える | |
IM920Driver im920(&IM920Serial); |