Saravanan666/pypi-org huggingface dataset:
Package: anywebscraper
anywebscraperHave you ever tried to access data from a number of sites only to be blocked? The solution is often to use proxies, which may or may not work. Don't worry,anywebscraperis the solution to these problems.anywebscraperis your ultimate web data extraction companion. We understand the challenges of web scraping, including dealing with anti-bot measures and the need for reliable proxies. Our library is designed to make web scraping easy and effective, even in the most challenging environments. Whether you're a data scientist, business analyst, or developer looking to harness the power of web data,anywebscraperhas you covered.We benchmarked our solution against websites such ashttps://www.g2.comandhttps://www.investing.com. The results are quite satisfactory, we have successfully web-scraped all the data without any problems.Key FeaturesNo Proxy Integration: Say goodbye to IP bans and blocked access.anywebscraperdoes not integrate with proxies but ensures uninterrupted data retrieval.Universal Compatibility: Our library can scrape data from virtually any type of website, including e-commerce platforms, social media networks, news sites, and more.Customisable and Scalable: If you're familiar with BeautifulSoup, bingo!anywebscraperreturns a BeautifulSoup-like object and is highly customizable to meet your specific scraping needs.Reliable Support: Count on our dedicated support team to assist you with any questions or issues you encounter.UsagepipinstallanywebscraperfromanywebscraperimportAnyWebScraper# Initializationwebscraper=AnyWebScraper()# Define the url of the website you want to web scrapeurl="your-website URL"# i.e url = "https://google.com"soup=webscraper.webScrape(url=url)# Returns 'BeautifulSoup' objectsoup.find("your-html-element",class_="your-class")Note that all BeautifulSoup methods can be applied to soup that our library returns:.prettify(), .find(), .find_all(), .get_text(), etc.ExampleLet's try to collect historical bitcoin data fromhttps://www.investing.comusing the classic method, as shown in this image:To do that, we can use Python code below:fromurllib.requestimporturlopenurl="https://www.investing.com/crypto/bitcoin"page=urlopen(url)html_bytes=page.read()html=html_bytes.decode("utf-8")print(html)An error is displayed stating that it is forbidden to request this link, as shown in this image.Now let's useanywebscraperto see the difference.fromanywebscraperimportAnyWebScraperurl="https://www.investing.com/crypto/bitcoin"web_scraper=AnyWebScraper()html=web_scraper.webScrape(url=url)print(html.prettify())We can see that there is no forbidden error and that our library returns data from this link. Now all we need to do is collect the relevant data, as we do with BeautifulSoup, using the appropriate methods.ContributionPull requests are welcome. For significant changes, please open an issue first to discuss what you want to change.
Package: anywidget
anywidgetcustom jupyter widgets made easy🛠️ create widgetswithout complicated cookiecutter templates📚publish to PyPIlike any other Python package🤖 prototypewithin.ipynbor.pyfiles🚀 run inJupyter,JupyterLab,Google Colab,VSCode, and more⚡ develop withinstant HMR, like modern web frameworksLearn more in theJupyter blog.Installationanywidgetis available onPyPI:pipinstall"anywidget[dev]"and also onconda-forge:condainstall-cconda-forgeanywidgetUsageimportanywidgetimporttraitletsclassCounterWidget(anywidget.AnyWidget):# Widget front-end JavaScript code_esm="""function render({ model, el }) {let button = document.createElement("button");button.innerHTML = `count is ${model.get("value")}`;button.addEventListener("click", () => {model.set("value", model.get("value") + 1);model.save_changes();});model.on("change:value", () => {button.innerHTML = `count is ${model.get("value")}`;});el.appendChild(button);}export default { render };"""# Stateful property that can be accessed by JavaScript & Pythonvalue=traitlets.Int(0).tag(sync=True)Front-end code can also live in separate files (recommend):importpathlibimportanywidgetimporttraitletsclassCounterWidget(anywidget.AnyWidget):_esm=pathlib.Path("index.js")_css=pathlib.Path("styles.css")value=traitlets.Int(0).tag(sync=True)Readthe documentationto learn
more.SupportHaving trouble? Get help in ourDiscordor open
aDiscussion.ContributingNew contributors welcome!Check out ourContributors Guidefor help getting started.Join us onDiscordto meet other maintainers.
We'll help you get your first contribution in no time!LicenseMIT
Package: ao2pyv
Converts Archive.org video searches into PyVideo.org API submissions.InstallationJustpip install ao2pyv.ExamplesThe quick and easy way:$ ao2pyv --query 'pyconza2014' \
         --category 'PyCon ZA 2014' \
         --language 'English'The explicit equivalent using a pipeline of commands:$ ao2pyv \
    source.archive-org --query 'pyconza2014' \
    transform.ao2pyv --category 'PyCon ZA 2014' --language 'English' \
    sink.json -f -Read the help for each of the commands in the pipeline:$ ao2pyv --help
