Python web development with Flask

flask

Flask is a microframework for Python for web development. It’s BSD licensed and is really easy to use for a personnal web project or even for scalable apps for Heroku.
It requires at least Python 3.3, so if you’re running Debian 7 “wheezy” at the time of writing then you might run into problems.

To setup Flask run this command as root:

# pip install Flask

If you’re missing pip and you are on Windows you should get the lastest version that includes pip.
Then to test if everything went well, you will need to run a script such as this one:

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return ("Hello World!")

if (__name__ == "__main__"):
    app.run()

Run it as a simple Python script and you should be greeted with a message saying that it’s running:

* Running on http://localhost:5000/

Now you can start your first webapp by reading the documentation.
If you’re serving web pages with Apache 2, you might want to read this.

No gamepad in Evoland ?

Evoland 2014-05-13 15-10-51-29

Evoland is a journey through the history of action/adventure gaming. You unlock technologies, gameplay systems and graphics upgrade as you progress through the game.

For some people the game won’t detect gamepads. I’m running Windows 8.1 and this is how I resolved my issue:

  • Navigate to Evoland’s folder: \Steam\steamapps\common\Evoland\;
  • Rename dinput8.dll as _dinput8.dll;
  • Launch pad.exe to see if your gamepad is detected;
  • Enjoy the game.

Repair Windows 8 critical files

So some time ago I had a power outage, in the last three years it has happned at least four times and since I don’t have a UPS I had to deal with it like a man and check my disk and discover that critical files were missing or damaged (such as riched32.dll).

Repair Windows 8 critical files with SFC

This is a simple thing to do, boot on a Windows 8 setup image, and launch a the following command:

sfc /SCANNOW /OFFWINDIR=X:\windows /OFFBOOTDIR=X:

Keep in mind that in my case the faulty volume was X: so it may be different for you.

If everything went well, then it’s good. It can fail sometimes for various reasons, but since it never failed on me I can’t help more.

Apparently it is also possible to restor damaged files with DISM, but since I couldn’t use DISM right and always have errors with it I will update this article when in the future.

Asus Xonar DGX

dgx-chips

They once said to me that on board audio is crap, and I should get any Xonar.

I listened and was aware that with great audio, comes some surprises.
I bought an Asus Xonar DGX because it was within my budget and had headphone amps.

My Gaming experience

This is not that bad since I can only come up which two games that had problems.

Star Wars: Republic Commando had no sound if the GX option was turned off, it wasn’t a big deal.

Dead Island had buzzing sound on 7.1. I don’t want to have to change my settings every time I must play a game.

My gaming experience was overall good and smooth.
But I don’t have only games in my life.

My Anime experience

For watching animes I use the Combined Community Codec Pack with Media Player Classic. The playback was alright with my on board sound on my Sabertooth P67.

With the Xonar I had to reconfigure everything. One video could not have a single problem and restore some 7.1 sound.
Some other started stuttering like if the video had to follow the sound.

Getting the good settings was probably not possible and since I can’t watch animes with buzzing and stuttering sound… I had no other choice than popping the card out.

My VoIP experience

This is a bit of an awkward one. I mainly use Skype with people I personally know in real life.
Getting the settings right was really hard at first, but good enough.

After a while I decided to switch to my old desktop mic since people were complaining that they could here in my headset the sound playing. I usually listen to cool stuff.

Getting the settings right without everybody picking up the keys I mashed or my mouse clicks isn’t possible.
The mic got all the sounds, even when I was cooking in my kitchen.

It’s not that bad, right ?

Yeah. You could say that.
But Anime is a big part of my life, and if I must tweak every single game to get it running because I have a sound card… Well no thanks.

I could blame the game developers for that, but Asus is to blame too.

Get PSO2es’ APK file

Update: The game has been release, you can get it on Arks-Layer.

If you don’t feel like setting up a VPN or if you can’t set it up, there is another way to obtain the game. You’ll need:

  • An android device (2.1+)
  • Google Chrome (on a desktop)
  • A Google Chrome’s extension called APK Downloader
  • Drag’n’Drop skill points

Disclaimer

I’m not responsible of anything. If something breaks or works it’s because of you.
If you follow the instructions, it should work, otherwise the instruction were not followed correctly.

Continue reading Get PSO2es’ APK file

Get Phantasy Star Online 2es (VPN)

Update: The game has been release, you can get it on Arks-Layer. Don’t bother with a VPN.

After receiving a mail saying that I was chosen for the closed beta of Phantasy Star Online 2: es, I wanted to install it on my phone like anybody who’s supposed to play it.

Like always, things don’t go smoothly: it’s region locked on the Play Store.
I’m using a Nexus 4 running the stock Android 4.3.

Disclaimer

I’m not responsible of anything, if you have a problem with scanning a QR Code you can get Google Goggles. For other problems I consider you know how to read so there should not be any.
Keep in mind that your device is probably not compatible.

Continue reading Get Phantasy Star Online 2es (VPN)