Saravanan666/pypi-org huggingface dataset:
Package: simple-chatbot-lib
Chatbot Context ServiceThis project consists of a set of classes that represent a chatbot and various context services. The chatbot uses a language learning model to interact with users and retrieve context for their questions. The context services provide different methods for retrieving context, such as through an API or from Azure.ClassesChatbotTheChatbotclass represents a chatbot. It has methods to initiate a chat with an AI, retrieve the context for a given question, create system and human prompt messages, and retrieve the base messages and tuple messages.ContextServiceTheContextServiceclass is an abstract base class for context services. It provides a constructor and an abstract method for retrieving context.APIContextServiceTheAPIContextServiceclass extendsContextServiceand provides a constructor and a method for retrieving context from an API.AzureRAGContextServiceTheAzureRAGContextServiceclass extendsRAGContextServiceand provides a constructor and a method for retrieving context from Azure Cognitive Search.UsageTo use these classes, you need to create instances of them and call their methods. For example, to create a chatbot and initiate a chat, you can do:fromchatbot_lib.chatbots.modelsimportChatbotfromchatbot_lib.mappers.messagesimportMessageMapperfromchatbot_lib.services.modelsimportAPIContextServicefromlangchain_openaiimportChatOpenAIllm=ChatOpenAI(openai_api_key='...')azure_rag_context=AzureRAGContextService(azure_key='...',endpoint='...',index_name='...')message_mapper=MessageMapper()chatbot=Chatbot(llm=llm,context_services=[azure_rag_context],restrictions=['Do not answer questions that deviate from the informed context'],personality='Friendly, helpful, and respectful',language='English',base_messages=None,message_mapper=message_mapper)response=chatbot('What are your business hours?')print(response)RequirementsThis project requires Python 3.11 or later. Several of the features are built on top of the LangChain 0.1.0 library.LicenseThis project is licensed under the terms of the GNU General Public License v3.0. See theLICENSEfile for details.
Package: simplechatgpt
Simple ChatGPTAn extremely simple programmatic interface to ChatGPT. The conversation
automatically gets truncated (from the oldest message) if the token limit is
reached.The goal of this project is to remove the need for boilerplate code to create
a chat bot in your program, allowing you to jump right into integrating
ChatGPT into whatever you are making.You can use this package like:from simplechatgpt import Chat

import os

chat = Chat(os.environ["OPENAI_API_KEY"])

while True:
    prompt = input("You: ")
    print("Bot:", chat.send(prompt))You can choose a model when initializing yourChatobject like:chat = Chat(os.environ["OPENAI_API_KEY"], model="gpt-4")As of the time of this writing (07/08/2023), the following models are available
for use:gpt-4gpt-4-32kgpt-3.5-turbogpt-3.5-turbo-16kSeehttps://platform.openai.com/docs/models/overviewfor a full list of
available models.You can also customize the "system" message to initialize the chat bot to
act in a certain way throughout the conversation. For example,key = os.environ["OPENAI_API_KEY"]
chat = Chat(key, chatbot_description="You are Hucklyberry Finn.")

while True:
    prompt = input("You: ")
    print("Bot:", chat.send(prompt))Would produce responses like:You: Hey son, how are you?
