Saravanan666/pypi-org huggingface dataset:
Package: contextvars-extras
contextvars-extrasis a set of extensions for the Python’scontextvarsmodule.In case you are not familiar with thecontextvarsmodule, itsContextVarobjects
work like Thread-Local storage, but better: they are both thread-safe and async task-safe,
and they can be copied (all existing vars copied in O(1) time), and then you can run
a function in the copied and isolated context.Thecontextvarsis a powerful module, but its API seems too low-level.So thiscontextvars_extraspackage provides some higher-level additions on top of the
standard API, like, for example, organizingContextVarobjects into registry classes,
with nice@property-like access:fromcontextvars_extrasimportContextVarsRegistryclassCurrentVars(ContextVarsRegistry):locale:str='en'timezone:str='UTC'current=CurrentVars()# calls ContextVar.get() under the hoodcurrent.timezone# => 'UTC'# calls ContextVar.set() under the hoodcurrent.timezone='GMT'# ContextVar() objects can be reached as class membersCurrentVars.timezone.get()# => 'GMT'That makes your code more readable (no more noisy.get()calls),
and it is naturally firendly totyping, so static code analysis features
(like type checkers and auto-completion in your IDE) work nicely.Check out thefull documentationLinksRead the Docs:https://contextvars-extras.readthedocs.ioGitHub repository:https://github.com/vdmit11/contextvars-extrasPython package:https://pypi.org/project/contextvars-extras/
Package: context-verbose
By adding only a few lines of code at strategic places in your program, you will get a nice console display that will let you know what stage your code is at.fork ofcontext-printer:This project is a fork of thecontext_printerproject. The philosophy of this project is strictly the same as the original project. Nevertheless, this project offers the following improvements:Support for thewithkeyword (context manager).Formatting of exceptions for better debugging.Added decorator behavior.Possibility to implicitly name a section.More formatting possible (adding highlighting and flashing).No conflicts between thread and process (clients send text to a single server).Integrated timer for display the sections duration.Basic usage example:fromcontext_verboseimportprinterasctpwithctp('Main Section',color='blue'):ctp.print('Text in main section')foriinrange(3):withctp(f'Subsection{i}'):ctp.print('Text in subsection')ctp.print('Text in subsection')The above example will print the following:Exaustive example of usage:fromcontext_verboseimportprinterasctp@ctpdefdecorated_func(x):returnx**x**xdeferror_func():withctp('Section that will fail'):return1/0ctp.print('we will enter the main section')withctp('Main Section',color='cyan'):ctp.print('text in main section')try:withctp('Subsection 1'):forxin[1,8]:decorated_func(x)error_func()exceptZeroDivisionError:passwithctp('Subsection 2',color='magenta'):ctp.print('text in bold',bold=True)ctp.print('underlined text',underline=True)ctp.print('blinking text',blink=True)ctp.print('yellow text',color='yellow')ctp.print('text highlighted in blue',bg='blue')ctp.print('text in several ',end='')ctp.print('parts',print_headers=False)ctp.print('''text in several
                     lines''')withctp(color='green'):ctp.print('this subsection is automatically named')ctp.print('we are out of the main section')The above example will print the following:
Package: contig-tools
Contig ToolsInstallationpip3 install contig-toolssource code:https://gitlab.com/antunderwood/contig_toolsUsageusage: contig-tools [-h] [-v] {filter,metrics,check_metrics,co_located} ...

    A package to maniuplate and assess contigs arising from de novo assemblies


positional arguments:
  {filter,metrics,check_metrics,co_located}
                        The following commands are available. Type
                        contig_tools <COMMAND> -h for more help on a specific
                        commands
    filter              Filter contigs based on either length and/or coverage
    metrics             Print contig metrics
    check_metrics       check contig metrics
    co_located          check to see if two or more loci are found on the same
                        contig.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         display the version numberExamplesfilter contigscontig-tools filter -l 500 -c 3 -f contigs.fastaprint contig metricscontig-tools metrics -f contig_tools/tests/test_data/contigs_for_checks.fas
contig-tools metrics -f contig_tools/tests/test_data/contigs_for_checks.fas -o jsoncheck if contigs meet conditions based on conditions enoded in a yaml fileexample yaml fileN50 score:
  condition_type: gt
  condition_value: 10
Largest contig:
  condition_type: gt
  condition_value: 15
