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 python | |
# please ensure python means python3 on your system | |
# the file can be any binary file that contains a JPG image | |
# note that it's hungry and doesn't chunk the read so careful with large files | |
# usage: extract-jpg file_name | |
import sys |
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
const gallery = Object.values(import.meta.glob('@assets/*.{png,jpg,jpeg,PNG,JPEG}', { eager: true, as: 'url' })) |
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
# encoding: utf-8 | |
# This module monkey patches the docx library to add support for Windows Enhanced Metafile images (EMF) | |
# Put in a local folder and "import docx_emf_patch" to enable EMF support. | |
from __future__ import absolute_import, division, print_function | |
import docx | |
from docx.image.exceptions import UnrecognizedImageError | |
from docx.image.constants import MIME_TYPE | |
from docx.image.exceptions import InvalidImageStreamError |
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
;; -*- mode: text; coding: utf-8 -*- | |
;; | |
;; DO NOT EDIT MANUALLY! | |
;; | |
;; FILE IS GENERATED BY EMACS LISP SCRIPT | |
;; `%((file-name-nondirectory qta-ahkdata:generator-script-file)%)' | |
;; | |
;; | |
;; Writing LaTeX glyphs with | |
;; AutoHotKey (unicode versions only) |
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
Promise.all([ | |
someThingThatReturnsAPromise(), | |
otherThingThatReturnsAPromise(), | |
lastThingThatReturnsAPromise() | |
]) | |
.then( results => | |
{ | |
// this... | |
const [first, second, third] = results; | |
// ... instead of |
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 weighted | |
from matplotlib.cbook import violin_stats | |
from scipy import stats | |
import statsmodels.api as sm | |
def vdensity_with_weights(weights): | |
''' Outer function allows innder function access to weights. Matplotlib | |
needs function to take in data and coords, so this seems like only way | |
to 'pass' custom density function a set of weights ''' | |