$ ao2pyv source.archive-org --help
$ ao2pyv transform.ao2pyv --help
$ ao2pyv sink.json --helpUsageUsage: ao2pyv [OPTIONS] COMMAND1 [ARGS]… [COMMAND2 [ARGS]…]…Options:--versionShow the version and exit.-q,--queryTEXTArchive.org search query-c,--categoryTEXTPyvideo category-l,--languageTEXTPyvideo language--helpShow this message and exit.Commands:sink.json:Output results to a file.source.archive-org:Search archive.org for a query and return a…source.json:Return results from a JSON file.transform.ao2pyv:Transform a video result from archive.org to…transform.none:Transform a video result not at all.
Package: ao3-archivist
ao3-archivistReading list exporter forAO3reading history and Marked for Later.Installationao3-archivist is supported on Python 3.10 and above.You can install ao3-archivist directly fromPyPI:pipinstallao3-archivistIf you’d like, you can also install from source by downloadingthe latest releaseand installing:pipinstallpath/to/release/file.tar.gzIf you already have ao3-archivist installed, running either of these commands will update it.UsageBasic UsageTo export reading history,export your AO3 cookiesand runao3-archivist--username[USERNAME]--cookies/path/to/cookies/file.txtIf you want to export your Marked for Later, runao3-archivist--username[USERNAME]--cookies/path/to/cookies/file.txt--laterDocumentation>ao3-archivist--helpUsage:ao3-archivist[OPTIONS]ExportsAO3readinghistorytoaCSVfile.Options:--usernameTEXT(required)TheAO3usernametogethistoryfrom.--cookiesTEXT(required)PathtothecookiesfilefortheAO3account.--outTEXTPathtosavethearchiveCSVto.(default:archivist-username-[history/markedforlater]-timestamp-pagerange.csv)--startINTEGERWhichpagenumbertostartfrom.--endINTEGERWhichpagenumbertoendon.--laterFlagtoarchiveMarkedforLaterinsteadofHistory.--helpShowthismessageandexit.FAQHow do I get/pass cookies for ao3-archivist?First, log in to the AO3 account you wish to use with the script. You can then extract cookies from your browser using an extension such asGet cookies.txt(Chrome) orcookies.txt(for Firefox). The extracted cookies file must be in Mozilla/Netscape format. The first line should be either# HTTP Cookie Fileor# Netscape HTTP Cookie File.Once you have it downloaded to your computer, pass in the path to it using the--cookiesoption:ao3-archivist--username[USERNAME]--cookies/path/to/cookies.txt.Note that you must provide the cookies for the AO3 account matching the username. If you are archiving history multiple AO3 accounts, you will need to export cookies for each one separately, while logged in to the corresponding account.How long will it take to export my history?To prevent excess load to AO3 servers, ao3-archivist reads 30 pages of history per minute. Ex. If you have 300 pages of history, it will take about 10 minutes to run. This script gives the option of limiting which pages to export on each run.Can ao3-archivist remember what was already exported?No; ao3-archivist does not save any information about what was exported. If you’d like, you can clear your AO3 history after exporting to keep things neat. If you choose to keep the default filename, it includes the page range so you can keep track of how many new pages of history were added the next time you archive. (Please note that works may change order in your history if you revisit a work from later in your history.)Who has access to my AO3 information if I use ao3-archivist?Only you! Your cookies are only used to access the necessary AO3 pages for archiving (reading history and Marked for Later). Your information is only stored to your computer, and is not sent anywhere else at any time.
Package: ao3-cli
ao3-cliA CLI to download from archiveofourown.org using their built-in download option.To report issues for the CLI, open an issue athttps://github.com/arzkar/ao3-cli/issuesFeatures:Download works & series from archiveofourown.orgIt also supports downloading all works or series from any archiveofourown.org page.InstallationUsing pip (Recommended)pip install -U ao3-cliFrom Source (Might have bugs, for development use)pip install git+https://github.com/arzkar/ao3-cli@mainUsage> ao3_cli
Usage: ao3_cli [OPTIONS]

  A CLI to download from archiveofourown.org

  To report issues for the CLI, open an issue at
  https://github.com/arzkar/ao3-cli/issues

