Call with something like:
> echo '11*19 + 3 * 9'|python exp2gviz.py -|dot -Earrowsize=0.4 -Nfixedsize=1 -Grankdir=BT -Tpng>gviz_out.png;feh gviz_out.png
To get something like:
from neomodel import (config, StructuredNode, StringProperty, IntegerProperty, | |
UniqueIdProperty, RelationshipTo, db) | |
import os | |
class Country(StructuredNode): | |
code = StringProperty(unique_index=True, required=True) | |
class City(StructuredNode): | |
name = StringProperty(required=True) | |
country = RelationshipTo(Country, 'FROM_COUNTRY') |
""" | |
A brief script to indicate the "location" of a possibly misspelled 'Washington' | |
in the current (v1.20-2023-02-28-ror-data.json) ROR dataset | |
:author: Athanasios Anastasiou | |
:date: Mar 2023 | |
""" | |
import json |
module stacklang_list::stacklang_list | |
// A very simple stack language | |
// | |
// The stack is represented as a list with the top of the stack extending the list from the left. | |
// For example, to add two numbers: eval([add(), push(1), push(1)]) | |
import IO; | |
// Symbols |
""" | |
A very small scheme-like language to try out the structural pattern matching | |
features of python 3.11 | |
Features: | |
* Mathematical expressions +,-,*,/ involving integers, variables and functions | |
* Functions are defined via lambda. | |
* Values (including functions) are assigned to variables via let | |
For more information regarding the concepts this language depends on, see: |
""" | |
Reads a Graphml file and instantiate the right type Networkx graph. | |
Notes: | |
1. This is still work in progress. At its current state, the code will comfortably read "simple" graphml files. | |
2. The next step is to enable the routine to selectively read in (graph, node, edge) level data based on the | |
namespace used. | |
3. This will probably be implemented with named tuples and it should support at least simple reads (if not full | |
complex writes too). |
""" | |
This is a module that is supposed to be describing the whole datamodel of an application. | |
NOTE: The directory structure that is implied here is: | |
src/ | |
app_models/ | |
__init__.py (THIS FILE) | |
main.py | |
""" |
import neomodel | |
class Item(neomodel.StructuredNode): | |
__primarykey__ = "name" | |
name = neomodel.StringProperty(unique_index=True) |
Use GloVe to produce vector data
Use main.py
to produce a new "vectors only" spacy model by using en_core_web_md
as the base
Once this finishes, run spacy package inDir outDir
with inDir, outDir
set to ModelInputDir
, WhateverOutputDir
respectively.
From within WhateverOutputDir
, execute pip install -e ./
to install the model as a module.