Saravanan666/pypi-org huggingface dataset:
Package: searchcmd
Free software: BSD licenseGet help from your friends on the internets without leaving your best friend the cli.MotivationMany commands have really many flags and the man pages often lack examples. It is usually faster to go to your browser and search for what you want to do.Installationsudo apt-get install libxml2-dev libxslt-dev python-dev
pip install searchcmdExamples# searchcmd git commit "change last commit message"
git commit      (git-scm.com, kernel.org)
git commit --amend      (help.github.com)
git commit –amend -m ‘new message’      (makandracards.com)
git commit --amend --no-edit    (kernel.org)
git commit -c ORIG_HEAD (kernel.org)# searchcmd find "sort files by size"
find . -type f -printf "%s\t%p\n" | sort -n     (unix.stackexchange.com)
find . -type f | xargs du -h | sort -rn (unix.stackexchange.com)
find . -type f -print0 | xargs -0 ls -la | awk '{print int($5/1000) " KB\t" $9}' | sort -n -r -k1       (unix.stackexchange.com)
find . -type f -ls | sort -r -n -k7     (unix.stackexchange.com)
find . -type f -ls -printf '\0' | sort -zk7rn | tr -d '\0'      (unix.stackexchange.com)Manualusage: searchcmd [-h] [-v] [--no-cache] [--engine {bing,google}] [-n MAX_HITS]
                 [--max-download MAX_DOWNLOAD]
                 query [query ...]

positional arguments:
  query                 Type a command and/or describe what you want to do in
                        quotes.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Include source url in output.
  --no-cache            Skip cache, always do a new search.
  --engine {bing,google}
                        The search engine to use.
  -n MAX_HITS, --max-hits MAX_HITS
                        Max number of commands to show.
  --max-download MAX_DOWNLOAD
                        Download max this number of search hits.

