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
// ==UserScript== | |
// @name Google maps addon | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-03-21 | |
// @description Bring google maps button back | |
// @author You | |
// @match https://www.google.com/search* | |
// @include https://www.google.tld/search* | |
// @icon https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png | |
// @grant none |
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 android.annotation.SuppressLint | |
import android.content.Intent | |
import android.content.pm.PackageManager | |
import android.os.Build | |
import androidx.annotation.IntDef | |
//Make sure you have the following declared in Manifest when running on Android 11+ | |
//<queries> | |
//<package android:name="com.google.android.tvlauncher" /> | |
//<package android:name="com.google.android.leanbacklauncher" /> |
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 http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name="viewport" /> | |
<link rel="icon" href="data:,"> | |
<title>String art</title> | |
<script type="text/javascript" src="jquery.min.js"></script> | |
<style> | |
html, 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
import collections | |
import math | |
import os | |
import cv2 | |
import numpy as np | |
import time | |
MAX_LINES = 4000 | |
N_PINS = 36*8 | |
MIN_LOOP = 20 # To avoid getting stuck in a loop |
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 { | |
Cartesian3, | |
HeadingPitchRoll, | |
Matrix3, | |
Matrix4, | |
Quaternion, | |
Transforms, | |
} from "cesium"; | |
/** |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue May 17 23:05:35 2016 | |
@author: Oyc | |
""" | |
import os | |
import requests as req | |
from bs4 import BeautifulSoup as bs |
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 1.
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
"continent_code", "country_code","continent_name","country_name","country_iso3","country_number","country_full_name | |
"AS","AF","Asia","Afghanistan","AFG","004","Islamic Republic of Afghanistan" | |
"EU","AX","Europe","Åland Islands","ALA","248","Åland Islands" | |
"EU","AL","Europe","Albania","ALB","008","Republic of Albania" | |
"AF","DZ","Africa","Algeria","DZA","012","People"s Democratic Republic of Algeria" | |
"OC","AS","Oceania","American Samoa","ASM","016","American Samoa" | |
"EU","AD","Europe","Andorra","AND","020","Principality of Andorra" | |
"AF","AO","Africa","Angola","AGO","024","Republic of Angola" | |
"NA","AI","North America","Anguilla","AIA","660","Anguilla" | |
"AN","AQ","Antarctica","Antarctica","ATA","010","Antarctica the territory South of 60 deg S" |
Tutum Zero Downtime Re-deploy
I tweeted Tutum last night asking if they're looking at implementing zero downtime re-deploys for a given service. Slightly surprised by their response as it seems like a critical feature if you want to use the service for a production environment.
"not a top priority, but by Spring :)"
As Tutum currently doesn't support graceful termination of containers within a service, I was experiencing a 5-10 second window of 503
errors, so decided to use the following hack (code below) until the feature is officially implemented.
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
See my DASH-IF presentation from October, 2014: | |
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/ | |
1. encode multiple bitrates with keyframe alignment: | |
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \ | |
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4 | |
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment | |
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012. |
NewerOlder