Showing entries 291 to 300 of 381
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Python (reset)
FOSDEM: Change: Python/MySQL talk at 14:45 in MySQL Dev Room

Today we made a change in the schedule of talks held in the MySQL Developer Room at FOSDEM 2010, swapping two talks. Change is:

The printed booklets found at the conference will not reflect the change, but the printable schedule has already been updated.

FOSDEM: Change: Python/MySQL talk at 14:45 in MySQL Dev Room

Today we made a change in the schedule of talks held in the MySQL Developer Room at FOSDEM 2010, swapping two talks. Change is:

The printed booklets found at the conference will not reflect the change, but the printable schedule has already been updated.

Small status on SQLAlchemy and MySQL Connector/Python

Using SQLAlchemy unit test cases to further develop MySQL Connector/Python. It's probably debatable whether that's a good method or just lame. But it sure helps lots!

We've been pushing some code past days that makes Connector/Python almost pass all tests. Well, 4% is still failing, but I'm confident that in a few most problems will be dealt with. I had to make some changes to the SQLAlchemy v0.6 dialect as well, and some test cases had to be corrected. Hopefully those corrections will also go in the SQLAlchemy trunk later on.


shell> nosetests --dburi=mysql+mysqlconnector://root:@localhost/sqlalchemy
..
----------------------------------------------------------------------
Ran 2092 tests in 314.656s

FAILED …
[Read more]
451 CAOS Links 2010.01.21

EC approves Oracle-Sun. Google patents MapReduce. And more.

Follow 451 CAOS Links live @caostheory on Twitter and Identi.ca
“Tracking the open source news wires, so you don’t have to.”

EC approves Oracle-Sun

The European Commission cleared Oracle’s proposed acquisition of Sun Microsystems. While Larry Ellison is set to unveil Oracle’s Sun strategy on January 27th, Monty Widenius said he will go to the Court of First Instance to appeal the decision.

# Pro-open source political party formed in Hungary.

# Google …

[Read more]
kajtajm: Planning my first Python / PyObjC / MySQLdb project

Never have I planned a program so much in detail before starting coding. And stranger still, I’m planning the program to be coded in a language in which I haven’t written a single line of code. Nonetheless, I’m eager and it feels good.

I woke up early this Sunday, my mind concentrating on the many steps I will have to take before the first project will see the light of day. I had planned eight prerequisite lessons before even starting the coding. And despite receiving many good pieces of advice, nobody had relieved me of my main worry — the input grid for the data entry in matrix format.

To speed up things, I thought of writing some auto-generated INSERT statements from the current Google Spreadsheet that I’ve been using. I would then at least have the basic data from the first two weeks of the year to play around with in my MySQL database.

And then it struck me: I don’t need a grid at …

[Read more]
Rediscovering Programming with Python, Cocoa and PyObjC

Use PyObjC to code Python under the Mac Cocoa framework, and MySQLdb to interface with MySQL! That’s the advice I got in reply to my recent blog. The discussions were so inspiring that I spent all time when out running yesterday daydreaming about how wonderful it will be to rediscover the aesthetics of programming and regain the control over my personal IT.

So, to recap a bit of my thinking: Once a programmer, always a programmer. If you’ve learned how to code and to master your own IT life to a certain degree, you get used to it. At least I did. But then fate wrote a declaration of incapacity for me. Not only did I become a manager and got to do less and less coding. More aggravatingly, I changed operating systems. Gone …

[Read more]
Purging binary logs.

Being a MySQL DBA , one faces a common issue in replication environment -> Disk space issue on master, since the number of binary logs have increased. Now, one of the solution to this would be using expire_logs_days parameter in your mysql config file. But what if, the slave is lagging by few hours or if the slave is broken since few days and the binary logs are removed due to the parameter set. Whenever the salve comes up, it will go bonkers, knowing that the binary log where it last stopped no more exists.
I faced this issue a couple of times until I decided to automate it using a script. Herewith I am attaching the URL to my python script which can run regularly in cron. Features :

  • Checks the slaves connected to the master (I have limit it to 3 for now.)
  • Checks the last binary log file which is being used by the slave.
[Read more]
Going chemical: SQLAlchemy and MySQL Connector/Python!

Last week I took SQLAlchemy v0.6 out of its trunk and tested it again with our MySQL Connector/Python. And surprise! SQLAlchemy comes with a 'dialect' supporting it! Nice!

However, we're still a long way on making it work. I found some additional problems which need to be fixed first.


shell> nosetests --dburi=mysql+mysqlconnector://root:@localhost/sqlalchemy \
test/dialect/test_mysql.py
..
Ran 32 tests in 4.507s

FAILED (errors=6, failures=1)

Oh, there were more errors and failures and all that due to bugs in MySQL Connector/Python. There were …

[Read more]
A chessboard in MySQL

Something to keep you warm during cold winter nights, or cool during hot summer days: a chessboard in MySQL!

Note: You should see chess pieces here below. If not, you're not watching it using UTF-8, or get yourself a good browser!


CREATE TABLE `chessboard` (
`x` tinyint unsigned NOT NULL,
`a` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`b` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`c` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`d` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`e` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`f` enum('','♔','♕','♖','♗','♘','♙','♚','♛','♜','♝','♞','♟'),
`g` …
[Read more]
Using character sets with MySQL Connector/Python

Here is two small examples showing the wonderful world of character sets and unicode using MySQL Connector/Python (using 0.1.2-devel and up) in both Python v2.x and v3.1.

The following table will be used with default character set latin7, i.e. ISO-8859-13. Just setting it to UTF-8 would be bit boring!


CREATE TABLE `latin7test` (
`c1` varchar(60) DEFAULT NULL
) DEFAULT CHARSET=latin7

Things to note for the code listed below are:

  • We're using charset='latin7' as connection option. This is important!
  • We set use_unicode=True so the results coming from MySQL are encoded to unicode. For testing, we disable this later.
[Read more]
Showing entries 291 to 300 of 381
« 10 Newer Entries | 10 Older Entries »