Saravanan666/pypi-org huggingface dataset:
Package: cidrtrie
cidrtrieis a simplistic implementation of a prefix tree and a library for classifying IP addresses based on prefix matching. Unlike other implementations (such as [py-radix](http://www.mindrot.org/projects/py-radix/)), this is pure-Python and aims to be as simple as possible.## Why? ##
This implementation offers asymptotic performance improvement for problems that look like Internet routing.bench.pycontains a simple and used-elsewhere _O(n)_ implementation (”NaiveCidrClassifier) of this same functionalify. Some sample numbers for inserting 100,000 cidrs into the tree and then looking up 10,000 IPs on a 3GHz Intel i7-4578U:insert CidrClassifier 5.16s
insert NaiveCidrClassifier 0.11s
lookup CidrClassifier 0.25s
lookup NaiveCidrClassifier 92.11sAn example use case would be to efficiently map IP addresses (from logs or some other source) to the originating network (and, eventually, to the owner) without using a commercial library like MaxMind or bringing in any native-code dependencies.
Package: cidr-trie
Store CIDR IP addresses (both v4 and v6) in a trie for easy lookup.Read the documentationhere.InstallationUsing pip:$pipinstallcidr-trieFrom source (Git):$gitclonehttps://github.com/Figglewatts/cidr-trie.git$cdcidr-trie$pythonsetup.pyinstallFrom source (PyPI):$wgethttps://files.pythonhosted.org/packages/6b/53/118c09dc2c294f41b12007634d53ed33219d15366ea8a1903fb98eb47c25/cidr_trie-1.0.tar.gz$tarxvfcidr_trie-1.0.tar.gz$cdcidr_trie-1.0$pythonsetup.pyinstallUsagecidr-trie can be used to build a trie of IP networks, storing data
on each node. The stored data can be of any type.
Shown here is an example of building both IPv4 and IPv6 tries with data,
and then retrieving data from both tries.fromcidr_trieimportPatriciaTrie# --- supports IPv4 ---trie=PatriciaTrie()trie.insert("0.0.0.0/0","Internet")trie.insert("32.0.0.0/9","RIR-A")trie.insert("32.128.0.0/9","RIR-B")trie.insert("32.32.0.0/16","another")trie.insert("32.32.32.0/24","third")trie.insert("32.32.32.32/32","you")trie.insert("192.168.0.1/32","totally different")trie.insert("33.0.0.0/8","RIR3")trie.insert("64.0.0.0/8","RIR2")# nodes: ['Internet', 'RIR-A', 'another', 'third', 'you']nodes_for_prefix=trie.find_all("32.32.32.32")# prints "Internet, RIR-A, another, third, you"print(', '.join(n.valueforninnodes_for_prefix))# nodes: ['Internet', 'totally different']trie.find_all("192.168.0.1/32")# nodes: ['Internet', 'RIR-B']trie.find_all("32.192.0.0/10")# --- supports IPv6 ---trie=PatriciaTrie()trie.insert("::/0","Internet")trie.insert("1234::/16","Test")trie.insert("1234:1001::/32","Another one")trie.insert("1234:1001:1920::/48","A third")trie.insert("1234:1001:1920:2000:2020::/96","A fourth")trie.insert("1234:1001:1920::ffff","A different one")# nodes: ['Internet', 'Test', 'Another one', 'A third', 'A fourth']trie.find_all("1234:1001:1920:2000:2020::/128")# nodes: ['Internet', 'Test', 'Another one', 'A third', 'A different one']trie.find_all("1234:1001:1920::ffff")
Package: ciecplib
CI ECP for PythonThis python package provides a native Python client to access
SAML/ECP-authenticated content over HTTP withCILogon.Release statusDevelopment statusInstallationSeehttps://ciecplib.readthedocs.io/en/latest/#installationfor installation instructions.Basic usage>>>fromciecplibimportrequest>>>response=request('https://somewhere.org/mywebpage/')
Package: cielcg
# cielcgalternative cgroup-tools (cgexec) implementation for both cgroup v1 and v2 (cgroup2)following subcommands are implemented (some options might not be implemented though):cgclassifycgcreatecgdeletecgexeccggetcgsetlscgrouplssubsysthese commands work forcgroup v2as well.for your sake,python -m cielcg [subcommand]is also supported as well as launching as standalone script.## variable conversionssome cgroup1/2 variable conversions refer to:https://blogs.oracle.com/linux/cgroup-v2-checkpointhttps://lore.kernel.org/lkml/20160812221742.GA24736@cmpxchg.org/T/
Package: cienpy
cienpyThe name cienpy stands for CIvil ENgineering PYthon and the package contains supporting tools for the computation of parameters and the management of interactive widgets and glyph from the library Bokeh.
At the moment, the package is focused on Structural Mechanics beacause it supports Jupyter Notebooks with interactive tools, but in the future it could be enriched with more Civil Engineering analysis and theories.MIT LicenseRESSLabAuthor Github PageAuthor: Carmine SchipaniRequirementsBokeh>=2.4.2(safer with version 2.4.2)numpyFeaturesStructural MechanicsStatic system: simply supported beamCross section: filled and hollow rectangular sectionFree-body diagram (FBD) with state machineNVM diagramsDeflection (only due to bending)Elastic and plastic analysisStress and strain analysisStress state element and stressesTorsion (uniform)Mohr CircleBucklingInteractive Tools (Bokeh)Nested-string structure and explicit function implementation for easy and quick management of Javascript codes in PythonCurved and double arrowsLinspace and parabola Javascript functionsRoller and pinned boundary condition (draws)Supporting tools for quick definition and modification of various glyph and widgetsInstallationUse the package managerpipto install cienpy using the following prompt command.pipinstallcienpyUsageThe package is normally imported with this lines:# import the desired static systemfromcienpyimportsimplebeamasstatic_sys# import the desired cross-sectionfromcienpyimportrectangular_sectionasbeam_section# import supporting modules for the visualisation implementationfromcienpyimportmodelsfromcienpyimportjavascriptcodesasjsA dictionary should be created with a specific format of arrays with one entry each and keynames that depend on the functions needed. This dictionary will be used as the main source (ColumnDataSource) for the manipulation of variables bewtween widgets and glyphs in the Javascript codes.The figures, widgets and glyphs should be initialised.The Javascript logics for different widgets and events should be declared.Finally the layout is declared and executed.Note that the functions have exhaustive description to help the user.ExamplesApplications of the library are available in the NOTO EPFL server under the DRIL project for Structural Mechanics or in theRESSLabGithub page.Library StatusThe library is currently finished for its intended use (support for Structural Mechanics interactive tools). Future implementations are possible to extend the usage and the power of the package.
Package: ciex
ciex (alpha)=========a simple, lightweight and probably dumb CI system, written in Python.**To extend it**, write your own python `ci workers` modules, then define them in the daemon's configuration file.**An example** scenario would be to install the `ciex daemons` on multipe machines, then trigger the checkout command or build, upgrade, etc from another machine, say after you're pushing new code to the master branch.# QuickstartNote: You need [nanomsg](https://github.com/nanomsg/nanomsg) installed on your system.```shell$ pip install ciex$ ciexd --config /path/to/config/ciex.config$ ciextl pingpong```# InstallationIf you have have [nanomsg](https://github.com/nanomsg/nanomsg) installed on your system, the installation should be pretty easy.**Requirements*** [nanomsg](https://github.com/nanomsg/nanomsg) - requirement for nanoservice* [nanoservice](https://github.com/walkr/nanoservice) - for interprocess comm.* [oi](https://github.com/walkr/oi) - for command line interface**Install options**```shell# Using pip$ pip install ciex# Or using the makefile$ git clone git@github.com:walkr/ciex.git$ cd ciex$ make install```# High level overviewThe system has two separate components:1. A daemon process `ciexd`2. A command line interface `ciexctl`### 1. DaemonThe daemon is running continuously awaiting for commands.When a command is received, it is tranformed into a task,then it is placed onto the `new queue`. **CI Workers** take tasksfrom the `new queue` and do their work. When the work associatedwith that task is finished, the CI Worker will mark the task as`success` OR `failure`, then it will send it back to the task router.The daemon accepts a configuration file, where you can define the settingsfor each of your apps, as different apps have different needs.**Example config file**```ini[settings.app.my_app]localpath = /apps/my_apprepo = git@github.com:walkr/test.gitworker_dirpath = /apps/myapp/ciworker_modname = workersworker_classname = CustomWorker```**Starting the daemon**```shell$ ciexd --config /etc/ciex.config  # optional --debug flag```### 2. Command line interfaceThe command line interface accepts commands and forwards them to the daemon**Usage Example:**```shell$ ciextl pingpong$ ciexctlctl > list['appname1', 'appname2']ctl > status appname1<Task app_name:appname1, command:checkout, status:TaskStatus.success>ctl > upgrade appname1Task triggered ...ctl > status appname1<Task app_name:appname, command:upgrade, status:TaskStatus.pending># While a task is running, you cannot fire up another taskctl > upgrade appname1Deny. Taks already running```That's it. Enjoy!**MIT License**
Package: ci-exec
ci_execA wrapper package designed for running continuous integration (CI) build steps using
Python 3.6+.Managing cross platform build scripts for CI can become tedious at times when you need
to e.g., maintain two nearly identical scriptsinstall_deps.shandinstall_deps.batdue to incompatible syntaxes.ci_execenables a single file
to manage this using Python.Theci_execpackage provides a set of wrappers / utility functions designed
specifically for running build steps on CI providers.  It isLogging by DefaultCommands executed, including their full command-line arguments, are logged.  This
includes any output onstdout/stderrfrom the commands.  The logging
resembles whatset-xwould give you in a shell script.  For commands that will
take a long time, as long as output is being produced, this will additionally
prevent timeouts on the build.Failing by DefaultAny command that does not succeed will fail the entire build.  An attempt to exit
with the same exit code as the command that failed will be performed.  Meaning the
CI provider will correctly report a failed build.Convenientci_execaffords users the ability to write shell-like scripts that will work
on any platform that Python can run on.  A simple example:fromci_execimportcd,whichcmake=which("cmake")ninja=which("ninja")withcd("build",create=True):cmake("..","-G","Ninja","-DCMAKE_BUILD_TYPE=Release")ninja("-j","2","test")Installationci_execisavailable on PyPI.  It can be
installed using your python package manager of choice:$pipinstallci-execNoteThe PyPI package has a-:ci-exec, notci_exec.There is also asetup.pyhere, so you can also install it from source:$pipinstallgit+https://github.com/svenevs/ci_exec.git@masterLicenseThis software is licensed under the Apache 2.0 license.
Package: cif
Composite Indicators Framework (CIF) for Business Cycle AnalysisComposite indicators are recognized to be an eligible tool of the business cycle analysis, especially because they can be easily interpreted although they summarize multidimensional relationships between individual economic indicators.The methodology of composite indicators construction was described in detail by several organizations (OECD, Conference Board etc.). It therefore came as a surprise, that no publicly available software program haven't supported the whole computational process or its automation till now. This new python library was proposed to fill this gap!It nowadays contains more than 30 functions designed to construct composite leading indicators and covers several areas:loading data directly from OECD API,basic conversion from quaterly to monthly data,data transformations (seasonal adjustment, stabilising forecasts, detrending, normalization),ex-post turning points detection (Bry-Boschan algorithm),real-time turning points detection from archive values,evaluation,aggregation into composite indicator,visualisations,and more.InstallationCIF is available via pip and tested on Python 3.5.Run the following command from a terminal window:pip install cifExamplesSee the Jupyter notebook with the basic CIF pipelinehere.
Package: cifar10
CIFAR 10 Dataset LibraryThis library was created to allow an easy usage ofCIFAR 10 DATA. This is a wrapper around the instructions givn on theCIFAR 10 siteInstallationpip3installcifar10Sample Usageimportcifar10forimage,labelincifar10.data_batch_generator():image# numpy array of an image, which is of shape 32 x 32 x 3label# integer value of the image labelAPIdata_batch_generatorReturns a generator of each image and label pair for data batchdata_batch_generator(cache_location: str=".") -> Iterator[Tuple[np.array, int]]parameterscache_location(default: library folder location): where to cache the cifar10 datatest_batch_generatorReturns a generator of each image and label pair for test batchtest_batch_generator(cache_location: str=".") -> Iterator[Tuple[np.array, int]]parameterscache_location(default: library folder location): where to cache the cifar10 datametaReturns the raw meta filemeta(cache_location: str=".") -> Dict[bytes, Any]parameterscache_location(default: library folder location): where to cache the cifar10 dataimage_label_mapReturns the raw meta fileimage_label_map(cache_location: str=".") -> Dict[int, str]parameterscache_location(default: library folder location): where to cache the cifar10 data
Package: cifar10-web
CIFAR-10 WebLoad CIFAR-10 from user-specified directory (default /home/USER/data/cifar10 or Windows equivalent). Automatically download to that directory the CIFAR-10 tar file if not present.Installpip install cifar10_webUsagefrom cifar10_web import cifar10

train_images, train_labels, test_images, test_labels = cifar10(path=None)
Package: ciff-toolkit
CIFF ToolkitThis repository contains a Python toolkit for working withCommon Index File Format (CIFF)files.Specifically, it provides aCiffReaderandCiffWriterfor easily reading and writing CIFF files. It also provides a handful of CLI tools, such as merging a CIFF file or dumping its contents.InstallationTo use the CIFF toolkit, install it from PyPI:$pipinstallciff-toolkitUsageReadingTo read a CIFF file, you can use theCiffReaderclass. It returns the posting lists and documents as lazy generators, so operations that need to process large CIFF files do not need to load the entire index into memory.TheCiffReadercan be used as a context manager, automatically opening files if a path is supplied as astrorpathlib.Path.fromciff_toolkit.readimportCiffReaderwithCiffReader('./path/to/index.ciff')asreader:header=reader.read_header()forplinreader.read_postings_lists():print(pl)fordocinreader.read_documents():print(doc)Alternatively, theCiffReaderalso accepts iterables of bytes instead of file paths. This could be useful if, for instance, the index is in a remote location:importrequestsfromciff_toolkit.readimportCiffReaderurl='https://example.com/remote-index.ciff'withCiffReader(requests.get(url,stream=True).iter_content(1024))asreader:header=reader.read_header()...WritingTheCiffWriteroffers a similar context manager API:fromciff_toolkit.ciff_pb2importHeader,PostingsList,DocRecordfromciff_toolkit.writeimportCiffWriterheader:Header=...postings_lists:list[PostingsList]=...doc_records:list[DocRecord]=...withCiffWriter('./path/to/index.ciff')aswriter:writer.write_header(header)writer.write_postings_lists(postings_lists)writer.write_documents(doc_records)Command Line InterfaceA couple of CLI commands are supported:ciff_dump INPUTDumps the contents of a CIFF file, in order to inspect its contents.ciff_merge INPUT... OUTPUTMerges two or more CIFF files into a single CIFF file. Ensures documents and terms are ordered correctly, and will read and write in a streaming manner (i.e. not read all data into memory at once).Note:ciff_mergerequires that theDocRecordmessages occur before thePostingsListmessages in the CIFF file, as it needs to remap the internal document identifiers before merging the posting lists. Seeciff_swapbelow for more information on how to achieve that.ciff_swap --input-order [hpd|hdp] INPUT OUTPUTSwaps thePostingsListandDocRecordmessages in a CIFF file (e.g. in order to prepare for merging). The--input-orderargument specifies the current format of the CIFF file:hpdfor header - posting lists - documents, andhdpfor header - documents - posting lists.ciff_zero_index INPUT OUTPUTTakes a CIFF file with 1-indexed documents, and turns it into 0-indexed documents.DevelopmentThis project usesPoetryto manage dependencies, configure the project and publish it to PyPI.To get started, use Poetry to install all dependencies:$poetryinstallThen, either activate the virtual environment to execute all Python code in the virtual environment, or prepend every command with poetry run.$poetryshell(venv)$ciff_dumpindex.ciffor:$poetryrunciff_dumpindex.ciff
Package: cifilter
Author:Jonathan Wight <jwight@mac.com>description:CoreImage filter toolGoalcifilter is a command line tool for filtering images using CoreImage.InstallInstall from source:$ python setup.py installWith pip:$ pip install cifilterWithsetuptools:$ easy_install -U cifilterUsageNote most of the arguments of the form –inputXXXX vary depending on the filter selected.$ cifilter –filter CIRippleTransition –help
Usage: cifilter –filter CIRippleTransition [options]Options:--versionshow program’s version number and exit-h,--helpHelp!-iINPUT,--inputImage=INPUTThe input image (or - for stdin)-oOUTPUT,--outputImage=OUTPUTThe output image (or - for stdout)-fFILTER,--filter=FILTERName of the filter--listfiltersList available CoreImage filters--listcategoriesList available CoreImage filter categories--category=CATEGORYCategory used to filter listfilter results--width=WIDTHDesired width of output image--height=HEIGHTDesired height of output image--type=TYPEDesired UTI type of output image (e.g. public.png,
public.jpg, etc)-v,--verboseSet the log level to INFO--loglevel=LOGLEVELset the log level, 0 = no log, 10+ = level of logging--logfile=LOG_FILEFile to log messages to. If - or not provided then
stdout is used--openOpen the output image after processing--inputTargetImage=VALUEThe target image for a transition.--inputShadingImage=VALUEAn image that looks like a shaded sphere enclosed in a
square image.--inputCenter=VALUEThe x and y position to use as the center of the
effect--inputExtent=VALUEA rectangle that defines the extent of the effect.--inputTime=VALUEThe parametric time of the transition. This value
drives the transition from start (at time 0) to end
(at time 1).--inputWidth=VALUEThe width of the ripple.--inputScale=VALUEA value that determines whether the ripple starts as a
bulge (higher value) or a dimple (lower value).Examples$ cifilter –help$ cifilter –listcategories$ cifilter –listfilters$ cifilter –listfilters –category CICategoryGenerator$ cifilter –filter CIStarShineGenerator –help$ cifilter –filter CIEdges < test.jpg$ cifilter –filter CIEdgeWork < input.png > output.png$ cifilter –filter CIEdgeWork –inputImage 1.png –output 2.png$ cifilter –filter CISunbeamsGenerator –open$ cifilter –filter CICheckerboardGenerator -o - | cifilter –filter CIEdgeWork -i - –open$ cifilter –filter CICheckerboardGenerator –type public.jpeg –outputImage ~/Desktop/Checkerboard.jpg$ cifilter –filter CIConstantColorGenerator –inputColor=1.0,1.0,1.0,1.0 –width 256 –height 256 –open$ cifilter –filter CIConstantColorGenerator –inputColor=1.0,0.0,0.0,1.0 -o - | cifilter –filter CIHueAdjust –inputAngle=180 –openBugsSend all bug reports tojwight@mac.com
Package: cifit
cifit is a lightweight configuration management toolkit, it patterns itself off of cfenginea little bit (it has classes), borrows from bcfg2, but the language to manage yourconfigurations is python.BUILD:You need mercurial, setuptools, and python of course.You also need hgdistver:https://bitbucket.org/RonnyPfannschmidt/hgdistver/overviewCurrently cifit only is tested against OSX (partly) and Debian & Ubuntu (systems with apt installed). Everything here should work or be extensible against any posix compliant box you can get python on.  it *could* be made to work on windows, patches accepted.see docs/ for documentation.see examples/ for a few rudimentary examples.The idea behind this code is that you write a config file (.cft) that is in python, but you only run the code thru cifit.Doing this gives you a bunch of built-ins that make managing systems easier.Normally I run cifit from crontab every 5 minutes.You should put your configs in a Version Control system (say subversion or git)  then it's also easy to update configs:cifit automatically puts the current directory to the basename of the .cft file that cifit runs, so to do a svn update:files.run('svn update')it's easy to manage your system or pear or python packages:packages = ['apache2','ssh','php5']for p in packages:pkg.installPackage(p)it's easy to change or update your files: (on multiple runs it will NOT append it twice).files.append('/etc/issue',['This system is managed by cifit'])It's easy to use sed like replacements on a file.for example to turn magic_quotes off:files.sub("/etc/php5/apache2/php.ini",["/magic_quotes_gpc = On/magic_quotes_gpc = Off/"])It's easy to keep apache running:if not procs.checkService('apache2'):procs.startService('apache2')Why yet another Configuration Management Engine?I love python. I hate XML, I love the ideas behind cfengine, but I can'tunderstand the magic behind it to actually do something useful. I understand python, so I write my configs in python.
Package: cifrazia-django-jet
Django JET (Django-3 compatible)Fork fromhttps://github.com/mariusionescu/django-jetInstallationDownload and install the Django3 compatible version of Django JET:poetry add cifrazia-django-jetpip install cifrazia-django-jeteasy_install cifrazia-django-jetAdd 'jet' application to the INSTALLED_APPS setting of your Django project settings.py file (note it should be
before 'django.contrib.admin'):INSTALLED_APPS=[...,'jet','django.contrib.admin',]Make suredjango.template.context_processors.requestcontext processor is enabled in settings.py (Django 1.8+
way):TEMPLATES=[{'BACKEND':'django.template.backends.django.DjangoTemplates','DIRS':[],'APP_DIRS':True,'OPTIONS':{'context_processors':[...,'django.template.context_processors.request',...],},},]Add URL-pattern to the urlpatterns of your Django project urls.py file (they are needed for related–lookups and
autocompletes):urlpatterns=['',path('jet/',include('jet.urls','jet')),# Django JET URLSpath('admin/',include(admin.site.urls)),...]Create database tables (chose):python manage.py migrate jetpython manage.py syncdbCollect static if you are in production environment:python manage.py collectstaticClear your browser cache
Package: cif-retriever
CIFretriverThis python app retrieves data from the Materialproject APIMake sure to get MP API KEY:https://materialsproject.org/open;Install requirements with python -m pip install -r  requirements.txt
or look athttps://pymatgen.org/installation.htmlif you have any installation issues or MacOS;Run main.py module, it will demand the API KEY you've got and then creates config.json file
required for API authentification;Insert "pretty formula" aka "SnO2" or "TiO2", then a query will be got;You can save the query with the name 'pretty formula'.csv into the 'csv_data_set_for_elements' directory if you chose to,
that will be created or updated automatically;Then you can insert a material_id, this will retrieve you the conventional standard structure .cif file for requested material;You can also plot material bandstructure;
If you using linux try: sudo apt-get install python3-tk;
Package: cifter
cifterPython3 ATOC CIF file parserUsagefromcifterimportparse_filedocument=parse_file('ttisf760.mca')forschedule_recordindocument.schedule_records:print("Basic record\n")print(schedule_record.basic_record)print("Origin record\n")print(schedule_record.origin_record)print("Intermediate records\n")forintermediate_recordinschedule_record.intermediate_records:print(intermediate_record)print("Termination record\n")print(schedule_record.termination_record)Note that theparse_file()method is a blocking CPU bound operation