Skip to content

Instantly share code, notes, and snippets.

View hassaku63's full-sized avatar

Takuya Hashimoto hassaku63

View GitHub Profile

この記事はpyspa advent calendar 2020の18日目の記事です。前日は、flagboyの配られたカードで勝負するでした。主旨は異なりますが、徒然草百十段の「双六の名人」が思い出されました。明日はYutaka Matsubara a.k.a. mopemopeさんの記事となります。お楽しみに。

1ヶ月で10,000行くらいのコードを書いた話

行数を書くと「いやいや、私はもっと高い生産性を持っている」、という方は少なくないだろう。登大遊氏に至っては、ネットワークプログラミングという複雑な領域での実装でありながら「1日に少なくとも3,000行程度、多く書くときで10,000行」と述べており、凡才さを思い知らされる。

さて、この記事は、私のような動物でも高効率にコードを書くために何をしたのかを備忘として残しておく主旨である。

開発環境編

@dehio3
dehio3 / custom-domain-api-lambda-sample-serverless.yml
Last active July 11, 2020 03:42
カスタムドメインを利用したAPI Gatewayとlambda環境構成のサンプル
service:
name: ${self:custom.serviceName}
provider:
name: aws
apiName: ${self:custom.serviceName}-API
endpointType: REGIONAL
apiKeys:
- ${self:custom.serviceName}
runtime: python3.7
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv
from pathlib import Path
from botocore.exceptions import ClientError
import boto3
import json
@kauplan
kauplan / coverpdf.md
Last active March 10, 2020 12:12
Re:VIEW Starterで、表紙画像のPDFファイルを挿入する方法
  1. layouts/layout.tex.erbの93行目の直後に「\usepackage{pdfpages}」を追加
 91 \usepackage{float}
 92 \usepackage{alltt}
 93 \usepackage{amsmath}
 94 \usepackage{pdfpages}     % ← 追加
 95
@irgeek
irgeek / Makefile
Last active September 12, 2019 14:40
Minimal test case to show aws-cli cloudformation package regression.
S3_BUCKET := cf-templates-1wwumiwcx5krz-ap-southeast-2
S3_PREFIX := 8b87ca7b-869e-4401-baa0-ad0522e32f21
AWSCLI := .venv/bin/aws
all: parent.pyaml
parent.pyaml: child.pyaml
child.pyaml: grandchild.pyaml
@erukiti
erukiti / review.md
Last active March 16, 2024 15:31
Re:VIEWチートシート

Re:VIEWチートシート

いつもいつもいつもRe:VIEWの記法に悩んでぐぐってしまう皆さんへ送るチートシートです。

基本

名称 ルール 概要・備考
段落 1行以上の空行をはさむと別の段落になる HTMLでいうP
見出し =ではじまる行 =の個数で、章・節・項・段という感じで増えます。HTMLで言うH1, H2, H3, H4, H5
@matstani
matstani / clojurememo.md
Created December 28, 2017 01:11
Clojureで業務システムを作ったメモ

Clojureを仕事で使った経験をメモしておきます。 2015年の冬に本番稼働したシステムのため、使用したライブラリ等については、必ずしも現在の流行に沿っていないと思います。

作ったもの

  • スタッフがウェブブラウザによりアクセスし、ログインして使用する業務システム
    • 商品管理、売上管理、支払管理etc..

規模

  • DBテーブル数80程度
  • 画面数200程度
import json
from slacker import Slacker
from websocket import create_connection
slack = Slacker('xxxxxx')
# start RTM
rtm = slack.rtm.start()
url = rtm.body['url']
ws = create_connection(url)
@ungoldman
ungoldman / curl_post_json.md
Last active April 15, 2024 14:46
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@mia-0032
mia-0032 / 01_aggregation.py
Last active August 24, 2018 13:35
Pythonで基本的な統計量を出力してみる
# -*- coding:utf-8 -*-
import numpy
from scipy import stats
n = 200
#正規分布にあてはまる乱数を生成
score_x = numpy.random.normal(171.77, 5.54, n)
score_y = numpy.random.normal(62.49, 7.89, n)