Saravanan666/pypi-org huggingface dataset:
Package: baseapp-social-auth
BaseApp Social Auth - DjangoUsageUse this package to login/signup using social networks (Facebook, Google and others)Full documentationInstallationInstall the packageAdd torequirements/base.txt:baseapp-social-auth @ git+https://github.com/silverlogic/baseapp-backend.git@v0.1#subdirectory=baseapp-social-authAdd to your routesfrombaseapp_social_auth.viewsimportSocialAuthViewSet# noqarouter.register(r"social-auth",SocialAuthViewSet,basename="social-auth")Add INSTALLED_APPSINSTALLED_APPS=[..."social_django","rest_social_auth","baseapp_social_auth.cache",...]Add CELERY_BEAT_SCHEDULE"clean-up-social-auth-cache": {
    "task": "baseapp_social_auth.cache.tasks.clean_up_social_auth_cache",
    "schedule": timedelta(hours=1),
    "options": {"expires": 60 * 30},
},Add your settingsfrombaseapp_social_auth.settingsimport(# noqaSOCIAL_AUTH_BEAT_SCHEDULES,SOCIAL_AUTH_FACEBOOK_KEY,SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS,SOCIAL_AUTH_FACEBOOK_SCOPE,SOCIAL_AUTH_FACEBOOK_SECRET,SOCIAL_AUTH_LINKEDIN_OAUTH2_FIELD_SELECTORS,SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY,SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE,SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET,SOCIAL_AUTH_GOOGLE_OAUTH2_KEY,SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET,SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE,SOCIAL_AUTH_GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS,SOCIAL_AUTH_TWITTER_KEY,SOCIAL_AUTH_TWITTER_SECRET,SOCIAL_AUTH_PIPELINE,SOCIAL_AUTH_USER_FIELDS,)ifSOCIAL_AUTH_FACEBOOK_KEYandSOCIAL_AUTH_FACEBOOK_SECRET:AUTHENTICATION_BACKENDS.append("social_core.backends.facebook.FacebookOAuth2")ifSOCIAL_AUTH_TWITTER_KEYandSOCIAL_AUTH_TWITTER_SECRET:AUTHENTICATION_BACKENDS.append("social_core.backends.twitter.TwitterOAuth")ifSOCIAL_AUTH_LINKEDIN_OAUTH2_KEYandSOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET:AUTHENTICATION_BACKENDS.append("social_core.backends.linkedin.LinkedinOAuth2")\ifSOCIAL_AUTH_GOOGLE_OAUTH2_KEYandSOCIAL_AUTH_GOOGLE_OAUTH2_SECRET:AUTHENTICATION_BACKENDS.append("social_core.backends.google.GoogleOAuth2")\SOCIAL_AUTH_PIPELINE_MODULE="apps.users.pipeline"Export variables in ansibleSOCIAL_AUTH_FACEBOOK_KEY
SOCIAL_AUTH_FACEBOOK_SECRET
SOCIAL_AUTH_TWITTER_KEY
SOCIAL_AUTH_TWITTER_SECRET
SOCIAL_AUTH_LINKEDIN_KEY
SOCIAL_AUTH_LINKEDIN_SECRET
SOCIAL_AUTH_GOOGLE_KEY
SOCIAL_AUTH_GOOGLE_SECRETTestingInstall the requirements fromtest/requirements.txtand runpytest
Package: baseapp-url-shortening
BaseApp URL ShorteningReusable app to enable url shortening.How to install:Add dependencies to yourrequirements/base.txtfile:baseapp-core @ git+https://github.com/silverlogic/baseapp-backend.git@v0.1#subdirectory=baseapp-core
baseapp-reactions @ git+https://github.com/silverlogic/baseapp-backend.git@v0.1#subdirectory=baseapp-url-shorteningAnd run provision or manuallypip install -r requirements/base.extIf you want to develop,install using this other guide.How to useAddbaseapp_url_shorteningto your project'sINSTALLED_APPSAdd the following to your settings file.URL_SHORTENING_PREFIXcan be any stringURL_SHORTENING_PREFIX="c"Add the following to your apps/urls.py fileurlpatterns=[re_path(r"",include("baseapp_url_shortening.urls")),]Writing test cases in your projectThere is aShortUrlFactorywhich helps you write other factories:import factory
from baseapp_url_shortening.tests.factories import ShortUrlFactoryHow to developClone the project inside your project's backend dir:git clone git@github.com:silverlogic/baseapp-backend.gitAnd manually install the package:pip install -e baseapp-backend/baseapp-url-shorteningThe-eflag will make it like any change you make in the cloned repo files will effect into the project.
Package: base-astro-bot
Base Astro BotBase Bot for Star Citizen playersThis project contains python base bot class, useful when creating a bot on specific platform.Available features:Organization fleet information. Each member can add/remove ships that he owns.
Database is stored for everyone. There are commands to display whole organization fleet or
ships owned by specific member.Ship matrix data. There are commands to view ship details, comparison of multiple ships or check
prices of multiple ships that match expression (e.g. all DRAKE ships)Displaying of Road Map data with filters on specific expression (e.g. when searching for a ship release).
Displaying info for a specific release or Road Map category.Displaying current SC releases (PU and PTU) according to Road Map version.Thread monitoring changes in current SC release on Road Map page and Spectrum forums.Trade assistant shows best trade routes for given conditions (budget, cargo, start/end location).Mining assistant showing resources prices.If your bot is running use thehelpcommand to see all available commands.PrerequisitesPython 3.5+MongoDB - for storing data cacheSome SQL database if you don't want to use default SQLiteDependenciespafy 0.5.4pymongo 3.7.2SQLAlchemy 1.2.12tabulate 0.8.2youtube-dl 2018.10.5Installationpipinstallbase_astro_bot
python-mdastro_bot.installDIRECTORY_NAMEThe second command generates default configuration files to run your own BOT:languages.py - named tuples with translationsettings.py - custom settings for your serverBasic ConfigurationHere's what you absolutely need to configure to run the bot:settings.pyset the CHANNELS dict valuesactually in basic config only themainchannel is requiredyou can set all three channels with the same valueTrade and mining dataAll raw data for these features is pulled from this project API:https://scm.oceandatarat.orgI strongly encourage to use this page for prices and other data reporting or to
contribute in any other way to the linked project.
Please create your own account on that page and set theSCM_TOKENin
settings.py accordingly.SQL DatabaseAstro Bot uses SQL Alchemy to handle database and SQLite database is
used by default. If you want to use different database then please
adjustsettings.pyfile accordingly.There are two parameters there which are used to configure database:DATABASE_NAME
DATABASE_DIALECTMongoDBMongo is used to store cache data (in case if external data sources are unavailable).
It works with default settings. If you need to customize it findMONGO_CONNECTION_STRINGin settings.py
Package: base_atlas
This is a PyPi fork of basemap1.2.0. Before installing: (1) Make sure the data folder has been downloaded (Note you maybe able to use the same data folder from basemap1.0.7),
(2) Make sure you have downloaded the geos library and defined the GEOS_DIR variable. (example, export GEOS_DIR=/usr/local)
Seehttp://matplotlib.org/basemap/users/examples.htmlfor
examples of what it can do.
Package: baseball-id
Do you analyze baseball data from several sources and need to find a way to correlate it for the same player?  This takes advantage of the data published athttps://github.com/spilchen/baseball_id_db.  With the data you can take a player from Yahoo! and cross reference with data from sites such ashttp://baseball-reference.com,http://fangraphs.com,http://www.seanlahman.com.  This package gives you a way to access this map within Python.  A set of APIs allow you to do lookup of players by a variety of different IDs.Build statusInstallationThis package can be installed via pip:pip install baseball_idor from the repo:git clone https://github.com/spilchen/baseball_id
cd baseball_id
python setup.py installDocumentationThe documentation are hosted at readthedocs.io:https://baseball-id.readthedocs.io/en/latest/Sample API UsageIn [1]: from baseball_id import Lookup

In [2]: Lookup.from_mlb_ids([430945, 607680, 669456])
Out[2]:
      mlb_id      mlb_name mlb_pos ...  ottoneu_name ottoneu_pos  rotowire_id  rotowire_name rotowire_pos
39    430945    Adam Jones      CF ...    Adam Jones          OF       8165.0     Adam Jones           OF
1746  607680  Kevin Pillar      CF ...  Kevin Pillar          OF      12678.0   Kevin Pillar           OF
2545  669456  Shane Bieber       P ...  Shane Bieber          SP      14383.0   Shane Bieber            P

[3 rows x 35 columns]

In [3]: Lookup.from_yahoo_ids([10794, 9542, 7578])
Out[3]:
      mlb_id        mlb_name mlb_pos ... ottoneu_pos rotowire_id   rotowire_name  rotowire_pos
5     621345     A.J. Minter       P ...          RP     13889.0     A.J. Minter             P
204   605151  Archie Bradley       P ...          RP     12131.0  Archie Bradley             P
2340  448179       Rich Hill       P ...          SP      7965.0       Rich Hill             P

[3 rows x 35 columns]

In [4]: Lookup.from_cbs_ids([1660162, 2507367])
Out[4]:
      mlb_id      mlb_name mlb_pos ...  ottoneu_name ottoneu_pos  rotowire_id  rotowire_name rotowire_pos
423   457763  Buster Posey       C ...  Buster Posey        C/1B      10426.0   Buster Posey            C
1657  665742     Juan Soto      LF ...     Juan Soto          OF      13960.0      Juan Soto           OF

[2 rows x 35 columns]

In [5]: Lookup.from_espn_ids([29252])
Out[5]:
     mlb_id       mlb_name mlb_pos ...   ottoneu_name ottoneu_pos  rotowire_id  rotowire_name rotowire_pos
836  451594  Dexter Fowler      RF ...  Dexter Fowler          OF       8271.0  Dexter Fowler           OF

[1 rows x 35 columns]

In [6]: Lookup.from_fangraphs_ids([19753, 19566])
Out[6]:
      mlb_id           mlb_name mlb_pos ... ottoneu_pos rotowire_id      rotowire_name  rotowire_pos
1510  642528  Jonathan Loaisiga       P ...       SP/RP     15256.0  Jonathan Loaisiga             P
2133  663993          Nate Lowe      1B ...          1B         NaN                NaN           NaN

[2 rows x 35 columns]
Package: baseband
Baseband is a package for reading and writing VLBI and other radio baseband
files, with the aim of simplifying and streamlining data conversion and
standardization.  It relies onNumPyandAstropy.For installation and usage instructions, please see theonline documentation.If you used this package in your research, please cite it via DOI10.5281/zenodo.1214268.ContributingPlease open a new issue for bugs, feedback or feature requests.We welcome code contributions, in particular support for new file formats!
To add a contribution, please submit a pull request.  If you would like
assistance in using GitHub or how to begin modifying Baseband, please feel free
to contact@mhvk.For more information on how to make code contributions, please see theAstropy
developer documentation.LicenseBaseband is licensed under the GNU General Public License v3.0 - see theLICENSEfile.
Package: baseband-tasks
Baseband-tasks: A Package for Radio Baseband Data ReductionBaseband-tasks is a package for reduction and analysis of radio baseband data.
It relies onBaseband,NumPyandAstropy.For installation and usage instructions, please see theonline documentation.If you used this package in your research, please cite it via DOI10.5281/zenodo.3951543.ContributingPlease open a new issue for bugs, feedback or feature requests.We welcome code contributions!  To add a contribution, please submit a pull
request.  If you would like assistance in using GitHub or how to begin
modifying Baseband-tasks, please feel free to contact@mhvkor@luojing1211.For more information on how to make code contributions, please see theAstropy
developer documentation.LicenseBaseband-tasks is licensed under the GNU General Public License v3.0 - see theLICENSEfile.
Package: baseblock
Base Block (baseblock)Base Block of Common Enterprise Python UtilitiesCrypto BaseUsagefrombaseblockimportCryptoBasekey=CryptoBase.generate_private_key()Thekeyis used to both encrypt and decrypt text, like this:input_text="Hello, World!"crypt=CryptoBase(key)x=crypt.encrypt_str(input_text)y=crypt.decrypt_str(x)assertinput_text==yThe key can also be stored in the environment underBASEBLOCK_CRYPTO_KEY.
Package: basebot
basebot========*Not a baseball bot.basebot is a foundation on which you can build your IRC bots. Look at `core.py` as an example of how to write plugins for it.Installation------------.. code:: shell$ git clone https://github.com/clearskies/basebot.git$ pip install -r requirements.txt$ mkdir ~/.basebot$ cp -r sample/* ~/.basebot/$ python setup.py install$ basebotPlugins-------Look in https://github.com/clearskies/basebot/tree/master/sample/ for sample plugins
Package: basebot22-basebot-JustinGuese
Published on:https://pypi.org/project/basebot22-basebot-JustinGuese/tradingbot22-basebotpython package to interact with thetradingbot22-backend, used intradingbot22-tradingbotspip install basebot22-basebot-JustinGueseorpip install -U git+https://github.com/JustinGuese/tradingbot22-basebot/Import withfrom basebot22.basebot import BaseBotusagebot = BaseBot("testbot")
print(bot.getPortfolio())
bot.buy("AAPL", 2000, amountInUSD=True)
print("portfolio after buy")
print(bot.getPortfolio())
print("portfolio after sell")
bot.sell("AAPL", 1500, amountInUSD=True)
print(bot.getPortfolio())
print("portfolio worth is: %.2f dollars" % bot.getPortfolioWorth())
print("next earnings calendar events:")
print(bot.getEarnings(only_now=True))
Package: base_bridge
# [ Django base bridge ]# 功能概述放在我们应用和django内部框架之间的桥接基类，目的是在不修改django源码的情况下可以定制某些模块。# 依赖* Python (2.7.X)* Django (1.7+)# 安装# 克隆代码到本地git clone https://github.com/evilloop/django-base-bridge# 进入目录cd django-base-bridge# 三步安装法python setup.py configpython setup.py buildpython setup.py install# 用法db===重新封装了一层原来的Model和fields，便于定制from base_bridge.db import modelsclass Project(models.Model):class Meta:verbose_name = verbose_name_plural = u'Project'name = models.CharField(verbose_name=u'名称')desc = models.TextField(verbose_name=u'描述')views===视图装饰器，记录日志和异常处理View装饰器，调用之前需要重写以下函数：- request_pre_process- request_exception_processfrom base_bridge.views.decorators import BaseDecoratorclass BeforeView(BaseDecorator):@classmethoddef request_pre_process(cls, request):'''Do something'''pass@classmethoddef request_exception_process(cls, request, e):'''Do something'''pass@BeforeView.catch_exception_without_parametersdef some_view(request):passutils=====工具函数from base_bridge.utils.settings import get_settingsget_settings() 直接返回settings模块对象from base_bridge.utils.http import response_as_jsonresponse_as_json(request, obj, headers, before_response) 构造json返回客户端
Package: basecamp
Basecamp Python Client======================Description-----------This module provides an (almost) complete wrapper around the Basecamp API(http://developer.37signals.com/basecamp/). It is written in Python andbased upon the excellent ElementTree package(http://effbot.org/zone/element-index.htm).Licended under the MIT LicenseUsage-----<pre># Import ElementTree and the Basecamp module.import elementtree.ElementTree as ETfrom basecamp import Basecampbc = Basecamp('https://example.basecamphq.com', 'API_KEY')# Fetch one todo list from its IDxml = bc.todo_list(14499317)items = ET.fromstring(xml).findall('todo-items/todo-item')# Let's use the ElementTree API to access data via path expressions:for item in items:print item.find("content").text</pre>Original Code-------------This code is built from the code of Quentin Pleplé (http://qpleple.com/) forked from github at (https://github.com/qpleple/basecamp-python-client)Which code is built from the code of Jochen Kupperschmidt <webmaster@nwsnet.de> (see http://homework.nwsnet.de/products/3cd4) under the MIT Licence.And added some suggestions from Greg Allard (see http://codespatter.com/2009/04/01/getting-basecamp-api-working-with-python).
Package: basecamper
Utility package for satellite machine learning trainingFree software: MIT licenseDocumentation: docs.granular.ai/basecamper.FeaturesPolyaxon auto-param captureConfiguration enforcement and management for translation into Dione environmentPrecomposed loss functions and metricsTODOShift build logic from cloudbuild to github actionsBuild Detailspackages are managed using poetrypackages poetry maintains pyproject.tomlPRs and commits todevelopbranch trigger a google cloudbuild (image: cloudbuild.yaml, docs: cloudbuild_docs.yaml)Dockerfile builds image by exporting poetry dependencies as tmp_requirements.txt and installing them
Package: basecampx
First, you need to ask user’s permission to access her data:from basceampx.auth import Auth
auth = Auth('clientid', 'clientsecret', 'http://my_app/handle_redirect')
authorize_url = auth.authorize_url()Redirect the user to theauthorize_url. After user grants you access, get the
access token:token = auth.access_token(code)['access_token']Find the accounts that this user has:from basecampx import Client
client = Client(token, 'YourAppName')
bcx_account = client.basecamp_accounts()[0]Use a user’s Basecamp Next account to access data in projects:client = Client(token, 'YourAppName', bcx_account['id'])

from basecampx import Projects
project_list = Projects(client).list()
project_names = [project['name'] for project in project_list]Get all discussions in a project:messages = Projects(client, 12345).topics.list()
Package: basecampy3
BasecamPY3An easy-to-use Python interface to theBasecamp 3 API.While BasecamPY3 aims to be equally functional in Python 2.7, the majority of testing has been in Python 3.4+ during
this early stage of its development.FeaturesEasy, AWS CLI-like configuration and installationObject-oriented APIHandles rate-limiting, caching, and authentication for you!Installpip install basecampy3
bc3 configureFollow the prompts to obtain an access and refresh token which is then saved to~/.config/basecamp.conf, allowing you
to callBasecamp3()without any parameters. You will need to make your ownBasecamp 3 app integrationfirst.Storing in environment variablesOnce you have the credentials you can store them in environment variables:BASECAMP_CLIENT_IDBASECAMP_CLIENT_SECRETBASECAMP_REDIRECT_URLBASECAMP_ACCESS_TOKENBASECAMP_REFRESH_TOKENThis will allow to easier deploys using CI, initializing with:frombasecampy3importBasecamp3bc3=Basecamp3.from_environment()UsageBasic Examplefrombasecampy3importBasecamp3bc3=Basecamp3()forprojectinbc3.projects.list():print(project.name)new_project=bc3.projects.create("My New Project",description="The best project ever made.")new_project.campfire.post_message("Hello World!")new_message=new_project.message_board.post_message("Check this out",content="This is a new message thread start.")new_message.archive()todolist=new_project.todoset.create("Things to be done")todolist.create("Get Milk")todolist.create("Get Eggs")go_to_bed=todolist.create("Go to bed.")go_to_bed.check()# this is marked as doneNot all functionality of the API is available yet.For anything missing, you can use therequests Session objectyourself directly
and consult theBasecamp 3 API docs. The benefit of using
this Session object is you will benefit from the authentication, rate-limiting, and caching features.Direct Session Examplefrombasecampy3importBasecamp3importjsonbc3=Basecamp3()session=bc3.session# replace these with actual IDs of the Basecamp objects you wish to getMY_COMPANY_ID=1234567recording_id=123456789project_id=1234567# Reference:# https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#get-commentsBASE_URL="https://3.basecampapi.com/{company_id}".format(company_id=MY_COMPANY_ID)# base of all API requestsENDPOINT="{base_url}/buckets/{project_id}/recordings/{recording_id}/comments.json"# get comments endpointurl=ENDPOINT.format(base_url=BASE_URL,project_id=project_id,recording_id=recording_id)resp=session.get(url)# make a GET request. Substitute get() with post() or put() or delete() as neededifnotresp.ok:# API returned a 4XX or 5XX errorprint("Something went wrong.")data=resp.json()pretty_print=json.dumps(data,indent=4)print(pretty_print)CLI ExampleCOMING SOON!Command Line interface for doing stuff with Basecamp.(not working yet)$ bc3 copy-access 12341234 87658765  # give user 87658765 access to all the projects that 12341234 doesTodoThe rest of the Basecamp 3 APICommand line tool (beyond just the "configure" command)Better testing coverage
Package: base-canvas
BaseCanvasDescriptionBaseCanvas is a small helper-class that handles common tasks in pygame. I've built it because I'm constantly making side-projects, often related to simulations, data structures, little games and stuff and it's not pleasant to always have to paste boilerplate code just to get started. Feel free to contact me, for suggestions, complaints or anything, really.UseTo get started simply:Import BaseCanvasfrom base_canvas import BaseCanvasCreate a "Main Class" that inherits BaseCanvasclass Main(BaseCanvas):
     passAppend the following at the end of the file in which your "Main Class" is:if__name__=="__main__":main=Main()main.loop()When running your program from the command-line a few parameters can be passed:--width (an integer, if 0 fullscreen mode will be selected. Default to 800)--height (an integer, if 0 fullscreen mode will be selected. Default to 800)--fps (an integer. Default to 60)lifecycleThe lifecycle of BaseCanvas is centered around inherited and overwritten hooks. They are 4 in total, each one with there own "responsibilities".Setup hookThe setup hook (setup_hook) is the first one to be called, right afterpygameis initiated. It's intended to do all sort of "variable initialization".
It'scalled only once.Init hookThe init hook (init_hook) is the second one to be called. It's intended to do all sort of pre-loop logic,
such as, initializing certain classes, doing a flow-check (should the program run like this or like that), etc. As with the setup hook, it'scalled only once.Loop hookThe loop hook (loop_hook) is the third and main hook. It's where all of your main program logic should happen, things like: drawing to the canvas, collision check, etc. It's called atevery frame, right after filling the main canvas with the "BACKGROUND_COLOR" and before calling "pygame.display.update()".Handle events hookThe handle events hook (handle_events_hook) is the fourth and last hook. It's also the only hook that receives an argument, the event itself. It's called atevery frame. The event (argument) is one element of the list returned by "pygame.event.get()". Keep in mind that some events are "handled" by default. They are:pygame.QUITpygame.KEYDOWNpygame.K_ESCAPEpygame.K_F11pygame.VIDEORESIZEAuthorJoão Pedro Braz, São Paulo - Brazil.Email:brazjoaopedro@ymail.comLinkedin:João Pedro BrazGithub:Repositories
Package: basecfg
basecfgbasecfgis a Python library designed to simplify and standardize the process of configuring a Python application, particularly a Dockerized application.Users of this library create a class which inherits frombasecfg.BaseCfg. For each configuration option an app should support, a type-annotated class attribute is defined using a call toopt.Once a config class is instantiated it automatically populates the configuration from these sources:default values declared in the configuration classa JSON config file (such as aKubernetes ConfigMap)a.envfile (indocker runenvfile format)environment variablesdocker secretscommand-line argumentsExampleThis file is an excerpt froma more extensive exampleimplementation of the library:#!/usr/bin/env python3fromtypingimportOptionalfrombasecfgimportBaseCfg,optclassExampleAppConf(BaseCfg):server_username:str=opt(default="demoperson",doc="The username to use on the server",)server_password:Optional[str]=opt(default=None,doc="The password to use on the server",redact=True,)verbose:bool=opt(default=False,doc="whether to log verbosely",)batch_size:Optional[int]=opt(default=None,doc="how many objects to transfer at a time",)