You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Brazil's Blog Musings on automation, scripting, programing, DevOps, and cybersecurity Built on jello: – Jello Explorer (jellex): TUI interactive JSON filter using Python syntax – jello web demo I’m a big fan of using structured data at the command line. So much so that I’ve written a couple of utilities to promote JSON in the CLI: jc to JSONify command line output of scores of commands and file-ty
Bloom Filter を実装してみた。簡単な実装なので、速度や空間効率は悪いです。 Bloom Filter というのは、確率的データ構造の一つで、ある要素が集合に含まれるかどうかを試験するものです。空間効率が非常に良いのが利点で、偽陽性、つまり集合に含まれない要素もあるとしてしまう場合があるという欠点があります。偽陰性はありません。 以下が実装例です。 import hashlib import math class BloomFilter: def __init__(self, num_item, false_positive): assert 0 <= false_positive <= 1 # Optimal number of bit array size and hash function # https://en.wikipedia.org/wiki/Bloom_filt
こんにちは、@yoheiMuneです。 今日はPython2系におけるリストに関する操作をブログにまとめてみたいと思います。リストはよく使いますが、よくWebで調べている気がするので、まとめることで作業効率化できたらなーと思います。 https://flic.kr/p/9nG8RA 目次 リストを生成する # 空のリストを作る >>> list01 = list() >>> list01 = [] # 初期値を指定する >>> list01 = ["a", "b", "c"] # タプルからリストを作る >>> aTapple = (1, 2) >>> list01 = list(aTapple) [1, 2] # セットからリストを作る >>> aSet = set([1,2,3,4,5]) >>> list01 = list(aSet) [1, 2, 3, 4, 5] # 文字列から作
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く