Saravanan666/pypi-org huggingface dataset:
Package: ichrome
ichromeChrome controller for Humans, base onChrome Devtools Protocol(CDP)and python3.7+.Read DocsIf you encounter any problems, please let me know throughissues, some of them will be a good opinion for the enhancement ofichrome.Installpip install ichrome -UUninstall & Clear the user data folder$ python3 -m ichrome --clean
    $ pip uninstall ichromeQuick StartimportasynciofromichromeimportAsyncChromeDaemonasyncdeftest():asyncwithAsyncChromeDaemon()ascd:# create a new tabasyncwithcd.connect_tab(index=None)astab:awaittab.goto('https://github.com/ClericPy/ichrome',timeout=5)print(awaittab.title)# Privacy Mode, proxyServer arg maybe not work on Chrome, for `Target.createBrowserContext` is the EXPERIMENTAL feature(but chromium is ok).# https://chromedevtools.github.io/devtools-protocol/tot/Target/#method-createBrowserContextasyncwithcd.incognito_tab(proxyServer='http://127.0.0.1:8080')astab:awaittab.goto('https://httpbin.org/ip',timeout=5)print(awaittab.html)asyncio.run(test())Read DocsWhy?In desperate need of a stable toolkit to communicate with Chrome browser (or other Blink-based browsers such as Chromium)ichromeincludes fast http & websocket connections (based on aiohttp) within anasyncioenvironmentPyppeteer is awesomeBut I don't need so much, and the spelling of pyppeteer is confusedEvent-driven architecture(EDA) is not always smart.Selenium is slowWebdriver often comes with memory leakPhantomJS development is suspendedNo native coroutine(asyncio) supportPlaywright comes too lateThis may be a good choice for bothsyncandasyncusageThe 1st author ofpuppeteerjoined it.But its core code is based on Node.js, which is too hard to monkey-patch.FeaturesAs we known,Javascriptis the first-class citizen of the Browser world, so learn to use it withichromefrequently.A process daemon of Chrome instancesauto-restartcommand-line usageasyncenvironment compatibleConnect to anexistingChromeOperations on Tabs under stablewebsocketCommonly used functionsIncognito ModeChromeEngineas the progress poolsupport HTTPapirouter withFastAPI(EXPERIMENTAL)launch the chrome pool withpython -m ichrome.webpython -m ichrome.web --helpfor usageFlattenmode withsessionIdCreate only1WebSocket connectionNew in version 2.9.0EXPERIMENTALShare the sameWebsocketconnection and usesessionIdto distinguish requestsAfter v3.0.1AsyncTab._DEFAULT_FLATTEN = TrueThe install script of chromiumdebug mode for sync usage withichrome.debugger>4.0.0 (EXPERIMENTAL)
