Saravanan666/pypi-org huggingface dataset:
Package: area-attention
Area AttentionPyTorch implementation of Area Attention [1].
This module allows to attend to areas of the memory, where each area contains a group of items that are either spatially or temporally adjacent.
TensorFlow implementation can be foundhere.Setup$pipinstallarea_attentionUsageSingle-head Area Attention:importtorchfromarea_attentionimportAreaAttentionarea_attention=AreaAttention(key_query_size=32,area_key_mode='max',area_value_mode='mean',max_area_height=2,max_area_width=2,memory_height=4,memory_width=4,dropout_rate=0.2,top_k_areas=0)q=torch.rand(4,8,32)k=torch.rand(4,16,32)v=torch.rand(4,16,64)x=area_attention(q,k,v)x# torch.Tensor with shape (8, 64)Multi-head Area Attention:importtorchfromarea_attentionimportAreaAttention,MultiHeadAreaAttentionarea_attention=AreaAttention(key_query_size=32,area_key_mode='max',area_value_mode='mean',max_area_height=2,max_area_width=2,memory_height=4,memory_width=4,dropout_rate=0.2,top_k_areas=0)multi_head_area_attention=MultiHeadAreaAttention(area_attention=area_attention,num_heads=2,key_query_size=32,key_query_size_hidden=32,value_size=64,value_size_hidden=64)q=torch.rand(4,8,32)k=torch.rand(4,16,32)v=torch.rand(4,16,64)x=multi_head_area_attention(q,k,v)x# torch.Tensor with shape (8, 64)Unit tests$python-mpytesttestsBibliography[1] Li, Yang, et al. "Area attention." International Conference on Machine Learning. PMLR, 2019.Citations@inproceedings{li2019area,title={Area attention},author={Li, Yang and Kaiser, Lukasz and Bengio, Samy and Si, Si},booktitle={International Conference on Machine Learning},pages={3846--3855},year={2019},organization={PMLR}}
Package: area-calculator-dci-mkskh
:heavy_plus_sign: Task 2 - creating package on PyPIYour task is to create your own Python package and publish it on PyPI.Read and analyze following steps of publishing package.Think about the job that your package could do!Prepare your package in a similar way.Make modifications, create newer versions of your package to gain more experience :smiley:1. Write your Python module and save it under a directory2. Create thesetup.pyfile with necessary information3. Choose a LICENSE and provide a README file for your project4. Generate the distribution archives on local machine5. Try installing the package on your local machine6. Publish the package to the TestPyPi repository to check if all works well7. Finally, publish the package to the PyPi repository
Package: area-calculator-dci-mori-fazel
Area Calculator PackageIntroductionThe area_calculator package is a simple Python package that includes functions for calculating the area of different shapes.InstallationYou can install area_calculator using pip:pip install area_calculatorUsageTo use area_calculator, first import the functions you want to use:from area_calculator import welcome, squareWelcome functionThe welcome function can be used to print a welcome message:welcome()  # Output: Hello, welcome to area calculator package!Square functionThe square function can be used to calculate the area of a square:area = square(4)
print(area)  # Output: 16The square function takes one argument, a, which represents the length of one side of the square.LicenseThis package is released under the MIT license. See the LICENSE file for more information.
Package: area-calculator-planefigures
area_calculator_planefiguresDescription.
The package area_calculator is used to calculate the areas of plane figures:TriangleRectangleSquareCircleTrapezoidRhombusInstallationUse the package managerpipto install area_calculator_planefigurespipinstallarea_calculator_planefiguresUsagefromarea_calculator_planefiguresimportarea_formulasarea_formulas.my_function()AuthorNathanniLicenseMIT
Package: areactpy
------- use this space to managing IPL-2022 related works -------Module Structure for packagingarch-reactor/
├── arch_gen
│   ├── __init__.py
├── arch.py
├── generator.py
├── Readme.MD
├── resource
│   ├── all-iconsPre-requisiteInstall graphviz -https://graphviz.gitlab.io/download/Install boto3 - pip install boto3Install python version 3.7 or higher
Package: areader
Archive ReaderA terminal based archive reader for Hyperkitty, GNU Mailman's official archiver.ScreenshotsUsingTo run the app, you can install it usingPipx:# Install using pipx.$pipxinstallareader# Run the app:$areaderIf you don't have Pipx, you can install directly in a venv to run:# Setup a virtualenv to install the package.$python3-mvenv.venv
$source.venv/bin/activate
$pipinstallareader# Run the app:$areaderHyperkitty ConfigurationIn order to use this app, the Pagination on the Hyperkitty's API needs to be set correctly.
Package: areaid
Ucapan SambutanTerima kasih telah memilih pustaka ini untuk menangani kesulitan dalam mengisi formulir yang membutuhkan data alamat secara lengkap berserta kode posnya. Pustaka ini memiliki data yang lengkap perihal wilayah administrasi di indonesia, mulai data nama provinsi, kabupaten, kecamatan, dan kelurahan/desa berserta kode posnya.Cara InstalasiCukup mudah tinggal salin teks dibawah ini dan tempelkan diterminalpip install areaidCara Menggunakan Dan Contoh ProgramAda dua fungsi utama di pustaka ini,buka_datadanbuka_namabuka_databerfungsi untuk membuka berkas json berdasarkan nama berkas jsonbuka_namaberfungsi unutk membuka berkas json untuk melihat nama - nama provinsiberikut contoh cara menggunakan kedua fungsi :contohbuka_datafromareaidimportbuka_data# di contoh ini menggunakan acehbb=buka_data("aceh")print(bb)contohbuka_namafromareaidimportbuka_nama,buka_data# fungsi buka_nama() berguna untuk melihat nama provinsi yang digunakan sebagai parameter buka_data()bb=buka_nama()print(bb)# menggunakan buka_nama sebagai parameterdd=buka_data(bb["himpunan"][3].lower())print(dd)SumberData pada repositori ini diolah dan dibuat berdasarkangithub.com/ichadhr/db-wilayah-indonesia
Package: area-under-curve
Version 1.0.6Python 3.7+ module to calculate riemann sum area under a curveCopyright 2019 Steven MycynekSupportssimpson, trapezoid, and midpoint algorithms,n-degree single variable polynomials, including fractional exponents,variable step sizehttps://pypi.python.org/pypi/area-under-curveUSAGE = """-p|--poly{DegreeN1:CoefficientM1, DegreeN2:CoefficientM2,...}...-l|--lower<lower_bound>-u|--upper<upper_bound>-s|--step<step>-a|--algorithm<simpson | trapezoid | midpoint>This was just a fun experiment I did on a couple airplane rides and might not be suitable for
production use.Try a simple function you can integrate by hand easily, likef(x) = x^3from[0-10], and
compare that to how accurate the midpoint, trapezoid, and simpson approximations are with various
steps sizes.Why not use numpy? You probably should, but I wanted to do everything from scratch for fun.examples:python3 area_under_curve.py--polynomial{3:1}--lower0--upper10--step.1--algorithmsimpsonor:import area_under_curve as aucalgorithm =auc.get_algorithm("simpson")bounds = auc.Bounds(0, 10, .1)polynomial =auc.Polynomial({3:1})params = auc.Parameters(polynomial, bounds, algorithm)AREA = auc.area_under_curve(params.polynomial, params.bounds, params.algorithm)print(str(AREA))Also try outunit_test.pyanddemo.py.Usepoetry installandpoetry shellfor a python3 environment with dev dependencies.
Package: area-unit-conversion
Area Unit ConversionPython module to convert unit of area from one system of units to another.IntroductionThis package was created for real estate business purposes. The availables units of length are the most commonly used in industry.Availables units:AbbrevUnit "EN"Unit "ES"valuekm²Square KilometersKilómetros cuadradoskm2m²Square MetersMetros cuadradosm2mi²Square MilesMillas cuadradasmi2yd²Square YardYardas cuadradasyd2ft²Square FeetPies cuadradosft2in²Square InchesPulgadas cuadradasin2haHectaresHectáreashaacAcresAcresacInstallation$ pip install area_unit_conversionUsageconvertConverts unit of area from one system of units to anotherArgumentTypeDefaultDescriptionfrom_unit_typestrNoneOriginal system of unit areato_unit_typestrNoneDesired system of unit areavaluefloat0Area value to convertimport area_unit_conversion

