How to filter emails from GitHub in Gmail and flag them with labels.
The labels in this document are just examples.
Filter | Label |
---|
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<!-- iOS 10, macOS Sierra, and friends bring a new logging subsystem that's | |
supposed to scale from the kernel, up to frameworks, and up to apps. It defaults | |
to a more regimented, privacy-focused approach that large apps and complex | |
systems need. | |
It, along with Activity Tracing introduced in iOS 8 and macOS Yosemite and the | |
Console app in macOS Sierra, hope to help you graduate from caveman debugging to |
import numpy as np | |
import tensorflow as tf | |
# Newton's optimization method for multivariate function in tensorflow | |
def cons(x): | |
return tf.constant(x, dtype=tf.float32) | |
def compute_hessian(fn, vars): | |
mat = [] |
When Swift was first announced, I was gratified to see that one of the (few) philosophies that it shared with Objective-C was that exceptions should not be used for control flow, only for highlighting fatal programming errors at development time.
So it came as a surprise to me when Swift 2 brought (What appeared to be) traditional exception handling to the language.
Similarly surprised were the functional Swift programmers, who had put their faith in the Haskell-style approach to error handling, where every function returns an enum (or monad, if you like) containing either a valid result or an error. This seemed like a natural fit for Swift, so why did Apple instead opt for a solution originally designed for clumsy imperative languages?
I'm going to cover three things in this post:
extension Array { | |
func first() -> Element? { | |
if isEmpty { | |
return nil | |
} | |
return self[0] | |
} | |
func last() -> Element? { |
# Sublime Text 3 languages list: | |
ls -1 /Applications/Sublime\ Text.app/Contents/MacOS/Packages/ | |
# Remove all default Sublime Text 3 snippets for Python language | |
export ST3_LANG="Python" | |
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/ | |
unzip -l /Applications/Sublime\ Text.app/Contents/MacOS/Packages/$ST3_LANG.sublime-package | grep '.sublime-snippet' | awk '{print $4}' | while read f; do touch ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/$f; done | |
unset ST3_LANG |
<!-- Include Mixpanel and init before this. --> | |
<!-- Place at the bottom of your layout (ex: app/views/layouts/application.html.erb) --> | |
<% if content_for :mixpanel %> | |
<%= javascript_tag(yield :mixpanel) %> | |
<% end %> |
#install instructions at https://newrelic.com/docs/server/server-monitor-installation-ubuntu-and-debian | |
base: | |
pkgrepo.managed: | |
- humanname: Newrelic PPA | |
- name: deb http://apt.newrelic.com/debian/ newrelic non-free | |
# - dist: precise | |
- file: /etc/apt/sources.list.d/newrelic.list | |
- keyid: 548C16BF | |
- keyserver: subkeys.pgp.net |