Examples:
searchcmd git commit "change last commit message"
searchcmd find directory
searchcmd "search replace"Similar projectsUseful examples at the command line:https://github.com/srsudar/egSearch commandlinefu.com from the terminal:https://github.com/ncrocfer/clfTodoSupport for recognizing more advanced prompts. Example:um@server#find . -name “*sh*”Merge commands that do the same thing.Support for beautifulsoup in py3.An open ended search (for example “search replace”) will only find commands that are installed on the system. Better filtering of false positives is needed to allow unknown commands. A solution could be to train a probabilistic parser likehttps://github.com/datamade/parseratorHistory0.1.0 (2015-06-01)First release on PyPI.
Package: searchcode-cli
A Python wrapper around theSearchCode APIDocumentationRefer to the Wikifor installation instructions, code examples, in addition to all other documentation.NoticeThis project is developed with permission fromBenjamin Boyter, the developer ofsearchcode.com.
Therefore, I only take credit for this project. Not the API.About SearchCodeRead more about searchcodehereSupportIf you like this project and would like to show support, you can Buy Me A Coffee using the button belowYour support will be much appreciated!😊
Package: searchcolor
This module uses imagecolor with PIL(Pillow) to extract colors from web image searches.Available functionsaverage_image_url(url, name)Averages a single image from a url into RGB color values. Returns a dictionary with the following keys:name,red,green,blueurl- image url.name- name to return. Generally passed from the function that generates the url.timeout-requeststimeout in seconds.max_size- maximum size of image to fetch in MB._image_search_average(url_list, max_threads=20)Averages all urls in a list into a singular RGB average.url_list- path to directorymax_threads- max processes to spawn.timeout-requeststimeout in seconds. This gets passed toaverage_image_urlmax_size- maximum size of image to fetch in MB. This gets passed toaverage_image_urlgoogle_average(search_term, num_results, api_key, cse_id, max_threads=20)Does a Google image search and averages all the images into a singular RGB search average. Returns a dictionary with the following keys:name,red,green,bluesearch_term- Google image search term.num_results- Number of results to include.api_key- Google API key.cse_id- Google CSE ID.max_threads- max processes to spawn. This gets passed to\_image_search_averagetimeout-requeststimeout in seconds. This gets passed toaverage_image_urlmax_size- maximum size of image to fetch in MB. This gets passed toaverage_image_urlFuture workadd more information to readmebuild offline testsTestsTesting is done withpytestCurrently tests only the google api. Requires the enviroment variables GOOGLE_SEARCH_API and GOOGLE_SEARCH_CSE to be set to a valid google custom search api and idRun withpython3 setup.py test
Package: searchconsole
Google Search Console for Pythongoogle-searchconsoletakes the pain out of working with theGoogle Search
ConsoleSearch Analytics Query API. It is written in Python and provides
convenient features to make querying a site's search analytics data easier.Authentication.We provide a few different ways to make generating
credentials and authenticating with your account easier. You can use stored
fies as well as a way to do the OAuth2 flow interactively.Querying.Easier to query by date ranges and filter by various
dimensions. No longer posting large nested JSON, the query object lets you make
complex queries with ease.Exploration.You can traverse your account hierarchy, with an account
containing webproperties with clear permission levels.Exports.Clean JSON and pandas.DataFrame outputs so you can easily
analyse your data in Python or Excel.This package is built on top ofGoogle's own API Clientand is heavily inspired, from design to implementation, by@debrouwere's
fantasticgoogle-analyticspackage.QuickstartFirst, install the package using:pip3 install git+https://github.com/joshcarty/google-searchconsoleThen, create a new project in theGoogle Developers Console,
enable the  Google Search Console API under "APIs & Services". Next, create credentials
for an OAuth client ID, choosing the Other Application type. Download a JSON copy of
your client secrets.After that, executing your first query is as easy asimportsearchconsoleaccount=searchconsole.authenticate(client_config='client_secrets.json')webproperty=account['https://www.example.com/']report=webproperty.query.range('today',days=-7).dimension('query').get()print(report.rows)The above example will use your client configuration file to interactively
generate your credentials.Saving CredentialsIf you wish to save your credentials, to avoid going
through the OAuth consent screen in the future, you can specify a path to save
them by specifyingserialize='path/to/credentials.json.When you want to authenticate a new account you run:account=searchconsole.authenticate(client_config='client_secrets.json',serialize='credentials.json')Which will save your credentials to a file calledcredentials.json.From then on, you can authenticate with:account=searchconsole.authenticate(client_config='client_secrets.json',credentials='credentials.json')
Package: searchdata
Searchdata Python SDKSearchData is an API that allows scraping various search engines such as Google, Bing, Yandex, etc. while using rotating proxies to prevent bans. This SDK for Python makes the usage of the API easier to implement in any project you have.InstallationRun the following command in the main folder of your project:pip install searchdataAPI KeyTo use the API and the SDK you will need an API Key. You can get one by registering atSearchdataClassesThis SDK provides a class for each search engine from searchdata.io. Here is the list:ClassUsageSearchdataGoogleSearchgoogle searchesSearchdataBingSearchbing searchesSearchdataYandexSearchyandex searchesSearchdataGoogleAutocompletegoogle autocomplete searchesSearchdataGoogleEventsgoogle events searchesSearchdataGoogleJobsgoogle jobs searchesSearchdataGoogleJobsListinggoogle jobs listing searchesSearchdataGoogleMapsgoogle maps searchesSearchdataGoogleMapsReviewsgoogle maps reviews searchesSearchdataGoogleProductgoogle product searchesSearchdataGoogleReverseImagegoogle reverse image searchesSearchdataGoogleScholargoogle scholar searchesSearchdataGoogleScholarAuthorgoogle scholar author searchesSearchdataGoogleScholarCitegoogle scholar cite searchesSearchdataGoogleScholarProfilesgoogle scholar profiles searchesSearchdataLocationslocations apiUsageUsing the SDK it's quite easy. An example of a GET call to the API is the following:from searchdata import SearchdataLocations, SearchdataGoogleSearch

searchdataGoogleSearch = SearchdataGoogleSearch('YOUR_API_KEY')
locationsAPI = SearchdataLocations()

response = locationsAPI.execute("Austin", 1)
locations = response.json()
location = locationsAPI.process_location(locations[0])
searchdataGoogleSearch.set_q("Test")
searchdataGoogleSearch.set_location(location)
searchdataGoogleSearch.set_lr('lang_en|lang_ar')
response = searchdataGoogleSearch.execute()

# print(response.status_code)
# print(response.headers);
print(response.json());Alternatively, you can use the function executeRaw, which will allow you to send the parameters in an associative array:from searchdata import SearchdataLocations, SearchdataGoogleSearch

searchdataGoogleSearch = SearchdataGoogleSearch('YOUR_API_KEY')
locationsAPI = SearchdataLocations()

