Saravanan666/pypi-org huggingface dataset:
Package: python-gegl
Python lithweight wrapper for using GEGL - Generic Graphics Library
(http://www.gegl.org)Currently working for Python2 and Python3JustificativeIn the past, there were custom Python bindings for GEGL
on the library source tree itself. However, that code
bit-rot and was removed, with the introduction of
gobject  introspection, automatic bindings for several
languages - Python included - could be generated.The problem with the automatic bindings for GEGL is that
although usable, one has to do a lot of typing and copying around
to be able to leverage on the introspection capabilities
of Gobject and of GEGL itself.This project ains to add some custom Python code that makes
it more “pythonic” to make full use of GEGL.The file “snippets.py” contains an example of using
GEGL thorugh raw gobject introspection - you don’t need
this project installed at all to use code like that.With this installed, even in this early stage, the following
statements are enough to create and execute the
same GEGL graph used in “snippets.py”:>>> import gegl
>>> x = gegl.Graph("png-load", "invert", "png-save")
>>> x[0].path = "/home/gwidion/bla.png"
>>> x[0]
OpNode('gegl:png-load')
>>> x[2].path = "/home/gwidion/bla2.png"
>>>
>>> x()
>>>PrerequisitesYou will need a working GEGL with Gobject introspection installed,
and pygobject. This comes out of the box with proper install of GEGL
and gobject introspection: works in Fedora 20 (late 2013) and possibly
other recent distributions as of 2014.
Package: python-generate-mac
Python-generate_macPython library for working with Ethernet MAC addresses. Functions for generating
transforming and testing MAC addresses.Uses Wireshark's manuf, or s similarly formated file as input for specific
Vendor ID(VID) bytes, for creating moreSupported functions:Generatetotal_random()- Procedurely generated MAC address, using random function.vid_file_random(file)- uses random line from wireshark's manuf filevid_file_vendor(file, vendor name, desc=optional)- specify a vendor name,
uses wireshark's manuf file instead of being completely random. May optionally
specify desc, which searches description within the vendor fieldvid_provided(vid bytes)- specify the VID bytes when calling the function.
Random device bytes will be generated.Testlist_vendors(file)- return a python set{} of uniqe valid vendors, from
a wireshark manuf fileis_mac_address(mac)- Takes a string, and checks if it is a valid Ethernet
MAC address. returns True or False(bool type)Transformget_vid_bytes(mac)- Returns the vendor bytes(first three) from a MAC address.another_same_vid(mac)- Generates another MAC with diffrent device bytes
with same vendor bytes as inputUsageImport and set up an object.from generate_mac import generate_macProcedurely generated Vendor and Host bytes. Checks for broadcast bitgenerate_mac.total_random()
'7E:CD:60:1E:AC:6E'Read Vendor bytes from random line in a file. This has to be formated the same
as wireshark's manuf file.generate_mac.vid_file_random('/usr/share/wireshark/manuf')
'70:B3:D5:C5:40:49'Read from a manuf file like above, but find Vendor bytes belonging to a specific
vendor, by name.generate_mac.vid_file_vendor('/usr/share/wireshark/manuf',"Motorola")
'40:88:05:4F:CE:82'OPTIONAL:this can also now search the description fieldgenerate_mac.vid_file_vendor('/usr/share/wireshark/manuf',"Motorola","BSG")
'00:24:37:5C:3A:8B'Provide the vendor bytes in a string. Generate Host bytes onlygenerate_mac.vid_provided('00:06:8C')
'00:06:8C:35:5E:C4'List valid vendor options as a list.generate_mac.list_vendors('/usr/share/wireshark/manuf')
['Vendor1','Vendor2','etc']Check if a MAC address is valid. returns a Bool(True,False)generate_mac.is_mac_address('00:06:8C:35:5E:C4')
TrueGet the VID bytes from a MAC addressgenerate_mac.get_vid_bytes('00:06:8C:35:5E:C4')
'00:06:8C'Generate another MAC from the same VID bytes as current MACgenerate_mac.another_same_vid('00:06:8C:35:5E:C4')
'00:06:8C:3D:C2:F2'
Package: python-generics
Python-GenericsThis package provides functionalities to determine the values of generic type variables in Python.
As of now, it only supports two functions:get_type_varsandget_filled_type.
These functions work also with pydantic generic models (only tested with pydantic > v2.3.0).The package has no dependencies itself.InstallationThe package isavailable on PyPI:pipinstallpython-genericsHow to use (in your own application)Theget_type_varsfunction returns a tuple of all type variables for a given generic type. TheTypeVars are
determined byGenericif the type is a subclass ofGeneric. Otherwise, they are determined by the indexed
supertypes (the order of the returned tuple is the lexicographical in the list of the supertypes).fromtypingimportGeneric,TypeVarfromgenericsimportget_type_varsT=TypeVar("T")U=TypeVar("U")V=TypeVar("V")classA(Generic[T,U]):passclassB(A[T,U],Generic[U,T]):passclassC(B[T,U],A[T,V]):passassertget_type_vars(A)==(T,U)assertget_type_vars(B)==(U,T)assertget_type_vars(C)==(T,U,V)Theget_filled_typefunction determines for a singleTypeVarthe value if defined somewhere.
To determine the value, you have to pass a type or an instance of a type that is a subclass of a generic type
of which you want to determine the value of theTypeVar.Instead of supplying theTypeVaritself, you can define the integer position of theTypeVarin the tuple ofTypeVars of the generic type.fromtypingimportGeneric,TypeVarfromgenericsimportget_filled_typeT=TypeVar("T")U=TypeVar("U")V=TypeVar("V")classA(Generic[T,U]):passclassB(A[str,U]):passassertget_filled_type(A[str,U],A,T)==strassertget_filled_type(B[int](),A,0)==strTheget_filled_typefunction is especially useful if you have generic super types in which you want to determine
the value of aTypeVarinside methods.fromtypingimportGeneric,TypeVar,Anyfromgenericsimportget_filled_typeT=TypeVar("T")classMySuperType(Generic[T]):defget_type(self)->Any:returnget_filled_type(self,MySuperType,0)classMySubType(MySuperType[str]):passassertMySubType().get_type()==strHow to use this Repository on Your Machine (as a developer)Follow the instructions in ourPython template repository.ContributeYou are very welcome to contribute to this template repository by opening a pull request against the main branch.
Package: python-geoacumen-city
python-geoacumen-cityInstallationpip install python-geoacumen-cityUsage>>> import geoacumen_city
>>> import maxminddb
>>> reader = maxminddb.open_database(geoacumen_city.db_path)
>>> reader.get("1.1.1.1")
{'city': {'names': {'en': 'Sydney'}},
 'continent': {'code': 'OC',
  'geoname_id': 6255151,
  'names': {'de': 'Ozeanien',
   'en': 'Oceania',
   'es': 'Oceanía',
   'fa': 'اقیانوسیه',
   'fr': 'Océanie',
   'ja': 'オセアニア',
   'ko': '오세아니아',
   'pt-BR': 'Oceania',
   'ru': 'Океания',
   'zh-CN': '大洋洲'}},
 'country': {'geoname_id': 2077456,
  'is_in_european_union': False,
  'iso_code': 'AU',
  'names': {'de': 'Australien',
   'en': 'Australia',
   'es': 'Australia',
   'fa': 'استرالیا',
   'fr': 'Australie',
   'ja': 'オーストラリア',
   'ko': '오스트레일리아',
   'pt-BR': 'Austrália',
   'ru': 'Австралия',
   'zh-CN': '澳大利亚'}},
 'location': {'latitude': -33.8688, 'longitude': 151.209},
 'subdivisions': [{'names': {'en': 'New South Wales'}}]}
>>>Note that you must still comply with the requirements of the DB-IP license specified here:https://db-ip.com/db/download/ip-to-city-liteThat is the following:You are free to use this IP to City Lite database in your application, provided you give attribution to DB-IP.com for the data.In the case of a web application, you must include a link back to DB-IP.com on pages that display or use results from the database. You may do it by pasting the HTML code snippet below into your code :<a href='https://db-ip.com'>IP Geolocation by DB-IP</a>
Package: python-geoclient
Python-GeoclientCall the RESTfulNYC Geoclient APIusing python.IntroductionThis library provides a Python interface for using theNYC Geoclient API. It is an updated and maintained fork ofnyc_geoclient.In order to use the library, you must first register an application with theNYC Developer Portalto obtain an application key and ID.Installingyou can install python-geoclient using:$ pip install python-geoclientor you can clone this directory and:$ python setup.py installQuickstartOnce your app has been registered withDoITT, using the API is simple:fromgeoclientimportGeoclientg=Geoclient('my app ID','my app key')You can use any of the available methods documented in theAPI:g.address(100,'Gold st','MN'){u'uspsPreferredCityName':u'NEW YORK',u'fireCompanyType':u'E',u'fromLionNodeId':u'0015445',u'cooperativeIdNumber':u'0000',u'dotStreetLightContractorArea':u'1',u'lionBoroughCodeForVanityAddress':u'1',u'zipCode':u'10038',u'fireCompanyNumber':u'006',u'communityDistrict':u'101',u'firstStreetNameNormalized':u'GOLD STREET',u'boroughCode1In':u'1',u'latitude':40.71035225065372,u'longitude':-74.00400739046181,...}Geocoding Errorspython-geoclient will raise aGeoclientErrorwhen the Geoclient API returns an error code. Sometimes there is more information returned, in which case the exception will have aresultdictionary.fromgeoclientimportGeoclientErrortry:g.address(125,'wort st',1)exceptGeoclientErrorase:print(e)# 'WORT STREET' NOT RECOGNIZED. THERE ARE 010 SIMILAR NAMES.print(e.result['streetName1'])# WORTH SQUAREDocumentationThePython Geoclient documentationdetails using the library.The API closely follows theDoITT documentation(requires account/login).Running Testspython setup.py testContributingIf you see an issue or would like to contribute, pull requests are welcome.LicenseBSD.
Package: python-geocoder
About=====Python-Geocoder is a simple library that uses Google Maps API for geocoding.Usage=====As python library::>>> from geocode.google import GoogleGeocoderClient>>> geocoder = GoogleGeocoderClient(False) # must specify sensor parameter explicitely>>> result = geocoder.geocode("massasauga park")>>> result.is_success()True>>> len(result)3# by default all get_*() methods will fetch the first result:>>> result.get_formatted_address()u'The Massasauga Provincial Park, The Archipelago, ON, Canada'# but you can also pass it an index parameter:>>> result.get_formatted_address(2)u'Massasauga Prairie Nature Preserve, Roseville, IL 61417, USA'>>> result.get_location()(Decimal('45.19526590'), Decimal('-80.05372229999999'))>>> result.get_location_type()u'APPROXIMATE'# each result object is an iterator containing nested dictionaries according to# Google geocoding specifications (http://code.google.com/apis/maps/documentation/geocoding/)>>> for r in result: print r["formatted_address"]The Massasauga Provincial Park, The Archipelago, ON, CanadaThe Massasauga Provincial Park, RR 2, Parry Sound, ON P0G, CanadaMassasauga Prairie Nature Preserve, Berwick, IL 61417, USAIf you are using Google Maps API for business pass your key and client id wheninitializing GoogleGeocoderClient::>>> geocoder = GoogleGeocoderClient(False, my_client_id, my_key)geocode/google-geocoder.py is a command line tool. A sample usage::$ python geocode/google.py -a "massasauga park"The Massasauga Provincial Park, The Archipelago, ON, Canada (45.19526590, -80.05372229999999) - APPROXIMATEThe Massasauga Provincial Park, RR 2, Parry Sound, ON P0G, Canada (45.1969970, -80.0398220) - APPROXIMATEMassasauga Prairie Nature Preserve, Roseville, IL 61417, USA (40.76002530, -90.57780330) - APPROXIMATEFor more usage information run::$ python geocode/google.py --help
Package: python-geoip
python-geoip is a library that provides access to GeoIP databases.
Currently it only supports accessing MaxMind databases.  It’s similar to
other GeoIP libraries but comes under the very liberal BSD license and
also provides an extra library that optionally ships a recent version of
the Geolite2 database as provided by MaxMind.Documentation is available athttp://pythonhosted.org/python-geoip/
Package: python-geoip-python3
python-geoip-python3============This is a fork of python-geoip with python 3 support. Created as the maintainer of python-geoip neglected it and no longer adds releases to PyPI.----python-geoip is a library that provides access to GeoIP databases.Currently it only supports accessing MaxMind databases.  It's similar toother GeoIP libraries but comes under the very liberal BSD license andalso provides an extra library that optionally ships a recent version ofthe Geolite2 database as provided by MaxMind.Documentation is available at https://python-geoip-yplan.readthedocs.org/en/latest/
Package: python-geoip-yplan
python-geoip is a library that provides access to GeoIP databases.
Currently it only supports accessing MaxMind databases.  It’s similar to
other GeoIP libraries but comes under the very liberal BSD license and
also provides an extra library that optionally ships a recent version of
the Geolite2 database as provided by MaxMind.Documentation is available athttps://python-geoip-yplan.readthedocs.org/en/latest/
Package: python-geosupport
python-geosupportPython bindings for NYC Planning'sGeosupport Desktop Edition.Read the docsQuickstart# Import the library and create a `Geosupport` object.fromgeosupportimportGeosupportg=Geosupport()# Call the address processing function by nameresult=g.address(house_number=125,street_name='Worth St',borough_code='Mn')resultis a dictionary with the output from Geosupport. For example:{
    '2010 Census Block': '1012',
    '2010 Census Tract': '31',
    'Assembly District': '65',
    'Atomic Polygon': '112',
    'B10SC - First Borough and Street Code': '14549001010',
    'BOE Preferred B7SC': '14549001',
    'BOE Preferred Street Name': 'WORTH STREET',
    'BOROUGH BLOCK LOT (BBL)': {
        'BOROUGH BLOCK LOT (BBL)': '1001680032',
        'Borough Code': '1',
        'Tax Block': '00168',
        'Tax Lot': '0032'
    },
    'Blockface ID': '0212261942',
    ...
}LicenseThis project is licensed under the MIT License - see thelicense.txtfile for detailsContributorsThanks toJeremy Neimanfor a major revision incorporating all Geosupport functions and parameters.If you see an issue or would like to contribute, pull requests are welcome.
Package: python-geotiepoints
python-geotiepointsPython-geotiepoints is a python module that interpolates (and extrapolates if
needed) geographical tiepoints into a larger geographical grid. This is usefull
when the full resolution lon/lat grid is needed while only a lower resolution
grid of tiepoints was provided.Some helper functions are provided to accomodate for satellite data, but the
package should be generic enough to be used for any kind of data.In addition we have added a fast multilinear interpolation of regular gridded
data using Cython.Adam & Martin
May 2017, Norrköping, Sweden
Package: python-gerber
Python Gerber LibraryThis library provides a simple and elegant parser for Gerber and NC Drill files. It's written in pure Python and supports all Gerber commands, including most deprecated ones.File Structure.
├── pygerber
│   ├── aperture.py
│   ├── drill_layer.py
│   ├── gerber_layer.py
│   └── renderers
│   │   |   # Renders a Gerber file as an SVG
│   │   └── svg.py
│   └── standards
│       │   # Enums of Gerber file format
│       ├── gerber.py
│       |   # Enums of NC Drill file format
│       └── nc_drill.py
└── tests
    |   # All unit tests for this package
    └── test_package.pyFeaturesGerber X2 file parserReading gerber layerWriting gerber layerNC Drill file parserReading X2 standard filesWriting drill filesAPI for drill operationsAPI for rout operationsSVG renderingDrill operationsLinear rout operationsCircular rout operationsGerber flash operationsGerber linear interpolationsGerber circular interpolationsRunning Unit TestsPlace gerber files in thetestdatafolder and run the unit tests:pytestReferencesGerber StandardNC Drill Standard
