Skip to content

Instantly share code, notes, and snippets.

- また make の話してる
- https://tamakiii.hatenablog.com/entry/2020/09/14/232533

pipxを使用したpoeryの導入

pip3 install pipx
~/Library/Python/3.8/bin/pipx --version 
~/Library/Python/3.8/bin/pipx ensurepath
pipx install poetry

$ pipx install poetry                     
  installed package poetry 1.1.2, Python 3.8.6
@nnashiki
nnashiki / packag_develop_flow.md
Last active October 12, 2020 01:41
パッケージを作成するフローを書いてみる

最低限のパッケージを作る
userを作成して、誕生日を入れたら年齢を当てるみたいな

アプリとパッケージの開発は異なる
パッケージの場合: 最終成果物はコードのみ
アプリの場合: 最終成果物はコード+実行環境

単体のパッケージ開発のフロー

local

@nnashiki
nnashiki / struct_example.sql
Last active June 22, 2020 11:23
ストラクト構造の例
# https://cloud.google.com/bigquery/docs/reference/standard-sql/arrays?hl=ja#querying_struct_elements_in_an_array
SELECT "800M" AS race,
[STRUCT("Rudisha" as name, [23.4, 26.3, 26.4, 26.1] as splits),
STRUCT("Makhloufi" as name, [24.5, 25.4, 26.6, 26.1] as splits),
STRUCT("Murphy" as name, [23.9, 26.0, 27.0, 26.0] as splits),
STRUCT("Bosse" as name, [23.6, 26.2, 26.5, 27.1] as splits),
STRUCT("Rotich" as name, [24.7, 25.6, 26.9, 26.4] as splits),
STRUCT("Lewandowski" as name, [25.0, 25.7, 26.3, 27.2] as splits),
STRUCT("Kipketer" as name, [23.2, 26.1, 27.3, 29.4] as splits),
STRUCT("Berian" as name, [23.7, 26.1, 27.0, 29.3] as splits)]
@nnashiki
nnashiki / async_await_example.js
Last active May 13, 2020 13:43
async await example
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
const greet = async () => {
console.log("お や す み ");
try {
await sleep(2000);
console.log("起 き た ");
console.log("お は よ う ! ");
} catch (err) {
console.error("睡 眠 例 外 で す : ", err);
}
@nnashiki
nnashiki / index.html
Last active April 27, 2020 13:22
最小構成のhtml
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>タイトル</title>
<meta name="description" content="サイトの説明を記載します">
<link rel="icon" href="favicon.ico">
</head>
<body>
<!-- ここにコンテンツを記載します -->
@nnashiki
nnashiki / gist:2cce50f1c4237891b0cfa8af0533a70f
Last active August 10, 2018 05:19
a or b or c 代入の順序
$ python -S
Python 3.7.0 (default, Jun 29 2018, 20:13:13) 
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
>>> a=1
>>> b=2
>>> c=3
>>> print(a or b or c)
1