Saravanan666/pypi-org huggingface dataset:
Package: whats-that-code
whats_that_codeThis is a programming language detection library.It will detect programming language of source in pure python from an ensemble of classifiers.
Use this when a quick and dirty first approximation is good enough.
whats_that_code can currently identify 60%+ of samples without knowing the extension or tag.I created this because I wanteda pure python programming language detectorno machine learning dependenciesTested on python 3.6 through 3.9.BadgesUsagefromwhats_that_code.electionimportguess_language_all_methodscode="def yo():\nprint('hello')"result=guess_language_all_methods(code,file_name="yo.py")assertresult==["python"]How it WorksInspects file extension if available.Inspects shebangLooks for keywordsCounts regexes for common patternsAttemps to parse python, json, yamlInspects tags if available.Each is imperfect and can error. The classifier then combines the results of each using a voting algorithmThis works best if you only use it for fallback, e.g. classifying code that can't already be classified by extension or tag,
or when tag is ambiguous.It was a tool that outgrew being a part ofso_pipa StackOverflow code
extraction tool I wrote.DocsTODOLICENSEPrior ArtEvery similar project/tool, including defunctChangeLogNotable Similar ToolsGuesslang- python and tensorflow driven solution. Reasonable results but
slow startup and not pure python.pygmentspure python, but sometimes lousy identification
rates.
Package: whats-this-payload
whats-this-payloadInspirationWorking with payload from webhooks can be really anoying. This tries to make the process easier.How to run?Create a virtual environmentActivate the environmentrunmake install env=devInstallpipinstallwhats-this-payloadBasic usagefromwhats_this_payloadimportget_identifierwhatsapp_identifier=get_identifier(webhook="whatsapp")# or any other available integration.webhook_payload_as_dict=payload.dict()payload_type=whatsapp_identifier(payload=webhook_payload_as_dict).identify_payload_type()print(payload_type)# >> PayloadType.ANSWER_FROM_LIST_MESSAGE# Supported payloads# (https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples#list-messages)
Package: whatstk
whatstk: analyze WhatsApp chats with pythonTry thelive demo parserto convert your chats to CSVwhatstkis a python package providing tools to parse, analyze and visualise WhatsApp chats developed under thesociepyproject. Easily convert your chats to csv or simply visualise some stats using
the provided command-line tools or python. The package usespandasto process
the data andplotlyto visualise it.It is distributed under the GPL-3.0 license.⭐ Pleasestarour project if you found it interesting togive us some dopamine😄!ContentInstallationGetting StartedDocumentationContributeCovered inCitationInstallationpip install whatstkInstall develop version (not stable):pip install git+https://github.com/lucasrodes/whatstk.git@developMore detailshereGetting StartedFor a rapid introduction, check thistutorial on Medium.Export your chat using your phone:Seeinstructions.Load chat as a DataFramefromwhatstkimportdf_from_txt_whatsappdf=df_from_txt_whatsapp("path/to/chat.txt")Convert chat to csv$whatstk-to-csv[input_filename][output_filename]More examplesSee more in sectionsgetting startedandexamples.DocumentationSeeofficial documentation.ContributeSeecontribute section.LicenseGPL-3.0CitationLucas Rodés-Guirao. "whatstk, WhatsApp analysis and parsing toolkit",https://github.com/lucasrodes/whatstkCovered inYour Whatsapp Chat History in Cool Graphs, by@batmanscode.WhatsAppening to the news, by@enric1994whatsappening source code, by@enric1994
Package: whatsup
whatsup is an outage escalation tool for a list of sites and contactsInstalling whatsupwhatsup is installable viaeasy_installorpython setup.pyin
the usual way from the python source athttps://svn.openplans.org/svn/whatsup.  The recommended installation procedure is withvirtualenv:python <(curl http://svn.colorstudy.com/virtualenv/trunk/virtualenv.py) whatsup
cd whatsup
. bin/activate
mkdir src
cd src
svn co https://svn.openplans.org/svn/whatsup
cd whatsup
python setup.py developYou will also need data files (.ini) for contacts and sites.  By
default these live in${VIRTUAL_ENV}/src/whatsup/contactsand
${VIRTUAL_ENV}/src/whatsup/sites, though this is configurable.Instantiating whatsupwhatsup is served by the paste .ini file:paster serve whatsup.iniApplication options may be specified in this .ini file in the[app:whatsup]section prefixed withwhatsup.:contacts, sites: location of the contacts and sites files.  can be
a single file or a directory containing .ini filesauto_reload: whether to reload the configuration on each requestping: whether to ping the sitesping_frequency:  how often, in seconds, to ping the sitessmtp_from: who to send email as if the user does not specifiedsmtp_server: mail server to use.  If not specified, whatsup will
not send emailwhatsup contact .ini filesA contact .ini file contains one or more sections, each corresponding
to a contact.  The name of the section should be the name of the
contact.  Several data are specifiable for each contact:email: comma separated list of email addresses.phone: comma separated list of phone numbersirc: comma separated list of IRC namesaim: AIM screennameurl: canonical web presencecontact: description of how to contact this person, or a filename
containing that informationFor each comma separated list, the first item is considered primary.whatsup site .ini filesA site .ini file contains one or more sections, each corresponding to
a website.  By convention, the section name is the domain name of the
site.  Several data are specifiable for each site:url: location of the site.  If not specified, the url will be from
the section name (presumedly the domain name)contact: comma separated list of contacts in case of site outagedescription: brief description of the websiteoutage_procedure: if specified, a description of what to do in case
the site is down or a filename containing that information.  By
default, this links to the contact form which emails the contacts
upon submission.trac: URL of the associated Trac site
Package: what-the-diff
what-the-diff"What the diff???"unix diff implementation in pythonUsagefromwhat_the_diffimportdiffold="Hello world\nHello hell"new="Hello Heaven\nHello world\nHello hall\nHello waddldo"lines_new=new.split('\n')lines_old=old.split('\n')removed,added,updated=diff(old,new)foriinremoved:print(i.format())foriinadded:print(i.format())foriinupdated:print(i.format())#prints#0,1d1#< Hello hell#0a1,1#> Hello Heaven#2a3,4#> Hello hall#> Hello waddldo#1c2#< Hello hell#---#> Hello hall#### With colorsInstallpipinstallwhat-the-diff
Package: what-the-face-classification
This package was created as a part of Talentsprint and Techwise program by James Rodgers of team "What The Face". It uses a pytorch CNN network trained on FER2013 and CK+ images to classify an image passed into it.Initialize class and pass a jpg PIL image to the predict() method.classes:
Image_classifier()
returns selffunctions:
predict(image)
returns [classified_name: str, probability: double]Exceptions for predict:
        If the face detection fails and the probability of a category is low it will return:
            returns ['no face detected', '0']Example:from PIL import Image