Package: ichs
AboutIchs is a module I made for fun in around 20 minutes. As of writing, there are only two functions but I do plan to add more.Twitterichs.twitter()Will return Ichs' Twitter page.Usage:importichstwitter=ichs.twitter()print(twitter)http://www.twitter.com/IlfordCountySchWebsiteichs.website()Will return the Ichs website.Usage:importichswebsite=ichs.website()print(website)https://www.ichs.org.uk/
Package: icicle-emu
icicle-pythonThis project is an easy to use Python wrapper aroundicicle-emu. You can read more about Icicle in the paper:Icicle: A Re-designed Emulator for Grey-Box Firmware Fuzzing.InstallationYou can install thelatest releasefromPyPI:pip -m install icicle-emuDevelopmentNote: You need to installRust 1.48or later to build from source.Set up a virtual environment:python-mvenvvenv# macOS/Linuxsourcevenv/bin/activate# Windowsvenv\Scripts\activate.batGet the dependencies and build:pipinstall-rrequirements.txt
pythonsetup.pydevelop
Package: icing
# ICING - Infer clones of immunoglobulin dataA Python package to clonal relate immunoglobulins.ICINGis an implementation of an unsupervised learning technique
used to identifyclones, which are groups of immunoglobulins which share
a common ancestor. In other words, immunoglobulins in the same group descend
from the same germline.
Also, the method is designed to be used also in contexts where
the number of samples is very high. For this reason, the framework can be used
in combination with NGS technologies.## Quickstart
First of all, download ICING from the Python Package Index by using package manager pip
with`bash $ pip install icing `or clone it from our Github repository with`bash $ git clonehttps://github.com/slipguru/icing`and then install it with`bash $ python setup.py build_ext--inplaceinstall `If you cloned the repository, navigate undericing/examplesdirectory. There, run an example with`bash $ ici_run.py config_example.py `The output should be in the form of`bash CRITICAL(2017-02-2812:52:28,564): Start analysis for clones_95.tab CRITICAL(2017-02-2812:52:44,282): Number of clones: 104 `If you want to produce some plots for the analysis, run`bash $ ici_analysis.py icing_example_result/icing_clones_95.tab_<today date> . `and that’s it.### “Ok, now I want to use it for real.”
Great!First of all, create a new configuration file with the-ccommand.`bash $ ici_run.py-cconfig.py `Modify the configuration file to specify, for example, the path of your input files and non-standard ICING settings.Run the icing core with`bash $ ici_run.py config.py `which will produce an output folder in<current_path>/results/icing_<date_of_today>.Now analyse the result`bash $ ici_analysis.py results/output_folder/ `to produce plots related to your analysis.
Done!## Dependencies
ICING is developed using Python 2.7 and inherits its main functionalities from:numpyscipyscikit-learnmatplotlibseaborn## Authors and Contributors
Current developer: Federico Tomasi ([@fdtomasi](https://github.com/fdtomasi)).## Support or Contact
Check out our documentation or contact us:federico [dot] tomasi [at] dibris [dot] unige [dot] it
Package: icinga2apic
# <a id=”about-icinga2”></a> About icinga2apicicinga2apic is a [Python](http://www.python.org) module to interact with the [Icinga 2 RESTful API](https://www.icinga.com/docs/icinga2/latest/doc/12-icinga2-api/).# Features1. [basic and certificate auth](doc/2-authentication.md)
1. [config file support](doc/2-authentication.md#-config-file)
1. [objects (zone support)](doc/3-objects.md)
1. [actions](doc/4-actions.md)
1. [events](doc/5-events.md)
1. [status](doc/6-status.md)# Developing1. Code cleanup
1. Tests
1. Configuration Management# UsageSee the [doc](doc) directory.
Package: icinga2py
icinga2-apiAn icinga2 API client, seehttp://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/icinga2-apito learn more about icinga2 API.Installationpipinstallicinga2pyDevelopment GuidemakeinitRun Examples.venv/bin/activate
cpexamples/local_config.py.exampleexamples/local_config.py# edit examples/local_config.pyviexamples/local_config.py
pythonexamples/example.pyIcinga2 API Referenceperm, url, SUPPORTS FILTERS

actions/<action>        /v1/actions Yes
config/query            /v1/config  No
config/modify           /v1/config  No
objects/query/<type>    /v1/objects Yes
objects/create/<type>   /v1/objects No
objects/modify/<type>   /v1/objects Yes
objects/delete/<type>   /v1/objects Yes
status/query/<type>     /v1/status  Yes
events/<type>           /v1/events  No
console                 /v1/console No

---

base url = /v1

GET     /objects/<type>[/<fullname>]    attrs, joins, meta, filter
PUT     /objects/<type>/<fullname>      templates, attrs
POST    /objects/<type>/<fullname>      attrs
DELETE  /objects/<type>[/<fullname>]    cascade, filter

/actions/<action>

/events     ?
/status     ?
/console    session,command,sandboaxed

GET     /config/packages
POST    /config/packages/<package>
DELETE  /config/packages/<package>
POST    /config/stages/<package>           files(file => content pairs)
GET     /config/stages/<package>/<stage>
DELETE  /config/stages/<package>/<stage>
GET     /config/files/<package>/<stage>/<path>

GET /types/<objectname>

*notes: <type> has to be replaced with the plural name of the object typeUsagefromicinga2_api.apiimportApifrompprintimportpprint# init api instanceapi=Api(['config-master.localdomain','icinga-api1.localdomin','icinga-api2.localdomin'],(username,passwd),'path of your ca cert')# /objects/hostsprintapi.objects.hosts.get(attrs=["name"])pprint(api.objects.hosts.get(attrs=["name"],filter='host.name == "sindar1a"'))# /config/packagespprint(api.config.packages.dae.post())printapi.config.packages.dae.delete()pprint(api.config.packages.get())pprint(api.config.stages.dae.url('sindar33a-1458219125-0').get())## upload config filefiles={'zones.d/global-templates/dae.conf':'// Hello DAE yesyesyes','zones.d/checker/dae.conf':'// Hello DAE',}pprint(api.config.stages.dae.post(files=files))## clean old config package stagesMAX_STAGE_RESERVED=3r=api.config.packages.get()forpkginr.get('results',[]):ifpkg['name']!='dae':continueremove_cnt=max(len(pkg['stages'])-MAX_STAGE_RESERVED,0)remove_stages=pkg['stages'][:remove_cnt]print'going to remove',remove_stagesforstageinremove_stages:api.config.stages.dae.url(stage).delete()pprint(api.config.packages.get())## watch eventsforeventinapi.events.watch(types=['Notification'],queue='my_queue',):do_something_with(event)NOTESonly support Advanced Filtersonly support http basic authI think there's bug in icinga2 api, that you better query to only one host(your cluster config master) when you need to manipulate config package
Package: icingapy
A library for interacting/scrapping Icinga 1 CGI endpoints.Full Documentation can be found at:https://icingapy.readthedocs.io/How to setup the client:>>> from icingapy import IcingaClient
icinga = IcingaClient('icinga.host.com', 'admin', 'Ch@ng3m3!')Icinga Client currently support three methods.summary,status,downtimesummaryqueries thestatus.cgiendpoint and parses the table for a list of services,
their status and info.>>> icinga.summary('testhost')
{'Current Load': {'service': 'Current Load', 'status': 'OK', 'info': 'OK - load average: 0.38, 0.33, 0.31'},
'Current Users': {'service': 'Current Users', 'status': 'OK', 'info': 'USERS OK - 0 users currently logged in'},
'Disk Space': {'service': 'Disk Space', 'info': 'DISK CRITICAL - free space: / 1423 MB (10% inode=53%): '},
'HTTP': {'service': 'HTTP', 'status': 'OK', 'info': 'HTTP OK: HTTP/1.1 301 Moved Permanently - 529 bytes in 0.000 second response time'},
'SSH': {'service': 'SSH', 'info': 'connect to address 127.0.0.1 and port 22: Connection refused'},
'Total Processes': {'service': 'Total Processes', 'status': 'OK', 'info': 'PROCS OK: 12 processes'}}statusqueries theextinfo.cgiendpoint and parses the table to pull the same information
(with the addition of last-check) as summary but for a single service>>> icinga.status('testhost', 'Current Load')
{'service': 'Current Load',
'state': '  OK   (for  0d  1h 50m 10s)',
'info': 'OK - load average: 0.38, 0.33, 0.31',
'last-check': '2018-09-29 17:22:07'}downtimequeries thecmd.cgiendpoint to post a downtime for a particular host or service host. Returns True/False.
service, expire_timedate, and msg are optional. Method defaults to a timedate of 1 hour.
expire_timedate expects a dictionary with keys matching datetime.timedelta parameters.>>> icinga.downtime(host='localhost', service='Disk Space', expire_timedate={'hours': 1}, msg='until logrotate'))
True
Package: icinga-tray
Icinga TrayThis script creates a system tray icon that displays current Icinga information
and sends notifications on changes. It uses the icingaweb-API.It runs on Linux and Windows, possibly on Mac, but that's untested.InstallationInstall usingpip:pip install icinga-trayConfigurationAt this point the configuration is done with a config file in JSON format,
no GUI available.The file should be located here:Linux:$XDG_CONFIG_HOME/icinga_tray/config.json(default is~/.config/icinga-tray/config.json)Windows:%USERPROFILE%\AppData\Local\icinga-tray\icinga-tray\config.jsonIt should look like this:{"base_url":"https://my.icinga.server/icingaweb2/","ssl_verify":"yes","user":"login","notifications":"yes","use_keyring":"yes","interval":10000,"host_groups":["host_group1","host_group2"]}base_url: the URL to the icinga-Webinterfacessl_verify: whether to check for a valid ssl certificateuser: the login to authenticatenotifications: whether to send desktop notifications or notuse_keyring: if set to yes, the credentials will be stored in the system keyring, if set to no the password needs to be entered on every launchinterval: refresh interval in mshost_groups: host groups to monitor (no "all" setting or similar available at this point)RunLinux: simply runicinga_trayfrom anywhere. Make sure that the install directory is in yourPATHWindows: runicinga_trayfrom a terminal or create a shortcut as target simply puticinga_tray, you can add it to your autostart
Package: ickafka
ickafkaA kafka consumer with color. Name inspired byicdiff.InstallationpipinstallickafkaUsageStart consuming at the latest offset:ickafka-slocalhost:9092-tmy_test_topicTo specify a consumer group name (default is None):ickafka-slocalhost:9092-tmy_test_topic-gtestgroupConsume all messages from the earliest offset:ickafka-slocalhost:9092-tmy_test_topic-oearliestCapture all consumed messages into a json file:ickafka-slocalhost:9092-tmy_test_topic--captureDisabling color:ickafka-slocalhost:9092-tmy_test_topic--no-color
Package: ickle
ðŸ“ˆ Ickle - Data Analysis LibraryA tiny DataFrame, statistics and analysis library for PythonInstallationIckle can be installed via pip through PyPipip install ickleFeaturesDataFrame along with Visual RepresentationBasic properties (len, columns, shape, etc)Subset SelectionBasic Methods (head, tail)Aggregation Methods (min, max, median, sum, etc)Non-Aggregation Methods (abs, copy, clip, cummin, etc)Additional Methods (isna, count, unique, etc)String-Only Methods (capitalize, center, count, find, etc)Pivot TableCSVread_csvto_csvExcelread_excelto_excel... and more. ðŸš€ CheckoutPATH.mdto see the roadmap.How To Contribute?SeeCONTRIBUTION.mdto know more.Getting StartedDataFrameA DataFrame holds two dimensional heterogenous data. It accepts dictionary as input, with Numpy arrays as values and strings as column names.importnumpyasnpimportickleasickname=np.array(['John','Sam','Tina','Josh','Jack','Jill'])place=np.array(['Kolkata','Mumbai','Delhi','Mumbai','Mumbai','Mumbai'])weight=np.array([57,70,54,59,62,70])married=np.array([True,False,True,False,False,False])data={'name':name,'place':place,'weight':weight,'married':married}df=ick.DataFrame(data)DocumentationRead the documentationhere
Package: icli
icli - interactive command line interfacesWhat is icliicliis a Python library, built on top ofargparse, which allows you to
quickly build rich interactive command line interfaces with sections, command
history, command batch processing, command repeating and interactive
auto-complete.icliusesreadlinelibrary for command inputs.FeaturesJump between command sections (use / for root section, .. or Ctrl-d to jump
to upper section)Send multiple commands, separated with;Repeat command execution, by adding|Xto the end of input (X - delay in
seconds between commands, use|cXto clear screen before next command
execution)Auto-completion (viaargcomplete)How to installpip3 install icliHow to useuseicli.ArgumentParserjust likeargparse.ArgumentParser(create
parsers, sub-parsers etc.)create dispatcher method for commands. This method receives parsed arguments
in **kwargs:defdispatcher(**kwargs):# ....define CLI sections tree and start interactive mode:importicliap=icli.ArgumentParser()# ...ap.sections={'user':['account','apikey'],'document':[]}ap.run=dispatcherap.interactive()CustomizingOverride:get_interactive_promptcustomize input promptprint_repeat_titlecustomize title for repeating commandshandle_interactive_exceptionhandle exceptions, raised during interactive
loopGlobal commandsYou may define global commands, which work in all sections, e.g. let's makewsystem command executed, when user typew:defw(*args):# the method receives command name and optional command arguments in *argsimportosos.system('w')ap.interactive_global_commands['w']=wNote: global commands are not auto-completedHistory fileIf history file is defined, input commands are loaded before interactive
session is started and saved at the end.ap.interactive_history_file='~/.test-icli'By default, last 100 commands are saved. To change this behavior, modify:ap.interactive_history_length=500Combining shell and interactive CLILet's launch interactive mode when your program is started without arguments,
otherwise process them:importsys# prog param sets program name in help to empty for interactive modeap=icli.ArgumentParser(prog=''iflen(sys.argv)<2elseNone)# ...iflen(sys.argv)>1:ap.launch()else:ap.interactive()Batch processingYour program may read commands from stdin or external file, then process them
without user inputTo do this, put commands to I/O steam and launchbatchmethod:importiof=io.StringIO()f.write('user account list ; user apikey list\ndocument list')f.seek(0)ap.batch(f)or just launchbatchmethod with a source stream:withopen('commands.list')ascf:ap.batch(cf)
Package: iclik
IClikis a minimal package for evaluating composite likelihood
models using Composite Likelihood AIC and BIC (CLAIC/CLBIC).For a review of these information criteria, please see:Ng, C. T., &
Joe, H. (2014). Model comparison with composite likelihood information
criteria. Bernoulli, 20(4), 1738–1764.
http://www.jstor.org/stable/43590422This package is in development. Please let me know about any bugs or
problems by raising an issue on GitHub.Available information criteriaComposite Likelihood AIC (CLAIC)The composite likelihood version of the Akaike information criterion
(AIC) was proposed by Varin et al (2011). It is calculated as:\($CLAIC = -2L_{CL}(\hat\theta_{CL}) + 2tr[\mathbf{J}(\hat\theta_{CL})\mathbf{H}^{-1}(\hat\theta_{CL})]$\)Where\($\mathbf{J(\theta)}$\)and\($\mathbf{H(\theta)}$\)are the
Jacobian and Hessian matrices of the likelihood function, and\($\hat\theta_{CL}$\)represents the composite maximum likelihood
estimate.Reference:Varin, C., Reid, N., & Firth, D. (2011). AN OVERVIEW OF
COMPOSITE LIKELIHOOD METHODS. Statistica Sinica, 21(1), 5–42.
http://www.jstor.org/stable/24309261Composite Likelihood BIC (CLBIC)CLBIC, formulated by Gao and Song (2010), is similar to CLAIC, but
adjusts for sample sizen:\($CLBIC = -2L_{CL}(\hat\theta_{CL}) + log(n) tr[\mathbf{J}(\hat\theta_{CL})\mathbf{H}^{-1}(\hat\theta_{CL})]$\)Reference:Gao, X., & Song, P. X.-K. (2010). Composite Likelihood
Bayesian Information Criteria for Model Selection in High-Dimensional
Data. Journal of the American Statistical Association, 105(492),
1531–1540. http://www.jstor.org/stable/27920184InstallationIClikis available via PyPi:pip install iclik.SyntaxIClikis very easy to use, provided that you have a correctly
formulated likelihood function. A simple example of how to use it is
provided here.Importclaic:fromiclik.inform_critimportclaicThings are much easier if we ignore the data, so it’s best to design a wrapper function that only takes parameters as input. In reality, we would embed the fitted model in the wrapper function, but here we’ll just work with a simple dummy function:deff(params):"""I'm a dummy function"""x,y,z=paramsreturnx**2+y**2+z**2RunningIClikis then a one-liner:claic(f,(1,2,3))Output:-26.000000000000004
Package: iclingo
iclingo🔴🟢🔵clingokernel forJupyter.InstallTo install, simply runpip install iclingopython -m iclingo.installUsageOnce installed, you can run clingo code directly in jupyter, alongside typical
jupyter functionality such as markdown cells. An example of this is available inexamples/.LimitationsNo syntax highlighting is availableCurrently, no configuration options can be passed to a given cell. This means
that the default clingo options are used, such that for a problem with
multiple answers, only the first answer is shown.Multi-shot solving is not supportedDevelopmentThis repository is mostly based on the documentation presented inMaking simple Python wrapper kernels.We usepoetryto track dependencies and build our
package.GitHub Actionsare then used for
automatic publishing toPyPiupon pushes ofgit tagsto the repository.When ready to publish the latest commit, simply run the following:git tag $(poetry version --short)git push --tagsPull requests and contributions are more than welcome. Please refer to therelevant page.
Package: iCLIPS
Jupyter Kernel forCLIPSSource:https://github.com/noxdafox/iclipsDocumentation:https://iclips.readthedocs.ioDownload:https://pypi.python.org/pypi/iclipsDocker:https://hub.docker.com/r/noxdafox/iclipsInstallation$pipinstalliclipsUsage$iclipsDocker ContainerThe container ships a Jupyter Notebook with CLIPS support.$dockerpullnoxdafox/iclips# Run Jupyter Console$dockerrun-itnoxdafox/iclipsiclips# Run Jupyter Notebook$dockerrun-it-p8888:8888noxdafox/iclips
Package: iclockhelper
iclockhelperHelper library to parse income request from IClock ADMS(like ZKTeco)Installpip install iclockhelperUsagefrom urllib.request import Request
    from django.core.handlers.wsgi import WSGIRequest
    from django.http import HttpResponse
    import iclockhelper

    # /iclock/cdata
    def cdataView(request: WSGIRequest):
        #get data from device
        zk_request = create_request(request)
        cdata_req = iclockhelper.CdataRequest.from_req(zk_request)
        print(cdata_req)
        return HttpResponse('OK')

    # /iclock/fdata
    def fdataView(request: WSGIRequest):
        # not implemented
        return HttpResponse('OK')

    # /iclock/getreq
    def getreqView(request: WSGIRequest):
        zk_request = create_request(request)
        get_req = iclockhelper.GetRequest.from_req(zk_request)
        print(get_req)
        return HttpResponse('OK')

    # /iclock/devicecmd
    def devpostView(request: WSGIRequest):
        # not implemented
        return HttpResponse('OK')


    def create_request(req: WSGIRequest)->iclockhelper.Request:
        return  Request(
            headers=req.headers,
            method=req.method,
            url=req.get_raw_uri(),
            data=req.body,
        )NoteThis project has been set up using PyScaffold 3.2.3. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: ic-loss
Inverse Contrastive LossImplementations of inverse contrastive loss fromLearning Invariant Representations using Inverse Contrastive Loss. The model architecture used on the ADNI dataset in the paper is also included along with PyTorch and Tensorflow implementations of the loss function.Installation$pipinstallic-lossUsageimporttorchfromic_loss.lossesimporticl,icl_tf# icl - pytorch, icl_tf - tensorflowfromic_loss.modelsimportADNIResNet# ADNIResNet - pytroch model used in the papermodel=ADNIResNet()x=torch.randn([1,1,512,512])logits,latent=model(x)loss=icl(latent,c)# c - extraneous attribute
Package: iCloud-Homie-4
iCloud-HomieiCloud to Homie MQTT BridgeConnects iCloud Accounts/Devices toHomie 4 MQTT convention.To start as a service on raspbianCreate icloud_homie.yml in /etc using the following settings:mqtt:MQTT_BROKER:MQTT_PORT:1883icloud:account_name:username:password:account_name:username:password:update_interval:Create icloud-homie.service in /etc/systemd/system[Unit]
Description=iCloud Homie
After=multi-user.target

[Service]
User=pi
Type=simple
ExecStart=/usr/bin/python3 /usr/local/bin/icloud_homie_start.py
Restart=on-abort

[Install]
WantedBy=multi-user.targetThe first time the service starts, you should receive a text message on your phone with a verifcation code (do not use the verifcation code from the Apple App). You need to send this code back to the Homie account device. Easy to do this with MQTT Explorer.Publish: homie/icloudaccount/account/verificationcode/set with the verification code as a raw payload