area_unit_conversion.convert('m2','ha',10000) 

# Return 1get_units_of_lengthLists available units of lengthArgumentTypeDefaultDescriptionlangstr"en"iso code of languageOptions: "es" | "en"import area_unit_conversion

area_unit_conversion.get_units_of_length() 

# Return
[
    {
        'abbreviation': 'km²', 
        'value': 'km2', 
        'name': 'Square Kilometers'
    },{   
        'abbreviation': 'm²', 
        'value': 'm2', 
        'name': 'Square Meters'
    },{
        'abbreviation': 'mi²',
        'value': 'mi2',
        'name': 'Square Miles'
    }, 
    
    etc. , etc.
    }
]TestRunning tests:$ pytestChecking the package installs correctly with different Python versions and interpreters.Tested with python3.6, python3.7, python3.8, python3.9 and python3.10 versions:$ toxContributingContributions are welcome - submit an issue/pull request.
Package: areciboware
arecibowareis a small WSGI middleware component that will report
unhandled exceptions to anAreciboinstance. This provides a convenient
system to collect and analyse errors in an application.UsageTo usearecibowareyou need to have a running Arecibo instance. You will
needs its URL and its public key to setup the middleware.paste.deployIf you are usingPaste Deploymentto start your website you can define
an arecibofilterin your.inifile:[filter:arecibo]
use = egg:areciboware#main
url = http://my-arecibo.appspot.com/v/1/
account = your-arecibo-public-key

