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
# Basic key operators to query the JSON objects : | |
# #> : Get the JSON object at that path (if you need to do something fancy) | |
# -> : Get the JSON object at that path (if you don't) | |
# ->> : Get the JSON object at that path as text | |
# {obj, n} : Get the nth item in that object | |
# https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE | |
# Date | |
# date before today |
![doors-ice.jpg](https://gist.github.com/duhaime/6fc409012087f13d790133fa4df2fa8a/raw/0f5a6f5dd19aed67007aa708552293b42790afc1/doors-ice.jpg)
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
function body2mesh(body, wireframe) { | |
var wireframe = wireframe || true; | |
var obj = new THREE.Object3D(); | |
for (var l = 0; l < body.shapes.length; l++) { | |
var shape = body.shapes[l]; | |
var mesh; | |
switch(shape.type){ |
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
<html> | |
<head> | |
<style> | |
html, body { width: 100%; height: 100%; background: #000; } | |
body { margin: 0; overflow: hidden; } | |
canvas { width: 100vw; height: 100vh; } | |
#selected { position: absolute; top: 10; left: 10; font-size: 40; color: black; background: #fff; width: 100%;} | |
</style> | |
</head> | |
<body> |
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
*.pem | |
*.swp | |
*.DS_Store | |
__pycache__/ | |
node_modules/ | |
uploaded_files/ |
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 flask import Flask, render_template | |
from smtp_client import send_email | |
from smtp_server import SMTPServer | |
app = Flask(__name__) | |
@app.route('/send_email') | |
def email(): | |
server = SMTPServer() | |
server.start() |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='UTF-8'> | |
<title>title</title> | |
<style> | |
body, html { | |
margin: 0; | |
padding: 0; | |
background: #000; |
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
<html> | |
<head> | |
<style> | |
html, body { width: 100%; height: 100%; background: #000; } | |
body { margin: 0; overflow: hidden; } | |
canvas { width: 100%; height: 100%; } | |
</style> | |
</head> | |
<body> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/three.js/92/three.min.js'></script> |
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 warnings | |
from skimage.measure import compare_ssim | |
from skimage.transform import resize | |
from scipy.stats import wasserstein_distance | |
from scipy.misc import imsave | |
from scipy.ndimage import imread | |
import numpy as np | |
import cv2 | |
## |
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 selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
chrome_options = Options() | |
chrome_options.add_argument("--headless") | |
chrome_options.binary_location = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' | |
driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver', chrome_options=chrome_options) | |
driver.get("http://www.duo.com") |
NewerOlder