Saravanan666/pypi-org huggingface dataset:
Package: choix
choixis a Python library that provides inference algorithms for models
based on Luce’s choice axiom. These probabilistic models can be used to explain
and predict outcomes of comparisons between items.Pairwise comparisons: when the data consists of comparisons between two
items, the model variant is usually referred to as theBradley-Terrymodel.
It is closely related to the Elo rating system used to rank chess players.Partial rankings: when the data consists of rankings over (a subset of)
the items, the model variant is usually referred to as thePlackett-Lucemodel.Top-1 lists: another variation of the model arises when the data consists
of discrete choices, i.e., we observe the selection of one item out of a
subset of items.Choices in a network: when the data consists of counts of the number of
visits to each node in a network, the model is known as theNetwork Choice
Model.choixmakes it easy to infer model parameters from these different types of
data, using a variety of algorithms:Luce Spectral RankingMinorization-MaximizationRank CentralityApproximate Bayesian inference with expectation propagationGetting startedTo install the latest release directly from PyPI, simply type:pip install choixTo get started, you might want to explore one of these notebooks:Introduction using pairwise-comparison dataCase study: analyzing the GIFGIF datasetUsing ChoiceRank to understand traffic on a networkApproximate Bayesian inference using EPYou can also find more information on theofficial documentation. In particular, theAPI referencecontains a good summary of the
library’s features.ReferencesHossein Azari Soufiani, William Z. Chen, David C. Parkes, and Lirong Xia,Generalized Method-of-Moments for Rank Aggregation, NIPS 2013François Caron and Arnaud Doucet.Efficient Bayesian Inference for
Generalized Bradley-Terry models. Journal of Computational and Graphical
Statistics, 21(1):174-196, 2012.Wei Chu and Zoubin Ghahramani,Extensions of Gaussian processes for ranking:
semi-supervised and active learning, NIPS 2005 Workshop on Learning to
Rank.David R. Hunter.MM algorithms for generalized Bradley-Terry models, The
Annals of Statistics 32(1):384-406, 2004.Ravi Kumar, Andrew Tomkins, Sergei Vassilvitskii and Erik Vee,Inverting a
Steady-State, WSDM 2015.Lucas Maystre and Matthias Grossglauser,Fast and Accurate Inference of
Plackett-Luce Models, NIPS, 2015.Lucas Maystre and M. Grossglauser,ChoiceRank: Identifying Preferences from
Node Traffic in Networks, ICML 2017.Sahand Negahban, Sewoong Oh, and Devavrat Shah,Iterative Ranking from
Pair-wise Comparison, NIPS 2012.
Package: choixpeau
choixpeauInstallpip install choixpeauUsagefromchoixpeauimportchoixpeauredis_config={"host":"localhost}choixpeau=choixpeau.Choixpeau(redis_config=redis_config,ab_test_ids=["poudlard"],buckets=["gryffondor","poufsouffle","serdaigle","serpentard"]# ["A", "B"] by default)getchoixpeau.get("harrypotter")# if the key already exists>[(None,{"ab_test_group":"gryffondor","created_at":"2021-01-29"},"poudlard")]# if it does not>[("ab:poudlard:harrypotter",{"ab_test_group":"gryffondor","created_at":"2021-01-29"},"poudlard")]storechoixpeau.store("ab:poudlard:harrypotter",{"ab_test_group":"gryffondor","created_at":"2021-01-29"})FastAPIfromfastapiimportFastAPI,Request,BackgroundTasksfromchoixpeauimportchoixpeaufromchoixpeau.decorators.fastapiimportabapp=fastapi.FastAPI()redis_config={"host":"localhost}@app.on_event("startup")asyncdefstartup():# Initialize choixpeau at the app levelapp.state.choixpeau=choixpeau.Choixpeau(redis_config=redis_config,ab_test_ids=["poudlard"],buckets=["gryffondor","poufsouffle","serdaigle","serpentard"])@app.post("/")@ab# requires the request body to have a user_id fieldasyncdefread_house(request:Request,background_tasks:BackgroundTasks):wizard=request.state.user# the user attribute is automatically added to the requestifwizard["ab_test_group"]=="gryffondor":return{"message":"Welcome to Gryffondor!"}else:return{"message":"Welcome!"}
Package: choke
chokeis a package implementing a trivial to use general purpose throttling mechanism. The basic workflow withchokeis as follows:Create manager - an object responsible for keeping track of timestamps when some events (think: calls to your functions) occur.Instruct manager to “choke” some callables, i.e. define maximum number of calls that can occur per given time window.Use your callables as usual, keeping in mind that when the above defined limit is exceeded, the choked callable will raiseCallLimitExceededError.Here is an example containing everything you need to usechoke:fromtimeimportsleepfromredisimportStrictRedisfromchokeimportRedisChokeManager,CallLimitExceededErrorREDIS=StrictRedis()# Tweak this to reflect your setupCHOKE_MANAGER=RedisChokeManager(redis=REDIS)# Example configuration: enforce limit of no more than 10 calls in two seconds window@CHOKE_MANAGER.choke(limit=10,window_length=2)deffoo(x,y):"""Just print something to show that foo was called."""print(f'foo called with ({x},{y})')if__name__=='__main__':# We expect pattern of 10 successes followed by 10 failures followed again by 10 successes# Some deviations from this pattern may obviously occur as calling foo takes nonzero timeforiinrange(30):try:foo(i,y=i**2)exceptCallLimitExceededError:print('Foo not called. Limit exceeded!')sleep(0.1)
Package: chombopy
ChomboPyThis package contains tools for running, analysing, and plottingChombosimulations.ExamplesInputsChombo input files can be read and written using some utility functionsfromchombopy.inputsimportread_inputs,write_inputsinputs=read_inputs('/path/to/inputs')# inputs is a dictionary, with the key values converted to appropriate python objects:print(inputs['main.num_cells'])# e.g. [16, 16, 16]print(inputs['main.verbosity'])# e.g. 3print(inputs['main.plt_prefix'])# e.g. 'plt'# You can alter the valuesinputs['main.verbosity']=0# And write the file back outwrite_inputs('/path/to/new_inputs',inputs)Plot filesChombo plot files can be read using the PltFile class:fromchombopy.plottingimportPltFileimportmatplotlib.pyplotaspltpf=PltFile('/path/to/file.hdf5')pf.load_data()# Get data for the temperature variable on level 2temperature=pf.get_level_data('Temperature',2)# temperature is an xarray.DataSet object, which can be plotted using matplotlibx=temperature.coords['x']y=temperature.coords['y']plt.pcolormesh(x,y,temperature)# Or you can do some analysis using the xarray/numpy functionalityprint(temperature.mean())DocumentationFurther documentation can be foundonline. To compile the documentation locally, get the code and setup a virtual environment:$gitclonehttps://github.com/jrgparkinson/chombopy.git
$cdchombopy
$python3-mvenv.venv
$source.venv/bin/activate
$pythonsetup.pyinstallThen to build the documentation with Sphinx:$cddocs
$makehtmlTestingUnit tests can be run in a similar way to building the documentation. Having got a copy of the code and setup a virtual environment, from the root directory (i.e./path/to/chombopy), simply run the following from your virtual environment$pythonsetup.pyinstall
$py.testCode coverage will be published tochombopy/docs/test/coverage.html, and test results tochombopy/docs/test/report.html.
Package: chomper
ChomperChomper is a lightweight Android native library emulation framework based onUnicorn. It is mainly used to execute the encryption algorithm, so it doesn't provide JNI or file system support. It supports arch ARM and ARM64.RequirementsPython 3.7+Unicorn 2.0.0+Installation$ pip install chomperUsageLoad modules and call functions.fromchomperimportChomperfromchomper.constimportARCH_ARM64# Initialize emulatoremulator=Chomper(ARCH_ARM64)# Load modulesemulator.load_module("lib64/libz.so")# Construct argumentsdata=b"chomper"v1=emulator.create_buffer(len(data))v2=len(data)emulator.write_bytes(v1,data)# Call function by symbolemulator.call_symbol("crc32",0,v1,v2)# Call function by addresssymbol=emulator.find_symbol("crc32")emulator.call_address(symbol.address,0,v1,v2)Emulate arch ARM.fromchomperimportChomperfromchomper.constimportARCH_ARMemulator=Chomper(ARCH_ARM)Read/Write data.# Create bufferv1=emulator.create_buffer(64)v2=emulator.create_string("chomper")# Write dataemulator.write_int(v1,1)emulator.write_bytes(v1,b"chomper")emulator.write_string(v2,"chomper")# Read dataemulator.read_int(v1)emulator.read_bytes(v1,8)emulator.read_string(v2)Hook instructions.defhook_code(uc,address,size,user_data):emu=user_data["emulator"]symbol=emulator.find_symbol("zlibVersion")emulator.add_hook(symbol.address,hook_code)Trace instructions.# Trace all instructionsemulator=Chomper(ARCH_ARM64,trace_inst=True)# Trace instructions in this moduleemulator.load_module("lib64/libz.so",trace_inst=True)Execute initialization functions in section.init_array.emulator.load_module("lib64/libsample1.so",exec_init_array=True)
Package: chompt
Chainable Object Methods for Python Testing is a package for constructing tests by chaining HTTP requests,
and storing/referencing the results.Example Usage:from chompt import Chompt

