Saravanan666/pypi-org huggingface dataset:
Package: perfect-freehand
Perfect Freehand Python(perfect-freehand-python)Draw perfect pressure-sensitive freehand lines. (Python port)This is a Python port of theperfect-freehand libraryoriginally written by Steve Ruiz in TypeScript. Please reference the
documentation for that library for additional usage examples, links to
other implementations, and to support the original author.When published to PyPi, the package name is "perfect-freehand" (since the "python" is redundant).
The library name when importing into python code isperfect_freehand.Documentation:https://docs.bigbluebutton.org/perfect-freehand-python/LicenseThis library's code and documentation is released under the terms of theMITlicense.
Certain build system files are under the terms of theCC0-1.0license.
Package: perfect-information-game
Perfect Information GameCreating 2D perfect information board games, and playing them with machine learning systems.What's in this repo?Implementations for a bunch of board games includingChess,Checkers,Connect 4,Othello (Reversi), andThe Game of the AmazonsImplementations of various algorithms for selecting moves includingMinimax(with alpha-beta pruning),Monte Carlo tree searchusing randomized rollouts,iterative deepening, andpolicy-value driven Monte Carlo tree searchCode for generatingendgame tablebasesfor Chess usingretrograde analysisCode for training neural networks from scratch usingself-play reinforcement learningOver 4500 lines of Python code and countingSome coolchess puzzlesthat I discovered along the wayPlay Against Live Models on my WebsiteConnect 4:Easy,Medium,HardOthello: Coming SoonAmazons (6x6 Board): Coming SoonGetting StartedEnsure Python is installedInstall requirements:pip install -r requirements.txtPlay a game of Connect 4 against the ai:python src/scripts/play_vs_ai.pyView games files that were generated during training:python src/scripts/view_game_file.pySwitch the active game by changing the import in the corresponding scriptFor games with multiple versions, select the desired version by opening the corresponding file undersrc/games/and
uncommenting the corresponding line that starts withCONFIG =How I Trained the ModelsConnect 4Othello (Reversi)The Game of the Amazons (6x6 Board)Resources I UsedHow to Keep Improving When You're Better Than Any Teacher - Iterated Distillation and AmplificationMultiple Policy Value Monte Carlo Tree SearchMastering Chess and Shogi by Self-Play with a General Reinforcement Learning AlgorithmIntroduction to Reinforcement Learning(course by David Silver)Parallel Monte-Carlo Tree SearchA Lock-free Multithreaded Monte-Carlo Tree Search AlgorithmTime Management for Monte Carlo Tree SearchLessons From Alpha Zero (part 5): Performance OptimizationHow much training data do you need?Working with Numpy in CythonChess Piece ImagesChess test casesand morechess test casesChess Position Encoding Scheme
Package: perfection
A module that creates perfect hash functions for a known set of integer
inputs.>>> import perfection
>>> l = (0, 3, 4, 7 ,10, 13, 15, 18, 19, 21, 22, 24, 26, 29, 30, 34)
>>> hf = perfection.make_hash(l)
>>> hf(19)
1Installpip install perfectionMain featuresmake_hash()that generates an honest-to-goodness perfect hash function
for the given keys.make_dict()creates a dictionary subclass that implements theMutableMappinginterface (thus, acts exactly like adict), and
uses the hash function created in the equivalent call tomake_hash().Additionally,hash_parameters()may be used to output the parameters of
making a perfect hash for the given set of input keys. These parameters can
then be used to implement a perfect hash function in a language of your
choice.For example, generatetandrparameters usinghash_parameters():>>> l = (0, 3, 4, 7 ,10, 13, 15, 18, 19, 21, 22, 24, 26, 29, 30, 34)
>>> params = hash_parameters(l)
>>> params.t
6
>>> params.r
(2, 7, 12, 0, 7, 10)Then, the hash function, in pseudocode is as follows:function hash(i):
    static r = { 2, 7, 12, 0, 7, 10 }
    static t = 6

    x = i mod t
    y = i div t
    return x + r[y]Note thatdivstands forfloor(integer) division.Beta FeaturesCan import a minimal perfect (ordered!) hash function with the same API
