iT邦幫忙

python3相關文章
共有 953 則文章

技術 leetcode with python:35. Search Insert Position

題目: Given a sorted array of distinct integers and a target value, return the in...

技術 leetcode with python:28. Implement strStr()

題目: Given two strings needle and haystack, return the index of the first occurr...

技術 leetcode with python:27. Remove Element

題目: Given an integer array nums and an integer val, remove all occurrences of v...

技術 leetcode with python:2. Add Two Numbers

由於前面幾題easy覺得難度還可以負荷,因此開始嘗試medium的題目 題目: You are given two non-empty linked list...

技術 leetcode with python:26. Remove Duplicates from Sorted Array

題目: Given an integer array nums sorted in non-decreasing order, remove the dupl...

技術 leetcode with python:21. Merge Two Sorted Lists

題目: You are given the heads of two sorted linked lists list1 and list2. Merge...

技術 leetcode with python:20. Valid Parentheses

題目: Given a string s containing just the characters '(', ')', '{', '}', '[' and...

技術 leetcode with python:14. Longest Common Prefix

題目: Write a function to find the longest common prefix string amongst an array...

技術 leetcode with python:13. Roman to Integer

題目: Roman numerals are represented by seven different symbols: I, V, X, L, C, D...

技術 leetcode with python:9. Palindrome Number

題目: Given an integer x, return true if x is palindrome integer.An integer is a...

技術 leetcode with python:1. Two Sum

從今天起在此紀錄用python寫leetcode的心路歷程希望能以一天兩三題的速率下去更新讓自己的程式更加精進 題目: Given an array of i...

技術 python入門學習day 4

主題: 變量類型 & 進位制 在Python語言中,我們可以使用變量來保存數據,變量有不同的類型,變量可以做運算,變量還可進行類型轉換 #使用type檢...

技術 小白簽到: 紀錄python學習day 1

#背景: 有理工宅的身形但目前尚無無程式內涵的python初心者,本科系跟理工完全無關的非理工科系畢業半路出家者,期待跟大家一起成長~#學習時間: 2022/0...

技術 終端執行py.ipynb檔

這裡用來紀錄最近的發現 在終端(window+R -> cmd)執行jupyter notebook的ipynb轉py檔時出現了錯誤 "exec...

技術 MacOS讀取藍牙搖桿訊號,利用python修改pynput程式碼實現 - 3.修改pynput

請參考之前的文章:第二篇 5. 修改pynput if event_type == Quartz.NSSystemDefined: sys_event...

技術 MacOS讀取藍牙搖桿訊號,利用python修改pynput程式碼實現 - 2.研究 pynput

請參考之前的文章:第一篇 4. 研究 pynput 首先,在Visual Studio Code界面中,將滑鼠移動到from pynput.keyboard i...

技術 MacOS讀取藍牙搖桿訊號,利用python修改pynput程式碼實現 - 1.起始

1. 前言: 之前想要實現在幾公尺外遙控 mac book,於是就在蝦皮上找到了這個藍牙搖桿,雖然懷疑產品能不能正常使用,不過看在價格99元的份上,還是買來嘗試...

技術 [Python]決策數01─運用CART做決策樹

Hi! 大家好,我是Eric,這次要來用Python做決策樹。 緣起:決策樹因為相對於其他機器學習模型而言,是較易被解釋的,所以是蠻常見的分類方法。...

技術 [Python]回歸模型01─運用OLS做回歸

Hi! 大家好,我是Eric,這次要來用Python做回歸模型。 緣起:回歸模型是常見的分析方法,可用來分析數值變數之間的關係。 方法:運用 [P...

達標好文 技術 【Python OCR 使用手冊】圖片轉文字 超簡單上手

OCR x Pytesseract 前言 在 Python 中, 使用 OCR (Optical Character Recognition , 字元辨識)將...

技術 [Python]使用Pillow,將圖片由RGB轉灰階(Grayscale)

RGB -> Gray scaleGray scale(灰階影像) from PIL import Image img2 = Image.open('GI...

技術 [Django] 解決 django.db.utils.OperationalError: 3780

因為我的 devel env 跟實際 production env 有太多的不同,所以我實際 deploy 的時候經常會出現一堆奇怪的問題。這邊會嘗試不定期記錄...

技術 用 Python 暢玩 Line bot - 30:Line Notify(三)

在上篇中,我們是需要到 Line Notify 登入後的個人介面發行 token,但總不能叫每一個加入 line bot 的好友都自己去註冊 Line Noti...

技術 用 Python 暢玩 Line bot - 29:Line Notify(二)

到 Line Notify 點進連動好的服務後,可以看到他有產生一個 Client ID 和 Client Secert,這兩個資料是要記錄下來供後續使用的。...

技術 用 Python 暢玩 Line bot - 28:Line Notify(一)

Line bot 如果使用輕用量方案,每個月的免費主動推送次數只會有500則(一封訊息主動推送給 n 個人就算 n 則),但如果想要做的 line bot 會需...

技術 用 Python 暢玩 Line bot - 27:爬蟲(二)

接續前篇,一般爬蟲時抓出的資料量多還沒什麼關係,但這次我們是想要讓使用者在 line 上使用,一次給太多資料總會造成使用者困擾,所以我們需要將抓出來的資料做數量...

技術 用 Python 暢玩 Line bot - 26:爬蟲(一)

這次要嘗試的是將爬蟲與 line bot做結合,那你可以使用 line bot 就能夠查詢到本周上映的新片。 首先要安裝下列套件 pipenv install...

技術 用 Python 暢玩 Line bot - 24:Flask(二)

mongoDB 除了可以讓 line bot 使用之外,flask同樣也可以去透過 pymongo 來取得資料,因此我們可以透過 line bot 將資料存到資...

技術 用 Python 暢玩 Line bot - 23:Flask(一)

如果想要將從 line 上蒐集到的資料或數據呈現在自己的網頁上,我們可以使用 flask 建立好網頁後,去從資料庫或去資訊來呈現,範例如下: # app.py...

技術 用 Python 暢玩 Line bot - 22:使用者資訊

在接收到訊息的時候,我們可以得知該使用者在此 line bot 的 user id,如果想要知道更詳細的資訊的話,可以使用line_bot_api.get_pr...