Saravanan666/pypi-org huggingface dataset:
Package: edx-django-sites-extensions
Part ofedX code.edx-django-sites-extensionsThis package includes extensions to the Django “sites” framework
used by Open edX Django IDAs (independently deployable applications).OverviewIn order to support multitenancy in an IDA, it is helpful to make use of
theDjango “sites” framework.One shortcoming of the Django “sites” framework is the fact that the CurrentSiteMiddleware
provided by the framework that adds the current site to incoming requests does not allow
you to fall back to a site that you can configure in settings in case the current site
cannot be determined from the host of the incoming request.The Django app provided by this package overcomes this issue by monkey patching the
django.contrib.sites.models.SiteManager.get_current() function which is called by the
CurrentSiteMiddleware to determine the current site. The patched version of this function
will first try to determine the current site by checking the host of the incoming request
and attempting to match a site by domain. If a site cannot be found this way, it will fall
back to the default site configured by setting the SITE_ID setting.Another issue with the Django “sites” framework is that it uses an in-memory cache of Site
models which makes it difficult to update models associated with the Site model via Django
admin and have those updates be reflected across all Python processes in a multi-process
application environment.Again the Django app provided by this package monkey patches the private SiteManager query
functions that implement the in-memory caching mechanism to add a configurable timeout to
the Site cache allowing model updates to be reflected across all processes after the specified
timeout.To enable this functionality in your Django project:Install this package in your python environment$ pip install edx-django-sites-extensionsAdddjango.contrib.sites.middleware.CurrentSiteMiddlewareto yourMIDDLEWARE_CLASSESlist.Set theSITE_IDsetting:SITE_ID = 1This package also provides a mechanism for settings up URL redirects for your application.
It makes use of the Django redirects app and provides middleware which will check for
Redirect models whose old_path field matches the path of the incoming request and redirects
those requests to the new_path of the Redirect model.To enable this functionality in your Django project:Install this package in your python environment$ pip install edx-django-sites-extensionsAdddjango_sites_extensions.middleware.RedirectMiddlewareto yourMIDDLEWARE_CLASSESlist.You can then use Django admin to create Redirect models.DocumentationThe docs for edx-django-sites-extensions are on Read the Docs:https://edx-django-sites-extensions.readthedocs.org.LicenseThe code in this repository is licensed under LICENSE_TYPE unless
otherwise noted.Please seeLICENSE.txtfor details.How To ContributeContributions are very welcome.Please readHow To Contributefor details.Reporting Security IssuesPlease do not report security issues in public. Please emailsecurity@edx.org.Mailing List and IRC ChannelYou can discuss this code in theedx-code Google Group.
Package: edx-downloader
EDX Downloader (for edx.org)This is a command-line downloader written using Python. This project is inspired byedx-dlbut it does not rely onyoutube-dlor any other external library to download the videos. Moreover, at the moment this downloader supports justhttps://edx.orgwebsite only and it doesn't support other similar websites.Disclaimer: You should not use this software to abuse EDX website. I have written this software with a positive intention, that is to help learners download EDX course videos altogether quickly and easily. I am not responsible if your EDX account gets banned for abuse. You should use this software on your own risks.Installationpip3installedx-downloaderOr clone this repo and install manually:gitclonehttps://github.com/rehmatworks/edx-downloader.gitcdedx-downloader
pip3install-rrequirements.txt
python3setup.pyinstallUsageOnce installed, a commandedxdlbecomes available in your terminal. Typingedxdland hitting enter in your terminal should bring up the downloader menu. Provide a course URL and hit enter to get started.Storing Login CredentialsOn a private computer, it is always better if the software doesn't ask you for your EDX login and again. To make the software automatically use your login credentials, create a file called.edxauthin your home directory and provide the credentials in two lines. The first line should contain your email address and the second line should contain your password.Moreover,edx-downloaderwill ask you to save your login details if you have not asked it to skip saving the credentials. If it doesn't ask, you can update your credentials in.edxauthfile any time. On a Unix machine, you can create this file withtouch ~/.edxauthand edit with your favorite editor. A sample.edxauthfile has been included in this repo.RecommendationAlthough this downloader should work on Python 2.7 too, but it is highly recommended that you should use Python 3.x. to avoid any possible issues.Bugs & IssuesI have developed this package quickly and I have uploaded it for the community. Please expect bugs and issues. Bug fixing and improvements are highly appreciated. Send a pull request if you want to improve it or if you have fixed a bug.Normal users can use the issues section to report bugs and issues for this software. Before opening a new issue, please go through existing ones to be sure that your question has not been asked and answered yet.CreditsPython- The programming language that I have usedbeautifulsoup4- For HTML parsingcolorful- To show colorful textfake-useragent- For a dynamic user-agentrequests- To make HTTP requeststqdm- To show download progress barvalidators- To validate URL and email inputAnd thanks to several indirect dependencies that the main dependencies are relying on.
Package: edx-ecommerce-api-client
The edX E-Commerce API Client (henceforth, client) allows users to communicate with theE-Commerce Service.Testing$ make validateHow to ContributeContributions are very welcome, but for legal reasons, you must submit a signedindividual contributor’s agreementbefore we can accept your contribution. See ourCONTRIBUTINGfile for more information – it also contains guidelines for how to maintain
high code quality, which will make your contribution more likely to be accepted.
Package: edx-ecommerce-worker
DEPRECATION WARNINGThis repository is deprecated and in maintainence-only operation while we work on a replacement, please seethis announcementfor more information.Although we have stopped integrating new contributions, we always appreciate security disclosures and patches sent tosecurity@edx.orgedX Ecommerce WorkerThe Celery tasks contained herein are used to implement asynchronous order fulfillment and other features requiring the asynchronous execution of many small, common operations.PrerequisitesPython 3.xCelery 4.xRabbitMQ 3.5.xGetting StartedMost commands necessary to develop and run this app can be found in the included Makefile. These instructions assume a working integration between theedX ecommerce serviceand the LMS, with asynchronous fulfillment configured on the ecommerce service.To get started, create a new virtual environment and install the included requirements.$ make requirementsThis project usesCeleryto asynchronously execute tasks, such as those required during order fulfillment. Celery requires a solution to send and receive messages which typically comes in the form of a separate service called a message broker. This project usesRabbitMQas a message broker. On OS X, use Homebrew to install it.$ brew install rabbitmqBy default, most operating systems don’t allow enough open files for a message broker. RabbitMQ’s docs indicate that allowing at least 4096 file descriptors should be sufficient for most development workloads. Check the limit on the number of file descriptors in your current process.$ ulimit -nIf it needs to be adjusted, run:$ ulimit -n 4096Next, start the RabbitMQ server.$ rabbitmq-serverIn a separate process, start the Celery worker.$ make workerIn a third process, start the ecommerce service. In order for tasks to be visible to the ecommerce worker, the value of Celery’sBROKER_URLsetting must shared by the ecommerce service and the ecommerce worker.Finally, in a fourth process, start the LMS. At this point, if you attempt to enroll in a course supported by the ecommerce service, enrollment will be handled asynchronously by the ecommerce worker.If you’re forced to shut down the Celery workers prematurely, tasks may remain in the queue. To clear them, you can reset RabbitMQ.$ rabbitmqctl stop_app
$ rabbitmqctl reset
$ rabbitmqctl start_appLicenseThe code in this repository is licensed under the AGPL unless otherwise noted. Please seeLICENSE.txtfor details.How To ContributeAnyone merging to this repository is expected torelease and monitor their changes; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released.Please also readHow To Contribute.Reporting Security IssuesPlease do not report security issues in public. Please emailsecurity@edx.org.Mailing List and IRC ChannelYou can discuss this code in theedx-code Google Groupor in the#edx-codeIRC channel on Freenode.
Package: edxia
edxiaAnalyse SEM-BSE and SEM-EDS maps.Scanning Electron Microscopy (SEM)coupled withEnergy-Dispersive Spectroscopy (EDX)is an imaging technique used in the cement community to learn more about the microstructure of the material.This python package aims to offer tools to analyse and correlate this information.FeaturesSuperpixel subsampling to extract representative points from the mapsAGlueplugins to provide a user-friendly way to identify phases using the well-known ratios plotsAnalysis functions to measure phase distributions, also available graphicallyPython API to automate analysisBased on robust and well-known framework such as scipy/scikit-image/pandasReferencesFabien Georget, William Wilson, Karen Scrivener, Comprehensive microstructure phase characterization from quantified SEM-EDS maps in cementitious materials,in preparationInstalledxia can be installed usingpiporconda.pip install edxiaouconda install -c specmicp edxiaAboutThis code is developed by Fabien Georget (fabien "dot" georget "AT" epfl "dot" ch)  in thelaboratory of construction materialsatEPFL. This work is part of a collaboration with William Wilson (EPFL, Sherbrooke University).
Package: edx-lint
A collection of code quality tools:A few pylint plugins to check for quality issues pylint misses.A command-line tool to generate config files like pylintrc from a master
file (part of edx_lint), and a repo-specific tweaks file.Using edx_lintTheedx_lintcommand can generate config files from its own master file. Install
the package usingpip:$ pip install edx-lintThewritesub-command will write a config file based on the contents of the
edx_lint master file:$ edx_lint write pylintrcThe file written contains a hash of its contents, to detect subsequent editing.edx_lintwill detect this when it next tries to write the file.  If editing
is detected, the edited file will be moved aside so it can be compared to the
newly written file.Handling newly introduced lint violationsNew potential lint violations will be communicated with a major version bump.If you run into new lint violations during an upgrade of edx-lint, your options include:Fixing the violations immediately, orUsing lint-amnestyand fixing at a later time, orCustomizing edx_lintto permanently ignore the violations.Using lint-amnestyThelint-amnestycommand can be used to squash all existing pylint errors
in a codebase, so that from then the repository can maintain pylint-cleanliness.
Install the package usingpip:$ pip install edx-lintThelint-amnestycommand expects pylint errors in the--output-format=parseableformat:$ pylint my.python.package --output-format=parseable | lint-amnestyThis will add comments for every existing pylint violation that look like:# pylint: disable=some-error  # lint-amnestyIt will also remove any existing suppressions that pylint flags as beinguseless-suppressions.Customizing edx_lintYou can customize the resulting pylintrc file by creating a pylintrc_tweaks file in the
current directory before running thewritesub-command.  It should contain only the
settings you want to override.Note:If your project is not a Django project, you’ll want to disable the Django plugins with
your pylintrc_tweaks file:[MASTER]
load-plugins = edx_lint.pylintDeveloping edx_lintTo run the tests:$ make requirements
$ make testTo manually test your pylint plugin, create a custom module and run pylint with a selected set of enabled message symbols. For instance:pylint --load-plugins=edx_lint.pylint --disable=all --enable=feature-toggle-needs-doc path/to/my/custom/module.pyLicenseThe code in this repository is licensed under Apache 2.0.  Please seeLICENSE.txtfor details.How To ContributeContributions are very welcome.Please readHow To Contributefor details.Getting HelpThe Open edX project has resources for developer support on theGetting Helppage.
Package: edx-management-commands
Part ofedX code.EdX Management CommandsThis repository is intended for Django 1.8 applications and utilities for reuse within
multiple edx-platform projects.OverviewThis package provides a Django application containing management commands that are useful in automated
deployment scenarios.It currently offers two management commands,manage_userandmanage_group, which are designed to
facilitate idempotent read/write operations on Django users, groups, and permissions.  Consult the source
for more specifics.DocumentationThe docs for EdX Management Commands are on Read the Docs:https://edx-management-commands.readthedocs.org.LicenseThe code in this repository is licensed under LICENSE_TYPE unless
otherwise noted.Please seeLICENSE.txtfor details.How To ContributeContributions are very welcome.Please readHow To Contributefor details.Even though they were written withedx-platformin mind, the guidelines
should be followed for Open edX code in general.Reporting Security IssuesPlease do not report security issues in public. Please emailsecurity@edx.org.Mailing List and Slack TeamYou can discuss this code in theedx-code Google Groupor with theOpen edX team on Slack.
Package: edx-milestones
edx-milestonesedx-milestones (milestones) is a Django application which manages significant Course and/or Student events in the Open edX platform.UsageA Milestone represents an event which can occur for a student while interacting with the Open edX platform.Relationships can be created between courses or individual sections of course content (referred to collectively as course entities going forward) and a Milestone. A relationship can indicate that a course entity either requires or fulfills a given Milestone.Student milestone fulfillment status can be recorded and queried.An example feature which Milestones supports is Pre-requisite Courses:Course author selects Course 101 in Studio as a pre-requisite of Course 102Studio:Makes call to Milestones service APIMilestones:Creates a new generic Milestone A for Course 101Indicates that Course 101 fulfills Milestone AIndicates that Course 102 requires Milestone AStudent Smith completes Course 101LMS:Makes call to Milestones service APIMilestones:Pulls the list of milestones fulfilled by Course 101 (set includes Milestone A)Indicates that Student Smith has accomplished Milestone AStudent Smith attempts to access Course 102LMS:Uses Milestones service API to compare Course 102 milestone requirements against Student Smith's milestonesGrants Student Smith access to Course 102Standalone Testing and Quality Check$ make quality
    $ make testOpen edX Platform IntegrationThis package is included in thebaserequirements ofedx-platformmilestonesis included in the list of installed apps for edx-platform:These documents outline the feature flags required to enable the features that use edx-milestones.Course Run prerequisitesSubsection prerequisitesHow to ContributeContributions are very welcome please see ourCONTRIBUTINGfile for more information -- it also contains guidelines for how to maintain
