Monday, February 7, 2011

To install cx_Oracle in Fedora for accessing Oracle form Python

To install cx_Oracle in Fedora8 (or in most of Linux flavor)
1) Download cx_Oracle form http://cx-oracle.sourceforge.net (latest version is 5.0.4)
(look for proper version).
Register and create an oracle account (It’s free and takes couple of minute). Accept license agreement and download.
Extract the files in /usr/lib/ you need to become root for that (use sudo).

3) Set the environment variables.(open bash_profile and set the path variables).
Open [xyz~] $ vi .bash_profile (I set the following path for my Fedora).

export ORACLE_HOME=/appl/paths/instantclient_10_2 <--note client version export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:$PATH

4) Install cx_Oracle by double click on cx_Oracle-5.0.4-10g-py25-1.i386.rpm or by running 'python setup.py install'.

5) To check if the installation works properly. $ python >>>import cx_Oracle
>>>

If no error message comes then you are ready to use oracle module.

Simple query to check your connection
#!/usr/bin/python
import cx_Oracle
connstr='scott/tiger'
conn = cx_Oracle.connect(connstr)
curs = conn.cursor()
curs.execute('select * from emp')
print curs.description
for row in curs:
print row
conn.close()

you can bypass TNS by using this as a connection string: scott/tiger@myhost:1521/DATABASE_SID
let me know if anyone is having any trouble configuring cx_Oracle.

Tuesday, December 21, 2010

Overclocking the CPU, Motherboard & Memory

Overclocking a processor means enabling it to operate above the manufacturer's specified frequency. Many Internet sites provide instructions for overclocking. Processor manufacturers and many computer experts believe the slight gain in performance (only perceivable on CPU-intensive software) isn't worth the expense or considerable risk.

Instructions

1) Get whatever tools you need: screwdriver, needle-nose pliers, motherboard manual, cooling hardware, etc.

2) Find out whether your motherboard can be adjusted in the BIOS setup, with jumpers or not at all.
3) Find out clock-speed limitations of the motherboard.
4) Run all Windows and any third-party diagnostic applications you have. Fix all system problems.
5) Make a complete backup of your system, documents and applications you don't have on CD-ROM. Do not overwrite these copies.
6) If you have a BIOS-adjustable motherboard, make changes according to your motherboard manual, and skip to Step 15.
7) Shut down computer.
8) Leave computer plugged in to surge suppressor.
9) Disconnect all peripherals from computer.
10) Remove cover of chassis.
11) Ground yourself to computer with any professional grounding equipment you have. Otherwise, ground yourself by touching a metal part of the chassis.
12) If your motherboard has adjustable jumpers, locate the jumpers that control the CPU speed.
13) Use needle-nose pliers to change jumper settings. Move jumpers to positions indicated in your motherboard manual for the clock speed you want. Check the Internet for recommendations.
14) Install a CPU heat sink, heat-sink compound, and a specialty cooling fan, if appropriate and possible.
15) Put system back together, and reboot.
16) If computer does not boot, and CPU still works, try lowering the clock speed. If that doesn't work, restore the original configuration.
17) Check all functions, and run a CPU-intensive program.

Tips & Warnings

CPUs have rated and maximum speeds. Exceeding the maximum speed is far more likely to cause problems than more conservative adjustments.

Overclocking an Intel processor explicitly voids its warranty. Other manufacturers have similar exclusions. Intel prevents overclocking of some CPUs by disabling higher multiplier settings.

Expect a shorter life for an overclocked processor, including the possibility of its immediate failure.

Prepare to deal with seemingly unrelated problems that can be caused by overclocking: destruction of other internal components, lost data, system and application crashes, and an inability to boot the system. Such problems can occur randomly or materialize well after you have altered your motherboard.


Read more: How to Overclock a CPU | eHow.com

Monday, October 25, 2010

IT Security for the Next Generation – Asia Pacific & MEA Cup 2011

Opportunity to win Asia cup...

Students and Professionals can register by Oct 30 and submit their papers on CyberCrime and win Kaspersky lab's Asia Cup.

This conference is to present and discuss issues relating to cybercrime. It provides a platform for the next generation to be able to share their respective knowledge and experiences and to develop new ideas to improve the level of security in information technology.

The authors will be given a certificate of participation.


Conference Topics

Technical Topics:

  1. Trends in Anti-Spam Development – Techniques, Methods in the “Spam Arms Race” and new Innovations
  2. Dangers of an increasingly Networked World
  3. “In the Cloud”-Security
  4. Future Technologies for Detecting and Combating Malware (e.g. artificial intelligence, fuzzy systems, p2p-networks)

Social, economic and legal Topics:

  1. Emerging Threats (e.g. social network security, embedded systems security, mobile security, online banking security)
  2. Challenges and Opportunities for IT-Security Companies within the next 10 Years
  3. Impact of technologies on Data Protection, Copy and Intellectual Property Rights and Jurisdiction
  4. Education in IT Security - Trends and Questions

Conference Participants:

Those who would like to participate should register here by October 30th, 2010 & send the research by November 30th, 2010 to studconf@kaspersky-asia.com

for more details click here.