Saravanan666/pypi-org huggingface dataset:
Package: locate-pixelcolor-cythonsingle
Compiled Cython Code - Detects colors in images 2-3 x faster than Numpypip install locate-pixelcolor-cythonsingleTested+compiled against Windows 10 / Python 3.10 / AnacondaIf you can't import it, compile it on your system (code at the end of this page)How to use it in Pythonimportnumpyasnpimportcv2fromlocate_pixelcolor_cythonsingleimportsearch_colors# 4525 x 6623 x 3 picture https://www.pexels.com/pt-br/foto/foto-da-raposa-sentada-no-chao-2295744/picx=r"C:\Users\hansc\Downloads\pexels-alex-andrews-2295744.jpg"pic=cv2.imread(picx)colors0=np.array([[255,255,255]],dtype=np.uint8)resus0=search_colors(pic=pic,colors=colors0)colors1=np.array([(66,71,69),(62,67,65),(144,155,153),(52,57,55),(127,138,136),(53,58,56),(51,56,54),(32,27,18),(24,17,8),],dtype=np.uint8)resus1=search_colors(pic=pic,colors=colors1)####################################################################%timeitresus0=search_colors(pic=pic,colors=colors0)51msÂ±201Âµsperloop(meanÂ±std.dev.of7runs,10loopseach)b,g,r=pic[...,0],pic[...,1],pic[...,2]%timeitnp.where(((b==255)&(g==255)&(r==255)))150msÂ±209Âµsperloop(meanÂ±std.dev.of7runs,10loopseach)####################################################################%timeitresus1=search_colors(pic=pic,colors=colors1)443msÂ±1.19msperloop(meanÂ±std.dev.of7runs,1loopeach)%timeitnp.where(((b==66)&(g==71)&(r==69))|((b==62)&(g==67)&(r==65))|((b==144)&(g==155)&(r==153))|((b==52)&(g==57)&(r==55))|((b==127)&(g==138)&(r==136))|((b==53)&(g==58)&(r==56))|((b==51)&(g==56)&(r==54))|((b==32)&(g==27)&(r==18))|((b==24)&(g==17)&(r==8)))1sÂ±16.1msperloop(meanÂ±std.dev.of7runs,1loopeach)####################################################################The Cython Code# cython: language_level=3importnumpyasnpcimportnumpyasnpcpdefsearchforcolor(np.uint8_t[::1]pic,np.uint8_t[::1]colors,intwidth,inttotallengthpic,inttotallengthcolor,int[::1]outputx,int[::1]outputy,int[::1]lastresult):cdefintcounter=0cdefunsignedcharr,g,bcdefinti,jforiinrange(0,totallengthcolor,3):r=colors[i]g=colors[i+1]b=colors[i+2]forjinrange(0,totallengthpic,3):if(r==pic[j])and(g==pic[j+1])and(b==pic[j+2]):dividend=j//3quotient=dividend//widthremainder=dividend%widthoutputx[counter]=quotientoutputy[counter]=remainderlastresult[0]=countercounter+=1# .\python.exe .\colorsearchcythonsinglesetup.py build_ext --inplacesetup.py to compile the code# cython: language_level=3fromsetuptoolsimportExtension,setupfromCython.Buildimportcythonizeimportnumpyasnpext_modules=[Extension("colorsearchcythonsingle",["colorsearchcythonsingle.pyx"],include_dirs=[np.get_include()],define_macros=[("NPY_NO_DEPRECATED_API","NPY_1_7_API_VERSION")])]setup(name='colorsearchcythonsingle',ext_modules=cythonize(ext_modules),)# .\python.exe .\colorsearchcythonsinglesetup.py build_ext --inplace
Package: locate-pixelcolor-numba
RGB search with numba - 2-3 x faster than numpypip install locate-pixelcolor-numbaImportant!This is a compiled .pyd file (Numba AOT), if you can't import it, run the following code to generate a new pyd file, and replace it with the old .pyd file.fromnumba_aot_compilerimportcompnumba#pip install numba-aot-compilerimportnumpyasnpfromnumbaimportuint8,uint16defsearch_colors(r,g,b,rgbs,divider):res=np.zeros(b.shape,dtype=np.uint16)res2=np.zeros(b.shape,dtype=np.uint16)zaehler=0forrgbinrgbs:rr,gg,bb=rgbforiinrange(r.shape[0]):ifr[i]==rr:ifg[i]==gg:ifb[i]==bb:dvquot,dvrem=divmod(i,divider)res[zaehler]=dvquotres2[zaehler]=dvremzaehler=zaehler+1results=np.dstack((res[:zaehler],res2[:zaehler]))returnresultscompi2=compnumba(fu=search_colors,funcname="search_colors",file="searchcolorsnumba",folder="locate_pixelcolor_numba",signature=(uint8[:],uint8[:],uint8[:],uint8[:,:],uint16),parallel=True,fastmath=True,nogil=True,)How to use itfromlocate_pixelcolor_numbaimportsearch_colorsimportcv2importtimeimportnumpyasnppic=cv2.imread(r"pexels-alex-andrews-2295744.jpg")# https://www.pexels.com/pt-br/foto/foto-da-raposa-sentada-no-chao-2295744/colors=np.array([(66,71,69),(62,67,65),(144,155,153),(52,57,55),(127,138,136),(53,58,56),(51,56,54),(32,27,18),(24,17,8),],dtype=np.uint8)search_colors(pic,colors)Out[2]:array([[[0,4522],[3,4522],[3,4523],...,[6622,4522],[6622,4523],[6622,4524]]],dtype=uint16)%timeitsearch_colors(pic,colors)413msÂ±1.22msperloop(meanÂ±std.dev.of7runs,1loopeach)# More benchmarks: https://github.com/hansalemaos/locate_pixelcolor_cpp
Package: locate-pixelcolor-numbacuda
RGB search with numba.cuda - 10 x faster than numpypip install locate-pixelcolor-numbacudafromlocate_pixelcolor_numbacudaimportsearch_colorsfroma_cv_imwrite_imread_plusimportopen_image_in_cvimportnumpyasnpcolors=[(66,71,69),(62,67,65),(144,155,153),(52,57,55),(127,138,136),(53,58,56),(51,56,54),(32,27,18),(24,17,8),]image'https://www.pexels.com/pt-br/foto/foto-da-raposa-sentada-no-chao-2295744/'picnp=open_image_in_cv('pexels-alex-andrews-2295744.jpg',channels_in_output=3)coords=search_colors(pic=picnp,colors=colors,threadsperblock=(18,18,3),dtypetouse=np.int32)print(coords)%timeitsearch_colors(pic=picnp,colors=colors,threadsperblock=(18,18,3),dtypetouse=np.int32)# [[[  19   14]#   [  19   14]#   [  11   17]#   ...#   [6613 4524]#   [6614 4524]#   [6615 4524]]]# 135 ms Â± 3.5 ms per loop (mean Â± std. dev. of 7 runs, 10 loops each)# More benchmarks: https://github.com/hansalemaos/locate_pixelcolor_cpp
Package: locate-system-path
Path LocatorThis package that allows you to do an sys.path.append one level above the repository for find the modules correctly when you run a python file from console.InstallationInstallsys-path-locatorpackage with pip.pipinstallsys-path-locatorAuthors@tmoralesContributingContributions are always welcome!Seecontributing.mdfor ways to get started.Please adhere to this project'scode of conduct.License usedMITSupportFor support, email memoralesveratomas@gmail.comFeedbackIf you have any feedback, please reach out to me atmoralesveratomas@gmail.comFAQWhat Python version is necessary?To develop this solution I used the Python 3.10 version.What pip version is necessary to install the package?Make sure you're using the latest version.Runpip install --upgrade pipfrom console.
Package: locatieserver
LocatieserverFeaturesTODORequirementsTODOInstallationYou can installLocatieserverviapipfromPyPI:$pipinstalllocatieserverUsagePlease see theusage docsfor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Locatieserveris free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: locationbyip
# Welcome to LocationByIP## To find location by ip address
### Import the package before using itimport LocationByIP as iplocation###  Methodsimport LocationByIP as iplocation#Now iplocation is your object of the library# create a variable and store ipip=”127.0.0.1”location=iplocation.LocationByIP(ip)
print(location)After reading above shit if you left coding/programming field i m not responsible lol### About
## Author : [Awais khan](https://awaiskhan.com.pk)if this project help you then i m worth of followi do freelancing and stuff if you want scrapper than shot an email more faster than speed of bulletmail:contact@awaiskhan.com.pkGoing to Mars for coding stuff to avoid noice and normal people, Awais khan
Package: locationcrypto
Location-based CryptographyPackage published at:PyPILocation based cryptography uses location of the device in addition to pass-phrase as encryption/decryption key.Install:pipinstalllocationcryptoUse:Create a python script, for exampleexample.py:fromlocationcryptoimportcrypt# To encrypt:encryption=crypt.encrypt(plain_text='Harshil',key='test')print(f'Encryption:{encryption}')# To decrypt:decryption=crypt.decrypt(encrypted_text=encryption,key='test')print(f'Decryption:{decryption}')Save and run:❯❯❯python3example.py
Encryption:Jevujhk
Decryption:HarshilAuthor:Harshil DarjiThanks toAtharv Attrifor helping me publish this repository as a package.
Package: location-guessing-game-telegram-bot
Location Guessing Game Telegram Bot 🏞️ 🌍 📌BasicTelegram BotSending RandomWikimedia CommonsPhotosSetupDownload a dataset of photos via theWikiMap API, for instance:wget--restrict-file-names=windows'https://wikimap.toolforge.org/api.php?cat=Images_with_annotations&lang=de&year=2010-2015&region=49|9|46|18'Generate a bot API token by sending/newbottoBotFatherInstall bot viapip3 install --user --upgrade location-guessing-game-telegram-bot(or usedocker/podman, see below)UsageLaunch bot:location-guessing-game-telegram-bot --telegram-token-path file-containing-api-token --wikimap-export-path wikimap-export.jsonOpen a chat with the bot in Telegram by searching for the bot's name
previously sent toBotFatherSend message/photo, wait, and repeatOptionally add the bot to a group chat.Docker / Podman 🐳Pre-built docker images are available athttps://hub.docker.com/r/fphammerle/location-guessing-game-telegram-bot/tags$sudodockerrun--namelocation_guessing_game_telegram_bot\-v/file/containing/api-token:/telegram-token:ro-eTELEGRAM_TOKEN_PATH=/telegram-token\-v/wikimap/export.json:/wikimap-export.json:ro-eWIKIMAP_EXPORT_PATH=/wikimap-export.json\--read-only--cap-dropALL--security-optno-new-privileges\--cpus0.4--memory128M\docker.io/fphammerle/location-guessing-game-telegram-bot:latestOptionally, replacesudo dockerwithpodman.Annotation of signed git tagsdocker/*contains docker image digests:https://github.com/fphammerle/location-guessing-game-telegram-bot/tagsDetached signatures of images are available athttps://github.com/fphammerle/container-image-sigstore(exluding automatically builtlatesttag).Docker Compose 🐙Clone this repository.Edit paths indocker-compose.yml.sudo docker-compose up --buildTriviaWhy create a Telegram bot instead of a web app?I created this mini game for my family including my grandparents, who are comfortable using Telegram.
Package: location-history-total
location-history-totalGiven a Takeout of Google Location History, generate a CSV of work history.Requires Python 3.6+.Example usageCreate a document with your points of interest:# Format is lat, long, radius
# '#' can be used to comment a line out
38.8100121,-104.6792472, 0.04
39.1355552,-121.3484781, 0.1Google Maps will be handy for determining the latitude and longitude of places.Use Google Takeout to export your location history.Current link ishttps://takeout.google.com/settings/takeout?hl=enSupport link ishttps://support.google.com/accounts/answer/3024190?hl=en(Optional) Determine the time period(s) you're intested in and get the Unix timestamps of the start and stop dates.Run the script. Assuming your POIs are inarea.txt, your location history is athistory.json, and a date range of 1 Oct 2018-1 Mar 2019:# Dump information to screen
location-history-total history.json --area=area.txt --time=1538373600,1551423600

