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
# -*- coding: utf-8 -*- | |
from requests_oauthlib import OAuth1 | |
import requests | |
import json | |
from datetime import datetime,timedelta | |
import secret | |
def streaming(): | |
consumerKey=secret.twDict['consumer_key'] | |
consumerSecret=secret.twDict['consumer_secret'] |
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 <vector> | |
#include <algorithm> | |
#include <cmath> | |
#include <cstdio> | |
#include <cstdlib> | |
using namespace std; | |
typedef long double ld; | |
//////////////////////////////////////////////////////////////////////// |
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 | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
import random | |
import math | |
###################################### | |
#h^5 order | |
h=0.05 | |
n=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
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
import numpy as np | |
import random | |
#parameter | |
n = 10 | |
mu = 10.0 | |
p_0 = 0.01 |
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
# -*- coding: utf-8 -*- | |
import json | |
import datetime | |
import os | |
def loadSchedule(): | |
f = open('schedule.json','r') | |
pDict = json.load(f) | |
f.close() | |
d = datetime.datetime.now() |
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
# -*- coding: utf-8 -*- | |
from requests_oauthlib import OAuth1 | |
import requests | |
import json | |
import re | |
from datetime import datetime,timedelta | |
import secret | |
def streaming(minutes): |
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> | |
long long dfs(int pos,int n,bool crd[][100],int y,int x){ | |
if(pos==n) return 1; | |
int dy[]={0,1,0,-1}; | |
int dx[]={1,0,-1,0}; | |
long long res=0; | |
for(int k=0;k<4;k++){ | |
int yk=y+dy[k]; | |
int xk=x+dx[k]; |
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
//Ford-Fulkerson's algorithm | |
struct edge{int to,cap,rev;}; | |
const int INF=1e9; | |
//g[e.to][e.rev] で逆辺を操作できる | |
void addEdge(vector<vector<edge> > &g,int from,int to,int cap){ | |
g[from].push_back((edge){to,cap,(int)g[to].size()}); | |
g[to].push_back((edge){from,0,(int)g[from].size()-1}); | |
} | |
int dfs(vector<vector<edge> > &g,vector<bool> &used,int v,int t,int f){ |
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
(define (min x y) | |
(cond | |
((> x y) y) | |
((= x y) x) | |
((< x y) x) | |
) | |
) | |
(define (3-min x y z) | |
(min |
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
(define (square x) (* x x)) | |
(define (abs x) | |
(if (< x 0) | |
(- x) | |
x | |
) | |
) | |
(define (average x y) |
OlderNewer