What does nltk.download("wordnet") accomplish - deep-learning

I wanted to know what nltk.download() do. Also, if I add "wordnet" as an argument, then what happens. Is wordnet like some dataset or something, I would like more clarification on that.

The argument to nltk.download() is not a file or module, but a resource id that maps to a corpus, machine-learning model or other resource (or collection of resources) to be installed in your NLTK_DATA area. You can see a list of the available resources, and their IDs, at http://www.nltk.org/nltk_data/ .
You can use the special id "book" (as in nltk.download("book")) to download all resources mentioned in the nltk book; that's handy if you don't want to keep stopping your explorations to download missing resources.
Calling nltk.dowload() without an argument pops up an interactive browser window (if it can) that you can use to browse and select resources for download.

Related

PhpStorm: how to apply external tool (jpegoptim) on many files?

I am using jpegoptim in PhpStorm as external tool.
Works fine when I do select 1 file.
How can I apply that on many JPEG files ?
That's not possible at the moment (not supported).
https://youtrack.jetbrains.com/issue/IDEA-90239
https://youtrack.jetbrains.com/issue/IDEA-97869
Watch these tickets (star/vote/comment) to get notified on any progress.
If you definitely need it in one go (and not calling that External Tools entry once for each file)... then what you may try is:
Select desired files
Use Copy Paths from context menu
Call another External Tools entry that:
Uses $ClipboardContent$ macro
It's some shell/batch script that parses such parameter (splits into separate lines to get individual paths) and then calls actual program in cycle -- once for each file from the parsed parameter.
A bit too complicated as for my liking... Plus, I've not tried it myself so not sure how line ending symbols will be passed here (so it can be parsed in the script).
BTW -- you can assign custom shortcut to particular External Tools entry so you may call it for each file individually -- it will be faster with shortcut than doing the same with the mouse.

Is it safe to use a UUID as the name for a Node Webkit package?

According to the Node-Webkit wiki the manifest for a program requires a name and this name must be globally unique because it determines the name of the directory that data files for the program are stored in.
I haven't been able to find anything else that this name is used for. Is it safe to just use a UUID as the name listed in the manifest? Or will that be exposed to the user somewhere potentially?
It's more typically related to the common program name that the user sees, but it doesn't have to be. For example on the Mac, the standard location for app specific data is ~/Library/Application Support/. When I look there I see things like GIMP, Skype, XDK &c. If your app happened to have the same name as another app, it would cause problems as they'd both writing to the same location, i.e. if I gave my app the name GIMP, both apps would try to write files to that dir.
Typically a user doesn't have to access this directly, so there's probably no harm in using a UUID here, though I would probably append it to a name related to my app name, just for clarity/simplicity, i.e. instead of making the name foo I'd make it foo-<UUID>.
But I'm no expert . . . .

Snippet with Custom Variables

I'd like to create a package containing a series of snippets that incorporate user-definable variables. For example, I'd like the user to be able to provide a value for a variable called HOSTNAME and have the snippets include that user's value.
The Sublime Text Unofficial Documentation explains:
Snippets have access to contextual information in the form of environment variables. Sublime Text automatically sets the values of the variables listed below.
You can also add your own variables to provide extra information. These custom variables are defined in .sublime-options files.
I've had no luck finding any information on the syntax for a .sublime-options file, however, and Sublime does not seem to try to read a file with that extension when I save it anywhere under the Packages directory. Is this a typo?
Using a .tmPreferences file seems to do what I'm looking for. Is this the only method of getting user-defined values into a snippet? Is it possible to use a .sublime-settings file?
The .sublime-options, actually, is the .sublime-settings. .sublime-options were the ST1 files and the docs got outdated, BUT you use the wrong link, you should always check and switch in the sidebar on the left to your version - ST2, ST3.
And to answer your question, you need to put the variables in .tmPreferences as may be seen here

Can the AS3 API reference be accessed trough code

I am making a code completion system for a code editor, and i would like to show a tooltip for every parameter containing its reference data. I would like to emulate the code completion from Eclipse, so i was wondering if the API reference is available in code, or if i have to manually import it using the file system or something like that.
You could reflect the current class in question with flash.utils.describeType
This will return a xml with informations about methods, properties and so on.
This can be very heavy. If you use it all the time, try to use a caching system. The Flex framework has a class for it mx.utils.DescribeTypeCache

how to find which libraries to link to? or, how can I create *-config (such as sdl-config, llvm-config)?

I want to write a program that outputs a list of libraries that I should link to given source code (or object) files (for C or C++ programs).
In *nix, there are useful tools such as sdl-config and llvm-config. But, I want my program to work on Windows, too.
Usage:
get-library-names -l /path/to/lib a.cpp b.cpp c.cpp d.obj
Then, get-library-names would get a list of function names that are invoked from a.cpp, b.cpp, c.cpp, and d.obj. And, it'll search all library files in /path/to/lib directory and list libraries that are needed to link properly.
Is there such tool already written? Is it not trivial to write a such tool?
How do you find what libraries you should link to?
Thanks.
Yeah, you can create a pkg-config file which will allow you to run 'pkg-config --cflags' to get the compiler flags or 'pkg-config --libs' to get the linker libraries.
http://pkg-config.freedesktop.org/wiki/
If you're on Linux, just try looking into /usr/lib/pkgconfig to find some example .pc files that you can use as models. You can still use pkg-config on Windows as well, but it's not something that comes with it.