原创 LeetCode.1.Two Sum

原題鏈接:Two Sum 題目內容:Given an array of integers, return indices of the two numbers such that they add up to a specific

原创 LeetCode.412.Fizz Buzz

原題鏈接:Fizz Buzz 題目內容:Write a program that outputs the string representation of numbers from 1 to n. But for multiple

原创 LeetCode.326.Power of Three

原題鏈接:Power of Three 題目內容: Given an integer, write a function to determine if it is a power of three. Follow up:

原创 python基礎學習

出處 # _*_ coding: utf-8 _*_ """類型和運算----類型和運算----類型和運算----類型和運算----類型和運算----類型和運算----類型和運算----類型和運算----類型和運算----類型和

原创 LeetCode.283.Move Zeroes

原題鏈接:Move Zeroes 題目內容:Given an array nums, write a function to move all 0’s to the end of it while maintaining the

原创 LeetCode.66.Plus One

原題鏈接:Plus One 題目內容:Given a non-negative integer represented as a non-empty array of digits, plus one to the integer

原创 LeetCode.387.First Unique Character in a String

原題鏈接:First Unique Character in a String 題目內容: Given a string, find the first non-repeating character in it and re

原创 LeetCode.344.Reverse String

原題鏈接:Reverse String 題目內容: Write a function that takes a string as input and returns the string reversed. Example:

原创 LeetCode.36.Valid Sudoku

原題鏈接:Valid Sudoku 題目內容:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board c

原创 nginx CORS 配置

nginx 跨域請求 # # Wide-open CORS config for nginx # location / { if ($request_method = ‘OPTIONS’) { add_header ‘Acce

原创 LeetCode.204.Count Primes

原題鏈接:Count Primes 題目內容: Description: Count the number of prime numbers less than a non-negative number, n. Credits

原创 常用正則表達式總結

1. 特殊要求正則 ip地址 \(\(\d\{1,2}\|1\d\{2}\|2[0-4]\d\|25[0-5]\)\.\)\{3}\(\d\{1,2}\|1\d\{2}\|2[0-4]\d\|25[0-5]\) 日期格式

原创 LeetCode.242.Valid Anagram

原題鏈接:Valid Anagram 題目內容: Given two strings s and t, write a function to determine if t is an anagram of s. For ex

原创 Solution for hanging workers (Celery)

Celery文檔 兩種解決方式: 如果確認是應爲當前worker的併發是prefork(多進程),並且可能是由於死鎖原因造成! 那麼可以使用 CELERYD_FORCE = True ,這樣可以有效防止死鎖。即使不是這個原因造

原创 Crontab 命令/新建任務/更新任務/日誌

1. 簡介 通過crontab 命令,我們可以在固定的間隔時間執行指定的系統指令或 shell script腳本。時間間隔的單位可以是分鐘、小時、日、月、周及以上的任意組合。這個命令非常適合週期性的日誌分析或數據備份等工作。 2