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
# This file was automatically installed on 2016-03-11T16:20:06.126943 | |
upstream modoboa { | |
server unix:/var/run/uwsgi/app/modoboa_instance/socket fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name mail.justrocketscience.com; | |
location / { |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
RewriteEngine On | |
## | |
## You may need to uncomment the following line for some hosting environments, |
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
[mysql] | |
local-infile=1 ## enable local infile support | |
[client] | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
[mysqld_safe] | |
socket = /var/run/mysqld/mysqld.sock | |
nice = 0 |
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
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
UCgefQJC5UgbWJHDxBqB4qVg | |
UC0v-tlzsn0QZwJnkiaUSJVQ | |
UCo_IB5145EVNcf8hw1Kku7w | |
UC-lHJZR3Gqxm24_Vd_AJ5Yw | |
UCGjylN-4QCpn8XJ1uY-UOgA | |
UCGCPAOQDZa_TTTXDr5byjww | |
UC4PooiX37Pld1T8J5SYT-SQ | |
UCJZ7f6NQzGKZnFXzFW9y9UQ | |
UCfm4y4rHF5HGrSr-qbvOwOg | |
UCHUE4ypXKp7ZkmdWbGJNgJg |
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
version: '2' | |
services: | |
caddy: | |
image: joshix/caddy | |
links: | |
- rstudio | |
volumes: | |
- ./site/:/var/www/html | |
- ./.caddy/:/.caddy | |
ports: |
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
<?php | |
date_default_timezone_set('UTC'); | |
require 'vendor/autoload.php'; | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
use GuzzleHttp\Pool; | |
use GuzzleHttp\Client; |
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
exec gnome-settings-daemon | |
exec --no-startup-id nitrogen --restore | |
exec --no-startup-id nm-applet | |
# keyring daemon | |
exec /usr/bin/gnome-keyring-daemon --start --components=gpg | |
exec /usr/bin/gnome-keyring-daemon --start --components=secrets | |
exec /usr/bin/gnome-keyring-daemon --start --components=ssh | |
exec /usr/bin/gnome-keyring-daemon --start --components=pkcs11 |
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
load_embedding <- function(file_path){ | |
# load full file | |
lines <- readLines(file_path) | |
# create new environment | |
embeddings_env <- new.env(hash = TRUE, parent = emptyenv()) | |
# this function is used to convert vectors to unit vectors | |
# by dividing their components by vector length | |
normalize_vector <- function(a){ |
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
cosine_similarity <- function(a,b){ | |
# assuming unit vectors | |
# the cosine is just the dot-product | |
a %*% b | |
} | |
most_similar <- function(embeddings, ref_item, n_top = 10){ | |
# calculate cos similarity to ref_item for all elements | |
cos_sims <- eapply(embeddings, cosine_similarity, b = ref_item) |
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
\documentclass[a4paper]{article} | |
\usepackage[english]{babel} | |
\usepackage{listings} | |
%% for swift | |
\lstdefinelanguage{Swift}{ | |
keywords={associatedtype, class, deinit, enum, extension, func, import, init, inout, internal, let, operator, private, protocol, public, static, struct, subscript, typealias, var, break, case, continue, default, defer, do, else, fallthrough, for, guard, if, in, repeat, return, switch, where, while, as, catch, dynamicType, false, is, nil, rethrows, super, self, Self, throw, throws, true, try, associativity, convenience, dynamic, didSet, final, get, infix, indirect, lazy, left, mutating, none, nonmutating, optional, override, postfix, precedence, prefix, Protocol, required, right, set, Type, unowned, weak, willSet}, | |
ndkeywords={class, export, boolean, throw, implements, import, this}, | |
sensitive=false, |