Options:
  -u, --url TEXT       The url of the fanfiction enclosed within quotes
  -i, --infile TEXT    Give a filename to read URLs from
  -l, --list-url TEXT  Enter a comma separated list of urls to download,enclosed within quotes
  -o, --out-dir TEXT   Absolute path to the Output directory for files(default: Current Directory)
  -f, --format TEXT    Download Format: EPUB (default), AZW3, MOBI, PDF or HTML
  --force              Force overwrite of an existing file
  --get-urls TEXT      Get all story urls found from a page
  -d, --debug          Show the log in the console for debugging
  --log                Save the logfile for debugging
  -v, --version        Display version & quit.
  --help               Show this message and exit.ExampleTo download using a URLao3_cli -u https://archiveofourown.org/works/10916730/chapters/24276864To download using a file containing URLsao3_cli -i urls.txtTo download using a comma separated list of URLsao3_cli -l "https://archiveofourown.org/works/31923052/chapters/79053661,https://archiveofourown.org/works/31950595"Default ConfigurationThe fanfiction will be downloaded in epub format. To change it, use-ffollowed by the format.The fanfiction will be downloaded in the current directory. To change it, use-ofollowed by the path to the directory.Checkao3_cli --helpfor more info.
Package: ao3kindle
Python script to uploadArchiveOfOurOwn(AO3) fanfics to an Amazon KindleInstallationpip3 install ao3kindleConfigurationTo interactively generate a configuration, runao3-kindle --configureEnsure that you have the sender email addressapprovedon your Amazon account. Gmail users may need toallow less secure appsand/oruse an app passwordHelpFromao3-kindle --help:usage: ao3-kindle [-h] [-c [CFGFILE]] [--configure] [-v] [--debug] [url]

Upload ArchiveOfOurOwn (AO3) fanfics to an Amazon Kindle

positional arguments:
  url            AO3 Fanfic URL

optional arguments:
  -h, --help     show this help message and exit
  -c [CFGFILE]   Location of config file (default:
                 ~/.config/ao3-kindle)
  --configure    (Re)Generate the Configuration File
  -v, --verbose  Show verbose info
  --debug        Show debug infoBuildingpython3 setup.py sdist bdist_wheel
