My new revision of the python wrapper for Guild Wars 2 API is now out. It now implements all the endpoints from version 1 of the official GW2 API. This includes WvW events, world events, and guild details. Please visit the git repository for updates on the source code: https://bitbucket.org/farshidhss/gw2api-lampy

I have recently finished writing a Python wrapper for Guild Wars 2 API. This wrapper fully implements all the endpoints specified by version 2 of the API. It also provides fully parallel implementation, which allows the developer to create a list of requests and get the results asynchronously. The parallel pool is fully customisable with the number of threads and a timeout.
A simple example of how the wrapper works is given below:

The above function creates a list of requests (req=[]) and calls the gw2api wrapper to add a requests to the list based on the given parameters. The parameters are similar to the example given in the wiki page of Guild Wars 2 API (http://wiki.guildwars2.com/wiki/API:2/continents). The wrapper then fetch all the request in a parallel pool of 5 threads with a given timeout. The results would look like:
Try this wrapper at https://bitbucket.org/farshidhss/gw2api-lampy) and feel free to leave comments here or ask questions.

UPDATE: The wrapper is now available through the official Guild Wars 2 wiki at: http://wiki.guildwars2.com/wiki/API:List_of_wrappers

I was in CP 2010 conference in St Andrews, where I took a video of a nice dinner we had. It turned out that the video was rotated 🙁 I just couldn’t get any way to fix it without re-encoding it. Until today that I suddenly noticed that if you add the movie to Google Picasa on a Mac you can rotate it just as if you rotate a picture and once rotated to make it permanent you just have to export the clip using the export clip button in Picasa. The exported video is simply rotated and is lossless and play well in any video player like VLC, MPC, quicktime,…etc
Enjoy rotating videos!

Lately, I was playing with CPLEX studio 12, and I found it a nightmare to set it up and running on a Mac OS X with Python. If you like to know how to get rid of the headache, then this topic is for you 🙂

5. Rename the license from access.ilm.rdp to access.ilm and copy it into the following folder (create the folder if it doesn’t exists):

/usr/ilog/ilm/

NOTE: Make sure to rename it at this point, CPLEX won’t recognize the downloaded version of the file.

6. Now we can verify to see if CPLEX can run by going to its folder and run ./cplex.

7. If we have the python installed in Mac (which is usually the case by default), then we can completely import CPLEX libraries and use it in a python program. To do that we go to the following folder:

NOTE: you can add the above to your ~/.MacOSX/environment.plist to make it permanent.

9. Not done yet! since the CPLEX python only supports x86 architecture (even though CPLEX itself supports both x86 and x64), and Apple python by defaults run only in x64 mode in snow leopard, so we need to force python to run in x86 mode, and that can be done by:

Shell

1

export VERSIONER_PYTHON_PREFER_32_BIT=yes

10. Finally!!! That’s it, now we can run CPLEX code using python and enjoy.

Long time no post here 🙂 well i was working on my master thesis, and it’s about Air Traffic Management using constraint based local search. Comet language provides a high level solver for constraint based local search problems. it’s one of the best available, and considering the new version 1.1 we can expect much more including global search.

Unfortunately, Comet doesn’t come with any source code editor, except the old emacs mode available from the wiki page which is very simple. since I’m using Notepad++ for many of my source editing I thought maybe it can be a good idea to try and make a syntax highlighter plugin for Notepad++ that supports Comet language. Also it turns out that i could even make an Auto-completion feature for Comet under Notepad++.

So here is the result:

I also made another code to read the help documents from Comet and generate an xml API so that it can be used as the Auto-completion plugin for Notepad++. Here’s how it looks like:

All in all, it’s not still the best since Notepad++ has some shortcomings, as it can’t provide a list of parameters for overloaded functions that i hope will be added in later releases.

Lately, I was playing this awesome game on PSP, and after about 100 hours of playing missions I faced Minerva, the goddess of earth. Facing her was easy, especially with the trick of stealing 99x Phoenix Downs(read ultimate guide from GameFaq). As you may know if you keep stealing this Item from her, you can actually make infinite Gil and SP and therefor you can max all Materia stats.
Okay now the problem reside in stealing ^_^ meaning if you need 99million Gil then you have to keep stealing around 200 times and this is such a frustrating task, specially with the intro video that keep reminding you of her mightiness =P
I suddenly thought of how about editing the Savegame for good 😀 and yeah this makes life much easier without actually cheating on the game since getting infinite SP and Gil was already accomplished by reaching Minerva.
Okay enough of chit chat, here is what you need to edit the Savegame and add maximum allowed Gil and SP:

PSP with CFW 3.xx or higher (of course this is needed since we gonna use a homebrew plugin*)

Now that you have all the preparation ready, let’s do it! here are the steps:

Install the save game deemer plugin, just follow the instruction in the packet you downloaded.

Now that you have the plugin installed, run the game and load your last savegame. and save it in a new slot. that is where the plugin comes in and saves the unencrypted version of your savegame.

Now exit the game and connect your PSP to pc and go to your PSP memory stick. browse to this folder: PSP/SAVEPLAIN/ULUS10336
remember that “ULUS10336” may be different for you, but you can still recognize it by looking into SAVEDATA folder and look for any savegame with FFV icon inside. generally for US version of the game you should see “ULUS10336”

Well this folder contain the unencrypted save game, so that means you can edit the save game and then load it! to edit your Gil and SP open the folder and open the file called “SDDATA.BIN” with your hex editor. this file includes all your save game settings. so know you want to know which address point to Gil and SP. here it is:
Gil address: from 0x00002A08 to 0x00002A0B
SP address: from 0x00002964 to 0x00002967
as you can see in the following image:

You can’t simply replace these hex values with all FF to get the maximum, that’s because the game doesn’t support such a high value. so you just have to replace them with maximum supported Gil and SP in game which is 999,999,999

Converting this number to hex will give us: 3B9AC9FF
this part is a little tricky, you have to know that saving a number in a Hex file is in reverse order so that means if you want to put this number in offset 0x2A08 then you have to put in the following order:
offset 0x2A08: FF
offset 0x2A09: C9
offset 0x2A0A: 9A
offset 0x2A0B: 3B
here is how the edited values looks like in hex editor:as you see this is in reverse order and it applies to all numbers. so you have to do the same for SP. now you just edit the file as you please and save it.

Go to PSP/SAVEDATA
look for a folder that starts with “ULUS10336DATA” and ends to a number, the number indicates how many times you saved your game so if you have a folder called “ULUS10336DATA34” then it means this folder holds the save data for the 34th savegame. since in step 2 you saved your game you should look for the greatest number that starts with “ULUS10336DATA”. you can easily find it by sorting the view by name and look for the last folder with greatest number. now keep the number in mind, let’s assume you found 46 as the last savegame number.

Now go back to PSP/SAVEPLAIN
Make a new folder called “ULUS10336DATA46” make sure you replace “46” in the name with the number you found in step7.

Copy everything from PSP/SAVEPLAIN/ULUS10336 to PSP/SAVEPLAIN/ULUS10336DATA46
This step means you are making a new savegame exactly the same as the encrypted version but when you try to load this save game the plugin will load the unencrypted version which was edited by you <3

Now just remove the PSP from pc and start the game and load your last savegame, you should be able to see your changes.

Finally, when you finished with all the editing disable the plugin from recovery menu of your PSP.

I hope this post gives you an idea of how editing a savegame works ^_^. Please let me know if there is anything unclear by leaving comments.

* Of course having a CFW PSP brings tons of new features to your PSP, but that doesn’t mean you stop buying these priceless games, ya know right!

well, lately i was struggling a lot to find out a working solution for converting or at least being able to watch the pmf video file format from psp on my laptop. but it turn out to be a big hassle and after searching for many hours i just found one solution that didn’t work for my file.

Okay now what’s the deal with pmf!
pmf is a psp video file format that being used in many games for psp. so many games cut scene and movies are actually stored on the UMD with pmf format and all the game is doing is calling the psp AVC(H264) module to play it. so in case you copy one of those pmf file from your psp UMD to pc then you need a method to convert it to a proper format to be able to watch it.