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
<?php | |
$parentId = get_the_ID(); | |
$args = array( | |
'post_type' => 'page', | |
'posts_per_page' => -1, | |
'post_parent' => $parentId, | |
'orderby' => 'menu_order', | |
'order' => 'ASC' | |
); | |
$posts = get_posts($args); |
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
#!/bin/bash | |
set -ex | |
gcc_ver=$(gcc --version | head -n 1 | awk '{print $3}') | |
# Install gcc 4.9 devtoolset | |
if [[ ! "$gcc_ver" =~ 4\.9\.* ]]; then | |
sudo yum install epel-release -y | |
sudo yum install centos-release-scl -y |
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
from pyhive import presto | |
import requests | |
from requests.auth import HTTPBasicAuth | |
import pandas as pd | |
requests.packages.urllib3.disable_warnings() | |
req_kw = { | |
'auth': HTTPBasicAuth('the-user', 'the-password'), | |
'verify': '/path/to/cert.pem', | |
} |
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 prestodb | |
from prestodb.auth import KerberosAuthentication | |
KRB5_CONFIG = "/path/to/krb5.conf" | |
CA_BUNDLE = "/path/to/cert.pem" | |
_auth = KerberosAuthentication( | |
config=KRB5_CONFIG, | |
service_name='KERBEROS', | |
mutual_authentication=False, |
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
#!/bin/bash | |
set -ex | |
renv_repo_url=https://github.com/viking/Renv.git | |
renv_dir=$HOME/.Renv | |
if [ ! -d "$renv_dir" ]; then | |
git clone $renv_repo_url $renv_dir | |
fi |