Giter Club home page Giter Club logo

mr-weasel's Introduction

mr-weasel

sqlx cheatsheet

db = sqlx.Open("sqlite3", ":memory:")
err = db.Ping()

// Open and Ping shortcut
db, err = sqlx.Connect("sqlite3", ":memory:")
db = sqlx.MustConnect("sqlite3", ":memory:")

res, err := Exec("INSERT INTO place (country, telcode) VALUES (?, ?)", "Singapore", 65) 
res := MustExec("INSERT INTO place (country, telcode) VALUES (?, ?)", "Singapore", 65)

rows, err := Query("SELECT country, city, telcode FROM place") 
for rows.Next() { err = rows.Scan(&country, &city, &telcode) }
err = rows.Err()

rows, err := Queryx("SELECT country, city, telcode FROM place") 
for rows.Next() { err = rows.Scan(&p) }
err = rows.Err()

err := db.QueryRow("SELECT * FROM place WHERE telcode=?", 50).Scan(&telcode)
err := db.QueryRowx("SELECT city, telcode FROM place LIMIT 1").StructScan(&p)

err = db.Get(&p, "SELECT * FROM place LIMIT 1")
err = db.Select(&pp, "SELECT * FROM place WHERE telcode > ?", 50)

tx, err := db.Begin()
err = tx.Exec(...)
err = tx.Commit()

stmt, err := db.Prepare(`SELECT * FROM place WHERE telcode=?`)

python

apt-get install wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev -y
wget -c https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tar.xz
tar -Jxvf Python-3.10.13.tar.xz
cd Python-3.10.13
./configure --enable-optimizations
make altinstall

audio-separator

python3.10 -m venv audio-separator
. ./audio-separator/bin/activate
pip install audio-separator

mr-weasel's People

Contributors

dv1x3r avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.