high code quality, which will make your contribution more likely to be accepted.Getting HelpIf you're having trouble, we have discussion forums athttps://discuss.openedx.orgwhere you can connect with others in the community.Our real-time conversations are on Slack. You can request aSlack
invitation, then join ourcommunity Slack team.For more information about these options, see theGetting Helppage.Reporting Security IssuesPlease do not report security issues in public. Please emailsecurity@edx.org.
Package: edxml
EDXMLis a data representation that transforms arbitrary data records into stories
that machines can read and understand. Computers can read EDXML documents similar to
how humans read a novel. This enables computers to actively assist human analysts
in making sense of data, correlate data from multiple sources and connect the dots.This repository contains theEDXML Software Development Kit (SDK). The
SDK features the edxml Python package, which contains an implementation of theEDXML specification. It also offers some command line
tools to inspect EDXML documents and aid in application development.The package can be installed using Pip:pip install edxmlDocumentation(Read the Docs)Installer(PyPI)Source code(Github)
Package: edxml-schema
The EDXML Schema Python PackageThis is a Python package that provides the EDXML RelaxNG schema. It can be used to include the schema in Python projects by adding this package as a dependency.InstallingThe package can be installed using Pip:pip install edxml-schemaUsageBesides the actual schema the package also provides constants which contain the path to the various versions of the schema. These can be imported like this:fromedxml_schemaimportSCHEMA_PATH_3_0print(f"The schema can be found here:{SCHEMA_PATH_3_0}")
Package: edxml-test-corpus
The EDXML Test Corpus Python PackageThis is a Python package that provides the EDXML test corpus. It can be used to include the test corpus in Python projects by adding this package as a dependency.InstallingThe package can be installed using Pip:pip install edxml-test-corpusUsageBesides the corpus data files the package also provides a constant which contains the path to the root directory containing the data files. It can be imported like this:from edxml_test_corpus import CORPUS_PATH
Package: edx-organizations
edx-organizations (organizations) is a Django application
responsible for managing the concept of Organizations in the Open edX
platform. Organizations represent the entities responsible for creating
and publishing Courses. In the future the scope and responsibilty of the
Organization may evolve to include other aspects, such as related
learners.UsageOrganizations is designed to centralize metadata about course publishers, such as their title, logo URL,
and information included in certificates.Local Development$makerequirements$maketest$makequalityOpen edX Platform IntegrationUpdate the version ofedx-organizationsin the appropriate requirements file (e.g.requirements/edx/base.txt).Add ‘organizations’ to the list of installed apps incommon.py.Install all requirements:$pipinstall-rrequirements(Optional) Run tests:$pavertest_system-slmsHow to ContributeContributions are very welcome, but please note that edx-organizations is currently an early stage
work-in-progress and is changing frequently at this time.See ourCONTRIBUTINGfile for more information – it also contains guidelines for how to
maintain high code quality, which will make your contribution more likely to be accepted.Reporting Security IssuesPlease do not report security issues in public. Please emailsecurity@edx.org.Mailing List and IRC ChannelYou can discuss this code on theedx-code Google Groupor in theedx-codeIRC channel on Freenode.
Package: edx-prefectutils
A utility code written by edX specifically for edX Prefect Flows. It assists writing in edX Prefect Flows.FeaturesTODOPyPI Package ReleaseThis repository publishes packages on PyPI, when you update this repository make sure to create a new release so latest changes would be published on PyPI and become available for use.Bump theversionto match the version that will be released. Once the pull request with the updated version is merged into master, create a new release from GitHub Web UI, using the same version number. You can refer toHow to create GitHub releasefor more information on this process.edx-prefectutils PyPIpackage is used inprefect-flowsrepository, you will have to update edx-prefectutils package version inrequirementsso it will pick latest PyPI package version.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: edx-repo-tools
This repo contains a number of tools Open edX engineers use for working with
GitHub repositories.The set of tools has grown over the years. Some are old and in current use,
some have fallen out of use, some are quite new.Setting up GitHub authenticationMost of these make GitHub API calls, and so will need GitHub credentials in
order to not be severely rate-limited.  Edit (or create)~/.netrcso that it
has an entry like this:machine api.github.com
  login your_user_name
  password ghp_XyzzyfGXFooBar8nBqQuuxY9brgXYz4XyzzyChange the login to your GitHub user name.  The password is a Personal Access
