$ brew update
$ brew install pyenv
# 命令書 | |
あなたはシニアソフトウェアエンジニアです。 | |
以下の制約条件と入力文をもとに改善されたコードおよびテストのためのコードを出力してください。 | |
# 制約条件 | |
- コードを変える場合は、その理由を説明する | |
- [X]を日本語とする | |
- 適切にGoogle Styleの[X]でdocstringを追加する |
# -*- coding:utf-8 -*- | |
from pymongo import MongoClient | |
client = MongoClient() | |
db = client.xvideos | |
def create_db(): | |
f = open('xvideos.com-db.csv') | |
for line in f: |
def setup_vpc(self): | |
self.vpc = aws_ec2.Vpc( | |
self, | |
"efs-testvpc", | |
nat_gateways=0, | |
subnet_configuration=[ | |
aws_ec2.SubnetConfiguration( | |
name="efs-testsubnet-public", | |
subnet_type=aws_ec2.SubnetType.PUBLIC, | |
), |
https://devcenter.heroku.com/articles/getting-started-with-python | |
http://flask.pocoo.org/ | |
http://docs.python-requests.org/en/latest/ | |
https://github.com/msgpack/msgpack-python |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Parameter Estimation for Linear Dynamical Systems | |
x[t] = A*x[t-1] + w[t] | |
y[t] = C*x[t] + v[t] | |
w[t] ~ N(0,Q) | |
v[t] ~ N(0,R) | |
''' |
<!DOCTYPE html> | |
<!-- http://docs.mathjax.org/en/v1.1-latest/typeset.html --> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>MathJax Dynamic Math Test Page</title> | |
<script type="text/x-mathjax-config"> | |
MathJax.Hub.Config({ | |
tex2jax: { | |
inlineMath: [["$","$"],["\\(","\\)"]] |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
from subprocess import * | |
import urllib2,re,math | |
from BeautifulSoup import BeautifulSoup | |
def get_races(url,r=10): |
import json | |
from urllib.request import urlopen | |
from urllib.request import Request | |
from urllib.parse import urlencode | |
# set username, password, auth_url, api_url | |
params = urlencode({"username": username, "password": password}).encode() | |
# get token |