Saravanan666/pypi-org huggingface dataset:
Package: courseraoauth2client
This project is a library consisting of a command line interface and a client
for interacting with Coursera’s OAuth2 authorized APIs.InstallationTo install this sdk, simply execute:sudo pip install courseraoauth2clientpipis a python package manager.
If you do not havepipinstalled on your machine, please follow the
installation instructions for your platform found at:https://pip.pypa.io/en/latest/installing.html#install-or-upgrade-pipSetupBefore using Coursera’s OAuth2 APIs, be sure you know your client id,
client secret, and scopes you want for for your application. You may create
an application athttps://accounts.coursera.org/console. When creating the
application, set theRedirect URIto behttp://localhost:9876.Next, authorize your application by runningcourseraoauth2client config authorize--appAPPwhereAPPis a disambiguating identifier to be referred to later when making Coursera API calls.Command Line InterfaceThe project includes a command line tool. Simply run:courseraoauth2client -hfor a complete list of features, flags, and documentation.configConfigures the Coursera OAuth2 client library.Examples:courseraoauth2client config authorize--appAPPConfigures the tool to go through theauthorization secretflow for applicationAPP.courseraoauth2client configcheck-auth--appAPPChecks whether the current instance can authorize against Coursera’s API server for applicationAPPUsageimport requests
from courseraoauth2client import oauth2
...
app = 'my_application_name'
url = 'https://api.coursera.org/api/externalBasicProfiles.v1?q=me&fields=name'
auth = oauth2.build_oauth2(app=app).build_authorizer()
response = requests.get(url, auth=auth)
print response.json()Ifmy_application_namewas successfully configured, you will be able to
successfully make a request. Otherwise, an exception will be thrown telling you
to set up your application for API access.Bugs / Issues / Feature RequestsPlease us the github issue tracker to document any bugs or other issues you
encounter while using this tool.Developing / ContributingWe recommend developingcourseraoauth2clientwithin a pythonvirtualenv.
To get your environment set up properly, do the following:virtualenv venv
source venv/bin/activate
python setup.py develop
pip install -r test_requirements.txtTestsTo run tests, simply run:nosetests, ortox.Code StyleCode should conform to pep8 style requirements. To check, simply run:pep8 courseraoauth2client tests
Package: coursera-scraper
Coursera ScraperThis repository contains a Python script that utilizes Selenium to scrape data from Coursera.Scraped FieldsThe script scrapes the following fields for each course:Link: Link of the courseTitle: The title of the course.Institute: The institution offering the course (if available).Rating: The course rating.Recent Views: The number of recent views for the course.Students Enrolled: The number of students enrolled in the course.Time Requirement: The approximate time required to complete the course.Skills: A list of skills covered in the course.Learner Count: The total number of learners who have taken the course.Difficulty Level: The difficulty level of the course.Duration: The duration of the course.Sub-course: Additional information about the course or its sub-courses.The scraped data is stored in a dictionary format for each course.PrerequisitesYou can install the required Python packages by running the following command:pipinstallcoursera-scraper

