start new:
tmux
start new with session name:
tmux new -s myname
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| import requests, chardet, codecs, time | |
| from bs4 import BeautifulSoup as bs | |
| urls = [ | |
| "https://www.collectui.com/challenges/sign-up", | |
| "https://www.collectui.com/challenges/checkout", | |
| "https://www.collectui.com/challenges/landing-page", | |
| "https://www.collectui.com/challenges/calculator", | |
| "https://www.collectui.com/challenges/app-icon", | |
| "https://www.collectui.com/challenges/user-profile", |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
| <title>Bootstrap 101 Template</title> | |
| <!-- Bootstrap --> |
| >>> def a(): | |
| yield {'a':1} | |
| >>> a = a() | |
| >>> a.items() | |
| Traceback (most recent call last): | |
| File "<pyshell#4>", line 1, in <module> | |
| a.items() | |
| AttributeError: 'generator' object has no attribute 'items' |
| class A():pass | |
| class B(): | |
| def __enter__(self): # The with statement guarantees that if the __enter__() method returns without an error, then __exit__() will always be called. | |
| return A() | |
| def __exit__(self, exc_type, exc_value, traceback): # If the context was exited without an exception, all three arguments will be None. | |
| return False # Reraise the exception | |
| return True # Suppress the exception | |
| def c(): |
| # -*- coding: utf-8 -*- | |
| import requests, chardet, codecs, time | |
| from bs4 import BeautifulSoup as bs | |
| from urlparse import urlparse, urljoin | |
| BOOK_HOME = 'http://www.biqugex.com/book_869/' | |
| BOOK_HOME = 'http://www.uctxt.com/book/23/23193/' | |
| BOOK_HOME = 'http://www.shuge.net/html/99/99268/' | |
| BOOK_HOME = 'http://www.xszww.com/html/54/54708/' |