Helps reduce the geojson size. https://github.com/mbloch/mapshaper/wiki/Command-Reference#-simplify
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
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v2.3.0 | |
hooks: | |
- id: check-ast | |
- id: check-builtin-literals | |
- id: check-docstring-first | |
- id: check-merge-conflict | |
- id: check-yaml | |
- id: check-toml |
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
type LengthReader struct { | |
io.Reader | |
Length int | |
} | |
func (cw *LengthReader) Read(p []byte) (n int, err error) { | |
n, err = cw.Reader.Read(p) | |
cw.Length += n | |
return n, err | |
} |
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 chunk_generator(chunks): | |
for chunk in chunks: | |
yield chunk | |
def split_to_chunks(paginate_list, chunk_size): | |
""" | |
It converts given list to mostly | |
equal sized arrays |
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
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Build package", | |
"command": "${config:python.pythonPath} setup.py sdist", | |
"type": "shell", | |
"group": { |
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
###################################### | |
############# models.py ############## | |
###################################### | |
from architect.commands import partition | |
from django.db import ProgrammingError | |
def create_partitions(sender, **kwargs): | |
""" | |
After running migrations, go through each of the models |
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
# make sure the install lts | |
set -g -x EDITOR vim | |
# edit the config | |
# starship init fish | source | |
vim ~/.config/fish/config.fish | |
# when installing virtualfish make sure python exists | |
# add .local/bin to path if not exists | |
# virtual env exists at ~/.virtualenvs |
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
<extension name="DTMF_TEST"> | |
<condition break="never"> | |
<action application="set" data="rand_val=${expr(randomize(&x);ceil(random(1,4,&x)))}" inline="true"/> | |
<action application="log" data="INFO Random value is ${rand_val}"/> | |
</condition> | |
<!-- answer randomly --> | |
<condition field="${cond(${rand_val} > 2 ? YES : NO)}" expression="^YES$" inline="true"> | |
<action application="set" data="rand_resp=${expr(randomize(&x);ceil(random(1,5,&x)))}"/> | |
<action application="sleep" data="100" /> | |
<action application="start_dtmf" /> |
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
typedef struct __TABLE_UPC_SKILL | |
{ | |
uint32_t dwID; // SKILL 고유 ID | |
std::string szEngName; // 스킬 영어 이름 | |
std::string szName; // 스킬 한글 이름 | |
std::string szDesc; // 스킬 이름 | |
int iSelfAnimID1; // 시전자 동작시작 | |
int iSelfAnimID2; // 시전자 동작끝 | |
int idwTargetAnimID; // 타겟 동작 |
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
# dump from docker | |
docker exec dbname dockerinstance -d postgres -Fc -U postgres > dump.sql | |
# finding dump encoding | |
file dump.sql | |
# Output> dump.sql: Little-endian UTF-16 Unicode text, with very long lines, with CRLF line terminators | |
# convert it to utf-8 | |
iconv -f utf-16 -t utf-8 dumb.sql > dumb-utf8.sql |
NewerOlder