class ExampleClient(object):
    def __init__(self):
        self.prefix = 'correct'


    def fetch(self):
        return self.prefix + ' result'


class ExampleTest(Chompt):
    def __init__(self):
        super(ExampleTest, self).__init__()
        self.incorporate(ExampleClient(), 'example_client')


def test_example():
    test = ExampleTest().example_client.fetch().equals('correct result')
    return test


if __name__ == "__main__":
    print("About to run test...")
    test_object = test_example()
    print("The test passed! the test_object looks like:")
    test_object.debug()
Package: chongyu-flow
This is a mini deep learning framework created by ChongyuFeaturesDefine Dynamic Computing GraphDefine Neural Network OperaterDefine Linear,Sigmoid,L2_lossAuto-diff ComputingAuto-Feedfoward and BackwardRemainClassificationCross-EntropyCNN,RNNConnectionwechat: Obliviatecy
Mail:zcyu_eternal@foxmail.com
Package: chonker
Chonker: Data Utilities for NLP and Machine LearningWelcome to Chonker! This code was assembled to provide a library to make data-intensive tasks just a little easier. Right now, Chonker is quite small: made up of one key module (wrangle) with one more currently in development (chonktorch). As a full-time student/researcher, 100% of this code develops from use in my ongoing projects. Chonker provides a neat package for myself and others who want to reuse convenient data functions instead of rebuilding them every time. If you somehow happen upon this library, I hope that something in here may be of use to you too!Moduleschonker.wrangleA module containing classes and functions designed to streamline data pre- and post-processing (i.e. wrangling)chonker.chonktorch (forthcoming)A module for pre-built neural models for NLP, based off of my research and built on PyTorchLicenseChonker is a work-in-progress with few guarantees. However, it is also open source and free to be modified and distributed, as long as those modifications remain free. As such, Chonker is licensed by theMozilla Public License 2.0.ContactC.M. Downeycmdowney@uw.eduPhD StudentDepartment of LinguisticsUniversity of Washington
Package: chonkify
Chonker is a lightweith python package that makes it easy to chunkify your data.Benefits of chonker are:Simple and flexible user interfacePerformant implementation using iterablesThe design of chonker exposes chunking logic directly to the user
resulting in readable and extensible code.
The entire chonker api can be expressed in a single example snippet:from chonker import chonkify