using:import perfection.czechAPI is not yet finalized!CreditAlgorithm described byThomas Gettys.Python code © 2014, 2016 Eddie Antonio Santos. MIT licensed.With contributions by Thomas Calmant.
Package: perfect-jsonschema
perfect-jsonschemaBecause soft validation is not enoughWhyJSON schema standardand its implementations stand that if you have something unfamiliar in your schema, it's not an error. In particular, you won't get an error if you made a typo or used something you thought as working. For example, this one is perfectly fine and valid:{
    "required": ["company"],
    "type": "object",
    "propertie": {"company": {"pattern": "^(Apple)$"}, "format": "url"},
}But we want to catch thosepropertietypos and invalidurlformats.The library rely onjsonschemaand supports additional keywords to ignore.FeaturesDerives the draft from the schema and yields ajsonschema.SchemaErrorif:A schema is emptyA schema contains a keyword which is not a part of a jsonschema implementation orextended_keywordssetA schema contains an invalid format valueA schema fails withjsonschema.check_schema()Usagefrom perfect-jsonschema import check

try:
    check(schema, extended_keywords={"tag"})
except Exception as e:
    do_something()An exception example:Traceback (most recent call last):
    f"Schema contains invalid keywords for "
jsonschema.exceptions.SchemaError: Schema contains invalid keywords for http://json-schema.org/draft-07/schema#:
{'propertie', 'company'}Local developmentpipenv install --dev
pipenv shell
toxContributionAny contribution is welcome
Package: perfectmoney
PerfectMoney APIPerfect Money is a financial service allowing the users to make instant payments. This package is inspired by official APIdocumentationsand contains all functions for interacting with PerfectMoney's API as mentioned in documentations.InstallationUse the package managerpipto install package:# Latest versionpipinstallperfectmoney# Latest changespipinstallgit+https://github.com/quitegreensky/perfectmoney.gitUsage ExamplesHere are some examples:from perfectmoney import PerfectMoney
p= PerfectMoney('login_id', 'password') 
#============
# get balance
#============
balance= p.balance()
if not balance:
    print(p.error)
else:
    print(balance)
#returns a dictionary of addresses
#{
#    'USD': [{'U12345': '100.00'}], 
#    'EUR': [{'E12345': '50.00'}], 
#    'GOLD': [{'G12345': '35.00'}, {'G123456785': '0.00'}], 
#    'BTC': [{'B123456785': '0.00'}]
#}

#============
# send money
#============
send= p.spend(payer_account='U123456', Payee_Account='U654321', amount=100)
if not send:
    print(p.error)
else:
    print(send)
# returns 
#{
#    'Payee_Account_Name': 'someaccount', 
#    'Payee_Account': 'U654321', 
#    'Payer_Account': 'U123456', 
#    'PAYMENT_AMOUNT': '1.4', 
#    'PAYMENT_BATCH_NUM': '1234567', 
#    'PAYMENT_ID': ''
#}

#============
# rates
#============
rate = p.rates(currency='EUR')
if not rate :
    print(p.error)
else :
    print(rate)
