apt-get install python-software-properties
apt-add-repository ppa:chris-lea/node.js
apt-get update
apt-get install nodejs
npm install npm -g
import os | |
import re | |
import shutil | |
def replace_with_alias_macros(model_contents): | |
""" | |
Replace alias = 'some_alias' with alias('some_alias', legacy_model=True) | |
""" | |
pattern = r"alias\s*=\s*'([^']*)'" | |
# replace alias with legacy alias |
import os | |
import re | |
import shutil | |
# Get current dir | |
dir_path = os.getcwd() | |
for root,dirs,files in os.walk(dir_path): | |
for file in files: |
import os | |
import re | |
# Get the current directory | |
dir_path = os.getcwd() | |
# Traverse all files and subdirectories in the current directory | |
for root, dirs, files in os.walk(dir_path): | |
for file_name in files: |
import os | |
import re | |
# Get the current directory | |
dir_path = os.getcwd() | |
# Traverse all files and subdirectories in the current directory | |
for root, dirs, files in os.walk(dir_path): | |
for file_name in files: |
import os | |
import re | |
# Get the current directory | |
dir_path = os.getcwd() | |
pattern = re.compile(r'LEFT ANTI JOIN (\w+) t ON (t.\w+) = (\w+.\w+)') | |
def replace_anti_join(match): |
import os | |
import re | |
# Get the current directory | |
dir_path = os.getcwd() | |
# Traverse all files and subdirectories in the current directory | |
for root, dirs, files in os.walk(dir_path): | |
for file_name in files: |
import os | |
# Get the current directory | |
dir_path = os.getcwd() | |
# Traverse all files and subdirectories in the current directory | |
for root, dirs, files in os.walk(dir_path): | |
for file_name in files: | |
# Replace 'accounting_ethereum' with 'ethereum_accounting' in the file content |
#!/bin/bash | |
# Go to the location where your script located wherever your run it, | |
# and store the path contains the script at DIR. | |
# ${BASH_SOURCE[0]} is a more precised way to locate compare to $0 | |
# https://stackoverflow.com/questions/35006457/choosing-between-0-and-bash-source | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
# Set DIR as the working directory. |
apt-get install python-software-properties
apt-add-repository ppa:chris-lea/node.js
apt-get update
apt-get install nodejs
npm install npm -g
The simplest way is to use SimpleHTTPServer
if you already have Python installed.
Python comes already installed on most Mac OS X and Linux computers. In a terminal window, change to the directory that has your HTML files and run the following command:
python -m SimpleHTTPServer
After it starts, you can navigate to http://0.0.0.0:8000/index.html