Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

catindog/nardtree GINK03

🌴
On vacation
View GitHub Profile
@GINK03
GINK03 / calc-blood-type.py
Last active Jan 31, 2022
ネット上での血液型のイメージ
View calc-blood-type.py
import fire
import glob
import gzip
import pandas as pd
from tqdm.auto import tqdm
import regex
from multiprocessing import Pool, cpu_count
import zlib
from pathlib import Path
from loguru import logger
@GINK03
GINK03 / zshrc
Last active Feb 20, 2022
zsh-extend-module
View zshrc
###############################################
# tmuxでvim, python等を実行した時、nerdfontで #
# 起動アプリケーションとその引数を表示 #
###############################################
if [[ -n "$TMUX" ]]; then
TMUX_CURRENT_WINDOW=`tmux display-message -p '#I'`
fi
autoload -Uz add-zsh-hook
preexec_support_tmux () {
@GINK03
GINK03 / gcp-nlp-api-jp-koubun.py
Last active Apr 5, 2022
gcp natural language api japanese test
View gcp-nlp-api-jp-koubun.py
from google.cloud import language_v1
def sample_analyze_syntax(text_content):
client = language_v1.LanguageServiceClient()
type_ = language_v1.Document.Type.PLAIN_TEXT
language = "ja"
document = {"content": text_content, "type_": type_, "language": language}
encoding_type = language_v1.EncodingType.UTF8
response = client.analyze_syntax(request = {'document': document, 'encoding_type': encoding_type})
@GINK03
GINK03 / true-color.py
Created Apr 25, 2021
true colorテスト
View true-color.py
#!/usr/bin/env python
# Ported to Python from http://www.vim.org/scripts/script.php?script_id=1349
print("Color indexes should be drawn in bold text of the same color.")
print
colored = [0] + [0x5f + 40 * n for n in range(0, 5)]
colored_palette = [
"%02x/%02x/%02x" % (r, g, b)
for r in colored
@GINK03
GINK03 / karabiner.json
Last active Mar 19, 2021
karabiner-element settings
View karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@GINK03
GINK03 / elastic_japanese_example.ipynb
Last active Feb 17, 2021
elasticsearch Japanese example
View elastic_japanese_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GINK03
GINK03 / Untitled.ipynb
Last active Jan 2, 2021
健康寿命のrain cloud plot
View Untitled.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GINK03
GINK03 / google_cals.py
Last active Dec 30, 2020
google_cals_cui
View google_cals.py
#!/usr/bin/env python
"""
Example application for the 'blessed' Terminal library for python.
This isn't a real progress bar, just a sample "animated prompt" of sorts that demonstrates the
separate move_x() and move_yx() capabilities, made mainly to test the `hpa' compatibility for
'screen' terminal type which fails to provide one, but blessed recognizes that it actually does, and
provides a proxy.
"""
from __future__ import print_function
@GINK03
GINK03 / google_cals.py
Created Dec 30, 2020
minimam_google_calendar_cui
View google_cals.py
#!/usr/bin/env python
"""
Example application for the 'blessed' Terminal library for python.
This isn't a real progress bar, just a sample "animated prompt" of sorts that demonstrates the
separate move_x() and move_yx() capabilities, made mainly to test the `hpa' compatibility for
'screen' terminal type which fails to provide one, but blessed recognizes that it actually does, and
provides a proxy.
"""
from __future__ import print_function