Saravanan666/pypi-org huggingface dataset:
Package: simplegoogleapi
Simple Google APIPython package simple Google API for non-technical usersHow to installInstall with PipInstall new package.pip install simplegoogleapiUpgrade to the latest version.pip install simplegoogleapi --upgradeInstall with GitHubInstall new package.pip install git+https://github.com/tranngocminhhieu/simple-googl-eapi.gitUpgrade to the latest version.pip install git+https://github.com/tranngocminhhieu/simple-google-api.git --upgradeHow to use SimpleDriveImport packagesfromsimplegoogleapi.driveimportSimpleDrivefromsimplegoogleapi.authimportBuildAuthBuild authBuild auth with a service accountgauth=BuildAuth(service_account='service_account.json').build_gauth_from_service_account()Build auth with client secrets and credentialsgauth=BuildAuth(client_secrets_file='client_secrets.json',credentials_file='credentials.json').build_gauth_from_client_secrets()Build auth automation anywaygauth=BuildAuth().build_gauth_auto_anyway(client_secrets_file='client_secrets.json',credentials_file='credentials.json',credentials_raw='https://rentry.co/example/raw',service_account_json='service_account.json')Use functionsmy_drive=SimpleDrive(gauth=gauth)Upload a filemy_drive.upload_file(local_file='your-file-path',folder_id=None,rename=None)Create a foldermy_drive.create_folder(new_folder_name='New folder',parent_folder_id=None)Check usage limitmy_drive.check_usage()List filesfiles=my_drive.list_files(title_contains=None,owner_email=None)Delete a filemy_drive.delete_file(file_id='your-file-id')Move a filemy_drive.move_file(file_id='your-file-id',to_folder_id='your-folder-id')Copy a filemy_drive.copy_file(file_id='your-file-id',same_name=True,prefix=None,suffix=None,to_folder_id=None)Rename a filemy_drive.rename_file(file_id='your-file-id',new_name='A new name')Add a permissionmy_drive.add_permission(file_id='your-file-id',email='example@mail.com',role='reader')Delete a permission# With a permission IDmy_drive.delete_permission(file_id='your-file-id',permission_id='a-permission-id',email=None)# With an emailmy_drive.delete_permission(file_id='your-file-id',permission_id=None,email='example@mail.com')Transfer ownershipTransfer ownership with different organizationMethod: Copy the old file to a new file > Delete the old filefromsimplegoogleapi.drive.helpimporttransfer_owner_by_copygauth_from=BuildAuth(service_account='service_account.json').build_gauth_from_service_account()gauth_to=BuildAuth(client_secrets_file='client_secrets.json',credentials_file='credentials.json').build_gauth_from_client_secrets()transfer_owner_by_copy(gauth_from,gauth_to,file_id='your-file-id',same_name=True)
Package: simple-googletrans
A simple wrapper forgoogletransFeaturesdefault translate to Chinesefile or textauto split withnltkwhen characters exceed 5000Installationpipinstallsimple-googletransUsagefromsimple_googletransimportGoogleTranst=GoogleTrans()t.translate('hello world')t=GoogleTrans(url='translate.google.com',proxies={'https':'https://127.0.0.1:1080'},timeout=15)t.translate('hello world',dest='fr')Command Linegtranslate"hello world!"gtranslateREADME.md

