北京自动定饭脚本
节约粮食人人有则
| package main | |
| import ( | |
| "database/sql" | |
| "errors" | |
| "fmt" | |
| _ "github.com/bmizerany/pq" | |
| "os" | |
| "regexp" | |
| "strings" |
| // Meetup is a micro proxy program that enables to connect two endpoints via TCP sockets. | |
| // Either of endpoint may listen or connect. | |
| // | |
| // Example usage: | |
| // - you have a faulty PHP application and you want to debug it with xdebug | |
| // - xdebug can connect to your machine:9000, but you are behind NAT | |
| // - so you run `meetup -listen1=:9000 -listen2=:9001` on the application server | |
| // - and another `meetup -connect1=appserver:9001 -connect=localhost:9000` on your machine | |
| // First instance listens two ports and when a connection arrives on both, it creates | |
| // a bidirectional buffered pipe between the two. The other instance connects to |
北京自动定饭脚本
节约粮食人人有则
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Ext JS Grid Example</title> | |
| <script src="http://cdn.sencha.io/ext-4.0.7-gpl/ext-all.js"> </script> | |
| <link rel="stylesheet" href="http://cdn.sencha.io/ext-4.0.7-gpl/resources/css/ext-all.css" /> |
| /* | |
| * Added the command line arguments for interface and MAC Address | |
| * | |
| * Based on raw Ethernet from austinmarton: https://gist.github.com/1922600 | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| */ |
| /* | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| */ | |
| #include <arpa/inet.h> | |
| #include <linux/if_packet.h> | |
| #include <stdio.h> |
| Quick gist on getting vsphere and vcenter and fog/vsphere going | |
| # Things to download | |
| - Download free evaluation version of window 2008 | |
| - Download free evaluation of esxi v5 | |
| - Download free evaluation of esxi vsphere (control center) iso | |
| # Install esxi in vmware fusion | |
| 1)Install esxi in vmware (select vmware/esx as host) | |
| create a user root/pipopopo |
| LOGGING = { | |
| 'version': 1, | |
| 'disable_existing_loggers': False, | |
| 'handlers': { | |
| 'mail_admins': { | |
| 'level': 'ERROR', | |
| 'class': 'django.utils.log.AdminEmailHandler' | |
| }, | |
| 'null': { | |
| 'level':'DEBUG', |
| client = paramiko.SSHClient() | |
| client._policy = paramiko.WarningPolicy() | |
| client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
| ssh_config = paramiko.SSHConfig() | |
| user_config_file = os.path.expanduser("~/.ssh/config") | |
| if os.path.exists(user_config_file): | |
| with open(user_config_file) as f: | |
| ssh_config.parse(f) |
The default is to put this on its own node so you will need to start DSE with dse cassandra -k to create a spark analytics node.
First run the https://github.com/PatrickCallaghan/order-management-demo project to populate the cassandra cluster (follow instructions in README). This project is based on the first bootcamp project and is a fairly general order management system (eg. users, accounts, products, orders). This can take a while so you may only want to run it for a minute or two to generate some data.
NOTE you will need to add the following table to your schema
CREATE TABLE useraccounts (
user_id text,
balance double,