yarn add swagger-autogen
yarn add swagger-ui-express
Discover gists
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
-- black frames not included | |
local RunService = game:GetService("RunService") | |
local Workspace = game:GetService("Workspace") | |
local Camera = Workspace.CurrentCamera | |
local Module = {} | |
Module.Position = UDim2.new(0, 0, 0, 0) |
- ⎋ (escape):
U+238B
- ⇥ (tab):
U+21E5
- ⇪ (caps lock):
U+21EA
- ⇧ (shift):
U+21E7
- ⌃ (control):
U+2303
- ⌥ (option):
U+2325
- (Apple):
U+F8FF
(in some Apple-provided fonts only) - ⌘ (command):
U+2318
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 { LiquidityPoolKeysV4, MARKET_STATE_LAYOUT_V3, Market, TOKEN_PROGRAM_ID } from "@raydium-io/raydium-sdk"; | |
import { Connection, Logs, ParsedInnerInstruction, ParsedInstruction, ParsedTransactionWithMeta, PartiallyDecodedInstruction, PublicKey } from "@solana/web3.js"; | |
const RPC_ENDPOINT = 'https://api.mainnet-beta.solana.com'; | |
const RAYDIUM_POOL_V4_PROGRAM_ID = '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8'; | |
const SERUM_OPENBOOK_PROGRAM_ID = 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX'; | |
const SOL_MINT = 'So11111111111111111111111111111111111111112'; | |
const SOL_DECIMALS = 9; | |
const connection = new Connection(RPC_ENDPOINT); |
To install the maui
workload, you have two options:
dotnet workload install
commands- Visual Studio on Windows can install
.msi
files for each workload pack. Note that the concept of a "Visual Studio workload" is different than a ".NET workload".
VS for Mac's installer and updater use dotnet workload install
commands. It's considerably simpler to get a Mac machine to a clean state.
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
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone git@bitbucket.org:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync git@github.com:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
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
var _instance_num := -1 | |
var _instance_socket: TCPServer | |
func _init() -> void: | |
if OS.is_debug_build(): | |
_instance_socket = TCPServer.new() | |
for n in range(0,4): | |
if _instance_socket.listen(5000 + n) == OK: | |
_instance_num = n | |
break |
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 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 vertexai | |
from vertexai.generative_models import GenerativeModel, ChatSession | |
vertexai.init(project=project, location=location) | |
model = GenerativeModel("gemini-1.5-pro-preview-0409") | |
chat = model.start_chat() | |
def get_chat_response(chat: ChatSession, prompt: str) -> str: | |
text_response = [] | |
responses = chat.send_message(prompt, stream=True) |
NewerOlder