Saravanan666/pypi-org huggingface dataset:
Package: longtrends
longtrendsA package to download long-term Google Trends.IntroductionGoogle Trends, downloadable by API usingpytrends, limits the time period which can be downloaded using a single request. Each request is scaled between 0 and 100, making comparison between different time periods difficult. This package automatically downloads overlapping trends and rescales them, providing trend data across a long-term period.Installationpip install longtrendsRequirementsRequirespytrends, installed automatically withpip.Quick Startfrom longtrends import LongTrend
from datetime import datetime

keyword = 'suncream'

# Create LongTrend object
longtrend = LongTrend(
                      keyword=keyword,
                      start_date=datetime(2018, 1, 1),
                      end_date=datetime(2022, 3, 31))        # use verbose=True for print output
# Build long-term trends
lt_built = longtrend.build()

# Plot
lt_built.plot(title=f"Google Trends: {longtrend.keyword}", figsize=(15, 3))Under the hoodFirst, longtrends downloads overlapping trends.from longtrends import rescale_overlaps, get_overlapping_trends, rescaled_longtrend
import pandas as pd

overlapping = get_overlapping_trends(
                                keyword=keyword,
                                start_date=datetime(2018, 1, 1),
                                end_date=datetime(2022, 3, 31),
                                verbose=True)

pd.concat(overlapping, axis=1).plot(figsize=(15,3), legend=False)Next, i+1th overlap is rescaled to ith overlap.rescaled = rescale_overlaps(overlapping)
pd.concat(rescaled, axis=1).plot(figsize=(15,3), legend=False)Finally, a single long-term trend is picked.rescaled = rescaled_longtrend(rescaled)
rescaled.plot(figsize=(15,3), title='Rescaled long-term trend')DisclaimerThis is not an official or supported product. It is provided without warranty under MIT license.
Package: longtroll
``longtroll``===========*Detect long-running processes and notify you when they're done.*Using ``longtroll``-----------------``longtroll`` pretty much does what it says on the box. In order to startdetecting long-running processes, run ``longtroll.py bind`` in your shell. Fromthen on, when a long-running process in that shell finishes, your notificationcommand will be called.Before you start using ``longtroll``, you need to create a configuration file.A sample configuration file can be found in the repository as``longtrollrc-sample``. Copy this file to ``~/.longtrollrc``, or create your own.The configuration file takes two options: ``seconds`` and ``notify``, asfollows::seconds 10notify echo <cmd> (pid <pid>) completed | wall``seconds`` is the number of seconds that a process has to live before it isconsidered "long-running". ``notify`` is a command that will be run when yourprocess completes. The tokens ``<cmd>`` and ``<pid>`` will automatically be replacedby the command and the PID of the process that completed.Roadmap-------* Add a ``longtroll.py unbind`` command* Allow configuration of the poll time* Some kind of notification method for when a long-running process is detected
Package: long-utils
安装pipinstalllong-utils图中找图fromlong_utils.image.searchimportImgFindImgimg=ImgFindImg(img_source='static/big.png',img_search='static/small.png')img.find_coord(is_debug=True)# 或者只拿取小图在原图中的坐标rectangle, 小图在原图中的大小result，confidence表示准确率res=img.find_coord()# [{'result': (539.0, 21.5), 'rectangle': ((524, 10), (524, 33), (554, 10), (554, 33)), 'confidence': 1.0}]print(res)简单日志输出fromlong_utilsimportLoglogger=Log(show_line=True,show_file_name=True,show_time=True)logger.error(message="xxxx")logger.success(message="xxxx")logger.warning(message="xxxx")logger.info(message="xxxx")logger.debug(message="xxxx")logger.success_bg('xxxx')logger.error_bg('xxxx')logger.warning_bg('xxxx')logger.debug_bg('xxxx')logger.info_bg('xxxx')logger.color('xxxx',fg='blue',bg='black')
Package: lonhand
LonHand client libraryLonHand protocol implementation for USR-WP1 smart socket (one-channel relay) by USR IOT.Product linkUsage:from lonhand import device

# create switch
switch = WifiRelay('192.168.1.23')

# turn on
switch.turn_on()

# get state
state = switch.is_on()

# turn off
switch.turn_off()ProtocolCommand:55 AA - distinguishes a command, unlike for example the password which
        should be sent as is (with suffix 0D 0A)
00 03 - represents the length in bytes of the command (real) that follows,
        including the byte 00 (see below)
