Skip to content

Instantly share code, notes, and snippets.

from IPython.display import clear_output
from pathlib import Path
from datetime import datetime
import PIL
from PIL import Image, ImageDraw, ImageChops
import pandas as pd
import numpy as np
from numpy import linalg
from copy import deepcopy
@Qblack
Qblack / events.md
Last active May 4, 2018 00:39
KW Events
When What Link Mystery
April
4th Fantastic Mr Fox Night Market ??
7th Elmira Maple Syrup King StrEATery ??
7th Dana's BDAY Jazz Room March - June
12th Rising Stars: International Tapas and Tastings Movies in the park
14th Dave gunning Triva - Weekly
13th-15th KW Weavers and Spinners Show and Sale
16th Video Games Live
@Qblack
Qblack / DelvingIntoPythonAndDevelopment.md
Last active May 2, 2018 20:37
A guide to python and development

Python 2 or 3?

For people new to python one of the main issues they first have to surpass is which version to use; either 2.7 or 3.x. Python 3.0 was released in 2008 but despite having many nice new features has encountered slow adoption rates. One of the key reasons being breaking changes causing packages not to update creating a vicious cycle of not updating because your dependencies' dependency is not updated. I will not go too much into this but if you have some grasp of what you are doing or want to be doing you can check the status of the more popular dependencies on Python3 Wall of Superpowers. As to why you should use 3 over 2 there are many blog posts already in existence such as Eev.ee’s PythonFAQ: Why should I use Python 3? and from the python wiki: Python2orPython3.

A couple key differences you will notice right away would be:

  • In pyth
@Qblack
Qblack / Node.js CORS
Last active August 29, 2015 14:23 — forked from nilcolor/Node.js CORS
if (req.method === 'OPTIONS') {
console.log('!OPTIONS');
var headers = {};
// IE8 does not allow domains to be specified, just the *
// headers["Access-Control-Allow-Origin"] = req.headers.origin;
headers["Access-Control-Allow-Origin"] = "*";
headers["Access-Control-Allow-Methods"] = "POST, GET, PUT, DELETE, OPTIONS";
headers["Access-Control-Allow-Credentials"] = false;
headers["Access-Control-Max-Age"] = '86400'; // 24 hours
headers["Access-Control-Allow-Headers"] = "X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept";
<!DOCTYPE html>
<html>
<head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<title>How to Vagrant with flask</title>
</head>
<body>
<div class="container-fluid">
SchedualeMaker