iT邦幫忙

python3相關文章
共有 817 則文章

技術 [LeetCode] 274. H-Index

MediumRelated Topics: Array / Sorting / Counting SortLeetCode Source 解題想法 這題我卡...

技術 [LeetCode] 189. Rotate Array

MediumRelated Topics: Array / Math / Two PointersLeetCode Source 解題想法 這裡初始化 l...

鐵人賽 Software Development DAY 25

技術 Extended Unpacking

接續昨天 unpacking 的學習,今天我們來練習更進階的 unpacking。 假設我們現在分別要得到一個陣列的首位元素和剩餘元素,可能會這樣寫: l =...

鐵人賽 Software Development DAY 17

技術 Decimals: Performance 問題

Memory Footprint Decimals 比 floats 要佔用更多記憶體: import sys from decimal import Deci...

鐵人賽 Software Development DAY 24

技術 Unpacking Iterables

今天我們來研究 unpacking。 在這之前,複習一下 tuple Side Note on Tuples 能產生 tuple 的並不是括號,而是逗號: a...

鐵人賽 Software Development DAY 18

技術 Booleans——Int 的 subclass

今天我們來研究 Booleans(布林值)。 Python 內建有 bool class 表達布林值,這個 class 是從 int class 繼承而來: i...

鐵人賽 Software Development DAY 30

技術 unpacking 應用:A Simple Function Timer

今天我們來運用前幾天所學,寫一個計算函式執行時間的函式。 我們希望這個函式可以計算各種奇形怪狀的函式,當然也要能吃下各種引數。 我們的函式 time_it 會有...

鐵人賽 Software Development DAY 1
玩轉 Python 與 MongoDB 系列 第 1

技術 玩轉 Python 與 MongoDB_Day01_內容簡介

每天的專案會同步到 github 上,可以前往 這個網址如果對於專案有興趣或是想討論一些問題,歡迎留言 OR 來信討論,信箱為:nickchen1998@gma...

鐵人賽 Software Development DAY 13
玩轉 Python 與 MongoDB 系列 第 13

技術 玩轉 Python 與 MongoDB_Day13_正規表達式