Bot: Well, I reckon I'm doin' alright Pa. How 'bout yourself?
Package: simple-chatgpt-cli
Simple-ChatGPT-CLII believe many others have implemented more sophisticated ChatGPT CLI tools. But this is a super simple one without fancy features that I created with Python for my use case.
My motivation was that using OpenAI API could be much cheaper than subscribing to ChatGPT Plus, and is claimed to be more privacy friendly by some legal experts.I'm not planning to add fancy features unless I start to feel some feature would be a big plus to my productivity in my use case. But everyone is welcome to use this basic version or fork it to add their features.Installationpipinstallsimple-chatgpt-cliUsageYou can run the program withchatgptYou must either set/save the key following the CLI prompts (recommended) or set an environment variableOPENAI_API_KEY.TipsUse#multilineto enter multiline mode. This is useful when you want to enter messages with line breaks.Use#startoverto start a new conversation whenever you switch to a new topic and the bot doesn't need the previous context anymore. This helps reduce your OpenAI bill. The program will remind you of this if you come back to an idle conversation after more than 5 minutes.DevelopmentThis project was initialized by myPython project boilerplate. So you will need all the prerequisites of that project.
Package: simple-chatwoot
Simple ChatwootSimple-Chatwoot is a Python library for connecting to Chatwoot REST API.Usageimportosfromdotenvimportload_dotenvfromsimple_chatwootimportChatWootload_dotenv()DOMAIN=os.getenv("DOMAIN")#https://chatwoot.example.comAPI_ACCESS_TOKEN=os.getenv("API_ACCESS_TOKEN")#rkoo0op2PPsihsv8JW3IjfiFACCOUNT_ID=os.getenv("ACCOUNT_ID")#1INBOX_ID=os.getenv("INBOX_ID")#1chatwoot_client=ChatWoot(DOMAIN,API_ACCESS_TOKEN,ACCOUNT_ID,INBOX_ID)contacts=chatwoot_client.search_contacts("henrique")print(contacts)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: simplecheck
name="simplecheck",
version="0.0.4",
author="Yicas-3111",
author_email="2556152782@qq.com",
description="A python program to check all data in a program more easily",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Yicas-3111/Ez_Check",
packages=setuptools.find_packages(),"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
Package: simple-cicd
Simple-CI - Dead simple CI/CD pipeline executor.Simple-CI is a CI/CD pipeline executor similar to gitlab CI/CD but in local.
It's triggered by a git hook after a commit and executes directives given by user in a simple script named .simple-ci.yml, placed at the root of the directory.
The artifacts (logs, compiled binairies, etc) are stored in a folder at the same level that the project folder named -simple-ci.Why simple-CI?Automation pipelines like GitLab CI/CD are great tools for improving software development.
However, the syntax can be tidious and the user relies completely on gitlab and it's runners (even though you can create your own runners).
Furthermore, installing tools like gitlab or jenkins locally consumes a lot of resources and requires having them running in the background.Simple-CI/CD solves these issues by providing a dead simple way for the user to run a CI/CD pipeline:Start simple-ci in your repository.Build your pipeline in the .simple-ci.yml file.Commit a change with git and let the pipeline execute itself.Profit!Check theWikifor more in-depth documentation.Commandssimpleci start: Create the git hook.simpleci stop: Delete git hook (The pipeline will not be executed).simpleci init: Create the git hook and the .simple-ci.yml file.simpleci exec: Executes the pipeline.simpleci clean: Remove all artifacts files.Simple example of .simple-ci.yml scriptvariables:GLOBAL_VAR:"last"stages:-stage1-stage2stage1:variables:MYVAR:"second"jobs:-job1-job2stage2:inside_docker:image:ruby:2.7path:/tmp/jobs:-job3job1:variables:fie_name:"new_file"artifacts:paths:-new_filescript:-echo "This is the first job."-touch $file_namejob2:inside_docker:image:ubuntupath:/script:-echo "This is the $MYVAR job."job3:script:-echo "This is the $GLOBAL_VAR job, that will be executed after stage1 is completed."You will find the complete syntax documentation on theWikiInstallationSimple-CI is packaged in pypi.org under the name "simple-cicd" and can be installed with pip.pipinstallsimple-cicd# orpython3-mpipinstallsimple-cicdDependenciesbashgityaml(python module)ContributingFeel free to submit issues is you want to contribute.RoadmapGitlab CI/CD pipelineGood code quality:Restructure codeRewrite functionsRethink file system:run artifacts and log inside .simple-ci/Config file (cmd interpreter, docker, etc...)New keywords:cache (make files or variables accessible between jobs) (0.1.0)only-if (test the condition. if true -> run the job)never-if (test the condition. if true -> don't run the job)hooks (pre-commit, post-commit, pre-push...)secrets (store variables without displaying them)
Package: simpleci-nfarrokhian
simpleciconcentration curve generator and concentration index calculatorFree software: MIT licenseDocumentation:https://simpleci.readthedocs.io.Featuresgenerates concentration curves from ordered data setscaluculates concentration indices (ACI and RCI)CreditsThis package was created withCookiecutterandaudreyr/cookiecutter-pypackage.History0.1.0 (2021-07-04)First release on PyPI.
Package: simplecipher
SimpleCipherA simple cipher.Installpython3 -m pip install simplecipherDependenciesIn terms of dependencies, there are no dependencies.UsageSupported ciphers:Caesar cipherVigenere cipherCustom cipherExample:fromsimplecipherimportsimplecipherasscmessage='Hello, World!'offset=10encrypted_message=sc.CaesarCipher.encrypt(message,offset=offset)decrypted_message=sc.CaesarCipher.decrypt(encrypted_message,offset=offset)key='vigenere_key'encrypted_message=sc.VigenereCipher.encrypt(message,key=key)decrypted_message=sc.VigenereCipher.decrypt(encrypted_message,key=key)cipher=sc.SimpleCipher()replacement='?'# replacement for unsupported charactersencrypted_message=cipher.encrypt(message,replacement=replacement)decrypted_message=cipher.decrypt(encrypted_message)
Package: simple-classproperty
Simple PythonclasspropertydecoratorThis module provides a simple way for defining class properties.InstallYou can install this Python module viapip:pipinstallsimple-classpropertyOtherwise the module can be downloaded from PyPI:https://pypi.org/project/simple-classproperty/UsageImport the module:fromsimple_classpropertyimportClasspropertyMeta,classpropertyCreate a class with a class property:classNewClass(metaclass=ClasspropertyMeta):_attr="val"@classpropertydefattr(cls):returncls._attrDon't forget to set themetaclass!(Optional)Define also a setter and deleter for the newly created class property (this works like the standard pythonproperty):@attr.setterdefattr(cls,value):cls._attr=value@attr.deleterdefattr(cls):delcls._attrTipsTheclasspropertyis also accessible from an instance:instance=NewClass()print(instance.attr)# "val"When the value of the property is changed from an instance object, the class property will be changed. All other instances will have this new value:instance1=NewClass()instance2=NewClass()instance1.attr="new"print(instance1.attr)# "new"print(instance2.attr)# "new"print(NewClass.attr)# "new"This behavior is the same when a property gets deleted from an instance.
Package: simple-cli-args
simple-cli-argsA python main method decorator.An enhancement of theargparsepackage for its simplest usages.Requires python 3.6 or higher.The ordinary arguments become positional, the arguments with default value become named argument for the CLI,
with a possibility of abbreviations, asargparseprovides it.Help option (-hor--help) is automatically generated with its text taken from the docstrings.InstallUsing pippip install simple_cli_argsor, with your intended python command in place ofpython3python3 -m pip install simple_cli_argsUsing setuptoolsSimply issue in the main directory of the cloned git repository:./setup.py installUsageAssume the content ofmy_cli.pyis:#!/usr/bin/env python3
from simple_cli_args import cli_args