response = locationsAPI.execute("Austin", 1)
locations = response.json()
location = locationsAPI.process_location(locations[0])
response = searchdataGoogleSearch.executeRaw({
    'q': 'test',
    'device': 'mobile',
    'lr': 'lang_en|lang_ar',
    'location': location
})

# print(response.status_code)
# print(response.headers);
print(response.json());For a better understanding of the parameters, please check outour documentation.
Package: search-demo
Search DemoExtremely simple python-curses search demo that runs a function on every
character input and shows / returns the results.Install using pip!pip install search-demoHow to useThis assumes that you have a function that outputs an iterable (list, tuple,
etc.) and takes in a string.fromsearch_demoimportSearchDemodeffunction(inp):returninp.split()s=SearchDemo(function)print(s.run_demo())Produces something like thisWhyI made this for a part of my masters project that required demoing a
full text search using RediSearch and thought that a small curses library would
be the best way to show it off without too much complexity building a whole UI.NotePlease do not use this in real code, I just thought it was useful enough to
share with anyone else who needs a quick demo.
Package: searchdups
Search Duplicates (searchdups)This is a simple application that searches for duplicate files in a set of folders. To check whether the files are identical or not, it makes use ofmd5orsha256algorithms, but the application calculates asmart hashto enhance performance: the idea is to calculate a partial hash and finalize the calculation only if needed.Additionally, this application includes a pseudohashthat consists of checking whether the name of the files is the same. If using this"hash algorithm", if the name of two files is the same, they are considered to be the same even if the content is not the same.The basic usage is$searchdups-r.>8f8db820d89c39029a0629094e0f18c9*
/Users/calfonso/Programacion/norepo/searchdups/a1.jpg
/Users/calfonso/Programacion/norepo/searchdups/a11.jpgSome other features are:Select the hash algorithm (using parameter-H).Searching in subfolders (using flag-r).Considering hidden folders and files (using flag-a).Show a progress bar during the process (using flag-p).Selecting which files are processed (using-fparameter forsh-likefilters, or-eparameter for regular expressions).Exclude the files to process (using-Fparameter forsh-likefilters, or-Eparameter for regular expressions).Summarize the amount of files and folders considered (using flag-s).Get the result in a file (using parameter-o).Please check the CLI help to get updated information about the usage of this tool.InstallationTo install the tool you can clone the code and execute the next command inside the cloned folder$pipinstall.or install it from the repositories:$pipinstallsearchdups
Package: searchenginepy
searchenginepysearch engine for python (Query and scrape search engines)How to use?Installationpip install searchenginepyImportingimport SearchEngine from searchenginepy
engine=SearchEngine()Usagelist=engine.search("search query")Examplelist=engine.google("search query")using google to search a queryUsing a specific search enginegooglefrom searchenginepy.Google import Google
list=Google().search("search query")Bingfrom searchenginepy.Bing import Bing
list=Bing().search("search query")Bravefrom searchenginepy.Brave import Brave
list=Brave().search("search query")DuckDuckGofrom searchenginepy.DuckDuckGo import DuckDuckGo
list=DuckDuckGo().search("search query")Supported search enginesGoogleBingDuckDuckGoBrave
Package: search-engines
Query and scrape search engines (Google, Google News, Yahoo, Yahoo News, Bing, Bing News, Ask, Dogpile, Dogpile News)Installationpip install search_enginesOverviewEach search engine has a module {engine_name}.py which two functions:extract_search_results(html:str,page_url:str)->Tuple[List[Dict[str,str]],str]andget_search_url(query:str,latest:bool=True,country:str='us')->strUsage ExampleConstruct a URL for the first results page of searching "Tesla TSLA" in Bing Search.fromsearch_enginesimportbing_searchurl=bing_search.get_search_url('Tesla TSLA')Load the URL using a simple HTTP client or web browser and extract the page HTML.
This package does not make any restrictions on clients can be used. We'll use therequestslibrary for this example.importrequestsresp=requests.get(url)html=resp.textWe can now extract search results from the HTML.
The returnedresultslist will be a list of dictionaries with keysurl,title,preview_text,page_number.
If we want to scrape multiple pages, we can load the next page using the returnednext_page_url, and again extracting the results usingextract_search_results.results,next_page_url=bing_search.extract_search_results(html,url)ContributionsAdd new search engines! =)
Package: search-engine-scraper
Search-Engine-ScraperA module to scrape popular search enginesCapabilitiesThe very first version can do the following:Query and get results for google,bing and yahoo.Scrape 20 free proxies and randomly select one before querying the search engine.This scraping will happen after 15 minutes since the last scraping was done.Randomize an user agent for the query run.Usage and InstallationPython 3.6+ is requiredInstall via pip:pip install search-engine-scraperImport the search engines as :from search_engine_scraper import google_search,bing_search,yahoo_searchRun query as :google_search.search("your text here , search for whatever you wish")
Package: search-engines-kit
\n# search_enginesA Python library that queries Google, Bing, Yahoo and other search engines and collects the results from multiple search engine results pages.Please note that web-scraping may be against the TOS of some search engines, and may result in a temporary ban.Supported search enginesGoogleBingYahooDuckduckgoStartpageAolDogpileAskMojeekBraveTorchFeaturesCreates output files (html, csv, json).Supports search filters (url, title, text).HTTP and SOCKS proxy support.Collects dark web links with Torch.Easy to add new search engines. You can add a new engine by creating a new class insearch_engines/engines/and add it to thesearch_engines_dictdictionary insearch_engines/engines/__init__.py. The new class should subclassSearchEngine, and override the following methods:_selectors,_first_page,_next_page.Python2 - Python3 compatible.RequirementsPython 2.7 - 3.xwithRequestsandBeautifulSoupInstallationRun the setup file:$ python setup.py install.Done!UsageAs a library:from search_engines import Google

