| # Migration script from Pelican to Hugo | |
| import os, re, shutil | |
| from pathlib import Path | |
| INPUT_FOLDER = "content" | |
| OUTPUT_FOLDER = "content-hugo" | |
| # Custom sort key function | |
| def sort_key(path): | |
| # Extract the base filename without the extension |
| package do | |
| type Void struct{} | |
| type Result[T any] interface { | |
| Unwrap() (T, error) | |
| } | |
| type defaultResult[T any] struct { | |
| val T |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| ) | |
| func main() { | |
| var ( |
| import logging | |
| from fastapi import FastAPI | |
| from uicheckapp.services import EchoService | |
| logging.config.fileConfig('logging.conf', disable_existing_loggers=False) | |
| logger = logging.getLogger(__name__) | |
| app = FastAPI() |
| import cv2 | |
| from cv2 import dnn_superres | |
| # Create an SR object | |
| sr = dnn_superres.DnnSuperResImpl_create() | |
| # Read image | |
| image = cv2.imread('./input.png') | |
| # Read the desired model |
I keep fixing this up, but if it fails for you, check if these are better maintained https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.
Cloning the repo using one of the below techniques should work correctly but you may still be getting an unrecognized import error.
As it stands for Go v1.13, I found in the doc that we should use the GOPRIVATE variable like so:
GOPRIVATE=github.com/ORGANISATION_OR_USER_NAME go get -u -f github.com/ORGANISATION_OR_USER_NAME/REPO_NAME
The 'go env -w' command (see 'go help env') can be used to set these variables for future go command invocations.
| package main | |
| import ( | |
| "fmt" | |
| "github.com/jinzhu/gorm" | |
| _ "github.com/jinzhu/gorm/dialects/postgres" | |
| ) | |
| // Customer ... | |
| type Customer struct { |
This document will walk you through how to create or configure a Salesforce application for use with JWT authentication. These configuration steps and the example code works as of Salesforce API version 42.0.
Create an RSA x509 private key/certification pair
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html