from what_the_face_classification.inference import Image_classifierclassifier = Image_classifier()
image = Image.open(test.jpg)prediction = classifier(image)print(prediction)
Package: what_the_license
A tool to find the concrete open source licens given a source file header:>>> import what_the_license
>>> what_the_license.wtk(open('some_source_file'))
    [
      {
        "score": 100.0,
        "license": "The MIT License"
      },
      {
        "score": 48.030888030888036,
        "license": "Boost Software License - Version 1.0 - August 17th, 2003"
      },
      {
        "score": 44.86486486486486,
        "license": "MOZILLA PUBLIC LICENSE Version 1.0"
      }
    ]
Package: whatthewhat
Launch a Google search for exceptions from Python apps.$ wtw ./tester.py
Searching for: TypeError unhashable type: 'list'
Traceback (most recent call last):
  File Users/dhellmann/Envs/whatthewhat/bin/wtw line 10, in <module>
    sys.exit(main())
  File Users/dhellmann/Devel/whatthewhat/whatthewhat/main.py line 65, in main
    sys.argv,
  File Users/dhellmann/Devel/whatthewhat/whatthewhat/execfile.py line 120, in run_python_file
    exec_code_object(code, main_mod.__dict__)
  File exec_function> line 2, in exec_code_object
  File /tester.py line 7, in <module>
    f()
  File /tester.py line 5, in f
    return {['a', 'b']: ['c', 'd']}
