/**
* @param {string} s
* @param {number} k
* @return {number}
*/
var longestIdealString = function(s, k) {
// Initialize an array to keep track of the longest ideal string ending with each letter
var dp = new Array(26).fill(0);
// Iterate over each character in the string
for (var i = 0; i < s.length; i++) {
// Convert the current character to its corresponding integer (0-25)
var c = s.charCodeAt(i) - 'a'.charCodeAt(0);
// Initialize the maximum len
$IPAddressRegEx = '^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$'
var hKeys = clickData.func.qualifiers;
// If CTRL is pressed
if (hKeys.match(".*ctrl.*")){
}
// If SHIFT is pressed
if (hKeys.match(".*shift.*")){
}
// If ALT is pressed
if (hKeys.match(".*alt.*")){
}
import pandas as pd
from tabulate import tabulate
import os as os
def csv_to_tabulate_table(file_path, file_name):
# Load the CSV file into a Pandas DataFrame
df = pd.read_csv(file_path)
df = df.reset_index(drop=True)
# Display the DataFrame
#print(df.columns)
table = tabulate(df, headers="keys", tablefmt="outline", showindex='never')
# Display the Tabulate table
#print(table)
with open(f'output_txt/{file_name}.txt', 'w', encoding='utf-8')
sudo mount -t drvfs Y: /mnt/y/
# popup = CustomPopup(titleName = titleName_
# , infoSummary = infoSummary_
# , infoDetail = infoDetail_
# )
class CustomPopup(QDialog):
def __init__(self
, titleName: str
, infoSummary: str, infoDetail: str
, parent = None):
super(CustomPopup, self).__init__(parent)
self.win = titleName + '_' + 'ui'
# UIの window name (o
<!-- Yootheme Pro sliders with lightbox -->
<!--
1. For the 'Overlay Slider' or 'Panel Slider' Element:
-Add Link to the Image which has to be shown in the Lightbox
-Add element Attribute:
uk-lightbox="toggle: .uk-slider-items a"
2. For the 'SlideShow' Element:
-Add Link to the Image which has to be shown in the Lightbox
-Add element Attribute
uk-lightbox="toggle: .uk-slideshow-items a"
-->
<!-- OPTIONAL: -->
<!--
For the 'Overlay Slider' or 'Panel Slider' Element:
If link is set on Panel or
function add_file_types_to_uploads($file_types){
$new_filetypes = array();
$new_filetypes['svg'] = 'image/svg+xml';
$file_types = array_merge($file_types, $new_filetypes);
return $file_types;
}
add_action('upload_mimes', 'add_file_types_to_uploads');
<button popovertaegrt="popover" popovertargetaction="show" class="popover-open">ポップオーバーを開く</button>
<div id="popover" popover class="popovertarget">
<div>ポップオーバー</div>
<button popovertaegrt="popover" popovertargetaction="hide" class="popover-close">ポップオーバーを閉じる</button>
</div>
import re
purePath = r'C:\Users\oki44\Documents\maya\projects\default'
filePath = re.sub(r'\\', '/', purePath) + '/'
fileName = 'fishSurf.xml'
importSkinWeight(filePath, fileName)
purePath = r'C:\Users\oki44\Documents\maya\projects\default'
filePath = purePath.replace("\\", "/") + '/'
fileName = 'fishSurf.xml'
importSkinWeight(filePath, fileName)
"""
https://platform.openai.com/docs/guides/text-generation/json-mode
"""
import os
from dotenv import load_dotenv
from openai import OpenAI
# Instanciate and set the client
load_dotenv()
client = OpenAI(api_key = os.getenv("OPENAI_API_KEY"))
# Go by hand
completion = client.chat.completions.create(
model = "gpt-3.5-turbo-0125",
response_format = {"type": "json_object"},
messages = [
{"role": "system", "content": "You are a helpful assistant designed to output JSON."},
{"role"
"""
Example
Your accountant gives you a data sheet.
Your job is to write the quarterly earnings report!
"""
import json
import os
from dotenv import load_dotenv
from openai import OpenAI
# Instanciating and setting the client
load_dotenv
client = OpenAI(api_key = os.getenv("OPENAI_API_KEY"))
# Set the constant system prompt for the task
SYSTEM_PROMPT = "You are an assistant that writes concise, detailed, " +\
"and factual quarterly earnings reports given structured data."
# Regular co
import json
import os
from pprint import pprint
from dotenv import load_dotenv
from openai import OpenAI
# Instanciate and configure client
load_dotenv()
client = OpenAI(api_key = os.getenv("OPENAI_API_KEY"))
# Define the constant prompt for system
SYSTEM_PROMPT = "You are an assistant that returns only JSON " +\
"objects with the resquested information."
# Usual functions
def complete(user_prompt):
completion = client.chat.completions.create(
model = "gpt-3.5-turbo",
messages =
function askUser(strTitle, strMessage, strDefaultValue, strButtons, strIcon) {
var dlg = clickData.func.Dlg;
dlg.window = clickData.func.sourcetab;
dlg.title = strTitle;
dlg.message = strMessage;
dlg.buttons = strButtons;
dlg.icon = strIcon; // warning error info question
dlg.max = 0; // Faz com que o dlg seja do tipo input box. Se colocar um número maior do que 0, limita a quantidade de caracteres que podem ser escritos.
dlg.defvalue = strDefaultValue;
dlg.select = true; // Fa
var strFile_name = 'C:\Windows\notepad.exe'
var strFileExtension = getFileExtension(strFile_name);
function getFileExtension(fileName) {
// Mesmo que o nome do arquivo tenha vários pontos, pega apenas o último em diante
// Cacher Setup 2.47.3.exe
// retorna apenas .exe
return /\.[^\.]+$/.test(fileName);
}
if (DOpus.FSUtil.Exists(strPath)) {
DOpus.Output('Existe o Path');
}