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
export interface CloudFrontResponseEvent { | |
Records: Array<{ | |
cf: CloudFrontEvent & { | |
readonly request: Pick<CloudFrontRequest, Exclude<keyof CloudFrontRequest, "body">>; | |
response: CloudFrontResponse; | |
}; | |
}>; | |
} |
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
import { map, Dictionary } from 'lodash' | |
import { UseMutationResult, UseQueryResult } from '@tanstack/react-query' | |
import { useCallback } from 'react' | |
type GenericTypes<TContainer> = TContainer[keyof TContainer] | |
export interface SettingsManagerReturn<TValues> { | |
get: <Field extends keyof TValues>(name: Field) => UseQueryResult<TValues[Field]> | undefined | |
set: <Field extends keyof TValues>(name: Field, value: TValues[Field]) => TValues[Field] | |
reconcile: (onValuesLoaded?: (values: TValues) => void) => void |
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
import {TargetedElement} from "./types.ts"; | |
import {FC} from "react"; | |
import {Tree, NodeRendererProps} from "react-arborist"; | |
type setElementsType = (elements: TargetedElement[]) => void; | |
interface ContentTreeProps { | |
elements: TargetedElement[], | |
setElements: setElementsType |
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
""" | |
1. Download & install Python, be sure to click option for it to be added to the system Path | |
2. Save this to Desktop or somewhere/anywhere | |
3. Find the file path to your valheim world db file. | |
4. Put the file path in between the quotes on line 23 / test_file | |
5. Using the command line, run `python printout.py` | |
""" | |
def portals(dbfile): | |
with open(dbfile, 'rb') as db: |
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
//Breach protocol simplifier | |
//Copy to r6/scripts/breach/ make sure to create "breach" directory if it doesn't exist | |
// 1.6 compat | |
@replaceMethod(MinigameGenerationRuleScalingPrograms) | |
protected func OnProcessRule(out size: Uint32, out grid: array<array<GridCell>>) -> Bool { | |
let atStart: Bool; | |
let combinedPowerLevel: Float; | |
let extraDifficulty: Float; | |
let i: Int32; |
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
# sourced from https://www.reddit.com/r/valheim/comments/lixlu7/any_way_to_look_up_the_name_of_a_portal_you_forgot/iibfmuo/ | |
import mmap | |
def portals(dbfile): | |
db = open(dbfile, 'rb') | |
mm = mmap.mmap(db.fileno(), 0, prot=mmap.PROT_READ) | |
i, l = 0, set() | |
while True: |
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
""" | |
this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python | |
all credits go to alko and arturomp @ stack overflow. | |
basically, it's a big find/replace. | |
""" | |
import re | |
cList = { | |
"ain't": "am not", |
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
from pathlib import Path | |
from collections import Counter | |
from docx import Document # pip install python-docx | |
from nltk.tokenize import sent_tokenize, word_tokenize # pip install nltk==3.5 | |
ROOT = Path(r"C:\\REDACTED\\book\\") |
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
#NoEnv | |
#Warn All | |
#Warn LocalSameAsGlobal, Off | |
#Persistent | |
/* | |
Speech Recognition | |
================== | |
A class providing access to Microsoft's SAPI. Requires the SAPI SDK. |
NewerOlder