Posts

Showing posts from 2015

Creating python executables

I needed to create python executable so that people wont have to rely on my python version. So these are the steps: # Install "cx_Freeze" # Create setup.py $catsetup.py from cx_Freeze import setup, Executable build_exe_options = { "includes" : [ 'numpy' , 'pandas' , 'matplotlib.backends.backend_qt4agg' ], "packages" : [], " excludes" : [ 'tk' , 'ttk' , 'zmq' , 'boto' , 'tkinter' , '_gtkagg' , '_tkagg' , 'bsddb' , 'curses' , 'pywin.debugger' , 'pywin.debugger.dbgcon' , 'pywin.dialogs' , 'tcl' , 'Tkconstants' , 'Tkinter' ], "include_files" : []} setup( name = "appName" , version = "0.1" , description = "" , author = "Dengar" , options = { "build_exe" : build_exe_options}, executables = [Executable( "sectorize.py...

Alt+Tab not working in remote desktop of citrix receiver on Linux mint 17

I use citrix to connect to office computer. But Alt+Tab wasn't seem to be working when I used remote desktop. I found few solution about HKEY edit solution for windows, but none for linux mint. I did some trial and error and finally found a solution myself. I found this file in installation directory of ICAClient: [17:43:43 harsshal@lenovo:~]$ ll /opt/Citrix/ICAClient/config/All_Regions.ini lrwxrwxrwx 1 root root 37 Nov 8 2013 /opt/Citrix/ICAClient/config/All_Regions.ini -> /etc/icaclient/config/All_Regions.ini Went to link and started edited this file [17:44:08 harsshal@lenovo:~]$ sudo vim /etc/icaclient/config/All_Regions.ini Search for "TransparentKeyPassthrough" in "Virtual Channels" section and add "Remote" in front of it. [Virtual Channels\Keyboard] TransparentKeyPassthrough=Remote Save and restart Remote Desktop Connection

Google CodeJam in python templates

I recently started learning python and designed these programs. Following program is for http://code.google.com/codejam/contest/351101/dashboard#s=p2  # -*- coding: utf-8 -*- """ Created on Tue Apr  7 15:40:09 2015 @author: hpatil """ import sys def read_file( input_file, output_file):     sys.stdin = open(input_file)     if(output_file != '' ):         sys.stdout = open(output_file,"w+")     read_input() def solver(line):     last_digit=10     for i in line:         #print(i)         #print(len(line))         digit, mystring = digit2string(i)         if(last_digit==digit):             print(' ',end='')         pri...

Wake on by USB devices on Linux mint 17

I am back after a looooooong time... after my firm started supporting RDP from Linux again. I tried Linux mint 17 on my old laptop and attached external Samsung monitor to it. I stopped using monitor of laptop completely. So wanted laptop to go to sleep and wake up without actual power buttons on it. I realized that Linux mint doesn't support wake on USB mouse / keyboard out of the box. so I created following file and it started supporting wake on USB devices again. [01:35:11 harsshal@dell:~]$ cat /etc/udev/rules.d/90-keyboardwakeup.rules #idVendor and idProduct taken from 'lsusb' SUBSYSTEM=="usb", ATTRS{idVendor}=="0461", ATTRS{idProduct}=="4d15" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'" SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", ATTRS{idProduct}=="2002" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'" SUBSYSTEM=="u...