Saravanan666/pypi-org huggingface dataset:
Package: jtalkbot
jtalkbotA Discord bot talking JapaneseDiscord のボイスチャンネルのチャットに書き込まれたテキストを読み上げるボットプログラムです。動作環境以下のプログラム／ライブラリが正常に動作しているシステムが必要です。Python 3.10 以降Open JTalk（open_jtalkコマンド）Opus ライブラリ（discord.pyの音声機能に必要）Ubuntu でのインストール例Ubuntu 22.02 でのインストール例です。$ sudo apt update
$ sudo apt install python3.10 python3.10-venv python3.10-dev libffi-dev libopus0 open-jtalk open-jtalk-mecab-naist-jdic hts-voice-nitech-jp-atr503-m001open_jtalkコマンドが/usr/bin/に、辞書が/var/lib/mecab/dic/open-jtalk/naist-jdic/に、HTS ボイスファイルnitech_jp_atr503_m001.htsvoiceが/usr/share/hts-voice/nitech-jp-atr503-m001/にインストールされます。追加の音声ファイルがある場合はこれに倣うとよいでしょう。macOS でのインストール例macOS Sonoma 14.2 でのインストール例です。ここではHomebrewを使っています。% brew update
% brew install opus open-jtalkopen_jtalkコマンドが/opt/homebrew/bin/に、辞書が/opt/homebrew/opt/open-jtalk/dic/に、HTS ボイスファイル（複数）が/opt/homebrew/opt/open-jtalk/voice/(m100|mei)/にインストールされます。追加の音声ファイルがある場合はこれに倣うとよいでしょう。Dockerボットをすぐに使える Docker イメージを公開しています。emptypage/jtalkbot - Docker Image | Docker Hubディレクトリ/srv/jtalkbotでプログラムを起動します。このディレクトリをローカルディレクトリにマウントすると.envファイル（後述）を置いたりログを確認したりできます。その他の環境では Open JTalk をソースからビルドする必要があるかもしれません。インストールPyPI からのインストール$ pip install jtalkbotBitbucket リポジトリからのインストール$ pip install git+https://bitbucket.org/emptypage/jtalkbot.git依存関係が設定されているのでプログラムの実行に必要なモジュールはあわせて自動的にインストールされます。インストールが終わると、jtalkbotコマンドが使えるようになっています。開発者用メモインストールに[dev]オプションを追加すると開発用のモジュール（build、setuptools-scmなど）もインストールされます。$ git clone https://bitbucket.org/emptypage/jtalkbot.git
$ cd jtalkbot
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install -e '.[dev]'使いかたDiscord でのボットアカウントの登録ポットユーザーとして Discord に接続するにはあらかじめDiscord Developer Portalでボットを登録する必要があります。ボットの登録については下記の資料等をご参照ください。discord.py ドキュメント、Creating a Bot Accountdiscord.py ドキュメント、A Primer to Gateway IntentsDiscord Bot Portal JP、Discord Botアカウント初期設定ガイド for Developerボットで明示的に設定する権限（Privileged Gateway Intents）は Messsage Content Intent が必要です。ポータルの設定で有効にしておいてください。また、ボットの設定からは「トークン（token）」を取得できます。この情報はボットを起動させるのに必要なので控えておいてください。環境変数ボットに必要な設定は環境変数から与えます。グローバルに設定したり起動時にコマンドラインで与えてもよいですが、カレントディレクトリに.envというファイルを作りこれに以下のように環境変数を記述することができます。DISCORD_TOKEN = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
OPEN_JTALK_FLAGS = -r 1.2 -g 5.0利用できる環境変数は以下の通りです。以前のバージョンであった設定ファイルは廃止しました。DISCORD_TOKENボットのトークンを指定します。環境変数のうち、DISCORD_TOKENは必須です。Developer Portal でかならず取得しておいてください。OPEN_JTALK_FLAGS読み上げ音声の生成に使うopen_jtalkコマンドに渡すオプション引数を指定できます。これにより使用する音声ファイルや読み上げ速度をカスタマイズすることができます。コマンドラインオプションによっては Discord の音声フォーマットの仕様に合わせる都合上無視されます（サンプリング周波数など）。起動jtalkbotコマンドを起動するとログを表示しながら待機し続けます。% jtalkbot
INFO:jtalkbot.__main__:jtalkbot ...
INFO:jtalkbot.__main__:successfully loaded opus library: /opt/homebrew/lib/libopus.dylib
INFO:discord.client:logging in using static token
INFO:discord.gateway:Shard ID None has connected to Gateway (Session ID: ...).ボットを停止するときはCtrl+Cを押します。ボットの動作ボットアカウントが招待されている Discord サーバー（ギルドともいいます）のボイスチャンネルにだれかが接続したとき、同じボイスチャンネルに同時に接続します。接続中は、そのボイスチャンネルのチャットに投稿されたメッセージを読み上げます。ボイスチャンネルからユーザーがいなくなると自身も離脱します。現時点ではこれだけです。参考資料Discord Developer Portal Documentationdiscord.pyOpen JTalk免責・許諾MIT License です。LICENSEをお読みください。
Package: jtalkpy
jtalkpyPython rapper module of open_jtalkInstallpipinstalljtalkpyIn order to use this module,open_jtalkcommand must be able to use.
SeeOpenJtalk.For Ubuntu systemsudoapt-getinstallopen-jtalkopen-jtalk-mecab-naist-jdichts-voice-nitech-jp-atr503-m001dict_dirshould be/var/lib/mecab/dic/open-jtalk/naist-jdicvoice_fileshould be/usr/share/hts-voice/nitech-jp-atr503-m001/nitech_jp_atr503_m001.htsvoiceFor other systemsPleanse install fromsouce.VOICE FILESThere are many open source HTS voice model files.This page(Japanse) introduces many models.UsagefromjtalkpyimportJtalkdict_dir="/var/lib/mecab/dic/open-jtalk/naist-jdic"voice_file="/usr/share/hts-voice/nitech-jp-atr503-m001/nitech_jp_atr503_m001.htsvoice"#jtalk=Jtalk(dict_dir,voice_file)jtalk.from_string("こんにちは、世界",output_file="/home/ubuntu/jtalk_wavs/hello.wav")Open Jtalk options can be set at initialization ofJtalkobject.
And whenfrom_stringis called, you can also overwrite these options temporary.ContributionFeel free to create pull request.Fork it (http://github.com/yhay81/jtalkpy/fork)Create your feature branch (git checkout -b my-new-feature)Commit your changes (git commit -am 'Add some feature')Push to the branch (git push origin my-new-feature)Create new Pull RequestLicenceMIT
Package: jta.qsutil
The specifications that define the makeup of URLs arevery flexible when it comes to what makes up the query string portion (the partafter the `?`). Many web services have taken the initial recommendation of using`key=value` pairs to another level by allowing complex structures to berepresented for a sacrifice in parsing performance.The goals of this project are:* Be able to process sequence and sub-mapping hints in URL query string keys.* Only shape values into sequences if there are multiple occurrences of the samekey or the key contains a sequence hint.* Remain standards-compliant with URI and URL RFC specs.* Provide an API similar to Python 3's standard urllib.* Be Python 2 and 3 compatible without relying on a compatibility library.
Package: jtb
jtbStill in developmentfromcatimportgetCodegetCode(imp="numpy")MIT LicenseCopyright (c) 2022 Kevin WalchkoPermission 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: jtes
Implementation of the Jaccard Timespan Event Score (JTES)This is a reference implementation of the Jaccard Timespan Event Score (JTES) describedhere.Jaccard-Timespan-Event-Score (JTES) is a timespan score based on the Jaccard index also known as Intersection over Union (IoU).This index is designed to score events that are defined by a timespan defined by two timestamps(t0, t1).Score Goals:Score is in range[0-1], where 0 is lowest and 1 best.False-Positives and False-Negatives are equally badIf a true event spans over multiple predicted events, the result is averagedIf the predicted event spans over multiple true events, the result is accounted accordinglyIflen(y_true) == 0 and len(y_pred) > 0,score = 0Iflen(y_true) > 0 and len(y_pred) == 0,score = 0Ifordered(y_true) == ordered(y_pred),score = 1Overlap iny_trueis not allowedJaccard index in general is defined as |A ∩ B| / |A ∪ B|.InstallThe jtes package is available onpypipip install jtesInstall from source (alternative)python setup.py installUsageThejaccard_timespan_event_scorefunction expects twonumpyarraysy_trueandy_pred.
The events are defined asnp.datetime64pairs.importnumpyasnpfromjtesimportjaccard_timespan_event_scorey_true=np.array([(np.datetime64('1900-01-01T00:00:00'),np.datetime64('1900-01-01T01:00:00')),(np.datetime64('1900-01-01T03:00:00'),np.datetime64('1900-01-01T04:00:00'))])y_pred=np.array([(np.datetime64('1900-01-01T00:00:00'),np.datetime64('1900-01-01T01:00:00')),(np.datetime64('1900-01-01T03:00:00'),np.datetime64('1900-01-01T05:00:00')),])# Returns 0.75jaccard_timespan_event_score(y_true,y_pred)LicenseMIT licensed as found in theLICENSEfile.
Package: j-test
A sample Python projectA sample project that exists as an aid to thePython Packaging User
Guide'sTutorial on Packaging and Distributing
Projects.This project does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.The source for this project is available here.Most of the configuration for a Python project is done in thesetup.pyfile,
an example of which is included in this project. You should edit this file
accordingly to adapt this sample project to your needs.This is the README file for the project.The file should use UTF-8 encoding and can be written usingreStructuredTextormarkdownwith the appropriatekey set. It will be used to generate the project webpage on PyPI and will be
displayed as the project homepage on common code-hosting services, and should be
written for that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not a
good idea, although a simple “What's New” section for the most recent version
may be appropriate.
Package: jthon
This is a utility to make working with JSON files easier.Installationpip install jthonUsageimportjthona_new_dict={'fruits':{'pineapple':0,'apples':2,'orange':4,'pears':1}}example=jthon.load('fruits',a_new_dict)find=example.find(key='apple',exact=False)forfoundinfind:print("I've found '{}', with a value of '{}'.".format(found.key,found.value))print("{}".format(found.siblings))print("There are{}oranges in the dict!".format(example.get('fruits').get('orange')))example['fruits']['peach']=1example.save()print(example)More examples can be found in the examples folderRequirementspython3.6 >AuthorsCasuallyCalm-GitHubProbsJustin-GitHubLicenseThis project is licensed under MIT - see the [LICENSE](LICENSE.txt) file for details
Package: jtime
jtime - A simple tool that provides git-aware time-tracking against JIRA
issues without having to leave the command-line.Basic Workflow$ git checkout -b SOC-2355
$ jtime mark
Set mark at 4:50 PM on SOC-2355 by changing status to "In Progress"

# Work for 5 minutes

$ jtime status
(SOC-2355) Backend: Implement notification message types
  Status: In Progress as of Mon 02/24/14 04:50 PM
  Assignee: allan.glen
Time logged (0m):
  No worklogs
5m elapsed (use "jtime log ." to log elapsed time or "jtime log <duration> (ex. 30m, 1h etc.)" to log a specific amount of time)

# Log 5 minutes of time (or just use 'jtime log .' to log all elapsed time)
$ jtime log 5m
Logged 5m against issue SOC-2355

# Do some more work (22 minutes) but get asked to look at another branch.  Log time on the current branch before switching.

$ jtime log .
Logged 22m against issue SOC-2355

# Checkout the other branch and log some time (but don't mark the ticket since it isn't mine)

$ git checkout API-1234
$ jtime log 30m
Logged 30m against issue API-1234

# Back to work on SOC-2355..  mark it after checkout to start counting from now
$ git checkout SOC-2355
$ jtime mark
Set mark at 18:14:23 on SOC-2355 by touching last work log

# 68 minutes pass..

$ jtime status
(SOC-2355) Backend: Implement notification message types
  Status: In Progress as of Mon 02/24/14 04:50 PM
  Assignee: allan.glen
Time logged (36m):
  Mon 02/24/14 03:52 PM - allan.glen (5m): Working on issue SOC-2355
  Mon 02/24/14 04:44 PM - allan.glen (22m): Working on issue SOC-2355
68m elapsed (use "jtime log ." to log elapsed time or "jtime log <duration> (ex. 30m, 1h etc.)" to log a specific amount of time)

$ jtime log . -m "Done for the day.."
Logged 68m against issue SOC-2355 (Done for the day..)

$ jtime status
(SOC-2355) Backend: Implement notification message types
  Status: In Progress as of Mon 02/24/14 04:50 PM
  Assignee: allan.glen
Time logged (36m):
  Mon 02/24/14 03:52 PM - allan.glen (5m): Working on issue SOC-2355
  Mon 02/24/14 04:44 PM - allan.glen (22m): Working on issue SOC-2355
  Mon 02/24/14 05:14 PM - allan.glen (68m): Done for the day..
0m elapsed

# Go home for the day.  Mark the ticket the next morning and keep rolling..
$ jtime mark
Set mark at 08:35 AM on SOC-2355 by touching last work logInstallationpip install jtime
jtime config
Package: jtimer
Timer AppDEVELOPMENT IN PROGRESSDissatisfied with the selection of timer applications available in linux, I built my own.  It maintains a simple local db in /tmpThe application is fairly simple:user can specify a list of different timers.timers can be renamed.timers can be started / stopped concurrently.on startup the timers will resume the count from the last start.timers should not cross over days. automatic stop times at 23:59:59 for forgotten timers.daily statistics viewInstallationpipinstalljtimer# not timerUsagejtimerPlanned Future developmentstimer linked triggerstimer event view
Package: jtlvi
JTLVI MESSAGE FORMAT: JUST TLV IT!https://github.com/rfinnie/jtlviAboutThis is the Python 3 reference implementation of JTLVI, a simple binary
message format.Example>>> from struct import pack
>>> jtlvi.dumps([(1, pack('!I', 123)), (2, b'Hello!')])  # Native format is list of tuples
b'\xd4\x0e\xc4\xf5\x00\x01\x00\x04\x00\x00\x00{\x00\x02\x00\x06Hello!\xff\xff\x00\x00'
>>> jtlvi.dumps({999: pack('!f', 1.2)})  # Dicts can also be supplied
b'\xd4\x0e*q\x03\xe7\x00\x04?\x99\x99\x9a\xff\xff\x00\x00'
>>> jtlvi.loads(b'\xd4\x0e*q\x03\xe7\x00\x04?\x99\x99\x9a\xff\xff\x00\x00')
[(999, b'?\x99\x99\x9a')]LicenseCopyright (c) 2018 Ryan FinniePermission 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: jtmpl
jtmpljtmpl is a commandline app for quickly running jsontemplate. This lets you generate templated files without having to code, making jsontemplate more useful for build processes, system administration, and static HTML page generation.jtmpl happens to be implemented in python, but you don’t need to be using python in your project to take advantage of it.For more about JSON Template, see:http://json-template.googlecode.comAn Examplejtmpl is useful for when you have some type of form you want filled out with a data file that you already have. The data should be in JSON or easily convertable to JSON.The example included with json-template is a long story about a music app, but let’s make a quick address book and a letter we want to send to all the people in the address book:{.repeated section names}

Dear {@},

I think you are really awesome.

Sincerely,
{my_name}

--------------------------- CUT HERE --------------------------------

{.end}That was the “template file”. Here’s the JSON data:{
        "my_name": "Poppy",
        "names": [
                "Meghan",
                "Andy",
                "Josh",
                "Eden",
                "Andy",
                "Mateusz"
        ]
}Put the template into letter.jtmpl.txt and the json data into names.json and run it like this:$ jtmpl names.json letter.jtmpl.txtyou will get:Dear Meghan,

I think you are really awesome.

Sincerely,
Poppy

--------------------------- CUT HERE --------------------------------


Dear Andy,

I think you are really awesome.

Sincerely,
Poppy

--------------------------- CUT HERE --------------------------------


Dear Josh,

I think you are really awesome.

Sincerely,
Poppy

--------------------------- CUT HERE --------------------------------


Dear Andy,

I think you are really awesome.

Sincerely,
Poppy

--------------------------- CUT HERE --------------------------------


Dear Eden,

I think you are really awesome.

Sincerely,
Poppy

--------------------------- CUT HERE --------------------------------


Dear Mateusz,

I think you are really awesome.

Sincerely,
Poppy

--------------------------- CUT HERE --------------------------------See the JSON Template documentation if you want to do anything more complicated.http://json-template.googlecode.com
Package: jtnnencoder
jtnnencoderPip installable version of the Junction Tree Variational Autoencoderhttps://arxiv.org/abs/1802.04364.
The original, full repository can be found here:https://github.com/wengong-jin/icml18-jtnnIntended to be used as a simple interface for generating molecular features for molecules based on JTNN latent vectors.Install$ pip install jtnnencoder
$ pip install torchYou will also need rdkit:$ conda install -c rdkit rdkitUsefrom jtnnencoder import JTNNEmbed

smiles = ['CC1(C)[C@H]2C[C@H](C/C=C\CCCC(=O)O)[C@@H](NC(=O)c3csc4ccc(O)cc34)[C@@H]1C2']
jtnn = JTNNEmbed(smiles)
features = jtnn.get_features()featuresis then a numpy ndarray of dimension (n_smiles x n_features).
Package: jto
JTO ConverterDescriptionConvert json object to dataclass and vice versa.
This package also provides tool for converting json object to dataclass template.RequirementsRequired structure of dataclass fieldfield_name:Optional[FieldType]=field(default=Undefined,metadata={'name':'json_field_name','required':False,'validate':validate_function})field_name[required]can be any variable name.Optional[optional]indicates that the field is nullable.FieldType[required]should be strongly typed.For example in case of field containing the list it should look like thisList[SomeClass]default[required]sets default field's value. Set toUndefinedby default.name[required]is the name of the field in original json.required[required]markedTrueif the field is required in the provided json.validate[optional]is the function that validates the field's value.
Validate function supports fields with simple types likestr,int,float,boolandListof simple types.
The function has one argument - field's value. It should returnTrueif the value is valid andFalseotherwise.
Example lambda function:lambda x: x > 0Additional rulesIf dataclass field value set toUndefinedthen it will not be converted to json fieldIf dataclass field type is notOptionalthen all dataclass fields withNonevalues will not be converted to json fieldsExamplesConvert json object to class objectsfromdataclassesimportdataclass,fieldfromtypingimportList,OptionalfromjtoimportJTOConverterfromjto.undefined_fieldimportUndefineddata={"status":200,"data":{"first":"qwer","last":"qwer","test":[{"f1":"1"},{"f1":"2"}]}}@dataclassclassTest:f1:Optional[str]=field(default=Undefined,metadata={'name':'f1','required':False})@dataclassclassData:first:Optional[str]=field(default=Undefined,metadata={'name':'first','required':False,'validate':lambdax:x=='qwer'})last:Optional[str]=field(default=Undefined,metadata={'name':'last','required':False})test:Optional[List[Test]]=field(default=Undefined,metadata={'name':'test','required':False})@dataclassclassResponse:status:Optional[int]=field(default=Undefined,metadata={'name':'status','required':False})data:Optional[Data]=field(default=Undefined,metadata={'name':'data','required':False})dataclass_object=JTOConverter.from_json(Response,data)print(dataclass_object)dataclass_object.status=Nonejson_object=JTOConverter.to_json(dataclass_object)print(json_object)Get class templates from json objectfromjto.dataclass_generatorimportDataclassGeneratordata={"status":200,"data":{"first":"foo","last":"bar","struct":[{"f1":"1"},{"f1":"2"}]}}classes=DataclassGenerator()classes_str=classes.build_classes_string('Response',data)print(classes_str)
Package: jtorch
JTorch: 一个全兼容 PyTorch 接口的高性能动态编译深度学习框架JTorch 是一个完全兼容 PyTorch 接口的深度学习框架，同时基于 Jittor 元算子与统一计算图特性的加持，实现高性能动态编译，同时，用户原来使用的PyTorch代码，不需要进行任何修改，即可加速运行。总结而言，JTorch具有以下几点优势：零成本：完全兼容原生 PyTorch 接口， 用户代码不需要作任何更改。速度快：通过统一计算图执行方法，JTorch可以实现对代码的动态编译以及加速，相比原版 PyTorch拥有更好的性能。支持硬件多：JTorch底层通过元算子抽象，可以快速兼容适配多种人工智能芯片。兼容生态： 对原有 PyTorch 生态形成兼容，如各种第三方开发的 PyTorch 模型库。兼容计图： JTorch完全兼容计图，计图中的接口可以混合使用，性能高。完全自主可控： JTorch 具有完全的自主知识产权，用户完全不需要安装 Torch，即可直接使用。JTorch相关连接：GithubJittor 论坛即时通信: QQ Group(761222083)安装与测试安装方法如下：python3 -m pip install jtorch注意，请使用python3.7及以上的版本运行简单测试：python3 -m jtorch.test.test_tutorial快速入门使用 JTorch 实现简单动态网络（PyTorch兼容）# -*- coding: utf-8 -*-importrandomimporttorchimportmathclassDynamicNet(torch.nn.Module):def__init__(self):"""In the constructor we instantiate five parameters and assign them as members."""super().__init__()self.a=torch.nn.Parameter(torch.randn(()))self.b=torch.nn.Parameter(torch.randn(()))self.c=torch.nn.Parameter(torch.randn(()))self.d=torch.nn.Parameter(torch.randn(()))self.e=torch.nn.Parameter(torch.randn(()))defforward(self,x):"""For the forward pass of the model, we randomly choose either 4, 5and reuse the e parameter to compute the contribution of these orders.Since each forward pass builds a dynamic computation graph, we can use normalPython control-flow operators like loops or conditional statements whendefining the forward pass of the model.Here we also see that it is perfectly safe to reuse the same parameter manytimes when defining a computational graph."""y=self.a+self.b*x+self.c*x**2+self.d*x**3forexpinrange(4,random.randint(4,6)):y=y+self.e*x**expreturnydefstring(self):"""Just like any class in Python, you can also define custom method on PyTorch modules"""returnf'y ={self.a.item()}+{self.b.item()}x +{self.c.item()}x^2 +{self.d.item()}x^3 +{self.e.item()}x^4 ? +{self.e.item()}x^5 ?'# Create Tensors to hold input and outputs.x=torch.linspace(-math.pi,math.pi,2000)y=torch.sin(x)# Construct our model by instantiating the class defined abovemodel=DynamicNet()# Construct our loss function and an Optimizer. Training this strange model with# vanilla stochastic gradient descent is tough, so we use momentumcriterion=torch.nn.MSELoss(reduction='sum')optimizer=torch.optim.SGD(model.parameters(),lr=1e-8,momentum=0.9)fortinrange(60000):# Forward pass: Compute predicted y by passing x to the modely_pred=model(x)# Compute and print lossloss=criterion(y_pred,y)ift%2000==1999:print(t,loss.item())# Zero gradients, perform a backward pass, and update the weights.optimizer.zero_grad()loss.backward()optimizer.step()# print(torch.liveness_info())print(f'Result:{model.string()}')联系我们电子邮件：jtorch@qq.com提出issue：https://github.com/jittorch/jtorch/issuesQQ 群：761222083版权声明如LICENSE.txt文件中所示， JTorch 使用Apache 2.0版权协议。
Package: jtow
jtowJWST Time series Observation Wrapper.This code is designed to run the JWST pipeline with some modifications and custom steps.lFree software: MIT licenseDocumentation:https://jtow.readthedocs.io.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-01-01)First release on PyPI.
Package: jt-package-name
jt_package_name (Python 3.7+)Author:Joe Tilsed| Created: 28.10.2019 | Last Updated: 28.10.2019Requirements:setuptoolswheeltwineHelpful Articles:Packaging Python Projects â€” Python Packaging User GuideFile Structure:package_nameLICENSEREADME.mdGenerating the distribution:python setup.py sdist bdist_wheelUploading the distributions to PyPi:TESTpython -m twine upload --repository-urlhttps://test.pypi.org/legacy/dist/*PRODpython -m twine upload dist/*
Package: jt-py-first-package
#Creating and adding your own custom Python packages to PyPi (Python 3.7.2)
######Author:Joe Tilsed| Created: 04.02.2019 | Last Updated: 04.02.2019###Requirements:setuptoolswheeltwine###Helpful Articles:Packaging Python Projects â€” Python Packaging User Guide###File Structure:README.md###Generating the distribution:python setup.py sdist bdist_wheel###Uploading the distributions to PyPi:TESTpython -m twine upload --repository-urlhttps://test.pypi.org/legacy/dist/*PRODpython -m twine upload --repository-urlhttps://pypi.org/legacy/dist/*