I have compiled some useful features of three desktop environments into one desktop environment. The global menu which is effectively applied in the MacOS, the idea of left dock of Ubuntu, the lightweight-ness of XFCE, and the productive-ness of Xmonad, one of the tiling window managers. I made a script that automatically turns Ubuntu based Xfce desktop to my configuration. I recommend trying this on a Linux Lite installation. Alternatively, you could try installing it on an Ubuntu box with Xfce installed, or on Xubuntu. Feedbacks are all welcome about other distributions. Xmonad is configured using xmonad.hs in ~/.xmonad. According to the configuration, the mod key is set as Win/Cmd key. The keyboard shortcuts are as follows:

ShortcutTask
Shift + Mod + c Close the active window
Shift + Mod + s Take xfce4-screenshot
Shift + Mod + x Reverse tiling windows according to x-axis
Shift + Mod + y Reverse tiling windows according to y-axis
Shift + Mod + h Increase the width of left pane
Shift + Mod + l Increase the width of right pane
Mod + Up Increase the height of windows in the right pane
Mod + Down Decrease the width of windows in the right pane
Mod + Space Switch to another tiling setup
Mod + Tab Switch to next window in the workspace
Mod + z Switch to the previous workspace
Mod + (1|2|3|4|5|6|7|8|9) Switch to the workspace indicated by the number
Shift + Mod + (1|2|3|4|5|6|7|8|9) Move the active window to the workspace indicated by the number


The ordering of the tiling setups are as follows:
  1. Master window on left, others on right
  2. Master window on top, others at bottom
  3. Only master window in full screen with left and top panels
  4. Only master window in full screen (useful for watching full screen video)
If there are multiple windows in a workspace, the active window will have a red border. The script will install the packages below using apt:
xmonad, xfce4-dockbarx-plugin, gnome-terminal, zeitgeist, python-xdg, vala-panel-appmenu, appmenu-gtk3-module, appmenu-gtk2-module, appmenu-qt, gnome-terminal, xmonad, shutter, xfce4-appmenu-plugin, xfce4-systemload-plugin, arc-theme

Please note that, the script will install google-chrome amd64 binary. If you have other hardware, you should modify the related line. The script will install Arc Dark theme and switch to it.

After running the script, you will have a desktop environment that looks like the following screenshots:

You can preview media easily utilizing the tiling window manager:


You can prepare your own IDE like environment. For example, the picture shows preview of a pdf paper at the right side, and tex file editor at the left. At the bottom of the left side, a command line is present to compile the tex file into pdf. The pdf viewer at the right side immediately previews if a new compilation occurs.


The following pictures show Chrome in full screen. The first picture demonstrates the top global menu. The second picture demonstrates the left dock.



I have just uploaded a single file to github which computes cosine similarity of two files. Cosine similarity is a widely used similarity measure of two texts. This simple code computes cosine similarity of two text files given as parameters. To use this, php-cli (PHP command line interpreter) must be working. The output is written to the STDOUT. I have made the cosine similarity code work in PHP. I have not implemented all of the code. The code is developed using the ideas and piece of codes in various web sites. I used this code in identification of topics of a microblog post set which was introduced in this post. Usage: php computeCosine.php file1 file2

The most common function used in Ethereum application development is the Keccak256 hashing. Keccak256 is used for Ethereum message signing, obtaining the wallet address given a public key, determining smart contract address and determining the function selector of smart contract to be provided as data in transactions given a function prototype (like in ABI encoding). I have looked around and could not find a useful implementation for this. They are either unfinished like this one or too complicated to use like this one, or this one.
All I need is a simple keccak256() function that returns keccak-256 of a hex encoded string. So I decided to do it for myself. I looked around a bit and found a clear C program in this page. All I need is to make this code work in PHP. Luckily PHP has a mechanism to extent its functionality. I followed the guide here. Then I obtained a working keccak256 function.
In this github page, I published the codes to be used by anyone interested.
Before installation, PHP developer files must be installed. To install keccak256() functionality:
  • git clone https://github.com/RnDevelover/Keccak256PHP.git
  • cd Keccak256PHP
  • phpize
  • ./configure --enable-keccak256
  • make
  • copy modules/keccak256.so to your php extension directory.
  • enable extension by adding extension=keccak256.so to your php.ini
Usage:
$a="cc"; // Hex encoded string. All characters are [0-9a-fA-F].
$hash=keccak256($a);
echo $hash; // Hex encoded hash.

This function returns a string of hex encoded 256 bit data (64 characters where each two character indicates one byte).
Our previous study extracts human readable topics given a set of microblog posts. Based on the idea of identifying the topics of a crowd of microblog users, we have recently came up with semantically representing microblog topics for machine consumption. Source code of the prototype is published. To install topic identification approach in a linux machine follow the following steps.
  • Install R
  • Make sure that Rscript is running
  • Install php-cli (Php command line interface) version>5
  • Make sure that php-curl is installed
  • Make sure that shell_exec is working in PHP-cli
  • Obtain a TagMe API key
  • Download the SBounTI package and extract it in an empty directory
  • Edit cfg/config.php according to need (such as base urls of resources that will be produced and the TagMe API key)
  • Obtain a microblog post dataset about 5 thousand posts, either
    • in a file format of short texts in each line
    • or in a raw file retrieved from Twitter streaming API
  • Issue command:
    • ./sbounti <filename> "<dataset_name>" "<start_date>" "<end_date>"
      for the text file
    • ./sbounti <filename> "<dataset_name>"
      for the raw Twitter streaming API file
    Where <filename> is the file name of the file that has short messages, <dataset_name> that is used in the explanations of the resources expressed in OWL, <start_date> and <end_date> are valid start and end date-times of the post set in the format as in example: Wed Sep 21 11:01:56 +0300 2016.
  • The produced OWL file contents are written to STDOUT. So, you may want to redirect the output to a file using "> filename.owl" at the end of the command.
  • If you have questions please contact Ahmet Yildirim
Next Post Newer Posts Previous Post Older Posts Home