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
from io import StringIO | |
import re | |
from time import perf_counter | |
import json | |
import yaml | |
import pandas as pd | |
import tomlkit | |
from openai import OpenAI | |
client = OpenAI() |
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
# Licensed under the MIT-0 License. See https://opensource.org/licenses/MIT-0 for details. | |
import re | |
def markdown_to_unicode(md_text): | |
""" | |
Converts Markdown text to Unicode by transforming Markdown syntax for | |
bold and italic text into their corresponding Unicode characters, | |
handling lists and headings, and preserving the formatting within code blocks. |
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
/* Obsidian CSS reference: https://docs.obsidian.md/Reference/CSS+variables/Editor/Code */ | |
body { | |
/* Code syntax highlighting */ | |
--jetbrains-grey-code: #BCBEC4; | |
--code-normal: --jetbrains-grey-code; | |
--code-comment: #7A7E85; | |
--code-function: --jetbrains-grey-code; | |
--code-important: hotpink; | |
--code-keyword: #CF8E6D; |
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 static com.intellij.openapi.util.text.StringUtil.escapeStringCharacters as escapeStr | |
SEPARATOR = ", " | |
QUOTE = "\"" | |
NEWLINE = System.getProperty("line.separator") | |
def record(columns, dataRow) { | |
OUT.append(" {").append(NEWLINE) | |
columns.eachWithIndex { column, idx -> |
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
# MIT License | |
# | |
# Copyright (c) 2024 David Gilbertson | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
Word | Deconstruction | |
---|---|---|
it's | it ~is | |
years | year ~s | |
going | go ~ing | |
that's | that ~is | |
i'm | i ~am | |
things | thing ~s | |
states | state ~s | |
including | include ~ing | |
called | call ~ed |
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
print('Hello from testing.py') |
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
type Nullable<IdType, RequiredType> = RequiredType extends true ? IdType : IdType | null; | |
export type SelectProps<IdType extends string, RequiredType extends boolean> = { | |
options: Array<{id: IdType; name: string}>; | |
selectedItemId: Nullable<IdType, RequiredType>; | |
onSelect: (id: Nullable<IdType, RequiredType>) => void; | |
required?: RequiredType; | |
}; | |
const Select = <IdType extends string, RequiredType extends boolean>( |
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
<Select | |
selectedItemId={selectedItemId} | |
onSelect={setSelectedItemId} | |
options={[ | |
{value: Size.Small, children: 'Small'}, | |
{value: Size.Medium, children: 'Medium'}, | |
{value: Size.Large, children: 'Large', disabled: true}, | |
]} | |
required | |
/> |
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
type Nullable<IdType, RequiredType> = RequiredType extends true ? IdType : IdType | null; | |
type OptionProps<IdType> = React.ComponentProps<'option'> & { | |
value: IdType; | |
}; | |
const Select = <IdType extends string, RequiredType extends boolean>(props: { | |
options: Array<OptionProps<IdType>>; | |
selectedItemId: Nullable<IdType, RequiredType>; | |
onSelect: (id: Nullable<IdType, RequiredType>) => void; |
NewerOlder