Saravanan666/pypi-org huggingface dataset:
Package: profile-user-local
python-package-templateTo create local package and remote package layers (not to create GraphQL and REST-API layers)directory structureRoot directory should have only .github/, ,gitignore, README.md and the project directory (i.e. location_local_python_package same as repo) - This will allow is to easily switch to mono repo/location_local/location_local/get_country_name/location_local/get_country_name/src/location_local/get_country_name/src/get_country_name.py/location_local/get_country_name/tests/location_local/get_country_name/tests/get_country_name_test.pydatabase Python scripts in /db folderPlease place .py in /dbNo need for seperate file for _ml tablePlease delete the example file if not neededCreate the files to create the database schema, tables, view and populate metadata and Test-Data/db/.py - CREATE SCHEMA ... CREATE TABLE ... CREATE VIEW ... including _ml_table/db/_insert.py to create metadata and Test-Data recordsUpdate the setup.py (i.e.name, version)Please create test directory inside the directory of the project i.e. //testsUpdate the serverless.yml in the root directoryprovider:
stage: play1Update the endpoints in serverless.ymlWorking with VS CodePlease make sure you push to the repo launch.json fie that enables to run and debug the codeUnit-TestWe prefer using pytest and not unittest packagePlease create pytest.init in the project-directory and not in the root directory[pytest]
markers =
    test: custom mark for testsWhen you took care of all the TODOs in the repo, using our infrastructure classes (i.e. Logger, Database, Url, Importer ...) your Feature Branch GitHub Actions Workflow is Green without warnings, all tests are running in GHA, code is documented, README.md is clean and self explained, test coverage is above 90% and all your lines are covered with Unit-Tests, you can filter and analyse your records in Logz.io, pull dev to your Feature Branch and only then create Pull Request to dev
