Saravanan666/pypi-org huggingface dataset:
Package: gso
GSO (Global State Observer)GSO is an open-source Python library for managing application state.
It uses a modified version of theObserver patternto sync UI state with application state.GSO was originally designed to work withPySide/PyQt,
but it works well with pretty much every class-based UI library out there.How to useYou will find a lot ofexamplesthat can help you get started.
The examples are very simple, they are all focused on
the pattern that works best with GSO.You are encouraged to clone the ones that use the UI library you are working with
and have a closer look.FlowIn GSO, application state is encapsulated in observables.An observable is like a wrapper around the actual state or variable.All an observable brings to the table is that it keeps references to
objects (usually UI components) that are interested in knowing when
the wrapped state changes.Observables force notification of observers when encapsulated state changes,
so whenever application state changes, UI components can instantly update
accordingly.All UI components that depend on at least one variable in
application state should implement theObserverinterface,
and each of these variables should be encapsulated in
anObservable.That was theOin GSO, theObserver pattern.You might be thinking, how do UI components reach
state? Well, that's where theGScomes to play.TheGlobalStateclass is used to group all application state variables
and make them globally available everywhere in your code,
so that UI components can easily request state updates
and observe application state. It acts as a singleton, and stores
all the observables in a Pythondict.As you already know, an observable can have multiple observers,
and an observer can observe multiple observables.In other words, one variable in application state
can have multiple UI components depending on it,
and one UI component can have it's state depend on multiple
variables in application state, which is why
thenotify_state_changed()method onObservers
accepts the parameteraction.If you are familiar withRedux, you probably
already have an idea what actions are, they are pretty similar in GSO,
but they arenotthe same.In both Redux and GSO, actions are objects that describe what kind of update
should take place in application state.In Redux, every action has a unique name, and a payload that
has all what is needed to make the corresponding update properly.However, in GSO, actions are distinct objects that encapsulate
state update logic. They are used byObservables in theirapply()method to update encapsulated state using the encapsulated logic.If you found any of this confusing or unclear, please refer to the examples.How to installMake sure you havepipinstalled, then open a terminal window, and type:pip install gso
Package: gsocket
gsocket一个仅 Python 使用的基于 socket 协议的模块SocketServer：连接服务端SocketClient：连接客户端SocketReceiver：自定义 on_open 等注意：SocketServer、SocketClient、SocketReceiver 自带 send、sendall、sendfile 方法本模块未匹配 websocket 协议，所有通信基于 struct 防止粘包，所以不适用安装pip install gsocketSocketServerfrom gsocket import SocketServer

SocketServer().start_server()SocketClient推荐使用 with 上下文，不然需要手动关闭from gsocket import SocketClient

with SocketClient() as s:
    s.send(msg="你好")SocketReceiverSocketServer、SocketClient 都具备此参数，可以自由定义其接收方法
下面以 SocketServer 示例from typing import Generator
from gsocket import SocketServer, SocketReceiver


class MySocketReceiver(SocketReceiver):
    def on_open(self):
        pass

    def on_message(self, msg: bytes):
        pass

    def on_file(self, filename: str, file_iterator: Generator):
        pass

    def on_close(self):
        pass


SocketServer(receiver=MySocketReceiver).start_server()
Package: gsocketpool
A simple connection pool for gevent.Basic UsageThe following is an example to create a connection pool that communicates an echo server running onlocalhost 2000.>>>fromgsocketpoolimportPool>>>fromgsocketpoolimportTcpConnection>>>>>>options=dict(host='localhost',port=2000)>>>pool=Pool(TcpConnection,options)>>>>>>withpool.connection()asconn:...conn.send('hello')...printconn.recv()helloImplementing ProtocolArbitrary protocols can be easily implemented by extendingConnectionclass. You have to override at least three functions such asopen(),close()andis_connected().TcpConnectionused in the above example is also implemented as a subclass of Connection.classTcpConnection(Connection):def__init__(self,host,port,lifetime=600,timeout=None):self._sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)self._host=hostself._port=portself._lifetime=lifetimeself._timeout=timeoutself._connected=Falseself._created=Nonedefget(self):returnself._sockdefopen(self):self._sock.connect((self._host,self._port))ifself._timeout:self._sock.settimeout(self._timeout)self._connected=Trueself._created=time.time()defclose(self):ifself._connected:self._sock.close()self._connected=Falsedefis_connected(self):returnself._connecteddefis_expired(self):iftime.time()-self._created>self._lifetime:returnTrueelse:returnFalsedefsend(self,data):assertself._connectedself._sock.send(data)defrecv(self,size=1024):assertself._connectedreturnself._sock.recv(size)DocumentationDocumentation is available athttp://gsocketpool.readthedocs.org/.
Package: gsodpy
gsodpyPython module to download and work with GSOD data from NOAAUsage Guide:Dowload All Dataimport gsodpy.gsodDownloader as gdown

