Skip to content

Instantly share code, notes, and snippets.

View monhime's full-sized avatar
:octocat:
進捗ダメです

charter monhime

:octocat:
進捗ダメです
  • EEIS, The University of Tokyo.
  • Japan
View GitHub Profile
@monhime
monhime / example5.tex
Last active January 14, 2020 12:42
Circuitikzの使用例5
\documentclass[10pt, a4paper, titlepage, uplatex]{jsarticle}
\usepackage{amsmath,ams symb}
\usepackage[dvipdfmx]{graphicx}
\usepackage{circuitikz}
\begin{document}
\begin{figure}[htbp]
\begin{center}
\begin{circuitikz}[american currents]
\draw(0,0)
@monhime
monhime / example6.tex
Created January 14, 2020 12:43
Circuitikzの使用例6
\documentclass[10pt, a4paper, titlepage, uplatex]{jsarticle}
\usepackage{amsmath,ams symb}
\usepackage[dvipdfmx]{graphicx}
\usepackage{circuitikz}
\begin{document}
\begin{figure}[htbp]
\begin{center}
\begin{circuitikz}[american currents]
\draw(0,0)
@monhime
monhime / example7.tex
Created January 14, 2020 12:46
Circuitikzの使用例7
\documentclass[10pt, a4paper, titlepage, uplatex]{jsarticle}
\usepackage{amsmath,ams symb}
\usepackage[dvipdfmx]{graphicx}
\usepackage{circuitikz}
\begin{document}
\begin{figure}[htbp]
\begin{center}
\begin{circuitikz}[american currents]
\draw (0,0)
\documentclass[10pt, a4paper, titlepage, uplatex]{jsarticle}
\usepackage{amsmath,ams symb}
\usepackage[dvipdfmx]{graphicx}
\usepackage{circuitikz}
\begin{document}
\begin{figure}[htbp]
\begin{center}
\begin{circuitikz}[american currents]
\draw(0,0)
@monhime
monhime / access_parse.m
Created January 19, 2020 01:00
検索流入の解析(線形回帰)
%% table型変数accessのデータ列の名前と内容
% day: データ最初の日を1として1, 2, 3,...と続く.INIT_DAYからLAT_DAYまでを用いる
% article: day日目の累積記事数
% Search: day日目の検索流入数(ユーザ数)
% all: 全ユーザ数(今回は用いないので無くて良い)
%% 初期設定
INIT_DAY = 130; % 後半の近似に用いる最初の日
LAST_DAY = 224; % 最後の日
@monhime
monhime / access_parse4.m
Last active January 21, 2020 00:11
検索流入の解析(130日目以降,線形近似とデータ適合)
%% 初期設定
INIT_DAY = 130; % 後半の近似に用いる最初の日
LAST_DAY = 225; % 最後の日
%% 定義
% 非線形モデル式
% k(1): K, k(2): p, k(3): T, k(4):a(ズレ補償)
f3 = @(k,x) k(1)*(0.5*k(2)*x.^2-k(3)*x)+k(4);
% 各パラメータの初期値
k0 = [0.4, 0.5, -1, 0];
@monhime
monhime / tweet334.m
Last active March 8, 2020 01:03
コンマ秒の精度でThingSpeak経由で自動ツイート
%% このプログラムについて
% api_keyを取得した自分のapi_keyに書き換えてください
%% 時間設定
% テスト,301,334,448でのPOSTのタイミング
margin = [1.138,1.138,1.138,1.138];
%% 時刻の指定
today_year = year(datetime('now'));
@monhime
monhime / rank334_hist.m
Last active March 9, 2020 22:24
POSTからツイートまでの時間差の分析
%% 計算
% POSTからツイートまでの時間差のベクトル
% 除外した外れ値:2.079s(301)
% 上から301,334,448(今後各競技ごとに分けたい時用に分けておく)
r = [1.211, 1.178, 1.251,1.232,...
1.159, 1.018, 1.139,1.293,1.149,...
1.158, 1.183, 1.102,1.249,1.211];
% ヒストグラム・確率分布を表示
bin = round(log2(length(r))+1); % スタージェスの公式
@monhime
monhime / ABC162C.gyp
Created April 13, 2020 03:10
ABC162 C問題 解答
import sys
import math
from functools import reduce
def input(): return sys.stdin.readline().rstrip()
def gcd(*numbers):
return reduce(math.gcd, numbers)
def main():
k=int(input())
sum=0
for i in range(1,k-1):
@monhime
monhime / ABC162B.gyp
Last active April 13, 2020 03:10
ABC162 B問題 解答
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
n=int(input())
sum=0
for i in range(1,n+1):
if i%3!=0 and i%5!=0:sum+=i
print(sum)
if __name__=='__main__':
main()