Saravanan666/pypi-org huggingface dataset:
Package: user-tools
user_toolsSome personally used modules.Some modules may be other people's source code, because this tool is mainly convenient for personal use, so there is no processing.
If you think it is infringing, please contact me by email or GitHub to delete.
If I know the source of the code, I will explain it.installpip install user_toolsmodule descriptionutil_check.py: Some checks on files or directories.util_cmd.py: Some functions related to command execution.util_file.py: Some functions related to file operations.util_hashlib.py: Some functions related to hash operations.util_img.py: Some functions related to image operations.util_json.py: Some functions related to json file operations.util_random.py: Custom random function.util_str.py: Custom str function.util_time.py: Some functions related to json time operations.util_ua.py: Some functions related to useragent.changelog2020/03/09 : Initial completion of script writing.2020/04/15 ：Update the docstring to add a description of the parameters. util_check.is_not_null() method adds monitoring of the directory. The util_check.check_url() method was added, but the git address detection is not yet complete because it is not familiar with the regularity.2020/04/18 : Fix some bug.2020/07/18 : Added typing for each file, added util_mysql.py and pyzabbix.py.2021/02/17 : Removed some file, added util_str.py and changed some file.2021/02/25 : Fix the bug in util_str.format_str().2021/07/12 : Added util_log, Fix the bug in util_check.check_arg().2021/08/23 : Added some code in util_check.check_arg().2021/12/16 : Change all code.
Package: user-util
Open edX User UtilitiesUser utilities for the Open edX platformFree software: GNU General Public License v3Documentation:https://user-util.readthedocs.io.FeaturesGenerate one-way hashed usernames/email addresses for user retirement purposes.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.3.1 (2020-09-16)Fix versioning mistake0.3 (2020-09-16)Implement retire_external_key functionality to retire external_user_keys for program enrollments0.2 (2020-05-02)Drop support to python 2.7 and add support to python 3.80.1.5 (2018-08-08)normalize username before hashing (PLAT-2287)0.1.4 (2018-07-23)normalize email address before hashing (PLAT-2254)0.1.1 (2018-03-29)CLI script to run retirement conversion from cmd-line.Expanded CLI testing.Auto PyPI upload via Travis.0.1.0 (2018-03-21)First release on PyPI.
Package: userv
The catchThe first start for every webserver is routing and parsing html.
This is the core.RoutingRouter objects are simple and are input to the server instances.
Example:from userv.routing import Router, text_response

router = Router()

def test(request):
    return text_response("some text")

router.add("/resturl", test, method="GET")you can get function test again with:router.get('/resturl', method="GET")for creating swagger and so on there is a also a list command:router.list()With these routes in one place we have full control even without
an server instance.Response typesThere are a few build in response types text, json and static files.The general gist of the response functions is to create a generator
which will be used to consumed by your server.if you want to have full control about your memory flow or need to write a few
memory hungry responses feel free to write an response yourself.Little hint make sure to use the response_header function and end the response with
an “\r\n”.Serve static filesIt is pretty simple just add the address with the file you want to serve.Example:from userv.routing import static_file

router.add("/index", static_file('boot.py'))Although the example should never expose your code. It is a pretty simple and fast test.Swagger your apiswagger.io is the a good way to document your api. This section is a quick way to serve an swagger.json
from your server. To view the api you can embed a swagger_index.html with cdnÂ´s.Example for description:# Get requests have a parameter description
@swagger.info("My_funny summary")
@swagger.parameter('myvarname', description="", example='sdfs', required=True)
@swagger.response(200, 'smth is off')
def myrest_func(request):
    raise


# Post request needs a body description
@swagger.info("My_funny summary")
@swagger.body('weatherinfo', {'tada': "examplevar",
                              "tada2": 2})
@swagger.response(200, 'smth is off')
def post_myrest_func(request):
    raise

router.add("/resturl", myrest_func, method="GET")
router.add("/resturl", post_myrest_func, method="POST")Example to serve swagger.json:from userv.swagger import swagger_file, swagger_index
router.add("/rest/swagger.json", swagger_file('my swagger api', "api title", router_instance=router))