[app:yourapp]
..

[pipeline:main]
pipeline =
    arecibo
    yourappManualYou can also manually add the middleware to your WSGI pipeline in your python
code. Here is a simple example:from areciboware.middleware import AreciboMiddleware

app = AreciboMiddleware(app, url="http://my-arecibo.appsot.com/v/1/",
     account="your-arecibo-public-key")
return appChangelog1.0b1 - July 27, 2010Include request data with all CGI and WSGI variables in reports.
[wichert]Include username in report if REMOTE_USER is set in the environ.
[wichert]1.0a1 - July 14, 2010First public release.
[wichert]
Package: are-compute
ARE-compute package from the Saint-Malo poster “Evaluating the Effect of Individualized Treatment Rules Using Observational Data.”
Implementation details are available athttps://github.com/fcgrolleau/Emulated-ITR/Theoretical argument including extensive simulations will be posted on Arxiv soon.Change Log0.1.1 (11/02/2021)ci_coverage argument added to the plot method. Fix minor typos.0.1 (11/01/2021)First Release
Package: aredis
An efficient and user-friendly async redis client ported fromredis-py(which is a Python interface to the Redis key-value)To get more information please readfull documentInstallationaredis requires a running Redis server.To install aredis, simply:$sudopip3installaredisor alternatively (you really should be using pip though):$sudoeasy_installaredisor from source:$sudopythonsetup.pyinstallGetting startedFor more examplesingle node client>>>importasyncio>>>fromaredisimportStrictRedis>>>>>>asyncdefexample():>>>client=StrictRedis(host='127.0.0.1',port=6379,db=0)>>>awaitclient.flushdb()>>>awaitclient.set('foo',1)>>>assertawaitclient.exists('foo')isTrue>>>awaitclient.incr('foo',100)>>>>>>assertint(awaitclient.get('foo'))==101>>>awaitclient.expire('foo',1)>>>awaitasyncio.sleep(0.1)>>>awaitclient.ttl('foo')>>>awaitasyncio.sleep(1)>>>assertnotawaitclient.exists('foo')>>>>>>loop=asyncio.get_event_loop()>>>loop.run_until_complete(example())cluster client>>>importasyncio>>>fromaredisimportStrictRedisCluster>>>>>>asyncdefexample():>>>client=StrictRedisCluster(host='172.17.0.2',port=7001)>>>awaitclient.flushdb()>>>awaitclient.set('foo',1)>>>awaitclient.lpush('a',1)>>>print(awaitclient.cluster_slots())>>>>>>awaitclient.rpoplpush('a','b')>>>assertawaitclient.rpop('b')==b'1'>>>>>>loop=asyncio.get_event_loop()>>>loop.run_until_complete(example()){(10923,16383):[{'host':b'172.17.0.2','node_id':b'332f41962b33fa44bbc5e88f205e71276a9d64f4','server_type':'master','port':7002},{'host':b'172.17.0.2','node_id':b'c02deb8726cdd412d956f0b9464a88812ef34f03','server_type':'slave','port':7005}],(5461,10922):[{'host':b'172.17.0.2','node_id':b'3d1b020fc46bf7cb2ffc36e10e7d7befca7c5533','server_type':'master','port':7001},{'host':b'172.17.0.2','node_id':b'aac4799b65ff35d8dd2ad152a5515d15c0dc8ab7','server_type':'slave','port':7004}],(0,5460):[{'host':b'172.17.0.2','node_id':b'0932215036dc0d908cf662fdfca4d3614f221b01','server_type':'master','port':7000},{'host':b'172.17.0.2','node_id':b'f6603ab4cb77e672de23a6361ec165f3a1a2bb42','server_type':'slave','port':7003}]}BenchmarkPlease run test script in benchmarks dir to confirm the benchmark.For benchmark in my environment please see:benchmarkContributingEnhancement, bug reports and Pull requests are welcomed, please make an issue to let me know.
Fork me please~
Package: arekit-ss
arekit-ss 0.24.0arekit-ss[AREkit double "s"] -- is an object-pair context sampler
fordatasources,
powered byAREkitNOTE:For custom text sampling, please follow theARElightproject.InstallationInstall dependencies:pipinstallgit+https://github.com/nicolay-r/arekit-ss.git@0.24.0Download AREkit related data, from whichsourcesare required:python-marekit.download_dataUsageExample of composing prompts:python-marekit_ss.sample--writercsv--sourcerusentrel--samplerprompt\--prompt"For text: '{text}', the attitude between '{s_val}' and '{t_val}' is: '{label_val}'"\--dest_langen--docs_limit1Mind the case (issue#18):switching to another language may affect on amount of extracted data because ofterms_per_contextparameter that crops context by fixed and predefined amount of words.Parameterssource-- source name from the list of thesupported sources.terms_per_context-- amount of words (terms) in between SOURCE and TARGET objects.object-source-types-- filter specific source object typesobject-target-types-- filter specific target object typesrelation_types-- list of types, in which items separated with|char; all by defaultsplits-- Manual selection of the data-types related splits that should be chosen for the sampling process;
types should be separated by ':' sign; for example: 'train:test'sampler-- List of the supported samplers:nn-- CNN/LSTM architecture related, including frames annotation fromRuSentiFrames.no-vectorize-- flag is applicable only fornn, and denotes no need to generate embeddings for featuresbert-- BERT-based, single-input sequence.prompt-- prompt-based sampler for LLM systems[prompt engeneering guide]prompt-- text of the prompt which includes the following parameters:{text}is an original text of the sample{s_val}and{t_val}values of the source and target of the pairs respectively{label_val}value of the labelwriter-- the output format of samples:csv-- forAREnetsframework;jsonl-- forOpenNREframework.sqlite-- SQLite-3.0 database.mask_entities-- mask entity mode.Text translation parameters:src_lang-- original language of the text.dest_lang-- target language of the text.output_dir-- target directory for samples storingLimiting the amount of documents from source:docs_limit-- amount of documents to be considered for sampling from the whole source.doc_ids-- list of the document IDs.Powered byAREkit framework
Package: arekore
arekore記述統計のためのクラスや可視化のあれこれ。ダミーデータも作れるよ。Quickstart1次元データimportmatplotlib.pyplotaspltimportnumpyasnpfromarekoreimportdummy,vizfromarekore.data1dimportData1d,plot_histdefmain():# ダミーデータ生成rawdata=dummy.dist_normal_1d(mean=50,std=10,n=100)# 1次元データオブジェクトの作成d=Data1d(rawdata,bins=np.arange(0,100+1,5))# ヒストグラムの描画fig,ax=viz.fig_ax(figsize=(8,6))plot_hist(ax,d)plt.show()# 度数分布表もつくれるfreq_table_md=d.freq_table_as_md()print(freq_table_md)"""| 階級           |   階級値 |   度数 |   累積度数 |   相対度数 |   累積相対度数 ||:---------------|---------:|-------:|-----------:|-----------:|---------------:|| (-0.001, 10.0] |        5 |      0 |          0 |       0    |           0    || (10.0, 20.0]   |       15 |      0 |          0 |       0    |           0    || (20.0, 30.0]   |       25 |      1 |          1 |       0.01 |           0.01 || (30.0, 40.0]   |       35 |     14 |         15 |       0.14 |           0.15 || (40.0, 50.0]   |       45 |     30 |         45 |       0.3  |           0.45 || (50.0, 60.0]   |       55 |     37 |         82 |       0.37 |           0.82 || (60.0, 70.0]   |       65 |     16 |         98 |       0.16 |           0.98 || (70.0, 80.0]   |       75 |      2 |        100 |       0.02 |           1    || (80.0, 90.0]   |       85 |      0 |        100 |       0    |           1    || (90.0, 100.0]  |       95 |      0 |        100 |       0    |           1    |"""if__name__=='__main__':main()2次元データimportmatplotlib.pyplotaspltfromarekoreimportdummy,vizfromarekore.data2dimportData2d,plot_regression_line,plot_scatterdefmain():# ダミーデータ生成x,y=dummy.xy_specified_cor(r=0.8,n=50)# 2次元データオブジェクトの作成d=Data2d(x=x,y=y)# 散布図と回帰直線を描画fig,ax=viz.fig_ax(figsize=(8,6))plot_scatter(ax,d)plot_regression_line(ax,d)plt.show()if__name__=='__main__':main()
Package: arel
arelBrowser hot reload for Python ASGI web apps.OverviewWhat is this for?arelcan be used to implement development-only hot-reload for non-Python files that are not read from disk on each request. This may include HTML templates, GraphQL schemas, cached rendered Markdown content, etc.How does it work?arelwatches changes over a set of files. When a file changes,arelnotifies the browser (using WebSocket), and an injected client script triggers a page reload. You can register your own reload hooks for any extra server-side operations, such as reloading cached content or re-initializing other server-side resources.Installationpipinstall'arel==0.3.*'QuickstartFor a working example using Starlette, see theExamplesection.Although the exact instructions to set up hot reload withareldepend on the specifics of your ASGI framework, there are three general steps to follow:Create anHotReloadinstance, passing one or more directories of files to watch, and optionally a list of callbacks to call before a reload is triggered:importarelasyncdefreload_data():print("Reloading server data...")hotreload=arel.HotReload(paths=[arel.Path("./server/data",on_reload=[reload_data]),arel.Path("./server/static"),],)Mount the hot reload endpoint, and register its startup and shutdown event handlers. If using Starlette, this can be done like this:fromstarlette.applicationsimportStarlettefromstarlette.routingimportWebSocketRouteapp=Starlette(routes=[WebSocketRoute("/hot-reload",hotreload,name="hot-reload")],on_startup=[hotreload.startup],on_shutdown=[hotreload.shutdown],)Add the JavaScript code to your website HTML. If usingStarlette with Jinja templates, you can do this by updating the global environment, then injecting the script into your base template:templates.env.globals["DEBUG"]=os.getenv("DEBUG")# Development flag.templates.env.globals["hotreload"]=hotreload<body><!-- Page content... --><!-- Hot reload script -->{%ifDEBUG%}{{hotreload.script(url_for('hot-reload'))|safe}}{%endif%}</body>ExampleTheexampledirectorycontains an example Markdown-powered website that usesarelto refresh the browser when Markdown content or HTML templates change.LicenseMITChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog.0.3.0 - 2023-12-29ChangedUsewatchfilesinstead ofwatchgod. This unlocks Python 3.12 support. (Pull #34)AddedAdd support for Python 3.12. (Pull #35)0.2.0 - 2020-07-08AddedAdd support for watching multiple directories, each with its own reload callbacks. (Pull #15)Changedarel.HotReload("./directory", on_reload=[...])should now be written asarel.HotReload(paths=[arel.Path("./directory", on_reload=[...])]). (Pull #15)0.1.0 - 2020-04-11Initial release.AddedAddHotReloadASGI application class. (Pull #1)
Package: arena-cli
Arena-CLIOfficial Command Line utility to use Arena in your terminal.Arena-CLI is designed to extend the functionality of the Arena web application to command line to make the platform more accessible and terminal-friendly to its users.UsageSet tokenarenaset_token[TOKEN]Push the docker image to arena backendarenapush-ttrack[IMAGE]:[TAG]Source InstallationArena-CLI and its required dependencies can be installed using pip:pipinstallarenaOnce Arena-CLI is installed, check out theusage documentation.Development SetupSetup the development environment for Arena and make sure that it is running perfectly.Clone the arena-cli repository to your machine via gitgitclonehttps://github.com/guardstrikelab/arena-cli.gitarena-cliCreate a virtual environmentcdarena-cli
virtualenv-ppython3venvsourcevenv/bin/activateInstall the package locallypipinstall-e.Change the arena-cli host to make request to local Arena server running onhttp://localhost:8000by running:arenahost-shhttp://localhost:8000Login to cli using the commandarena loginTwo users will be created by default which are listed below -HostUser-username:host,password:password
ParticipantUser-username:participant,password:passwordPush the docker image to arena backendarenapush-ttrack[image]:[tag]
Package: arena-py
arena-pyDraw objects and run programs in the ARENA using Python!DocumentationThe ARENA Python library user guide and tutorials:ARENA Documentation: Python.SetupInstall package using pip (https://pypi.org/project/arena-py/):pip3installarena-pyHello ARENA Example ProgramRun thehello.pyexample:cdexamples
pythonhello.pyhello.pyfromarenaimport*scene=Scene(host="arenaxr.org",scene="example")@scene.run_oncedefmake_box():scene.add_object(Box())scene.run_tasks()arena-py LibraryThe above is the simplest example of an ARENA Python program. This library sits above the ARENA pub/sub MQTT
message protocol: JSON messages described in more detail athttps://github.com/arenaxr/ARENA-corewhich runs in a browser.
That forms a layer, in turn, on top ofA-FrameandTHREE.jsjavascript libraries.AuthenticationWe have added protection to the ARENA MQTT broker to limit access to change your scenes, which requires Python programs to supply authentication through a Google account.Sign-In Desktop OSIf you have a web browser available, the arena-py libraryScene(host="myhost.com")will launch a web browser the first time and ask you for an account to authenticate you with, before opening a client MQTT connection.Sign-In Server/Headless OSFor headless environments, the arena-py libraryScene(host="myhost.com")will provide you with a url to cut and paste in a browser anywhere, ask you for an account to authenticate you with, and show you a code you can enter on the command line, before opening a client MQTT connection.ScriptsSome helper script aliases have been added in this library to help you manage authentication and quick command-line (CLI) publish and subscribe to the ARENA.Sign-Outarena-py-signoutShow Permissionsarena-py-permissionsCLI Subscribe to Scene Messagesarena-py-sub-mharenaxr.org-sexampleCLI Subscribe to Custom Topicarena-py-sub-mharenaxr.org-trealm/g/aCLI Publish a Scene Object Messagearena-py-pub-mharenaxr.org-sexample-m'{"object_id": "gltf-model_Earth", "action": "create", "type": "object", "data": {"object_type": "gltf-model", "position": {"x":0, "y": 0.1, "z": 0}, "url": "store/models/Earth.glb", "scale": {"x": 5, "y": 5, "z": 5}}}'CLI Helparena-py-pub--help
arena-py-sub--helpChangelogChangelog can be foundhere.arena-py Repository Filesarena/: The ARENA Python library.examples/: Canonical examples of ARENA functions from thedocumentation.examples/objects: Examples on how to create various arena-py objects.examples/attributes: Examples on how to declare an add various arena-py object attributes.examples/legacy/:Deprecateddemos forarena-py < 0.1.0.examples/legacy/digital-twins/:Deprecateddemo of digital twins of physical spaces forarena-py < 0.1.0.system-tests/: Workouts and tests for arena-py.tools/: Reusable tools for any ARENA scene.
Package: arenaxlabs-gym
Gymnasium Environments for ArenaX Labs TasksEasily interact with Gymnasium Environments for tasks that are a part of the ArenaX Labs Researcher Platform.InstallationRun the following command to install the package:pipinstallarenaxlabs-gymUsageimportgymnasiumasgymimportgym_arenaxlabsenv=gym.make('HumanoidObstacle-v0')