I've been hacking around with Parsey McParseface and Parsey Universal. Google released their next version of the parser:
https://research.googleblog.com/2017/03/an-upgrade-to-syntaxnet-new-models-and.html
After a bit of looking I was able to find and download the models, but I can't seem to find a way to actually run them i.e.
echo "I have it working" | syntaxnet/models/parsey_saurus_english/parse.sh
There is no parse.sh and using the demo.sh or parsey_universals parse.sh also won't work.
Has anyone gotten them working or found a tutorial somewhere that I could get started with?
Thanks in advance
There has been a stall in the issue #2822 on github which makes it problematic to build syntaxnet with bazel. Instead I have modified the syntaxnet docker file and use that in my project. Here is a link to the repo.
Hope it helps :)
Related
So, I was working on one of my projects when I decided that I would make it a command-line-based tool. I could not find any reliable information (maybe I just searched for the wrong thing, sorry if this is a duplicate, I am new to packaging). I have seen many other projects do it so that all they need to do is:
pip install packageName
packageName -args
I tried doing this, I added arguments, so that works, but I am not sure how to do this. I have tried looking for solutions, and I have only come across some topics on stackoverflow that only talk about dealing with file permissions using chmod commands, etc. I am just confused.
So at this point, I was expecting my file to be executable, or make it in an easy way / have a way to do it through python packaging, but I still am not sure how. I just want my package to be installed with pip, and then easily executed without having to use "python3" and ".py" and having to CD into the project directory every time of use.
I tried searching the internet but no information has come across to me yet.
I am sorry for duplicates. I have looked at other solutions but they all use chmod and I just want to package it in a python package through PyPi.
Please, if you can help, it would be great.
Thanks in advance.
After a couple of hours, I was able to solve the problem.
Here is the full explanation:
https://setuptools.pypa.io/en/latest/userguide/entry_point.html
This helped so much. All I needed to do was to put:
[project.scripts]
projectName = "pathtofunction"
I solved all the issues regarding importing by putting all of the code in the init.py file.
Hope this helps to anyone who had any trouble.
It may be a stupid noob question, but I am a total beginner, so I would appreciate any help.
I spent over an hour searching through youtube and google for tutorials, but libpython-clj doesn't have much info out there.
In the examples I found, the python libraries being imported are from independent repos. I looked through the libpython-clj's readme and Gigasquid's tutorial, but I am totally lost.
How do I use my own python file?
Suppose I have a project with foo.py.
How do I integrate it with my Clojure script using libpython-clj?
I would be very grateful for the answer.
I gave this a try today because I was also curious about it too, so I created a small Clojure project to call a simple python package. The idea is that you can build trivial packages from your own Python code, install them in a virtualenv directory and use them from Clojure.
https://github.com/dfuenzalida/clj-python-interop
EDIT: I noticed that projects using libpython-clj are now using the clj tool with deps.edn and it works as expected. I've updated the repo above with a fully working example.
I've been searching for a while now and I can't seem to find any help on this one...
My scenario: I got a python/kivy project and I already got my python-files compiled using setup and cythozine().
My problem: I somehow have to compile, or at least obfuscate the .kv files. Please don't ask me why, I've seen many discussing it and mostly it goes nowhere. It was requested that way and I do not want to discuss it.
My solution so far: I inject the whole content of the .kv-File into the Builder.load_string() before compiling my scripts, but that whole string will appear in plain text in the compiled files after compiling them. It will take some time for someone to find it, but I think it's still not the best solution.
Hopefully someone can help me out here. ^^
EDIT:
I've already tried the following, so I could at least obfuscate the code: https://github.com/rdevost/pymixup
Unfortunately, the pre-requisites gave me some problems.
I asked for the obfuscation, since it seems quite troublesome to compile it. So I thought it might be a compromise to obfuscate the kv-File, load it into the Builder and compile the py-File. With that, the kv part would still be in plain text inside the compiled file, but it would be obfuscated.
I'm running my application on a raspberry pi.
Ok... That was pretty simple. I just had some trouble figuring out how PyInstaller works.
I used the simplest method of PyInstaller to compile it.
python -m PyInstaller --name Project-Name -p {Some custom Submodules-Path} main.py
Before doing that, I injected the kv-Language code into the py-script as an input-string for the kivy-module Builder.load_string().
Not as elegant as I hoped, but anyway... If someone has any idea how to include the kv-Lang files, I would appreciate it. I know one can add some hooks to it after creating the .spec of PyInstaller. kivy: Create a package for windows But that's it.
The result is significantly larger than before (setup + cythonize). But it works for me, since it's compiled and a bit obfuscated too so you can't read the code that easy. ^^
This might be a simple task, but it took me some time to figure it out.
I created a Python script to use Rackspace's API (Pyrax) to handle some image processing. It works perfect locally, but when I upload it to Iron.io worker, it builds but does not import.
I am using a Windows 8 pc, but my boss runs OS X and uploading the exact worker package, it works fine. So I'm thinking it's something with Windows 8 but I don't know how to check/fix.
I do apologize in advance if I ramble or do not explain things clearly enough but any help would be greatly appreciated.
My worker file looks like this:
runtime "python"
exec "rackspace.py"
pip "pyrax"
full_remote_build true
Then I simply import pyrax in my python file.
I figured out that it was a bad Ruby install. No idea why, but reinstalling it worked.
It's difficult to know for sure what's happening without being able to see a traceback. Do you get anything like that which could be used to help figure out what's going on?
I'm brand new to java, trying to dive into Java EE and I'm following the instructions here: http://docs.oracle.com/javaee/6/tutorial/doc/gexaj.html#gexaa to try to get everything setup. Unfortunately I'm not able to run the java update tool because I get the error:
Update Tool was unable to start.
The Python runtime could not be found.
To fix this problem use the UC_IMAGE_PATH environment variable to provide a path to a valid image.
To be clear, I've installed Netbeans at the Java EE 6 SDK and that's as much as I know. I have a background in PHP so this is a little different.
What piece am I missing?
check this solution:
http://www.java.net/forum/topic/glassfish/glassfish/update-tool-error
You can also start galssfish server (from NB or .bat file), log into administrator console (web browser: localhost:4848 if You haven't changed default ports) and then run update tool. Works for me, even though the first solution doesn't.
(I know, it's been a year of waiting for the answer, but someone might need this ;) )