• Stars
    star
    112
  • Rank 310,399 (Top 7 %)
  • Language
    Python
  • Created about 7 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

terminalを可愛くします

What About Kawaii-Term

kawaii-termは主にエンジニアに対して適切に精神的な癒しを与えることで、ストレスを低減するものです  

この世界が可愛ければ戦争は無くなるのに

機能一覧

  • 任意の文字列の表示
  • 空きメモリの表示
  • $の書き換え
  • CPU使用率
  • Diskの使用状況
  • 天気の表示
  • 一部のコマンドのオーバーライド[1]
  • ビッグデータ用のコマンド[2]

サポートしているOS

  • Ubuntu Linux (zesty, x86_64, armhf, arm64)
  • Debian Linux (sid, armhf, arm64)
  • Arch Linux (x86_64)

Requrements

python3が以下のパスに通っている必要があります

$ which python3
/usr/bin/python3

Ubuntu Linux, Debian Linuxでは以下のようにインストールしてください

$ sudo apt install python3

curlもインストールされている必要があります

$ which curl
/usr/bin/curl

Ubuntu Linux, Debian Linuxでは以下のようにインストールしてください

$ sudo apt install curl

Install

HOMEディレクトリにこのプロジェクトをgit cloneで配置する必要があります

$ git clone https://github.com/GINK03/kawaii-term

template.bashrcを~/.bashrcに追加します(アップデート時は計算時間が無駄にならないように適切に、重複等を消すなどして、軽くしてください)

$ cd kawaii-term
$ cat templte.bashrc  >> ~/.bashrc

画面イメージ

図1. ログイン時にスプラッシュでアスキーアートが流れます

template.bashrcのPS1というところを編集することで、ターミナルのテキストや詳細は変更できますが、デフォルトではこのような感じです

図2. 項目の入れ替えはPS1を編集することで行えます

標準コマンドのオーバーライド

いくつかのコマンドにて、機能を上書きしたり、追加したりして任意の動作をさせています  

  • ls (l -CFにエイリアスされています)
  • clear
  • explosion

ls

lだけで入力できるようにしています

$ l
はわわ〜〜〜!💦
22/  cuda/  go/  keras-skip-though-vector/  metas/  td2.pem   テンプレート/  ビデオ/  公開/
NVIDIA_CUDA-8.0_Samples/  cudnn-8.0-linux-x64-v5.1.tgz  go1.8.3.linux-amd64.tar.gz  keras-unstructured-data  minimize.zip  v/
aws/  examples.desktop  kawaii-term/  kotlin-headlessbrowser-selenium-jsoup-parser/  sdb/

clear

clearはバッファがおかしくなった時にリセットをしますが、上の方にカーソルが行ってしまい、視線を動かす必要があるので、アスキーアートを前方に投入することで、カーソルの場所の調整を行います

$ clear

図3. clearを押すと、比較的大きなAAが表示され、結果としてカーソルが下の方にくる

explosion(ex)

ビッグデータなどを扱い、大きなデータセットを消そうとすると、rmコマンドでは消せません   そこでexplosionという長めのコマンドで、警告なしで、OSがファイルとして認識できるのであれば、問題なく消せるコマンドを新たに追加します
(無警告なので、注意してください)

