Skip to content

Instantly share code, notes, and snippets.

rdhyee / gmail-compose-encoder.js
Created Oct 15, 2020 — forked from danrouse/gmail-compose-encoder.js
gmail `compose` query parameter encoder/decoder
View gmail-compose-encoder.js
const fullAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
const restrictedAlphabet = 'BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz';
const threadPrefix = 'thread-';
const messagePrefix = 'msg-';
const isWhitespace = str => /^[\s\xa0]*$/.test(str);
const isInvalidString = str => str ? (str.indexOf(threadPrefix) !== -1 || str.indexOf(messagePrefix) !== -1) : false;
const encode = function(str) {
if (isWhitespace(str)) return str;
rdhyee /
Last active Feb 8, 2020
a description of Albany CERT for an East Bay CERT gathering

Albany CERT

  • I (Raymond Yee, am a resident of Albany. After taking the CERT training in Spring 2017, I started to organize the community of CERT folks living in Albany so that we can have a longer term community. (What can we do after our training? How can we work together between major disasters?)
  • Biannual CERT course: CERT Program & Courses | City of Albany, CA -- next course is March 24-May 19, 2020
  • CERT Program manager is Michael Raab of the Albany Fire Dept. We get the day-to-day support of Neighborhood Services Manager Sid Schoenfeld
  • We have a Google Group to facilitate some communication:
  • Albany CERT Community Meeting happens on the 5th Wednesday of the month meetings -- last one was Jan 29, 2020.
  • We have an organizi
View Number_of_weekdays_in_month.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from __future__ import print_function
import httplib2
import os
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
View gist:833fe67ee8be5ccbbd7a294e3340460f
PARIS — France’s presidential election on Sunday has already broken all kinds of barriers in a country whose politics seemed frozen for decades. The two candidates are outsiders. The political establishment has been elbowed aside. The tone of the race between the insurgents has shocked many for its raw anger and insolence.
Then, barely an hour before the official close of campaigning at midnight Friday, the staff of the presumed front-runner, Emmanuel Macron, a 40-year-old former investment banker, announced that his campaign had been the target of a “massive and coordinated” hacking operation.
Internal emails and other documents, some real, some fake, according to the campaign, were posted on 4chan, an online message board favored by white nationalists, in an apparent effort to aid his rival, Marine Le Pen, 48, the far-right leader.
rdhyee /
Created Jan 17, 2017
contact info for elected representatives for Albany, CA (2017)
rdhyee / Hillary_for_America_events_in_Berkeley_office.ipynb
Last active Oct 31, 2016
Generate a markdown list of events happening at the Berkeley HfA office
View Hillary_for_America_events_in_Berkeley_office.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
rdhyee /
Last active Oct 22, 2016
List of phone banking events at the Hillary for America Berkeley office [1224 Solano Ave, Albany, CA](
rdhyee / process_chunk_timing.txt
Created Feb 24, 2016
Timing of [python-taq/ at d2bf87f1b8f461e3f62511eec573770683f8c181 · dlab-projects/python-taq]( using [rkern/line_profiler: Line-by-line profiling for Python](
View process_chunk_timing.txt
Line # Hits Time Per Hit % Time Line Contents
330 @profile
331 def process_chunk(self, all_bytes):
332 '''Convert the structured ndarray `all_bytes` to the target_dtype
334 If you did not specify do_process_chunk, you might run this yourself on
335 chunks that you get from iteration.'''
336 # Note, this is slower than the code directly below
337 # records = recfunctions.append_fields(easy_converted, 'Time',
You can’t perform that action at this time.