fromscraper.mainimportscraperforcourse_detailinscraper(keyword='python'):# do some processing on course detailContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: courtvision
Welcome to CourtVisionA library and simple application aims to extract useful infromation from videos of court-based[^1] sports. By detecting and tracking players as well as the ball CourtVision captures data at 30 frames per second. By visualizing this high resolution data it is hoped players and coaches will find interesting take-a-ways.An associated paper with research goals and results is availablehere[^1]: Currently only padel is supported.CLISome commonly used scripts are migrated to a cli so they are available when installation is done viapipcv-grab-frames- grabs frames from the dataset specified in.env.
Package: couscous
couscousDerive actionable rules from specification prose through first grinding grains into small balls to later cook a good meal.License: MITDocumentationUser and developerdocumentation of couscous.Bug TrackerFeature requests and bug reports are bested entered in thetodos of couscous.Primary Source repositoryThe primary source repository ofcouscous is at sourcehuta collection of tools useful for software development.StatusExperimental.Note: The default branch isdefault.
Package: c-out
IntroductionColored Output = c_outYou don't have to tell me how monotonous it is to use the same old print statement in python, as there is no option to format it. Moreover, we all have faced problems while debugging our code with countless print statements but no way to highlight any of it.Well we can definitely install/import third-party packages, but some of us just prefer the old school solutions.I have a simple, yet effective solution for you.
What if I tell you, it is possible to create a custom class yourself which can format the output in the terminal?Using this module you can directly format the output you see in your command line interfacewithout using any external packages.It usesANSI Escape Codesto format the standard output.Installationpip install c_outUsageImportfromc_out.beauty_printimportc_out,TextColor,BackgroundColor,StyleDifferent Ways to useNormal printc_out("Hello World")Print with just text colorc_out("Hello World",text_color=TextColor.BLUE)Print with just background colorc_out("Hello World",bg_color=BackgroundColor.BLACK)Print with text color and background colorc_out("Hello World",text_color=TextColor.RED,bg_color=BackgroundColor.BLACK,styles=[Style.BOLD])Print with text color, background color and font stylesc_out("Hello World",text_color=TextColor.RED,bg_color=BackgroundColor.BLACK,styles=[Style.BOLD])c_out("Hello World",text_color=TextColor.RED,bg_color=BackgroundColor.BLACK,styles=[Style.BOLD,Style.STRIKETHROUGH,Style.ITALIC])Print with separator and text colorc_out("Hello","World",text_color=TextColor.RED,sep='\n')Print with end of line and text colorc_out("Hello","World",text_color=TextColor.RED,end='\t')And there are many more combinations that you can try yourself.ChoicesCurrent Choices for TextColorBLACKREDGREENORANGEBLUEPURPLECYANLIGHTGREYDARKGREYLIGHTREDLIGHTGREENYELLOWLIGHTBLUEPINKLIGHTCYANCurrent Choices for BackgroundColorBLACKREDGREENORANGEBLUEPURPLECYANLIGHTGREYCurrent choices for StylesBOLDUNDERLINEITALICSTRIKETHROUGHSELECTED
Package: coutils
Datacoco3 - UtilsEquinox Common Code Utility for Python 3 - Utilities!There are currently wrappers for the following utils:EmailFTP ServersInstalling the latest versionpip install git+https://github.com/equinoxfitness/datacoco.util.git#egg=coutilsDevelopmentGetting StartedIt is recommended to use the steps below to set up a virtual environment for development:python3 -m venv <virtual env name>
source venv/bin/activate
pip install -r requirements.txtTestingpip install -r requirements-dev.txt
To run the testing suite, simply run the command: `tox`
Package: couzinswarm
Simulate fish swarming behavior with the model byIain Couzin et
al.Use with caution as I can’t seem to replicate some behavior (e.g. the
torus swarming).ExamplefromcouzinswarmimportSwarmswarm=Swarm()r,v=swarm.simulate(1000)InstallpipinstallcouzinswarmElaborate exampleimportnumpyasnpimportmatplotlib.pyplotasplfrommpl_toolkits.mplot3dimportAxes3DfromcouzinswarmimportSwarm# note: the dimension of space is measure in fish length,# such that r = 1 means a length of one fishswarm=Swarm(number_of_fish=20,repulsion_radius=1,orientation_width=10,attraction_width=10,# this angle is given in radians# up to np.pi (not 360 degrees as in# the paper)angle_of_perception=np.pi,# radians per unit of timeturning_rate=0.1,# fish lengths per unit of timespeed=0.1,# in units of fish lengthnoise_sigma=0.1,dt=0.1,# geometry of boxbox_lengths=[100,100,100],# boundary conditionsreflect_at_boundary=[True,True,True],verbose=False,)fig=pl.figure()ax=fig.add_subplot(111,projection='3d')N_t=1000t=np.arange(N_t+1)# Note that r.shape = v.shape = ( N_fish, N_t+1, 3 )positions,directions=swarm.simulate(N_t)r,v=positions,directionsforiinrange(swarm.number_of_fish):ax.plot(r[i,:,0],r[i,:,1],r[i,:,2])pl.show()
Package: cov19
Prediction for the spread of COVID-19 using Epidemiological ModelsThe purpose of the cov19 package is to integrate the differential equations of epidemiological models and adjust their respective parameters with data using MCMC approach.Table of ContentsGetting StartedFeaturesResultsDataset1. Getting StartedDependenciesYou need Python 3.7 or later to usecov19. You can find it atpython.org.
You also need setuptools, wheel and twine packages, which is available fromPyPI. If you have pip, just run:pip install pandas
pip install pygtc
pip install setuptools
pip install tqdmInstallationClone this repo to your local machine using:git clone https://github.com/emdemor/cov192. FeaturesSupport for different epidemiological modelsMonte Carlo Markov Chains (MCMC) approach to fit patametersData from multiple trusted and reliable sources compiled by Microsoft and accessible inwww.bing.com/covid.3. ResultsThe main result in this version is to plot de curves from the model for a specific parameter vector and compare this with dataset. In covid/stat.py, functions has been implemented to generate an MCMC sample, through which it will be possible to make inferences of the parametric intervals.4. DatasetHere, we are using the Microsoft Data, from the repohttps://github.com/microsoft/Bing-COVID-19-Data.
]
Package: covador
Validation library for processing http endpoint arguments.fromflaskimportFlaskfromcovadorimportsplit,optfromcovador.flaskimportquery_stringapp=Flask(__name__)@app.route('/')@query_string(foo=opt(split(int),[]))defcsv_argument(foo):returnrepr(foo)# GET /?foo=1,2,3 -> [1, 2, 3]if__name__=='__main__':app.run()Support for flask(0.x, 1.0.x, 1.1.x), django(1.x, 2.x), aiohttp(2.x, 3.x),
tornado(3.x, 4.x, 5.x, 6.x) and sanic(0.x, 18.x, 19.x).Simple creating of customquery_string/form/params/json_body/argswrappers.Multi dict support via itemmultiparam.Multi dict keys support via itemsrcparam.Simple interface for custom validators/processors it’s just a callable.Maps, typed Maps, Lists, Tuples, Enums.Validation chains:opt(default=[])| split(separator=' ') | List(int) | (lambda it:it[:10])or more conciseopt(split(int, separator=' '), []) | operator.itemgetter(slice(10))—
an optional argument of space separated integers and we need top 10 items from it and it
is empty by default.Literal schema:schema(foo=[{'boo':int}]), validates{'foo':[{'boo':10}, {'boo':20}]}.Bytes/unicode aware.
Package: covalent-braket-plugin
Covalent Braket Hybrid Jobs PluginCovalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. This executor plugin interfaces Covalent withAWS Braket Hybrid JobsInstallingTo use this plugin with Covalent, install it withpip:pip install covalent-braket-pluginUsage ExampleThe following workflow prepares a uniform superposition of the single-qubit standard basis states and measures it.importcovalentasctfromcovalent_braket_plugin.braketimportBraketExecutorimportos# AWS resources to pass to the executorcredentials_file="~/.aws/credentials"profile="default"s3_bucket_name="braket_s3_bucket"ecr_image_uri="111223344.dkr.ecr.us-east-1.amazonaws.com/amazon-braket-ecr-repo:latest"iam_role_name="covalent-braket-iam-role"ex=BraketExecutor(profile=profile,credentials=credentials_file,s3_bucket_name=s3_bucket_name,ecr_image_uri=ecr_image_uri,braket_job_execution_role_name=iam_role_name,quantum_device="arn:aws:braket:::device/quantum-simulator/amazon/sv1",classical_device="ml.m5.large",storage=30,time_limit=300,)@ct.electron(executor=ex)defsimple_quantum_task(num_qubits:int):importpennylaneasqml# These are passed to the Hybrid Jobs container at runtimedevice_arn=os.environ["AMZN_BRAKET_DEVICE_ARN"]s3_bucket=os.environ["AMZN_BRAKET_OUT_S3_BUCKET"]s3_task_dir=os.environ["AMZN_BRAKET_TASK_RESULTS_S3_URI"].split(s3_bucket)[1]device=qml.device("braket.aws.qubit",device_arn=device_arn,s3_destination_folder=(s3_bucket,s3_task_dir),wires=num_qubits,)@qml.qnode(device=device)defsimple_circuit():qml.Hadamard(wires=[0])returnqml.expval(qml.PauliZ(wires=[0]))res=simple_circuit().numpy()returnres@ct.latticedefsimple_quantum_workflow(num_qubits:int):returnsimple_quantum_task(num_qubits=num_qubits)dispatch_id=ct.dispatch(simple_quantum_workflow)(1)result_object=ct.get_result(dispatch_id,wait=True)# We expect 0 as the resultprint("Result:",result_object.result)To run such workflows, users must have AWS credentials allowing access
to Braket, ECR, S3, and some other services. These permissions must be
defined in an IAM Role (called"covalent-braket-iam-role"in this
example). TheAWS
documentation has more information about managing Braket
access.Overview of ConfigurationSee theRTDfor how to configure this executor.Required Cloud ResourcesIn order to run your workflows with covalent there are a few notable resources that need to be provisioned first. Particularly an S3 bucket must be created, an IAM role with theAmazonBraketFullAccesspolicy, and a private ECR repo with an uploaded image for the tasks to use.For more information regarding which cloud resources need to be provisioned visit our read the docsRTDguide for this plugin.Release NotesRelease notes are available in theChangelog.CitationPlease use the following citation in any publications:W. J. Cunningham, S. K. Radha, F. Hasan, J. Kanem, S. W. Neagle, and S. Sanand.Covalent.Zenodo, 2022.https://doi.org/10.5281/zenodo.5903364LicenseCovalent is licensed under the Apache 2.0 License. See theLICENSEfile or contact thesupport teamfor
more details.
Package: covalent-dask-plugin
Covalent Dask PluginCovalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. The way in which workflows and tasks interface with the hardware is through executor plugins, such as the local executor packaged with core Covalent. The Dask executor plugin interfaces with a runningDask Cluster. Users can deploy tasks to the cluster by providing the scheduler address to the executor object. For more information about how to get started with Covalent, check out the projecthomepageand the officialdocumentation.To install this plugin with CovalentUsingpip:pipinstallcovalent-dask-pluginUsing this repo for development purposes:gitclonehttps://github.com/AgnostiqHQ/covalent-dask-plugin.gitcdcovalent-dask-plugin

