和大家分享一下我整理的有趣的Github repository,项目地址在repo_starred
欢迎大家fork或者给我发issue
部分内容如下,不定期更新:
##navigation
和大家分享一下我整理的有趣的Github repository,项目地址在repo_starred
欢迎大家fork或者给我发issue
部分内容如下,不定期更新:
##navigation
| from flask import Flask | |
| from flask import jsonify | |
| from crossdomain import * | |
| app = Flask(__name__) | |
| @app.route("/user") | |
| @crossdomain(origin='*') | |
| def getuser(): | |
| return jsonify({'name': "aaa", "age": 11}) |
| #if the return is 1, the a b are in coprime relation | |
| #else return the smallest common divisor | |
| def checker(a,b): | |
| while True: | |
| c = a%b | |
| if c == 0: | |
| return b | |
| a = b | |
| b = c |
| Step 1: LAMP installation guide | |
| take a tour to this link http://www.howtoforge.com/ubuntu_lamp_for_newbies | |
| (Don't forget to Include /etc/phpmyadmin/apache.conf to the apache2.conf file) | |
| after those, apache2,php5,mysql and phpmyadmin are done. Type in localhost/phpmyadmin to check whether everything is ok. | |
| Step 2: Download Drupal7 and Extract it to /home/xxx/www and Create new site in apache2 | |
| in 'terminal' | |
| cd /etc/apache2/sites-available | |
| sudo cp default drupal7 | |
| sudo nano drupal7 #here change DocumentRoot /var/www to /home/xxx/www # I download drupal and extract to /home/xxx/www | |
| #change <Directory /var/www to /home/xxx/www and save |
| a = 'a' | |
| b = 'b' | |
| print True and a or b | |
| # output is 'a' | |
| c = '' #bool(c) is False | |
| d = 'd' | |
| print True and c or d | |
| #output is 'd' |