12
2023
04

Stable diffusion

%cd /content%env TF_CPP_MIN_LOG_LEVEL=1!apt -y update -qq!wget http://launchpadlibrarian.net/367274644/libgoogle-perftools-dev_2.5-2.2ubuntu3_amd64.deb!wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-
17
2023
03

unlock and concat PDF

Merging PDF#!pip install PyPDF2import timeimport osfrom google.colab import drivefrom google.colab import filesfrom google.colab import authdrive.mount('/content/drive', fo
02
2023
02

Testing Standard (New Format) in google sheet 12/2/2023 Update add filter material function

//GSfunction enterTestingStandard() {   var htmlInformation = HtmlService.createHtmlOutputFromFile('testStandard')  .setTitle('Enter Testing Standard')  Spreadsheet

23
2023
01

Replace @1 @2 to Style Name in breakdown list

function replaceStyleNumberToName() {  var ui = SpreadsheetApp.getUi();  var response = ui.alert(`ColumnA data is original string/ number value (原來的文字/數字)&
23
2023
01

使用 Google Apps Script doGet(e) and doPost(e) 建立小型資料庫 (12/2/2023 update)

function doGet(e) {  const lock = LockService.getScriptLock();  try {    lock.waitLock(10000);  } catch(err) {      Utilities.slee

23
2023
01

解決colab執行seleniuma時報錯 Message: Service chromedriver unexpectedly exited. Status code was: 1 的問題

這是因為 colab 系統最近從 v18.04 更新到 ubuntu v20.04 LTS 時引起的問題。主要原因是,對於 Ubuntu v20.04 LTS,google-colaboratory 不再在 snap 包之外分發 chromium-browser。解決方法: 加入以下代碼  參考-->https://colab.research.google.com/drive/1cbEvuZOhkouYLda3RqiwtbM-o9hxGLyC%%shell# Ubun
05
2023
01

df

#import Module, connect to google driveimport osimport pandas as pdimport reimport jsonfrom google.colab import drivefrom functools import reducedrive.mount('/co
28
2022
12

Testing Multithread insert data to mysql

#Import Module, connect to google drivetry:  import pymysqlexcept:  !pip install pymysql  import pymysqlimport re import pandas as pdimport threa
21
2022
12

Data base

import retry:  import pymysqlexcept:  !pip install pymysql  import pymysqldef create_mysql_primary_key_table(table, columns):    db = pymysql.connect(host=
02
2022
12

MySQL 管理人員系統 基本版

# coding=utf-8try:  import pymysqlexcept:  !pip install pymysql   import pymysqlconnection = pymysql.connect(host='remotemysql.com',user='PiFyrdk8HO',password='vZeZCaMkXu',database='PiFyrdk8HO',char