router.add("/rest/index.html, swagger_index(host="127.0.0.1", swagger_json_url="rest/swagger.json")the example shows we add the router_instance and therefore all routes registered to that point.
meaning if you want all routes in your swagger add the swagger_file shortly before running.Now all you need to do is set proper host adresses and call up the index url in one or your browsers.
Because this is IoT always have in mind qr-codes and other links are easy to create and glue on your device.Further packages & webserverAtm there is an implementation for an socketserver which runs even on on esp8266:pip install userv.socket_serverAnd an async server with an exchangable interface.:pip install userv.async_server
Package: userv.async-server
The catchSimple async webserverWebserverFirst we need to add routes to a router. After this we can add a task to the
async loop with:Example:from userv.routing import Router
from userv.async_server import run_server
router = Router()

run_server(router)Now we have added the current app to the event loop and we still have
to run the event loop.Example:from uasyncio import get_event_loop
loop = get_event_loop()
loop.run_forever()Now the server will run and serve your data.
Package: uservice
μServiceA async microservice framework for Python. Inspired byFastAPIandNameko.
It uses theuvloopevent loop instead of the default python asyncio loop.RequirementsPython 3.10+QuickstartInstalling usingpip:$pipinstalluserviceCreate a serviceexample.py:fromuserviceimportServiceservice=Service(name='example')@service.event_handler('source','event')defhandle_event(payload):print(payload)Run the service:$uservicerunexample:serviceUsageCommand linerun$uservicerun--help
Usage:uservicerun[OPTIONS]SERVICE

Options:--reloadEnableauto-reload.--workersINTEGERNumberofworkerprocesses.Notvalidwith--reload[default:1]--helpShowthismessageandexit.Events (Pub-Sub)At the moment onlyamqpis supported for events.SubscribeEvent handlers inuservicerequire that the kwargpayloadis in the function that handles it.
Event handlers inuservicesupport runtime typechecking usingpydantic, example:fromuserviceimportServicefrompydanticimportBaseModelservice=Service(name='service')classPayload(BaseModel):foo:intbar:int@service.event_handler('source','event')defhandle_event(payload:Payload):print(payload)If an event is sent to thisevent_handlernot matching thePayloadschema it will raise aValidationError.PublishEvent publishing inuserviceis handled as a dependency injection. It aslo supports validation of payloads usingpydantic, example:fromuserviceimportService,EventPublisher,DependsfromtypingimportAnnotatedfrompydanticimportBaseModelclassPayload(BaseModel):foo:intbar:strpublisher=EventPublisher(publish_model=Payload)service=Service(name="service")@service.event_handler("source","event")defhandle(payload:Payload,publish:Annotated[Callable,Depends(publisher)],):publish("event",payload)RPCAt the moment rpcs only supportamqp. Rpcs inuservicesupports validation of reponses usingpydantic.fromuserviceimportServicefrompydanticimportBaseModelclassResponse(BaseModel):foo:intbar:strservice=Service(name="service")@service.rpc(response_model=Response)defmethod(x:int,b:int):return{'foo':x,'bar':y,}Example of calling a rpc from another service. When calling a rpc only support kwargs.fromuserviceimportService,RpcProxy,ServiceProxy,DependsfromtypingimportAnnotatedfrompydanticimportBaseModelcaller=Service(name="caller")@service.rpc()defcall(service:Annotated[ServiceProxy,Depends(RpcProxy)]):print(service.method(x=2,y=3))Dependency Injectionuserviceuses a dependency injection system which is heavily inspired byFastAPI.Example dependecy:fromuserviceimportService,DependsfromtypingimportAnnotatedfrompydanticimportBaseModel,BaseSettingsclassPayload(BaseModel):foo:intbar:strservice=Service(name="service")classSettings(BaseSettings):version:str="1.0.0"defget_settings():returnSettings()@service.event_handler("source","event")defhandle(payload:Payload,settings:Annotated[Settings,Depends(get_settings)],):print(settings.version,payload)
Package: uservice-logging
This python library provides logging utilities we use when building
micro-services.Hacking Notes:To hack on the library, create a python3 virtual environment with the
development dependencies getting the project pip-cache:$ make bootstrappossibly:$ . env/bin/activateTo run the tests:$ make testDependencies:setup.py does not list any install-time dependencies, and users of
this library must ensure they have the required dependencies
configured.
Package: uservice-utils
This python library provides common utuilities we use when building
micro-services.Hacking Notes:This library is designed to contain useful components for building micro-services.
We aim to guarantee backwards compatibility. All code in this library must:…be tested to a reasonable degree.…be genericly useful to several services.To hack on the library, create a python3 virtual environment:$ virtualenv -p python3 ve
$ . ve/bin/activateTo run the tests:$ pip install -r test_requirements.txt
$ python setup.py testDependencies:This library contains many different parts, and we don’t want to force users to
install all the dependencies for all the parts in order to use any one piece.
For that reason, setup.py does not list any install-time dependencies, and users
of this library must ensure they have the required dependencies configured.
Package: user-voting-rocks
User Voting RocksUse your personal talk voting for PyConDE 2019 to predict your interest in a talk.InstallationIn order to install the released version, use pip install:pip install user_voting_rocksIn order to work with the current master, clone this respository, create + activate a virtual environment and then use pip install like this:pip install -e .UsageVote for talks you are interested in using the PyConDE 2019 community voting link you have received.
Then reload the page (using your secret link) and save asPyconVoting.htmlusing your browser’sSave Asdialog.To receive recommendations, please tryuser_voting_rocks recommend -i ./Pycon\ Voting.htmlThis command will output the list of talks (that you have not yet voted on) bydecreasingorder of your predicted preference.Full command line interface:Usage: user_voting_rocks [OPTIONS] COMMAND [ARGS]...

Commandline interface for user_voting_rocks.

Options:
--help  Show this message and exit.

Commands:
evaluate   Evaluate the talk voting classifier.
parse      Parse talk voting html file.
predict    Predict your interest in a single or multiple talks.
recommend  Parse html, train model and predict unvoted talks.
train      Train a model user your talk voting.Free software: MIT licenseDocumentation:https://user-voting-rocks.readthedocs.io.FeaturesParse PyConDE 2019 community voting HTML page to JSONTrain a Naive Bayes classifier on word frequencies of abstractsCustom stop word listPredict interest in a talk using the trained Naive Bayes classifierCLI for parsing, training and predicting with persistence for parsed content and modelCreditsMain author and project maintainer isluphord.This package was prepared withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.3.2 (2019-07-02)Use print instead of click.echo to circumvent encoding issues on Windows0.3.1 (2019-07-02)Fix encoding issue0.3.0 (2019-07-02)Refactor module structure0.2.0 (2019-07-01)recommendsubcommand to perform parsing, training and prediction in a single stepevaluatesubcommand to perform cross validationBasic usage documentation0.1.0 (2019-06-28)First release on PyPI.
Package: userv.socket-server
The catchMost simplistic socket server for micropythonWebserverfirst we need to add routes to a router. This is described in userv.core
although serving static files is described below.Example:from userv.routing import Router
from userv.socket_server import run_server
router = Router()
# we add some routes

run_server(router)this way the server starts and runs forever.
Because sometimes you want to start a standby mode there is way to kill the run task
by given a callback which controls the loop.
We call it the timeout callback for now. Basicly the server runs as
long as the function returns True.Example:def we_never_timeout():
    return True

run_server(router, timeout_callback=we_never_timeout)This is only a realy simple and silly example, but be aware to not do heavy lifting in this function,
because it will hinder your server to react normal.
Package: userwatch-python
Upollo Python ClientTheUpolloPython library can be used identify users before they login or if they visit from multiple devices.The Python library runs on your server and can be paired with the web or mobile to protect logins or payments.Get your API KeysSign up for our beta atupollo.ai/betato get your Private API key.Getting startedImport the package and create a client with your api key.fromuserwatchimportuserwatchprivateApiKey="ADD_PRIVATE_API_KEY_HERE"userwatchClient=userwatch.Userwatch(privateApiKey)Validate a UserTo validate a user you need a token from the javascript library. See theUpollo Javascript Client Guidefor how to get the token.You also need a userId and possibly their email address or phone number, whichever is available to improve detection. You can use an email address as the id if you don't have another id.fromuserwatchimportuserwatchfromuserwatchimportuserwatch_public_pb2userwatchToken="GET FROM THE WEB CLIENT"userInfo=userwatch_public_pb2.UserInfo(user_id="u_1234",# provide your user id if you have it.user_name="foo",# provide user name if you have it.user_email="foo@bar.com",# provide the email address if you have it.user_phone="+6100000000",# provide the phone number if you have it)eventType=userwatch_public_pb2.EVENT_TYPE_LOGINanalysis=userwatchClient.verify(userwatchToken,userInfo)flagTypes=list(map(lambdaf:f.type,analysis.flags))isAccountSharing=userwatch_public_pb2.ACCOUNT_SHARINGinflagTypesisRepeatedTrial=userwatch_public_pb2.REPEATED_SIGNUPinflagTypesifisAccountSharing:print("user is account sharing")ifisRepeatedTrial:print("user is repeating trial")
Package: useTwitter
## useTwitteruseTwittera class for using Twitter easily in order to help create bots for the social network.## useTwitter Methods__init__(auth_token, publicId)- Receives theauth_tokencookie and the user’s publicID, both in string.search(searchText, count=20)- Method responsible for doing research on Twitter. It receives a string to be searched and an optional parametercountthat sets the number of return tweets (Default is 20).homeTweet(text)- Method responsible for tweeting something on your profile. It receives a string which is the text in which it will be tweeted.commentTweet(tweetId, text)- Method responsible to comment some tweet. It receives a string(tweetId)that would be the post’s identification ID and the text in which it will be commented.likeTweet(tweetId)- Method responsible for favoring some tweet. It receives a string(tweetId)that would be the post’s identification ID.getNotif(count=20)- Method responsible for returning your last notifications, you can set the return amount with thecountparameter.retweet(tweetId)- Method responsible for retweeting any tweet. It receives a string(tweetId)that would be the post’s identification ID.destroyTweet(tweetId)- Method responsible for deleting some tweet. It receives a string(tweetId)that would be the post’s identification ID.## useTwitter BOT MethodsaddFuntion(func)- It receives a function that is included in a list of functions that will be performed by the bot.bot()- Performs all functions in the bot’s function liststart(timer)- The looping of executions of the functions that are in the list of functions begins. The timer parameter sets the time interval that thebot ()function will be executed (Default is 15 seconds).
Package: usexif
Geographic Coordinate(longitude, latitude, and altitude) from raw EXIF
dataInstallpip install usexifExampleimport usexif
ret = usexif.fromfile('image/path/here.jpg')

ret['longitude']
# 126.16250277777779

ret['latitude']
# 34.36355833333334

ret['altitude']
# 3.0

ret['taken_date']
# datetime.datetime(2016, 4, 18, 10, 41, 6)Dependenciesexif-py
Package: us-federal-treasury-python-api
United States Federal Treasury APITable of ContentsOverviewSetupUsageSupport These ProjectsOverviewVersion:0.1.0The U.S. Department of the Treasury is building a suite of open-source tools to deliver
standardized information about federal finances to the public. We are working to centralize
publicly available financial data, and this website will include datasets from the Fiscal
Service on topics including debt, revenue, spending, interest rates, and savings bonds.Our API is based on Representational State Transfer, otherwise known as a RESTful API.
Our API accepts GET requests, returns JSON responses, and uses standard HTTP response
codes. Each endpoint on this site is accessible through unique URLs that respond with
data values and metadata from a single database table.SetupSetup - Requirements Install:For this particular project, you only need to install the dependencies, to use the project. The dependencies
are listed in therequirements.txtfile and can be installed by running the following command:pip install -r requirements.txtAfter running that command, the dependencies should be installed.Setup - Local Install:If you are planning to make modifications to this project or you would like to access it
before it has been indexed onPyPi. I would recommend you either install this project
ineditablemode or do alocal install. For those of you, who want to make modifications
to this project. I would recommend you install the library ineditablemode.If you want to install the library ineditablemode, make sure to run thesetup.pyfile, so you can install any dependencies you may need. To run thesetup.pyfile,
run the following command in your terminal.pip install -e .If you don't plan to make any modifications to the project but still want to use it across
your different projects, then do a local install.pip install .This will install all the dependencies listed in thesetup.pyfile. Once done
you can use the library wherever you want.Setup - PyPi Install:Toinstallthe library, run the following command from the terminal.pip install us-federal-treasury-python-apiSetup - PyPi Upgrade:Toupgradethe library, run the following command from the terminal.pip install --upgrade us-federal-treasury-python-apiUsageHere is a simple example of using thetreasurylibrary.frompprintimportpprintfromtreasury.clientimportFederalTreasuryClient# Initialize the client.treasury_client=FederalTreasuryClient()# Initialize the `DailyTreasuryStatements` service.daily_treasury_service=treasury_client.daily_treasury_statements()# Grab Public Debt Transactions.pprint(daily_treasury_service.public_debt_transactions())# Grab Adjusted Public Debt Transactions.pprint(daily_treasury_service.adjusted_public_debt_transactions())Support These ProjectsPatreon:Help support this project and future projects by donating to myPatreon Page. I'm
always looking to add more content for individuals like yourself, unfortuantely some of the APIs I would require me to
pay monthly fees.YouTube:If you'd like to watch more of my content, feel free to visit my YouTube channelSigma Coding.
Package: usfm2osis
Python scripts for converting USFM to OSIS XMLUsage: usfm2osis.py <osisWork> [OPTION] ...  <USFM filename|wildcard> ...')
  -d               debug mode (single-threaded, verbose output)
  -e ENCODING      input encoding override (default is to read the USFM file's
                     \ide value or assume UTF-8 encoding in its absence)
  -h, --help       print this usage information
  -o FILENAME      output filename (default is: <osisWork>.osis.xml)
  -r               enable relaxed markup processing (for non-standard USFM)
  -s mode          set book sorting mode: natural (default), alpha, canonical,
                     usfm, random, none
  -v               verbose feedback
  -x               disable XML validation

As an example, if you want to generate the osisWork <Bible.KJV> and your USFM
  are located in the ./KJV folder, enter:
    python usfm2osis.py Bible.KJV ./KJV/*.usfm
Package: usfutils
UsfUtilsEnglish |简体中文This is an open-source universal toolkit namedUseful UtilitiesforDeep Learning,Machine Learning, and
other Python projects.🚩FeaturesAiming to provide frequently-used functions mainly aboutlog management,configuration management, andfile/directory management.To help researchers and engineers avoid wasteful duplication of effort.Rely solely on native Python / Pytorch and does not depend on any other third-party package.🚀What's New?2023.11.29 Add object-load module; Release version 2.0.02023.11.28 Add data type UsfDict and integrate it with UsfConfig; Release version 1.0.02023.11.27 Add statistical modules, such as statistical model parameters2023.11.17 Add basic log management functions: initialize logger and manage multi-process logs2023.11.16 Add basic directory management functions: create, rename, and scan2023.11.16 Initialization💻How to Install?Environmental requirements: Python 3.xIt is suggested to install it via the following command:pipinstallusfutilsOr installing through source code:gitclonehttps://github.com/chenaoxuan/UsfUtils.gitcdUsfUtils
pipinstall.ReferenceSome modules of this project refer to the following repos:BasicSRomegaconfPytorch Lightningeasydict
Package: usgs-api
NoteThis version removes pandas as a hard dependency, but the functionality is still available.A wrapper around the USGS Water Information System JSON API that provides native Python access.Documentation is available at Read the Docs (https://usgs-api.readthedocs.org/en/latest). The code and documentation are licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.Please note that the module name is usgs, not usgs-api for importing.If you would like to use the functionality to return pandas objects, you must installpandasseparately as it is not a hard dependency (the module will load and run without that functionality and will raise an error if you attempt to use it. Windows users may need to installpandasseparately via the binary installer. Pandas, in turn, requires numpy, which may also need to be installed using the binary installer if you do not already have it installed.