feed   myspace   facebook   last.fm   send an email   twitter   tumblr   send a message via aim to graykicksass

Posts tagged ‘new’

Python

Alright so it’s been a while since I posted anything and I wanted to put something out there, while I have been working a lot on many projects I couldn’t really speak of, I have a few quick things to update you on before I get on to the main content:

First thing, the staff of Opensock have acquired MMOCCForum, this is pretty exciting and we are going to help get that place in shape.
Second, Axcid.org has had a complete rewrite of it’s API, now including keyword search. http://tunebin.info/ does a great job showing this.

Alright now onto the main content of the post:

After hating python and it’s syntax for a few years, I got the push of actually LEARNING the language, including some of it’s many libraries and functions. Once you get used to it, the syntax isn’t too bad actually. It’s actually pretty easy, for example:

import system, string """ Python block style comments """ # Python one line bash-style comments # Rather then braces for syntax blocking, python uses whitespace #Functions in python must be declared before use, unlike in javascript. # The Syntax for this is def # e.g. def SayHello(text):         # This is the body of the function         print(text) # Say Hello would be considered a 'function alias', and would be used like this: SayHello("test") # Some built in python functions string = "123" # set a variable integer = int(string) # Convert string to integer string = str(integer) # Convert integer to string # And block statements use : to start the block, e.g. if (string = str(integer)):         SayHello(str(integer))         # Else if is elif         elif (string = int(string)):         SayHello("Oh..")                 # Not gonna reach this else:         SayHello("Else reached, so none of them was correct")

Just for an example of python, Axcid’s new JSON api can be used like this:

# axcid import sys, string, urllib import simplejson as json AXCID_URL="http://two.axcid.org/new/api/?method=search.keyword&format=json&allpages=1&q=" def GetResults(query):         query = query.replace(" ", "%20")         url = AXCID_URL+query         f = urllib.urlopen(url)         obj = json.load(f)         return(obj["track"])

And the result from that:

results = GetResults("sublime") if (results):         for track in results:                 print(track["title"]+" - " + track["artist"]

Writing a IRC bot in python the other day was simple as well. And a python-spidermonkey binding exists so it would be possible to bind the syntax of JS to python, Python-Spidermoney

Anyways, that’s all for my update. Hope it was useful to someone.

IgniteMusic

After long, hard thoughts about putting money in my pocket. I mean, providing users with awesome quality content, (Since I am a user too, and I actually use the stuff I make, and I’m also poor).

A new version of IgniteMusic is in the works. It’s actually going to be a modern, stylistic online music downloader.

What’s making it different from old versions? A few secrets of design here, a few new search engines. More on all this later. (Since I don’t want to reveal my entire strategy yet)

New Home

I ACTUALLY FINISHED MOVING HOSTS TODAY.

Yep :D .

So now this blog is up I will start updating it more, show people some more stuff about coding. Whatever I got. And the host will STAY UP.

If your having trouble viewing it flush your DNS and try.

Whistler!

I’m heading off to the B.C. tommorow to go ski at whistler, I will be staying the rest of the week.

If anyone’s there who knows the area or wants to come ski a couple runs hit me up:

(206) 779-8739. Also if anyone knows where everything is I could use someone to call and leave me some directions or some shit.

And I’m off until Saturday