$ sudo apt upgrade
$ sudo apt install libssl-dev libcurl4-openssl-dev
$ git clone -b linux https://github.com/tpruvot/ccminer
$ cd ccminer
$ ./build.sh
import os | |
import sys | |
import argparse | |
from fasthtml.components import html2ft | |
def main(): | |
# Set up the argument parser | |
parser = argparse.ArgumentParser(description='Process an HTML file and output a Python file.') | |
parser.add_argument('filename', help='The name of the HTML file (without extension) located in the src folder.') | |
parser.add_argument('--output-dir', default='.', help='Optional output directory for the .py file (default is root).') |
# Upsert function for pandas to_sql with postgres | |
# https://stackoverflow.com/questions/1109061/insert-on-duplicate-update-in-postgresql/8702291#8702291 | |
# https://www.postgresql.org/docs/devel/sql-insert.html#SQL-ON-CONFLICT | |
import pandas as pd | |
import sqlalchemy | |
import uuid | |
import os | |
def upsert_df(df: pd.DataFrame, table_name: str, engine: sqlalchemy.engine.Engine): |
# DO NOT PUT THE WIFI DONGLE IN THE DEVICE BEFORE MENTIONED EXPLICITLY BELOW | |
# Brief note, after this the UI will not show the usb dongle, | |
# the wifi does work and I get an IP address, so all works, | |
# but I don't go into detail of making it show on the Raspbian UI. | |
# (for this purpose I don't care about the UI) | |
# For the use of this I connected my device to an ethernet connection and through the Router could see the IP which I can SSH into. | |
## STEP 1: Prepare machine and install packages needed |
I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.
Let's say you want to upload yourfile.txt
to a GCS bucket from your virtual machine.
You can use the gsutil
command line tool that comes installed on all GCE instances.
If you've never used the gcloud
or gsutil
command line tools on this machine before, you will need to initialize them with a service account.
# thai_strftime() | |
# Thai date and time string formatter | |
# Formatting directives similar to datetime.strftime() | |
# | |
# จัดรูปแบบข้อความวันที่และเวลา แบบเดียวกับ datetime.strftime() | |
# โดยจะใช้ชื่อเดือนเป็นภาษาไทย และปีเป็นพุทธศักราช | |
# (ไม่รองรับปีก่อน พ.ศ. 2484 - ก่อนการเปลี่ยนวันปีใหม่ไทย) | |
# | |
# No Rights Reserved | |
# PUBLIC DOMAIN or CC0 1.0 Universal |
# Clone the repo | |
git clone [email protected]:dogecoin/dogecoin.git | |
# Pick the correct branch/version | |
cd dogecoin | |
git checkout 1.14-branding | |
# Install dependencies | |
sudo apt install build-essential libtool autotools-dev autoconf pkg-config libssl-dev |
Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.
The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.
On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:
####### 1. A low-resolution photo of road signs
GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
Hint: I also mad an octave docset for Dash: https://github.com/obstschale/octave-docset