# returns
#{
#    'time': '8/12/20 4:23:34 AM', 
#    'USD': ' 1.17 ', 
#    'GOLD': ' 0.0006227 ', 
#    'BTC': ' 0.0001045 '
#}ContributingLicenseMIT
Package: perfectoactions
PerfectoActionsWith PerfectoActions, you can create maintenance scripts that handle the cleanup, reboot, reservation, and retrieval of network settings in parallel and across all or specific devices in the Perfecto lab. In addition, you can set up scheduling for these scripts to run at the desired interval, depending on the devices involved. You can also view or delete old media repository items and list all or specific users automatically. Device manufacturers that do not support auto-connect on reboot are skipped automatically.
This non-flash, non-native, multi-threaded solution replaces the following Perfecto native automation commands: clean device, reboot device, and get network settings.Kindly refer to the Official documentation available here:https://developers.perfectomobile.com/pages/viewpage.action?pageId=50922763
Package: perfectoai
PerfectoAI is an automated emailable analytics tool along with AI graphs & predictions specially designed for Perfecto's Smart Reports. Kindly reach out to Perfecto's Professional Services if interested.CHANGES1.0.34:Support for Epoch time in ms for startDate and endDate parameters. This allows the ability to query results as accurate to two different timestamp with millisecondsManual Interactive session results will no longer be included under top failed tests and top recommendationsJobName and Job Number will now be empty if not applicable in failures htmlImportant fix to handle multiple repetitive special characters in Smart Reporting's failure messageSummary Report hyperlinks will now reach to applicable Smart Reporting urls when jobs=All JobsFailure html files are renamed like unique_failures.html as they contain details of unique failures onlyAll table layouts will follow responsive design even when test names or failures are very huge1.0.32:Clicking on header logo will navigate to perfecto cloud websiteRemoved unnecessary logs, packages & non relevant code to improve speed by 20%Graphs have meaningful headingsDeprecating tags of -e parameter and replaced it with addInfo to make it more meaningfulAppending " -d true" parameter to your existing query will now enable downloading of .txt files and extra console statementsAppending "|ci=false" to -e parameter will automatically open report post execution. It will not be opened automatically by default in order to provide a seamless devops experience.
Package: perfecto-py3
Perfecto Reporting is a multiple execution digital report
Home-page:https://github.com/PerfectoCodeAuthor: Perfecto
Author-email:perfecto@perfectomobile.comLicense: UNKNOWN
Download-URL:https://github.com/PerfectoCodeDescription: UNKNOWN
Keywords: Perfecto,PerfectoMobile,Reporting,Selenium,Appium,Automation testing
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Package: perfect-physics
Perfect PhysicsA free tutorial series inTowards Data Science:Part 1:High-level engine applied to tennis ball and basketball drop, etc.Part 2:The program makes a philosophy discovery by simulating a billiards break.Part 3:Creating the low-level engine using SymPy, including setting up the physics equations (some are tricky) and getting SymPy to do the rest of the work.Part 4, how to speed up the engine a bit (but not enough) and limitations (not yet published).Seehttps://medium.com/@carlmkadiefor other articles.See requirements.txt and requirements-dev.txt for dependencies.Note that pydub requires ffmpeg to be installed on your system.Note that moviepy requires ffmpeg to be installed on your system.Let me know if there is interest in a more automated install process.License: Apache 2.0 + MIT
Package: perfin
# PerFinPerFin is a  Personal Finance library for Python## What is PerFinIt's basically a wrapper library for Pandas and Zipline with the focus on an easy to use interface### Implemented so far:* Load and handle csv files* Calculate montly savings and outliers* Get aggregates for easy analytics### More to come* Will add a simple API for backtesting, plotting in Jupyter, monte carlo simulations ... over the next month## ExamplesTo get a PerFin playground execute the following steps1. Define a environment variable 'PERFIN_FILES' and point it to the directory with the csv files you want to work on* on MacOS or Linux it's `export PERFIN_FILES=/home/user/files`.Note: Right now, if you have on folder for all `.csv` files, they willall be put together into one dataframe, regardless if the filenames say 'checking' or 'saving'.2. Open the interpreter in the `PerFin` folder. Load the playground script from the examples folder.* Option 1: Import the playground module. The code is directly executed and is then available via `playground.data`* Option 2: Add the variables to the interpreters global scope e.g. `exec(open("/Users/admin/pythonprojects/perfin/examples/playground.py").read(), globals())`3. Have fun
Package: perflog
perflogStructured logging support for application performance and monitoring dataDemo""" My Application """importperflogdefmain():<Alltheusualapplicationcodegoeshere>if__name__=='__main__':perflog.set_and_forget()main()There are several parameters for theset_and_forgetmethod that can be
used to change the default behaviour. For example, by default the performance
log messages will be written every 60 seconds.Note: in addition to writing performance data to the log message itself,perflogalso addsextra logrecord fields.  This means that if you’re
using a log formatter that writes out all the fields in some kind of
structured format (say, logstash_formatter), you will find that the performance
data will also be recorded in those fields and can therefore be accessed in
tools like Kibana.Acknowledgementsperflogusespsutilto
obtain all the process-related information. Thanks Giampaolo!
Package: perf-logger
Performence loggerA very handy performance logging tool， useful for training deep neural networks.Installpip install perf-loggerUsagefrom perf_logger import PerfLogger
logger = PerfLogger(prefix='your_program')
msg = 'iter: {}, loss: {}, acc: {}'.format(0,100,0)
logger.log_str(msg,stdout=True)A log file will be found in /home//.perf_logger/<your_program>/Example2020-03-05 00:39:21 nLoss 0.0477,advlooss 0.245,dLoss 1.05,dAcc 0.4982020-03-05 00:40:38 nLoss 0.00401,advlooss 0.226,dLoss 0.98,dAcc 0.4992020-03-05 00:41:55 nLoss 0.00324,advlooss 0.222,dLoss 0.918,dAcc 0.52020-03-05 00:43:12 nLoss 0.00297,advlooss 0.219,dLoss 0.873,dAcc 0.52020-03-05 00:44:29 nLoss 0.00282,advlooss 0.214,dLoss 0.837,dAcc 0.52020-03-05 00:45:46 nLoss 0.00273,advlooss 0.208,dLoss 0.808,dAcc 0.52020-03-05 00:47:03 nLoss 0.00266,advlooss 0.202,dLoss 0.783,dAcc 0.52020-03-05 00:48:20 nLoss 0.0026,advlooss 0.197,dLoss 0.761,dAcc 0.52020-03-05 00:49:37 nLoss 0.00255,advlooss 0.192,dLoss 0.743,dAcc 0.52020-03-05 00:51:00 nLoss 0.00163,advlooss 0.137,dLoss 0.602,dAcc 0.5
Package: perfmonitor
Performance monitor CLI for WindowsParse and display performance counter frompsutilandnvidia-smi.Minimum height:If GPU: 17 + #CPUs/2Else: 9 + #CPUs/2Unfortunately, temperature reading for CPU is not available.Requirespsutil: load CPU+MEM stats.termcolor: color stuff.xmltodict: parsenvidia-smioutput during GPU stats load.Parameters:-tor--time: Change default refresh time totseconds (default: 2).-dor--disable_gpu: Disable GPU stats load and display.-cor--disable_cpu: Clear screen everycprints (default: 5).Run standaloneInstallrequirements.txtRun with:python main.py
Package: perfometrics
PerfometricsPerfometrics is a Python library for measuring the performance of a given URL using the pycurl library. The library provides various metrics such as HTTP status code, time taken for DNS resolution, time taken for establishing TCP connection, time taken for establishing SSL/TLS connection, time taken for the first byte of the response, time taken for data transfer, and total time taken for the request.InstallationTo install perfometrics, simply run the following command:pipinstallperfometricsUsageTo use perfometrics, you can import the curl module and create a CurlUptime object with the URL you want to measure. Here's an example:importperfometrics.curlaspcurlurl='https://example.com'curl_uptime=pcurl.CurlUptime(url)metrics=curl_uptime.get_metrics()print('Metrics for',url)print('HTTP status code:',metrics['status_code'])print('Time taken for DNS resolution:',metrics['dns_lookup'],'seconds')print('Time taken for establishing TCP connection:',metrics['tcp'],'seconds')print('Time taken for establishing SSL/TLS connection:',metrics['ssl_tls'],'seconds')print('Time taken for the first byte of the response:',metrics['ttfb'],'seconds')print('Time taken for data transfer:',metrics['data_transfer'],'seconds')print('Total time taken for the request:',metrics['total'],'seconds')This will output something like:Metrics for https://example.com
HTTP status code: 200
Time taken for DNS resolution: 0.003439 seconds
Time taken for establishing TCP connection: 0.057725 seconds
Time taken for establishing SSL/TLS connection: 0.09169 seconds
Time taken for the first byte of the response: 0.213251 seconds
Time taken for data transfer: 0.067498 seconds
Total time taken for the request: 0.282891 secondsAfter you're done with the CurlUptime object, you should call its close_session() method to close the pycurl.Curl() session.Licenseperfometrics is licensed under the GNU General Public License v3.0. See the LICENSE file for more information.
Package: perform
Perform is a python module for calling processes in a simple and easy way.  Each program is added to the perform module as a function that returns the stdout printed by the program.##usage:- To call a program:import performstdout = perform.ls()- To pass arguments to a program:stdout = perform.git("ls-files", "-m")- To call a program that contains symbols in its name:stdout = perform._("pip2.7", "install", "perform")- To get extra information from a program:obj = perform.ls(return_object=True) # or perform.ls(ro=True)stdout = obj.stdoutstderr = obj.stderrerrcode = obj.errcode- To call a command in the shell:print(perform._("ls | grep 'py'", shell=True))- To import a specific command:from perform import lsprint(ls("-a"))- To use perform for a non-blocking call:perform.firefox("google.com", no_return=True)perform.firefox("github.com", no_return=True)perform.firefox("kernel.org", nr=True)##more examplesimport performstdout = perform.ls()print(perform.git("ls-files", "-m"))print(perform._("pip2.7", "install", "perform"))stdout = perform.raspistill("-o ~/image.jpg")print(perform.python("-c", "import perform;print(perform.echo('hello'))")
Package: performa
Performance testing toolkitPlease feel here a long description which must be at least 3 lines wrapped on
80 cols, so that distribution package maintainers can use it in their packages.
Note that this is a hard requirement.Free software: Apache licenseDocumentation:http://docs.openstack.org/developer/performaSource:http://git.openstack.org/cgit/openstack/performaBugs:http://bugs.launchpad.net/performaFeaturesTODO
Package: performance-analysis
FeaturesPerformance indicators calculationSupports single time series data and multiple time series data with different time spansTime series visualizationInstallationYou can install “performance-analysis” via ‘pip’_ from ‘PyPI’_:$ pip install performance-analysisUsagePerformance partfromperformance_analysis.PerformanceimportPerformance# Input return dataraw_return_data=pd.read_csv("./raw_return_data.csv")# Just some examples. For more functions, you can explore the packageann_rtn=Performance.annualized_return(raw_return_data,period=Constant.DAILY,logreturn=False)var=Performance.value_at_risk(raw_return_data,significance_level=0.05)sharpe=Performance.sharpe_ratio(raw_return_data,risk_free=0.,logreturn=False)calmar=Performance.calmar_ratio(raw_return_data,period=Constant.DAILY,logreturn=False)Computes personal specified indicators'''
indicators = {
        0 : annualized_return,
        1 : annualized_sd,
        2 : max_drawdown,
        3 : sharpe_ratio,
        4 : calmar_ratio,
        5 : burke_ratio,
        6 : downside_risk,
        7 : sortino_ratio,
        8 : tracking_error,
        9 : information_ratio,
        10 : capm_beta,
        11 : capm_alpha,
        12 : treynor_ratio,
        13 : skewness,
        14 : kurtosis,
        15 : value_at_risk,
        16 : conditional_value_at_risk,
        17 : omega_ratio,
        18 : tail_dependence,
        19 : TDC,
    }
