This is roughly the same test run in both casper and nightwatch.
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
/* | |
A script to generate a Google BigQuery-complient JSON-schema from a JSON object. | |
Make sure the JSON object is complete before generating, null values will be skipped. | |
References: | |
https://cloud.google.com/bigquery/docs/data | |
https://cloud.google.com/bigquery/docs/personsDataSchema.json | |
https://gist.github.com/igrigorik/83334277835625916cd6 | |
... and a couple of visits to StackOverflow |
For a small number of variables ('tokens'), I use a simple shell script along with a templated version of my YAML file. Here's an actual example:
files:
docker-compose-template.yml
docker-compose.yml
compose_replace.sh
run:
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
/* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it: | |
Make sure your modal has an id: | |
<div class="modal" id="myModal" ... > | |
Then stick this bit of Javascript at at the end of your document: | |
*/ | |
$(document).ready(function() { |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
-
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
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 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/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
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
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
OlderNewer