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 csv; | |
use std::fs::File; | |
use itertools::Itertools; | |
#[derive(Clone, Copy, Debug, PartialEq)] | |
enum Operator { | |
Add, | |
Sub, | |
Mult, | |
Div |
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 <opencv2/core/core.hpp> | |
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <iostream> | |
#include <vector> | |
#include <array> | |
#include <stdio.h> | |
using namespace std; | |
using namespace cv; |
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 requests | |
from bs4 import BeautifulSoup | |
print("伝票番号を入力してください") | |
denpyo_id = input() | |
response = requests.post('http://toi.kuronekoyamato.co.jp/cgi-bin/tneko', data={'number01':denpyo_id }) | |
soup = BeautifulSoup(response.text, "html.parser") |
Loading
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 socket | |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: | |
port = 8080 | |
ip = '127.0.0.1' | |
# サーバ/ポートを指定 | |
s.connect((ip, port)) | |
while True: | |
mesg = s.recv(1024) # メッセージを受信 (https://github.com/terakun/quoridor_judgeの入力形式に対応するバイト列が送られてくる) | |
print(mesg) |
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
#!/bin/sh | |
IMAGE=paperist/alpine-texlive-ja | |
exec docker run --rm -i --user="$(id -u):$(id -g)" --net=none -v "$PWD":/data "$IMAGE" "$@" |
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 numpy as np | |
from scipy.stats import t as student_t | |
from matplotlib import pyplot as plt | |
from matplotlib.backends.backend_pdf import PdfPages | |
def student(n): | |
samples = np.random.normal(0,1,n) | |
mean = np.mean(samples) | |
unbiased_var = np.var(samples, ddof=1) | |
return np.sqrt(n/unbiased_var)*mean |
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
#!/usr/bin/python | |
# coding: UTF-8 | |
# 実行ファイルはコマンドライン引数としてパラメータを受け取り,目的関数値のみを標準出力に出力するものとする | |
# $ ./a.out 1.2 10 | |
# 42 | |
# configファイルには | |
# [varname] [vartype] [range] | |
# を書いておく |
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
extern crate rand; | |
use rand::{thread_rng, Rng}; | |
fn end(board: &Vec<i32>) -> usize { | |
// 縦 | |
for i in 0..3 { | |
let mut sum = 0; | |
for j in 0..3 { | |
sum = sum + board[i * 3 + j]; | |
} |
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
CXX = g++ | |
FLAGS = -std=c++1z -Ofast -march=native | |
INCLUDES = | |
LIBS = | |
TARGET = main | |
SRCS = main.cc | |
OBJS = $(patsubst %.cc,%.o,$(SRCS)) | |
.cc.o: | |
$(CXX) $(FLAGS) $(INCLUDES) -c $< -o $@ |
NewerOlder