This file contains hidden or 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 cv2 | |
import drawsvg | |
import argparse | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from PIL import Image, ImageDraw | |
def show_raster(im): | |
im = cv2.cvtColor(im, cv2.COLOR_GRAY2RGB) | |
plt.figure() |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import sys | |
import os.path | |
import numpy as np | |
import skimage.io, skimage.color, skimage.transform | |
import sklearn.cluster | |
import matplotlib.pyplot as plt |
This file contains hidden or 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 cv2 | |
from sklearn.cluster import KMeans | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import random | |
import argparse | |
# big thanks to this answer for the sketch | |
# https://stackoverflow.com/a/63647647/1176872 |
This file contains hidden or 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
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// munged from https://github.com/simontime/Resead | |
namespace sead | |
{ | |
class Random | |
{ |
This file contains hidden or 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
#python3 | |
def pil2datauri(img): | |
#converts PIL image to datauri | |
data = BytesIO() | |
img.save(data, "JPEG") | |
data64 = base64.b64encode(data.getvalue()) | |
return u'data:img/jpeg;base64,'+data64.decode('utf-8') |
This file contains hidden or 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
#!/usr/bin/env python3.6 | |
__author__ = 'Illia Volochii' | |
__license__ = 'MIT' | |
import binascii | |
import struct | |
initial_hash = ( | |
0x6a09e667f3bcc908, | |
0xbb67ae8584caa73b, |
This file contains hidden or 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
WEBVTT | |
00:00:00.500 --> 00:00:02.000 | |
The Web is always changing | |
00:00:02.500 --> 00:00:04.300 | |
and the way we access it is changing |
This file contains hidden or 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
%YAML 1.2 | |
--- | |
name: 'GoHTML' | |
file_extensions: | |
- gohtml | |
- html.go | |
scope: text.html.gohtml | |
contexts: | |
main: | |
- match: '' |
This file contains hidden or 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
// curl -X POST -H "Content-Type: application/octet-stream" --data-binary '@filename' http://127.0.0.1:5050/upload | |
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"time" |
This file contains hidden or 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
<# | |
PowerShell, SqlBulkCopy and RunSpaces Speed Test | |
-- To be used for speed testing purposes with million.csv -- | |
-- Will drop and recreate specified database if it exists -- | |
This script will | |
- Automatically download the million row dataset if it doesn't exist | |
- Drop the specified database if it exists |
NewerOlder