gtranslateREADME.md-oREADME.cn.txt# list all languagesgtranslate-l# use a proxygtranslate--proxy181.211.145.46:8080README.md# other optionsgtranslate-dfrhelloworld
Package: simple-gpg
simple-gpgA simple Crossplatform Commandline Program Developed Using Python3 to make GNU Privacy Guard Program easy to use for beginners.Note: To use this program on windows please download and install gpg4win fromhttps://gpg4win.org/and for mac install gpgtools fromhttps://gpgtools.org/Quick InstallationTo Install fromPyPI:Run the following commands in Linux terminal / Windows powershell / command prompt to get Install:-pip install simple-gpgThen to get started simply type :-simple-gpgFeatures:-Hash Calculator: supports Sha3_256 and sha3_512 using hashlib rest all hash algorithms using gnupg.Individual File Encryption and Decryption using various symmetric ciphers supported by gnupg.Asymmetric Cryptography Manager to handle Asymmetric Cryptography using gnupg.Bulk Encryption of individual files ( Each file is individually encrypted ) using AES 256 or with a OPENPGP public key available under Asymmetric Cryptography Manager.Some enhancements were made , the number of iterations for hashing encryption keys were made higher for better security for symmetric file encryption and bulk encryption of individual files using aes256.NOTE: Like all other software this project may have bugs, though care has been taken to avoid bugs.This mini project was done during my college 1st year to learn basics of Python Programming.
Package: simple-gpt2
deepai-text-generationPython package for generating text using DeepAIThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.For more information, please refer tohttps://unlicense.org
Package: simpleGpyT
💬 SimpleGPyT 💬A simplified object-oriented interface for OpenAI's chat completion API.InstallationEnsure you have Python 3.10 or newer. Python 3.7.1 and up should work as well, but these are untested.To install the package, run:pipinstallsimpleGPyTTo use the package, import it at the top of the file.fromsimpleGPyTimportConversationUsageCreating a chatThis library relies on a valid OpenAI API key.
To create a chat, just call the constructor with your API key as theapi_keyparameter.chat=Conversation("sk-...")Chatting to your assistantYou converse with your assistant via thesay()method.chat=Conversation("sk-...")response=chat.say("hello")print(response)You can also see the last response you received from your assistant withlast_response().Here is an equivalent of the above code using thelast_responsemethodchat=Conversation("sk-...")chat.say("hello")print(chat.last_response())SettingsYou can add settings to your assistant by putting a list of settings as thesettingsargument in the constructor.s=["Keep answers concise","Speak like a pirate","Have opinions on topics"]chat=Conversation("sk-...",settings=s)Settings can also be removed, added and cleared after construction.s=["Keep answers concise","Speak like a pirate","Have opinions on topics"]chat=Conversation("sk-...",settings=s)print(chat.get_settings())chat.pop_setting()print(chat.get_settings())chat.clear_settings()print(chat.get_settings())Viewing and resetting your chatMessages can be viewed and reset during the chat, leaving settings intacts=["Keep answers concise","Speak like a pirate","Have opinions on topics"]chat=Conversation("sk-...",settings=s)chat.say("hello")chat.say("write me a poem")chat.clear_messages()print(chat.get_messages())print(chat.get_settings())The entire chat (settings included) can also be reset.s=["Keep answers concise","Speak like a pirate","Have opinions on topics"]chat=Conversation("sk-...",settings=s)chat.say("hello")chat.say("write me a poem")chat.reset()print(chat.get_messages())print(chat.get_settings())
Package: simple-graph
IntroductionThe simple-graph module contains basic functions for graph.ConceptA graph is a structure to hold a set of objects in which some pairs of the objects are connected.A graph contains two components:verticesandedges.We consider both directed and undirected edges in this project.
If the edges are undirected, the graph is called undirected graph, on the other hand, it is called directed graph.Licensesimple-graph is a free software. See the file LICENSE for the full text.Installpipinstallsimple-graphor updatepipinstall--upgradesimple-graphUsageBasic operationsfromsimple_graphimportGraphG=Graph()G.add_edge(1,2)print(G.has_edge(1,2))ouput:TrueG=Graph({0:[1,2],1:[2]})print(G.neighbors(0))output:[1,2]StatisticsG=Graph({"a":["c"],"b":["c","e","f"],"c":["a","b","d","e"],"d":["c"],"e":["b","c","f"],"f":["b","e"]})print(G.find_path('a','b'))print(G.diameter())output:['a','c','b']3CheckWikifor more details.Authors
Package: simple-graphql-client
Simple GraphQL ClientInstallationThe client is available on PyPI:$ pip install simple-graphql-clientExamplesExecuting a queryfromsimple_graphql_clientimportGraphQLClientheaders={'Authorization':'Bearer ...'}client=GraphQLClient("https://...",headers=headers)query="..."variables={...}data=client.query(query=query,variables=variables)Executing a query with a single fileNote: For information visit:https://github.com/jaydenseric/graphql-multipart-request-specfromsimple_graphql_clientimportGraphQLClientheaders={'Authorization':'Bearer ...'}client=GraphQLClient("https://...",headers=headers)query="..."filename="..."variables={...'file':None,...}withopen(filename,"rb")asfile:files=[('file',(filename,file))]response=client.query_with_files(query=query,variables=variables,files=files)Executing a query with a multiple filesfromsimple_graphql_clientimportGraphQLClientclient=GraphQLClient("https://...")query="..."filenames=["...","..."]files=[]variables={...'files':[None,None]...}fori,filenameinenumerate(filenames):variable='files.{}'.format(i)files.append((variable,(filename,open(filename,"rb"))))response=client.query_with_files(query=query,variables=variables,files=files)Setting a query-specific headerThis argument will override the default header which can be set in theGraphQLClientresponse=client.query(query=query,variables=variables,files=files,headers=headers)response=client.query_with_files(query=query,variables=variables,files=files,headers=headers)
Package: simple-grid-yaml-compiler
simple_grid_yaml_compilerGenerates the extended YAML output for an input site_level_configuration_fileSetup development EnvironmentYou'll need Python 2.7 or higher.Fork this repository and clone your fork in your development machine.Create a virtualenv with Python >= 2.7 and install all the required packages listed in the requirements.txt file.At the root of the directory, create a .temp folder.mkdir .tempCreate a site_level_configuration_file.yaml in the root directory. You can use the one available in thepuppet module.Execute the compiler using the following command template from the root directorypython simple_grid_yaml_compiler.py {PATH_TO_SITE_LEVEL_CONFIG_FILE} -o {PATH_TO_AUGMENTED_SITE_LEVEL_CONFIG_FILE}For instance,python simple_grid_yaml_compiler.py ./tests/resources/complete_config.yaml -o ./tests/output.yamlAfter running the compiler, the output would be generated at {PATH_TO_AUGMENTED_SITE_LEVEL_CONFIG_FILE}
Package: simplegui
Aboutsimplegui is a simplified GUI generator using Tkinter.PrerequisitesPythonhttp://www.python.orgInstallationUnzip the file, then at the command line runpython setup.py installUsage>>> import simplegui
>>> g = simplegui.GUI()
>>> def buttoncallback():
...     g.status("Button klicked!")
>>> g.button("Klick me!", buttoncallback)
>>> g.button("Klick me too!", buttoncallback)
>>> def listboxcallback(text):
...     g.status("listbox select: '{0}'".format(text))
>>> g.listbox(["one", "two", "three"], listboxcallback)
>>> g.listbox(["A", "B", "C"], listboxcallback)
>>> def scalecallback(text):
...     g.status("scale value: '{0}'".format(text))
>>> g.scale("Scale me!", scalecallback)
>>> g.run()
>>>DocumentationTo read the API documentation, open a shell / DOS window, navigate to
the simplegui directory, and runpydoc simpleguiYou can create a HTML version usingpydoc -w simpleguiLicensesimplegui is licensed under the GPL. See the file COPYING for details.AuthorFlorian Berger
Package: simple-guided-optics-letishnick
====================
Simple Guided OpticsA small collection of several classical methods for guided optics.General descriptionThe package written in Python during my PhD which I didn't achevie. The main benefit of the package is that it is written in an OOP logic. One can create and manipulate such classes as Waveguide and Simulation and deal with them in the abstraction of the calculation methods.The package contains the following features:The calculatiion of propagation constant, effective index, group velocity, GDD, D2 frequency depencences;Frequency dependent material parameters are supported as well as constant ones;Planar geometry is resolved analytically (Pollock Lipson);Slab geometry is resolved with the famework of a modified Marcatili method (Menon, 2002);Goell's method is supported as well;Putting the package on useThere are two main classes in the packageWaveguideandSimulation. By calling theWaveguideinstance, the waveguide can be created. Initially, it contains the following attributes:height, width in micrometers;substrate, core and cladding materials;in the case of a rectandular cross-section there will be only the cladding;TheSimulationclass contains the parameters which define the simulation itself. They are as follows:calculation units: wavelength, frequency and V-number;start, stop, step, points, span (any three of choice).After the simulation has been initialised, and before it has been run, the waveguide obtains the following properties:core, substrate, cladding permettivities and refractive indices.After the simulation is completed, the waveguide obtains another set of arguments:propagation constant (beta);effective index (neff);group index (ng);group delay dispersion (GDD);There parameters can be called as properties, or as methods pricising the calculation point::ng(wavelength=1.55)Features to come asapCoupled wave solutions for waveguide Bragg gratings: planar, slab, TE/TM modes propagation/radiation type;Several primitive devices such as rings (add-drop, all pass), modulators;Pulse propagation in linear media;InstallationInstalles via PyPI as
Package: simple-gui-prompts
simple-gui-promptEasily generate GUI prompts without the hassle of making a whole GUI. Handy for scripts when all you really want is a text box or list or something.Setuppip install simple-gui-promptsimport promptsPrompts supportedprompts.dialog(title, text, block=True): A simple popup box with a title and text that only has an OK button and returns None. If block=True (default), execution is blocked until the box is closed. If block=False, it returns immediately after creating the dialogprompts.confirm(title, text, **kwargs): A popup which offers for the user to either confirm (returning True) or deny (returning False), with a closed window returning False. A yes= kwarg can be used to change the text on the confirm button (which defaults to 'OK'), and the no= kwarg can be used to change the text on the deny button (which defaults to 'Cancel'). Additionally, yesno=True can be used to replace the confirm and deny defaults with 'Yes' and 'No' respectively, in which case yes= and no= will be ignored if present.prompts.text(title, text, **kwargs): A popup containing a text box, which returns a string representing the text that was put in, or None if the user cancelled. Allowed kwargs are:canCancel=True: Defines whether the user gets a cancel button. This button causes the function to return None regardless of what was entered.yes='OK': Text that appears on the OK buttonno='Cancel': Text that appears on the cancel buttonpassword=False: If True, hide the characters as they are entered.validate=None: Can be set to a callable which will be passed the user string as the first parameter, and should return True or Flase depending on whether the input is valid. If it is invalid, another identical prompt will be generated, and only the valid input will be returned. If None, the string will be returned unconditionallyprompts.choice(title, text, choices, **kwargs): A popup which displays multiple choices, permitting the user to choose one of the choices, and returning the string that was chosen. Allowed kwargs are canCancel and no, behaving identically to the equivalent kwargs on prompts.getText.prompts.choiceMulti(title, text, choices, **kwargs): This is identical to prompts.choice, except the user can choose multiple items, and the return value is a list of objects that were chosen. Therefore, it also permits the yes kwargVersioningWe useSemVerfor versioning. For the versions available, see thetags on this repository.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: simplehand
Simple HandI wanted a simple 3D hand model to visualize hand movements in python without the need for external models or software, so I built this.
It simply plots a wireframe hand in matplotlib and allows you to set the flexion of each finger.SimpleHand:SuperSimpleHand:Plot a hand:importmatplotlib.pyplotaspltfromsimplehandimportSimpleHandhand=SimpleHand()hand.set_flex(th=0,idx=0,mid=0.5,ri=0.4,pi=0.3)hand.draw()plt.show()Installation:pip install simplehand
Package: simplehdlc
python-simplehdlcA python implementation of the simplehdlc parser/encoder. More information about the packet structure can be found athttps://github.com/jeremyherbert/simplehdlc.Only python 3.6+ is supported.License is MIT.InstallingYou can install this package usingpip:pip install simplehdlcor by cloning this git repository and running:python setup.py installUsagefromsimplehdlcimportSimpleHDLC# note that encode is a class methodencoded=SimpleHDLC.encode(b'abcdefg')defsuccess_callback(payload:bytes):print("success:",payload)hdlc=SimpleHDLC(success_callback,max_len=1024)hdlc.parse(encoded)# will print "success: b'abcdefg'" via the callback
Package: simple-hdlc
simple-hdlcSimple HDLC ProtocolUsed for simple communication with devices. Framing of serial data.UsageUse with instance of In/Output with read and write methods (like pyserial).Blocking Read:fromsimple_hdlcimportHDLCimportserials=serial.serial_for_url('loop://',timeout=1)# or# s = serial.Serial('/dev/tty0')h=HDLC(s)h.sendFrame(b"hello")printh.readFrame()# BlockingReader Thread with callback:fromsimple_hdlcimportHDLCimportserials=serial.serial_for_url('loop://',timeout=1)h=HDLC(s)# or# s = serial.Serial('/dev/tty0')defframe_callback(data):print(data)h.startReader(onFrame=frame_callback)h.sendFrame(b"hello")
Package: simple-health-checks-django-views
Django Views Plugin for Simple Health ChecksProvides 2 views that can be added to a django projects urlsSimply add the following to your urls file in your django project:fromsimple_health_checks.urlsimportHEALTH_CHECK,PINGurlpatterns=[...HEALTH_CHECK,PING,]Alternatively you can use the following but the middleware skip will not be active unless your
ping url matchesHEALTH_CHECKS_PING_PATH:fromsimple_health_checks.views.viewsimportHealthCheck,pingurlpatterns=[...url(r'^health/',HealthCheck.as_view(),name="health"),url(r'^ping/',ping,name="ping"),]To ensure that we skip middleware you MUST add"simple_health_checks.middleware.SkipMiddlewarePing"to
thetopofMIDDLEWAREin your django settings file.Required environment variablesHEALTH_CHECKS_CRITICAL_ON_PING- used for resources that may hang when down but prevent the service from functioning.
This can be used to force a proxy that monitors this endpoint to display a service down error and prevent
future requests until it recovers. Comma separated resource names, matching the filename that defines the resource.HEALTH_CHECKS_TOKEN- token used to gain access to more detailed information from the health endpointHEALTH_CHECKS_PING_PATH(Optional) - can be used to define a the ping uri if you wish to
usefrom simple_health_checks.urls import HEALTH_CHECK, PINGwith a custom pathHEALTH_CHECKS_HEALTH_PATH(Optional) - can be used to define the health uri if you wish to usefrom simple_health_checks.urls import HEALTH_CHECK, PINGwith a custom pathPING_PATHis also used to ensure that when the ping endpoint is used we skip any django middleware that may
try to communicate with a resource that may hang and cause an issue for the ping endpoint responding.
Package: simple-heartbeat
Simple heartbeat libraryThis is designed to work with thesimple heartbeat appto send heartbeat status
notifications to the server, and ignore errors and such.UsageGet a copy of thesimple heartbeat library from pypi.Spin up a copy of the heartbeat server, and then setheartbeat.heartbeat_app_urlto the URL of
your heartbeat server.Optional: Callheartbeat.initialise_app(app_name, expiry_period)to initialise your app in the heartbeat server.This is mostly useful for initialising an expiry period for the app. If it fails to contact the heartbeat server, it will propogate the exception up.Periodically callheartbeat.update_heartbeat(app_name)to confirm your application is online.
Package: simple-helpers
This is a collection of helper functions that I frequently use and hope that others
will also find useful.Currently there is only one fuction inside that is to track the progress of a
parallelized function given an iterable of arguments.To use:>>> import simple_helpers
>>> def my_func(args):
...         """ an arbitrary function """
...         arg1_int, arg2_int = args
...         return arg1_int + arg2_int
>>> arguments = [[i, i ** 2] for i in range(10)] # an arbitrary list of arguments
>>> print(results = simple_helpers.parallel_progress(my_func, arguments))
Package: simple-homepage
simple-homepagesimple-homepageis a command line utility that helps you create a simple static homepage for your browser. The documentation can be foundhere.Light (Link to demo)Dark (Link to demo)Quick startTo get started, first install the package:pip install simple-homepageThen, navigate to a directory in which you want to create your homepage, and runhomepage initor, for the dark version of the homepage:homepage init --darkThen, modifysettings.yamlto your liking, and runhomepage buildYour custom homepage is now available underpublic/homepage.html.AcknowledgementsInspiration for this project comes fromthispost on Reddit by/u/akauro.Repository initiated withfpgmaas/cookiecutter-poetry.