@cli_args
def main(apple, banana, cucumber='green'):
    print("Our fruits are:", apple, banana, cucumber)

if __name__ == '__main__':
    main()  # without arguments given, those will be read from the CLIThen, we get the following printouts:$ ./my_cli.py red yellow
Our fruits are: red yellow green

$ ./my_cli.py red yellow --cucumber=purple
Our fruits are: red yellow purple

$ ./my_cli.py red yellow -c nice
Our fruits are: red yellow nice

$ ./my_cli.py red
usage: my_cli.py [-h] [--cucumber | -c  CUCUMBER] apple banana
my_cli.py: error: the following arguments are required: banana

$ ./my_cli.py --help
usage: my_cli.py [-h] [--cucumber | -c  CUCUMBER] apple banana

positional arguments:
  apple
  banana

optional arguments:
  -h, --help            show this help message and exit
  --cucumber | -c  CUCUMBER
                        default: greenDecorate a main classIf main functionality is built into a class, the decorator can be used for its contructor__init__method, as well as for the class itself, like in the example below.#!/usr/bin/env python3
from simple_cli_args import cli_args

@cli_args
class Main:
    def __init__(self, apple, banana, cucumber='green'):
        self.fruits = apple, banana, cucumber
    def show(self):
        print("Our fruits are:", *self.fruits)

if __name__ == '__main__':
    main = Main()  # without arguments given, those will be read from the CLI
    main.show()