pipinstall-e.After this package has been installed, run the following to start a Dask cluster with Python and retrieve the scheduler address:fromdask.distributedimportLocalClustercluster=LocalCluster()print(cluster.scheduler_address)The address will look liketcp://127.0.0.1:55564when running locally. Note that the Dask cluster does not persist when the process terminates.This cluster can be used with Covalent by providing the scheduler address:importcovalentasctdask_executor=ct.executor.DaskExecutor(scheduler_address="tcp://127.0.0.1:55564")@ct.electron(executor=dask_executor)defmy_custom_task(x,y):returnx+y...For more information about how to get started with Covalent, check out the projecthomepageand the officialdocumentation.Release NotesRelease notes are available in theChangelog.CitationPlease use the following citation in any publications:W. J. Cunningham, S. K. Radha, F. Hasan, J. Kanem, S. W. Neagle, and S. Sanand.Covalent.Zenodo, 2022.https://doi.org/10.5281/zenodo.5903364LicenseCovalent is licensed under the GNU Affero GPL 3.0 License. Covalent may be distributed under other licenses upon request. See theLICENSEfile or contact thesupport teamfor more details.
Package: covalent-python-api
Covalent Python APICovalent Python Api is a package that allows python developers to query all the
modules from the Covalent API directly with python.InstallationInstalling from pip:$ pip install covalent-python-apiOr build from source:Clone the public repository:$ git clone git@bitbucket.org:lluisBrokenC/covalent_python_api.gitOr download and extract thezipballYou can now build or install the package:Build:$ python setup.py buildInstall:$ python setup.py installDocumentationCheck Covalent Python API Documentation on:https://covalent-python-api.readthedocs.io/en/latest/Build Documentation:$ python setup.py build_sphinxView documentation on browser:$ file:///path/to/covalent-python-api/build/doc/html/index.htmlAlso is recommended to check the official Covalent API documentation in:https://www.covalenthq.com/docs/api/Copyright and licenseCopyright (c) 2021 Lluis Casals MarsolLicensed under the GNU General Public License v3.0 (GPLv3); you may not use
this work except in compliance with the License. You may obtain a copy of the
License in the LICENSE.txt file, or at:https://www.gnu.org/licenses/gpl-3.0Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
Package: covalent-ssh-plugin
Covalent SSH PluginCovalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. This executor plugin interfaces Covalent with other machines accessible to the user over SSH. It is appropriate to use this plugin to distribute tasks to one or more compute backends which are not controlled by a cluster management system, such as computers on a LAN, or even a collection of small-form-factor Linux-based devices such as Raspberry Pis, NVIDIA Jetsons, or Xeon Phi co-processors.To use this plugin with Covalent, simply install it usingpip:pipinstallcovalent-ssh-pluginThe following shows an example of how a user might modify their Covalentconfigurationto support this plugin:[executors.ssh]username="user"hostname="host.hostname.org"remote_cache_dir="/home/user/.cache/covalent"ssh_key_file="/home/user/.ssh/id_rsa"python_path="python"conda_env=""This setup assumes the user has the ability to connect to the remote machine usingssh -i /home/user/.ssh/id_rsa user@host.hostname.organd has write-permissions on the remote directory/home/user/.cache/covalent(if it exists) or the closest parent directory (if it does not).If you are using a named conda environment you can use theconda_envparameter to set the name of your conda environment. However if you wish use a specify a particular python binary you can configure thepython_pathparameter to the absolute path where python is located on the remote machine.Within a workflow, users can decorate electrons using the default settings:importcovalentasct@ct.electron(executor="ssh")defmy_task():importsocketreturnsocket.gethostname()or use a class object to customize behavior within particular tasks:executor=ct.executor.SSHExecutor(username="user",hostname="host2.hostname.org",remote_cache_dir="/tmp/covalent",ssh_key_file="/home/user/.ssh/host2/id_rsa")@ct.electron(executor=executor)defmy_custom_task(x,y):returnx+yFor more information on how to get started with Covalent, check out the projecthomepageand the officialdocumentation.Release NotesRelease notes are available in theChangelog.CitationPlease use the following citation in any publications:W. J. Cunningham, S. K. Radha, F. Hasan, J. Kanem, S. W. Neagle, and S. Sanand.Covalent.Zenodo, 2022.https://doi.org/10.5281/zenodo.5903364LicenseCovalent is licensed under the Apache License 2.0. See theLICENSEfile or contact thesupport teamfor more details.
Package: cov-change
Cov ChangeCov change is a tool to help you find the changes in your code that are not covered by your tests. It usesgit diffto find your changes, andcoverageto find your test coverage.Installationpipinstall--upgradepip
pipinstallcov-changeUsageAssuming you've already run tests withcoverage(e.g.coverage run -m pytest), you will have generated a.coveragefile. To then usecov-change:coveragejson# generate a json file from the .coverage filecov-changeBy default,cov-changewill compare your current branch toorigin/main. The full usage is:cov-change[diff_branch][curr_branch][--coverage-fileCOVERAGE_FILE][-o--outputOUTPUT][-v--verbose][-f--format{cli,markdown}][--diff_fileDIFF_FILE][--use-coverage-diff][-h--help]Optionsdiff_branchandcurr_branchare the branches you want to compare. By default,diff_branchisorigin/mainandcurr_branchis your current commit.--coverage_file COVERAGE_FILEis the path to the coverage file. By default, it iscoverage.json.-o --output OUTPUTis the path to the output JSON file. By default, it iscoverage_change.json.-v --verbosewill print out the missing lines for each file.-f --format {cli,markdown}is the format of the output. By default, it iscliand outputs a formatted table. Ifmarkdownis passed in, it will output a markdown table.--diff_file DIFF_FILEis the path to a pre-generated diff file. If this is not passed in, thegit diffwill be run within thecov-changecommand itself. It is recommended that youdo notpass this argument in.--use_coverage_diffassumes thatcov-changehas already been run once, and that the coverage change file has been generated. It will then use that diff file to generate the output.Examplescov-change# compare origin/main to current commitcov-changeorigin/devHEAD# compare origin/dev to the current commitcov-changeorigin/devHEAD--coverage_filemy_coverage.json-v# compare origin/dev to the current commit, using my_coverage.json as the coverage file and printing out the missing linescov-change-checkcov-change-checkchecks if the generatedcoverage_change.jsonfile meets requirements. If it doesn't, it will exit with a non-zero exit code. This is useful for CI/CD pipelines. The full usage is:cov-change-check[coverage_change_file][--totalTOTAL][--fileFILE][-h--help]Optionscoverage_change_fileis the path to the coverage change file. By default, it iscoverage_change.json.--total TOTALis the minimum total coverage change required. By default, it is 0.--file FILEis the minimum coverage change required in each file. By default, it is 0.Examplescov-change-check--total80--file50# check if the total coverage is at least 80%, and if each file has at least 50% coverage