結合 | Repository .find({take: x, skip: y}) |
QueryBuilder .take(x).skip(y) |
QueryBuilder .limit(x).offset(y) |
---|---|---|---|
無し | DISTINCT 無し | DISTINCT 無し | DISTINCT 無し |
有り | DISTINCT 有り | DISTINCT 有り | DISTINCT 無し |
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 pandas as pd | |
from openpyxl import Workbook | |
from openpyxl.chart import PieChart, Reference | |
from openpyxl.chart.label import DataLabelList | |
wb = Workbook() | |
ws = wb.active | |
df = pd.read_csv('population.csv') | |
ws.append(df.columns.tolist()) |
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 sys | |
from openpyxl import load_workbook | |
from pprint import pprint | |
if len(sys.argv) < 2: | |
print(f'{__file__}の後にExcelファイルを指定してください') | |
sys.exit(0) | |
filename = sys.argv[1] | |
wb = load_workbook(filename) |
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
(py39) $ python unparse_hy_ast.py | |
def add(hyx_xXcommaX, y): | |
return hyx_xXcommaX + y | |
print(add(3, 5)) | |
(py39) $ python -c "$(python unparse_hy_ast.py)" | |
8 |
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
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}> | |
{{- if .Get "link" -}} | |
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}> | |
{{- end }} | |
<img src="{{ .Get "src" }}" | |
{{- if or (.Get "alt") (.Get "caption") }} | |
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" | |
{{- end -}} | |
{{- with .Get "width" }} width="{{ . }}"{{ end -}} | |
{{- with .Get "height" }} height="{{ . }}"{{ end -}} |
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
package main | |
import ( | |
"fmt" | |
_ "github.com/mattn/go-sqlite3" | |
"github.com/naoina/genmai" | |
) | |
type testData struct { |
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 -*- | |
""" | |
pep 530 -- asynchronous comprehensions | |
https://www.python.org/dev/peps/pep-0530 | |
""" | |
import asyncio | |
from random import choice | |
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 -*- | |
""" | |
pep492 aiter using queue before pep 525 | |
https://www.python.org/dev/peps/pep-0492 | |
https://www.python.org/dev/peps/pep-0525 | |
""" | |
import asyncio | |
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 -*- | |
""" | |
implement Producer-Consumer pattern using asyncio | |
http://www.hyuki.com/dp/dpinfo.html#ProducerConsumer | |
""" | |
import asyncio | |
from random import choice | |
NewerOlder