Skip to content

Instantly share code, notes, and snippets.

@ow
ow / Chromium flags for PWAs.md
Last active January 27, 2021 23:42
Chromium flags for PWAs

Upcoming flags to enable link capturing and other PWA features. Enable these flags by copying and pasting the following, then searching for the below chrome://flags/

Enable full desktop integration:
chrome://flags/#enable-desktop-pwas

Capture URLs in their scope, such as twitter URLs for the Twitter PWA:
chrome://flags/#enable-desktop-pwas-link-capturing chrome://flags/#enable-desktop-pwas-stay-in-window

Get a pop-up that offers to allow the PWA to open certain URLs:

@jcreedcmu
jcreedcmu / escape.js
Created February 19, 2018 18:09
Escaping nodejs vm
////////
// The vm module lets you run a string containing javascript code 'in
// a sandbox', where you specify a context of global variables that
// exist for the duration of its execution. This works more or less
// well, and if you're in control of the code that's running, and you
// have a reasonable protocol in mind// for how it expects a certain
// context to exist and interacts with it --- like, maybe a plug-in
// API for a program, with some endpoints defined for it that do
// useful domain-specific things --- your life can go smoothly.
anonymous
anonymous / align_images_masked.py
Created December 27, 2017 01:50
Patched alignment and merging scripts including the option for masking via the detected face points, seamless clone and erosion and blurring of the masks.
import argparse
import cv2
import dlib
import json
import numpy
import skimage
from pathlib import Path
from tqdm import tqdm
from umeyama import umeyama
anonymous
anonymous / align_images.py
Created December 21, 2017 16:05
Face alignment scripts based on 1adrianb/face-alignment
import argparse
import cv2
import dlib
import json
import numpy
import skimage
from pathlib import Path
from tqdm import tqdm
from umeyama import umeyama
@paumoreno
paumoreno / README.md
Last active June 8, 2022 04:41
Extract all messages from a Vue.js with vue-i18n app, using gettext-extractor.

This script uses the great message extraction library gettext-extractor by lukasgeiter.

The script assumes that the location of the source files is ./src. It parses both .js and .vue files. It writes the PO template file in ./i18n/messages.pot.

Some things to note:

  • It assumes that interpolations in the templates use the delimieters {{}} (it is the most commmon case).
  • It assumes that both the template and the script sections of the .vue single file components are defined inline, and not referenced by a src attribue (it is the most common case).
  • Expressions to extract are hardcoded. Currently they are ['$t', '[this].$t', 'i18n.t'].
@dvm-shlee
dvm-shlee / pykoen.py
Last active April 21, 2022 10:19
pykoen, jupyter notebook 을 이용한 interactive 한영번역기 (구글번역기 + Ginger 문법교정기)
from __future__ import absolute_import
import json
import sys
import re
import requests
import urllib
import urlparse
from urllib2 import HTTPError
from urllib2 import URLError
from urllib2 import urlopen
@slzatz
slzatz / font.py
Last active January 28, 2020 12:39
I2C driver for micropython esp8266 ssd1306 OLED (ssd1306a.py is paired down and works with the font.py file to allowing generating text)
# Originally from https://github.com/guyc/py-gaugette/blob/master/gaugette/font5x8.py
# Contains ASCII 32 (space) through ASCII 90 (Z)
cols = 5
rows = 8
bytes = [
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5F, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00,
0x14, 0x7F, 0x14, 0x7F, 0x14,
@haje01
haje01 / TensorFlow 시작하기.md
Last active May 3, 2024 07:30
TensorFlow 시작하기

텐서플로우 시작하기

글쓴이: 김정주(haje01@gmail.com)

이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.


소개

텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.

@themeteorchef
themeteorchef / timezones.js
Last active June 26, 2024 15:30
Array of timezones as objects, sorted by offset and name.
[
  {
    "offset": "GMT-12:00",
    "name": "Etc/GMT-12"
  },
  {
    "offset": "GMT-11:00",
    "name": "Etc/GMT-11"
  },
  {