Skip to content

Instantly share code, notes, and snippets.

In search of right path

Muhammad Abdur Rahman rahman9909

In search of right path
View GitHub Profile
rahman9909 /
Created September 15, 2018 22:14 — forked from stefanthoss/
Import data from a MySQL database table into a Pandas DataFrame using the pymysql package.
import pandas as pd
import pymysql
from sqlalchemy import create_engine
engine = create_engine('mysql+pymysql://<user>:<password>@<host>[:<port>]/<dbname>')
df = pd.read_sql_query('SELECT * FROM table', engine)
rahman9909 / quran-uthmani-parser.php
Created August 13, 2015 04:56
Quran uthmani script xml parser. used native simplexml parser. you can get the updated xml script from:
View quran-uthmani-parser.php
<pre style="font-size:18px">
$myq = simplexml_load_file('quran-uthmani.xml');
// var_dump($myq);
foreach ($myq->sura as $sura) {
printf("\nSura: %3d\tName: %s\n", $sura['index'], $sura['name']);
foreach ($sura->aya as $aya) {
printf("Aya: %3d:%3d\tText: %s\n", $sura['index'], $aya['index'], $aya['text']);