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 python | |
| # encoding: utf-8 | |
| import os | |
| import time | |
| import logging | |
| import hashlib | |
| from sqlalchemy import create_engine, ForeignKey, Column, Integer, String, Text, DateTime,\ |
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
| def simple_decorator(f): | |
| def wrapper(): | |
| print "Entering Function" | |
| f() | |
| print "Exit" | |
| return wrapper |
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
| # -*- coding: utf-8 -*- | |
| from flask import Flask, Blueprint, request | |
| app = Flask(__name__) | |
| app.config.DEBUG = True | |
| #app.url_map.default_subdomain = 'www' | |
| app.config['SERVER_NAME'] = 'example.com' |
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
| #coding: utf-8 | |
| __author__ = "swsend" | |
| import json | |
| import hashlib | |
| import datetime | |
| from flask import Flask, request, jsonify, Response, render_template |
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
| package Rectangle; | |
| class myRectangle { | |
| double width = 1.0; | |
| double height = 1.0; | |
| myRectangle() { | |
| } | |
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 java.util.*; | |
| // 给一个N的正帧数 返回不大于Log2N的最大整数 | |
| public class Log { | |
| public static int lg(int N) { | |
| double log2n = N / 2; // base is 2 | |
| int result = 1; | |
| while ( result < log2n) { |
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
| package net; | |
| import java.io.BufferedReader; | |
| import java.io.BufferedWriter; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.io.OutputStreamWriter; | |
| import java.net.*; | |
| public class Server { |
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
| package main | |
| import ( | |
| "os/exec"; | |
| "fmt"; | |
| "bytes"; | |
| ) |
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
| // 来自 http://xinqiu.me/2017/05/09/a-byte-of-go/ 的练习代码 | |
| package main | |
| import "fmt" | |
| func main() { | |
| s := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} | |
| a := s[3:6] | |
| b := a[1:2] |
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
| package main; | |
| import java.util.Arrays; | |
| public class heapSort { | |
| private int[] arr; | |
| public HeapSort(int[] arr){ | |
| this.arr = arr; |