Saravanan666/pypi-org huggingface dataset:
Package: graphexec
GraphExecGraphExec is a tool for executinglitegraph.jsgraphs on a server, with node operations implemented as Python functions.Slot types can be any Python types, includingNumPyarrays and custom, opaque classes.It runs as a REST back-end for litegraph.js with some aftermarket modifications, or as a command-line tool. Generating JavaScript code for client-sidestub nodes(with slots, properties and widgets, but no business logic) is also possible, based on decorators added to the node implementation.For each node, server-side code can return image results (includingMatplotlibfigures).The project is in an alpha development stage; for example, litegraph.js built-in nodes are not implemented, and there is no support for the REST back-end in the upstream library.UsageWith my_node_types.py:fromgraphexecimportnode_typefrom.my_implementationimport_perlin_noise@node_type.define("my_package/perlin_noise","Perlin noise")@node_type.input("width","number")@node_type.input("height","number")@node_type.output("map","numpy.ndarray")defperlin_noise(width,height):returndict(map=_perlin_noise(int(width),int(height)))NODE_TYPES=[perlin_noise,]graphexec-generate-js-module -o ../litegraph/src/nodes/my-package-generated.js my_node_types
env PYTHONPATH=. graphexec-server --wwwroot ../litegraph -m my_node_typesFormat checkblack --diff **.pyType checkmypy graphexec
Package: graph-force
Graph ForceA python/rust library for embedding graphs in 2D space, using force-directed layouts.Installationpipinstallgraph_forceUsageThe first parameter defines the number of nodes in graph.
The second parameter is an iterable of edges, where each edge is a tuple of two integers representing the nodes it connects. Node ids start at 0.importgraph_forceedges=[(0,1),(1,2),(2,3),(3,0)]pos=graph_force.layout_from_edge_list(4,edges)Example with networkxThis library does not have a function to consume a networkx graph directly, but it is easy to convert it to an edge list.importnetworkxasnximportgraph_forceG=nx.grid_2d_graph(10,10)# we have to map the names to integers# as graph_force only supports integers as node ids at the momentedges=[]mapping={n:ifori,ninenumerate(G.nodes)}i=0foredgeinG.edges:edges.append((mapping[edge[0]],mapping[edge[1]]))pos=graph_force.layout_from_edge_list(len(G.nodes),edges,iter=1000)nx.draw(G,{n:pos[i]forn,iinmapping.items()},node_size=2,width=0.1)Example with edge fileThis methods can be used with large graphs, where the edge list does not fit into memory.Format of the file:Little endian4 bytes: number of nodes(int)12 bytes: nodeA(int), nodeB(int), weight(float)importgraph_forceimportstructwithopen("edges.bin","rb")asf:n=10f.write(struct.pack("i",n))forxinrange(n-1):f.write(struct.pack("iif",x,x+1,1))pos=graph_force.layout_from_edge_file("edges.bin",iter=50)Optionsiter,threadsandmodel,initial_posare optional parameters, supported bylayout_from_edge_listandlayout_from_edge_file.pos=graph_force.layout_from_edge_list(number_of_nodes,edges,iter=500,# number of iterations, default 500threads=0,# number of threads, default 0 (all available)model="spring_model",# model to use, default "spring_model", other option is "networkx_model"initial_pos=[(0.4,0.7),(0.7,0.2),...],# initial positions, default None (random))Available modelsspring_model: A simple spring model (my own implementation)networkx_model: Reimplementation of thespring model from networkxContributingDevelopment
Package: graphgame
graphgamegraphgame is a simple python package (still updating) that (until 0.1) provides a simple graph that allows players to add nodes.InstallationYou can install graphgame using pip:'''bash
pip install graphgameLicenseThis project is lecensed under the MIT LicenseCopyright (c) 2023 Ziyan ZhouPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
Package: graph-garden
Graph GardenPython library for managing ArangoDB instanceArangoDBis a trademark and property of ArangoDB, Inc. Graph Garden library is just a convenient way of managing ArangoDB instance from CLI and Python code (setup, start, stop). It is not developed or endorsed by ArangoDB, Inc.Installationpipinstallgraph-gardenUsageRun the following command to get help:graph-garden--helpYou can also see how Graph Garden is currently used inConceptNet Rocks!.
Package: graphgen
interactThis repository is a collection of the code I wrote while researching with theMechanical Systems Control Lab. The goal is to generate routable graphs from collections of GPS traces from theINTERACTION dataset.Algorithms/ResultsThe processing of data and graph generation algorithm was taken from the Microsoft paper byCao and Krumm.The raw data, when plotted, looks like:By simulating an attractive gravitational force between traces and using a graph generation algorithm, the following map is created:ImprovementsThere are still many improvements to be made:Cleaning up graph where multiple roads merge or splitImproving upon preprocessing of dataConduct lots of testing to determine optimal parameters
Package: graph-generators
graph-generatorsPython functions to compute various classes ofnetworkxgraphsRequirementsRequirespython >= 3.5andnetworkx.Installationpip install graph-generatorsUsageAfter installation, runfrom graph_generators import *For instance,keller_graph(n)returns ann-dimensional Keller graph.List of graphsGraph nameFunction nameKeller graphkeller_graphKing graphking_graphKnight graphknight_graphAntelope graphantelope_graphZebra graphzebra_graphGiraffe graphgiraffe_graphCamel graphcamel_graph(a,b)-leaper graphleaper_graphFiveleaper graphfiveleaper_graphPrism graphprism_graphStacked prism graphstacked_prism_graphMoebius ladder graphmobius_ladder_graphBook graphbook_graphStacked book graphstacked_book_graphOdd graphodd_graphFibonacci cube graphfibonacci_cube_graphLucas cube graphlucas_cube_graphHalved cube graphhalved_cube_graphFolded cube graphfolded_cube_graphJohnson graphjohnson_graphPell graphpell_graph
Package: graphgrid-sdk
GraphGrid SDKThe GraphGrid Python SDK is a python-based software development kit that can be used to programmatically interact with GraphGrid services.Currently, its primary purpose is to provide a flexible way to train NLP models on a variety of tasks.This README covers setting up the SDK object and method overview.
For further documentation and tutorials please visithttps://docs.graphgrid.com/2.0/#/to learn about the GraphGrid SDK and the GraphGrid CDP platform.Set Up the SDK objectThe first step in using the SDK is setting up theGraphGridSdkpython object.# Setup bootstrap configbootstrap_conf=SdkBootstrapConfig(access_key='a3847750f486bd931de26c6e683b1dc4',secret_key='81a62cea53883f4a163a96355d47656e',url_base='localhost',is_docker_context=False)# Initialize the SDKsdk=GraphGridSdk(bootstrap_conf)You create aSdkBootstrapConfigobject that provides the basic configuration the SDK needs.
This example uses the defaultaccess_keyandsecret_keyassociated withGraphGrid CDP.You can initialize yourGraphGridSdkobject with that configuration and begin using the SDK.For details on usage please see the docs onGraphGrid SDK Usage.GraphGrid SDK MethodsThere are currently seven SDK methods available for use:MethodDescriptionnmt_trainKick off training jobnmt_statusStatus and results of a training jobjob_runKick off a custom jobjob_statusStatus of a custom jobsave_datasetSave a dataset for trainingpromote_modelPromote an NLP model, swapping it in for usenmt_train_pipelineKick off NLP model training pipelineThenmt_trainandnmt_statusmethods are provided to trigger, monitor, and retrieve results from anlp-model-trainingjob run.
In contrast, the methodsjob_runandjob_statusare provided to trigger and monitor custom jobs.Thenmt_train_pipelinemethod is specifically for kicking off NLP model training pipeline, it
runs training jobs, monitors them, and can promote the newly trained models.For details on specific methods please see the docs onGraphGrid SDK Method Reference.
Package: graphgrove
InstallLinux wheels available (python >=3.8) onpypi:pip install graphgroveBuilding from source:conda create -n gg python=3.8
conda activate gg
pip install numpy
makeTo build your own wheel:conda create -n gg python=3.8
conda activate gg
pip install numpy
make
pip install build
python -m build --wheel
# which can be used as:
# pip install --force dist/graphgrove-0.0.1-cp37-cp37m-linux_x86_64.whlExamplesToy examples ofclustering,DAG-structured clustering,  andnearest neighbor searchare available.At a high level, incremental clustering can be done as:importgraphgroveasggk=5num_rounds=50thresholds=np.geomspace(1.0,0.001,num_rounds).astype(np.float32)scc=gg.vec_scc.Cosine_SCC(k=k,num_rounds=num_rounds,thresholds=thresholds,index_name='cosine_sgtree',cores=cores,verbosity=0)# data_batches - generator of numpy matrices mini-batch-size by dimforbatchindata_batches:scc.partial_fit(batch)Incremental nearest neighbor search can be done as:importgraphgroveasggk=5cores=4tree=gg.graph_builder.Cosine_SGTree(k=k,cores=cores)# data_batches - generator of numpy matrices mini-batch-size by dimforbatchindata_batches:tree.insert(batch)# or tree.insert_and_knn(batch)Algorithms ImplementedClustering:Sub-Cluster Component Algorithm (SCC) and its minibatch variant from the paper:Scalable Hierarchical Agglomerative Clustering. Nicholas, Monath, Kumar Avinava Dubey, Guru Guruganesh, Manzil Zaheer, Amr Ahmed, Andrew McCallum, Gokhan Mergen, Marc Najork Mert Terzihan Bryon Tjanaka Yuan Wang Yuchen Wu. KDD. 2021DAG Structured clustering (LLama) fromDAG-Structured Clustering by Nearest Neighbors. Nicholas Monath, Manzil Zaheer, Kumar Avinava Dubey, Amr Ahmed, Andrew McCallum. AISTATS 2021.Nearest Neighbor Search:CoverTree: Alina Beygelzimer, Sham Kakade, and John Langford. "Cover trees for nearest neighbor."  ICML. 2006.SGTree: SG-Tree is a new data structure for exact nearest neighbor search inspired from Cover Tree and its improvement, which has been used in the TerraPattern project. At a high level, SG-Tree tries to create a hierarchical tree where each node performs a "coarse" clustering. The centers of these "clusters" become the children and subsequent insertions are recursively performed on these children. When performing the NN query, we prune out solutions based on a subset of the dimensions that are being queried. This is particularly useful when trying to find the nearest neighbor in highly clustered subset of the data, e.g. when the data comes from a recursive mixture of Gaussians or more generally time marginalized coalscent process . The effect of these two optimizations is that our data structure is extremely simple, highly parallelizable and is comparable in performance to existing NN implementations on many data-sets. Manzil Zaheer, Guru Guruganesh, Golan Levin, Alexander Smola.TerraPattern: A Nearest Neighbor Search Service. 2019.
Package: graphic
The target of this project is:More pythonic, humanize way to play with graph modelInstallpipinstallgraphicBasic Example>>>fromgraphicimportuse_neo4j>>>neo4j=use_neo4j()>>>boss=graphic.node('Boss',uid=1234)._as('b')>>>geek=graphic.node('Geek',uid=2345)._as('g')>>>neo4j.push(graphic.relationship(boss,geek,'WORKTAT',startat=3432432)>>>q=graphic.node().filter(id__gt=123).select('id')>>>graph=neo4j.fetch(q)>>>fromgraphic.query.funcimportavg>>>q=graphic.node().select(avg('uid')).order_by('-id').limit(10)
Package: graphical-anim
Graphical AnimationA command line graphical animation creator.FeaturesLinear interpolation in shape size, location, and colorMP4 exportHow to useImport the module:import graphical_anim as ganimDefine a video:video = ganim.Video(resolution, fps)Add a layer (a rectangle in this example):rect = ganim.shapes.Rect(location, size, color)Insert keyframes:rect.keyframe(frame, datapath, value)Example:rect.keyframe(10, "loc_x", 2.3)ChangelogVersion 0.0.3Circle and polygonFixed minor bugs.Version 0.0.2First working versionRectangle and export video.
Package: graphical-formula
Graphical-formula快速的创建和使用图形公式这是一个可以自由创建公式的模块支持以下功能 :
1. 支持公式参数
2. 支持扩展
3. 内置图形公式
4. 内置中文、分数、文章扩展
5. 支持自定义图形注意: 它在Python中导入模块名为 graphical
Package: graphical-password
graphical_passwordМодуль для Python, обеспечивающий информационную безопасность пользователей путем графической аутентификации.Проект доступен в open-source по ссылкеhttps://github.com/macarell228/graphical_passwordЧто умеет наша библиотека?Хранит на серверах github сеты из 10 картинок в формате .avif в категориях: с бабочками (butterflies), с овощами (vegetables) или с котами (cats). Эти картинки можно взять в качестве набора для создания графического ключа. Как использовать:image_examples.get_link(имя_набора, номер_картинки (нумерация с 0))Oбъединяет картинки в группы для удобной работы с ними. Как использовать:group = Group_Image()for picture_path in LIST_OF_YOUR_PICTURE_PATHS:group.add_to_group(Image(picture_path))# Ваш пользователь выбрал картинку в группе под номером добавления 0 (нумерация с нуля)group.trigger(0)# Ваш пользователь выбрал еще несколько картинок в такой последовательностиgroup.trigger(3)group.trigger(2)group.trigger(6)# Ваш пользователь снял выбор картинки с номером 2group.trigger(2)Генерирует и хэширует (алгоритм sha-256 c солью) пароль по выбранным картинкам. Как использовать:group.get_password()Обрабатывает возникающие ошибки и дает понятные объяснения. Использовать не надо. В случае ошибки Python Вас об этом уведомит. (класс нашей ошибки - GPerror) \Пример использования библиотеки:group = Group_Image()for number in range(10):picture_path = get_link('cats', number)group.add_to_group(Image(picture_path))# здесь код, в котором вы визуализируете данные для пользователя и настраиваете его взаимодействие с интерфейсом# используете group.trigger(num)password = group.get_password()
Package: graphical-ts
Graphical-TSDescriptionGraphical-TS is a Python package developed by the SCAI Lab. It offers functionalities for simulating time series data with underlying graphical structure.InstallationTo install Graphical-TS, you can use the following pip command:pipinstallgraphical-tsUsageplease check the jupyter notebooks in the example foldersThis package is built upon theMultiDiGraphfrom thenetworkxpackage. User can build dynamic graph and specify functional mapping from one variable to the other. Synthesized time series data can be generated using the structural information and the functional information.LicenseThis project is licensed under the MIT License.ContactFor any inquiries, please contact Haixin Li at peterlai_0618(MS outlook).
Package: graphic-novel-pyarcade
visual_novel_pyarcade👨‍💻 Visual novel with python arcadehttps://github.com/pythonarcade/arcadeFeaturecharacter managmentevent managmentdialog-tree based on json formatHow to useSteps:Define characters. Those are defined by names (string) and an image (arcade.Sprite).setup the view, you should give him, as parameter, the json dialog path.define the events. If exist.Set the new view and use itPlease look also the emample/simple_example.pyHow to use View (user guide)By default the keyboard layout is configured in followed way:ENTER: Next DialogTAB: Skip dialog (until menu or opened answer)H: hide gui (If skip active the messages keep going)How make a dialogThe objective of this framework is to achieve it as simple task.
What do you need?Create a new json file and create an object insiedeThe attributes of this first object must be see as LABEL. Well-Know: "init" is the dialog entry pointerEach Label, contain an attribute called "block" (this is an array)Each array element, Is composed always by:name character, as a string (case sensitive)messagecan be a string (that mean what the character said)can be a menu (an object)actions (if the message type is not a menu)Those are composed by two words: ACTION ARGUMENTThe actions implemented are: move, alpha, restart, jmpHow to write a menu?
The menu is an object composed by two attributes: "menu" (with only a value implemented: regular) and "choice" an array of objects composed as follow: "txt" is a string containing the text and "jmp" the label where you want to jump after the selection of choice
Package: graphi_crud
Django Graphene CRUD GeneratorInstallationpip install graphi-crudUsageimport graphene
from graphi_crud.queries import Queries
from graphi_crud.create_mutation import CreateMutation
from graphi_crud.update_mutation import UpdateMutation
from graphi_crud.delete_mutation import DeleteMutation


Queries.generate_queries(["accounts"])
CreateMutation.generate_mutations(['accounts'])
UpdateMutation.generate_mutations(['accounts'])
DeleteMutation.generate_mutations(['accounts'])

class Query(Queries):
    pass

class Mutation(CreateMutation, UpdateMutation, DeleteMutation):
    pass


schema = graphene.Schema(query=Query, mutation=Mutation)register yourschemain settings and your good to gowriting Queries{
  user(where: {email: {icontains: "user"}}, offset: 10, limit: 10){
    id
    email
  }
}create mutation examplemutation{
  createUser(inputs: {email: "user@gmail.com", username: "newuser"}){
    data{
      id
      email
    }
  }
}update mutation examplemutation{
  updateUser(inputs: {lastLogin: "2023-12-12"}, where: {email: {icontains: "someuser"}}){
    affectedRows
    data {
      id
      username
    }
  }
}delete mutation examplesmutation{
  deleteUser(where: {email: {icontains: "someuser"}}){
    affectedRows
  }
}permissionsaddgraphql_permissionsattribute on your model class with a list of permissions
example:class Employee(models.Model):
      ...fields...
      graphql_permissions = ['accounts.add_employee', 'accounts.change_employee']
Package: graphics-maker
Graphics Maker (Python)WhatThis is a simple python package that provides a way to generate flat design animation videos.
It allows for simple shapes and transitions of location, rotation and scale.WhyI was tired of building animations with other tools and getting choppy/unsatisfactory results. I'm also too cheap and lazy to pay for an expensive tool, and then have to learn all the intricacies. So I just made this for myself.Dependencies:In order to use this package you need to have some libraries installed for libcairo2. Google what you need to install for your distro. Also for images we need PIL.How to use:Install the package in your python environment:pip install graphics-makerThe following steps should be taken to create an animation:NOTE: ALL LOCATION/DIMENSION BASED VALUES SHOULD BE GIVEN AS PERCENTAGES OF THE VIDEO DIMENSIONS.Instantiate an instance ofGraphicsMakerwith the desired settings.ArgumentDescriptionnameFile namewVideo widthhVideo heightfpsFPSdefault:60output_dirThe directory to output the result todefault:./outputs/output_typeThe video type output (mp4/gif)default:mp4Create and add Objects to the GraphicsMaker with the desired type, location, rotation, scale and colour.Add AnimationData instances to the GraphicsMaker for objects you'd like to animate within a given timeframe.Run.generate_animation()on the GraphicsMaker instance.Supported object typesCircleRectanglePolygonTextImageCustom Draw (provide your own draw function)TODO:More documentation on capabilities.Radial gradient transition.Fix linear gradient transition of odd angle.ExamplesExample programs using the lib are inexamples/. Feel free to run it locally and generate the videos! But here they are as well:https://github.com/DavidOberholzer/graphics-maker/assets/20847795/72428e27-dd3d-4585-83f6-23776edaae99https://github.com/DavidOberholzer/graphics-maker/assets/20847795/55603c97-59d8-485c-966c-0ccf743d93c4https://github.com/DavidOberholzer/graphics-maker/assets/20847795/04dc3927-9b7d-4abd-b37a-3f5f945617f3
Package: graphicsmilens
graphicsmilensPacote feito para criar gráficos (linha, ponto, barra e pizza) com diversos tipos de dados.Bibliotecas que são utilizadas e já são instaladas ao baixar o pacote:pandasmatplotlibInstalação:pip install graphicsmilensUso:Inicialmente você realiza a importação do pacote e depois cria uma instância da classe criada passando como parâmetro o arquivo csv, em seguida, faz a chamada da função. Assim seu gráfico estará pronto.Barrafrom graphicsmilens import Graficos
variavel = Graficos('nome_arquivo.csv')
variavel.barra('coluna1','coluna2',legenda = 'legenda', tit = 'Grafico de barra' , xlabel = 'x', ylabel = 'y')Linhafrom graphicsmilens import Graficos
variavel = Graficos('nome_arquivo.csv')
variavel.linha('coluna1','coluna2',legenda='legenda do grafico',tit='titulo do grafico',xlabel='x',ylabel='y')Pontofrom graphicsmilens import Graficos
variavel = Graficos('nome_arquivo.csv')
variavel.ponto('coluna1','coluna2',legenda='legenda do grafico',tit='titulo do grafico',xlabel='x',ylabel='y')Pizzafrom graphicsmilens import Graficos
variavel = Graficos('nome_arquivo.csv')
cores = ['red','green','black','pink','blue'] 
labels = [r'vendas', r'gastos',r'despesas', r'imoveis',r'aluguel']
variavel.pizza('coluna1','Gráfico de Vendas Lanchonete',labels,cores)LicençaO graphicsmilens é distribuído sob aLicença MIT.Você é livre para usar, modificar e distribuir este pacote de acordo com os termos da licença.
Package: graphics.py-extra
graphics.py-extraEsse pacote fornece mais formas para se desenhar com o pacotegraphics.py.Os objetos gráficos incluídos são:RoundedRectangle(um retângulo com os cantos arredondados)FreeText(desenhar texto sem limites sobre a fonte usada)Triangle(triângulo de qualquer tipo: definido pelas medidas dos lados e ângulos)ExemplosExemplo 1:Desenhar um retângulo com os cantos arredondados.importgraphicsfromgraphics_extraimportRoundedRectanglewin=graphics.GraphWin('Exemplo do RoundedRectangle',400,300)rect=RoundedRectangle(graphics.Point(50,50),graphics.Point(350,250),radius=100)rect.setFill('light sky blue')rect.draw(win)Exemplo 2:Mostrar texto com uma fonte qualquer.importgraphicsimporttkinter.fontfromgraphics_extraimportFreeTextwin=graphics.GraphWin('Exemplo do FreeText',400,300)open_sans_font=tkinter.font.Font(family='Open Sans',weight='normal',size=46)txt=FreeText(graphics.Point(200,150),'Lorem ipsum',open_sans_font)# txt.setAlignment('SW')  # esse é o padrão do FreeTexttxt.setAlignment('CENTER')# esse é o padrão do graphics.Text# Mostrar o espaço (largura, altura) que o texto ocuparáprint('Text width:',txt.getWidth(win))print('Text height:',txt.getHeight(win))txt.draw(win)Exemplo 3:Desenhar um triânglo isósceles agudo.importmathimportgraphicsfromgraphics_extraimportTrianglewin=graphics.GraphWin('Exemplo do Triangle',400,300)t=Triangle(graphics.Point(125,200),# Posição do vértice Bangle_a=math.radians(55),# Ângulo do vértice A (converter de graus para radianos)angle_b=math.radians(55),# Ângulo do vértice B (converter de graus para radianos)side_c=150# Comprimento do lado C)t.draw(win)