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
import os | |
import argparse | |
import json | |
from pprint import pprint | |
from tempfile import NamedTemporaryFile | |
from jinja2 import Environment, PackageLoader | |
from libcloud.common.types import ProviderError | |
from libcloud.compute.types import Provider | |
from libcloud.compute.deployment import (MultiStepDeployment, | |
ScriptDeployment, ScriptFileDeployment, FileDeployment) |
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
import sqlite3 | |
import os | |
import argparse | |
try: | |
import pyspark | |
import pyspark.sql | |
except ImportError: | |
import sys | |
import os |
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
==> default: Running provisioner: shell... | |
default: Running: inline script | |
==> default: stdin: is not a tty | |
==> default: Reading package lists... | |
==> default: Building dependency tree... | |
==> default: Reading state information... | |
==> default: libgit2-0 is already the newest version. | |
==> default: python-git is already the newest version. | |
==> default: 0 upgraded, 0 newly installed, 0 to remove and 92 not upgraded. | |
==> default: Running provisioner: salt... |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python2 | |
from random import randint | |
import sys | |
from time import sleep | |
MAX_TIME = 3 + randint(0,3) | |
SHOWMAN_RUNS = 40 | |
SHOWMAN_SLEEP = .05 | |
f = open(sys.argv[1]) | |
lines = f.readlines() |
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
/**************************************************************************** | |
* Compilation: javac PercolationVisualizer.java | |
* Execution: java PercolationVisualizer input.txt | |
* Dependencies: Percolation.java StdDraw.java In.java | |
* | |
* This program takes the name of a file as a command-line argument. | |
* From that file, it | |
* | |
* - Reads the grid size N of the percolation system. | |
* - Creates an N-by-N grid of sites (intially all blocked) |