Package: simpleclient
simpleclientsimpleclient "Python Simple HTTP Client" is a simpleguzzle-like library built on top of The Standard Python Library. Unlike guzzle, simpleclient is smaller, and not full of features. It is compatible with Python 2.x and 3.x. There is also aphp-simple-clientwritten in PHP.Installpip install simpleclientQuick Startimportsimpleclientclient=simpleclient.Stream()Simple GETSend a GET Requestclient.seturl('https://www.google.com/')# required to set an urlclient.send()Display Responsesprint(client.getheader())# HTTP/1.1 200 OK# Date: Mon, 14 Jan 2021 14:14:48 GMT# Expires: -1# Cache-Control: private, max-age=0# Content-Type: text/html; charset=UTF-8# ...print(client.getheader(0))# HTTP/1.1 200 OKprint(client.getheader('Content-Type'))# text/html; charset=UTF-8print(client.getbody())# <!doctype html>...</html>Custom RequestsCustom requests using the request() method.client.seturl('https://www.google.com/')# required to set an urlclient.request('HEAD')client.send()You can also provide a payload, for example, for a POST request. The payload can be a dictionary, or a string. It will automatically send a 'Content-Type: application/x-www-form-urlencoded' header. You can set it manually with the setheaders() method for other types required.client.request('POST',{'user':'myusername','pass':'mypassword'})Setting Headers To Be SentSetting Headers must be done before calling request() and send() method.client.setheaders(['User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0','Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','Accept-Language: en-US,en;q=0.5'])Commonprint(client.getprotocol())# HTTPprint(client.getprotocolversion())# 1.1print(client.getstatuscode())# 200print(client.getreasonphrase())# OKDebugYou can enable debug mode. This will allow you to monitor the request header being sent.client=simpleclient.Stream(debug=True)client.seturl('https://www.google.com/')# required to set an urlclient.request('HEAD')client.send()# finally, show the responseprint(client.getheader())And other features to hack like the getresponse() method.
Package: simple-cloudflare-ddns
CloudFlare DDNSThis script will update cloudflare dns with new dynamic ips when the current one changes. Please check the settings.yml file to ensure its correct.LimitationsNo IPv6 support(My isp does not assing ipv6 address I can not test if this works)If you wish to conrtbute to this project please check theCONTRIBUTING.mdfile.The scipt can be got athttps://pypi.org/project/simple-cloudflare-ddns/. I will be publishing docs on how to use the inbuilt functions. For a quick setup you can use the following commands.$cloudflareddns--gen-settings# this will create a file called settings.yml$cloudflareddns# this will get record idsafter running this you can runcloudflareddns --ddnsto skip getting the record id as it is stored in the settings.yml
You can verify if the settings.yml is correct by runningcloudflareddns --verify
Package: simple-cloud-site
Experiment: going all in on a static site, where pure HTML is the only storage format using semantic HTML5
and schema.org microdata.Currently developed and tested only on Python 3, although some effort has been made to keep backporting easy
if necessary.WARNING: changes highly likely until it hits 1.0…PhilosophyCommand-line tools used to manage a static site which will be uploaded to something supported byApache libcloud— currently tested with Rackspace Cloud Files.No template language is assumed, avoiding any impedance mismatches between modern HTML and the tooling or
the need to have anything other than a browser to render pages. What you test is what you get.HTML templates can be developed live in a browser; all content with theplaceholderclass will be
removed by theapply-templatecommand.No attempt is made to provide change tracking – it’s highly recommended that you use Git, Mercurial, etc. on
the site base directory instead.Getting StartedInstallationpip installsimple-cloud-siteRunsimple-cloud-site--helpto list commandsConfigurationCreateindex.htmlandpost.htmltemplates in_templates/Create.simple-cloud-site.cfgwith site-specific configuration:[auth]
username=YOUR_USERNAME
api-key=YOUR_API_KEY
region=YOUR_REGION

[site]
container=YOUR_CONTAINER_NAME
base_url=BASE_URL
site_title=SITE_TITLE_FOR_FEEDS
site_description=SITE_DESCRIPTION_FOR_FEEDS

