Saravanan666/pypi-org huggingface dataset:
Package: pockethernet
This is a python module that implements the bluetooth protocol used by the Pockethernet network tester. It also includes
a basic command line client.$pockethernet00:13:43:xx:xx:xxStraight cable
Pair voltages:
- 0V
- 0V
- 0V
- 0V
PoE A: 0V
PoE B: 0V
No link established$pockethernet00:13:43:xx:xx:xxCable inserted into ethernet port
Pair voltages:
- 0V
- 0V
- 0V
- 0V
PoE A: 0V
PoE B: 0V
Got 1000BASE-T full duplex link
Link partner advertises:
            HD  FD
  10 MBIT   1   1
 100 MBIT   1   1
1000 MBIT   1   1The python API so far:frompockethernetimportPockethernet,WiremapResult,PoEResult,LinkResultbluething=Pockethernet()bluething.connect("00:13:43:xx:xx:xx")wiremap=bluething.get_wiremap()print(wiremap.connections)# [0, 1, 2, 3, 4, 5, 6, 7, 8]link=bluething.get_link()print(link.speed)# 1000BASE-T
Package: pocket-ic
PocketIC Python: A Canister Testing LibraryPocketICis a local canister testing solution for theInternet Computer.This testing library works together with thePocketIC server, allowing you to interact with your local IC instances and the canisters thereon.With PocketIC Python, you can test your canisters with just a few lines of code, either by interacting with an IC instance:frompocket_icimportPocketICpic=PocketIC()canister_id=pic.create_canister()pic.add_cycles(canister_id,2_000_000_000_000)# 2T cyclespic.install_code(...)# make canister callsresponse=pic.update_call(canister_id,method="greet",...)assert(response=='Hello, PocketIC!')... or even directly with a canister object:my_canister=pic.create_and_install_canister_with_candid(...)# call your canister methods with native Python syntaxresponse=my_canister.greet()assert(response=='Hello, PocketIC!')Getting StartedQuickstartDownload the latestPocketIC serverfrom thePocketIC repo.Leave the binary in your current working directory, or specify the path to the binary by setting thePOCKET_IC_BINenvironment variable before running your tests.Runpip3 install pocket-icin your (virtual) environment to get the Python library.Usefrom pocket_ic import PocketICin your Python code and start testing!ExamplesTo see some working code, see theexamples/folder, or check out thehow to use this libraryguide.
To run an example, clone this repo and runpython3 examples/counter_canister/counter_canister_test.pyfrom the repository's root directory.DocumentationHow to use this libraryPocketIC repoWhy PocketICChangelog of PocketIC PythonContributingSeeCONTRIBUTING.md
Package: pocketing
pypocketing: ALPHAFill 2D regions with traversals, useful someday for generating milling tool paths.Disclaimer: Crusty Alpha SoftwareThis is a dump of a bunch of prototype code. It is only put up in the hopes that it becomes less terrible someday, but until then you should probably use something else:pyactp,openvoronoi,opencamlib,libareaDesign Goals: Why BotherThere are a lot of other options above. However, most of them aren't super active and are generally C- based with python bindings. This is intended as a vectorized numpy approach to the same problem, in the vein oftrimesh.ScopeAccept shapely.geometry.Polygon objects as inputGenerate toolpath output as a sequence of (n, 2) float arraysCollision check and calculate feed rates using raster checks
Package: pocketlab
pocketLabA Command Line Tool for Managing Laboratory ProjectsDownloads:http://pypi.python.org/pypi/pocketLabSource:https://github.com/collectiveacuity/pocketLabDocumentation:https://collectiveacuity.github.io/pocketLab/InstallationFrom PyPi:$ pip install pocketlabFrom GitHub:$ git clone https://github.com/collectiveacuity/pocketlab
$ cd pocketlab
$ python setup.py sdist --format=gztar,zip
$ pip wheel --no-index --no-deps --wheel-dir dist dist/pocketlab-0.*.tar.gz
$ pip install dist/pocketlab-0.*-py3-none-any.whlGetting StartedThis module is designed to manage the development operations of lab projects and make it easier to deploy code across different platforms. Pocket Lab relies heavily upon Docker to provide consistency across development environments but it also streamlines the Docker workflow without compromising the security of credentials and sensitive code.Service-Oriented ArchitecturePocket Lab is built to facilitate a service-oriented architecture. A service can be a data processor, client-side code, a backend server, a job scheduler, a database, etc… But a service also maps one-to-one to many other components of development: a repo, an image, a container, a folder, etc… Importantly, a project or application is typically made up of one or more services and services can also be provided by a third party. This module uses the service as the principle atomic component to manage the compositional process of project development.Initialize the lab framework in the working directory:$ lab init <service>Return to service root from any directory:$ home <service>For a list of all the commands, refer to theReference Documentation on GitHub
Package: pocket-mongo
Pocket MongoAn easy-to-use and quick setup interface for MongoDB.Pocket Mongo was build to help developers manage collections, and their methods, in a single class.
Allows full access topymongoAPI
while offering customizable methods for implementing the business rules associated with the collection.Getting StartedInstallingpipinstallpocket-mongoExamplesLets say you need a collection to store some cars informations:frompocket_mongoimportBaseCollectionclassCars(BaseCollection):collection_name='cars'Cars.collection.insert_many([{'car':'Ford Torino','horsepower':140.,'origin':'US',},{'car':'Volvo 145e','horsepower':112.,'origin':'Europe',},{'car':'Chevrolet Impala','horsepower':150.,'origin':'US',},])Now you can implement methods to query, insert and perform aggregations on that collection:classCars(BaseCollection):collection_name='cars'@classmethoddefget_us_only(cls)->List[Dict]:returncls.collection.find({'origin':'US'})
Package: pocket-recommendations
pocket-recommendationsUnofficial library to get a feed of one's Pocket recommendationsUsageGet a public Pocket profile, likethis one. Download its HTML using Python or anything else:$curl"https://getpocket.com/@honzajavorek">getpocket-com-honzajavorek.htmlIn your Python program, have the HTML ready as a string:>>>frompathlibimportPath>>>html_text=Path('getpocket-com-honzajavorek.html').read_text()Now you can use this library to parse the HTML:>>>importpocket_recommendations>>>items=pocket_recommendations.parse(html_text)>>>len(items)50Each item then looks like this:>>>frompprintimportpprint>>>pprint(items[0]){'pocket_comment':'Šablona na váš úspěšný HackerNews post','pocket_recommended_at':None,'pocket_url':'https://getpocket.com/redirect?&url=https%3A%2F%2Fsaagarjha.com%2Fblog%2F2020%2F05%2F10%2Fwhy-we-at-famous-company-switched-to-hyped-technology%2F&h=eff6d8cac22c9b475463d037037b0efdcf44b762c9b0b7913de2104cab5fa67d','title':'Why we at $FAMOUS_COMPANY Switched to $HYPED_TECHNOLOGY','url':'https://saagarjha.com/blog/2020/05/10/why-we-at-famous-company-switched-to-hyped-technology/'}Even though Pocket uses HTTP links for the redirects, the library forces HTTPS.Date of RecommendationYou can specify the date when the HTML has been downloaded to get the relative dates when the recommendations have been posted:>>>fromdatetimeimportdate>>>items=pocket_recommendations.parse(html_text,today=date(2020,6,3))>>>pprint(items[0]){'pocket_comment':'Šablona na váš úspěšný HackerNews post','pocket_recommended_at':datetime.date(2020,6,2),'pocket_url':'https://getpocket.com/redirect?&url=https%3A%2F%2Fsaagarjha.com%2Fblog%2F2020%2F05%2F10%2Fwhy-we-at-famous-company-switched-to-hyped-technology%2F&h=eff6d8cac22c9b475463d037037b0efdcf44b762c9b0b7913de2104cab5fa67d','title':'Why we at $FAMOUS_COMPANY Switched to $HYPED_TECHNOLOGY','url':'https://saagarjha.com/blog/2020/05/10/why-we-at-famous-company-switched-to-hyped-technology/'}Missing CommentIf there is no comment, it is set toNone:>>>fromdatetimeimportdate>>>items=pocket_recommendations.parse(html_text)>>>pprint(items[15]){'pocket_comment':None,'pocket_recommended_at':None,'pocket_url':'https://getpocket.com/redirect?&url=https%3A%2F%2Falmad.blog%2Fessays%2Fwhat-is-employment%2F&h=ef4216c9df41763fa900b12815a280bf790f50960468a45ebed5f3682156dc6a','title':"We Don't Know What an Employment Is",'url':'https://almad.blog/essays/what-is-employment/'}Misinterpreted HTML EntitiesIf the title contains some misinterpreted HTML entities, the library takes care of it:>>>fromdatetimeimportdate>>>items=pocket_recommendations.parse(html_text)>>>pprint(items[15])# title: We Don&#039;t Know What an Employment Is{'pocket_comment':None,'pocket_recommended_at':None,'pocket_url':'https://getpocket.com/redirect?&url=https%3A%2F%2Falmad.blog%2Fessays%2Fwhat-is-employment%2F&h=ef4216c9df41763fa900b12815a280bf790f50960468a45ebed5f3682156dc6a','title':"We Don't Know What an Employment Is",'url':'https://almad.blog/essays/what-is-employment/'}
Package: pockets
Let me check my pockets…The Pockets library pulls together many of the Python helper functions I’ve
found useful over the years.If you’ve worked on a project that exports an API and accesses a data store,
you’ve probably seen some code that looks like this:# Receive a data type with underscores from some API
data_type = 'user_preference'

