Saravanan666/pypi-org huggingface dataset:
Package: scratchapi2
scratchapi2A new Scratch API Client for Python 3+Under GPLv3 or any later versionCopyright ﾂｩ 2018 apple502j, kenny2github All rights reversed.
(It’s all right to say “reversed”, it’s GPL!)This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.Scratch is a project of the Lifelong Kindergarten Group at the MIT Media Lab.
Scratch is a trademark of the Lifelong Kindergarten Group at the MIT Media Lab.
The ScratchAPI2 Development Team isNOTa team of MIT, and none
of the member is on Scratch Team. Please remember that it’s a hobby
and inofficial.==== What is this?
It is a library for humans (and some robots). This library is a client
of Scratch API, so lots of features are available. But the development
team decided to remove all deprecated features.It consists of some classes, such as:
* Misc (Information, Search, Statistics)
* Translate (Translate API)
* User (Scratch user)
* Project (Scratch project)
* FrontPage (Scratch Front Page API)
* Classroom (Scratch classroom)
* Comment
* Studio
and some classes just for developers…==== Requirements
* Python 3.0+, should be 3.5+, tested on CPython 3.6.1
* Requests (should be the latest version)==== For people who want to add a feature
The ScratchAPI2 Development Team needs help. See this for detail:https://github.com/apple502j/scratchapi2/issues/21. Make sure the API exists! Test by YOURSELF.
2. If it needs CSRF token, make the code, PLEASE MAKE IT!
3. Please tell at least one reference. Available references:
*https://github.com/LLK/scratch-www(read the code)
*https://github.com/LLK/scratch-rest-api/wiki* Scratch Wiki==== Want to join?
Answer: Yes! But please make sure you’re familiar with Python 3.x,
have GitHub account, and know about Scratch!Needed Works:
* Pull Requests Reviewers
Nominate athttps://github.com/apple502j/scratchapi2/issues/3!==== (By the way) Story
On June 9th, apple502j, the programmer on the team started making it.
When making, Kenny2scratch always helps. The great co-worker made this
library greater. For example, GenericData was made by him.On July 4th, the library had a great update by him. His codes made this
library better and better.
Package: scratchapi-python
scratchapi-pythonA scratch API wrapper for Python, created byArtcas2.InstallationTo install the library, run the following command:pip install -U scratchapi-pythonExampleimportscratchapisession=scratchapi.login("username","password")user=session.get_current_user()print("Follower count:",user.get_follower_count())print("Following count:",user.get_following_count())print("Project cout:",user.get_project_count())followers=user.get_followers(limit=1)print("\nLast follower:")forfollowerinfollowers:print(follower)project=scratchapi.get_project("731849091")print(f"\nProject stats:{project.loves}loves and{project.favorites}favs.")UsageLogging in with username and passwordimportscratchapisession=scratchapi.login("username","password")Logging in with a session idimportscratchapisession=scratchapi.Session("username","session_id")Session attributessession.username
session.session_id
session.email
session.xtoken
session.new_scratcher
session.banned
Package: scratchattach
Scratch API wrapper with support for almost all site features. Created byTimMcCool.This library can set cloud variables, follow Scratchers, post comments and do so much more! It has special features that make it easy to transmit data through cloud variables.LinksDocumentationExtended documentation (WIP)ExamplesChange logContributorsAllmost all code by TimMcCool.See the GitHub repository for full list of contributors.Create a pull request to contribute code yourself.SupportIf you need help with your code, leave a comment in theofficial forum topiconTimMcCool's Scratch
profileor open an issue on the github repoInstallationRun the following command in your command prompt
/ shell:pip install -U scratchattachORAdd this to your Python code:importosos.system("pip install -U scratchattach")Logging inscratch3.SessionLogging in with username / password:importscratchattachasscratch3session=scratch3.login("username","password")login()returns aSessionobject that saves your loginLogging in with a sessionId:You can get your session id from your browser's cookies.More informationimportscratchattachasscratch3session=scratch3.Session("sessionId",username="username")#The username field is case sensitiveAll scratchattach features are documented in thedocumentation.Cloud variablesscratch3.CloudConnectionConnect to the Scratch cloud:conn=session.connect_cloud("project_id")Get / Set a cloud var:value=scratch3.get_var("project_id","variable")conn.set_var("variable","value")#the variable name is specified without the cloud emojiAll scratchattach features are documented in thedocumentation.
Package: scratchcache
Scratch Cache (WIP)TODOs: Configuring this templateCreate a Netlify site for your repository, then turn off automatic builds in Netlify settings.Add these CI secrets:PYPI_API_TOKEN,NETLIFY_AUTH_TOKEN(Netlify user settings - personal access tokens),DEV_NETLIFY_SITE_ID,PROD_NETLIFY_SITE_ID(API ID from Netlify site settings)Set up Codecov at TODOOverviewInstallationpipinstallscratchcacheUsageDevelopmentSubmit PRs againstdevelopbranch, then make a release pull request tomaster.# Install requirementspipinstall--upgradepipwheel
pipinstall-rrequirements_dev.txt# Install local packagepipinstall-e.# Install pre-commitpre-commitinstall# Run testsmaketest# Run lintmakelint# bump version before submitting a PR against master (all master commits are deployed)bump2versionpatch# possible: major / minor / patch# also ensure CHANGELOG.md updatedChangelog0.0.1First release on PyPI.
Package: scratchclient
scratchclientA scratch API wrapper for python.InstallationGo to your terminal (not your python shell) and execute this command:pipinstallscratchclientIf this didn't work for whatever reason, open your python shell and run the following:importos;os.system("pip install scratchclient")Example UsageBasic UsagefromscratchclientimportScratchSessionsession=ScratchSession("ceebee","--uwu--")# post commentssession.get_user("Paddle2See").post_comment("OwO")# lots of other stuffprint(session.get_project(450216269).get_comments()[0].content)print(session.get_studio(29251822).description)Cloud ConnectionfromscratchclientimportScratchSessionsession=ScratchSession("griffpatch","SecurePassword7")connection=session.create_cloud_connection(450216269)connection.set_cloud_variable("variable name",5000)@connection.on("set")defon_set(variable):print(variable.name,variable.value)print(connection.get_cloud_variable("other variable"))Documentation is available athttps://cubeythecube.github.io/scratchclient.All bugs should be reported to thegithub repository. If you need help or guideance, check out theforum topic.
Package: scratchclientImproved
Improvement #1 | vv1.3 ChangelogMade most functions return a status code, some of the functions are:.delete().report().set_*()Studio.add_project()Studio.remove_project()Studio.open_to_public()Studio.close_to_public()Studio.toggle_commenting()etc...scratchclientImprovedImproved version of the Scratch API wrapper by CubeyTheCube.
I will mainly fix errors.InstallationGo to your terminal (Not your Python shell) and execute this command:pipinstallscratchclientImprovedIf this didn't work for whatever reason, open your Python shell and run the following:importos;os.system("pip install scratchclientImproved")Example UsageBasic UsagefromscratchclientImprovedimportScratchSessionsession=ScratchSession("UwU","--uwu--")# Post commentssession.get_user("User").post_comment("OwO")# Lots of other stuff!print(session.get_project(450216269).get_comments()[0].content)print(session.get_project(450216269).get_comments()[0].get_replies()[0].content)print(session.get_studio(29251822).description)Cloud ConnectionfromscratchclientImprovedimportScratchSessionsession=ScratchSession("griffpatch","SecurePassword7")connection=session.create_cloud_connection(450216269)connection.set_cloud_variable("variable name",5000)@connection.on("set")defon_set(variable):print(variable.name,variable.value)print(connection.get_cloud_variable("other variable"))Documentation is available athttps://StellarSt0rm.github.io/scratchclientImproved.All bugs should be reported to theGithub repository.
Package: scratchcloud
scratchcloudAn asynchronous Pythonic wrapper for scratch.mit.edu cloud websockets.FeaturesEfficient asynchronous connection with Scratch.Event-based handling of cloud variables.Built-in reconnecting.Encoding and decoding support.ExtensionsFetching data from the Scratch API.Easily customizable codecs for encoding and decoding variables.Sending and parsing large cloud payloads.Validating the cloud by finding who changed a cloud variable.ExamplefromscratchcloudimportCloudClient,CloudChangeclient=CloudClient('yuwe','588579111')@client.eventasyncdefon_connect():print('Connected!')@client.eventasyncdefon_disconnect():print('Disconnected!')@client.eventasyncdefon_message(cloud:CloudChange):print(f"{cloud.name}was set to{cloud.value}!")awaitclient.set_cloud(cloud.name,"123")client.run("SuperSecretPassword22")LinksDocsPyPiScratch
Package: scratchcloudclient
Python client for Scratch Cloud VariablesInstallpipinstallscratchcloudclientScratch CloudUtils libraryscratchcloudclient.CloudUtils provides functions to decode and encode strings
into 2-digit decimal encoding, which can be used to transfer text in cloud
variables.This project includes all the CloudUtils functionsScratch CloudUtils libraryExamplefromscratchcloudclientimportScratchSessionsession=ScratchSession('username','password')# session = ScratchSession('username') # Prompts for passwordconnection=session.create_cloud_connection('654864684')# project idprint(connection.variables)# Dictionary of cloud variables# Event function, gets called when cloud variables change# (Note: Setting cloud variables to the same value will trigger the event#        though this is not possible to detect in Scratch Project         )defon_cloud_update(connection):print(connection.variables)# Launches a thread which will run in backgroundconnection.on_cloud_update(on_cloud_update)# Set CLOUD_1 to 0connection.set_variable('CLOUD_1','0')For more examples see/examplesSome of the code is taken fromscratchclient
Package: scratch-dir
Unit test mixin which creates a scratch director. Setsself.scratch_diron initialization, and deletes it when finished.importunittestfromscratch_dirimportScratchDirMixinclassTestThing(CreateScratchDirectoryMixin,unittest.TestCase):defsetUp(self):importjsonimportossuper(TestThing,self).setUp()self.local_json_file=self.get_tmp_path('example.json')json.dump({'a':42},self.local_json_file)print'Example file written to scratch dir:{}'.format(self.scratch_dir)Developmentpipinstall-rrequirements_dev.txtrakelintContributeIssue Tracker:https://github.com/bodylabs/scratch-dir/issuesSource Code:https://github.com/bodylabs/scratch-dirPull requests welcome!SupportIf you are having issues, please let us know.LicenseThe project is licensed under the two-clause BSD license.
Package: scratches-algorithms
scratches-algorithmsEnglishScratches Algorithms– this package is a Python client library with classic sorting and search algorithms and simple
utilities for working with numbers, number systems and code performance control.You can find the source code onGitHub.InstallationInstall the current version fromPyPI:pipinstallscratches-algorithmsStructurealgorithmsSortbubbleshakerinsertionselectioncountingmergequickFindlinearbinaryutilsNumbersPropertiesdivisorscount_divisorsfibonacciis_primeis_squareNumeralSystemto_basePerformanceTracking__init____del__func_timerget_sizeРусскийScratch Algorithms– это пакет, который представляет собой клиентскую библиотеку Python с классическими алгоритмами
сортировки и поиска и простыми утилитами для работы с числами, системами счисления и контроля производительности кода.Вы можете найти исходный код наGithub.УстановкаУстановить текущую версию сPyPI:pipinstallscratch-algorithmsСтруктураalgorithmsSortbubbleshakerinsertionselectioncountingmergequickFindlinearbinaryutilsNumbersPropertiesdivisorsfibonacciis_primeis_squareNumeralSystemto_basePerformanceTracking__init____del__func_timer
Package: scratch-ext
# scratch-ext
Access external locations (eg: GPIO) from scratch on the Raspberry Pi# Running
Clone the repo (or download the .tar.gz). Move the .desktop file to your desktop, and start from there, or run from a terminal inside X:` bash ./startup.sh `# Usage
For now you can use the standard GPIO pins, broadcast a message in Scratch, sayingpin 11 onwill turn pin 11 high,pin 11 offwill turn it low. You can also usepin 11 1,pin 11 high, etc.gpiois an alias for the ping command (eggpio 11 on).The script will update any changes in the gpio pins to the standard Scratch sensors. Open the ‘sensing’ tab, and select the pin you want to read from the list. This will return a 1 when high, and a 0 when low.# Writing plugins
Add a .py file to the plugins dir, extend from plugin base, and implement the receive method, see the ExamplePlugin for an example.
Package: scratch-getdata
ScratchAPIClient DocumentationNote: This is not update often please check the github for more up-to-date infoIntroductionThe ScratchAPIClient class provides a convenient interface for accessing data from the Scratch API using the "https://scratch-get-data.kokoiscool.repl.co" base URL.
Github:https://github.com/kokofixcomputers/Scratch-getdataInstall: pip install scratch-getdata
Import: from scratch_getdata import ScratchAPIClientApi KeyYou will need to signup at the api:https://scratch-get-data.kokoiscool.repl.coand get the api key first before using this.UsageInstantiating the ScratchAPIClient class:
client = ScratchAPIClient()Retrieving the follower count of a user:
follower_count = client.get_follower_count(username, api_key)Checking if a user is a Scratcher:
is_scratcher = client.is_scratcher(username, api_key)Retrieving the following count of a user:
following_count = client.get_following_count(username, api_key)Retrieving the "What I'm Working On" (WIWO) status of a user:
wiwo_status = client.get_wiwo(username, api_key)Retrieving the "About Me" information of a user:
about_me = client.get_about_me(username, api_key)Retrieving the messages of a user:
messages = client.get_messages(username, api_key)Retrieving the creator of a project:
project_creator = client.get_project_creator(project_id, api_key)Retrieving the name of a project:
project_name = client.get_project_name(project_id), api_keyRetrieving the description of a project:
project_description = client.get_project_description(project_id, api_key)Retrieving the instructions of a project:
project_instructions = client.get_project_instructions(project_id, api_key)Retrieving the blocks of a project:
project_blocks = client.get_project_blocks(project_id, api_key)Retrieving the title of a forum post:
forum_title = client.get_forum_title(post_id, api_key)Retrieving the category of a forum post:
forum_category = client.get_forum_category(post_id, api_key)Retrieving the country of a Scratch user:
user_country = client.get_scratch_user_country(username, api_key)Note: Replaceusernamewith the desired Scratch username andproject_idwith the desired project ID.API website:https://scratch-get-data.kokoiscool.repl.coCreditsIf you use GetData, please credit @kokofixcomputers.
Package: scratch-gpio-extend
Scratch 3 OneGPIO Extension ServersControl your favorite physical computing device using Scratch 3.Quick Intallation Intructions:For Arduino, Circuit Playground Express, ESP-8266, Robohat-MM1, and Raspberry Pi
Pico boards, install the server firmware. See thePreparing Your Micro-Controllersection
of the User's Guide.Launch the Scratch3 Editor using either the online or offline sites described
in the in theReady, Set, Go/Launch The Scratch3 Editorsection of the User's Guide.Select your extension and start coding!.For full installation and usage, read theInstallation and User's Guide.
Package: scratchhh
scratchhhscratchhh is a kinda thin wrapper for the Scratch API. It makes things easier to fetch and use.InstallationWith pip:python -m pip install scratchhhOr manually:python setup.py installUsagegetUserProj# Get projects from a specific userfromscratchhh.scratchhhimportScratchScratch.getUserProj(user,num)getThumb# Get a project thumbnailfromscratchhh.scratchhhimportScratchScratch.getThumb(id,url,file)searchProj# Search for projectsfromscratchhh.scratchhhimportScratchScratch.searchProj(query,num)getInfo# Get project informationfromscratchhh.scratchhhimportScratchScratch.getInfo(id)getUserAv# Get a user avatarfromscratchhh.scratchhhimportScratchScratch.getUserAv(user,url,file)exists# Check if a user or project existsfromscratchhh.scratchhhimportScratchScratch.getUserAv(ini)getProjComments# Get project commentsfromscratchhh.scratchhhimportScratchScratch.getProjComments(id,num)getUserComments# Get user commentsfromscratchhh.scratchhhimportScratchScratch.getProjComments(user,num)cloneProj# Get a project as an sb3 filefromscratchhh.scratchhhimportScratchScratch.cloneProj(id,file)More features will be added as project development moves!Examplesfromscratchhh.scratchhhimportScratchimportosids=Scratch.getUserProj('Scratchteam',10)print('Getting some thumbnails :P')os.chdir('thumbs')foriinrange(0,10):Scratch.getThumb(ids[i],'thumbnail{}.png'.format(i))fromscratchhh.scratchhhimportScratchproject=Scratch.searchProj('minecraft',1)[0]loves=Scratch.getInfo(project)['stats']['loves']print('This project has{}loves. WOW!'.format(loves))fromscratchhh.scratchhhimportScratchusers=['Za-Chary','Scratchteam','Paddle2See']print('Getting some user pfps...')foriinrange(0,len(users)):Scratch.getUserAv(users[i],'{}.png'.format(users[i]))fromscratchhh.scratchhhimportScratchids=['658095','142','943855']foriinrange(0,len(ids)):print(Scratch.getProjComments(ids[i],3))Why scratchhh?scratchhh offers simpler command syntax and results and a few more features than other modules, I guess.
Package: scratchml
ScratchMLA python package with implementations of Machine Learning algorithms from scratch.ContentsAlgorithms ImplementedInstallingAlgorithms Implemented:Regression:Simple Linear Regression(scratchml.regression.SimpleLinearRegression)Multiple Linear Regression(scratchml.regression.MultipleLinearRegression)Classification:Logistic Regression(scratchml.classification.LogisticRegression)Support Vector Machine(scratchml.classification.SVM)K-Nearest Neighbors(scratchml.classification.KNN)Clustering:KMeans Clustering(scratchml.clustering.KMeans)KMedoids Clustering(scratchml.clustering.KMedoids)Neural Networks:Perceptron(scratchml.nn.Perceptron)Installing:The project is available as a package on PyPI -ScratchMLTo install it using pip:pip install scratchml
Package: scratchpad-deadmund
scratchpadBasic notepad app with some built in calculator functions written in python using Tkinter.Scratchpad can be used for notetaking and will automatically perform in-line math while you type.  For those interested, it basically finds any mathematical looking questions and throws them into python.Supported Operations+     (addition)-      (subtract)/      (divide)*      (multiply)**      (exponent)()      (order of operations enforced by parenthesis)==      (comparison, as in 6 == 2 * 3 => true)How to install / runUsing this github repo / source codeJust download (clone or otherwise) everything here and runpython3 scratchpad.py-or-./scratchpad.pyUsing PyPi package repopip3 install scratchpad-deadmundpython3 -m scratchpadGenerate a .deb and install that(still waiting to get package listed in Ubuntu)cd scratchpad/debian-packaging/debuild --no-tgz-checkcd ../sudo dpkg -i scratchpad_1.1.0_all.debthen to runscratchpadGenerate a pypi package and install thatcd scratchpad/pypi-packagingpython3 setup.py sdist bdist_wheelpip3 install dist/*then to runpython3 -m scratchpad[//]: # The tool chain you need is pip3 install twine, setuptools, wheel, mkpkg
[//]: # To check for mistakes in package use:  python3 -m twine check dist/*
[//]: # To install it locally  (without pypi):  pip3 install dist/*
[//]: # To upload it:  python3 -m twine upload dist/*
[//]: # This might prove useful:  python3 -m mkpkg --cli scratchpad.py scratchpad
Package: scratchpad-py
scratch-pad-pyProjects that have been ported below.https://github.com/polonaiz/scratch-padmind blowing python toolset. why not pr?SpecLoggers: composite, console, file, fluent, jandi, line, memory, null, scribe, telegram, slackLogger interfacefrom .logger_interface import LoggerInterface

class Logger(LoggerInterface):
    logger: LoggerInterface = None

    @classmethod
    def setLogger(cls, logger: LoggerInterface):
        cls.logger = logger

    @classmethod
    def getLogger(cls) -> LoggerInterface:
        return cls.logger

    @classmethod
    def info(cls, message: dict, option: dict = {}):
        cls.logger.info(message, option)

    @classmethod
    def notice(cls, message: dict, option: dict = {}):
        cls.logger.notice(message, option)

    @classmethod
    def warning(cls, message: dict, option: dict = {}):
        cls.logger.warning(message, option)

    @classmethod
    def error(cls, message: dict, option: dict = {}):
        cls.logger.error(message, option)

    @classmethod
    def critical(cls, message: dict, option: dict = {}):
        cls.logger.critical(message, option)UsageFileLoggerfilePath = "/tmp/scratch-pad-python.log"
logger = FileLogger(
    config={
        "filePath": filePath,
        "truncate": True
    }
)
message = {
    "type": "file",
    "message": "hello world"
}
logger.info(message)CompositeLoggerconsoleLogger = ConsoleLogger(
        config={
        "appendNewLine": 1
    }
)
memoryLogger = MemoryLogger()
memoryLoggerCompositeFilter = CompositeLogger.getSelectorLevel(["info", "error"])

message = {
    "type": "composite",
    "message": "hello world"
}

compositLogger = CompositeLogger(
    config={
        "defaults": {
            "datetime": lambda: datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
            "program": "scratch-pad-python",
        },
        "loggerFilterPairs": [
            {
                "logger": consoleLogger,
                "filter": None
            },
            {
                "logger": memoryLogger,
                "filter": memoryLoggerCompositeFilter
            }
        ],
    }
)

compositLogger.info(message)JandiLoggerurl = "url"
logger = JandiLogger(
    url=url
)

message = {
    "type": "jandi",
    "message": "hello world"
}

logger.info(message)TelegramLoggertoken = "telegram"
chat_id = 1234

message = {
    "type": "telegram",
    "message": "hello world",
}

logger = TelegramLogger(
    chat_id=chat_id,
    token=token,
)

logger.info(message)FluentLoggerlogger = FluentLogger()
message = {
        "type": "fluent",
        "message": "hello world"
    }

logger.info(message)SlackLoggerurl = "url"
logger = SlackLogger(url=url)
message = {
    "type": "slack",
    "message": "hello world"
}

logger.info(message)stuff)scribe-docker for ScribeLogger :https://hub.docker.com/r/polonaiz/facebook-scribefluent-docker for FluentLogger :https://github.com/chirichidi/fluent-docker/tree/main