Saravanan666/pypi-org huggingface dataset:
Package: rotograd
RotoGradA library for dynamic gradient homogenization for multitask learning in PytorchInstallationInstalling this library is as simple as running in your terminalpipinstallrotogradThe code has been tested in Pytorch 1.7.0, yet it should work on most versions. Feel free to open an issue
if that were not the case.OverviewThis is the official Pytorch implementation of RotoGrad, an algorithm to reduce the negative transfer due
to gradient conflict with respect to the shared parameters when different tasks of a multitask learning
system fight for the shared resources.Let's say you have a hard-parameter sharing architecture with abackbonemodel shared across tasks, and
two different tasks you want to solve. These tasks take the output of the backbonez = backbone(x)and fed
it to a task-specific model (head1andhead2) to obtain the predictions of their tasks, that is,y1 = head1(z)andy2 = head2(z).Then you can simply use RotateOnly, RotoGrad. or RotoGradNorm (RotateOnly + GradNorm) by putting all parts together in a single model.fromrotogradimportRotoGradmodel=RotoGrad(backbone,[head1,head2],size_z,normalize_losses=True)where you can recover the backbone and i-th head simply callingmodel.backboneandmodel.heads[i]. Even
more, you can obtain the end-to-end model for a single task (that is, backbone + head), by typingmodel[i].As discussed in the paper, it is advisable to have a smaller learning rate for the parameters of RotoGrad
and GradNorm. This is as simple as doing:optimizer=nn.Adam([{'params':m.parameters()}formin[backbone,head1,head2]]+[{'params':model.parameters(),'lr':learning_rate_rotograd}],lr=learning_rate_model)Finally, we can train the model on all tasks using a simple step function:importrotograddefstep(x,y1,y2):model.train()optimizer.zero_grad()withrotograd.cached():# Speeds-up computations by caching Rotograd's parameterspred1,pred2=model(x)loss1,loss2=loss_task1(pred1,y1),loss_task2(pred2,y2)model.backward([loss1,loss2])optimizer.step()returnloss1,loss2ExampleYou can find a working example in the folderexample. However, it requires some other dependencies to run (e.g.,
ignite and seaborn). The example shows how to use RotoGrad on one of the regression problems from the manuscript.CitingConsider citing the following paper if you use RotoGrad:@inproceedings{javaloy2022rotograd,title={RotoGrad: Gradient Homogenization in Multitask Learning},author={Adri{\'a}n Javaloy and Isabel Valera},booktitle={International Conference on Learning Representations},year={2022},url={https://openreview.net/forum?id=T8wHz4rnuGL}}
Package: rotom
Custom functionsTable of contentsUtilityHash fileHash stringUtilityHash filerotomhash-file[target_file]Supported options included:algo: Type of hash algorithm [Default: md5]length: Length of final output, truncated by shake_256, < 0 for full hashHash stringrotomhash-str[input_str]Supported options included:algo: Type of hash algorithm [Default: md5]length: Length of final output, truncated by shake_256, < 0 for full hash
Package: rotop
rotopAbouttop command for ROS 2FeaturesReplace a long displayed name for ROS 2 command and Python command, especially for component container:sob: Normaltopcommand : "component_container":sob: Normaltop -corhtop: "/very/long/path/component_containervery-long-options":smile: Myrotopcommand: "{node_name}, {name_space}"Filter functioncsv file loggerGraph plotterHow to usepip3installrotop

rotop
rotop--gui# usage: rotop [-h] [--interval INTERVAL] [--filter FILTER] [--csv] [--gui] [--num_process NUM_PROCESS]# options:#   -h, --help            show this help message and exit#   --interval INTERVAL#   --filter FILTER#   --csv#   --gui#   --num_process NUM_PROCESScdrotop
python3main.pyScreen ShotCUI modeGUI mode
Package: rotplot
rotplotPackage to rotate 3D surfaces and 3D curvesRot3DSurfFonction that rotate a three-dimensional surface by an user-defined angle, and around an axis.Rot3DSurf(surf3D,angle,nR)

surf3D : Equation of the surface 
nR = 0 Rotation around the x axis
nR = 1 Rotation around the y axis
nR = 2 Rotation around the z axisRot3DFonction that rotate a two-dimensional surface (like an ellipse in space) by an user-defined angle, and around a given axis.Rot3D(surf,angle,nR)

surf : Equation of the 3D curve 
nR = 0 Rotation around the x axis
nR = 1 Rotation around the y axis
nR = 2 Rotation around the z axisExamplesimport sys
sys.path.append(".")

from rotplot.rotplot import rot_3D, rot_3D_surf

from mpl_toolkits.mplot3d import Axes3D 

import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['legend.fontsize'] = 10


fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_axis_on()
ax.set_xlim(-20, 20)
ax.set_ylim(-20, 20)

a=5
b=3.4
c = np.sqrt(a**2 - b**2)
R=a


u = np.linspace(0, 2*np.pi, 100)
v = np.linspace(-1, 1.73, 100)
U,V = np.meshgrid(np.linspace(0, 2*np.pi, 100),np.linspace(-1.5, 1.5, 100))

Cyclide=[-c*np.cosh(V)+( (-4+a*np.cosh(V))*(-a*np.cos(U)+c*np.cosh(V)) )/( -c*np.cos(U) + a*np.cosh(V) ),
    ( b*( -4 + a*np.cosh(V) ) * np.sin(U) ) / ( -c*np.cos(U) + a* np.cosh(V)  ),
    b*np.sinh(V) - ( b*( -4 +a*np.cosh(V) )*np.sinh(V) ) / ( -c * np.cos(U) + a*np.cosh(V)  )]

Ellipse=[a * np.cos(u),  b*np.sin(u),np.zeros(len(u))]

ax.plot_surface(Cyclide[0], Cyclide[1], Cyclide[2])
ax.plot(Ellipse[0], Ellipse[1], Ellipse[2])


#Rotation :
Ellipse_rot=rot_3D(Ellipse,180,1)
Cyclide_rot=rot_3D_surf(Cyclide,180,1)

ax.plot_surface(Cyclide_rot[0], Cyclide_rot[1], Cyclide_rot[2])
ax.plot(Ellipse_rot[0], Ellipse_rot[1], Ellipse_rot[2])
plt.show()
Package: rotsim2d
rotsim2dis a library to model two-dimensional infrared (2DIR) rovibrational spectra.
It uses density-matrix perturbation theory treatment of third-order interaction.
It assumes explicit time-ordering of interactions,i.e.it is suitable for time-domain spectroscopy with time-separated optical pulses.rotsim2dgenerates complete third-order excitation trees of rovibrational eigenstates, which can be manipulated and filtered in various ways.
Each pathway is also represented by an object, which provides its amplitude and polarization dependence and other information about the pathway.
This includes symbolic expressions for polarization and angular momentum dependence, which can be manipulated with SymPy library.
The user can generate and plot 2D resonance maps, which do not include information on the line shapes, but make it easier to visualize resonance amplitudes.
One can also simulate mixed time-frequency experimental signals which do include line shapes and which are directly comparable with measured signals.rotsim2d_appsincludes simple GUI applications that can be used to investigate branch structure of RR2DIR spectra, polarization dependence and evolution of rotational coherences during the waiting time between the second and third interaction.InstallThe package is available on PyPI and can be most easily installed withpip:pip install rotsim2dThis will install the library.
To install GUI applications install the following package:pip install rotsim2d_appsDocumentationDocumentation is available athttps://rotsim2d.readthedocs.io/.CitationsPlease cite the following articles when publishing the results of using this library:G.Kowzan, T. K. Allison, Controlling rotationally-resolved two-dimensional infrared spectra with polarization, arXiv:2206.10492 [physics.optics], (2022).G.Kowzan, T. K. Allison, Theory of rotationally-resolved two-dimensional infrared spectroscopy, arXiv:2206.10488 [physics.optics], (2022).R.V. Kochanov, I.E. Gordon, L.S. Rothman, P. Wcisło, C. Hill, J.S. Wilzewski, HITRAN Application Programming Interface (HAPI): A comprehensive approach to working with spectroscopic data, J. Quant. Spectrosc. Radiat. Transfer 177, 15-30 (2016).Licenserotsim2d is available under the open sourceMIT license.FundingThis project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie grant agreement No 101028278.
Package: rotsim2d-apps
This package contains several GUI applications using features of therotsim2dlibrary.
These include:rotsim2d_polarizations, shows values of all 7 R-factors in the high-J limit
as a function of polarization angles. To reduce dimensionality, the first
angle is always set to zero and the user can select which of the remaining
three angles is fixed. The dependence on the last two angles is shown as 2D
images.rotsim2d_peak_picker, shows scatter plot of third-order pathway intensities, clicking on a peak will print out information about pathways contributing to the peak.rotsim2d_waiting_time, investigate waiting time dependence.InstallationInstall the package with:pip install rotsim2d_appsDocumentationFor documentation see:rotsim2d_apps documentation.CitationsPlease cite the following articles when publishing the results of using this library:G.Kowzan, T. K. Allison, Controlling rotationally-resolved two-dimensional infrared spectra with polarization, arXiv:2206.10492 [physics.optics], (2022).G.Kowzan, T. K. Allison, Theory of rotationally-resolved two-dimensional infrared spectroscopy, arXiv:2206.10488 [physics.optics], (2022).R.V. Kochanov, I.E. Gordon, L.S. Rothman, P. Wcisło, C. Hill, J.S. Wilzewski, HITRAN Application Programming Interface (HAPI): A comprehensive approach to working with spectroscopic data, J. Quant. Spectrosc. Radiat. Transfer 177, 15-30 (2016).Licenserotsim2d is available under the open sourceMIT license.FundingThis project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie grant agreement No 101028278.
Package: rotspectools
Package for automating data analysis and presentation for rotational spectroscopy datasets generated using Pickett’s SPFIT/SPCAT programs.Currently, it only supports simple asymmetrical rotors and the plotting of data distribution plots of measured spectral lines.Free software: MIT licenseDocumentation:https://rotspectools.readthedocs.io.FeaturesData AnalysisClean datasets by eliminating high error lines, at a specified threshold error.Remove duplicate lines from SPFIT .lin files.Data VisualizationGenerate data distribution plots of measured lines, with a-, b-, and c-type transitions differentiated by color. This visualization was inspired by Kisiel’s AC.exe program and GLE script.TODOAdd in support for other types of moleculesSupport presentation of predicted spectra using SPCAT’s .cat file formatAdd capability to use SPFIT/SPCAT as a backend to generate files/classes.CreditsThanks to the McMahon-Woods Research Group for continually breaking this tool and making it better.
Package: rotten_bites
A small utility for checking forbit
rot. This project is
heavily influenced bychkbitandbitrot. Both projects had things I
liked about them and other things that I didn’t. I took what I liked and
made something myself.The focus of Rotten Bites is scalability and speed. To achieve this,
small files (.bit_check) are placed in every directory. I know, no
one wants a“bunch of turdy files sprinkled all over your hard
drive”, but in my opinion it is the best
way to allow for flexibility (folders can be moved around without any
problem because all paths are relative to that directory) and
scalability (having one central database with all files stored does not
scale well).There are two components to Rotten Bites: the CLI and library. I
designed Rotten Bites to be callback based so it makes it easy to
extend. See the CLI (rotten_bites/__main__.py) and rot_check.py,
for examples.Installpip install rotten_bitesUsageUsage: rotten_bites [OPTIONS] DIRECTORY

  Given a directory, rotten bites calculates the sha1 hash of every file and
  stores it in .bit_check files. Once stored, subsequent checks will see if
  the hash has changed, detecting bit rot.

  Status codes:

      'E'     error, sha1 mismatch

      'a'     add to index

      'u'     update sha1

      ' '     not modified (shown only with verbose)

      '?'     could not read file (permission denied or file no longer
              exists)

Options:
  --delete                Delete all .bit_check files.
  -n, --dry-run           Run without making any changes. No .bit_check files
                          are created or updated
  --ignore-list FILENAME  List of files and folders to ignore. Similar syntax
                          to .gitignore files. "-" can be used to read from
                          stdin.
  -q, --quiet             Turn off all output except for hash errors.
  -v, --verbose           Display all files that are scanned, even if they
                          haven't changed
  --verify                Verify hashes without updating.
  --help                  Show this message and exit.
Package: rotten-tomatoes-cli
Rotten Tomatoes CLIIntroductionInstallSearchHarry Potter ExampleMaster of None ExampleTVBrowse Popular TV Shows ExampleMoviesStreamingUpcoming movies on Netflix or Amazon Prime with a minimum rating of 90TheatersAction movies in theaters with a minimum rating of 90IntroductionSearch for movies and tv shows on Rotten Tomatoes from the command lineBrowse movies in theaters or on various streaming platforms like Netflix and Amazon PrimeInstallpip install rotten_tomatoes_cliSearchrotten search {term}Harry Potter Examplerotten search "Harry Potter"Master of None Examplerotten search "Master of None"TVrotten tv {category}Category Argumentnew(default)popularfreshBrowse Popular TV Shows Examplerotten tv popularMoviesOptions:--minimum_rating/-lMinimum allowable Rotten Tomatoes scoreDefault:70--maximum_rating/-hMaximum allowable Rotten Tomatoes scoreDefault:100--certified_fresh/-fBoolean flag that represents whether or not to only show "Certified Fresh" moviesDefault:True--service/-sFilter by specified streaming servicesDefault: All servicesCan specify multiple servicesValues:amazonprimehboitunesnetflixvudufandango--genre/-gFilter by specified genresDefault: All genresCan specify multiple genresValues:actionanimationart_and_foreignclassicscomedydocumentarydramahorrorfamilymysteryromancescifi--sort_bySort results by specified valueDefault:popularityValues:popularityreleaseStreamingrotten movies streaming {category}Category Argumentnew(default)alltopupcomingfreshUpcoming movies on Netflix or Amazon Prime with a minimum rating of 90rotten movies streaming upcoming -l 90 -s netflix -s primeTheatersrotten movies theaters {category}Category Argumentopening(default)playingupcomingfreshAction movies in theaters with a minimum rating of 90rotten movies theaters playing -l 90 -g action
Package: rotu
RotUHistoryThis project began as an entry to aPython Game Jam.In the spirit of that Jam, the theme for the work isThe Unknown. I began to have ideas for a story,
and quickly realised I would need aDialogue Tree.So I parked the story ideas and went back to work onBalladeerto
add the functionality I needed. The good news is that Balladeer now supportsInteractions!I ran out of time to submit my Jam entry. Nevertheless it was a worthwhile exercise, and I promised
myself that I wouldn't let all my hard work go to waste.TodayThis repository is updated frequently. I'm maintaining a regularDevelopment Blogto document the journey.
Package: roufcp
roufcp - Rough Fuzzy Changepoint DetectionGradual Change-Point Detection Library based on Rough Fuzzy Changepoint Detection algorithmroufcp.The package is available inPyPI.Usage>> import numpy as np
>> from roufcp import roufCP
>> X = np.concatenate([np.ones(20) * 5, np.zeros(20), np.ones(20) * 10]) + np.random.randn(60)
>> roufCP(delta = 3, w = 3).fit(X, moving_window = 10, k = 2)Tryhelp(roufCP)for detailed documentation.roufCPis a class for Rough Fuzzy Changepoint Detection with the following attributes and functions.Attributesdelta:int, The fuzzyness parameter, typically between 5-100w:int, The roughness parameter, typically between 5-100Methodsfit_from_regularity_measure(X, regularity_measure, k):
fit the data X with help of the regularity measure and output the estimated changepointsfit(X, moving_window, method, k): fit the data X with given regularity measures and output the estimated changepoints. The method argument defaults to kstest, available options are;meandiff: Two sample mean differencettest: Two sample t test statistickstest: Two sample Kolmogorov test statisticmannwhitney: Two sample Mann Whitney U statisticanderson-darling: Two sample Anderson Darling test statisticadf: Augmented Dickey Fuller test of stationarity with linear trendkpss: Kwiatkowskiâ€“Phillipsâ€“Schmidtâ€“Shin (KPSS) test of stationarity with linear trendhypothesis_test(cp_list, cp_entropy, mu, sigma, a_delta):
Performs hypothesis testing of the null hypothesis that there is no changepoint in the data, against the alternative that there is changepoint at the specified indices, and outputs the p-valueAuthors & ContributorsSubhrajyoty Roy -https://subroy13.github.io/Ritwik Bhaduri -https://github.com/Ritwik-BhaduriSankar Kumar Pal -https://www.isical.ac.in/~sankar/LicenseThis code is licensed under MIT License.
Package: rougail
RougailDescriptionRougail is a free full-featured configuration manager library written in python3.The configuration is describe in YAML dictionary files.Those dictionaries are converted intoTiramisuobjects.Rougail can be incorporated with other technologies and stacks regardless of whether they’re written in Python or not.Simple exampleCreate a directory:# mkdir dictDictionaryA dictionary is a variables description file.Create the filedict/dictionary.yml:---
version: '1.0'
# describe a variable my_first_variable
# and a family with a variable my_second_variable
my_first_variable:
  default: my_value
my_family:
  my_second_variable:
    type: number
    mandatory: true
    value: 1Generate variableWith default value:Here is a python3 example file:fromrougailimportRougail,RougailConfigfrompprintimportpprintRougailConfig['dictionaries_dir']=['dict']RougailConfig['templates_dir']=['tmpl']RougailConfig['tmp_dir']='tmp'RougailConfig['destinations_dir']='dest'rougail=Rougail()config=rougail.get_config()pprint(config.value.get(),sort_dicts=False)The result is:{'rougail.my_first_variable':'my_value','rougail.my_family.my_second_variable':1}With modified valueUseTiramisuAPI to change values:fromrougailimportRougail,RougailConfigfrompprintimportpprintRougailConfig['dictionaries_dir']=['dict']RougailConfig['templates_dir']=['tmpl']RougailConfig['tmp_dir']='tmp'RougailConfig['destinations_dir']='dest'rougail=Rougail()config=rougail.get_config()config.option('rougail.my_first_variable').value.set('modified_value')config.option('rougail.my_family.my_second_variable').value.set(2)pprint(config.value.get(),sort_dicts=False)The destination file is generated with new values:{'rougail.my_first_variable':'modified_value','rougail.my_family.my_second_variable':2}LinkDocumentationLicenceRelated projectsTiramisuRisotto
Package: rouge
RougeA full Python librarie for the ROUGE metric(paper).DisclaimerThis implementation is independant from the "official" ROUGE script (aka.ROUGE-155).Results may beslighltydifferent, seediscussions in #2.QuickstartClone & Installgitclonehttps://github.com/pltrdy/rougecdrouge
pythonsetup.pyinstall# orpipinstall-U.or from pip:pip install rougeUse it from the shell (JSON Output)$rouge -h
usage: rouge [-h] [-f] [-a] hypothesis reference

Rouge Metric Calculator

positional arguments:
  hypothesis  Text of file path
  reference   Text or file path

optional arguments:
  -h, --help  show this help message and exit
  -f, --file  File mode
  -a, --avg   Average modee.g.# Single Sentencerouge"transcript is a written version of each day 's cnn student"\"this page includes the show transcript use the transcript to help students with"# Scoring using two files (line by line)rouge-f./tests/hyp.txt./ref.txt# Avg scoring - 2 filesrouge-f./tests/hyp.txt./ref.txt--avgAs a libraryScore 1 sentencefromrougeimportRougehypothesis="the #### transcript is a written version of each day 's cnn student news program use this transcript to he    lp students with reading comprehension and vocabulary use the weekly newsquiz to test your knowledge of storie s you     saw on cnn student news"reference="this page includes the show transcript use the transcript to help students with reading comprehension and     vocabulary at the bottom of the page , comment for a chance to be mentioned on cnn student news . you must be a teac    her or a student age # # or older to request a mention on the cnn student news roll call . the weekly newsquiz tests     students ' knowledge of even ts in the news"rouge=Rouge()scores=rouge.get_scores(hypothesis,reference)Output:[{"rouge-1":{"f":0.4786324739396596,"p":0.6363636363636364,"r":0.3835616438356164},"rouge-2":{"f":0.2608695605353498,"p":0.3488372093023256,"r":0.20833333333333334},"rouge-l":{"f":0.44705881864636676,"p":0.5277777777777778,"r":0.3877551020408163}}]Note: "f" stands for f1_score, "p" stands for precision, "r" stands for recall.Score multiple sentencesimportjsonfromrougeimportRouge# Load some sentenceswithopen('./tests/data.json')asf:data=json.load(f)hyps,refs=map(list,zip(*[[d['hyp'],d['ref']]fordindata]))rouge=Rouge()scores=rouge.get_scores(hyps,refs)# orscores=rouge.get_scores(hyps,refs,avg=True)Output (avg=False): a list ofndicts:{"rouge-1": {"f": _, "p": _, "r": _}, "rouge-2" : { .. }, "rouge-l": { ... }}Output (avg=True): a single dict with average values:{"rouge-1": {"f": _, "p": _, "r": _}, "rouge-2" : { ..     }, "rouge-l": { ... }}Score two files (line by line)Given two fileshyp_path,ref_path, with the same number (n) of lines, calculate score for each of this lines, or, the average over the whole file.fromrougeimportFilesRougefiles_rouge=FilesRouge()scores=files_rouge.get_scores(hyp_path,ref_path)# orscores=files_rouge.get_scores(hyp_path,ref_path,avg=True)
Package: rougek
ROUGE-KRun extractionGive an input file contains summarization data samples and a path to save extracted keywords.Input data needs to be in jsonline format, each line is a dictionaly containing one data sample.Each sample in input files need three information, (1)source (List[str]): List of sentences in source document, (2)target (List[str]): List of reference summaries, it can be a list with just one element (one sentence) if there is only one reference summary in your dataset, (3)title (str): title of the source documents.There is a sample data in./tests/sample.jsonlrougek extract sample.jsonl output.jsonlResulting data (output.jsonlin the example above) is also a jsonline file, each line contains a list of keywords (List[str]) for one data sample.Run evaluationFrom pythonYou can evaluate your summaries by ROUGE-K in your python scripts as follows:fromrougekimportRougeKrk=RougeK()hypo="This is a generated summary."kws=["summary"]result=rk(hypo,kws)print(f"ROUGE-K:{result}.")From CLIOf course, this package gives you an option as a CLI command so that you don't need to touch any python scripts.By running the following command, you get an avg of ROUGE-K scores for your summaries.>rougekevaluate/path/to/target.hypo/path/to/kws.jsonlYou can also evaluate multiple.hypofiles in a directory by following,>rougekevaluate_dir/dir/with/hypofiles/path/to/kws.jsonltarget hypo files need to have an extension of.hypoto be considered.