# Or to a CSV
location-history-total history.json --area=area.txt --time=1538373600,1551423600 --output=results.csv
Package: location_ipfire_db_reader
from _testcapi import raise_exceptionfrom location_ipfire_db_reader import LocationDatabaselocation_ipfire_db_readerIntroductionI was looking for a geo-ip library where I can easily convert IPs into countries. And this preferably in Python and preferably offline.Couldn't find any, butipfireslocationutilitycame very close. Sadly it was coded in C.That's why I re-interpreted the location databases structure into Python and made a tiny wrapper around it for easy access.Installation:pipinstall-Ulocation-ipfire-db-readerMain usage:fromlocation_ipfire_db_readerimportLocationDatabase# This call will _download the location database into the provided file.#   It will not re-_download it if there are no updates.db=LocationDatabase('location.db')print(db.find_country('8.8.8.8'))# USThis library should work for both IP4 & IP6.Get more informationWhat if you wanted to get (much) more information? Like the continent, or the provider? These are all things contained in the ipfires database.fromlocation_ipfire_db_readerimportLocationDatabasedb=LocationDatabase('location.db')ip_info=db["8.8.8.8"]print(f"""ip:{ip_info.ip}subnet_mask:{ip_info.subnet_mask}network_address:{ip_info.network_address}ip_with_cidr:{ip_info.ip_with_cidr}asn:{ip_info.asn}asn_name:{ip_info.asn_name}country_code:{ip_info.country_code}country_name:{ip_info.country_name}country_continent:{ip_info.country_continent}is_anonymous_proxy:{ip_info.is_anonymous_proxy}is_satellite_provider:{ip_info.is_satellite_provider}is_anycast:{ip_info.is_anycast}is_drop:{ip_info.is_drop}""")This will output:ip: 8.8.8.8
subnet_mask: 24
network_address: 8.8.8.0
ip_with_cidr: 8.8.8.0/24