Package: python-gerrit
python-gerrit=============Python library for managing Gerrit through sshGetting Started===============Queries-------from gerrit import filtersfrom gerrit import reviewsproject = filters.OrFilter()project.add_items('project', ['openstack/glance', 'openstack/python-glanceclient'])other = filters.Items()other.add_items('is', 'open')other.add_items('limit', 100)query = reviews.Query('review.openstack.org')for review in query.filter(project, other):# do something with the reviewReviews-------from gerrit import reviewsrev = reviews.Review('23424,12', host='review.openstack.org')# Set the patch as WIPrev.status('workinprogress')rev.commit()# Set the patch as ready for reviewrev.status('readyforreview')rev.commit("Ok, it is ready for review")# Code-review -2rev.review(-2)rev.commit("Erm, I don't like this patch at all")# Code-review -2rev.review(2)rev.verify(1)rev.commit("Cool, LGTM, approved")
Package: python-gerrit-cli
Gerrit 命令行接口。安装pipinstallpython-gerrit-cli使用方法在使用之前需要先设置用户名和HTTP密码，这些信息存储在~/gerrit.rc。这一步只需要做一次。gerritcliserveradd<name><host><username><password>可以添加多组信息（不同服务器，或同一服务器的不同用户），默认使用添加的第一组信息。gerritcli server default <name>修改默认值，也可以使用全局选项-s <name>指定服务器。示例1：查看帮助信息主命令和子命令都支持-h选项。$gerritcli-h
usage:gerritcli[-h][-sSERVER][--debug]command...

