When you try to install Tizen Studio on a recent Ubuntu version (and possibly other distributions) you might run into problem that the Emulator package wants you to install packages that are not available for your version of the distribution.
The problematic packages were the following for me:
The Package manager will complain with a message like the following:
The problem is that even if you find the .deb packages somewhere, you will not be able to install them as they have been superseded by new versions that will prevent you from using these old packages.
Trick the package manager to install the Emulator package without requiring the problematic packages
Make the emulator work by providing it the libraries from the packages
Download pkg_list_ubuntu-64 and remove the problematic dependencies from it.
Run mitmproxy -s script.py --set stream_large_bodies=30 where script.py is the one below
Configure the Tizen Package manager to use http://localhost:8080 as proxy
Install the packages you wanted to install
from mitmproxy import http
with open('/path/to/pkg_list_ubuntu-64', 'r') as f:
txt = f.read()
flow.response = http.HTTPResponse.make(
Fix the installation
Now that you have the emulator installed you will notice that it will not run without libpng12.so.0 which was supposed to come from the package we did not install. So we need to download the .deb with the library and copy it into platforms/tizen-5.5/common/emulator/bin or potentially elsewhere if you installed a different package.
I also had problems with missing JavaFX dependencies. This is unrelated to the package problems, but it is also a problem of newer software: the newer OpenJDK packages come apparently without JavaFX.
I fixed this by installing openjfx via sudo apt-get install openjfx and changing scripts such as studio/platforms/tizen-5.5/common/emulator/bin to use the JavaFX JARs from /usr/share/openjfx
For a recent project I needed to calculate the pairwise distances of a set of observations to a set of cluster centers. In MATLAB you can use the pdist function for this. As far as I know, there is no equivalent in the R standard packages. So I looked into writing a fast implementation for R. Turns out that vectorizing makes it about 40x faster. Using Rcpp is another 5-6x faster, ending up with a 225x speed-up over the naive implementation.
One reason I like using R for data analysis is that R has a great collection of packages that let you easily apply state-of-the-art methods to your problems. But once in a while you find a library that you would like to use that does not have a R wrapper, yet. While the great Rcpp package provides a convenient way to write R extensions in C++, it obviously requires you to write C++ code and to have a compiler installed.
An alternative I found about only recently is the rdyncall package. rdyncall provides an improved Foreign Function Interface (FFI), which allows you to dynamically invoke C libraries.
In this blog post I want to give you an example on how to employ rdyncall to use
the LWPR libary for Locally Weighted Projection Regression. Continue reading →
The default Windows command prompt (cmd.exe) is terrible compared to what UNIX terminal emulators and shells offer that’s why people constantly develop new tools to make the command prompt bearable. Here are some links:
ConEmu is definitely a must have. Adding clink to your system does not hurt and makes cmd.exe somewhat usable. If you want to try another shell I would give NYAOS a try. Unfortunately the documentation is thin and the community is mostly Japanese.
It is no news that R’s default BLAS is much slower that other available BLAS implementations. In A trick to speed up R matrix calculation/ Yu-Sung Su recommends using the ATLAS BLAS which is available on CRAN. When I learned about the possible speed-up a while ago I tried several BLAS libraries and I found that GotoBLAS2 was giving me the best performance among the open-source BLAS implementations. Today I decided to check once again how much it makes sense to replace R’s default BLAS library.
Here are some results from my Intel i7-620M laptop running Windows 7:
Speed up using MKL or GotoBLAS2 vs. R’s default BLAS
I started using knitr with reStructuredText today and I found that the syntax highlighting with pygments (used by rst2html.py) was not as nice as the output of pandoc. So I ended up doing some monkeypatching.
Try adding the following to rst2html.py:
# SLexer is the lexer used for R
from pygments.lexers.math import SLexer
from pygments.token import Keyword, Name
# monkey patching SLexer ...
# add some builtin functions (TODO: add more)
# treat all names in front of a parenthesis as function names
# parameter names inside function calls/definitions
I sometimes run into the problem that I work on a computer (via ssh) which does not have all the tools and libraries installed that I want to use. In the past I went on and compiled all I needed manually and installed them into ~/opt.
Problem: you don’t have any kind of package management for the stuff you installed into ~/opt.