00    - fixed, reserved and not usable. However, it contributes to forming 
        the length in bytes of the command, for example in case of a device
        renaming command (which will contain the new name assigned): the
        length byte (and the checksum) will be recalculated also according
        to the length of the new name
02    - the actual command (ON)
01    - command parameter; in this case we are giving the ON command (02)
        and as a parameter the channel number to be switched on (01).
06    - checksum, and represents the sum (in HEX) of the parts: 
        (0x00 + 0x03 + 0x00 + 0x02 + 0x01) = 0x06Response:AA 55 - marks the message as a response
00 04 - response length
00    - reserved
82 01 - is the confirmation response to the ON command
01    - channel/port that was affected
88    - checksum: (0x00 + 0x04 + 0x00 + 0x82 + 0x01 + 0x01) = 0x88
Package: loniapi
loniapiloniapi is a Python package to make calls to the LONI API. It can list all files associated with a group-id and download specific files.InstallationDownload the latest version of the loniapi package from Pypihttps://pypi.org/project/loniapi/pipinstallloniapiIf step 1 errors outInstall pandas if it is not already installed. and requests. or upgradepipinstallpandas# pip install pandas --upgradepipinstallrequests# pip install requests --upgradeCreate a config file in your home directorycd~
vim.loniApiConfigSpecify your group-id and loni log-in credentials[<your-group-id>]email=<your-email>password=<your-passwordUsagefromloniapiimportfiledownloadermyAPI=filedownloader.LoniApi()# Log-in using a group ID acquired from IDA/LONImyAPI.login('ampad')# get list of files associated with the group idloniAPI.get_LONI_files()# test download a few file typesmyAPI.download_LONI_file('1')#is a pdfmyAPI.download_LONI_file('3')#is a csv# to download a specific file versionmyAPI.download_LONI_file(file_id='2',version='2015-11-13')#is a pdf# log outmyAPI.logout()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: loo
# looman-cli
[![Actions Status](https://github.com/LooMan/looman-cli/workflows/Upload%20Python%20Package/badge.svg)](https://github.com/LooMan/looman-cli/actions)## Installpip install loo## Upgradepip install loo –upgrade## Upload new versionpython setup.py sdist bdist_wheeltwine upload dist/*
Package: loo_encoder
leave-one-out-encoderLeave one out coding for categorical featuresSee the source for this project here:https://github.com/welfare520/leave-one-out-encoder.Getting StartedInstalling$ pip install loo_encoderExampleFit encoder according to X and y, and then transform it.fromloo_encoder.encoderimportLeaveOneOutEncoderimportpandasaspdimportnumpyasnpenc=LeaveOneOutEncoder(cols=['gender','country'],handle_unknown='impute',sigma=0.02,random_state=42)X=pd.DataFrame({"gender":["male","male","female","male"],"country":["Germany","USA","USA","UK"],"clicks":[10,33,47,21]})y=pd.Series([150,250,300,100],name="orders")df_train=enc.fit_transform(X=X,y=y,sample_weight=X['clicks'])Perform the transformation to new categorical data.X_val=pd.DataFrame({"gender":["unknown","male","female","male"],"country":["Germany","USA","Germany","Japan"]})df_test=enc.transform(X=X_val)
Package: loofah
loofahA tool to list test fixtures declared but not used in a test:This tool is actually a pytest plugin, and with some improved packaging could
be installed, and then called via thepy.testcommand line.FeaturesUses the pytest collection to get a list of tests and available fixturesParses the code for each function to determine whether fixture arguments
are used or not in the testSupports a list of "ignored" fixtures, since some fixtures are only used
to create and tear down a particular context, and might not be used directly
in the test codeInstallationYou can installloofahviapip:$ pip install loofahUsageSince loofah relies on pytest collecting and being able to execute the tests,
it needs to be run from your normal development shell, and probably installed
in the venv of your project.So, from your normal development shell, run loofah as you would run your tests:
(ie with any required environment variables or virtual environment enabled, etc)$ loofah test/unit
...
test/unit/account_tests.py:10 in test_account_update_requires_login detected 1 unused fixture:
    user
test/unit/account_tests.py:28 in test_account_locks_after_three_attempts detected 2 unused fixtures:
    user
    monkeypatchWhy 'loofah' ?Why name this project after a fruit with fibrous, spongy interior often used to
clean hard-to-reach areas of the human body?  That's a mystery indeed.LicenseDistributed under the terms of theMIT_ license, "loofah" is free and open source software
Package: lookahead
Constructs a generator over the iterable yielding look-ahead (and/or
“look-behind”) tuples. One tuple will be generated for each element value
accessible from the iterator, containing that element and the number of
elements specified just prior to and immediately after. When no such
element exists, the None is used instead.If one were to think of iterator as a list, this is would be similar to
appending[None]*lookaheadand prepending[None]*lookbehind, then
iterating over and returning a sliding window of lengthlookbehind+1+ lookahead(except of course that instead of generating
the such a list, this implementation generates (and caches) lookahead
values only as needed).lookahead() may be called with 1, 2, or 3 parameters:lookahead(iterable)Defaults to lookahead=1, lookbehind=0lookahead(iterable, lookahead)Defaults to lookbehind=0lookahead(iterable, lookbehind, lookahead)Notice that lookahead is now the 3rd parameter!Example semantics:lookahead(iterable):yield (item, next)lookahead(iterable, 2):yield (item, next, next+1)lookahead(iterable, 1, 2):yield (prev, item, next, next+1)lookahead(iterable, p, n):yeild (prev, …, prev+p-1, item, next, …, next+n-1)
Package: lookaheadtools
lookaheadtoolsThe lookaheadtools module extends generic iterators to support look-ahead,
and also provides some convenient look-ahead iterators that are useful for
processing text files.Lookahead is implemented by extending iterators with support for __getitem__().
For example:import lookaheadtools as la
looker = la.lookahead(iter([0,1,2,3,4]))
assert looker[3] == 3
assert looker[0] == 0
assert looker[1000] == None
assert looker[0:9:2] == [0,2,4]
assert next(looker) == 0
assert looker[0] == 1As seen in the example, myLookaheadIter[0] returns the value that will
be returned by next(myLookaheadIter) but without consuming it.
Arbitrary lookahead distance is supported.  Attempts to lookahead
past the end of the iterator will return None.  The look-ahead index
can be any slice with positive indices.Classes ProvidedLookahead(object) – Convert any iterator into a look-ahead iterator.LinesOf(object) – Iterate line-by-line over a string, emulating text file
iteration.Lexpos (a named tuple) – Convenience class for capturing lexical
tracking information.FileLookahead(Lookahead) – FileLookahead() is a specialization of the
Lookahead() class that iterates by characters over a text file with
full lexical position tracking.LexAhead(FileLookahead) – LexAhead() is a specialization of
FileLookahead() that includes some simple tokenizing utilities,
stopping short of being a full tokenizer.  See tokenizertools
for a module that builds a tokenizer on top of LexAhead().lookaheadtools newsUpdate history.15-Sep-20161.0 release.
Tweaked setup.py to make it more robust.16-June-20140.2b release.
Package: look-at
Command line window focus switcher==================================Switch to the desktop containing the application, raise the window, and give it focus.Installation------------Install [`wmctrl`][wmctrl] then run:$ easy_install look-atUbuntu users could try ppa:$ sudo apt-add-repository ppa:e15/ppa$ sudo apt-get update$ sudo apt-get install look-atUsage-----$ look-at <application>Use cases---------Bind keyboard shortcuts with `~/.xbindkeysrc` to quick access to the desiredapplication:#Launch or switch to terminal"look-at gnome-terminal"Mod4 + 1#Launch or switch to browser"look-at firefox"Mod4 + 2#Lunch or switch to IM client"look-at empathy"Mod4 + 3#Lunch or switch to E-mail"look-at thunderbird"Mod4 + 4and reload settings:$ killall -HUP xbindkeysDetails-------Development of `look-at` happens on Github: http://github.com/generalov/look-atIt uses [`wmctrl`][wmctrl] tool to interact with a EWMH/NetWM compatible XWindow Manager.[wmctrl]: http://tomas.styblo.name/wmctrl/
Package: look_at_me
# Look At Me - Control Me## Description* Look At Me: a simple way to plot the value of your variable, in real time, in your browser. Just add one line in your code and you're good to go. Very pretentious.* Control Me: a simple way to modify some parameters in your code, in real time, from your browser, and you can see the effect in your _look at me_ graph.## Flash tutorialIn the root directoryPYTHONPATH+=. python exemples/basic.pypython src/gateway/app.pyNow go to ``http://localhost:5000/``## A day in a programmer's lifeOne day, I had to change a piece code that produced some data and I wanted to see what it was doing? So I designed a ugly hack to plot the data. Redirect everything in a file, used Matplolib / gnuplot to plot them and it was OK. Don't judge me, you've done that too, or not -- but in this case you still don't know what is happening and you're not better than me --.Then I had an other project, other data, same problem. Data format was different, copy paste the hack, tweak it and Bob's your uncle, I have the trend.Then, something awful happened, I had to look at the data *while* they were produced. No problem, Matplotlib has an animation library, you update the data, everything is good. Too bad it had to work on MacOs where Matplotlib's animation framework is broken...Now imagine I have to set a threshold on these data. What can I do? I can plot them, modify my program, kill it, compile / launch it and I can see my value is wrong. Great! Took me 20 seconds to change a number and now I'm checking my mails... All this to modify the threshold again.So I decided to create _look at me / control me_ a simple logging / visualization tool for variables where you can also easilly control / change them.## Comparison with other tools* Print: great, but where is the plot ?* Print and gnuplot: what if I tell you that some people what to see things we they happen and not (a long time) after they happened?* Matplotlib (python): same as gnuplot.* Awesome custom Qt5 application: you must be kidding.More seriously, they are great tools for some applications. Nevertheless, you have make some custom ad hoc code each time and it's a pity.## Installation - requirements## How it works* Send data to a gateway* GW sends data to visualisation tool## Limitations* Perf issues on real time* Graph types
Package: lookatme.contrib.grapheasy
lookatme.contrib.grapheasyThislookatmeextension adds graph support to code blocks.SetupPrerequisitesgraphvizgraph-easyInstallationpip3installlookatme.contrib.grapheasyUsageAdd grapheasy into the extensions header in your file:---title:Making of The Pan Galactic Gargle Blasterauthor:Zaphod Beeblebroxdate:2022-01-25extensions:-grapheasy---Then define some code blocks:# Graph::Easyhttp://bloodgate.com/perl/graph/manual/```grapheasy[ Ol' Janx Spirit ] - to -> [ Santraginus V Water ]```---# Graphvizhttp://www.graphviz.org/```dotdigraph{subgraphcluster_0{a0->a1->a2->a3;label="process \#1";}subgraphcluster_1{b0->b1->b2->b3;label="process \#2";}start->a0;start->b0;a1->b3;b2->a3;a3->a0;a3->end;b3->end;}```---# VCG & GDLNot tested but sopposedly supported by easy-graph:-https://www.rw.cdl.uni-saarland.de/people/sander/private/html/gsvcg1.html-https://www.absint.com/aisee/DevelpomentPull requests welcome. Some notes for future reference:pip3install.# install directlypython3setup.pysdistbdist_wheel# package for releasetwineupload--repositorytestpypidist/*# upload to test.pypi.orgtwineuploaddist/*# publish to pypi
Package: lookatme.contrib.image-ueberzug
lookatme.contrib.image_ueberzugThis is alookatmeextension that
usesueberzugandurwid-ueberzogento provide image rendering support. This works on linux only (or wherever
ueberzug functions).After successfully installing, you should see something like this:Installationpipinstalllookatme.contrib.image_ueberzugUsageUse images! For now, only local images are supported. Remote image support
will be added later.Enable this plugin by adding it to the metadata in the head of the markdown file.---
title: <title>
author: <author>
extensions:
  - image_ueberzug
---Use the text of the image to indicate the height (number of rows) that the
image should use when rendered. The example below will renderpath/to/image.pngwith a height of7rows:![7](path/to/image.png)
Package: lookatme.contrib.qrcode
lookatme.contrib.qrcodeThislookatmeextension adds
QR code rendering capabilities to the code blocks.Installationpipinstalllookatme.contrib.qrcodeUsageAdd the qrcode into the extensions array in the
slide YAML header:---
title: A title
author: Me
date: 2019-12-04
extensions:- qrcode---Basic UsageWith the extension installed and declared in the YAML header, use it in your
markdown like so:# A Slide```qrcodehttps://github.com/d0c-s4vage/lookatme.contrib.qrcode```Extended UsageAnextended modeis also available that lets multiple columns of QR codes be rendered side-by-side:# A Slide```qrcode-excolumns:- data: https://github.com/d0c-s4vage/lookatmecaption: "**lookatme** project"- data: https://github.com/d0c-s4vage/lookatme.contrib.qrcodecaption: Text `lookatme.contrib.qrcode````DetailsRead the documentation
Package: lookatme.contrib.render
lookatme.contrib.renderThis is alookatmeextension that
renders code blocks of supported languages into images, which are then
rendered using whichever image rendering options the user has available.To get something useful out of this extension, you must have an image-rendering
contrib extension installed for lookatme that is able to display images, such
aslookatme.contrib.urwid_ueberzug.
Seelookatme's list of known extensionsfor other potential options.ExampleAfter installing this lookatme, this extension, andlookatme.contrib.urwid_ueberzug,
you should be able to see something like this:Installationpipinstalllookatme.contrib.renderUsageEnable this plugin by adding it to the metadata in the head of the markdown file.---
title: <title>
author: <author>
extensions:
  - render
---The following languages are currently supported:Code-block Language(s)RendererExecutable RequiredNotedot,graphvizGraphvizdotapt-get install graphvizmermaidmermaid.climmdcnpm install mermaid.cli; export PATH="$PATH:$(pwd)/node_modules/.bin"The height of the rendered image can be set by either appending-NorNto the codeblock language to specify the number of rows the rendered image
should use when being displayed.The example below will render a mermaid-js graph with a height of 10 rows:```mermaid-10
graph TD
  A0 -> B
  A1 -> B
  B -> C
  C -> D
```
Package: lookerapi-deprecated
### Authorization
# The Looker API uses LookerAPI3credentials for authorization and access control.
# Looker admins can create API3 credentials on Looker'sAdmin/Userspage. Pass API3 credentials to the/loginendpoint to obtain a temporary access_token.
# Include that access_token in the Authorization header of Looker API requests. For details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization)  ### Client SDKs  The Looker API is a RESTful system that should be usable by any programming language capable of making HTTPS requests. Client SDKs for a variety of programming languages can be generated from the Looker API's Swagger JSON metadata to streamline use of the Looker API in your applications. A client SDK for Ruby is available as an example. For more information, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks)  ### Try It Out!  The 'api-docs' page served by the Looker instance includes 'Try It Out!' buttons for each API method. After logging in with API3 credentials, you can use the &quot;Try It Out!&quot; buttons to call the API directly from the documentation page to interactively explore API features and responses.  ### Versioning  Future releases of Looker will expand this API release-by-release to securely expose more and more of the core power of Looker to API client applications. API endpoints marked as &quot;beta&quot; may receive breaking changes without warning. Stable (non-beta) API endpoints should not receive breaking changes in future releases. For more information, see [Looker API Versioning](https://looker.com/docs/r/api/versioning)
Package: lookfor1
lookforlookforis a simple command line tool to find things: files, directories, and files by extension.lookforconsists of only two commands (besides--versionand--help), and aims to replace two Unix commands by being simpler to use and return results faster.Installationpip install lf-lookforUsagelf <flag> <file/ext>Commands:--file, -f file/dir          searches for file/dir and prints all paths. Starts in cwd.
--ext, -e extension          searches for extension and prints all paths. Starts in cwd.
--version, -V                prints version info.
--help, -h                   prints usageunix commandlookfor commandwhat is doesfind . | grep file/dirlf -f file/dirprints all paths that matchfind . -type f -name "*.ext"lf -e extprints all paths that haveextRun testsrunpytestin the root directory of the project.
Package: looking-glass
LookingGlassA collaborative network / infrastructure visualization tool oriented towards use for defensive and offensive cyber operationsHow to runFrom the command line, execute:FLASK_APP=application.py flask runThis will make the application accessible locally athttp://127.0.0.1:5000To make the application accessible to other computers, add--host=0.0.0.0to the end of the commandFLASK_APP=application.py flask run --host=0.0.0.0Note:this is not recommended for production use and exposing a local webserver on your machine over the network has potential security considerations. Please do this with care.How to run on ElasticBeanstalkSet the LOCAL_MODE value to False (this will cause the graph state to be stored in S3 instead of locally on the ElasticBeanstalk instance, which is empheral)Create an AWS accountInstall and configure the AWS CLIFrom the root LookingGlass direcctory (i.e. where the root of the local LookingGlass git repository) runeb init -p python-3.6 <application name> --region <AWS region where the applicaiton should be hosted>Create an environment within your application by runningeb create <environment name>Open the application by runningeb openNote:you will be billed for all AWS infrastructure used will the application / environment are active; to stop the application, runeb terminate <environment name>Seethis pagefor more details