Package: profile-wrapper
Python3 - Profiler WrapperThis package provides a wrapper function for easier usage of the built-in profiler.It only uses builtin modules.Installpython3-mpipinstallprofiler_wrapperSee:PyPIInstallpipinstallprofiler_wrapperUsagefromprofiler_wrapperimportprofiledeffunction_to_profile(switch:bool,data:dict,msg:str):...return{'data':'test'}profile(target=function_to_profile,args=[True],kwargs={'data':{'random':'test'},'msg':'Yesterday is gone.'},lines=3,)# (#   {'data': 'test'},##   "270011472 function calls (270011215 primitive calls) in 181.830 seconds#    Ordered by: internal time##    ncalls  tottime  percall  cumtime  percall filename:lineno(function)#         1    5.000    5.000    8.000    8.000 /tmp/test.py:95(function_to_profile)#         2    2.000    2.000    3.000    3.000 /tmp/test.py:89(sub_function)#         3    1.000    1.000    1.000    1.000 /tmp/test.py:89(sub_function2)#    "# )
Package: profiley
Profile calculations for galaxies and clustersTo install, simply runpip install profileySome examples of the functionality available can be found in theexamples. For more information see thedocumentation.Referencesprofileyhas been used inMadhavacheril et al. (2020).Change LogVersion 1.5.0AddedWebskyNFWprofileFixed bug inmdeltamethod, plus it is now aProfilemethod inherited by all profiles.Version 1.4.4Fixed bug in the normalization of a 1-d surface density inxi2sigmaFixed bug whereby only one beta was returnedVersion 1.4.3Fixed bug calculating a single surface density inxi2sigmaVersion 1.4.0Added stand-alone offset calculation for arbitrary profilesVersion 1.3.2Fixed bug in installation (!)Version 1.3.0Updated names ofProfilemethodsBug fixesVersion 1.2.2Movedbackgroundargument fromBaseNFWtoBaseCosmoso it is visible to allProfileobjectsMovedoverdensityargument fromBaseNFWtoProfile
Package: profiling
The profiling package is an interactive continuous Python profiler.  It is
inspired fromUnity 3Dprofiler.  This package
provides these features:Profiling statistics keep the frame stack.An interactive TUI profiling statistics viewer.Provides both of statistical and deterministic profiling.Utilities for remote profiling.Thread or greenlet aware CPU timer.Supports Python 2.7, 3.3, 3.4 and 3.5.Currently supports only Linux.LinksGitHub:https://github.com/what-studio/profilingDemo:https://asciinema.org/a/25394
Package: profiling-helpers
Profiling HelpersA small python package that wraps Python's owncProfilelibrary to make it more user friendly.When developing Python programs, you'll sometimes have functions that take a long time to execute and
you are really not sure why. Profiling helps to find and analyze these bottlenecks and guides you
into fixing performance problems. Usessnakevizfor interactive visualizations.Install it withpip install profiling-helpers.
Visualize profile files withsnakeviz profile_xyz.prof.There are two decorators,time_itandprofile_it. Use them anywhere in your code, like this:fromprofiling_helpersimporttime_it,profile_itfromtimeimportsleep@time_itdefmy_slow_function(x):sleep(10)returnxmy_slow_function(42)# Prints: Function "my_slow_function" took 10.01061 s to run@profile_it("my/profile/save/dir",open_visualization=True)defmy_slow_function(x):sleep(10)returnxmy_slow_function(42)# Opens snakeviz after this function is completedProfiles are normally saved on the local file system. If you have other save targets, you can
either use included FileSavers (currently only for AWS S3) or implement your own one by inheriting
from theBaseFileSaverclass. Here is a variant with S3:fromprofiling_helpersimportprofile_it,S3FileSaver@profile_it(S3FileSaver("s3://my-bucket/my/path/to/profiles/",kms_key_id="..."))defmy_slow_function(x):sleep(10)returnxmy_slow_function(42)
Package: profiplots
profiplotsMake Matplotlib and Seaborn plots with Profinit theme!Documentation:https://datascience.profinitservices.cz/sablony/profiplots/.Installationpython-mpipinstallprofiplotsUsageimportprofiplotsaspfimportseabornassnsimportseaborn.objectsasso# set themepf.set_theme()# create a basic plotdataset=sns.load_dataset("titanic")(so.Plot(data=dataset,x="survived",y="sex").add(so.Bar(alpha=1),so.Agg(),legend=False).label(title="Female passengers survived much more frequently",x="Survival Rate",y="Sex").save("my_first_plot.png"))
Package: profitgraph
AboutThis program will help you showcase the profits and purchases of your company by days, months and years! Choose personalized options and compare the data to analyse your business outcomes just in a few clicks!What the program can do:Uses three languages (EN/UA/RU)Adds data to databaseCreates graph by several optionsShows max and min data in legendShows average value by period and percent change compared to first entered periodSaves your graphs in 'graph/' directoryCreates random dataTo use this, just enter 'random' while you choose 'add data' or 'create graph'Used libraries:matplotlibmplcursorstqdmcoloramasqlite3InstallInstall via pip:pip install profitgraphLaunchTo launch a program, open a cmd (Win+R) and enter:startgraphExamplesLicenseSee LICENSE.md for more informationSpecial thanksMundoggu- for code disscussion
Package: profitpulse
Profit PulseProfit Pulse: Maximize Earnings Through Smart Finance Management.Effortlessly manage your personal finances, supercharge savings, and boost
profits. Gain depp insights into your money flow, make strategic choices and
pave your way to financial growth.How to install ?macOSpipinstallprofitpulseHow to use ?To access the available commands, just execute:profitpulse--helpHow to contribute ?The recommended setup for development uses:PyEnvPoetryAfter cloning the repository to your machine, in the project root, just run:makeallIf everything went smoothly you are now ready to add some contributions. Take a
look at the CONTRIBUTING.md file for more guidelines (once I write them :).
Package: pro-football-reference-web-scraper
pro-football-reference-web-scraperWeb scraper to retrieve player and team data from Pro Football Reference.Overviewpro-football-reference-web-scraper is a Python library that helps developers take advantage of the plethora of free data provided byPro Football Reference. It is intended primarily to help fantasy sports players and sports bettors gain an edge in their NFL sports gaming endeavors. However, it can be used for any project that requires team- and player-specific data.InstallationTo install, run the following:pip install pro-football-reference-web-scraperUsagePlayer Game LogsThe following code will retrieve and print Josh Allen's game log during the 2022 season as a pandas DataFrame.player: a player's full name, as it appears onPro Football Referenceposition: 'QB', 'RB', 'TE', or 'WR'season: the season you are looking for (int)frompro_football_reference_web_scraperimportplayer_game_logaspgame_log=p.get_player_game_log(player='Josh Allen',position='QB',season=2022)print(game_log)Team Game LogsThe following code will retrieve and print the Kansas City Chiefs' game log during the 1995 season as a pandas DataFrame.team: a team's full name (city and mascot), as it appears onPro Football Referenceseason: the season you are looking for (int)frompro_football_reference_web_scraperimportteam_game_logastgame_log=t.get_team_game_log(team='Kansas City Chiefs',season=1995)print(game_log)
Package: pro-football-reference-web-scrape-v2
pro-football-reference-web-scraperWeb scraper to retrieve player and team data from Pro Football Reference.Overviewpro-football-reference-web-scraper is a Python library that helps developers take advantage of the plethora of free data provided byPro Football Reference. It is intended primarily to help fantasy sports players and sports bettors gain an edge in their NFL sports gaming endeavors. However, it can be used for any project that requires team- and player-specific data.InstallationTo install, run the following:pip install pro-football-reference-web-scraperUsagePlayer Game LogsThe following code will retrieve and print Josh Allen's game log during the 2022 season as a pandas DataFrame.player: a player's full name, as it appears onPro Football Referenceposition: 'QB', 'RB', 'TE', or 'WR'season: the season you are looking for (int)frompro_football_reference_web_scraperimportplayer_game_logaspgame_log=p.get_player_game_log(player='Josh Allen',position='QB',season=2022)print(game_log)Team Game LogsThe following code will retrieve and print the Kansas City Chiefs' game log during the 1995 season as a pandas DataFrame.team: a team's full name (city and mascot), as it appears onPro Football Referenceseason: the season you are looking for (int)frompro_football_reference_web_scraperimportteam_game_logastgame_log=t.get_team_game_log(team='Kansas City Chiefs',season=1995)print(game_log)
Package: profpy
profpyWhat is profpy?The profpy library is a centralized repository for Rowan's various python scripts to use.Why use it?Many of Rowan's python scripts/programs utilize similar or congruent functions and classes that end up getting rewritten or even
copy/pasted wherever needed. Rather than continue this trend of untracked code, profpy allows us to have overhead control over these common functions
and classes. If a program or script needs to use a class or function, it can just import it from profpy rather than rewrite it. This will allow us
to standardize some of our code practices moving forward.Installationpip3installprofpyCLIFor details on theprofpycommand line interface,read the docs.SubmodulesThe profpy library is organized into submodules:db,web, andapis. Thedbsubmodule makes accessing
Oracle databases with cx_Oracle and or Sql-Alchemy simpler. Theapissubmodule
contains wrapper-classes for some commonly used web APIs. Thewebsubmodule contains code for making easy,
database-backed Flask apps, configured with CAS and role-based security.All three of these submodules can be used to cut back on duplicated code, as well as make the development process much less
time consuming.For in-depth documentation, explore the submodules individually:dbapiswebDependenciesPython 3.6.7 or aboveOracle Instant Client
Package: profyle
Development tool for analysing and managing python tracesWhy do you need Profyle?BottlenecksWith Profyle you can easily detect where in your code you have a bottleneck, simply analyze the trace and see what function or operation is taking most of the execution time of the requestEnhance performaceAnalyze the traces and decide which parts of your code should be improvedInstallation$pipinstallprofyle---> 100%Example1. ImplementIn order to track all your API requests you must implement theProfyleMiddlewareProfyleMiddlewareAttributeRequiredDefaultDescriptionenabledNoTrueEnable or disable ProfylepatternNoNone0nly trace those paths that match with pattern (glob pattern)max_stack_depthNo-1Limit maximum stack trace depthmin_durationNo0(milisecons)Only record traces with a greather duration than the limit.FastAPIfromfastapiimportFastAPIfromprofyle.fastapiimportProfyleMiddlewareapp=FastAPI()# Trace all requestsapp.add_middleware(ProfyleMiddleware)@app.get("/items/{item_id}")asyncdefread_item(item_id:int):return{"item_id":item_id}fromfastapiimportFastAPIfromprofyle.fastapiimportProfyleMiddlewareapp=FastAPI()# Trace all requests that match that start with /api/products# with a minimum duration of 100ms and a maximum stack depth of 20app.add_middleware(ProfyleMiddleware,pattern="/api/products*",max_stack_depth=20,min_duration=100)@app.get("/items/{item_id}")asyncdefread_item(item_id:int):return{"item_id":item_id}FlaskfromflaskimportFlaskfromprofyle.flaskimportProfyleMiddlewareapp=Flask(__name__)app.wsgi_app=ProfyleMiddleware(app.wsgi_app,pattern="*/api/products*")@app.route("/")defhello_world():return"<p>Hello, World!</p>"DjangoSoon..2. RunRun the web server:$profylestartINFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)INFO:     Started reloader process [28720]INFO:     Started server process [28722]INFO:     Waiting for application startup.INFO:     Application startup complete.3. ListList all requests tracing:4. AnalyzeProfyle stands on the shoulder of giants:ViztracerandPerfettoDetailed function entry/exit information on timeline with source codeSuper easy to use, no source code change for most features, no package dependencySupports threading, multiprocessing, subprocess and asyncPowerful front-end, able to render GB-level trace smoothlyWorks on Linux/MacOS/WindowCLI CommandsstartStart the web server and view profile tracesOptionsTypeDefaultDescription--portINTEGER0web server port--hostTEXT127.0.0.1web server host$profylestart--port5432INFO:     Uvicorn running on http://127.0.0.1:5432 (Press CTRL+C to quit)INFO:     Started reloader process [28720]INFO:     Started server process [28722]INFO:     Waiting for application startup.INFO:     Application startup complete.cleanDelete all profile traces$profyleclean10 traces removedcheckCheck traces DB size$profylecheckDB size: 30MB
Package: prog2onnx
Introductionproglearn-onnxconvertsProgLearnmodels toONNX.
Once in the ONNX format, you can use tools likeONNX Runtimefor high performance scoring.
All converters are tested withonnxruntime.Supported ConvertersThis version implementsProgLearnestimators that adhere to thesklearn-onnxAPI on registering custom convertersNamePackageSupportedClassificationProgressiveLearnerprogressive_learnerYesLifelongClassificationForestforestYesLifelongClassificationNetworknetworkNoInstallationYou can install fromPyPi:pip install prog2onnxNote: There is a known backtracking issue inpip's dependency resolver that may significantly affect the time required to fetch the correct versions of the dependencies. A quick and easy fix is to add--use-deprecated legacy-resolverat the end ofpip install.Getting started# Train a model using 3 tasks.importnumpyasnpfromsklearn.datasetsimportload_irisfromsklearn.model_selectionimporttrain_test_splitfromproglearn.forestimportLifelongClassificationForestiris=load_iris()X,y=iris.data,iris.targetX=X.astype(np.float32)X_train,X_test,y_train,y_test=train_test_split(X,y)clr=LifelongClassificationForest(default_n_estimators=10)for_inrange(3):clr.add_task(X_train,y_train)# Convert into ONNX format.fromprog2onnximportProg2ONNXp2o=Prog2ONNX(clr)# Convert for task_ID = 0onx=p2o.to_onnx(0)# Validate ONNX model (Optional)p2o.validate()# Save ONNX model to file (Optional)p2o.save("forest_iris_0.onnx")# Compute the prediction with onnxruntime.importonnxruntimeasrtsess=rt.InferenceSession(onx.SerializeToString(),providers=["CPUExecutionProvider"])input_name=sess.get_inputs()[0].namepred_onx=sess.run(None,{input_name:X_test.astype(np.float32)})[0]TestingSeveral scenarios are assessed in the form of separate tests using the Python's built inunittesttesting framework.python -m unittest -v tests/test_proglearn.pyContributeWe are open to contributions in the form of feedback, ideas, or code.LicenseApache License v2.0
Package: progaf
Projection Games FrameworkPROGAF(Projection Games Framework) is python framework to support development of games and other applications using projection mapping (also known as surface projection, video mapping or spatial augmented reality) and/or real world object tracking using cameras. Expected uses for the framework include the development of games and possibly other applications across several domains including education, training, marketing, exhibition, entertainment and art.The goal of the project is to provide a light, conceptually clean, open source framework to support application development. Main features are:Object-oriented abstraction layer including:Hardware Integration (standard camera, depth camera, projector)Object detection, identification and tracking (with specific detectors for faces, eyes, hands, geometric shapes and blobs) usingOpenCVand GoogleMediaPipeGestures and events detection and processingEasy integration of detected objects into other frameworks / game engines:PyGamePanda3DThe framework also supports projection-mapping applications with specific features:Easy and intuitive projector-camera alignment and calibrationAffine and pespective transformations of application objectsProjection mapping over static surfaces and/or moving objects in real timeCapabilities to render/project in real time any combination of video streams, images, textures, text or graphics
Package: progbar
A simple progression bar by Yves-Gwenael BourhisUsage:======Class ProgBar(name, lenght):----------------------------name is a stringlenght is an integer which represents the number of elements in the barMethods:========start():--------Start the progression bar in a threadthe progression and thread stop automaticaly when the "percent" property reaches 100%stop():-------Stop the progression bar and the threadIt is recommended to call the join() method afterfill():-------Add an element to the bar, and match the corresponding percentageisAlive():----------Returns True if the bar's thread is running, False otherwisejoin():-------Wait until the threaded bar terminates.It is recomended to call this method after a stop() callproperties:===========percent:--------percentage of the bar progressionExample Using step progression::>>> def printatestbar1():...     bar = ProgBar('test1', 20)...     bar.start()...     while bar.isAlive():...         time.sleep(0.1)...         bar.fill()...     bar.join()>>> printatestbar1()test1 [####################] 100%>>>Example Using percentage progression::>>> def printatestbar2():...     bar = ProgBar('test2', 20)...     bar.start()...     while bar.isAlive():...         bar.percent += 1...         time.sleep(0.1)...     bar.join()>>> printatestbar2()test2 [####################] 100%>>>Example Interupting the progression bar::>>> def printatestbar3():...     bar = ProgBar('test3', 20)...     bar.start()...     while bar.isAlive():...         bar.percent += 1...         if bar.percent == 50:...             bar.stop()...             break...         time.sleep(0.1)...     bar.join()>>> printatestbar3()test3 [##########-         ]  50%>>>===============Release Notes :===============Release 0.1:============First VersionRelease 0.2:============Removed the destructor (__del__ method) because of:+ The Warning here:http://docs.python.org/reference/datamodel.html#object.__del__+ Destroyed objects where not automaticaly removed bythe garbage collector as described here:http://docs.python.org/library/gc.html#gc.garbageWhich could cause memory usage increase.Release 0.3:============Changed author's contact info.
Package: progbg
progbgTheProgrammableBenchmarker andGraphing ToolThe problem:Identifying bottlenecks and problems within a system is essential when developing larger systems. Being
able to quickly produce simple graphs helps see these bottlenecks more clearly as well as possibly see degenerative issues within a system.progbgis a simple framework that exposes a planning API to allow you to plan execution of
your benchmarks through the registering of workloads and backends. Data produced by these classes are parsed to produce data that can be used by graphs and figures.progbgutilizesmatplotlibfor its graphing library.More information and docs can be foundhereInstallationprogbgcan be installed through pip$pipinstallprogbgExampleTake a look at a workingexampleplan.  Try running it with the commandprogbg plan.py -p 8080and go tolocalhost:8080to view the example graphs!Viewing GraphsGraphs are saved by default in thegraphsdirectory of the current working directory.By passing the argument-p PORTtoprogbg, this will expose figures and graphs to be viewed by your browser
athttp://localhost:PORTAuthorKenneth R Hancockkrhancoc <https://github.com/krhancoc>
Package: prog-edu-assistant-tools
prog_edu_assistant_toolsTools to create autogradeable assignments in Jupyter notebooks.
See the documentation inhttps://github.com/google/prog-edu-assistantto get started with the autograder.This package contains a few functions that makes authoring programming assignments in Jupyter
more convenient, including the following:A summarizing test runner to run unit testsA function that can run a unit test directly in the Jupyter notebookThe intention of this package is to hide all the smarts
of having a complete master notebook capable of complete auto-testing
behind nice and readable names that can be imported rather than reimplemented
in every master notebook.How to build this packagesource ../../../venv/bin/activate
python setup.py bdist_wheel sdistHow to push this package to PyPIpip install --upgrade twine
python setup.py bdist_wheel sdist
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*How to install this package locallypip install dist/prog_edu_assistant_tools-0.3.1-py3-none-any.whlIf you are a developer and want to reinstall the package, use the following:pip install --ignore-installed dist/prog_edu_assistant_tools-0.3.1-py3-none-any.whlHow to use this package in master notebooks.Here are some useful snippets for your master assignment notebooks:from prog_edu_assistant_tools.summary_test_result import SummaryTestResult
from prog_edu_assistant_tools.magics import autotest, report

# Loads %%solution, %%submission, %%template
%load_ext prog_edu_assistant_tools.magics