positionalarguments:commandcommandusageserveradd/remove/listgerritserverinfoversionshowgerritserverversionprojectprojectcommandaccountaccountcommandhelpchangechangecommandhelpgroupgroupcommandpatchpatchcommandhelpoptionalarguments:-h,--helpshowthishelpmessageandexit-sSERVERspecifygerritserver.Ifnotspecified,thedefaultvalueisused--debugenabledebug

$gerritclichange-h
usage:gerritclichange[-h]{search,get,create,delete}...

positionalarguments:{search,get,create,delete}changecommandhelpsearchQuerieschangesvisibletothecaller.getgetchangecreatecreatechangedeletedeletechange

optionalarguments:-h,--helpshowthishelpmessageandexit示例2：查询服务器版本gerritcliversion示例3：查询修改查询自己还没有合并的修改。默认以表格的形式输出。关于搜索指令is:open+is:owner的更多信息，可以参考gerrit文档，Searching Changes。gerritclichangesearch'is:open+is:owner'示例4：指定输出格式使用选项--format指定输出的格式，支持table、csv、json。例如查询分支xxxxx已合并的修改，并保存到文件。这样可以Excel等工具打开，进行二次分析。gerritclichangesearch--formatcsv'branch:xxxxx+is:merged'>merged_cl.csv示例5：指定表头table和csv格式默认只会打印number、owner_name、subject、status、submitter_name、created、submitted字段，json格式会打印所有字段。可以使用--header选项打印指定字段。例如只打印number和subject。支持的字段请参考json格式的输出。gerritclichangesearch'is:open+is:owner'--header'number,subject'示例6：列出所有的仓库gerritcliprojectlist示例6：搜索活跃的账号gerritcliaccountsearch'is:active'示例7：下载补丁gerritclipatch<id>
Package: python-gerritclient
[![PyPI](https://img.shields.io/pypi/v/python-gerritclient.svg)](https://pypi.python.org/pypi/python-gerritclient)[![Build Status](https://travis-ci.org/tivaliy/python-gerritclient.svg?branch=master)](https://travis-ci.org/tivaliy/python-gerritclient)[![Documentation Status](https://readthedocs.org/projects/python-gerritclient/badge/?version=latest)](http://python-gerritclient.readthedocs.io/en/latest/?badge=latest)# python-gerritclientCLI tool and Python API wrapper for Gerrit Code Review## Quick Start### Command Line Tool1. Clone `python-gerritclient` repository: `git clone https://github.com/tivaliy/python-gerritclient.git`.2. Configure `settings.yaml` file (in `gerritclient/settings.yaml`) to meet your requirements.```yamlurl: http://review.example.comauth_type: basicusername: adminpassword: "1234567890aaWmmflSl+ZlOPs23Dffn"```* `url` can be specified according to the following format `<scheme>://<host>:<port>`, e.g. `https://review.openstack.org`* `auth_type` specifies HTTP authentication scheme (`basic` or `digest`), can be omitted, then all requests will be anonymous with respective restrictions* `username` and `password` - user credentials from Gerrit system (Settings &#8594; HTTP Password)3. Create isolated Python environment `virtualenv gerritclient_venv` and activate it `source gerritclient_venv/bin/activate`.4. Install `python-gerritclient` with all necessary dependencies: `pip install python-gerritclient/.`.5. (Optional) Add gerrit command bash completion `gerrit complete | sudo tee /etc/bash_completion.d/gc.bash_completion > /dev/null`6. Run `gerrit` command with required options, e.g. `gerrit plugin list`. To see all available commands run `gerrit --help`.### Library1. Clone `python-gerritclient` repository: `git clone https://github.com/tivaliy/python-gerritclient.git`.2. Create isolated Python environment `virtualenv gerritclient_venv` and activate it `source gerritclient_venv/bin/activate`.3. Install `python-gerritclient` with all necessary dependencies: `pip install python-gerritclient/.`.```pythonfrom gerritclient import clientconnection = client.connect("review.openstack.org", auth_type="digest" username="user-name", password="password")group_client = client.get_client('group', connection=connection)members = group_client.get_group_members('swift-core')  # or get_group_members(24)print(', '.join(member['name'] for member in members))```Output result: `Alistair Coles, Christian Schwede, Clay Gerrard, Darrell Bishop, David Goetz, Greg Lange, Janie Richling, John Dickinson, Kota Tsuyuzaki, Mahati Chamarthy, Matthew Oliver, Michael Barton, Pete Zaitcev, Samuel Merritt, Thiago da Silva, Tim Burke`
Package: python-geth
HELP NEEDED...with my dissertation. It is only 11 questions. As this package is part of my thesis it would be much appreciated if you spent a
few moments on filling out these11 anonymous questions. Thanks!PyGethPyGeth is a Python library for a quick setup of an Ethereum blockchain using Geth and for fast prototyping of contracts with truffle.InstallationPrerequisitesTo be able to run this package, please installGethandNpm (5.2.0 or higher)and add them to your Path.Note:This has solely been tested on Windows.Use the package managerpipto installpython-geth.pipinstallpython-gethUsageNodefrompython_geth.nodeimportNodenode1=Node(datadir="C:\\Users\\macutko\\Desktop\\node01")node1.start_node()This creates a geth node that allows interaction with it via the web3 library.node1.w3.geth.miner.start(1)To add a node on the chain do as follows. It requires the same genesis file.node2=Node(datadir="C:\\Users\\macutko\\Desktop\\node02",genesis_file="C:\\Users\\macutko\\Desktop\\node01\\config\\genesisjson")node2.start_node()node1.add_node(node2.w3.geth.admin.node_info()['enode'])ContractsTo be able to quickly deploy contracts and interact with them first configure truffle.node1.configure_truffle()To deploy a contract unlock an account, create a Contract Interface instance and deploy a contract. highly recommended to wrap deployment into a try
and accept block. This is to prevent zombie processes.account,password=node1.get_first_account()node1.w3.geth.personal.unlock_account(account,password)CI=ContractInterface(w3=node1.w3,datadir="C:\\Users\\macutko\\Desktop\\node01")try:m_con=CI.deploy_contract(contract_file="C:\\Users\\macutko\\Desktop\\GUID.sol",constructor_params=['2265072m'])[0]except:node1.stop_node()Example ContractExample contract:pragma solidity^0.4.24;contractHelloWorld{stringsaySomething;constructor()public{saySomething="Hello World!";}functionspeak()publicconstantreturns(stringitSays){returnsaySomething;}functionsaySomethingElse(stringnewSaying)publicreturns(boolsuccess){saySomething=newSaying;returntrue;}}After deploying, to get the saySomething variable.print(m_con.functions.speack.call())And to set a new message.tx_hash=m_con.functions.saySomethingElse("Not Hello World").transact()tx_receipt=CI.w3.eth.waitForTransactionReceipt(tx_hash)PipelineBUG: Fix the start of an already created nodeTEST:Connection from different deviceContributingPull 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