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
module Binary | |
# or MD5.module_eval(using Module.new{refine Class {~}...}) | |
INTEGER_SIZE = 32 | |
refine Integer do | |
def bit_rotate(bit_width=INTEGER_SIZE,shift=1) | |
raise ArgumentError if bit_width.negative? | |
shift = shift % bit_width | |
((self << shift) + (self >> (bit_width - shift) & ((1 << shift) - 1))) & ((1 << bit_width) - 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
require 'securerandom' | |
require 'matrix' | |
module RSA | |
module Calculator | |
def self.powmod(base, exp, mod) | |
return 1 if exp == 0 | |
exp.bit_length.times.inject(1) do |buf, i| | |
(buf ** 2) * (base ** exp[exp.bit_length - 1 - i]) % mod | |
end |
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 sys, os | |
import numpy | |
from PIL import Image | |
from PIL.ExifTags import TAGS | |
def get_exif(file): | |
try: | |
with Image.open(file) as im: |
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 num_bigint; | |
pub struct Combination { | |
pascal: Vec<Vec<num_bigint::BigUint>>, | |
} | |
impl Combination { | |
pub fn init() -> Combination { | |
use num_bigint::ToBigUint; |
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
学部 | 学科等 | 進学単位 | 段階 | 科類 | 定数 | |
---|---|---|---|---|---|---|
法学部 | 法学部 | 法学部 | 第一段階 | 文科一類 | 267 | |
法学部 | 法学部 | 法学部 | 第一段階 | 理科 | 4 | |
法学部 | 法学部 | 法学部 | 第一段階 | 全科類 | 12 | |
経済学部 | 経済学部 | 経済学部 | 第一段階 | 文科二類 | 200 | |
経済学部 | 経済学部 | 経済学部 | 第一段階 | 理科 | 7 | |
経済学部 | 経済学部 | 経済学部 | 第一段階 | 全科類 | 42 | |
文学部 | 人文学科(思想文化) | A群 | 第一段階 | 文科三類 | 39 | |
文学部 | 人文学科(思想文化) | A群 | 第一段階 | 全科類 | 9 | |
文学部 | 人文学科(歴史文化) | B群 | 第一段階 | 文科三類 | 16 |
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
[ | |
{ | |
"type": "A", | |
"day": "Mon", | |
"ampm": "AM", | |
"date": [ | |
"9/28", | |
"10/5", | |
"10/12", | |
"10/19", |
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 datetime | |
from os.path import exists | |
import pickle | |
from scipy.io.wavfile import read as read_wave | |
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
from matplotlib.ticker import IndexLocator, FuncFormatter | |
mpl.rcParams["agg.path.chunksize"] = 100_000 |
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
[ | |
{ | |
"semester/term": "S1S2", | |
"day": "Mon", | |
"AM/PM": "AM/PM", | |
"dates": [ | |
"4/5", | |
"4/19", | |
"4/26", | |
"5/10", |
OlderNewer