Token you get fromhttps://github.com/settings/tokens.  Visit that page, click
“Generate new token.” It will prompt you for your password, then you’ll see a
scary list of scopes. Check the “repo” option and click “Generate token.” Copy
the token that appears. Paste it into your ~/.netrc in the “password” entry.Working in the repoTo work on these tools:Use a virtualenv.Install dependencies:make dev-installRun tests:make testOlder tools were Python files run from the root of the repo.  Now we are
being more disciplined and putting code into importable modules with entry
points in setup.py.Simple tools can go into an existing subdirectory of edx_repo_tools.  Follow
the structure of existing tools you find here.  More complex tools, or ones
that need unusual third-party requirements, should go into a new
subdirectory of edx_repo_tools.Add a newentry_pointin setup.py for your command:entry_points={
    'console_scripts': [
        ...
        'new_tool = edx_repo_tools.new_tool_dir.new_tool:main',
        ...If your tool is in its own directory, you can create anextra.infile
there with third-party requirements intended just for your tool.  This will
automatically create an installable “extra” for your requirements.Older ToolsThere are many programs in this repo in various stages of disrepair.  A few
of them are described in this repo’solder README.mdfile.  Others are not
described at all, but may be useful, or have useful tidbits in the code.FeedbackPlease send any feedback tooscm@edx.org.