MongoDB EventMongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50% > AnnouncementLearn why MongoDB was named a Leader in the 2025 Gartner® Magic Quadrant™ Learn more >
duplicity Encrypted bandwidth-efficient backup using the rsync algorithm What is it? Duplicity backs directories by producing encrypted tar-format volumes and uploading them to a remote or local file server. Because duplicity uses librsync, the incremental archives are space efficient and only record the parts of files that have changed since the last backup. Because duplicity uses GnuPG to encryp
Unverified details These details have not been verified by PyPI Project links Changelog Documentation Homepage Issue Tracker Repository Meta License Expression: BSD-3-Clause SPDX License Expression Author: Manfred Stienstra, Yuri Takhteyev Maintainer: Isaac Muse Tags markdown , markdown-parser , python-markdown , markdown-to-html Requires: Python >=3.10 Provides-Extra: testing , docs Python-Markdo
virtualenv使っていると、仮想環境ごとに同じようなパッケージ(Flask,SQLAlchemy,pyqueryなんか)を何度もダウンロードすることになり、帯域の無駄遣いだよなと思っていた。それから、東京出張の際に新幹線の中でコード書いてることが多いんだけど、大抵三島-新横浜間のどこかで一度はイラッとするのもどうにかならんかと。 perlでいうところのminicpanみたいなのないかなぁと調べてみたらpep381client使えっていうやりとりをみつけたので調べてみた。ここなんかよくまとまっている。 ぱっと見ると、pep381clientがいいかなと思うんだけどPYPIのほぼ完全なミラーを作る感じだし、これはノートに入れて持ち歩くにはでかすぎるだろ(30Gくらいのストレージが必要)っていう理由で保留。まぁ、職場にミラーつくるんだったらいいんだろうなぁと思い、使ってみようかなとふとis
# code snippet, to be included in 'sitecustomize.py' import sys def info(type, value, tb): if hasattr(sys, 'ps1') or not sys.stderr.isatty(): # we are in interactive mode or we don't have a tty-like # device, so we call the default hook sys.__excepthook__(type, value, tb) else: import traceback, pdb # we are NOT in interactive mode, print the exception... traceback.print_exception(type, value, tb)
最近Bashを起動する速度がどんどん遅くなっているなと感じたので、Claude Codeに高速化を依頼した。 パフォーマンスの可視化 まず手始めに、Bash起動時に何に時間がかかっているのかをわかるようにしてもらった(PR)。 以下のようにBASH_PROFILE_PROFILING=1 bash -lで起動することで、以下のようにどこに時間がかかっているかが計測可能になる。 BASH_PROFILE_PROFILING=1 bash -l [profile] 1 ms (+ 1 ms) prompt/history [profile] 48 ms (+ 47 ms) brew --prefix [profile] 49 ms (+ 1 ms) .bash_local [profile] 118 ms (+ 69 ms) bash-completion [profile] 1361 ms
pythonとりあえず自分用に。あとでちゃんとまとめ直す...かも。コマンドh(elp) [command]コマンドのヘルプを表示引数なしで利用可能コマンド一覧を表示s(tep)一行実行(ステップイン)n(ext)一行実行(ステップオーバー)unt(il)(Python2.6から)行番号が現在行より大きくなるか、現在のフレームから戻るまで実行r(eturn)returnされるまで実行(ステップアウト)c(ontinue)次のブレークポイントまで実行j(ump) lineno次に実行する行を指定最も底のフレームでのみ実行可能forやfinallyなどの中には飛び込めないl(list) [first[, lastソースコードを表示引数なし 前後11行引数一つ その行から11行引数二つ 与えられた範囲行a(rgs)現在の関数の引数リストをプリントp expression現在のコンテキストでexp
Part of my Python FAQ. I only know PHP. How do I write a Web application in Python? This is a deeply complex question. I could easily fill a book on web development and Python and how to make the two interact, so I was hoping to put this one off for a while. But given that I just trashed PHP rather harshly, it seems prudent to answer it sooner rather than later. The dead simple answer is to stop r
since 2022-12-24 ruby 3.1.2 irb(main):016:1* def add(a, b) irb(main):017:1* a + b irb(main):018:0> end => :add irb(main):019:0> add 1, 3 => 4 irb(main):020:1* def add_new a, b irb(main):021:1* a + b * 2 irb(main):022:0> end => :add_new irb(main):023:0> add_new 1, 3 => 7 irb(main):024:1* def fizzbuzz(num) irb(main):025:1* num irb(main):026:0> end => :fizzbuzz irb(main):027:0> 1.upto(10) { puts fizz
ページコンテンツ contextlib – コンテキストマネージャユーティリティ コンテキストマネージャ API ジェネレータからコンテキストマネージャへ ネストされたコンテキスト オープンハンドラをクローズする ナビゲーション コンテンツテーブル 前: atexit – プログラムの終了時に関数を呼び出す 次: gc – Garbage Collector This Page Show Source サンプルプログラム PyMOTW の全てのサンプルプログラムの出力は、 注記されていない限りは Python 2.7.2 で生成されています。 標準ライブラリの初期のバージョンでは利用できない機能も紹介している 可能性があります。
昔こんなの作ったんですが、あまりにも酷い出来だったので作りなおしました。最初はcurses使えば少しはましなの作れるんじゃないの?と思ってcurses使ってちまちま作ってましたが、その後urwidというコンソール用のユーザーインタフェースライブラリ(普通の人からしたらななんじゃそりゃって感じですね^^;)があることが分かったので、それを使って作りました。 ・使い方 本体 GitHub - mmisono/pepi: terminal interface for skype 必要なもの (1) Python(32bit) (2) Skype4Py (3) Urwid Python2.6,Skype4Py 1.0.32.0,urwid 0.99,Mac OS Xで動作確認してます。 チャットをするのが目的なのでたいした機能はありません。 あくまでも起動しているSkypeに対してAPIを利用する
The line-by-line memory usage mode is used much in the same way of the line_profiler: first decorate the function you would like to profile with @profile and then run the script with a special script (in this case with specific arguments to the Python interpreter). In the following example, we create a simple function my_func that allocates lists a, b and then deletes b: @profile def my_func(): a
はじめに こんにちは、Python界の情弱です。最近は色々とPythonの開発環境も変化してきていて、ようやくPython2.xとPython3.xを行き来しながら開発する体制が整ってきたという印象を受けています。ここしばらくは色々と試していたのですが、ようやく鉄板っぽい方法にたどり着いたのでメモしておきます。 なお、後半はPythonに限らない内容なので、他のLLを使っていても使えそうかなと思っています。この環境を設定すると何ができるのかというと、以下のことすべてが、無料で、自鯖を立てることなく行えます。 開発環境の整理(virtualenv) ローカルでの複数環境のテスト容易化(tox+pytest) CIによるテスト(Travis-CI) ドキュメントの自動ビルドおよびドキュメントの公開(ReadTheDocs) 概要 とりあえず全体像を先に共有しておきます。ちょっとでかいですがご了
This page collects information for creating a usable Python programming environment in Emacs. Quick startThe quickest way to start is just to open a Python file in Emacs – ‘python-mode’ has a nice feature-set as is – see below for details. Beyond that, as people ask for recommendations fairly often, the following is a reasonable approach: If you already use one of the StarterKits like Spacemacs or
Improving your code with modern idioms¶ Once you have added Python 3 support you have a chance to use the newer features of Python to improve your code. Many of the things mentioned in this chapter are in fact possible to do even before adding Python 3 support, as they are supported even by quite old versions of Python. But I mention them here anyway, because they aren’t always used when the code
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く