for chonk, row in chonkify(data, size=100):
    print(chonk.size, chonk.index, chonk.subindex, chonk.rawindex)
    if chonk.is_start_of:
        print('Do something at the start of the chunk')
    elif chonk.is_end_of:
        print('Do something at the end of the chunk')A common use case for chonker is checkpointingdata = []
for chonk, row in chonkify(data, size=100):
    data.append(process(row))
    if chonk.is_end_of:
        checkpoint(data)Notice how this code looks similar to the equivalent code using enumeratedata = []
chunksize = 100
for idx, row in enumerate(data):
    data.append(process(row))
    if idx%chunksize==len(data)-1:
        checkpoint(data)Chonkers power is hidden in it's simplicity.
The simalarities between enumerate and chonkify make it easy to adopt.
The chonking syntax is readable, while abstracting out the use of // and % avoids common errors with indexing.
Chonk objects a dataclasses that can be pretty printed, compared, and stored with your data if you like.
Note that chonk objects are reused between iterations for performance reasons;
don't modify chonks unless you understand the implications.Design considerationsThe design of chonker was inspired by the tqdm library and by unix philosophy, e.g., do one simple thing and do it well.
The design was also inspired by the python built-in enumerate.
The name chonk is chosen specifically to distinguish the chonk data structure from the concept of a chunk.
A chunk is a subset of data from a larger dataset.
A chonk is a data structure that augements the indexes of an iteration.The authors of chonker considered other designs.
The standard chunking approch usually looks likefrom chunker import chunkify

for chunk in chunkify(data, chunksize=100):
    do_something_special(chunk[0])
    for row in chunk[1:-1]:
        do_something_normal(row)
    do_something_els(chunk[-1])This approach isn't particularly readable.
With dealing with iterables this approach becomes even less readable.Another common approach is to use callbacks likefrom callchunk import chunkify

for row in chunkify(data, chunksize=100, start_callback=do_something_special, end_callback=do_something_else, skip_first=True, skip_last=True):
    do_something_normal(row)This approach is even less readable and has a downside that the user can only specify a callback for predetermined events.These two approaches share a common pitfall, they try to hide too much logic from the user.
