Saravanan666/pypi-org huggingface dataset:
Package: japanize-matplotlib
japanize-matplotlibmatplotlib を日本語表示に対応させます利用方法matplotlibをimportした後、japanize_matplotlibをimportします。importmatplotlib.pyplotaspltimportjapanize_matplotlibplt.plot([1,2,3,4])plt.xlabel('簡単なグラフ')plt.show()インストール# pipenvでpipenvinstalljapanize-matplotlib# またはpipでpipinstalljapanize-matplotlib利用フォントIPAフォントのIPAexゴシック(Ver.003.01)を利用しています。
利用にあたってはIPAフォントライセンスv1.0に同意してください。FAQimport japanize_matplotlib したのに日本語表示になりません#1import japanize_matplotlib してから matplotlib でグラフを描画するまでにフォントの設定が変わる処理が入っていると、日本語表示がなされない可能性があります。例えば、seaborn を利用している場合であれば sns.set() などで描画フォントが seaborn のデフォルトに上書きされ、日本語表示がされなくなります。sns.set(font="IPAexGothic") のように利用フォントに IPAexGothic を設定するか、フォント上書き後に japanize_matplotlib.japanize() を利用するなどで日本語表示できるはずです。import のみして利用されないコードなのでフォーマッターに消されてしまいますリンターなどの警告が気になる・コードを消される方向けに japanize_matplotlib.japanize() メソッドの実行でも import 時と同じくフォントを設定できるようになっています。
無意味な実行になりますが、時と場合に応じて実行してください。もしくはリンターごとに無視させる設定をすることで対応できるはずです。# noqa などで設定してください。なぜインストール時は japanize-matplotlib で import 時は japanize_matplotlib なのですか？チェインケースが読みやすく好きだからです。import時にはチェインケースは利用できないのでスネークケースになっています。
Package: japanmap
japanmapis a package for Japanese map.import matplotlib.pyplot as plt
from japanmap import picture, get_data, pref_map
pct = picture({'北海道': 'blue'})  # numpy.ndarray
# pct = picture({1: 'blue'})  # same to above
plt.imshow(pct)  # show graphics
plt.savefig('map.png')  # save to PNG file
svg = pref_map(range(1,48), qpqo=get_data())  # IPython.display.SVG
print(svg.data)  # SVG sourceRequirementsPython 3.10, Pillow, Numpy, Open-CVFeaturesnothingSetup$ pip install japanmapHistory0.0.1 (2016-6-7)first release
Package: japan-pcr
japan_pcrThe goal of this project is to visualize military spending of countries.Visualize the number of pcr tests in Japan using the Ministry of Health, Labor and Welfare's open data siteThe pcr tests dataset is downloadable from:https://www.mhlw.go.jp/content/pcr_case_daily.csvHow to install milspend on Linux, MacOS, or WSL on WindowsYou may need matplotlib and japanize-matplotlib  library.$ pip install matplotlib$ pip install japanize-matplotlib$ pip install japan_pcrHow to run japan_pcr$ japan_pcr
Package: japantime
japantime日付や時刻を表示する際に文字列フォーマットの煩わしさから逃れることができる。installpip install japantimeusageimportjtimeprint(jtime.wareki(1923))>>>('大正',12)print(jtime.eto(1945))>>>('酉','とり')importtimea=time.time()time.sleep(3)b=time.time()print(jtime.time_lapse(b-a))>>>'0時間0分3秒'print(jtime.time_lapse(b-a,mode='s'))>>>'0:0:3'print(jtime.time_lapse(b-a,mode='e'))>>>'0h0m3s'# クラスJTimeは以下のメソッドを持つ"""JTime.year() : yyyy年JTime.month() : m月JTime.day() : d日JTime.hour() : h時JTime.min() : m分JTime.sec() : s秒JTime.youbi() : 曜日JTime.wareki() : 元号n年JTime.eto() : (干支, えと)JTime.ymdhms() : yyyy年m月d日h時m分s秒JTime.ymd() : yyyy年m月d日JTime.ym() : yyyy年m月JTime.md() : m月d日JTime.hms() : h時m分s秒JTime.hm() : h時m分JTime.ms() : m分s秒"""# 半角表示a=jtime.JTime()print(a.year())>>>'2024年'# 全角表示b=jtime.JTime(mode='z')print(b.year())>>>'２０２４年'# 漢数字表示c=jtime.JTime(mode='k')print(c.year())>>>'二〇二四年'
Package: japre
japanese_pretokenizers (japre)Custom pretokenizers for Japanese language modelsinstallationpip install japreUsageIpadicPreTokenizerfromjapre.ipadicimportIpadicPreTokenizerfromtransformersimportPreTrainedTokenizerFastfromtokenizersimportTokenizertokenizer_object=Tokenizer.from_file("your-awesome-tokenizer.json")tokenizer_object.pre_tokenizer=IpadicPreTokenizer.make()tokenizer=PreTrainedTokenizerFast(tokenizer_object=tokenizer_object,unk_token='[UNK]',mask_token='[MASK]',cls_token='[CLS]',pad_token='[PAD]',sep_token='[SEP]')ManbyoDictPreTokenizerexport MANBYO_DICT_PATH=/path/to/MANBYO_201907_Dic-utf8.dicfromjapre.manbyoimportManbyoDictPreTokenizerfromtransformersimportPreTrainedTokenizerFastfromtokenizersimportTokenizertokenizer_object=Tokenizer.from_file("your-awesome-tokenizer.json")tokenizer_object.pre_tokenizer=ManbyoDictPreTokenizer.make()tokenizer=PreTrainedTokenizerFast(tokenizer_object=tokenizer_object,unk_token='[UNK]',mask_token='[MASK]',cls_token='[CLS]',pad_token='[PAD]',sep_token='[SEP]')
Package: japronto-extra
Japronto ExtraA bit of sugar for thefastest python frameworkpip install orjson japronto-extraApi@route("/")@jsonifydefhome(request):return"You can pass an url explicitly"@route@jsonifydefhello_world(request):# if you omit it though, the function name will be usedreturn{"I'm served at":"/hello-world"}@route@jsonifydeffoo__bar(request):# double underscores map onto slashesreturn"I'm at /foo/bar"@route("/validation","POST")@jsonifydefbasic_validation(request):# required integer query argumentid=get_argument(request.query,"id",int)# optional `datetime` json argument with a default fallbackat=get_argument(request.json,"at",datetime.fromisoformat,default=datetime.now())return{"id":id,"at":at}Look at the working example inexpample.py
Package: japronto-jinja2
## japronto_jinja2[jinja2](http://jinja.pocoo.org) asynchronous template renderer for
[japronto](https://github.com/squeaky-pl/japronto).### InstallationInstall from PyPI:` pip installjapronto-jinja2`### DevelopingInstall requirement and launch tests:` pip install-e.[dev] pytest `### UsageBefore template rendering you have to setupjinja2 environmentfirst:import jinja2
from japronto import Application

app = Application()
japronto_jinja2.setup(app, loader=jinja2.FileSystemLoader('/path/to/templates/folder'))After that you may to use template engine in yourweb-handlers. The
most convenient way is to decorate aweb-handler.Using the function based web handlers:@ajapronto_jinja2.template('tmpl.jinja2')
def handler(request):
    return {'action': 'follow', 'person': 'me'}On handler call thejapronto_jinja2.templatedecorator will pass
returned dictionary{‘action’: ‘follow’, ‘person’: ‘me’}into
template namedtmpl.jinja2for getting resulting HTML text.If you need more complex processing (modify response on your own)
you may callrender_templatefunction.Using a function based web handler:async def handler(request):
    context = {'action': 'unsubscribe', 'from': 'channel'}
    response = aiohttp_jinja2.render_template('tmpl.jinja2',
                                              request,
                                              context)
    # do smth with your response
    return responseSee [examples](https://github.com/bmwant/japronto-jinja2/tree/master/examples)
directory for more complete snippets.### Licensejapronto_jinja2is offered under the Apache 2 license.CHANGES0.0.1 (2016-05-10)Initial release
Package: japscandownloader
JapScanDownloaderInstallationThis project depends onGoogle ChromeandChromeDriver, install them
first.$pipinstalljapscandownloaderOR$gitclonehttps://github.com/Harkame/JapScanDownloader.git$cdJapScanDownloader$pythonsetup.pyinstall$whichchromedriver/usr/local/bin/chromedriverUsage$japscandownloaderConfigurationThe program uses an configuration file. This file contains list of mangas to
download, destination path, etc.Copy and edit the default configuration file (config.yml) to match your needs.Change image resolutionsChanging the image resolution is not yet a configurable attribute. Yet you can
edit the japscandownloader/jss_selenium.py file and change thewindow-sizeto
your desired resolution.TODOTests with seleniumChapters folders name (not only number)Donâ€™t download already downloaded manga/chapter/pageBug : Maximum connection tryBug : doublon/invalid first image
Package: japtkpy
pystackA simple Japanese Language TokenizerUsagefrom japtkpy import Tokenizer

tokenizer = Tokenizer.initialize()

res = tokenizer.tokenize('彼は新しい仕事できっと成功するだろう。')

print(res)LICENSECopyright (c) 2018 The Python Packaging AuthorityPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: japyconjugator
japyconjugatorA python package for conjugating verbs and adjectives in the Japanese languageUsage:importjapyconjugator.verbsasverbsverbs.conjugate('飲む',verbs.VerbClass.Godan,verbs.VerbForm.PlainPast,verbs.Polarity.Negative)# returns '飲まなかった'importjapyconjugator.adjectivesasadjadj.conjugate('元気',adj.AdjectiveClass.Na,adj.AdjectiveForm.PolitePast,adj.Polarity.Negative)# returns '元気じゃなかったです'adj.conjugate('暑い',adj.AdjectiveClass.I,adj.AdjectiveForm.Connective,adj.Polarity.Affirmative)# returns '暑くて'
Package: jaqs
IntroductionJAQS是一个开源量化策略研究平台，由交易专家和金融技术专家共同设计，实现了自动化信号研究、高效策略开发和多维度回测分析，支持Alpha、CTA、套利等策略的实现。JAQS从实战而来，经实盘检验，本地化开发部署，保障策略安全。Features通过统一的DataApi，获取、存储和管理数据。通过数学公式快速定义并分析信号；实现Alpha选股、CTA、套利等各类量化交易策略，对策略进行历史回测。通过统一的TradeApi，接入在线仿真系统进行仿真交易，跟踪策略表现。对接实盘通道实现实盘交易（当然需要用户搞定交易通道）。完全本地化，代码可以部署在任意个人电脑或服务器上，本地化运行，策略安全性有保证。模块化设计，通过标准的输入输出接口，做到数据与回测分离，交易与分析分离， 每一个环节都清晰可控，达到机构级别的标准化、流程化。面向实盘编程，数据构建时进行严格的对齐，回测时提供当前快照而不是数据查询接口，防止未来函数的出现；通过对策略类的精巧设计，使回测与实盘/仿真交易可使用同一套策略代码，始于开展严谨的研究、回测。Installation参见安装指南Quickstart参见用户手册.更多示例可在项目的example文件夹下找到，如example/alpha/select_stocks_pe_profit.py.查看完整文档，请访问：jaqs.readthedocs.ioContribute欢迎参与开发！可以通过Pull Request的方式提交代码。Questions如果您发现BUG，请到这里提交。如果有问题、建议，也可以到社区参与讨论。提问前，请查看如何正确提问。LicenseApache 2.0许可协议。版权所有(c)2017 quantOS-org.
Package: jaqs-fxdayu
# jaqs-fxdayu:股票多因子策略研究和分析框架jaqs拓展包## 介绍大鱼金融在jaqs官方版本的基础上,重点改进和优化了股票多因子研究部分的功能,帮助使用者更方便的去设计/评估和分析因子表现,优化因子效果，进行因子组合研究．主要包括:### 基础：- dataservice对jaqs底层dataapi的一个高级封装，提供了一些常用数据的快捷查询方法——如K线、交易日历、指数成分信息、行业分类信息等。- dataview可视为一个基于pandas的针对因子场景的数据库,方便因子的设计实现.jaqs_fxdayu改进了官方版本,提供更便捷灵活的因子数据查询和操作功能- digger单因子分析及绩效可视化.改进官方版本- performance因子选股研究中常用的绩效计算方法.改进官方版本### 拓展：- analysis单因子多维度分析.从因子ic,因子收益,选股潜在收益空间三个维度给出因子评价.新增模块- process提供常用的因子处理操作，如去极值，中性化等.新增模块- optimizer提供因子参数优化功能.新增模块- multi_factor提供多因子处理和组合功能.新增模块- dp针对A股因子研究和交易分析场景,提供了常用的小工具,如查询历史的交易日,历史的行业分类表等.新增模块- timingdigger择时信号研究,通过TimingDigger,可以在设计完选股因子和事件后,加入简单的择时出场条件对因子进行进一步测试.支持设置止盈,止损等出场方式.新增模块- hf_dataview针对高频因子(bar级别)和事件设计的数据操作和信号计算模块，功能和Dataview一致.新增模块## 安装和更新### 依赖该模块基于JAQS进行拓展，且只支持`python3`，需要安装：`jaqs>=0.6.11`jaqs的安装可以参考[JAQS官方文档](http://jaqs.readthedocs.io/zh_CN/latest/install.html)- 如果未安装过jaqs，从pip安装:```bash$ pip install jaqs```- 如果已安装过jaqs,进行更新:```bash$ pip install -U --no-deps jaqs```### 安装```bash$ pip install jaqs_fxdayu```### 更新当有新版本发布时，使用以下命令更新```bash$ pip uninstall jaqs_fxdayu$ pip install jaqs_fxdayu```## 使用该模块主要分为两部分：### 基础API：基于jaqs项目的原有模块进行替换和拓展。支持monkey_patch或直接从jaqs_fxdayu中导入。以使用Dataview为例：- monkey_patch:```import jaqs_fxdayujaqs_fxdayu.patch_all() # 需要放在任何import jaqs.* 之前from jaqs.data import DataViewdv = DataView()...```!!! Note该使用方法的好处是最大程度兼容原生JAQS的代码，方便迁移。- 直接导入:```from jaqs_fxdayu.data import DataViewdv = DataView()...```!!! Note该使用方法的好处是更为直观，且支持IDE的静态代码提示功能。### 拓展API：主要为独立开发，提供一些因子分析中常用，而jaqs中未实现的拓展功能。使用方法主要是从jaqs_fxdayu模块中导入:例如：```pythonfrom jaqs_fxdayu.research import Optimizer```### 文档[详细文档地址](http://jaqs-fxdayu.readthedocs.io/zh_CN/latest/)## 最新功能### 2018/7/15dataview添加财务数据时，允许指定财报类型### 2018/7/2TimingDigger/SignalDigger 支持根据group划分组内quantile预处理因子/信号数据时,若传入group参数,quantile计算会在组内进行而非在全数据集上进行.### 2018/6/9TimingDigger-create_event_report方法新增进出场点位画图功能新增hf_dataview-针对高频因子(bar级别)和事件设计的数据操作和信号计算模块，功能和Dataview一致.### 2018/6/5选股叠加择时研究(TimingDigger)新增功能,通过TimingDigger,可以在设计完选股因子和事件后,加入简单的择时出场条件对因子进行进一步测试.支持设置止盈，止损等出场方式.### 2018/4/19参数优化器(optimizer)新增功能,支持在待优化公式中调用自定义方法.### 2018/4/19新增process-mad,用于因子去极值.优化了行业市值中性化的算法效率.### 2018/4/16新增multi_factor-get_factors_ret_df,用于获取因子收益序列矩阵．同时，combine_factors新增基于最近一段时间的因子收益进行多因子加权组合的方法．### 2018/4/11新增dataview-refresh_data方法,可对数据集进行更新．### 2018/3/26新增dataservice文档.dataservice是对jaqs底层dataapi的一个高级封装，提供了一些常用数据的快捷查询方法——如K线、交易日历、指数成分信息、行业分类信息等。### 2018/3/26新增模块dp,针对A股因子研究和交易分析场景，提供了常用的小工具，如查询历史的交易日，历史的行业分类表等添加对performance模块的说明文档　performance:因子选股研究中常用的绩效计算方法### 2018/3/20作为单独模块发布，更新文档### 2018/3/19 更新新增dataview-fields可选字段查询方式，详见文档　dataview-fields可选字段查询方式## 技术支持- [GitHub](https://github.com/xingetouzi/jaqs-fxdayu/tree/master)- [访问大鱼学院获得更多的案例和金融量化知识](http://www.fxdayu.com)- 加qq群(372592121)进行讨论
Package: jaraco.clipboard
The only clipboard library for Python that supports text on all
three major platforms plus HTML on MacOS and HTML and images
on Windows.Similar topyperclipandclipboardandxeroxexcept attempts
to support more formats than just text.This library is just a thin wrapper around the best platform implementations:pyperclip for Linuxrichxerox for MacOSjaraco.windows for WindowsUsagejaraco.clipboardsupplies several functions in the clipboard module.
The most common are the copy and paste functions:fromjaracoimportclipboardclipboard.copy('some text')clipboard.paste()=='some text'Other functions includecopy/pastehtmlandimage.If not implemented on your platform, the functions will raise
NotImplementedError.
Package: jaraco.collections
Models and classes to supplement the stdlib ‘collections’ module.See the docs, linked above, for descriptions and usage examples.Highlights include:RangeMap: A mapping that accepts a range of values for keys.Projection: A subset over an existing mapping.KeyTransformingDict: Generalized mapping with keys transformed by a function.FoldedCaseKeyedDict: A dict whose string keys are case-insensitive.BijectiveMap: A map where keys map to values and values back to their keys.ItemsAsAttributes: A mapping mix-in exposing items as attributes.IdentityOverrideMap: A map whose keys map by default to themselves unless overridden.FrozenDict: A hashable, immutable map.Enumeration: An object whose keys are enumerated.Everything: A container that contains all things.Least, Greatest: Objects that are always less than or greater than any other.pop_all: Return all items from the mutable sequence and remove them from that sequence.DictStack: A stack of dicts, great for sharing scopes.WeightedLookup: A specialized RangeMap for selecting an item by weights.For EnterpriseAvailable as part of the Tidelift Subscription.This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.Learn more.
Package: jaraco.compat
Forward compatibility for Python packages,
allowing future constructs to be borrowed before they’re available in
the standard library.This package is generally deprecated in favor of more surgical
backports in separate packages.UsageImport functions from the appropriate pyXXcompat module in your python
code. When you’re eventually ready to upgrade beyond pyXX, you can
easily locate (with a grep) and replace those functions with the
canonical implementations.ExampleSay you want a namedtuple (introduced in Python 2.6) in a project which
supports Python 2.5 and greater:from py25compat import namedtuple
MyTuple = namedtuple('MyTuple', 'a b c')
mt = MyTuple(1,2,3)With jaraco.compat installed, this code will run on Python 2.5 and
greater. When the project is ready to move to Python 2.6, one can easily
grep for py25compat and make the necessary replacements with minimal
impact on the code. In this case:from collections import namedtuple
MyTuple = namedtuple('MyTuple', 'a b c')
mt = MyTuple(1,2,3)
Package: jaraco.crypto
A set of cryptographic routines and utilities
implemented in pure Python.AcknowledgementsMany of the ideas and much of the code has been adapted from or inspired by
several other projects, including:The code repository was originally a fork of thectypescrypto project. The code history includes the
full history of the ancestral project.The blowfish code was adapted from a module contributed to the community
by Michael Gilfix.
Package: jaraco.develop
This package includes a collection of libraries and scripts used byjaracoand many of theprojects maintained by jaraco.It includes facilities for managing scores of repositories with SCM tools like Git, working with Read the Docs, determining release versions from pertinent changes, synchronizing related histories, automatically resolving known merge conflicts, and more.Many of the modules in this package are executable usingrunpy(e.g.python-mjaraco.develop.macos-build-python).Although this package is built on assumptions about jaraco’s workflow, these routines are provided here for shared use across those projects, transparency of operations, and for potential re-use. Contributions and feedback are welcome.
Package: jaraco.fabric
Fabric tasks and helpers. Includes modules implementing
Fabric tasks.The easiest way to use jaraco.fabric is to install it and
invoke it usingpython-mjaraco.fabric. For example,
to list the available commands:$ python -m jaraco.fabric -lOr to install MongoDB 3.2 on “somehost”:$ python -m jaraco.fabric -H somehost mongodb.distro_install:version=3.2
Package: jaraco.financial
jaraco.financialimplements tools for financial management, particularly
around Open Financial Exchange and Microsoft Money. These scripts help
facilitate the continued use of Money using the free, sunset release, by
enabling mechanical downloads of OFX data from institutions that support OFX.Getting StartedThe primary use of this package is theofxcommand. After installing, runofx –helpfor usage. Before using the project, you will want to supply
institution and account information. See below for details on defining these
input files.This project is still a work in progress, but if you think you might find
it useful, don’t hesitate to contact the author for help.Planned ChangesThe author plans to add some of the following features:Integrate some of the most common institutions.Accounts FileThe “ofx download-all” command ofjaraco.financialwill retrieve the
OFX transactions in a batch for a group of accounts defined in a YAML file.
Currently, that file must be located in ~/Documents/Financial/accounts.yaml.
The file should be a list of objects,
each withinstitutionandaccountattributes. It should also have atypeproperty of “checking”, “savings”, “creditline”, or other appropriate
OFX type. The institution must match exactly an institution as defined below.
Here is an example accounts.yaml:- institution: Bank of America
  account: "12345679"
  type: savings

- institution: Wells Fargo
  account: "872634126"
  type: moneymrkt

- institution: Chase (credit card)
  account: "4000111122223333"
  username: myusernameTheusernameattribute must be included if the username of the local user
(running the ofx command) differs from the account name on the account.Institutions DefinitionInstitution definitions can be provided in a YAML format in the file~/Documents/Financial/institutions.yaml. The following is an example
definition for a credit card:Chase (credit card):
  caps:
   - SIGNON
   - CCSTMT
  fid: "10898"
  fiorg: B1
  url: https://ofx.chase.comTo check that your institutions are being loaded correctly, use theofxlist-institutionscommand.
Package: jaraco.geo
Geographic support libraryRequirementsThe current geotrans2 dynamic libraries are currently built only
for Windows, so support for other platforms is currently not present.
However, the DMS class should be usable in a pure Python environment.Contentsjaraco.geoincludes an object named DMS for storing and manipulating
values in degrees, minutes, and seconds. See the jaraco.geo module for
details and documentation.jaraco.geoalso implements geotrans2 by theNGA. See the tests directory in the
repository for sample usage.
Package: jaraco.keyring
Remote Agent KeyringImplements a remote agent keyring for use over SSH connections.Requires OpenSSH 6.7.To use, on the host machine, install jaraco.keyring and invoke
the server:python -m jaraco.keyring.serverThat starts a server listening only on localhost:4273.Then, connect to the remote host and forward the traffic back to
the keyring server:ssh -R /tmp/keyring.sock:localhost:4273 remote_hostThis command creates a unix domain socket at /tmp/keyring.sock
which only that user can access.Then, on that host, configure keyring to use the remote agent
backend. For example,keyring -b jaraco.keyring.RemoteAgent get SERVICE USERNAMEThe remote agent backend will request the password over the
tunnel, where the server will request the password using the
default configuration.
Package: jaraco.media
concatFFmpeg provides a routine toconcatenate media files.
Unfortunately, the UI for that routine is so bad that even ffmpeg
provides multiple, platform-specific techniques to generate the input.jaraco.media.compat, in contrast, takes a number of input files
and optionally an output file and input filter, creates the input file
in its required syntax and then runs ffmpeg against that file. Example:$ python -m jaraco.media.concat /Volumes/drone/DCIM/100MEDIA/DJI_*.MP4 -i '(17|18|19)' -o /Volumes/Public/Flights/2022-02-20.mp4srt-concatConcatenate SRT files, updating the offsets based on the durations
of their associated media files. Example:$ python -m jaraco.media.srt-concat /Volumes/Drone/DCIM/100MEDIA/DJI_00*.SRT -i '(17|18|19)' -o /Volumes/Public/Flights/2022-02-20.srtspliceExtract timestamps from a video.$ python -m jaraco.media.splice infile.mp4 outfile.mp4 00:00:00-01:32:46 01:47:20-01:49:17TroubleshootingIf you see “libaacs not initialized!” or “aacs_open() failed”,
remember that you have to re-register with the latest
beta key each month.Seethis blogfor details.
Package: jaraco.modb
jaraco.modbis a small, pure-Python library for persisting Python
objects toMongoDB.Manual Usagejaraco.modbfacilitates usingjsonpickleto produce MongoDB-friendly
representations of pickleable Python objects for easy storage in a MongoDB
database.One may simply encode and decode Python objects to MongoDB
BSON-friendly representations:class MyObject(object):
    def __init__(self, val):
        self.val = val

import jaraco.modb
import pymongo
mongo_collection = pymongo.MongoClient().mydb.mycollection
val = MyObject(3)
# save the object to the DB
id = mongo_collection.save(jaraco.modb.encode(val))
# retrieve the object from the DB
new_val = jaraco.modb.decode(mongo_collection.find_one(id))
assert isinstance(new_val, MyObject)
assert new_val.val == 3A more detailed tutorial is nowpublished as a Jupyter Notebook.Automatic Usagejaraco.modbalso provides an SON Manipulator suitable for automatically
encoding arbitrary objects for a pymongo.Database:jaraco.modb.SONManipulator.install(mongo_collection.database)
mongo_collection.save({'val': val})Unfortunately, due to a limitation with the API of the SONManipulator,
it’s not possible to save a custom object as the document itself (the
document must always be a dict).
Package: jaraco.net
jaraco.netprovides miscellaneous utility functions used across
projects developed by the author.DNS Forwarding Servicejaraco.netincludes a DNS forwarding service for Windows. This is
because Microsoft appears to be unable to bind to 6 to 4 and Teredo
addresses with their production DNS Server. After installingjaraco.net, the service executable is available as%PYTHON%Scriptsdns-forward-service.exe. In addition to the
documented install/uninstall/start/stop commands, it’s also possible
to configure a bind address with the -b option. For example:dns-forward-service -b 2002:41de:a625::41de:a625 installThe service will be installed and the bind address will be stored inHKLMSoftwarejaraco.netDNS Forwarding ServiceListen Address. Note
that the service must be restarted to recognize an updated bind address.