gdown.get_data(directory="noaa_gsod")Process Desired Time Seriesimport gsodpy.gsodProcess as gsod 
import pandas as pd
import datetime

num_years = 10
num_extremes = 30
target_day = datetime.datetime(2020,3,20)

years, files = gsod.get_years_files(num_years)

df, df_day = gsod.process_all_years(files, target_day)Save Processed DataFramedf.to_pickle("df_monthly.pkl")
df_day.to_pickle("df_daily.pkl")

df = pd.read_pickle("df_monthly_fin.pkl")
df_day = pd.read_pickle("df_daily_fin.pkl")Create Extremes DataFrameIf we want to find the coldest and warmest stations on a given day we can use thecreate_extremes()functionextremes = gsod.create_extremes(df_day, df_day['DATE'][0], 40)
Package: gsoup
gsoupIn a nutshellA python library implementing various geometry / graphics algorithms, with focus on clarity rather than performance.Long versionThis library is the result of me getting tired of replicating pieces of utility code to do similar work across different projects. I decided to push any fundamental piece of code into this repository. The focus is on clarity and concisness for all implementations, but here and there some immediate/easy performance gains are used.The majority of the code uses numpy, but some effort has been made to also be compatible with pytorch for GPU computations, as many of my interests rely on a strong auto-differentiaion (and GPU enabled) package.All the code is used for self-educational purposes and to facilitate faster research of concepts in graphics, and specifically for applications in AR.Installationpip install gsoupUsageimport gsoupDevelopersgit clone https://github.com/yoterel/gsoup.gitcd gsouppip install -e .[dev]Feel free to submit pull requests (run the tests first).Buildbumpver update --no-fetch --patchpython -m buildtwine check dist/*twine upload dist/*
Package: gsozo-pkg
Grupo sozo PackageSet of python modules to implements or extend interfaces, like: extend pipedrive or mailchimp (third party module)gsozo_pkggsozo_pkgis an API wrapper forPipedrivewritten in Python.Installingpip install gsozo-pkgUsageUsing this library with API TokenClient instantiationfromgsozo_pkg.pipedriveimportClientclient=Client("CLIENT_ID","CLIENT_TOKEN")ActivitiesAPI docs:https://developers.pipedrive.com/docs/api/v1/ActivitiesGet all activity typesresponse=client.activities.get_activity_types()DealsAPI docs:https://developers.pipedrive.com/docs/api/v1/DealsAPI docs:https://developers.pipedrive.com/docs/api/v1/DealFieldsGet one deal fieldresponse=client.deals.get_deal_one_field('FIELD_ID')Update a deal fielddata={'id':''}response=client.deals.update_deal_field('FIELD_ID',data)Delete a participant from a dealresponse=client.deals.delete_participant_to_deal_by_person_id('DEAL_ID','PERSON_ID')OrganizationsAPI docs:https://developers.pipedrive.com/docs/api/v1/OrganizationsAdd a follower to an organizationresponse=client.organizations.add_follower_to_organization('ORGANIZATION_ID','USER_ID')PersonsAPI docs:https://developers.pipedrive.com/docs/api/v1/PersonsGet all personsresponse=client.persons.get_all_persons('*ARGS','PAGINATION_ON'=TRUE)List activities associated with a personresponse=client.persons.get_person_activities('PERSON_ID')List files attached to a personresponse=client.persons.get_person_attaches('PERSON_ID')List mail messages associated with a personresponse=client.persons.get_person_emails('PERSON_ID')List followers of a personresponse=client.persons.get_person_followers('PERSON_ID','PAGINATION_ON'=TRUE)Add a follower to a personresponse=client.persons.add_follower_to_person('PERSON_ID','USER_ID')Delete a follower from a personresponse=client.persons.delete_follower_to_person('PERSON_ID','USER_ID')Merge two personsresponse=client.persons.merge_two_persons('PERSON_TO_KEEP','PERSON_TO_OVERWRITE')PersonFieldsAPI docs:https://developers.pipedrive.com/docs/api/v1/PersonFieldsGet one person fieldresponse=client.persons.get_person_one_field('FIELD_ID')Update a person fielddata={'id':''}response=client.persons.update_person_field('FIELD_ID',data)For additional information or access to other endpoints within the same API structure, refer to the library used as a template for building this onepipedrive-python-lib.
Package: gspan-mining
gSpanFor Chinese readme, please go toREADME-Chinese.gSpanis an algorithm for mining frequent subgraphs.This program implements gSpan with Python. The repository on GitHub ishttps://github.com/betterenvi/gSpan. This implementation borrows some ideas fromgboost.Undirected GraphsThis program supports undirected graphs, and produces same results with gboost on the datasetgraphdata/graph.data.Directed GraphsSo far(date: 2016-10-29), gboost does not support directed graphs. This program implements gSpan for directed graphs. More specific, this program can mine frequent directed subgraph that has at least one node that can reach other nodes in the subgraph. But correctness is not guaranteed since the author did not do enough testing. After running several times on datasetsgraphdata/graph.data.directed.1andgraph.data.simple.5, there is no fault.How to installThis program supports bothPython 2andPython 3.Method 1Install this project using pip:pipinstallgspan-miningMethod 2First, clone the project:gitclonehttps://github.com/betterenvi/gSpan.gitcdgSpanYou canoptionallyinstall this project as a third-party library so that you can run it underanypath.pythonsetup.pyinstallHow to runThe command is:python-mgspan_mining[-smin_support][-nnum_graph][-lmin_num_vertices][-umax_num_vertices][-dTrue/False][-vTrue/False][-pTrue/False][-wTrue/False][-h]database_file_nameSome examplesRead graph data from ./graphdata/graph.data, and mine undirected subgraphs given min support is 5000python -m gspan_mining -s 5000 ./graphdata/graph.dataRead graph data from ./graphdata/graph.data, mine undirected subgraphs given min support is 5000, and visualize these frequent subgraphs(matplotlib and networkx are required)python -m gspan_mining -s 5000 -p True ./graphdata/graph.dataRead graph data from ./graphdata/graph.data, and mine directed subgraphs given min support is 5000python -m gspan_mining -s 5000 -d True ./graphdata/graph.dataPrint help infopython -m gspan_mining -hThe author also wroteexample codeusing Jupyter Notebook. Mining results and visualizations are presented. For detail, please refer tomain.ipynb.Running timeEnvironmentOS: Windows 10Python version: Python 2.7.12Processor: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz 3.60 GHzRam: 8.00 GBRunning time
On the dataset./graphdata/graph.data, running time is listed below:Min supportNumber of frequent subgraphsTime50002651.48 s30005269.07 s10004553 m 49 s60012357 m 29 s400271012 m 53 sReferencePapergSpan: Graph-Based Substructure Pattern Mining, by X. Yan and J. Han.
Proc. 2002 of Int. Conf. on Data Mining (ICDM'02).gboostOne C++ implementation of gSpan.
Package: gspatial-plot
gspatial_plotA geospatial plotting library built on top of geopandas. The aim of this library is to simplify generation of various geospatial plot and provide a simple interface to various commonly used geospatial plot types.DocumentationWelcome to gspatial-plot’s documentation! — gspatial-plot 0.1.0a0 documentationFeaturesSimple APIBetter defaults compared to vanilla geopandas plotCustomizations made simpleCompatible with other geopandas or matplotlib axis objectsProvides functions for plotting bubbleplots, cartograms, heatmaps, spikemaps and densityplotsInstallingpip install gspatial-plotUsageimportgspatial_plotasgspusa=gsp.us_statesusa=usa[~usa["NAME"].isin(["Hawaii","Guam","American Samoa","Commonwealth of the Northern Mariana Islands","Alaska",])]gsp.randommap(usa,seed=3,annot=True,annot_column="NAME",figsize=(30,30))gsp.shapeplot(usa,figsize=(15,15))gsp.pointplot(usa_points,base=usa)gsp.choropleth(usa,"AWATER")gsp.bubblemap(usa,usa["AWATER"])gsp.cartogram(usa,"AWATER",)gsp.densityplot(usa,clip=True,clip_factor=1.5)gsp.heatmap(usa,"AWATER")gsp.spikemap(usa,"AWATER")gsp.offline_static_basemap()gsp.offline_folium_basemap(crs="EPSG4326")
Package: gspatial-tools
gspatial_toolsgspatial_tools is a library of utility functions written on top of
geopandas, xarray, rasterio and rioxarray. It makes a lot of things we
want to do easier
gspatial-plot is licensed under MIT License.FeaturesGenerate Lat Lon grid at specific resolutionFilter points based on radiusBulk Clip and Save Raster FilesReproject Raster FilesStitch Multiple Raster Files in same CRSRead Raster File directly to GeoDataFrameConvert Xarray to GeoDataFrameClip each geometry by rectangle/bboxSample points inside polygonsSample points inside bboxSample points data from raster without loading the entire datasetGet K nearest points along with distance and indices for each point in a GeoDataFrameMove and Scale a polygon/shape from a GeoDataFrameInstallingpip install gspatial-toolsDocumentationhttps://gspatial-tools.readthedocs.ioPyPigspatial-tools · PyPI
Package: gspider
A web spider framework based ongeventandrequests.Spider Example以下是我们的一个爬虫类示例，其作用为爬取百度新闻的热点要闻:fromgspiderimportSpider,HttpRequest,run_spider,SelectorclassBaiduNewsSpider(Spider):defstart_requests(self):yieldHttpRequest("http://news.baidu.com/")defparse(self,response):selector=Selector(response.text)hot=selector.css("div.hotnews a").textself.log("Hot News:")foriinrange(len(hot)):self.log("%s:%s",i+1,hot[i])if__name__=='__main__':run_spider(BaiduNewsSpider)在爬虫类中我们定义了一些方法：start_requests: 返回爬虫初始请求。parse: 处理请求得到的页面，这里借助Selector及CSS Selector语法提取到了我们所需的数据。Documentationhttp://gspider.readthedocs.io/
Package: gs-pip-install
[ ~ Dependencies scanned by PyUp.io ~ ]Pip Install Packages Stored in Google Cloud Bucketsgs_pip_install-bpython-package-location-rpackage_namegs_pip_install-bpython-package-location-rrequirements_file.txtgs_pip_install-bpython-package-location-rrequirements_file.txt-tpackage_install_destinationFree software: MIT licenseDocumentation:https://gs-pip-install.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: gspm
A tool to assist you in managing your Godot projects.How To InstallPlease see theInstallation Guideguide in theDocumentation.How To UseThere is an example projecthereto get you started.Below is an example that will create a new Godot project and show you how to use some basic commands.# create a new project>gspmnewtest-project
Projecttest-projecthasbeencreated# install assets>cdtest-project>gspminstall# edit your project>gspmedit
Package: gspot-fastapi-auth
GSpot authentication packageThis package allows you to authorize users through a shared redisInstall packagepipinstallgspot-fastapi-authDefine env variablesREDIS_AUTH_ACCESS_PREFIXdefault ''REDIS_AUTH_DBdefault 0REDIS_AUTH_HOSTdefault 127.0.0.1REDIS_AUTH_PORTdefault 6379REDIS_AUTH_PASSWORDdefault NoneREDIS_AUTH_TOKEN_STORAGEdefault 'headers' should be 'cookies'Define startapp and shutdown logicfromcontextlibimportasynccontextmanagerfromfastapiimportFastAPIfromsrc.gspot_fastapi_authimporttoken_configfromgspot_fastapi_auth.providersimportRedisSingleton@asynccontextmanagerasyncdeflifespan(app:FastAPI):RedisSingleton.init_redis(token_config.HOST,token_config.PORT,token_config.DB,token_config.PASSWORD)yieldawaitRedisSingleton().close()app=FastAPI(lifespan=lifespan)Use in viewfromgspot_fastapi_authimportUserRedisAuth@app.get("/")asyncdefread_root(user=Depends(UserRedisAuth())):returnuser.to_dict()
Package: gspoty
GspotySpotify List metadata extractorEnvironment variablesThis script loads a JSON file with the form specified byexample_key.json,
this file must be namedkey.json, and should have valid client / secret values from Spotify and a valid device di from Google MusicYou should get those keys from the spotify developers page and google music oauth2. Please see spotipy and gmusic API for further informationRequirementsBasically with Python3 and pip you are set up! pip will handle dependencies using
requirements file, but specifically the only dependency appart from a default
python 3 environment will bespotipy, andgmusicapiseerequirements.txtfile for specific version.Python 3pipspotipygmusicapipip install -r requirements.txtRun the modulepython-mgspotyhttps://open.spotify.com/playlist/74OoKks94WOn8h14OwLChPoptionally you can pass the location to json file with the required keyspython -m gspoty https://open.spotify.com/playlist/74OoKks94WOn8h14OwLChP /tmp/keys_custom.json
Package: gsppy
GSP-PyGeneralized Sequence Pattern (GSP) algorithm in PythonThis package was created to use GSP with PythonTable of ContentsRequirementsInstallationUsageLicenseCitationRequirementsInstall Python:sudo apt install python3InstallationTo download GSP-Py just clone the Git repository hosted in GitHub:git clone https://github.com/jacksonpradolima/gsp-py.gitpython setup.py installAlternatively, you can install it withpip:pip install gsppyUsageExamples of configuring and running are located in thetestfoldersgsppy folder.To use it in a project, import it and use the GSP class.from gsppy.gsp import GSPIt is assumed that your transactions are a sequence of sequences representing items in baskets.transactions = [['Bread', 'Milk'],['Bread', 'Diaper', 'Beer', 'Eggs'],['Milk', 'Diaper', 'Beer', 'Coke'],['Bread', 'Milk', 'Diaper', 'Beer'],['Bread', 'Milk', 'Diaper', 'Coke']]Init the class to prepare the transactions and to find patterns in baskets that occur over the support threshold (count):result = GSP(transactions).search(0.3)The support count (or simply support) for a sequence is defined as the fraction of total data-sequences that "contain" this sequence.
(Although the word "contains" is not strictly accurate once we incorporate taxonomies, it captures the spirt of when a data-sequence contributes to the support of a sequential pattern.)LicenseThis project is licensed under the terms of the MIT - see theLICENSEfile for details.CitationIf this package contributes to a project which leads to a scientific publication, I would appreciate a citation.@misc{pradolima_gsppy,
  author       = {Prado Lima, Jackson Antonio do},
  title        = {{GSP-Py - Generalized Sequence Pattern algorithm in Python}},
  month        = jul,
  year         = 2019,
  doi          = {10.5281/zenodo.3333988},
  url          = {https://doi.org/10.5281/zenodo.3333988}
}
Package: gspread-dataframe
gspread-dataframeThis package allows easy data flow between a worksheet in a Google spreadsheet
and a Pandas DataFrame. Any worksheet you can obtain using thegspreadpackage
can be retrieved as a DataFrame withget_as_dataframe; DataFrame objects can
be written to a worksheet usingset_with_dataframe:importpandasaspdfromgspread_dataframeimportget_as_dataframe,set_with_dataframeworksheet=some_worksheet_obtained_from_gspread_clientdf=pd.DataFrame.from_records([{'a':i,'b':i*2}foriinrange(100)])set_with_dataframe(worksheet,df)df2=get_as_dataframe(worksheet)Theget_as_dataframefunction supports the keyword arguments
that are supported by your Pandas version’s text parsing readers,
such aspandas.read_csv. Consultyour Pandas documentation for a full list of options. Since the'python'engine in Pandas is used for parsing,
only options supported by that engine are acceptable:importpandasaspdfromgspread_dataframeimportget_as_dataframeworksheet=some_worksheet_obtained_from_gspread_clientdf=get_as_dataframe(worksheet,parse_dates=True,usecols=[0,2],skiprows=1,header=None)Formatting Google worksheets for DataFramesIf you install thegspread-formattingpackage, you can additionally format a Google worksheet to suit the
DataFrame data you’ve just written. See thepackage documentation for details, but here’s a short example using the default formatter:importpandasaspdfromgspread_dataframeimportget_as_dataframe,set_with_dataframefromgspread_formatting.dataframeimportformat_with_dataframeworksheet=some_worksheet_obtained_from_gspread_clientdf=pd.DataFrame.from_records([{'a':i,'b':i*2}foriinrange(100)])set_with_dataframe(worksheet,df)format_with_dataframe(worksheet,df,include_column_header=True)InstallationRequirementsPython 2.7, 3+gspread (>=3.0.0; to use older versions of gspread, use gspread-dataframe releases of 2.1.1 or earlier)Pandas >= 0.24.0From PyPIpipinstallgspread-dataframeFrom GitHubgitclonehttps://github.com/robin900/gspread-dataframe.gitcdgspread-dataframepythonsetup.pyinstall
Package: gspread-rpa
gspread_rpaagspread(Python API for Google Sheets) hight level wrapperObject:CellIndex, GridIndexuse x,y (col, row) indexes start at 1GoogleSheetsembedded spreadsheets and worksheets as well as revision download uploadCellFormatfunction call cells formatingUsage Examplespython3 -m pip install --user gspread-rpafrom gspread_rpa import CellIndex, GridIndex, GoogleSheets, CellFormatBasic usage examplesEnvironment variableGOOGLESHEETS_RUN_MODE="user"use credentials.jsonGOOGLESHEETS_RUN_MODE="service"use service_account.jsonContribute and contactvia thegithub repositoryby email:rpa@unipart.ioLicense noticesThis program is free software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/>.
Package: gspreed
Super simpleGoogle Spreadsheets Python API.Basic usageConnect to Google Spreadsheet and set a value to a cell:import gspread

# Login with your Google account
gc = gspread.login('thedude@abid.es','****')

# Open a worksheet from spreadsheet with one shot
wks = gc.open("Where is the money Lebowski?").sheet1

wks.update_acell('B2', "it's down there somewhere, let me take another look.")FeaturesOpen a spreadsheet by itstitle,urlorkey.Select cells by labels, e.g. ‘A1’.Extract range, entire row or column values.Independent of Google Data Python client library.Python 3 support.Code and documentationCheckgspread on GitHub.LicenseMITDownload
Package: gsq
# G Square Conditional Independence Test## OverviewThis package contains conditional independence test functions using
the G-square test.## AcknowledgementThe code fragments included in this package are logically copied and
pasted from [the pcalg package for R]
(http://cran.r-project.org/web/packages/pcalg/index.html) developed by
Markus Kalisch, Alain Hauser, Martin Maechler, Diego Colombo, Doris
Entner, Patrik Hoyer, Antti Hyttinen, and Jonas Peters.## CodeThe source code is available athttps://github.com/keiichishima/gsq## Bug ReportsPlease submit bug reports or patches through the GitHub interface.## ContributorsJoost H. van der Linden,https://github.com/joosthvanderlindenSatoru Kobayashi,https://github.com/cpflat## AuthorKeiichi SHIMA
/ IIJ Innovation Institute Inc.
/ WIDE project