[author]
name = YOUR_NAME
email = YOUR_EMAILOptionally, enable shell completion using the output ofsimple-cloud-sitecomplete– for example, in a
virtualenvwrapper postactivate script:eval "$( simple-cloud-site complete )"Applying Templatessimple-cloud-siteapply-template[--template=filename]path/to/post.htmlPreviewingsimple-cloud-sitedevserverOpen the listed URL in your browserPublishingsimple-cloud-sitepublishOpen the public URL in your browser
Package: simplecmr
simple-cmrPython package to query NASA's Common Metadata Repository with a simple and intuitive APIPhilosophyThe NASA Common Metadata Repository hosts a wealth of information related to Earth Observation data. However, so much information can be cumbersome to those that are not fully aware of what everything is or what information can be extracted from the database.simple-cmraims to provide a simplified interface to work with the NASA CMR including submitting a query, accessing important metadata, and retrieving data for use. This package is intended for practitioners to provide a simple interface to script searching for known datasets and downloading the data. This package is not meant to be a discovery tool, users would ideally know what data they want to search for.ExampleThis is a simple example where one provides a collection concept ID (assuming one knows it) and space/time information to identify the granules that meet the criteria.In this case we will be searching the Suomi-NPP ATMS Brightness Temperature collection (C1442068516-GES_DISC) over Southeast Asia for March 1, 2020.importsimplecmrasscmr# construct queryquery=scmr.Query(conceptid="C1442068516-GES_DISC",startTime='2020-03-01',endTime='2020-03-02',spatialExtent=[90,10,110,30],maxResults=10)# print the granule informationquery.granules# download the first five granules that meet our queryquery.granules.fetch((<username>,<password>),limit=5)ContributingContributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.You can contribute in many ways:Types of ContributionsReport BugsReport bugs athttps://github.com/kmarkert/simple-cmr/issues.If you are reporting a bug, please include:Any details about your local setup that might be helpful in troubleshooting.Detailed steps to reproduce the bug.Fix BugsLook through the GitHub issues for bugs. Anything tagged with "bug" is open to whoever wants to implement it.Implement FeaturesLook through the GitHub issues for features. Anything tagged with "feature" is open to whoever wants to implement it.Submit FeedbackThe best way to send feedback is to file an issue athttps://github.com/kmarkert/simple-cmr/issues.If you are proposing a feature:Explain in detail how it would work.Keep the scope as narrow as possible, to make it easier to implement.Remember that this is a volunteer-driven project, and that contributions are welcome :smile:
Package: simple-collatz
Simple CollatzA simple python package for plotting the collatz conjecture.Warning: may be pointlessDevelopmentTo setup a dev environment:Clone this repo(Optional) setup a Python virtual environmentpip install -r requirements.txtInstallation and UsageInstallationSimple Collatz can be installed by runningpip install simple-collatz, or by installing from a wheel package, included in the latest release.If you can't wait for the latesthotnessand want to install from GitHub, use:pip installgit+git://github.com/appcreatorguy/collatzAlternative InstallationFor a python-free installation, the standalone binaries can be downloaded from the latest release and run in the same way.UsageTo get started:simple_collatzIf this doesn't work, you can try running Simple Collatz as a script instead:python-msimple_collatzThe program will then begin to iterate over the collatz conjecture.
To stop and view your results at any time, raise a keyboard interrupt withCtrl + C. The 2 graphs will then populate(this may take some time depending on the amount of iterations you have computed!) with the stopping time and the values of the collatz conjecture so far.Change LogSeeCHANGES.mdChangesUpdated Readme to be understandable
Package: simplecolor
SimpleColorSimpleColor is a Python module for adding color to your terminal output easily.InstallationYou can install SimpleColor using pip. Simply run the following command:pipinstallsimplecolorUsageimportsimplecolor# Colorize text with predefined colorscolored_text=simplecolor.colorize("Hello, World!","red","bg_black")# Colorize text with custom hex colorshex_colored_text=simplecolor.hex_colorize("Custom Color","#FFA500","bg_white")# Clear the terminal screensimplecolor.clear_terminal()OrimportSimpleColor# Colorize text with predefined colors but also automatically resetscolored_text=simplecolor.colorize("Hello, World!","red","bg_black",reset=True)# Colorize text with custom hex colors but also automatically resetshex_colored_text=simplecolor.hex_colorize("Custom Color","#FFA500","bg_white",reset=True)# Clear the terminal screensimplecolor.clear_terminal()Predefined ColorsSimpleColor provides a variety of predefined colors, including:resetblackredgreenyellowbluepurplecyanwhitegraylight_redlight_greenlight_yellowlight_bluelight_purplelight_cyanpinkorangetealdark_graydark_reddark_greendark_yellowdark_bluedark_purpledark_cyanlight_graybold_whitebg_blackbg_redbg_greenbg_yellowbg_bluebg_purplebg_cyanbg_whitebg_light_graybg_dark_graybg_light_redbg_light_greenbg_light_yellowbg_light_bluebg_light_purplebg_light_cyanbg_bold_white
Package: simple-colors
Simple ColorsColorful output in terminal.Installationpipinstallsimple-colorsUsagefromsimple_colorsimport*print(green('hello'))print(green('hello','bold'))print(green('hello',['bold','underlined']))Inlucded colorsblackredgreenyellowbluemagentacyanIncluded styles:boldbrightdimitalicunderlinedblinkreverseCLI Usage$ simple-colors -h
usage: simple-colors [-h]
                     [-s [{bright,bold,dim,italic,underlined,blink,reverse} [{bright,bold,dim,italic,underlined,blink,reverse} ...]]]
                     {black,red,green,yellow,blue,magenta,cyan} text

positional arguments:
  {black,red,green,yellow,blue,magenta,cyan}
  text                  text of file path

optional arguments:
  -h, --help            show this help message and exit
  -s [{bright,bold,dim,italic,underlined,blink,reverse} [{bright,bold,dim,italic,underlined,blink,reverse} ...]], --style [{bright,bold,dim,italic,underlined,blink,reverse} [{bright,bold,dim,italic,underlined,blink,reverse} ...]]