asn: 15169
asn_name: GOOGLE
country_code: US
country_name: United States of America
country_continent: NA

is_anonymous_proxy: False
is_satellite_provider: False
is_anycast: True
is_drop: FalseExceptionsAll exceptions within this package will inherit fromLocationIPFireDBReaderException. So if you want a blanket-capture-all. That's what you'll need.However, these are more fine-tuned versions:UnknownASNName: will be raised when an ASN is found, but there is no known name for it.IPAddressError: will be raised when an IP lookup fails. This happens with reserved IPs so far.What if you don't want exceptions?If you don't like to handle exceptions, you can always initialize yourLocationDatabaselike this:db=LocationDatabase(raise_exceptions=False)Now if for example the AS isn't known, it will output0for the asn, and""for the AS name. Instead of raising an exception.Developers information(or more accurately named:information for myself at a future point in time😎)database.py: The wrapper, ie: consumer-facing code.database_reader.py: The wrapper around the filehandling and reading and stuff.decompress_db.pycontains just the code to facilitate extraction of the databasedownload_db.py: download (or update) once a day the newest ipfire location database.interpret_location_db.py: contains the low-level interpretation of the database file.ip_information.py: contains the class where all information can be retrieved from ipfires database.
Package: locationiq
LocationIQ Python geocoderPython client library for LocationIQ Gecoding ServicesUsageLocationIQ python client library can be installed using pip:$ pip install locationiqLoad the locationiq geocoding module using the below line:from locationiq.geocoder import LocationIQNow create a instance of the geocoder module, pass the LocationIQAPI Tokenas the parameter to module’s constructor.geocoder = LocationIQ(key)Forward GeocodingTo convert the street addresses into geographic coordinataes (latitude and longitude)geocoder.geocode(‘Charminar Hyderabad’)Reverse GeocodingTo convert geographic coordinates into street addressesgeocoder.reverse_geocoder(17.3850, 78.4867)Exceptionsif there is any error, below exceptions will be raised.LocationIqNoPlacesFoundif there are no matching resultsLocationIqInvalidKeyIf the provided api_key is invalid.LocationIqInvalidRequestIf you go past your rate limit.LocationIqRequestLimitExeceededIf you go past ratelimits.LocationIqServerErroroccurs basically when there’s server error
Package: locdata
# Time Trcaker Python Package on any platform.
## First use my template repo to create this repo.
- template repo =https://github.com/SachinMishra-ux/pypi_template- Peacefully do the changes with respect to your package name in all the files.` python template.py `` bash init_setup.sh `` 1) conda activate ./env 2) pip list `` mypy src/  - for checking any issues in your python code. `- o/p of above command - Success: no issues found in 3 source files` pytest-v- for any unit test `` tox - for final running `- then commit everything on github
- then add new workflow for python package
- ![](./Assets/img1.png)
- ![](./Assets/img2.png)Now add secrets to your github and change the`python publish.yml`file according to your needs. To acchieve this get API from python-pypi sitethen after each & everything ready then do this steps:![](./Assets/img3.png)Tracking the desktop applications in real time and time spent on each application and saving the data in json format.Dependencies:seleniumWindows Depenciespywin32python-dateutiluiautomation
Package: locdataMAC
# locdataMAC Python Package.
# locdataMAC
[![PyPI - latest](https://img.shields.io/pypi/v/locdataMAC)](https://pypi.org/project/locdataMAC/)
[![PyPI - Python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)](https://pypi.org/project/locdataMAC/)This package is meant to track your time on each & every software as well as on website & provides the analytics on your time spent.PYPI link for this package - [locdataMAC](https://pypi.org/project/locdataMAC/)## Getting Started### InstallationFirst let’s do an easy pip installation of the library by running the following command -` pip install locdataMAC `[Documentation](https://sachinmishra-ux.github.io/locdataMAC/)
Package: loci
This is an implementation of theLOCI(local correlation integral) fast outlier detection algorithm in Python, based on the paper:Papadimitriou, S., Kitagawa, H., Gibbons, P.B. and Faloutsos, C., 2003, March.Loci: Fast outlier detection using the local correlation integral. In Data Engineering, 2003. Proceedings. 19th International Conference on (pp. 315-326). IEEE.This is an initial first attempt implementation, it is functional (I think) however performance is very limited.InstallationpipinstalllociDependenciesScipy, NumpyPython version 3.6 (probably works with 3.x, not tested though)Exampleimportnumpyasnpimportmatplotlib.pyplotaspltfromloci.lociimportrun_locidata=np.concatenate((np.array([(10,10),]),np.random.normal(50,10,(200,2))))loci_res=run_loci(data)outlier_indices=loci_res.outlier_indicesplt.scatter(data[:,0],data[:,1])plt.scatter(data[outlier_indices,0],data[outlier_indices,1],c='r')plt.show()
Package: loci-checkmarx
Loci Checkmarx ImporterThe official Checkmarx results importer. Takes results from Checkmarx and inputs them to Loci Notes.Docshttps://loci-notes.gitlab.io/clients/checkmarxInstallationStandardpip3 install loci-checkmarxLatestpip3 install git+https://gitlab.com/loci-notes/loci-checkmarxDevelopmentIt is recommended that you use a virtualenv for development:virtualenv --python python3 venvsource ./venv/bin/activatepython setup.py developRun withloci-checkmarx
Package: loci-cli
Loci CLI Tool and Client LibraryThe official Loci CLI tool and Python client library. The CLI tool performs basic Loci Notes tasks from any command line, and the Python library can be used to build other Python clients.Docshttps://loci-notes.gitlab.io/clients/cliInstallationStandardpip3 install loci-cliLatestpip3 install git+https://gitlab.com/loci-notes/loci-cliDevelopmentpipinstallpoetry
poetryconfigvirtualenvs.in-projecttruepoetryinstall--withdev
poetryrunloci--helpUse VS Code for development and debugging.
Package: loci-sarif
Loci SARIF ProcessorThe official SARIF output processor. Takes any results stored in aSARIFfile and passes them to Loci Notes.Docshttps://loci-notes.gitlab.io/importers/sarifInstallationStandardpip3 install loci-sarifLatestpip3 install git+https://gitlab.com/loci-notes/loci-sarifDevelopmentIt is recommended that you use a virtualenv for development:virtualenv --python python3 venvsource ./venv/bin/activatepython setup.py developRun withloci-sarif
Package: loci-snyk
Loci Snyk ProcessorThe officialSnykresults output processor. Takes results from Snyk and inputs them to Loci Notes.Docshttps://loci-notes.gitlab.io/clients/snykInstallationStandardpip3 install loci-snykLatestpip3 install git+https://gitlab.com/loci-notes/loci-snykDevelopmentIt is recommended that you use a virtualenv for development:virtualenv --python python3 venvsource ./venv/bin/activatepython setup.py developRun withloci-snyk
Package: loci-spotbugs
Loci SpotBugs ImporterThe official SpotBugs results importer. Takes results from SpotBugs and inputs them to Loci Notes.Docshttps://loci-notes.gitlab.io/clients/spotbugsInstallationStandardpip3 install loci-spotbugsLatestpip3 install git+https://gitlab.com/loci-notes/loci-spotbugsDevelopmentIt is recommended that you use a virtualenv for development:virtualenv --python python3 venvsource ./venv/bin/activatepython setup.py developRun withloci-spotbugs
Package: loci-st
LOCIOverviewLOCI is a Python library offering various functions for analysing, mining, and visualizing spatial and temporal data. Specifically, it provides functionalities for spatial exploration and mining over Points and Areas of Interest, as well as for change detection and seasonality decomposition in time series data, and evolution tracking of dynamic sets of entities. LOCI is under active development, originally started in the EU H2020 projectSLIPOand being currently extended in the EU H2020 projectSmartDataLaketo include: (i) detection of Areas of Interest characterized by high or low mixture of POI types, and (ii) analytics over time series data and evolving sets of entities.Quick startPlease see the providednotebooks.DocumentationPlease seehere.LicenseThe contents of this project are licensed under theApache License 2.0.
Package: lock
lockThis is a module for enabling file locks. It usesfcntlto
accomplish this.POSIX operating systems implement advisory file locking. This enables
concurrent processes to interact with the same file without conflict,
provided they first check for the existence of a lock held by a
different process. Mandatory file locking can be enabled on POSIX
systems by mounting volumes using themount-omandoption and
makes the operating system prevent editing of a locked file.Thefcntlfunctionality is implemented in Python by thefcntlstandard library module. Using this, a lock can be acquired in a way
like the following:lock_file=open("data.db","a")fcntl.lockf(lock_file,fcntl.LOCK_EX|fcntl.LOCK_NB)If the file is locked, the following exception is raised:BlockingIOError:[Errno11]ResourcetemporarilyunavailableWith advisory locking, code should test for the existence of a a lock
before editing a file. It is the responsibility of the code, not the
operating system, to enforce locking correctly. Information about the
locks currently held on a file may be retrieved by passing a bytes
object as the third argument to thefcntl.fcntlfunction (which
takes the place of a pointer to the process ID in the fcntl header). The
lock information can be accessed in a way like the following:lock_data=struct.pack("hhllhh",fcntl.F_WRLCK,0,0,0,0,0)fcntl.fcntl(lock_file,fcntl.F_GETLK,lock_data)This returnslock_dataunchanged if there is no lock on the file.examplesThe following code saves a dictionary to a file in a loop usinglockto lock the file while the save is happening:importrandomimportlockwhileTrue:config={"a":1,"b":random.randint(1,2)}lock.save_JSON("config.json",config)The following code loads a dictionary from a file in a loop usinglockto lock the file while the load is happening:importlockwhileTrue:config=lock.load_JSON("config.json")ifconfig:print(config)These two pieces of code can be used concurrently.