engine = Google()
results = engine.search("my query")
links = results.links()

print(links)As a CLI script:$ python search_engines_cli.py -e google,bing -q "my query" -o json,printOther versionsasync-search-scraperA really cool asynchronous implementation, written by @soxoj
Package: searcheonet
searcheonetPython package that allows users to search for information about natural events from the NASA EONET APIInstallation$pipinstallsearcheonetUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensesearcheonetwas created by Alan Shen. It is licensed under the terms of the Apache License 2.0 license.Creditssearcheonetwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: searchf
searchfUtility program to interactively search keywords in text files. Works in terminals thanks to curses.Installationpip install searchfRequirements:Python 3.6 or greaterTerminal with color support (ie.TERM=screen-256colororTERM=xterm-256color).FeaturesFilters can either include or exclude file contentFilters can persist to diskMultiple highlight and colorization modes (presshto cycle through all modes)Color palettes (presscto cycle through all palettes)Various other display modes (ltoggles line numbers visibility,ktoggles line wrapping, ...)Multiple views (press1,2,3to switch) with possibility to pass filters of one view to another view (try!,@,#)Common search key bindings (/, thennfor next,pfor previous)Common key bindings to scroll up/down pages or goto lineTerminal resizingUsagesearchf <FILE>Pressfto enter keyword in a new filterPress?for helpPressENTERto define the first keyword of a filter and reveal only the lines containing that keyword. Press+to add another keyword to the current filter in order to further narrow down the lines currently displayed.A filter is a list of keywords that a line must contain to match and get highlighted in a specific color. By defining multiple filters, you can reveal more content of the file. By default, lines not matching any filter are hidden, but you can progressively reveal context surrounding matching lines by pressingmmultiple times, all the way to the whole content of the file. Filters can also be used to filter out content you do not want to see (pressxto toggle this mode).Why?This tool is born from my need to interactively search into log files, with the ability to backtrack when hitting dead ends (hence the use of push/pop of filter and keyword), and to go down some exploratory paths on the side (hence the support of views). I use it most when I'm not fully aware of what I am searching for...To be more specific, I often have to dig into build log files, which are a raw aggregate of many heterogenous sources (numerous compiler output, deployment scripts, test run and results, ...) resulting in rather unstructured output. The only commonality being that everything is more or less line-oriented. When a build failure occurs, searchf helps me find hints of the root cause which can be hiding about anywhere.So this tool ends up making little or no assumption on the input file, which can be anything, unstructured and heterogenous, as long as it is line oriented.DevelopmentPlease refer toDEV.mdfor further information.
Package: search-file
search-file -A python module that supplies tools to search files(or folders).一个用于搜索文件或文件夹的Python模块。包含的函数 FUNCTIONS:directories(path):一个生成器, 列出path下的所有子目录和文件名。如:>>>fromsearch_fileimportdirectories>>>list(directories("C:"))['C:\Users',#第一层目录'C:\\\\Users\\\\Administrator',#第二层目录...,'C:\Windows','C:\\\\Windows\\\\System32',...]dirs: 是否列出目录
files: 是否列出文件search(filename,path,minsize=0,maxsize=None):一个生成器,在path中搜索一个文件或文件夹。如:>>>fromsearch_fileimportsearch>>>list(search("cmd.exe","C:"))['C:\\\\Windows\\\\System32\\\\cmd.exe',...]版本 VERSION:1.2.3源代码:https://github.com/qfcy/Python/blob/main/search_file.py最近更新(2022-2):增加了多个测试程序。作者:七分诚意 qq:3076711200百度贴吧账号:qfcy_作者CSDN主页:https://blog.csdn.net/qfcy_/
Package: search-fs
search-fsA simple python utility that indexes directory and file names in a sqlite database to allow for fast searching.Definitely check outlocatebefore considering this tool.Installationpipinstallsearch-fsUsagecreate-search-fs--help
search-fs--helpCreate the databasecreate-search-fsdir1/dir2/SearchSearch anywhere for JPG filessearch-fs--name'*.jpg'Search just one directory tree for JPG filessearch-fs--name'*.jpg'dir1/Search just one directory and not any of the sub directories for JPG filessearch-fs--name'*.jpg'dir1/--strict-dirSearch for directoriessearch-fs--name'Directory*'--typedSearch for files by sizesearch-fs--size'500M'#Files larger than 500MBsearch-fs--size='-10M'#Files smaller than 10MB, Note: make sure you use use '--size=' for less thanSearch by regular expressionsearch-fs--regex'\w+\d\d?\.jpg'Format the outputsearch-fs--name'*.jpg'--format=size,nameCronYou can setup a cronjob to runcreate-search-fsso that the index is up to date.Createdirs.txtwhich contains the directories to index#Lines starting with # are ignored
/path/dir1
/other/dir2Add line withcrontab -eto update the index every hour0****/usr/local/bin/create-search-fs--dirs/path/to/dirs.txt
Package: searchgithubrepo
The package searches repositories on GitHub using GraphQL API. One may specify parameters such as programming language, start date, and number of stars to get alist of GitHub repositories modified on or after the specified start dateand satisfying other filters.The package takes care of constraints such as API limit and the size of responses by reducing the search scope (in terms of time) by following a mechanism similar to binary search. The search results are stored in a file in the following format per line.<repo_owner>/<project name><space><programming language><space><modification date and time>Ex:apache/tomcat Java 2022-08-06T13:31:25ZParameters--api-token: GitHub API token or Personal Access Token--out-file: Output file path--start-date: Start date for search in dd-mm-yyyy--lang: Primary programming language of the repositories--min-stars: Minimum star count--verbose: Verbose modeExampleInstallsearchgithubrepopackage usingpipand use it in your program.fromsearchrepoimportsearch_repoone_day_old_date=(datetime.datetime.now().date()-datetime.timedelta(days=1))search_repo(start_date=one_day_old_date,out_file='repos.csv',api_token='51ec41929c6f48c23482a734534327d308',# fake; just for the examplestars=100,lang='Java',verbose=True)
Package: searchguard
# searchguard-python[![build status](https://travis-ci.org/ByteInternet/searchguard-python.svg?branch=master)](https://travis-ci.org/ByteInternet/searchguard-python)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)Unofficial Python library for Search Guard (a security solution for Elasticsearch)## Installation ##This library requires a Search Guard subscription (or trial license). Information can be found on https://search-guard.com/.Make sure enterprise modules are enabled in your elasticsearch.yml:searchguard.enterprise_modules_enabled: trueMake sure backend role management in your elasticsearch.yml is set to either of the two options below:searchguard.roles_mapping_resolution:[BACKENDROLES_ONLY|BOTH]Install the library:pip3 install searchguardSet the environment variablesexport SEARCHGUARD_API_URL=”https://www.example.com:1234/_searchguard/api”
export SEARCHGUARD_API_USER=”foo”
export SEARCHGUARD_API_PASS=”bar”## Future work ##Add code for managing actiongroups## LegalElasticsearch is a trademark of Elasticsearch BV, registered in the U.S. and in other countries.Search Guard is a trademark of floragunn GmbH, registered in the U.S. and in other countries.Byte Internet is not affiliated with either Elasticsearch BV / floragunn GmbH.