今天我們要來介紹一下正規表達式該怎麼與 MongoDB 來做查詢,同時也會針對正規表達式做一些簡單的介紹以及範例 一、正規表達式介紹 正則表達式(Regular...

鐵人賽 自我挑戰組 DAY 27

技術 [Day27] Codewars >>> First non-repeating character (Python)

題目(5kyu): Write a function named first_non_repeating_letter that takes a string...

技術 【開心碼農養成記】Python初新者練習手札-串列、元組和字典練習題小搞搞

前情提要: 颱風都轉彎不來的時刻,當然是繼續開心碼農學習日常了! 這次還是做基本練習中的串列、元組和字典方面的練習,但課本有給學習評量的題目,但是卻沒給解答啊...

技術 python的基本語法-1

流程控制 if...else 我自己是把它當成一種選擇的概念 其實在生活中這個概念是很常見的,經常都會遇到,把這個概念套進程式中就不會嚇到吃手手。 如果你現在口...

鐵人賽 自我挑戰組 DAY 9

技術 [Day9] Codewars >>> Playing with digits (Python)

題目(6kyu): DESCRIPTION:Some numbers have funny properties. For example: 89 --&gt...

鐵人賽 Modern Web DAY 16

技術 [Day16] 架構優化:非同步存取 DB (2)

[Day16] 架構優化:非同步存取 DB (2) 本次的程式碼與目錄結構可以參考 FastAPI Tutorial : Day16 branch 回顧...

鐵人賽 自我挑戰組 DAY 24

技術 [Day24] Codewars >>> Split Strings (Python)

題目(6kyu): Complete the solution so that it splits the string into pairs of two...

鐵人賽 Software Development DAY 4
玩轉 Python 與 MongoDB 系列 第 4

技術 玩轉 Python 與 MongoDB_Day04_資料插入

今天我們會介紹該如何在 mongodb 當中進行資料的寫入,總共會分為三大項,分別為插入單筆資料、插入多筆資料以及 WriteConcern 注意:在 Mong...

鐵人賽 AI & Data DAY 26

技術 『Day26』加入警報讓 Airflow 主動通知

上一篇跟大家分享了 Airflow 功能強大的各種 View。而這篇要來跟大家分享警報的實作方法。不同於 View 是開發者以及維運人員需要主動進行查看,警報則...

鐵人賽 Modern Web DAY 21

技術 [Day21] Pytest 入門與安裝

[Day21] 測試: Pytest 安裝與入門 本次的程式碼與目錄結構可以參考 FastAPI Tutorial : Day21 branch 前言 我...

鐵人賽 Modern Web DAY 24

技術 Day 24:Strawberry Django 權限

Django 內建一套權限系統,主要提供 Django 應用程式的模型新增、修改、刪除、瀏覽權限管理,除此之外還有系統管理員、管理員與認證檢查,當然 Djang...

鐵人賽 Software Development DAY 10
玩轉 Python 與 MongoDB 系列 第 10

技術 玩轉 Python 與 MongoDB_Day10_基本條件查詢邏輯

今天我們要來教學基本的 Mongo 邏輯語法,同樣會用到之前插入的資料集以及資料模型,忘記模型的人可以參考這個連結 今天主要會教學的內容如下: $and 查詢...

鐵人賽 自我挑戰組 DAY 13

技術 [Day13] Codewars >>> Scramblies (Python)

題目(5kyu): Complete the function scramble(str1, str2) that returns true if a por...

鐵人賽 自我挑戰組 DAY 10

技術 [Day10] Codewars >>> Maximum subarray sum (Python)

題目(5kyu): The maximum sum subarray problem consists in finding the maximum sum...

鐵人賽 Software Development DAY 12

技術 Python 與浮點數(float):簡化浮點數

浮點數到整數 今天繼續學習浮點數,我們常用的便是把浮點數轉換成點數,這種「轉換」總是會遺失一些資訊,因為小數點後面的位數不見了。 Python 有以下四種浮點數...

鐵人賽 Software Development DAY 5
玩轉 Python 與 MongoDB 系列 第 5

技術 玩轉 Python 與 MongoDB_Day05_GridFS 大型資料 & 檔案插入

在 MongoDB 當中,有著每個 Document 的大小最大為 16 MB 的限制,如果今天你想插入的資料超過 16 MB,MonGODB 提供了 Grid...

鐵人賽 AI & Data DAY 15

技術 [Day15] Polynomial Regression(2)

Example 左邊是我們今天要處理的資料範例今天的故事是A公司HR想要知道某位面試者說他在前公司的薪資是160000的真實性有多高於是他想利用machine...

鐵人賽 自我挑戰組 DAY 2

技術 [Day2] Codewars >>> Multiples of 3 or 5 (Python)

題目(6kyu): If we list all the natural numbers below 10 that are multiples of 3 o...

技術 [LeetCode] 169. Majority Element

EasyRelated Topics: Array / Hash Table / Divide and Conquer / Sorting / Countin...

技術 [LeetCode] 26. Remove Duplicates from Sorted Array

EasyRelated Topics: Array / Two PointersLeetCode Source 解題想法 這題有 Hint 我有看一下 XD...

鐵人賽 Software Development DAY 3
玩轉 Python 與 MongoDB 系列 第 3

技術 玩轉 Python 與 MongoDB_Day03_資料表架構簡介

今天我們會介紹在資料在 MongoDB 裡面的架構會以怎麼樣的方式進行儲存,並且會和 SQL 的觀念做比對,同時也會介紹 Mongo Compass 這個工具...

鐵人賽 Software Development DAY 12
玩轉 Python 與 MongoDB 系列 第 12

技術 玩轉 Python 與 MongoDB_Day12_進階查詢邏輯

前天我們解釋了一些常用的邏輯閘,例如:and、or 等等,我們也學到了可以把多個條件同時放進這些邏輯閘中的 list,然而當今天你只想針對同個欄位做多個數值的判...