'''args=(0,1,2,3,4)kwargs={"annualized_return":{"returns":single_return_data},"annualized_sd":{"returns":single_return_data},"max_drawdown":{"returns":single_return_data},"sharpe_ratio":{"returns":single_return_data},"calmar_ratio":{"returns":single_return_data}}performance=Performance.performance_dashboard(*args,**kwargs)Plotting partfromperformance_analysis.PlottingimportPlotting# read data, set index and convert to datatimesingle_return_data=pd.read_csv("./single_return_data.csv")single_return_data.set_index(['Date'],inplace=True)single_return_data.index=pd.to_datetime(single_return_data.index,format='%Y%m%d',errors='coerce')Plotting.plot_cum_return_and_drawdown(single_return_data)Plotting.plot_monthly_return_heatmap(single_return_data,show_text=True)Plotting.plot_seasonal_effect(single_return_data)LicenseDistributed under the terms of the ‘MIT’_ license, “performance-analysis” is free and open source software
Package: performance-data-collection
# Introduction
The tool can collect the CPU and memory of a process in the PC system and save to the local, support Mac, Windows.#The package name
process_name = packagename#In seconds
collect_time = seconds#for windowsfromperformance_data_collection.WindowsCollectimportWinprocess_name='package_name'collect_time=10# In secondswin=Win(process_name,collect_time)win.collect()#for macfromperformance_data_collection.MacCollectimportMacprocess_name='packagename'collect_time=10# In secondsmac=Mac(process_name,collect_time)mac.collect()#resultCPU:9.06%
memory：195.39MB
********************
CPU:8.80%
memory：191.50MB
********************
CPU:9.01%
memory：191.50MB
********************
CPU:9.28%
memory：191.51MB
********************
CPU:9.75%
memory：191.53MB
********************
...[联系作者](2025331266@qq.com,747469442@qq.com)git@gitee.com:zhou002/performance.git
Package: performance-features
Performance Counters api for pythonA high-level abstraction API for Linux perf events with low overheadTable of contentsInstallationExample usageHow it worksInstall from pipsudoaptinstallg++gccswiglibpfm4-devpython3-devpython3-pip
pipinstallperformance-featuresInstall from sourcegitclonehttps://github.com/VitorRamos/performance_features.gitcdperformance_features
sudo./install.shUsageList eventsfromperformance_featuresimport*print(get_supported_pmus())print(get_supported_events())Sampling eventsfromperformance_featuresimport*try:events=[['PERF_COUNT_HW_INSTRUCTIONS'],['PERF_COUNT_HW_BRANCH_INSTRUCTIONS','PERF_COUNT_HW_BRANCH_MISSES'],['PERF_COUNT_SW_PAGE_FAULTS']]perf=Profiler(program_args=['/bin/ls','/'],events_groups=events)data=perf.run(sample_period=0.01)print(data)exceptRuntimeErrorase:print(e.args[0])How it works:A c module create a workload using Linux ptrace to ensure we control the starting the application and collect the events data with minimal overhead. The events are setup using the perf_event_open syscall through the perfmom library.What are the performance countersPerformance counters are special hardware registers available on most modern CPUs. These registers count the number of certain types of events: such as instructions executed, cache misses suffered, or branches mis-predicted without slowing down the kernel or applications. These registers can also trigger interrupts when a threshold number of events have passed and can thus be used to profile the code that runs on that CPU.Reading Performance countersInstructionsrdmsr: Reads the contents of a 64-bit model specific register (MSR) specified in the ECX register into registers EDX:EAX. This instruction must be executed at privilege level 0 or in real-address moderdpmc: Is slightly faster that the equivelent rdmsr instruction. rdpmc can also be configured to allow access to the counters from userspace, without being priviledged.From Userspace(Linux) : The Linux Performance Counter subsystem provides an abstraction of these hardware capabilities. It provides per task and per CPU counters, counter groups, and it provides event capabilities on top of those. It provides "virtual" 64-bit counters, regardless of the width of the underlying hardware counters. Performance counters are accessed via special file descriptors. There's one file descriptor per virtual counter used. The special file descriptor is opened via the perf_event_open() system call. These system call do not use rdpmc but rdpmc is not necessarily faster than other methods for reading event values.