Total length:
  condition_type: lt_gt
  condition_value:
    - 100
    - 50example commandcontig-tools check_metrics -f contigs.fasta -y conditions.ymlmetrics that can be checked areNumber of contigsNumber of contigs > 500bpTotal length%GCLargest contigN50 scoreconditions that can be used aregt => greater thanlt => less thanlt_gt => less than and greater thancheck if a two or more loci are co-locatedMake a fasta query file with the 2 or more loci you want to see if they are co-located e.g>gene1
GCAGCTAGCGACTGCGAC.....
>gene2
CTACGTAGGACACGACTA....There are two optionsSearch a single genome file for the co-location of locicontig-tools co_located -q queries.fas -f /path/to/single/genome/contigs.fasorSearch a list of genomes for the co-location of loci
Make a text file with paths to genomes e.g/path/to/single/genome1.fas
/path/to/single/genome1.fas
....and then run the commandcontig-tools co_located -q queries.fas -l /path/to/single/genome_list_file.txtIf you have muliple cores on the computer you are running this on you can process the search in parallel using the-n <NUMBER PARALLEL PROCESSES>.If you only want to write out genomes where the queries are co-located use the-yoptionscodeCode can be foundhere
Package: continental-cdk
test pip packageinstall required toolspip install setuptools
pip install twine
pip install wheelcdk_pip_poc
â”œâ”€â”€ LICENSE
â”œâ”€â”€ continental_poc
â”‚   â”œâ”€â”€init.py
â”‚   â”œâ”€â”€ iam_construct.py
â”‚   â”œâ”€â”€ batch_fargate_construct.py
â”œâ”€â”€ README.md
â””â”€â”€ setup.pycheckpython setup.py checkcreate packagepython setup.py bdist_wheelinstall localpython -m pip install dist/continental_cdk-0.1.1-py3-none-any.whl
install same version new
python -m pip install dist/continental_cdk-0.1.1-py3-none-any.whl --force.pypirc  filecreate this file in your user directory
C:\Users\UserName.pypirc
for the public pypi repo the file would look like[distutils]index-servers=pypi
[pypi]repository =https://upload.pypi.org/legacy/username =wolfgang.r.ungerfor the continental artifactory[global]
index-url = https://:@artifactory.8675.ccp.continental.exchange/artifactory/api/pypi/common-remote-pypi/simple[conti]
index-url = https://:@artifactory.8675.ccp.continental.exchange/artifactory/api/pypi/common-remote-pypi/simple
username =wolfgang-ungerupload(so far tested onhttps://pypi.org/must be changed to the continental artifactory):python -m twine upload dist/*
python -m twine upload dist/continental_cdk-0.1.1-py3-none-any.whlsee alsohttps://betterscientificsoftware.github.io/python-for-hpc/tutorials/python-pypi-packaging/https://packaging.python.org/https://dzone.com/articles/executable-package-pip-install..
Package: continual-flame
ContinualFlameSmall lightweight package for Continual Learning in PyTorch.InstallationFor now the package is hosted on TestPyPi. To install it you just need to run:pipinstallcontinual-flameUsageTo use the package you just need to import it inside your project.importcontflameascfAt the moment the package contains just the dataset module.DatasetThis module contains datasets normally used in the continual learning scenario. The main ones are:SplitMNIST - MNIST dataset split in classes. It allows to create different subtasks by including custom subsets of classes.PermutedMNIST - permuted MNIST dataset. It allows to choose the shape of the applied permutation.SplitCIFAR100PermutedCIFAR100ExamplesSplitMNISTIn the following example the training tasks are five binary classification tasks on subsequent pairs of digit (i.e task 1 (0, 1), task 2 (2, 3), ...)fromcont_flame.datasetimportSplitMNISTvalid=[]foriinrange(1,10,2)train_dataset=SplitMNIST(classes=[i,i+1],dset='train',valid=0.2)valid.append(SplitMNIST(classes=[i,i+1],dset='valid',valid=0.2))foreinepochs:# train the model on train_dataset# ...forvinvalid:# test the model on the current and the previous tasks# ...PermutedMNISTTo get a random permutation set tile to (1, 1). The same random permutation, selected by the task id, will be applied to all the data points.PermutedMNIST(tile=(1,1),task=1)You can also apply the permutation row (or column) wise by setting the corresponding dimension of the tile equal to the one of the imagePermutedMNIST(tile=(1,28),task=1)Or try to maintain high level spatial feature by setting a bigger tile.PermutedMNIST(tile=(8,8),task=1)To get the images without any permutation set the tile to (28, 28) (default value).
Package: continual-learning
Continual learning frameworkThis is a Continual Learning library based onPytorch, mainly born for personal use, which can be used for fast
prototyping, training and to compare different build-in methods over a various numbers of scenarios and benchmarks.InstallationTypepip install continual-learningContinual learning frameworkThe library is organized in four main modules:Benchmarks: This module contains the most used dataset in CL, reimplemented to give more flexibility.Logging: This module provides different supervised scenarios which you can use in combination with a dataset to create your own Cl scenario.Extras: It contains many Cl methods, that can be easily used and evalauted.Training: This module contains many popular networks used to extract the features from the input samples.Evaluation: This modules provides a unified way to evaluate a method over a flexible numbers of metrics/Models: In this module you will find different solvers, used to classify the features extracted by a backbone network.DisclaimerThis is a framework which is born to improve coding, and the reproducibility of the papers in which I have worked during the years.
Being constantly under development, it may be unstable.
Package: continuation-jax
continuation-jax : Continuaion Framework for lambdaContinuation methods of Deep Neural Networks
Tags: optimization, deep-learning, homotopy, bifurcation-analysis, continuationInstall using pip:Package:https://pypi.org/project/continuation-jax/pip install continuation-jaxImportimportcjaxMath operations on Pytrees>>>importcjax>>>fromcjax.utilsimportmath_trees>>>math_trees.pytree_element_mul([2,3,5],2)[4,6,10]>>>math_trees.pytree_sub([2,3,5],[1,1,1])[DeviceArray(1,dtype=int32),DeviceArray(2,dtype=int32),DeviceArray(4,dtype=int32)]>>>math_trees.pytree_zeros_like({'a':12,'b':45,'c':[1,1]}){'a':0,'b':0,'c':[0,0]}Examples:Examples:https://github.com/harsh306/continuation-jax/tree/main/examplesSample Runner:https://github.com/harsh306/continuation-jax/blob/main/model_simple_classifier/run.py"""Main file to run contination on the user defined problem. Examples can be found in the examples/ directory.Continuation is topological procedure to train a neural network. This module tracks allthe critical points or fixed points and dumps them to  output file provided in hparams.json file.Typical usage example:continuation = ContinuationCreator(problem=problem, hparams=hparams).get_continuation_method()continuation.run()"""fromcjax.continuation.creator.continuation_creatorimportContinuationCreatorfromexamples.model_simple_classifier.model_classifierimportModelContClassifierfromcjax.utils.abstract_problemimportProblemWraperimportjsonfromjax.configimportconfigfromdatetimeimportdatetimeimportmlflowfromcjax.utils.visualizerimportpick_array,bif_plotconfig.update("jax_debug_nans",True)# TODO: use **kwargs to reduce paramsif__name__=="__main__":problem=ModelContClassifier()problem=ProblemWraper(problem)withopen(problem.HPARAMS_PATH,"r")ashfile:hparams=json.load(hfile)mlflow.set_tracking_uri(hparams['meta']["mlflow_uri"])mlflow.set_experiment(hparams['meta']["name"])withmlflow.start_run(run_name=hparams['meta']["method"]+"-"+hparams["meta"]["optimizer"])asrun:mlflow.log_dict(hparams,artifact_file="hparams/hparams.json")mlflow.log_text("",artifact_file="output/_touch.txt")artifact_uri=mlflow.get_artifact_uri("output/")hparams["meta"]["output_dir"]=artifact_uriprint(f"URI:{artifact_uri}")start_time=datetime.now()ifhparams["n_perturbs"]>1:forperturbinrange(hparams["n_perturbs"]):print(f"Running perturb{perturb}")continuation=ContinuationCreator(problem=problem,hparams=hparams,key=perturb).get_continuation_method()continuation.run()else:continuation=ContinuationCreator(problem=problem,hparams=hparams).get_continuation_method()continuation.run()end_time=datetime.now()print(f"Duration:{end_time-start_time}")figure=bif_plot(hparams["meta"]["output_dir"],pick_array)mlflow.log_figure(figure,artifact_file="plots/fig.png")Note on HyperparametersPapers:Contact:harshnpathak@gmail.com
Package: continued
.. include:: <isogrk1.txt>Continued=========Continued is a simple library for representing and operating on numbersrepresented as continued fractions.Features--------* Conversion from a plethora of representations to continued fractions* int* float* decimal.Decimal* fractions.Fraction and numbers.Rational* Basic arithmetic: addition, subtraction, multiplication, division* Popular irrational and transcendental identities, to arbitrary (infinite)precision* *e* (Euler's number)* |pgr|* |phgr| (the Golden Ratio)* Arbitrary-precision quadratic surdsBugs----Plenty.- sqrt(2) * sqrt(2) goes into an infinite loop, as does any other operationwith an arbitrary string of 0.Some enhancements are planned.- Surds should permit the form (a + sqrt(b))/c without an extra pair ofcombination generators.- Trigonometric operators.- Radix-based decoding.Changelog---------1.0^^^Initial release.
Package: continuousbeam-backend
IntroductionThis package is a library of classes dealing with structural analysis of a continuous beam. Stiffness matrix method is used for the analysis. The package acts as a back-end for computing shear forces, bending moments, and deformations occurring in the members of the continuous beam. The data about the geometry of the continuous beam and the loads acting on it, is to be supplied to this package by the importing front-end program.Sub-packages and ClassesThe 'continuousbeam_backend' package comprises two sub-packages. These sub-packages and the importable classes belonging to them are as follows.beam_classesBeam: this class encapsulates the attributes and behaviour of a member of a continuous beam. It is assumed that the object member is prismatic, has same cross-section, modulus of elasticity, and moment of inertia over its length.ContinuousBeam: this class models a continuous beam and thus keeps track of the individualBeamclass members, joints and support conditions, as well as loads on the them.base_classesPointLoad: the attributes of this class are the magnitude of a point load and its position relative to the left end of the beam member upon which it is acting.UdLoadFull: this class represents a load that is uniformly distributed over the full length of a member beam. Its attributes are magnitude of the UDL and the length of the beam member on which it is acting.Installation and usagepip install continuousbeam_backendRequirements"numpy>=1.23"NoteThe requirements will be installed automatically while installing this package.Importing the moduleAny of the following formats of importing can be used.from beam_classes import Beam, ContinuousBeam
from base_classes import PointLoad, UdLoadFull
#or 
from beam_classes.beam import Beam 
from beam_classes.continuousbeam import ContinuousBeam
from base_classes.loading import PointLoad, UdLoadFull
Package: continuous-cmap
Continuous Colourmap FuctionInstallpip install continuous_cmapHow to useSimple paired colors and splits to generate a continuous colourmap.hex_list=['#2AA364','#F5EB4D','#9E4229','#381D02','#381D02','#381D02']float_list=[0,0.15,.6,.75,.8,1]cmap_1000=get_continuous_cmap(hex_list=hex_list,float_list=float_list)cmap_1000hex_list=['#2AA364','#F5EB4D','#9E4229','#381D02','#381D02']float_list=[0,0.65,.75,.8,1]cmap_1000=get_continuous_cmap(hex_list=hex_list,float_list=float_list)cmap_1000
Package: continuous-futures
IntroTakes a DataFrames containing information for multiple future contracts and creates a
corresponding continuous contract (ratio back-adjusted, on highest volume).InstallationUsepip install continuous_futuresExamplefromcontinuous_futuresimportcreate_continuous_contractimportpandasaspdcontract1=pd.DataFrame([['2023-01-01',15.2,13.8,128,'2023F'],['2023-01-02',15.1,13.9,133,'2023F'],['2023-01-03',14.8,14.1,125,'2023F'],],columns=['Date','Open','Close','Volume','Contract'])contract2=pd.DataFrame([['2023-01-02',15.0,13.2,129,'2023G'],['2023-01-04',14.0,13.1,130,'2023G'],['2023-01-05',14.2,14.0,140,'2023G'],],columns=['Date','Open','Close','Volume','Contract'])merged=pd.concat([contract1,contract2])continuous=create_continuous_contract(merged,'Date','Volume','Contract',['Open','Close'],['Open'])Parametersdata: DataFrame
Order must be chronological: first by contract, then by date. Oldest date of oldest
contract first. Must contain all columns whose names are passed to this function as
parameters.date_column_name: str
Name of the column that contains the datevolume_column_name: str
Name of the column that contains the volume; used to determine rollovers (on highest
volume)contract_column_name: str
Name of the column that contains the contract name; used determine where contracts
change within the DataFrameadjustment_factor_columns_names: list of str
Names of the columns to calculate the ratio from; usually only ['close']; if multiple
are passed, their mean is used.adjustment_column_names: list of str
Names of the columns to adjust by the ratio on rollovers.
Package: continuously
# ContinuousContinuous is a wrapper that allows to invoke a command incontinuous mode, i.e. to reinvoke it whenever a given files changes.
Just invoke the command, and wrap the files to be watched in ‘_’.Usage example:> echo “” >hello.txt
> continuous cat _hello.txt_
> echo “hello” >>hello.txt
hello
> echo “hello again” >>hello.txt
hello
hello again
Package: continuous-peak-fit
Continuous-Peak-FitInstallationInstallation is available through git or via pipFrom git usegit clone https://github.com/ExperimentalMineralPhysics/Continuous-Peak-Fit.gitTo install the required dependencies use, in the Continuous-Peak-Fit directory usepip install requirements.txtFor pip installation usepip install continuous-peak-fitthis should automatically install the required dependencies.UsageContinuous-Peak-Fit can be run in a number of ways but requires an inputs file containing information about where your
data files are stored as well as information of the number of peak and appropriate ranges for the fit. Example data and
inputs file are available in the Example1-Fe directory from the git repository.If using a pip install an example inputs file can be generated using the 'CPF_generate_inputs' executable or from within
python usingimport cpfcpf.generate_inputs()Fitting can then be performed usingCPF_XRD_FitPattern <inputs_file>from the command lineor from within pythonimport cpfcpf.XRD_FitPattern.execute(settings_file=<inputs_file>)
Package: continuum
Continuum: Simple Management of Complex Continual Learning ScenariosA library for PyTorch's loading of datasets in the field of Continual LearningAka Continual Learning, Lifelong-Learning, Incremental Learning, etc.Read thedocumentation.Test Continuum onColab!Example:Install from and PyPi:pip3installcontinuumAnd run!fromtorch.utils.dataimportDataLoaderfromcontinuumimportClassIncrementalfromcontinuum.datasetsimportMNISTfromcontinuum.tasksimportsplit_train_valdataset=MNIST("my/data/path",download=True,train=True)scenario=ClassIncremental(dataset,increment=1,initial_increment=5)print(f"Number of classes:{scenario.nb_classes}.")print(f"Number of tasks:{scenario.nb_tasks}.")fortask_id,train_tasksetinenumerate(scenario):train_taskset,val_taskset=split_train_val(train_taskset,val_split=0.1)train_loader=DataLoader(train_taskset,batch_size=32,shuffle=True)val_loader=DataLoader(val_taskset,batch_size=32,shuffle=True)forx,y,tintrain_loader:# Do your cool stuff hereSupported Types of ScenariosNameAcronymSupportedScenarioNew InstancesNI:white_check_mark:Instances IncrementalNew ClassesNC:white_check_mark:Classes IncrementalNew Instances & ClassesNIC:white_check_mark:Data IncrementalSupported Datasets:Most dataset fromtorchvision.dasasetsare supported, for the complete list, look at the documentation page on datasetshere.Furthermore some "Meta"-datasets are can be create or used from numpy array or any torchvision.datasets or from a folder for datasets having a tree-like structure or by combining several dataset and creating dataset fellowships!IndexingAll our continual loader are iterable (i.e. you can for loop on them), and are
also indexable.Meaning thatclloader[2]returns the third task (index starts at 0). Likewise,
if you want to evaluate after each task, on all seen tasks doclloader_test[:n].Example of Sample Images from a Continuum scenarioCIFAR10:Task 0Task 1Task 2Task 3Task 4MNIST Fellowship (MNIST + FashionMNIST + KMNIST):Task 0Task 1Task 2PermutedMNIST:Task 0Task 1Task 2Task 3Task 4RotatedMNIST:Task 0Task 1Task 2Task 3Task 4TransformIncremental + BackgroundSwap:Task 0Task 1Task 2CitationIf you find this library useful in your work, please consider citing it:@misc{douillardlesort2021continuum,
  author={Douillard, Arthur and Lesort, Timothée},
  title={Continuum: Simple Management of Complex Continual Learning Scenarios},
  publisher={arXiv: 2102.06253},
  year={2021}
}MaintainersThis project was started by a joint effort fromArthur Douillard&Timothée Lesort, and we are currently the two maintainers.Feel free to contribute! If you want to propose new features, please create an issue.Contributors:Lucas CacciaLucas CecchiPau Rodriguez,Yury Antonov,psychicmario,fcld94,Ashok Arjun,Md Rifat Arefin,DanieleMugnai,Xiaohan Zou,Umberto Cappellazzo.On PyPiOur project is available on PyPi!pip3installcontinuumNote that previously another project, a CI tool, was using that name. It is now
therecontinuum_ci.