twine upload dist/*
Package: ao3-poster
ao3-posterAO3 Poster was originally designed for podficcers who are trying to upload a backlog of podfic to AO3 that had previously been hosted on other services.
Its focus is therefore on bulk posting data from spreadsheets to AO3 and templating of work text (for cover art, media players, etc.)Full documentation is athttps://ao3-poster.readthedocs.io/en/latest/.
Package: ao3scraper
ao3scraperA python webscraper that scrapes AO3 for fanfiction data, stores it in a database, and highlights entries when they are updated.Table with an updated entry highlighted.InstallationYou can easily install the latest version from pip:pip3 install ao3scraperDevelopment InstallationCreate a python virtual environment withpython3 -m venv dev_venvand activate it.
Then, install required packages with:poetry installThis will also install ao3scraper into the virtual environment.UsageUsage: ao3scraper [OPTIONS]

Options:
-s, --scrape          Launches scraping mode.
-c, --cache           Prints the last scraped table.
-l, --list            Lists all entries in the database.
-a, --add TEXT        Adds a single url to the database.
--add-urls            Opens a text file to add multiple urls to the database.
-d, --delete INTEGER  Deletes an entry from the database.
-v, --version         Display version of ao3scraper and other info.
--help                Show this message and exit.Configurationao3scraper is ridiculously customisable, and most aspects of the program can be modified from here.
To find the configuration file location, runpython3 ao3scraper -v.ao3scraper usesrich's styling. To disable any styling options, replace the styling value with 'none'.Fics have many attributes that are not displayed by default. To add these columns, create a new option under table_template, like so:table_template:-column:characters# The specified attributename:Characters :)# This is what the column will be labelled asstyles:none# Rich stylingA complete list of attributes can be foundon the wiki.Migrating the databaseIf you're updating from a legacy version of ao3scraper (before 1.0.0), movefics.dbto the data location.
This can be found by runningpython3 ao3scraper -v.
The migration wizard will then prompt you to upgrade your database.
If you accept, a backup of the currentfics.dbwill be created in/backups, and migration will proceed.ContributingContributions are always appreciated. Submit a pull request with your suggested changes!Acknowledgementsao3scraper would not be possible without the existence ofao3_apiand the work of itscontributors.
Package: aoa-torch
Attention on Attention ImplementationThis is a practice implementation after randomly finding it on Lucidrain's repo, I'm implementing the model architecture just for practice!Basically the architecture is:
x => q, k, v -> multihead attn with residual q -> concat -> 2 linear projects
->sigmoid -> mult -> add -> norm -> ffn -> add -> norm with residual of first add and normInstallpip3 installUsageAoAModuleimporttorchfromaoa.mainimportAoAx=torch.randn(1,10,512)model=AoA(512,8,64,0.1)out=model(x)print(out.shape)AoATransformerimporttorchfromaoa.mainimportAoATransformerx=torch.randint(0,100,(1,10))model=AoATransformer(512,1,100)out=model(x)print(out.shape)Citations@misc{rahman2020improved,title={An Improved Attention for Visual Question Answering},author={Tanzila Rahman and Shih-Han Chou and Leonid Sigal and Giuseppe Carenini},year={2020},eprint={2011.02164},archivePrefix={arXiv},primaryClass={cs.CV}}@misc{huang2019attention,title={Attention on Attention for Image Captioning},author={Lun Huang and Wenmin Wang and Jie Chen and Xiao-Yong Wei},year={2019},eprint={1908.06954},archivePrefix={arXiv},primaryClass={cs.CV}}LicenseMIT
Package: aoba-discord-bot
Aoba Discord BotAoba is an open-source Discord bot made with Python, providing admin, osu! and anime functionalities.Please be aware that until version 1.0.0 is released the bot should not be considered stable.
It’s still very early in development and could have bugs that would cause problems to your server.Free software: MIT licenseDocumentation:https://aoba-discord-bot.readthedocs.io.FeaturesAoba has the following modules/commands:Admin:ban, unban, custom_cmd, kick, prefix, purgeBotAdmin:announce, servers, shutdown, statusOsu:beatmaps_backup, score_ppUser:escape_markdown, helpCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.13 (2021-08-15)Release on PyPI.
Package: aoc
AOCMy multi-cluster management toolThis basically a wrapper aroundoctool with some commands to help managing multiple clusters.So it can be used exactly likeoc, for exampleaoc get pods -A.To make it work seamlessly like a regularoc, create an alias under your shell configuration.# bashecho"alias oc=aoc">>~/.bashrcsource~/.bashrc# zshecho"alias oc=aoc">>~/.zshrcsource~/.zshrcprerequisitespython>=3.5ocInstallationpip3installaocUsageUsage: aoc [OPTIONS] COMMAND [ARGS]...

    __ _  ___   ___ 
   / _` |/ _ \ / __|
  | (_| | (_) | (__ 
   \__,_|\___/ \___|

    Multi-cluster management tool

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  add-kube     Add a new cluster to aoc
  auto-keep    Enable/disable auto keep
  delete-kube  Remove a cluster from aoc
  list         Show list of kubeconfigs
  rename-kube  Rename cluster
  switch-kube  Set the current kube
Package: aoccasper
# AboutA way to solve AOC. Coded by Casper.# How to useSet the session cookies
~~~
from aoccasper import set_session_cookies
set_session_cookies(“whatever your session cookies are for aoc”)
~~~If you don’t do this, you will use a random aoc session’s cookies which won’t corespond to your own session cookies.~~~
from aoccasper.day1 import part_1, part_2# test_input = …part_1(test_input)
part_1()  # This will automatically pull your input based on the session_cookies that you have imported.
~~~
Package: aoc-cli
aoc-cliAn opinionated scaffolder for Advent of CodeInstallationpip install aoc-cliOptionally install language-specific plugins such aspip install aoc-cli-deno.UsageScaffold a project withaoc init --language <python> --year <current year if december, else previous year> --location .All other subcommands are directory aware:*Note: plugins (specified with the --language flag) may alter the functionality below but in general...aoc getdownloads the input for the dayaoc run <part>executes the function specified in  (1 or 2) file for the dayaoc submit <part>executes the function specified in  (1 or 2) file for the day, then submits the answer to the formaoc openopens the current day in the browser
Package: aoc-cli-deno
aoc-cli-denoA plugin for the opinionated scaffolder for Advent of Code that generates scaffolds to write solutions in javascript and execute with Deno.Installationpip install aoc-clito get theaoc-clitoolpip install aoc-cli-denoto get the deno plugin.UsageScaffold a project withaoc init --language deno --year <current year if december, else previous year> --location .All other subcommands are directory aware:*Note: plugins (specified with the --language flag) may alter the functionality below but in general...aoc getdownloads the input for the dayaoc run <part>executes the function specified in  (1 or 2) file for the dayaoc submit <part>executes the function specified in  (1 or 2) file for the day, then submits the answer to the formaoc openopens the current day in the browser
Package: aoc-cli-go
aoc-cli-denoA plugin for the opinionated scaffolder for Advent of Code that generates scaffolds to write solutions in go.Installationpip install aoc-clito get theaoc-clitoolpip install aoc-cli-gooto get the go plugin.UsageScaffold a project withaoc init --language go --year <current year if december, else previous year> --location .All other subcommands are directory aware:*Note: plugins (specified with the --language flag) may alter the functionality below but in general...aoc getdownloads the input for the dayaoc run <part>executes the function specified in  (1 or 2) file for the dayaoc submit <part>executes the function specified in  (1 or 2) file for the day, then submits the answer to the formaoc openopens the current day in the browser
Package: aoc-cli-python
aoc-cli-pythonA plugin for the opinionated scaffolder for Advent of Code that generates scaffolds to write and execute solutions in python.Installationaoc-cli-pythonis the default plugin used byaoc-cliand thus is installed when you install the lattter.pip install aoc-cliUsageScaffold a project withaoc init --year <current year if december, else previous year> --location .All other subcommands are directory aware:*Note: plugins (specified with the --language flag) may alter the functionality below but in general...aoc getdownloads the input for the dayaoc run <part>executes the function specified in  (1 or 2) file for the dayaoc submit <part>executes the function specified in  (1 or 2) file for the day, then submits the answer to the formaoc openopens the current day in the browser
Package: aockit
AoCKitA set of common utilities for completing theAdvent of Code.Input Parsing (aockit.inputs)Utility functions for reading puzzle input from a file.read_lines(path: Path, parser: Callable[[str], T], include_blank_lines: bool = False, strip: bool = True) -> Iterator[T]Reads each line from the file atpath. Usesparserto process the line and yield it.Ifinclude_blank_linesis True, blank lines from the file will be included. If False (the default), they will be omitted.Ifstripis False, leading and trailing spaces and newlines will be included. If True (the default), they will be stripped.parsershould be a lambda or function that accepts a string.read_lineswill yield the value ofparser(line)for each line.read_strings(path: Path, include_blank_lines: bool = False, strip: bool = True) -> Iterator[str]Reads each line from the file atpathand yields it.Ifinclude_blank_linesis True, blank lines from the file will be included. If False (the default), they will be omitted.Ifstripis False, leading and trailing spaces and newlines will be included. If True (the default), they will be stripped.read_ints(path: Path) -> Iterator[int]Reads each line from the file atpathand yields it as an integer.read_string_groups(path: Path) -> Iterator[list[str]]Reads each line from the file atpath.Lines are organized into groups, separated by blank lines in the file.Each group is yielded as a list of strings.read_int_groups(path: Path) -> Iterator[list[int]]Reads each line from the file atpathand parses it as an integer.Lines are organized into groups, separated by blank lines in the file.Each group is yielded as a list of integers.read_char_grid(path: Path) -> Grid[str]Reads a grid of characters from the path.SeeGrid docsfor more info.read_int_grid(path: Path) -> Grid[int]Reads a grid of integers from the path.SeeGrid docsfor more info.Grid Data Structure (aockit.grid)A two-dimensional grid, which can store any data type. Can be indexed or iterated easily by rows or columns. Extremely useful for many puzzles.ConstructorGrid(height: int, width: int, content: list[T])Constructs a grid object with the given height, width, and contents.contentsshould be a list [of any type of object or primitive], containing exactlywidth * heightelements.contentsis parsed from left to right, creating a new grid row everywidthelements.Accessing elementsg.get(row, col)org[row, col]Retrieves the element at the given row and column.Rows and columns are zero-indexed, starting at the top left.Negative indices work the same as with Python lists (-1, -1will get you the bottom right element).Setting elementsg.set(row, col, value)org[row, col] = valueSets the element at the given row and column.Indexing works the same as above.Iterating over rows and columnsg.col(col)org.row(row)Returns an iterator for the values in the given row or column.Columns are traversed top to bottom, rows from left to right.Row and column indices start at 0, and negative indices work as above.g.col_indexed(col)org.row_indexed(row)Iterates over the given row or column, with the row and column indices included.Each iterator value is a tuple consisting of(row, col, value).