is there a twisted matrix framework for java??
I think Netty could be one.
While the very original version of twisted was written in Java, and there are a few implementations of Deferreds and a simple reactor written in Java, they aren't in a published library state.
Searching for an alternative you might do well to google with various keywords such as "asynchronous networking library" and such.
Related
When I look at the commons-functor website website, it appears to be out of sandbox state, but it also says there is no official binary release? But I thought I saw it in some Maven repository somewhere and can't find it now. Does anyone know what the status is and whether there is an official binary release? I suspect I am just poor at navigating the Commons website.
Looks like the last development was three weeks ago (see this) and their "release notes" for 1.0 are just a skeleton (see here).
A couple quick searches show that Apache Commons Lang used to have a package org.apache.commons.lang.functor - but this was removed some time ago, it seems (like 2003 or so)
As a side note, it appears that Apache Commons Collections has a package org.apache.commons.collections.functors - but this might not be what you're looking for.
I have absolutely no idea what the release or maintenance state of this library is. My apologies.
But what i do know is that the world needs another functional programming library for Java like it needs a hole in the, er, head. Ozone layer? There are already quite a number in circulation - Functional Java, the functional parts of Guava, LambdaJ, and others - all doing much the same thing (or at least having overlapping bits doing much the same thing). What we need to do now is to start coalescing our attention around two or three of these libraries, developing common styles and idioms for using them.</rant>
At the company where i work, where there are a lot of big fans of functional programming, we seem to have settled on Functional Java, having had LambdaJ, Guava, and a couple of homebrewed functional frameworks in our codebase (and having rewritten bits of it in Scala!). That decision was made by people with deeper understanding of functional style than me, and before i joined the company, so i can't explain the reasoning, merely report that it was made. Functional Java is actively developed, and it's in Maven. I would urge you to have a look at it, and see if it meets your needs.
Commons Functor is heading toward it's first official release. You can give it a try by using the nightly snapshot from the Apache repository:
https://repository.apache.org/content/groups/snapshots/org/apache/commons/commons-functor/1.0-SNAPSHOT/
Does anyone know of a library with a working implementation of backpropagation through time?
Any of Java/Python/C#/VB.NET/F# (preferably the last one) will do!
Assuming you're already using some library for BP, it should be (TM) rather straightforward to implement BPTT using BP as a step in the process.
The Wikipedia entry for BPTT [1] includes relevant pseudo code.
My own starting point, about 18 years ago, was "The Truck Backer-Upper: An Example of Self-Learning in Neural Networks" [2].
[1] http://en.wikipedia.org/wiki/Backpropagation_through_time
[2] http://www-isl.stanford.edu/~widrow/papers/c1989thetruck.pdf
I've used NeuronDotNet only for a limited time though. It allows you to create a feed-forward BackPropagation NN. I especially liked their use of intuitively named classes. Good luck!
This is a .net library.
I'm from a Java background but Encog has a .net implementation as well (and is a seriously good framework for NNets, with good time series support)
Can't help with an F# framework, but what domain are you coding for? If it's finance I'll reassert the "take a look at Encog"
Perhaps pybrain would do? The docstring for its BackpropTrainer class suggests that it does backpropagation through time:
class BackpropTrainer(Trainer):
"""Trainer that trains the parameters of a module according to a
supervised dataset (potentially sequential) by backpropagating the errors
(through time)."""
What about this one ? Just a Google search to help...
I've had good experiences with Weka - In my view one of the best and almost certainly the most comprehensive general purpose machine learning libraries around.
You could certainly do BPTT with Weka - you may find a ready made classifier that does what you need but even if not you can just chain a few normal backpropagation units together as per the very good wikipedia article on BPTT
I made backpropagation algorithm in Java quite time ago. I uploaded it into GitHub, maybe you can find it useful: https://github.com/bernii/NeuralNetwokPerceptronKohonen
Let me now if it was helpful :)
You can use TensorFlow's dynamic_rnn() function (API doc). TensorFlow's tutorial on Recurrent Neural Networks will help.
Also, this great blog post provides a nice introduction to predicting sequences using TensorFlow. Here's another blog post with some code to predict a time series.
I have heard about Lucene a lot, that it's one of the best search engine libraries in Java. Is there any similar (as powerful) library for Ruby?
Well, there's Ferret, which is a port of Lucene to Ruby. Also, Lucene is very easy to use from JRuby, if that's an option for you.
Depending on your needs, you might also want to take a look at Solr, which is a higher-level front-end built on Lucene. There is a Ruby interface, solr-ruby, that interacts with Solr via HTTP.
Ferret is what you're looking for:
"Ferret is a high-performance, full-featured text search engine library written for Ruby. It is inspired by Apache Lucene Java project."
I would try one of them in combination with sphinx.
Thinking Sphinx
http://freelancing-god.github.com/ts/en/rails3.html
Riddle
http://riddle.freelancing-gods.com/
http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html
CLucene is a cross-platform C++ port of Lucene. It can be wrapped and used also from every high-level language (there are also a few legacy Swift projects you could start with). See:
http://sourceforge.net/projects/clucene
http://clucene.git.sourceforge.net/git/gitweb.cgi?p=clucene/clucene;a=summary
unfortunately, in most cases, ferret is not what you're looking for, it's got recurring issues with re-indexing speed, index corruption and segfaults on the server. I think most people are going to SOLR, sphinx, and Xapian. I recall seeing some Tsearch / postgres apps mentioned, Tsearch seems to be a industrial-strength solution
Take a look here
Full Text Searching with Rails
I hope you all have a nice day.
I want to write a web service that would check some web page HTML code every 20 minutes and e-mail it to my mail box. Here I was given a suggestion to use Google App Engine for this task. Having briefly read through that site I learned that two languages could be used there: Java and Python.
Which one do you think would fit best for my task and, therefore, I would have to start learning? (I don't know either language).
Both the languages and their App Engine implementations are pretty solid and mature. As a language, Python is faster to learn, but Java comes with richer tools such as Eclipse that may partly compensate. A lot depends on what other languages you have background in -- for example, coming from C#, Java would be simpler than for somebody coming from, say, C. For such a simple task, the issues of power of the two languages and additional libraries &c doesn't really come into play.
I've tried both languages with GAE and here's my general feeling about the choice of language for it:
Python is generally simpler. So, if you're using bare GAE API, Python's one is simpler to learn and simpler to write a webapp in it.
Java is more compatible. Python's API is generally GAE-specific, while Java API resembles some standard Java technologies (servlets, JDO, deployment etc.)
So, Java is a good choice if you either have an experience with web development in Java or if you're going to use third-party libraries extensively. Otherwise, Python is better.
For your particular task, I'd suggest Python, mostly because of the existence of Beautiful Soup, an excellent HTML parser that handles poorly formed documents.
What is the closest Java alternative to Twisted?
Nio is really low level and supports Socket only and SSL if you dig hard enough on Google for samples.
Apache Mina wraps the complexity and adds a few protocols but not as much as Twister.
Like Stephane, I would suggest you take a look at Mina. Its a framework for asynchronous network IO. It is built on top of NIO, which was mentioned earlier, and IMO hides away some of the complexity involved with Selectors,Channels,etc.. I've used Mina for a couple of projects and its pretty good, but be warned, I've found the documentation to be a little weak. And again, like Stephane mentioned, it doesn't have out of the box support for too many protocols.
I've implemented most of a Twisted reactor in my collection of AMP hacks on launchpad - but it needs a maintainer.
I don't think there is anything quite like Twisted, as far as Deferreds and complex callback chains go. For non-blocking IO, I think NIO is the most commonly-used solution. In particular, look at this section on Selectors.
If there is still an interest in this, I've just put up the first beta release of the 'Reaction' framework, which supports the Twisted-style deferred callback model in Java. As well as working as a standard Java package, it can also be used as an OSGi service. License is Apache version 2.
More details on my website, >here<.
See this framework from Spring.io: http://spring.io/blog/2013/05/13/reactor-a-foundation-for-asynchronous-applications-on-the-jvm