# Convert underscored data type to CamelCase to match the data model
model_name = camel(data_type)

# Resolve the model name into a model class
model_class = resolve(model_name, modules=["webapp.model.admin",
                                           "webapp.model.user",
                                           "webapp.model.businesslogic"]

# Instantiate the model class and do stuff with the instance...
instance = model_class()There’s an impedance mismatch any time you work with two different frameworks;
especially when you want to update your back-end while maintaining legacy
compatibility with an external API.Pockets is full of highly tested, well maintained functions that help bridge
the gap. Here are just a few examples…Easily get the right logger no matter where you are>>> from pockets.autolog import log
>>> log.error("Always log from the correct module.Class!")
mymodule.MyClass: Always log from the correct module.Class!Convert underscore_separated string to CamelCase>>> from pockets import camel
>>> camel("xml_http_request", upper_segments=[1])
'XmlHTTPRequest'Convert CamelCase string to underscore_separated>>> from pockets import uncamel
>>> uncamel("XmlHTTPRequest")
'xml_http_request'Resolve a string into an object>>> from pockets import resolve
>>> resolve("calendar.TextCalendar")
<class 'calendar.TextCalendar'>Peek ahead iterator>>> from pockets import iterpeek
>>> p = iterpeek(["a", "b", "c", "d", "e"])
>>> p.peek()
'a'
>>> p.next()
'a'
>>> p.peek(3)
['b', 'c', 'd']Downloads and DocsFull documentation is available onRead the Docs.Built packages are available onPyPI.Source codeis available onGitHub. Feel free to:Create an issueto request a
feature or a report a bug.Fork the repositoryand make
changes to themasterbranch for next release.Send a pull request and pester the maintainer until it’s merged. Make sure
to add yourself toAUTHORSand updateCHANGES.Build Status
Package: pocketsearch
pocketsearchpocketsearch is a pure-Python full text indexing search library based on SQLite and theFTS5extension. It providesA simple API (inspired by the ORM layer of the Django web framework) for defining schemas and searching - no need to write SQLMulti-field indices using schemas including text, numeric and date/datetime searchPrefix, phrase and initial token queriesSpell checkingBoolean search queriesHighlightning search results and extracting snippetsAutocomplete featuresPocketsearch does not have any dependencies other than Python (3.8 or higher).Quick startInstall using PIP:pipinstallpocketsearchPocketsearch requires Python 3.8 or higher.Create a search index using a PocketWriter and store it to database my_db.db:importpocketsearchwithpocketsearch.PocketWriter(db_name="my_db.db")aspocket_writer:pocket_writer.insert(text="Hello world")Open the search index using a PocketReader to perform searches:importpocketsearchwithpocketsearch.PocketReader(db_name="my_db.db")aspocket_reader:forresultinpocket_reader.search(text="Hello world"):print(result.text)You can define custom schemas to create multi-field indices:importpocketsearchaspsclassProduct(ps.Schema):price=ps.Int()description=ps.Text(index=True)# part of full text (FT) indexcategory=ps.Text()# not part of FT indexwithps.PocketWriter(db_name="my_db.db",schema=Product)aspocket_writer:pocket_writer.insert(description="Apple",category="Fruit",price=3.21)pocket_writer.insert(description="Orange",category="Fruit",price=4.11)withps.PocketReader(db_name="my_db.db",schema=Product)aspocket_reader:# Search for products with a price greater than or equal 3:print(pocket_reader.search(price__gte=3).count())Read the complete documentation athttps://pocketsearch.readthedocs.io/StatusThe package is currently in Beta status.
Package: pocketsmith-api
pocketsmith-apiPocketsmithAPI client, automatically generated withOpenAPI Generatorfrom amanicured versionof theofficial OpenAPI specInstallationpipinstallpocketsmith-apiUsage>>>importpocketsmith>>>client=pocketsmith.PocketsmithClient('my-api-key')>>>client.users.get_me(){'always_show_base_currency': False,'avatar_url': 'https://secure.gravatar.com/avatar/73e4f4549e97ad9d53e11b8e987f4b90?d=404','base_currency_code': 'usd','beta_user': True,'created_at': datetime.datetime(2016, 10, 17, 6, 22, 44, tzinfo=tzutc()),'email': 'yak@y4k.dev','id': 1234565,'last_activity_at': datetime.datetime(2020, 10, 3, 6, 57, 44, tzinfo=tzutc()),'last_logged_in_at': datetime.datetime(2020, 10, 3, 4, 58, 35, tzinfo=tzutc()),'login': 'yamsandwich','name': 'Yam S Andwich','time_zone': 'Eastern Time (US & Canada)','updated_at': datetime.datetime(2020, 10, 3, 6, 57, 44, tzinfo=tzutc()),'using_multiple_currencies': False,'week_start_day': 0}Generating the libraryThe@openapitools/openapi-generator-clinpm package is used for generation. This package will automatically download the latest OpenAPI Generator .jar. To install, run:npminstall-g@openapitools/openapi-generator-cliThen, run the following to generate the library from spec, and add a few customizations on top (like thePocketsmithClientclass)./generate-pocketsmith-library.sh
Package: pocketsmith-web-client
pocketsmith-web-clientA web-based client for Pocketsmith, which adds support for a few things missing from the API:Searching transactionsSyncing institutions, including those requiring MFA!Real-time events throughPusher(just like the web UI)Installationpipinstallpocketsmith-web-clientUsageimportasynciofrompocketsmith_webimportPocketsmithWebClientpwc=PocketsmithWebClient(username='hambob',password='Myspace123',# If 2fa is enabled on the account — NOTE: this is the KEY, not a one-time code!totp_key='81r0dq0815u88qi2',)asyncdefmain():# Check login — NOTE: API methods requiring auth will automatically call thisawaitpwc.login()# Search for some transactions and print them outasyncfortransactioninpwc.search_transactions('Merchant, inc'):print(f'[{transaction["id"]:>8}]{transaction["date"]:%Y-%m-%d}${transaction["amount"]:.2f}')# Sync some institutions# NOTE: these parameters can be scraped from the Account Summary page,#       in URLs of the format: "/feeds/user_institutions/<uys_id>/refresh?item_ids%5B%5D=<item_id>awaitpwc.sync_institution(162303,91821548)asyncio.run(main())If you have an institution requiring MFA info, the Pusher client can be used to provide this info when requested. It's up to you to figure out how to acquire the MFA info, though — whether it's from user input, a generated TOTP, a text message, email, etc.importasyncioimportjsonfrompocketsmith_webimportPocketsmithWebClient,PusherEventpwc=PocketsmithWebClient('hambob','Myspace123',totp_key='81r0dq0815u88qi2')asyncdefsync_my_mfa_bank():uys_id=162303item_id=91821548awaitpwc.sync_institution(uys_id,item_id)asyncwithpwc.pusher()aspusher:# Wait for an MFA event for our bankawaitpusher.events.expect(PusherEvent.MfaChanged(pwc.pusher_channel),matches_uys_item(uys_id,item_id),)# Grab the MFA popup form detailsmfa_req=awaitpwc.get_mfa_form_info()# Ask the user for the MFA deets, pleaseprint(f'MFA deets required:{mfa_req["label"]}')token=input('Token: ')# Now shoot the token back to Pocketsmithawaitpwc.provide_feed_mfa(uys_id,item_id,token)defmatches_uys_item(uys_id,item_id):uys_id=str(uys_id)item_id=str(item_id)defdoes_event_match_uys_item(event:PusherEvent):ifnotisinstance(event.data,dict):returnFalseevent_uys_id=event.data.get('user_yodlee_site_id')event_items=event.data.get('new_mfa_items',())ifisinstance(event_items,str):try:event_items=json.loads(event_items)except(TypeError,ValueError):passreturnuys_id==event_uys_idanditem_idinevent_itemsreturndoes_event_match_uys_itemasyncio.run(sync_my_mfa_bank())
Package: pockette
pockette: Pocket command-line interfaceCommand line tools for working with Pocket data.RequirementsSetupDependenciesConfigurationUsageCommandsOptionsDevelopmentTestsLint checksType checksRequirementsPython 3.7Pocket API credentialsSetupDependenciespipinstallpocketteConfigurationSet thePOCKET_CONSUMER_KEYandPOCKET_ACCESS_TOKENenvironment variables. Use thepockette setupcommand for help.UsageCommandspockette setupCreate a Pocket application and authorize it to read your data.pockettesetuppockette reportCreate an overview report of all data.pockettereportpockette searchSearch for specific links.pockettesearchpockette readSearch for links and open them in a browser.pockettereadOptions--helpShow the help messages for each command.--countThe number of links to select.--offsetOffset the links selection by this count.--randomRandomize the links selection.--sort time/siteSort links by chronological (default) or alphabetical order.--reverseSort links in the reverse order.--includeInclude links with these keyword(s) (comma-separated).--excludeExclude links with these keyword(s) (comma-separated).--start YYYY-MM-DDShow links after this date.--end YYYY-MM-DDShow links before this date.--length short/longShow only short (<4 minutes) or long (>10 minutes) links.--allShow all unread links. Overrides all other search options.DevelopmentInstall development dependencies.pipinstall-e.[dev]TestsmaketestLint checksmakelintType checksmaketypecheck
Package: pocket-to-sqlite
pocket-to-sqliteCreate a SQLite database containing data from yourPocketaccount.How to installpipinstallpocket-to-sqliteUsageYou will need to first obtain a valid OAuth token for your Pocket account. You can do this by running theauthcommand and following the prompts:pocket-to-sqliteauthWhich looks like this:Visit this page and sign in with your Pocket account:

https://getpocket.com/auth/author...

Once you have signed in there, hit <enter> to continue
Authentication tokens written to auth.jsonNow you can fetch all of your items from Pocket like this:pocket-to-sqlitefetchpocket.dbThe first time you run this command it will fetch all of your items, and display a progress bar while it does it.On subsequent runs it will only fetch new items.You can force it to fetch everything from the beginning again using--all. Use--silentto disable the progress bar.Using with DatasetteThe SQLite database produced by this tool is designed to be browsed usingDatasette. Use thedatasette-render-timestampsplugin to improve the display of the timestamp values.
Package: pocketutils
pocketutilsAdorable little Python functions for you to copy or import,Apache-licensed.pip install pocketutilsorpip install pocketutils[all]Basic usage –Toolsfrompocketutils.fullimportToolsTools.zip_strict([1,2,3],[5,6])# error <-- lengths must matchTools.strip_brackets("( (xy)")# "(xy" <-- strips paired onlyTools.sanitize_path("x\ty")# "xy"  <-- very robust cross-platform sanitizationTools.delete_surefire("my_file")# <-- Attempts to fix permissions if neededTools.git_description("my_repo").tag# <-- get git repo infoTools.pretty_function(lambdas:None)# "<λ(1)> <-- decent name for any objectTools.roman_to_arabic("XIV")# 14  <-- inverse function tooTools.delta_time_to_str(delta_sec=60*2+5)# "02:05"  <-- handles days tooTools.round_to_sigfigs(135.3,2)# 140  <-- rounding to sigfigs-properTools.pretty_float(-float("-inf"))# "−∞"  <-- proper unicode, no trailing 0sTools.stream_cmd_call(["cat","big-file"],callback=fn)# <-- buffer never fillsTools.strip_off("hippopotamus","hippo")# "potamus"  <-- what .strip() should doTools.strip_quotes("'hello'")# "hello"Tools.truncate10("looong string")# "looong st…"Tools.parse_bool("true")# TrueTools.parse_bool_flex("yes")# TrueTools.look(item,"purchase.buyer.first_name")# None if purchase or buyer is NoneTools.friendly_size(n_bytes=2*14)# "16.38 kb"Tools.is_probable_null("NaN")# TrueTools.is_true_iterable("kitten")# FalseTools.or_null(some_function)# None if it failsTools.or_raise(None)# raises an error (of your choice)Tools.trash(unwanted_file)# move to os-specific trashTools.pretty_dict({"contents":{"greeting":"hi"}})# indentedTools.save_diagnostics(Tools.get_env_info())# record diagnostic infoTools.is_lambda(lambda:None)# TrueTools.longest(["a","a+b"])# "a+b"  # anything with lenTools.only([1,2])# error -- multiple itemsTools.first(iter([]))# None <-- better than try: next(iter(x)) except:...Tools.trace_signals(sink=sys.stderr)# log traceback on all signalsTools.trace_exit(sink=sys.stderr)# log traceback on exit# lots of othersMore thingsFancyLoguru(really useful)NestedDotDict(esp. for toml and json)QueryUtils(handles rate-limiting, etc.)FigTools(for matplotlib)J(tools to interact with Jupyter)WB1(microwell plate nomenclature)Chars(e.g.Chars.shelled(s)orChars.snowflake)exceptions(general-purpose exceptions that can store relevant info)Even more, albeit more obscure:TissueExpression,UniprotGo,AtcTree,PlateRoisWebResource,magic_templatecolor_schemes,FigSaver,RefDimsLoopToolsMemCacheSee the docs 📚, or justbrowse the code.New issuesand pull requests are welcome.
Please refer to thecontributing guideandsecurity policy.
Generated with tyrannosaurus:tyrannosaurus new tyrannosaurus
Package: poclib3
poclib3Installationpip3installpoclib3UsageWebshellfrompoclib3.webshellimportget_godzilla_jsp_shell,get_shell_resultwebshell=get_godzilla_jsp_shell()print(webshell.tool)# godzillaprint(webshell.type)# jspprint(webshell.mode)# java_aes_base64print(webshell.pas)# passprint(webshell.key)# keyprint(webshell.raw_content)# [raw webshell]print(webshell.content)# [unicode-encoding one-line webshell]result=get_shell_result(webshell)print(result)# {'pas': 'pass', 'key': 'key', 'tool': 'godzilla', 'mode': 'java_aes_base64', 'type': 'jsp'}Brutefrompoclib3.bruteimportWEAK_PASSWORDAtlasexportATLAS_DOMAIN=...exportATLAS_IDENTIFY=...exportATLAS_TOKEN=...importosfrompoclib3.atlasimportAtlasatlas=Atlas()flag=atlas.build_request(type="web")os.system("curl "+flag["url"])print(atlas.verify_request(flag["flag"],type="web"))flag=atlas.build_request(type="dns")os.system("ping -nc 2 "+flag["url"])print(atlas.verify_request(flag["flag"],type="dns"))