All posts by happyneal

2014-03-19 17.42.49

Lenovo Adjust Keyboardmapping (Fn/Ctrl and PageUp/PageDown to Home/End)

Swap the Ctrl and Fn Key

 Lenovo has akwardly placed the Fn key as first key of the last row instead of the “Ctrl”-key like most laptop and keyboard manufacturers. The ”Fn Key” is unique to laptops and does not register in the normal charactermap. Thankfully you can swap the two keys in the Bios-settings.

Caution: If you do not know what Bios is – do not change any other settings.

  1. Restart the computer
  2. When you see the Thinkpad Logo Press “Enter” to interrupt the normal startup process.
  3. Then Press “F1″ to enter the Bios Settings
  4. Navigate to the page “Config ” (using the arrow keys) and select “Keyboard/Mouse”
  5. Enable “Fn and Ctrl Key swap”
  6. Press “Esc” and Navigate to “Restart”
  7. Select save changes and restart

 Swap “Pageup”, “Pagedown” with “Home” and “End”

I think the placement of the “Pageup” and “Pagedown keys are kindof wierd.

In most Browsers and PDF-Readers you can simply use the “Spacebar” (Pagedown) or Shift-Spacebar (Pageup) so the placement of the keys so close to the arrow keys seems unneccacary.

When coding it is much more comfortable if these keys are mapped to the “home”(jump to the beginning of the line) and “end” (jump to the end of the line) key.

A small Program “Autohotkey” can be used (among other things) to remap the two keys.

  1. Download and install Autohotkey http://www.autohotkey.com/
  2. When asked to create the script enter:
Home::PgUp
 End::PgDn
 PgUp::Home
 PgDn::End

To enable that Autohotkey runs at startup you must place a shortcut into the startup folder.

  1. Navigate to startmenu > all programs > Autohotkey > Autohotkey Rightclick and “Copy”
  2. Navigate to the startmenu > all programs > Startup, Rightclick and choose “Explore all users” (Alternatively Explore)
  3. Rightclick in the Explorer > Paste
LenovoT430

Lenovo T430 – Reduce fan noise

For some reason on some T430 laptops the fan is always on even if the CPU has a 0% load. If you are running Windows here are a few suggestions how you can fix this issue:

Update Bios

Make sure your laptop has the newest Bios installed – maybe Lenovo figured out how to resolve the Fancontrol on the hardware level.

  1. Run Lenovo – Update and Drivers
  2. Update Bios

