原创 leetcode 313. Super Ugly Number

class Solution(object): def nthSuperUglyNumber(self, n, primes): """ :type n: int :type

原创 [keras實戰] 小型CNN實現Cifar-10數據集84%準確率

實驗環境 代碼基於python2.7, Keras1(部分接口在Keras2中已經被修改,如果你使用的是Keras2請查閱文檔修改接口) 個人使用的是蟲數據提供的免費GPU主機,GTX1080顯卡,因爲是免費賬號,所以顯存最高只

原创 leetcode 318. Maximum Product of Word Lengths

class Solution(object): def maxProduct(self, words): """ :type words: List[str] :rtype:

原创 leetcode 304. Range Sum Query 2D - Immutable

class NumMatrix(object): def __init__(self, matrix): """ :type matrix: List[List[int]]

原创 [TensorFlow實戰] 簡單CNN

代碼 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data dataset_default_path = r'C:\

原创 [TensorFlow實戰] 多層感知機

代碼 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data dataset_default_path = r'C:\

原创 leetcode 299. Bulls and Cows

from collections import Counter class Solution(object): def getHint(self, secret, guess): """ :

原创 leetcode 284. Peeking Iterator

class PeekingIterator(object): def __init__(self, iterator): """ Initialize your data structure her

原创 leetcode 289. Game of Life

class Solution(object): def gameOfLife(self, board): """ :type board: List[List[int]] :

原创 [解決方案]修改Github歷史提交記錄中的username和email信息

需求 在不同的機器、電腦上完成開發,提交代碼到github上後,發現自己忘記修改git config中的username和email,導致在github歷史commit記錄中出現了不一致的提交用戶id,需要進行訂正。 解決方案 clone

原创 CentOS7 上Vim8升級安裝指南

起因 目前很多系統上安裝的Vim爲7.4版本,如今Vim已經更新到8.1,多了很多特性,本文就介紹一下怎麼在CentOS7上安裝升級Vim8。 基本步驟 1、 到Vim官方Github倉庫下載目前最新的Vim Release版本 wg

原创 leetcode 347. Top K Frequent Elements

class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { unordered_map<int,int>

原创 leetcode 343. Integer Break

//https://discuss.leetcode.com/topic/42991/o-log-n-time-solution-with-explanation class Solution { public: int in

原创 leetcode 341. Flatten Nested List Iterator

/** * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate

原创 [Keras實戰] 構建DenseNet實現Cifar10數據集90%+準確率

構建DenseNet實現Cifar10數據集90%+準確率 Cifar-10數據集 本文使用的數據集基於Cifar-10,關於這個數據集本身的來歷和細節網上有太多的文章了,這裏不做多餘的介紹了,基本上下面的這樣張圖就可以概括了: 實驗