With chonker the user is exposed to the right level of abstraction and can handle their events as they see fit.
Package: chook
ChookVersion 0.2.0 (Release date: March 21, 2021)LicenseThis software is shared under an Apache License (attached). We ask you to
please cite the paper if you choose to use chook. Thank you.DescriptionChook is a comprehensive suite for generating binary optimization problems with planted solutions.
Chook currently supports the following problem types:Tile planting (2D/3D)Wishart plantingDeceptive cluster loops (DCL)Equation planting (k-regular k-XORSAT)k-local plantingRequirementsYou will need Python 3.4 or later to run Chook.InstallationOne can install Chook using the Python package managerpip:pip install chookAlternatively, Chook can be downloaded from GitHub and can be installed as follows:cd <path_to_repo>
python setup.py installUsagechook problem_type config_file [-h] [-n num_instances] [-o output_format] [-f file_format]Required argumentsproblem_type:Choose the type of problems to be generated. Allowed options: {TP,WP,DCL,XORSAT,K_LOCAL}TP: Tile planting (2D/3D)WP: Wishart plantingDCL: Deceptive cluster loops (DCL)XORSAT: Equation planting (k-regular k-XORSAT)K_LOCAL: k-local plantingconfig_file:Configuration file containing problem-type specific parameters.
Refer the providedparams.infile for an example.Optional arguments-n num_instancesThe number of problem instances to be generated (default: 10)-o output_formatOutput format: ising/hobo (default: ising)-f file_formatFile format: txt/json (default: txt)-h, --helpShow this help message and exitThe generated instances will be stored as text/JSON files in a subdirectory within the
current working directory. The ground state energies will be recorded in a separate text
filegs_energies.txt. For XORSAT problems,gs_energies.txtwill also contain the
ground state degeneracies.
Package: choose
choose========Choices on steroids.. image:: https://img.shields.io/pypi/v/choose.svg:target: https://pypi.python.org/pypi/choose.. image:: https://img.shields.io/travis/ulamlabs/choose.svg:target: https://travis-ci.org/ulamlabs/choose.. image:: https://codecov.io/gh/ulamlabs/choose/branch/master/graph/badge.svg:target: https://codecov.io/gh/ulamlabs/chooseSupported versions================- Python 2 and 3 supportHow to install==========.. code-block:: bashpip install chooseBasic usage:===========.. code-block:: python>>> class Types(choose.Choices):>>>     BAR = choose.Choice('foo_bar', 'Foo Bar')>>>     BAZ = choose.Choice('foo_baz', 'Foo Baz')>>> Types.BAR'foo_bar'>>> Types.BAR.text'Foo Bar'>>> Types.items()(('foo_bar', 'Foo Bar'), ('foo_baz', 'Foo Baz'))>>> Types.keys()('foo_bar', 'foo_baz')>>> Types.values()('Foo Bar', 'Foo Baz')>>> 'foo_bar' in TypesTrueExtended usage:===============.. code-block:: python>>> class Types2(choose.Choices):>>>     BAR = choose.Choice('foo_bar', 'Foo Bar', default=False)>>>     BAZ = choose.Choice('foo_baz', 'Foo Baz', default=False)>>>     FOO = choose.Choice('foo_foo', 'Foo Foo', default=True)>>>>>>     @classmethod>>>     def get_default(cls):>>>         return next(>>>             (item for item in cls.keys() if item.opts.default is True),>>>             None,>>>         )>>>>>> Types2.BAR.opts.defaultFalse>>> Types2.BAR.opts.not_existing_attr is NoneTrue>>> 'foo_bar' == Types2.get_default()False>>> Types2.BAR == Types2.get_default()False>>> 'foo_foo' == Types2.get_default()True>>> Types2.FOO == Types2.get_default()TrueUsage in Django:================.. code-block:: pythonclass AModel(models.Model):class AChoices(choose.Choices):X = choose.Choice('x', 'X')Y = choose.Choice('y', 'Y')choice = models.CharField(max_length=63, choices=AChoices.items())
Package: choosealicense
Choose a LicenseChoose a License is a Cookiecutter plugin for selecting an open-source license.Free software: ISC licenseDocumentation:https://choosealicense.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-06-04)First release on PyPI.
Package: choosealicense-cli
Bringhttp://choosealicense.comto your terminal. Choose a license in
your terminal.Installnote: please update version to 1.0.0 and above, the github api has changed.$ pip install -U choosealicense-cliUsageList all the available licenses:$ license showShow the info of the specified license:$ license info LICENSE(e.g. mit)Show the default context for the license template:$ license context LICENSE(e.g. mit)Generate a license:$ license generate LICENSE(e.g. mit)Get detailed help message vialicense-handlicense show/info/context/generate-hLicenseMIT.
Package: choosegpu
Choose GPU (WIP)TODOs: Configuring this templateCreate a Netlify site for your repository, then turn off automatic builds in Netlify settings.Add these CI secrets:PYPI_API_TOKEN,NETLIFY_AUTH_TOKEN(Netlify user settings - personal access tokens),DEV_NETLIFY_SITE_ID,PROD_NETLIFY_SITE_ID(API ID from Netlify site settings)Set up Codecov at TODOOverviewInstallationpipinstallchoosegpuAlso install RMM and Cupy if you want to usememory_pool=TrueUsageDevelopmentSubmit PRs againstdevelopbranch, then make a release pull request tomaster.# Install requirementspipinstall--upgradepipwheel
pipinstall-rrequirements_dev.txt# Install local packagepipinstall-e.# Install pre-commitpre-commitinstall# Run testsmaketest# Run lintmakelint# bump version before submitting a PR against master (all master commits are deployed)bump2versionpatch# possible: major / minor / patch# also ensure CHANGELOG.md updatedChangelog0.0.1First release on PyPI.
Package: choosem
choosemchoosemis achoosebased picker and launcher for macos.
Currently these functionalities are available:Insert select character from character dictionariesFocus [Yabai] programLaunch programsinstallfor python 3.6+:$ pip install --user choosem 
...
$ choosem --help
Usage: choosem [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  insert  insert character into active window
  yabai   control yabai windows managerKnown issuesinsertcommand might stop working, for this accessibility permission needs to be disabled and then enabled again.
Package: choose-next
MotivationSometimes all you want to do is to lie in bed and watch a few episodes. But
navigating to the right folder and choosing an episode which you haven’t seen
yesterday is too much work. With this small script all you have to do is to
type “playfuturama” (using tab completion of course!) if you have set up e.g.
this alias:alias playfuturama='choose-next -c "mplayer -fs" "/media/usb/Futurama"'News3.0.02021-03-29Require Python 3.6 (no new features, just usage of “try … from”)2.0.12017-05-01Small fixes, Windows compatible2.0.02017-04-30Bugfixes, Python 3 support, extensive test suite1.12011-04-26Bugfixes,--exclude,--include, and-d1.02010-04-26First working versionExamplesOver the next few weeks you want to watch all Futurama episodes in strict
rotation:# clear existing log file
choose-next --clear /media/usb/Futurama
# no special options needed
alias playfuturama='choose-next -c "mplayer -fs" "/media/usb/Futurama"'You want to see a random episode (out of order!), but not one you have already
seen. You want to prepend the filename so that the rotation order is retained:playfuturama -rpYou were somehow distracted, and want to watch the last episode again:playfuturama -lYou want to watch a specific episode, and continue to watch from this point on:playfuturama -n10 "/media/usb/Futurama/S04E01.avi"Usagechoose-next [OPTION]... DIR [FILE]...

  DIR        directory to choose from
  FILES      prefer these files before all others

Some options:

  -c CMD, --command=CMD      execute CMD on every selected file; %s in CMD is
                             substituted with the filename, otherwise it is
                             appended to CMD
  --clear                    remove log file and exit
  -l, --last                 play last played file
  -n NUM, --number=NUM       number of files to select (-1: infinite)
  -p, --prepend              prepend selected filename instead of appending
  -r, --random               choose a random file from DIRCopyrightCopyright (C) 2010-2021 Johannes WeißlLicense GPLv3+:GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.
Package: chooser
Package Descriptionchooseris a graphical utility that enables one to choose which
web browser to use when opening a URI.Quick StartMake sure thatpyxdgandwxPythonare installed on your system.
If you havepipinstalled, run:pip install chooserYou can also download the source tarball, unpack, and run:python setup.py installfrom within the source directory.To invoke the utility when attempting to view a selected URI via the mouse popup
menu provided in many desktop environments, set your default web browser to:chooser "%s"ConfigurationBy default,choosersearches for several common web browsers. One may also
specify which browsers to display in the configuration file~/.config/chooser/chooserrcas follows:[Browsers]
Firefox: /usr/bin/firefox
Chromium: /usr/bin/chromium-browserDevelopmentThe latest source code may be obtained fromGitHub.AuthorSee the includedAUTHORS.rstfile for more
information.LicenseThis software is licensed under theBSD License.  See the includedLICENSE.rstfile
for more information.