Official Fan Speed Control Driver

  1. Download the driver from: http://support.lenovo.com/en_US/downloads/detail.page?DocID=DS001691
  2. Install the driver
  3. Restart the computer
  4. Open the Taskmanager and check if “FanSpeedControl.exe” is running (if not, deinstall the driver again

TPFanControl

Apparently “troubadix” from the German Uni-Marburg created a small program to control the Thinkpad Fan.  Caution: As you are actively manipulating the fan speed, your hardware could overheat and be damaged which could not be

  1. Go to: http://www.staff.uni-marburg.de/~schmitzr/donate.html (yes – the webpage is in ComicSans)
  2. Scroll down to “download area” and select the “latest common Version” (or check if the special version is better suited for your laptop)
  3. Install and restart
  4. As default the fan is being controlled in the “Smart”-mode, based on the temperature of the CPU.  I did not have to change any settings, usually the CPU runs at around 42 degrees Celsius. If your CPU heats up faster you may want to use a more aggressive cooling strategy provided by the program.
  5. To minimize the window to the “Notification Area” Right-click on the TPFanControl icon in the Notification Area and disable “Show Window”
google-app-engine-logo

Google App Engine: Import CSV to Datastore

Uploading files to Google-App-Engine (GAE) is handled by the blobstore. However when processing CSV files you probably want to store the data in the Datastore(Database).
So first you have to handle the fileupload, store the file in the datastore, retrieve the file, analyse and store the data.

To process the csv data You can use all standard python tools from the csv module, however instead of parsing a file you must parse a BlobReader.

import csv
import webapp2
from google.appengine.ext import blobstore
from google.appengine.ext.webapp import blobstore_handlers
from google.appengine.ext import db


class MainHandler(webapp2.RequestHandler):
    def get(self):
        upload_url = blobstore.create_upload_url('/upload')

        html_string = """
         <form action="%s" method="POST" enctype="multipart/form-data">
        Upload File:
        <input type="file" name="file"> <br>
        <input type="submit" name="submit" value="Submit">
        </form>""" % upload_url

        self.response.write(html_string)


class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
    def post(self):
        upload_files = self.get_uploads('file')  # 'file' is file upload field in the form
        blob_info = upload_files[0]
        process_csv(blob_info)

        blobstore.delete(blob_info.key())  # optional: delete file after import
        self.redirect("/")


def process_csv(blob_info):
    blob_reader = blobstore.BlobReader(blob_info.key())
    reader = csv.reader(blob_reader, delimiter=';')
    for row in reader:
        date, data, value = row
        entry = EntriesDB(date=date, data=data, value=int(value))
        entry.put()


class EntriesDB(db.Model):
    date = db.DateProperty()
    data = db.StringProperty()
    value = db.IntegerProperty()

app = webapp2.WSGIApplication([
    ('/', MainHandler),
    ('/upload', UploadHandler)
], debug=True)
Windows Logo reworked

Windows: Password Recovery

Sometimes you run into the problem that someone has forgotten their password for their home PC. As a good friend you are going to help them recover their password.

Preparation

  1. Go over to http://ophcrack.sourceforge.net/ and download a Live CD with tables  (either for XP or Vista/7)
  2. Burn the CD with imgburn or create a USB-Boot disk with Universal Usb Installer

Password Recovery

  1. Start the computer by booting from the USB-stick/CD
  2. Ophcrack will launch immediately and try to crack the password by brute force
  3. If it does not work, click on the button “tables”
  4. Now click on the button “Install” and navigate to the tables directory on the CD or USB-drive (something like /media/usb-drive/tables)
  5. Enable the tables, it is going to take a while to load them into RAM
  6. Retry to crack the password.

Finishing up

Write down the password, restart the computer and login. Change the password to something that special someone can remember.

 

MOOC_poster_mathplourde

Rise of the MOOCs

Over the last year a lot of new MOOC providers and courses in all fields have been become available. Lets have a look at some of the new MOOC providers.

MOOC Providers

Besides edx.org, coursera.org, udacity.com a couple of new provides have popped up:

Futurelearn

Futurelearn is a MOOC system based in the UK, thus focusing primarily on UK Universities.

https://www.futurelearn.com/

Iversity

Iversity is Europe-centric system. This system is especially interesting for enrolled students, some of the courses provide certificates with ECTS points. These points could theoretically be used to advance your current degree. However most universities are not happy about this development, thus you probably will have to talk with several layers of bureaucracy to get the ECTS points approved.

https://iversity.org/

NovoED

NovoED focuses primarily on business education and on team projects during the courses. This alternative approach tries to encourage more students to actually complete the course by creating an obligation towards the other students in the group.

https://novoed.com/

Other

Not strictly a “MOOC” however high quality (free) online Education:

Codeacademy

Codeacademy takes a different approach to teaching how to code. The lessons are delivered in a sidebar and you must actually code a functioning program to continue the lesson. If you are stuck, the program guides you and gives you helpful hints on how to solve the problem. Currently the classes mainly focus on programming beginners.

http://www.codeacademy.org

MOOC search engines

Due to the ever-growing list of available courses, several Search Engines and lists

Mooc List

What can you say, it’s a list of all upcoming courses.

http://www.mooc-list.com/

Mooctivity

a list with social/interactive features giving you an instant popularity index of all courses.

http://www.mooctivity.com/

Skilledup

A search engine, that lists the free courses as well as paid online courses.

http://www.skilledup.com/

Developments to watch for in 2014

Mooc.org

edX is creating a new platform to enable all types of institutions to publish their own MOOC type course.

http://mooc.org/

XSeries (Edx.org)

The XSeries is a series of courses, that grant you a special certificate if you complete the entire coursework. One of the Certificates is from MITx Computer Sciences.

https://www.edx.org/xseries