原创 簡單的Http共享文件SimpleHTTPServer

剛剛學會了如何使用Python下的SimpleHTTPServer共享文件。 一句話共享: 命令行下輸入下面的語句,即可將當前目錄下的文件共享出去。 python -m SimpleHTTPServer 80Python下內置了一個H

原创 LeetCode----Lowest Common Ancestor of a Binary Search Tree

Lowest Common Ancestor of a Binary Search Tree Given a binary search tree (BST), find the lowest common ancestor (LCA

原创 Python DataFarme 存取數據庫方式及其性能

前言 在實際開發過程中發現Python Pandas.DataFrame 包含直接讀取MySQL表及存儲MySQL表的函數,於是測試了不同方式讀數據、寫MySQL表數據的代碼簡易性及性能的研究。 1. 讀數據 1.1 原有讀數據方

原创 Apache24配置https

這裏寫自定義目錄標題前言申請https證書配置https放證書文件1. 配置httpd.conf1.1 將配置文件中下面兩行取消註釋,開啓ssl。1.2 將配置文件中下面一行取消註釋,注意 httpd-ahssl.conf 不要取

原创 Django入門筆記

看的Django 1.8.2 中文文檔,地址:http://python.usyiyi.cn/django_182/intro/tutorial01.html ,想學習的直接看這個文檔吧。這篇文章全是摘的中文文檔的內容的。 1.

原创 LeetCode----Lowest Common Ancestor of a Binary Tree

Lowest Common Ancestor of a Binary Tree Given a binary tree, find the lowest common ancestor (LCA) of two given nodes

原创 LeetCode----Isomorphic Strings

Isomorphic Strings Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the ch

原创 LeetCode----Product of Array Except Self

Product of Array Except Self Given an array of n integers where n > 1, nums, return an array output such that output

原创 簡單的FTP共享文件pyftpdlib

共享文件夾或者文件除了上一篇文章中所說的Http方式,還有FTP方式,即搭建一個FTP服務器,共享文件夾,讓別人訪問。 安裝pyftpdlib: Python並沒有內置一個FTP服務器,所以需要第三方模塊的支持。可以使用pyftpdli

原创 LeetCode----Remove Nth Node From End of List

Remove Nth Node From End of List Given a linked list, remove the nth node from the end of list and return its head.

原创 numpy的argsort和sum和tile函數

在使用這幾個函數時遇到一些問題記錄一下,個人理解,不一定正確。 問題1: argsort的函數返回值是什麼? 比如有語句: In [40]: distances Out[40]: array([ 1.48660687,  1.41

原创 LeetCode----Maximum Product Subarray

Maximum Product Subarray Find the contiguous subarray within an array (containing at least one number) which has the

原创 Python&按鍵精靈自動化

最近在項目中需要進行軟件的自動化操作。 本博文以兩種方式介紹如何自動化打開軟件(Windows下),對其進行最大化最小化關閉等操作。 Python操作: 第一次接觸自動化。相對比較熟悉Python自然是希望通過Python來操作軟件。一

原创 LeetCode----Insertion Sort List

Insertion Sort List Sort a linked list using insertion sort. 原題鏈接爲: https://leetcode.com/problems/insertion-sort-list 分

原创 LeetCode[BFS]----Word Ladder

Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation seque