There are two types of markup in Liquid: Output and Tag.
- Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
- Tag markup (which cannot resolve to text) is surrounded by
import multiprocessing | |
# split a list into evenly sized chunks | |
def chunks(l, n): | |
return [l[i:i+n] for i in range(0, len(l), n)] | |
def do_job(job_id, data_slice): | |
for item in data_slice: | |
print "job", job_id, item |
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
There are two types of markup in Liquid: Output and Tag.
{{ matched pairs of curly brackets (ie, braces) }}
import contextlib | |
import OpenSSL.crypto | |
import os | |
import requests | |
import ssl | |
import tempfile | |
@contextlib.contextmanager | |
def pfx_to_pem(pfx_path, pfx_password): | |
''' Decrypts the .pfx file to be used with requests. ''' |
# See https://codeship.com/documentation/docker/browser-testing/ | |
FROM myapp:base | |
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver | |
RUN apt-get install -y wget xvfb unzip | |
# Set up the Chrome PPA | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list |
from keras.models import load_model | |
from keras.preprocessing import image | |
import numpy as np | |
import os | |
# image folder | |
folder_path = '/path/to/folder/' | |
# path to model | |
model_path = '/path/to/saved/model.h5' | |
# dimensions of images |
(function () { | |
const timeContainer = document.querySelectorAll( | |
".ytd-thumbnail-overlay-time-status-renderer" | |
); | |
let timeSeconds = 0; | |
for (let i = 0; i < timeContainer.length; i++) { | |
const timeStr = timeContainer[i].innerText; | |
if (!/\d?\d:\d{2}(:\d{2})?/g.test(timeStr)) continue; | |
const timeParts = timeStr.split(":"); |
I was unable to boot to live Linux distro to install Linux on my newly bought A485 ThinkPad laptop. Although I was initially dissapointed, I was not alone. This gist documents the information I gathered from the net to complete the installation.
At the time of posting this gist, the issue is still persistent. It might not be relevant anymore once Lenovo release a working BIOS update to resolve the issue. [Update 19/01/2019]: Updating to BIOS 1.14 worked for me.
The information in this short gist was compiled from several sources. Although most are for E series, it worked for A485:
variable "region" {} | |
variable "access_key" {} | |
variable "secret_key" {} | |
provider "aws" { | |
version = "~> 1.25" | |
region = "${var.region}" | |
access_key = "${var.access_key}" | |
secret_key = "${var.secret_key}"} |