TypeError: unhashable type: 'list'Inspired by
Package: whattime
whattimeChecking of what kind a datetime object is: it let’s you explore whether a certain datetime object is e.g. a Sunday morning in summer or a Wednesday night in winter. It also consideres hemispheres.Getting startedInstall it with:pipinstallwhattimeorpipenvinstallwhattimeFor quickly getting started, just import thewhattimefunction and explore a date’s properties (also see theGet started example):fromdatetimeimportdatetimefromwhattimeimportwhattime,Hemispherenow=datetime.now()info=whattime(now,Hemisphere.SOUTHERN)info.is_weekdayinfo.is_mondayinfo.is_summer# ...Besides checking all the time types you can also only check a certain category of types, e.g. info about the current day, or the time within a day seperately (also see theSingle info type example).fromdatetimeimportdatetimefromwhattimeimportweek_info,day_time_info,season_info,Hemispherenow=datetime.now()# There will only be properties available concerning the week time info when using week_info():info=week_info(now)info.is_weekdayinfo.is_monday# ...# There will only be properties available concerning the day time info when using day_time_info():info=day_time_info(now)info.is_afternooninfo.is_evening# ...# There will only be properties available concerning the season info when using season_info():info=season_info(now,Hemisphere.SOUTHERN)info.is_springinfo.is_summer# ...DevelopmentCheck out the repo withgit clone git@github.com:grammofy/whattime.git.To set up the project for development you need toinstall Pipenvand run:pipenvinstall--devin order to install the needed development requirements.Tests can be run with:pythonsetup.pytestContributingBug reports, feature discussions and pull requests are welcome on GitHub athttps://github.com/grammofy/whattime. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to theContributor Covenant Code of Conduct.Here’s how to contribute:Fork it (https://github.com/grammofy/whattime/fork)Create your feature branch (git checkout -b feature/my-new-feature master)Commit your changes (git commit -am 'Add some feature')Push to the branch (git push origin feature/my-new-feature)Create a new Pull RequestPlease try to addPytest testsalong with your new feature. This will ensure that your code does not break existing functionality and that your feature is working as expected.LicenseThe software is available as open source under the terms of theMIT License.
Package: whatType
✅ whatTypePython package to check the type of a variable or object.🚀 UsagefromwhatTypeimport*# Check for 'function' typedeftest():passisFunction(test)# Returns True# Check for 'int' typeisInt(1234)# Returns True# Check for 'float' typeisFloat(3.1415)# Returns True# Check for 'complex' typeisComplex(3+4j)# Returns True# Check for 'str' typeisStr('Hello, World!')# Returns True# Check for 'list' typeisList([1,2,3])# Returns True# Check for 'dict' typeisDict({"hello":"world"})# Returns True# Check for 'tuple' typeisTuple((1,2,3))# Check for 'NoneType' typeisNone(None)# Returns True# Check for 'bool' typeisBool(True)# Returns True# Check for 'bytes' typeisBytes(b'Hello, World!')# Returns True# Check for 'type' (class) typeclassTest:passisClass(Test)📦 InstallationRun the following to install:$pipinstallwhatType👨‍💻 Developing isTypeTo install whatType, along with the tools you will need to develop and run tests, run the following in your virtualenv:$pipinstall-e.[dev]🚦 Development ProgressUnstable Development
Package: whatubinup2
What U bin up 2A small desktop widget for logging time into configurable buckets.The free version of the app provides access to:Configurable buckets (Create any number of buckets into which time can be logged)Configurable reminders/popups (Popup Hourly/minutely reminders to log your time!)Historic reports (View daily time logged into buckets)Request a license andcontact meto arange upgrade to paid features.Paid featuresCloud config storageUpcoming featuresCloud report storageIntegration with Cloud calendars (Gsuite, O365)Cleaner windows install (Pending MS approval)InstallationMacOSTo use the package, install via pip..pip3 install whatubinup2Launch from the terminal as:whatubinup2On first launch, default settings will be applied (8 hour working days with 10 minute reminders). Config files and reports are stored in~/whatubinup2/WindowsPythonNOTE: Requires Python3 with pip - DownloadhereNOTE: During installation, ensure to tick the box to enable py shortcut commands from cmdpy -m pip install whatubinup2
py c:\users\[Username]\appdata\local\programs\python\python310\lib\site-packages\whatubinup2 ## Based on a standard Python 3.10 installationExeCurrently being raised as a virus by SafeScreen, support ticket logged with MicrosoftDownload zip fromhere, extract the archive and run the executable__main__.exe. (Aware )Local DevelopmentTo develop locally, install dependencies:pip3 install -r requirements.txtLaunch the client:python3 src/whatubinup2/__main__.pyGithub PagesThe github pages site is generated via a script in the pipeline by converting README.md into html and concatenating with template.html from the root directory. To work on this locally, build the docker container using docker-compose:docker-compose up -dThe docs will then be available athttp://localhost:8080If you want to republish the README.md into the container, run the below script to reprocess the markdown (You will need to runpip3 install -r requirements-html.txtthe first time):python3 scripts/convert_markdown.pyBuild processBuild testing, code linting, package bump and publishing are completed via Github actions.Build scripts require a commit message in the following format to generate a pull request[PR|WIP]/$commit_message[[major]|[minor]|[patch]|[none]]Example to create a PR for a patch change:PR/some small fix [patch]
Package: whatweet
Visualization of tweet contentJust enter the username of the target account and you will be able to see the characteristics of the tweets of that account.We will usewordcloudto visualize the tweet contents. This is a simple yet powerful visual representation object for text processing, which shows the most frequent word with bigger and bolder letters, and with different colors. The smaller the the size of the word the lesser it’s important.How to install whatweetwhattweew is available in public and can be installed by the following PyPI packaging command:pip install whatweetIf you are using virtual environment, please use the package manager of the virtual environment (e.g., pipenv install, poetry add).How to run whatweetwhatweet needs at three parameters (username,days,language).UsernameEnter the correct username for an account that has a certain number of tweets. However,you cannot use a private account.daysEnter the number of days to be counted backward from the current date (1 <= days <= 500).For users with a relatively large number of tweets, it is recommended to enter a small number of days. The accuracy of the visualization will be better and the process will not be as heavy.languageTwo languages, Japanese and English, are supported for this visualization. Each one is processed differently, so make sure you enter the user's language.EnterJapanesefor Japanese orEnglishfor English.Examplewhatweet twitter 100 English
Package: whatwg-url
whatwg-urlPython implementation of theWHATWG URL Living Standard.The latest revision that this package implements of the standard is August 7th, 2018 (commit 49060c7)Getting StartedInstall thewhatwg-urlpackage usingpip.python -m pip install whatwg-urlAnd use the module like so:importwhatwg_urlurl=whatwg_url.parse_url("https://www.google.com")print(url)# Url(scheme='https', hostname='www.google.com', port=None, path='', query='', fragment='')FeaturesCompatibility withurllib.parse.urlparse()importwhatwg_urlparseresult=whatwg_url.urlparse("https://seth:larson@www.google.com:1234/maps?query=string#fragment")print(parseresult.scheme)# 'https'print(parseresult.netloc)# 'www.google.com:1234'print(parseresult.userinfo)# 'seth:larson'print(parseresult.path)# '/maps'print(parseresult.params)# ''print(parseresult.query)# 'query=string'print(parseresult.fragment)# 'fragment'print(parseresult.username)# 'seth'print(parseresult.password)# 'larson'print(parseresult.hostname)# 'www.google.com'print(parseresult.port)# 1234print(parseresult.geturl())# 'https://seth:larson@www.google.com:1234/maps?query=string#fragment'URL NormalizationThe WHATWG URL specification describes methods of normalizing URL inputs to usable URLs.
It handles percent-encodings, default ports, paths, IPv4 and IPv6 addresses, IDNA (2008 and 2003), multiple slashes after scheme, etc.importwhatwg_urlprint(whatwg_url.normalize_url("https://////www.google.com"))# https://www.google.comprint(whatwg_url.normalize_url("https://www.google.com/dir1/../dir2"))# https://www.google.com/dir2print(whatwg_url.normalize_url("https://你好你好"))# https://xn--6qqa088eba/print(whatwg_url.normalize_url("https://０Ｘｃ０．０２５０．０１"))# https://192.168.0.1/URL Validationprint(whatwg_url.is_valid_url("https://www.google.com"))# Trueprint(whatwg_url.is_valid_url("https://www .google.com"))# FalseRelative URLsHTTP redirects often contain relative URLs (via theLocationheader) that need to be applied to the current URL location.
Specifying thebaseparameter allows for giving relative URLs as input and the changes be applied to a newURLobject.importwhatwg_urlurl=whatwg_url.parse_url("../dev?a=1#f",base="https://www.google.com/maps")print(url.href)# https://www.google.com/dev?a=1#fURL Property MutatorsModifying properties on aURLobject use the parser and "state overrides" to properly mutate theURLobject.url=whatwg_url.parse_url("http://www.google.com:443")print(url.scheme)# 'http'print(url.port)# 443url.scheme='https'print(url.scheme)# 'https'print(url.port)# None"Splatable"The module is a single file which allows for easy vendoring into projects.LicenseApache-2.0Changelog2018.8.26AddedAddedUrlParserandUrlAddedUrlParser.parse_host()AddedUrlParser.parse_ipv4_host()AddedUrl.originAddedUrl.authorityAddedurlparseandurljointo be compatible withurllib3.parse.urlparseandurllib.parse.urljoinAdded support for Python 2.7, 3.4, and 3.5
Package: whatwhen
whatwhenis a higher-level topological sort, a useful algorithm to
resolve dependencies and calculate a workable execution order for
functions and other things.Basic topological sorting:tasks = [
    {
        'name: 'drive',
        'dependencies': ['car'],
    }, {
        'name': 'car',
        'dependencies': ['wheels', 'gas'],
    }, {
        'name': 'wheels',
        'dependencies': 'rubber',
    }, {
        'name': 'gas',
    }, {
        'name': 'rubber',
    },
]

