- install pdf2image
- install poppler
choco install poppler
Convert PDF to Image using Python - GeeksforGeeks
# -*- coding: utf-8 -*-
from pdf2image import convert_from_path| #include <cstddef> | |
| #include <iostream> | |
| using namespace std; | |
| struct ListNode { | |
| int val; | |
| ListNode *next; | |
| ListNode() : val(0), next(nullptr) {} | |
| ListNode(int x) : val(x), next(nullptr) {} |
| def quick_sort_iterative(arr): | |
| stack = [(0, len(arr) - 1)] # 定义一个栈,用于存储待排序的区间 | |
| while stack: | |
| start, end = stack.pop() # 从栈中弹出一个区间 | |
| if start >= end: | |
| continue | |
| pivot = arr[end] # 选择最后一个元素作为枢轴 | |
| partition_index = start # 分区的索引 |
| def merge_sort(arr): | |
| if len(arr) > 1: | |
| mid = len(arr) // 2 # Finding the mid of the array | |
| L = arr[:mid] # Dividing the elements into 2 halves | |
| R = arr[mid:] | |
| merge_sort(L) # Sorting the first half | |
| merge_sort(R) # Sorting the second half |
| class Solution: | |
| def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: | |
| l1 = len(nums1) | |
| l2 = len(nums2) | |
| total_len = 0 | |
| index1 = 0 | |
| index2 = 0 | |
| last1 = 0 | |
| last2 = 0 | |
| while True: |
| kwriteconfig6 --file kioslaverc --group 'Proxy Settings' --key ProxyType "1" | |
| kwriteconfig6 --file kioslaverc --group 'Proxy Settings' --key 'httpProxy' 'http://127.0.0.1:10081' | |
| kwriteconfig6 --file kioslaverc --group 'Proxy Settings' --key 'httpsProxy' 'http://127.0.0.1:10081' | |
| kwriteconfig6 --file kioslaverc --group 'Proxy Settings' --key 'ftpProxy' 'http://127.0.0.1:10081' | |
| kwriteconfig6 --file kioslaverc --group 'Proxy Settings' --key Authmode 0 | |
| # When you modify kioslaverc, you need to tell KIO. | |
| dbus-send --type=signal /KIO/Scheduler org.kde.KIO.Scheduler.reparseSlaveConfiguration string:'' |
choco install popplerConvert PDF to Image using Python - GeeksforGeeks
# -*- coding: utf-8 -*-
from pdf2image import convert_from_path| id | aliases | tags |
|---|---|---|
SqlitePythonCountChrome |
# -*- coding: utf-8 -*-
import datetime
import sqlite3 | import requests | |
| import datetime | |
| import threading | |
| access_token = "xxxx" | |
| def check_latest_commit_date(item_list): | |
| # 获取当前日期 | |
| current_date = datetime.datetime.now(datetime.timezone.utc) |
| #!/bin/bash | |
| # 检查是否提供了文件名 | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: $0 <filename>" | |
| exit 1 | |
| fi | |
| filename=$1 |
| import whisper | |
| model = whisper.load_model('small', 'cpu') | |
| # model = whisper.load_model("base") | |
| result = model.transcribe("output.wav") | |
| print(result["text"]) |