- Clone the repo
git clone --mirror https://github.com/vuejs/vue
cd
into the cloned repo- Create a bundle file in the parent directory
git bundle create ../vuejs_vue.bundle --all
import json | |
import time | |
import requests | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.firefox.options import Options as FirefoxOptions | |
from webdriverdownloader import GeckoDriverDownloader |
import logging | |
import requests | |
import urllib | |
import urllib.parse | |
from parsel import Selector | |
logging.basicConfig(level=logging.INFO, | |
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
logger = logging.getLogger(__name__) |
"""Sort a list of dicts using multiple keys | |
Also be able to have the different keys sort in different orders | |
""" | |
from pprint import pprint | |
unsorted_data_a = [{'title': 'Foo Beta', | |
'date': '2018-06-03', | |
'value': 5}, |
sublime_project_template='{ | |
"folders": | |
[ | |
{ | |
"path": "." | |
} | |
], | |
"file_exclude_patterns":[ | |
"*.sublime-*" | |
] |
git status -s | cut -c4- | xargs -L1 sublime |
# I know dict's have `.get()`, this example was made to break if the key is not | |
# there to show the use of multiple try/except's | |
# Yes I know that having the except and else on 1 line each does not fit with PEP8 standards. | |
# But when you have many of them it helps reduce the size of the file and is no harder to read | |
data = {'some_key': 'key value'} | |
key_data = None | |
for _ in range(1): | |
try: | |
key_data = data['someKey'] |
#1 | |
DROP FUNCTION qa_fields(character varying,character varying); | |
CREATE OR REPLACE FUNCTION qa_fields(schema_name VARCHAR, tbl_name VARCHAR) | |
-- The table def needs to be known before the function runs, but the number of fields returned is dynamic :( | |
-- Also need to correct names for the fields, the types will alwyas be FLOAT | |
RETURNS TABLE(a FLOAT, b FLOAT, c FLOAT, d FLOAT, e FLOAT, f FLOAT, g FLOAT, h FLOAT, i FLOAT, j FLOAT, k FLOAT, l FLOAT, m FLOAT, n FLOAT, o FLOAT, p FLOAT, q FLOAT, r FLOAT, s FLOAT, t FLOAT, u FLOAT, v FLOAT, w FLOAT, x FLOAT, ts DATE) AS | |
$func$ | |
DECLARE field_name VARCHAR; |
# Put this code in your .bashrc or .bash_profile | |
# Get Virtual Env | |
Color_Off="\033[0m" # Text Reset | |
Purple="\033[0;35m" # Purple | |
virtualenv_prompt() { | |
if [[ $VIRTUAL_ENV != "" ]]; then | |
venv=${VIRTUAL_ENV##*/} | |
# Strip out the path and just leave the env name |