This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script setups dockerized Ubuntu. | |
set -eu | |
install_docker() { | |
# Install Docker | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get -qqy update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
df.head() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre style="font-size:18px"> | |
<?php | |
$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']); | |
} |