$ explosion target/*

めぐみんというキャラクタのAAをみることができます

図4. めぐみん

terminal中の天気に関して

openweathermap.orgの無料プランを用いています
サンプルに私のAPIキーがバンドルされていますが、無料で利用できるので、適切にご自身のAPIキーに書き換えてください(私がバンされてしまいます)
kawaii-term/weather.pyを編集して、中のAPIキーを変えてください
また、お住いの都市にURLを書き換えて、予想する都市部を便利な箇所に変えてご利用ください

これを、

  raw = os.popen('curl -s "http://api.openweathermap.org/data/2.5/weather?q=Tokoy,jp&appid=1e240e732347c23472274dc188cd39d6"').read()

このようにします

  raw = os.popen('curl -s "http://api.openweathermap.org/data/2.5/weather?q=${YOUR_CITY}&appid=${YOUT_API}"').read()

左のプロンプトと右のプロンプトの幅について

自動で幅を計算してたのですが、tmux経由で使用すると微妙にずれるので、ハードコードしました  

お使いのディスプレイによっては適切に表示されないかもしれません  

template.bashrcの$YOUR_WIDTHを任意の値にしてみてください  

RIGHT_PRONPT() {
  # パディング幅を%*s ${COLUMNS}で指定できるが、tmux経由だと、よく破綻しているので、ハードコードでもいいかもしれない
  printf "%*s" {{$YOUR_WIDTH}} "$(tput setaf 199)$(tput bold)$(CPU_USAGE)$(tput sgr0) $(tput setaf 2)$(DISK_USAGE) $(tput setaf 123)[TENKI:$(GET_WEATHER)]$(tput sgr0)"
}

ライセンス

WTFPL (Do What The Fuck You Want To Public License)

More Repositories

1

5ch-analysis

5chの過去ログをスクレイピングして、過去流行った単語(ex, 香具師, orz)などを追跡調査
Python
66
star
2

fasttext-vs-word2vec-on-twitter-data

fasttextとword2vecの比較と、実行スクリプト、学習スクリプトです
Python
49
star
3

GIZYUTSUSHOTEN-08

技術書典8用の資料とmarkdown(コロナで中止)
Python
45
star
4

alt-i2v

alternative illustration2vec implitation of sigmoids of fully connected layer
Python
34
star
5

kaggle-dae

kaggleのporto-seguro-safe-driver-prediction, michaelのsolver
Python
33
star
6

keras-seq2seq

minimal seq2seq of keras
Python
26
star
7

keras-resnet-food-reverse-engineering

resnetが料理の材料をあてます
Python
23
star
8

pytorch-pix2pix

a fork of pytorch-pix2pix
Python
22
star
9

minimal-search-engine

最小のサーチエンジン/PageRank/tf-idf
Python
18
star
10

keras-rnn-music-super-resolution

DeepLearningで音楽をアップサンプリングします
Python
16
star
11

real-estate-value-prediction

Awesome real estate value prediction with machine-learnings.
Jupyter Notebook
15
star
12

keras-image2text

Python
13
star
13

scraping-designs

様々なサイトのスクレイピングチャレンジです
Python
13
star
14

python-block-chain

python3によるblock chaineによる公文書などの改竄がないことの保証の例です
Python
12
star
15

lightgbm-feature-transform

lightgbmのfeature-transform(特徴量の非線形化)をすることで、80,000を超える特徴量を線形回帰でも表現できることを示します
C++
11
star
16

DomainDependencyMemeJsai2017

Jsai2017で炎上した論文を追加研究しました
Python
11
star
17

keras-distillation

keras google-vision's distillation
Python
10
star
18

gink03.github.io

GitHub IO Improved
HTML
10
star
19

google-cloud-function-pythonic

pythonic implitation of google cloud function
Python
10
star
20

keras-cnn-character-code-detection

文字化けしうるもじコードが不明な状態であるバイト列から、UTF-8, SJIS, EUCをCNNで予想します
Python
9
star
21

bookmeter-recommender

python3 bookmeter scraping tools
Python
9
star
22

income-expression

転職サイトから、年収の条件を明らかにし、良さげな条件とは何かを明らかにします
Python
9
star
23

boosting-tree-tokenizer

Gradient Boosting Dicision Tree(LightGBM)を用い、教師ありで自然言語の分かちと形態素の推定を学習&予想します。名称は珊瑚(sango)にしたい
C++
9
star
24

bot-detect-and-block

Twitterで検索汚染となるボットを機械学習と特徴量エンジニアリングを利用して検出 & ブロック
Python
9
star
25

gcp-dataflow-kotlin-java-mix

GCPのサービスのDataFlow(Apache Beam)、Kotlinで動作させます
Kotlin
8
star
26

keras-enigma-rnn

kerasのRNNでEnigmaを解きます
Python
7
star
27

kotlin-headlessbrowser-selenium-jsoup-parser

kotlin製のスクレイパーです
Kotlin
7
star
28

keras-multi-agent-tiny-reinforcce-game

kerasでマルチエージェントラーニングを行い、簡単なゲームをします
Python
7
star
29

tiny-japanese-wikipedia-tfidf-dic-generator

Python
6
star
30

cupy-parallel-kmeans-similarity-ranking

GPU accerarated K-means, and similarity ranking engine
Python
6
star
31

keras-cnn-text-classify

simple CNN text classification with Keras
Python
6
star
32

rnn-bitflyer-predictor

kerasでbayesian nuralnetworkを実装し、mona coinの値段を予想します
Python
6
star
33

poincare-embedding

embedding with poincare embedding
Jupyter Notebook
6
star
34

KindleReferencedIndexScore

kindleをスクレイピングして、加重平均、調和平均、TF、ロジスティック回帰を考慮してランキングするソフトウェアです
Python
5
star
35

a_book_of_life

人生の一冊
Python
5
star
36

hellowork-map

ハローワークマップ
Jupyter Notebook
5
star
37

pytorch-matrix-factorization

PytorchのMatrix Factorizationの実装
Python
5
star
38

5ch-blog-depression-machine-learning

5chのうつ傾向があるメンタルヘルスとその他の違いをボキャブラリや代名詞の使い方から明らかにします
Python
5
star
39

xgboost-nikkei-heikin-kabuka

xgboostで日経平均株価を新聞記事等のメディアから回帰で予想します
HTML
4
star
40

kotlin-for-datascience

kotlinx concurrent, serializer, kvs(redis), multiprocess, detascience design patterns
Kotlin
4
star
41

n575Kt

natural 575(自然界に自然に発生した575の構文を持つテキスト)を抜き出します
Kotlin
4
star
42

cpp-overdose-lib

C++17のラムダ式と、テンプレートを用いることで、KotlinやScalaなどに似たシンタックスでRのdplyrの該当する機能が動かせることを示します
C++
4
star
43

data-analysis-design-patterns

multicore data processing templates
Jupyter Notebook
4
star
44

emotion2vec

Python
3
star
45

kotlin-ktor-design-templates

ktorのdesignのtemplateです。APIサーバや簡単なWeb Serverの構築例です
Kotlin
3
star
46

keras-rnn-function-approximate

RNNで代表的な関数近似を行います。
Python
3
star
47

multi-ip-scraping

aws-gcp-squid-config-dotfile
Python
3
star
48

keras-rnn-webdesign2html

rnn genereate html code with site design images.
Python
3
star
49

amazon-dash-hack

amazon-dash buttonで勤怠メールを送ったり、ちょっとしたことを実現します
Python
3
star
50

atcoder-solvers

色々なatcoderの解き方、アルゴリズムのスニペット
Python
3
star
51

flaming_and_brand_image

Jupyter Notebook
3
star
52

kaggle-introduction-for-newcomers

Kaggle Introduction for newcomers. (最初のKaggleの一歩と、ブートアップまで)
Python
3
star
53

rocksdb-bindings

RocksDB <-> C++, Rust, Python, Kotlin
Kotlin
3
star
54

pixabay-scraper

A Scraper of Pixabay.
Python
3
star
55

jin115-article-predictor

jin115.comのサイトから、記事情報からどの程度、バズるか、バズりやすくするにはどうすればいいのか、機械学習で計算します
Python
3
star
56

faiss-nlp

faissでNLPで使いそうなやつ
Python
2
star
57

boatrace-prediction

Jupyter Notebook
2
star
58

DarkDeepForest

C++
2
star
59

edward-bayesian-neural-network

Edward Bayesian Neural Network
Python
2
star
60

ElasticOpenpose

openpose utilities for MMD Unity
Python
2
star
61

ikiriDS-watch

ikiriDSのTwitterの発言を、slackで転送します
Python
2
star
62

kigyo

Python
2
star
63

kvsswitch

redis, aerospike, rocks(or leveldb),google-datastore wrapper and switcher for each usecase.
Python
2
star
64

keras-babi-memnn

日本語対応 + 予想タスク機能追加
Python
2
star
65

keras-rnn-fizzbuzz

keras version fizzbuzz of RNN.
Python
2
star
66

PixivTagPredictor

Python
2
star
67

rust-overdose-lib

Rustでdplyr, panda, apache-sparkに似た、データ分析プラットフォームを提供します
Rust
2
star
68

ameblo-analytics

Python
2
star
69

poetty

あなたの文章のポエム度を計算しちゃうよ☆❤❤❤❤
Python
2
star
70

google-home-sound-interface-design

google homeを用いて双方向のインターフェースのデザインを設計、提案します
JavaScript
2
star
71

keras-rnn-teniwoha

RNNで”てにをは”の蓋然性を計算します
Python
2
star
72

tiny-japanese-sentiment-polarity-dictionary

Amazonのレビュー、楽天の商品のレビューから得られた感情表現による極性辞書
Kotlin
2
star
73

aws-emr-streaming-templates

AWS Elastic Map Reduce Streaming Templates
Python
2
star
74

beam-search-nlp

単語の共起確率を元に、状態遷移の幅を探索します
Python
2
star
75

pure-python-kvs-f2db

pure python kvs f2db(flash friendly db)
Python
2
star
76

keras-bwh-predictor

画像情報からスリーサイズをあてます
Python
2
star
77

unofficial-niconico-news-corpus

(unofficial) niconico japanese news corpus
Python
2
star
78

concertion

Togetter Backlog
Python
2
star
79

celery-distribute-machine-learning

分散機械学習基盤をceleryを用いて実現します
Python
2
star
80

web-scraping-darkness-book

BOOTHで数百円で販売予定の、闇のWebScrapingのテクニックです。校正等pullreqで受け付けます
CSS
2
star
81

python-normal-beta-poisson-distribute-estimate

Pythonで正規分布、ベータ分布、ポアソン分布を最尤推定法で求めます
Python
2
star
82

k8s-lgb-score-check

lgbの並列の予想システムで、k8sでスケーラビリティを考慮したデザインパターン
Python
2
star
83

novel_recommend

#名刺代わりの小説10選 で集めたツイートをもとにレコメンドするやつ
Jupyter Notebook
2
star
84

pytorch-snippets

コンペとか実務とかで使えそうなPyTorchのスニペットです
Jupyter Notebook
2
star
85

psyche

utils for machine learning
Python
2
star
86

deep-hash-algorithm-crack

Deep LearningでHash Algorithmの大小を予想します
Python
2
star
87

campfire-survey

campfireというクラウドファンデーションに関するサーベイです
Jupyter Notebook
2
star
88

pytorch-rnn--ondev-

pytorch-rnn on-dev
Python
1
star
89

DeepFurigana

Python
1
star
90

xgboost-fizzbuzz

fizzbuzz by xgboost
Python
1
star
91

bing-ranking-inspector

Microsoft Bingのランキングの重みを自然言語的に解釈、表現します
Python
1
star
92

arbitrage

arbitrageできないか実験
Python
1
star
93

keras-kpi-distribution-estimator

kerasの深層学習で不確定な欠損したKPIの図を推定します
Python
1
star
94

apache-spark-arrow-parquet-kotlin-python-ruby-survey

apache-parquet-kotlin-python-survey
Python
1
star
95

keras-catchphrase-generator

Python
1
star
96

job-recommender-api

向いている会社のレコメンドAPI(仮)
Python
1
star
97

jq-data-analysis

Ruby, jq,を用いてUniversal Shell Programmingを可能にして、簡単なデータサイエンスを行います
Ruby
1
star
98

docker-compose-templates

docker-compose-templates
Python
1
star
99

softether_docker_wrapper

45秒で何ができる
Python
1
star
100

yukicoder-solvers

yukicoderを解いて行った解法とスニペットです
Kotlin
1
star