This file contains 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
┌────────┐ | |
│ top │ | |
└────────┘ | |
This file contains 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 | |
# coding=utf-8 | |
''' | |
This is not a difficult problem to solve, but the highlight of this problem-solving process is that | |
first I analyzed the vague problem very carefully and considered many edge cases, and | |
I solved it in 3 different ways from a naive way to a high-performance DP way and | |
I tested it with extensive test cases far beyond the scale of the problem asked to solve and | |
I gave the time and space complexity. |
This file contains 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
--- | |
layout: null | |
sitemap: | |
exclude: 'yes' | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
{% for post in site.posts %} | |
{% unless post.published == false %} | |
<url> |
This file contains 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
function [J grad] = nnCostFunction(nn_params, ... | |
input_layer_size, ... | |
hidden_layer_size, ... | |
num_labels, ... | |
X, y, lambda) | |
%NNCOSTFUNCTION Implements the neural network cost function for a two layer | |
%neural network which performs classification | |
% [J grad] = NNCOSTFUNCTON(nn_params, hidden_layer_size, num_labels, ... | |
% X, y, lambda) computes the cost and gradient of the neural network. The | |
% parameters for the neural network are "unrolled" into the vector |
This file contains 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 | |
from gevent import monkey | |
monkey.patch_all() | |
import sys | |
import redis | |
import urllib2 | |
import traceback | |
from cgi import escape | |
# -- gsdproxy |
This file contains 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
collective_code_location_message = '\n' | |
def print_dict(dict, verbose=True): | |
#callerframerecord = inspect.stack()[1] # 0 represents this line | |
# # 1 represents line at caller | |
#frame = callerframerecord[0] | |
#info = inspect.getframeinfo(frame) | |
#if info.function == 'print_sql_result': | |
# code_probe('',2) | |
#else: | |
# code_probe('', 1) |