# Force to use https
server {
listen 80;
listen [::]:80;
server_name example.com;
return 301 https://$server_name$request_uri;
}
# Default server configuration
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
function countdown(endDate) { | |
let days, hours, minutes, seconds; | |
endDate = new Date(endDate).getTime(); | |
if (isNaN(endDate)) { | |
return; | |
} | |
setInterval(calculate, 1000); |
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
<div class="container"> | |
<h1>Add New User</h1> | |
<form (ngSubmit)="userSubmit()" #addform="ngForm"> | |
<div class="form-group"> | |
<label for="firstname">FirstName</label> | |
<input type="text" [(ngModel)]="model.firstname" name="firstname" class="form-control" id="firstname" required #firstname="ngModel"> | |
</div> |
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
pipeline { | |
agent { | |
docker { | |
image 'node' | |
} | |
} | |
stages { | |
stage('Clone Sources') { | |
steps { |
I’m looking forward to the Sass Fundamentals workshop! A few notes to ensure you’re set up in advance are below.
See you soon!
Mike
You’ll need a relatively recent version (v4.5 or newer, v7 ideally) of node.js installed. On OS X, a great way of doing this without disturbing your existing dev environment is to install NVM. Installation instructions are here.
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 cors = require('cors')({origin: true}); | |
exports.sample = functions.https.onRequest((req, res) => { | |
cors(req, res, () => { | |
res.send('Passed.'); | |
}); | |
}); |
- FaceNet (Google)
- They use a triplet loss with the goal of keeping the L2 intra-class distances low and inter-class distances high
- DeepID (Hong Kong University)
- They use verification and identification signals to train the network. Afer each convolutional layer there is an identity layer connected to the supervisory signals in order to train each layer closely (on top of normal backprop)
- DeepFace (Facebook)
- Convs followed by locally connected, followed by fully connected
Based on Abdelrahman Omran PWA presentation, and Google PWA Codelab
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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
// This formats dates like how Twitter does on their tweets I originally wrote | |
// this because I did not want to add an external dependency (such as moment) to | |
// my project for something so insignificant (date format). I couldn't have | |
// easily generated it on the server side since the dates are relative to the | |
// end user's browser's timezone (and I specifically wrote this to run on the | |
// client). | |
// | |
// Usage: twitterDateFormat(time) | |
// time can be anything JS' Date can understand |