-
Able to spot programming mistakes merely by reading code
-
Stop the try-and-error approach in programming (it works ≠ it is correct)
-
Improve instincts to what is the root cause of bugs
-
Speed up time for code review
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
import * as http2 from "node:http2"; | |
import * as os from "node:os"; | |
const CF_API = "https://api.cloudflare.com/client/v4"; | |
const headers = { | |
"X-Auth-Email": "[email protected]", | |
"X-Auth-Key": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", | |
"Content-Type": "application/json", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "dotenv/config.js"; | |
import child_process from "child_process"; | |
import cluster from "cluster"; | |
import fs from "fs-extra"; | |
import Knex from "knex"; | |
const { ANIME_PATH, DB_NAME, DB_USER, DB_PASS, DB_HOST } = process.env; | |
const knex = Knex({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TELEGRAM_TOKEN= # e.g. 111111111:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
TELEGRAM_WEBHOOK= # e.g. https://your.host.com/ | |
PORT= # (optional) Default: 3000 | |
NOVELAI_TOKEN= # e.g. "Bearer eyJhbxxxxxxxxxxxxxXVCJ9.eyJpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxbi9I" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName System.Drawing | |
$timer = New-Object timers.timer | |
$timer.Interval = 15000 | |
$timer.Enabled = $true | |
$timer.start() | |
Register-ObjectEvent -InputObject $timer -EventName Elapsed -SourceIdentifier PrintScreen -Action { | |
$folderName = Get-Date -Format "yyyy-MM-dd" | |
$fileName = "$(Get-Date -Format "yyyy-MM-dd HH mm ss").jpg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This file is part of the LIRE project: http://www.semanticmetadata.net/lire | |
* LIRE is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* LIRE is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
:D
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import sys | |
import os.path | |
import numpy as np | |
def drawMatches(img1, kp1, img2, kp2, matches): | |
rows1 = img1.shape[0] | |
cols1 = img1.shape[1] | |
rows2 = img2.shape[0] |
:o
NewerOlder