Simulates a nice constellation on canvas
A Pen by Acauã Montiel on CodePen.
#sudo wget http://nginx.org/download/nginx-1.9.12.tar.gz | |
#sudo tar -xvzf nginx-1.9.12.tar.gz | |
#cd nginx-1.9.12 | |
#sudo apt-get install -y build-essential libpcre3 libpcre3-dev zlib1g-dev | |
#sudo ./configure --with-stream && sudo make && sudo make install | |
# /usr/local/nginx/conf/nginx.conf - NGINX configuration file | |
worker_processes 1; |
(function (context, trackingId, options) { | |
const history = context.history; | |
const doc = document; | |
const nav = navigator || {}; | |
const storage = localStorage; | |
const encode = encodeURIComponent; | |
const pushState = history.pushState; | |
const typeException = 'exception'; | |
const generateId = () => Math.random().toString(36); | |
const getId = () => { |
Simulates a nice constellation on canvas
A Pen by Acauã Montiel on CodePen.
Simulates a nice constellation on canvas
A Pen by Acauã Montiel on CodePen.
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ |
<?php | |
/** | |
* Plugin Name: Grunt Sitemap Generator | |
* Plugin URI: http://www.github.com/lgladdy | |
* Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php | |
* Author: Liam Gladdy | |
* Author URI: http://gladdy.co.uk | |
* Version: 1.0 | |
*/ | |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
<?php | |
/* | |
@ref http://stevehanov.ca/blog/index.php?id=132 | |
def choose(): | |
if math.random() < 0.1: | |
# exploration! | |
# choose a random lever 10% of the time. | |
else: | |
# exploitation! | |
# for each lever, |
from selenium import webdriver | |
from selenium.common.exceptions import TimeoutException | |
import selenium.webdriver.support.wait | |
selenium.webdriver.support.wait.POLL_FREQUENCY = 0.05 | |
import re | |
import random | |
import collections | |
class AdwordsAutomater(object): |