install sphinx
$ pip install sphinx
use this python script to create a sphinx project
from sphinx import quickstart as qs
d = dict(
path = '.',
import random | |
import sys | |
def print_grid(grid): | |
print ("\n%s\n" % "+".join([('-' * 4)] * 4)).join( | |
["|".join(["%4d" % item if item > 0 else " " * 4 for item in line]) for line in grid]) | |
def get_available_cells(grid): |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
class Trie_tree(): | |
def __init__(self): | |
# node = [father, child, keep_char, is_word] | |
self._root = [None, [], None, False] | |
def insert(self, word): |
/* | |
* Find the longest palindrome in the text. | |
* | |
* This is Greplin's first challenge, and I originally solved it in Python. | |
* | |
* The algorithm is not optimal, but simple on the eyes and easy to understand | |
* On big inputs it's possible to use an approximately linear algorithm. | |
* | |
* Christian Stigen Larsen | |
*/ |
// simple array | |
var data = [8, 12, 15, 30, 43]; |
// get a Casper object. | |
// See http://casperjs.org/ | |
var casper = require('casper').create(); | |
// this will be evaluated inside the context of the window. | |
// See http://casperjs.org/api.html#casper.evaluate for notes on | |
// the difference between casper's running environment and the | |
// DOM environment of the loaded page. | |
function testReporter(){ | |
// casper is webkit, so we have good DOM methods. You're |
# https://tutsplus.com/course/virtual-machines-with-vagrant-and-puppet/ | |
# Download and install VirtualBox https://www.virtualbox.org/wiki/Downloads | |
# Download and install Vagrant http://www.vagrantup.com/downloads.html | |
# For this lesson, we'll be using VirtualBox as the provider | |
# add a new box to collection of vagrant boxes | |
# vagrant box add <name> <location> | |
vagrant box add precise32 http://files.vagrantup.com/precise32.box |
/* For use with the CustomReader Safari Extension */ | |
/* <http://canisbos.com/customreader> */ | |
body | |
{ | |
display: -webkit-box; | |
-webkit-box-orient: vertical; | |
-webkit-box-align: center; | |
background: url("linen.png"); | |
color: black; |
// many many codes | |
document.write('foo bar'); | |
document.write('</div>'); | |
// new code | |
var a = 'bar.js', stamp = +new Date() + '='; | |
document.write('<script id="foo" src="' + a + '?' + stamp + '"></script>'); | |
// other code | |
document.write('<div> other text</div>'); |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.31372550129890442</real> | |
<key>Green Component</key> | |
<real>0.24313725531101227</real> |
install sphinx
$ pip install sphinx
use this python script to create a sphinx project
from sphinx import quickstart as qs
d = dict(
path = '.',