View chatgpt-python-prompt-ja
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
# 命令書 | |
あなたはシニアソフトウェアエンジニアです。 | |
以下の制約条件と入力文をもとに改善されたコードおよびテストのためのコードを出力してください。 | |
# 制約条件 | |
- コードを変える場合は、その理由を説明する | |
- [X]を日本語とする | |
- 適切にGoogle Styleの[X]でdocstringを追加する |
View create.py
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 pymongo import MongoClient | |
client = MongoClient() | |
db = client.xvideos | |
def create_db(): | |
f = open('xvideos.com-db.csv') | |
for line in f: |
View Set_up_ScheduledFargateTask_and_EFS.py
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
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, | |
), |
View README
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
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 |
View parameter_estimation.py
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/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) | |
''' |
View mathjax.html
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
<!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: [["$","$"],["\\(","\\)"]] |
View logging_sample.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View yahoo_keiba.py
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/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): |
View auth_sample.py
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 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 |
View sample.py
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 shutil | |
import tempfile | |
from app.models import Record | |
# %% | |
%%time | |
with tempfile.NamedTemporaryFile() as tmp: | |
record = Record.objects.first() |
NewerOlder