This file contains hidden or 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
CREATE OR REPLACE FUNCTION generate_cuid2(target_length INT DEFAULT 24) | |
RETURNS TEXT AS $$ | |
DECLARE | |
timestamp_part TEXT; -- Encoded timestamp in base36 | |
random_part TEXT; -- Random string for uniqueness | |
random_length INT; -- Length of the random part | |
characters TEXT := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; -- Alphanumeric characters | |
result TEXT; -- Final result to return | |
BEGIN | |
-- Validate input length |
This file contains hidden or 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
#!/bin/zsh | |
# This script is used to switch between different git profiles | |
# Read the profile name from the command line argument | |
profile_name=$1 | |
if [ "$profile_name" = "-h" ] || [ "$profile_name" = "--help" ]; then | |
echo "Usage: gitprofile <profile_name> [-c|--config <config_file>]" | |
echo "Switch between different git profiles" |
This file contains hidden or 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
#Please run this inside the Jupyter notebook, It'll be quite straight forward. | |
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, transpile | |
from qiskit_aer import AerSimulator | |
from math import pi | |
from matplotlib import pyplot as plt | |
%matplotlib inline | |
def create_input_state(qc, reg, n, pie): |
This file contains hidden or 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
Show hidden characters
{ | |
"name": "Multiple PNPM projects", | |
// recommend using microsoft default image | |
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", | |
// !!!! MAGIC STARTS HERE!!! | |
"mounts": [ | |
"source=global-pnpm-store,target=${containerWorkspaceFolder}/.pnpm-store,type=volume" |