whatwhen.sort(items)Topological sorting using contracts (needs and provisions):tasks = [
    {
        'name': 'drive',
        'needs': ['car', 'gas'],
    }, {
        'name': 'fill tank',
        'provides': ['gas'],
    }, {
        'name': 'rent a car',
        'provides': ['car'],
        'dependencies': ['money'],
    }, {
        'name': 'money'
    }
]

whatwhen.sort(items)Needs and provisions are useful when you don’t know exactly what
function (or system or module or whatever) is going to provide the
necessary data or preconditions, but you do know what that data or those
preconditions are. This might happen in large systems or systems over
which you don’t have full control.In addition to dictionaries, the metadata on tasks can also be added to
functions:def one():
    pass

def two():
    pass

one.dependencies = ['two']

whatwhen.sort([one, two])Whatwhen will return the original functions (or dictionaries) in sorted
order, rather than just a sorted list of node names, so it’s slightly
easier to work with than a raw topological sort.Whatwhen lets thetarjanmodule do most of the heavy lifting, so there’s really only about 40
lines of wrapper code to this module. It’s up to you to decide whether
you’d rather build on top of WhatWhen or plain Tarjan.
Package: wheat
WheatA concise and fast CLI to log hours in Harvest.Managing ProjectsWheat keeps a "projects" file somewhere that it stores task information in. Users can set tasks as active/not active at will. Whatever tasks are present in the task file are shown each time the user is asked to do anything regarding tasks.Commandsauth: Authenticate with Harvest by providing a personal access token and account id.task:
list: Displays your Current Projects and Tasks.
activate: Set a Project or Task as active.
sleep: Set a Project or Task as inactive.meetings:
next: Displays your next meeting.
today: Displays today's meetings.
join: Joins a meeting's video chat if a link is provided.
Supports Zoom and Google Meets.
* Takes Meeting ID as an argument. If none is provided, joins the next meeting on the calendar, if it can.Note: Meetings commands require you to have logged into your Google account, and will use events from your google calendar.
Package: wheatly
WheatlyAboutWheatly is an approach to developing integration tests in a more natural way. While some technical knowledge is still required, this framework aims to allow for tests to be written using more of a natural language approach while still allowing for the flexibility needed to create robust tests.UsageCreate some directory you want to store you plugins in (see thepluginsdirectory for examples). The only required plugin is aconfig.pyfile which takes the following form:lexicon={'model':{'class':"Model",'tokens':['model','models',],'actions':{'get':['get','gets','getting','got'],'delete':['delete','deleted','deleting','deletes']},'modifiers':{}}}Each object in the lexicon variable should correspond to a same name file within the same plugin directory. Each of these files will represent some sort of object you want to work with (or an object to encapsulate various actions). They should take this form (notice that the name of the class matches the lexicon'sclassfield):importconfigimportwheatly.utilsasutilsclassModel:def__init__(self):self.name='model'self.tokens=config.lexicon[self.name]['tokens']self.actions=config.lexicon[self.name]['actions']self.modifiers=config.lexicon[self.name]['modifiers']defaction_get(self,context,logger,args={},modifiers=[]):# perform get actions for this objectprint('get!')# return modified context and success or failreturncontext,Truedefaction_delete(self,context,logger,args={},modifiers=[]):# perform delete actions for this objectprint('delete!')# return modified context and success or failreturncontext,Truedef__str__(self):returnf'{self.name}()'def__repr__(self):returnf'{self.name}()'After writing any modules you want to use, create a test file with the following form:tests:example:# Execute some HTTP request-curl:host:https://pypi.orgpath:project/calligraphy-scriptingmethod:get# Set this to a dictionary if you want to send some JSON data alone with the requestdata:~response_type:html# Execute a wait with the duration in seconds-wait:5# Text of what to do-get a model:# Optional dictionary for any arguments you want to pass alongfoo:barCurrently you can usecurlandwaitto run custom globally available actions. You can also write natural language actions which Wheatly will parse and run via the plugins you wrote.To run your test, first generate the test JSON via:pythonsrc/main.pygenerate-p./plugins-iexamples/example.yaml-oexamples/example.jsonYou can then run the generated test JSON via:python src/main.py run -p ./plugins -i examples/example.jsonTODO:Add summary command