Skip to content

Instantly share code, notes, and snippets.

@voregnev
voregnev / clear_apro.py
Created February 11, 2025 20:17
скрипт для лечения темы aspro от unserialize
import os
import re
import shutil
from datetime import datetime
import chardet
def convert_file_encoding(file_path: str, backup: bool = True) -> bool:
"""
Конвертирует файл из cp1251 в utf-8
@choco-bot
choco-bot / FilesSnapshot.xml
Created February 11, 2025 20:17
windv v1.2.3 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\windv\WinDV-1.2.3.zip.txt" checksum="3DD4CDE41487E3F758C9BE646A8B587D" />
<file path="C:\ProgramData\chocolatey\lib\windv\windv.nupkg" checksum="557B872A61A24F294370D72D1D7B0217" />
<file path="C:\ProgramData\chocolatey\lib\windv\windv.nuspec" checksum="EF6BD4FBD8A72FC5ED346FA4F1598B8C" />
<file path="C:\ProgramData\chocolatey\lib\windv\tools\chocolateyinstall.ps1" checksum="58E9DE77EBCEB99DE1A653D22F4272E9" />
<file path="C:\ProgramData\chocolatey\lib\windv\tools\chocolateyuninstall.ps1" checksum="78BF0383802E9662268CFD2CCC2219E2" />
<file path="C:\ProgramData\chocolatey\lib\windv\tools\Readme.txt" checksum="6C45DE16DEAFF75A06FC07DFB7C813ED" />
<file path="C:\ProgramData\chocolatey\lib\windv\tools\WinDV.exe" checksum="311A5012BEFA3221243A4C3C8B6F6DBA" />
{
"metrics": {
"_api_": {
"contains": "default",
"type": "trend",
"values": {
"avg": 3515.3106153,
"max": 5998.287294,
"med": 3708.5206390000003,
"min": 465.955339,
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created February 11, 2025 20:16
Rimworld output log published using HugsLib
Log uploaded on Tuesday, February 11, 2025, 2:20:57 PM
Loaded mods:
Prepatcher(zetrith.prepatcher): 0Harmony(2.3.3), 0PrepatcherAPI(1.2.0), 0PrepatcherDataAssembly(1.0.0), PrepatcherImpl(1.0.0), Prestarter(1.0.0)
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.4]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.4)
Achtung!(brrainz.achtung)[mv:3.9.5.0]: Achtung(3.9.5), CrossPromotion(1.1.2), ModFeatures(1.2.6)
Allow Tool(UnlimitedHugs.AllowTool): AllowTool(av:3.6.0,fv:3.13.1)
Beautiful Outdoors(Meltup.BeautifulOutdoors): (no assemblies)
BetterInfoCard(Creeper.BetterInfoCard): BetterInfoCard(1.0.0)
def brute_force_search(user_liked_paper, data_df, num_results=5):
start_time = time.time()
data_df['similarity'] = data_df['embedding'].apply(
lambda x: cosine_similarity([user_liked_paper['embedding']], [x])[0][0]
)
# Make sure the results don't contain the same paper as the query
search_results = data_df[data_df['doi'] != user_liked_paper['doi']].sort_values(
by='similarity',
Pipeline still running ...
PipelineRun is still running: Tasks Completed: 3 (Failed: 1, Cancelled 0), Incomplete: 3, Skipped: 48
[get-pr-number : parse-pr-url] + echo -n 5939
[get-pr-number : parse-pr-url] + tee /tekton/results/git_pr_number
[get-pr-number : parse-pr-url] 5939
[acquire-lease : create-lease] + calculate_duration_in_seconds 90m
[acquire-lease : create-lease] + '[' m == m ']'
[acquire-lease : create-lease] + TOTAL_DURATION_IN_SECONDS=5400
[acquire-lease : create-lease] + export TOTAL_DURATION_IN_SECONDS
[
{
"animeEng": "Daimidaler: Prince vs. Penguin Empire",
"animeRomaji": "Kenzen Robo Daimidaler",
"songName": "Aitte ○× Zenbu kana?",
"artist": "Aya Suzaki",
"type": "Insert Song",
"correctCount": 0,
"startTime": 36,
"songDuration": 88.237278,
@choco-bot
choco-bot / 1.RegistrySnapshot.xml
Created February 11, 2025 20:15
pgadmin3 v1.22.2.20170504 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<registrySnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<user>S-1-5-21-2270195762-3335344054-2709297393-1000</user>
<keys>
<key installerType="Msi" displayName="pgAdmin III 1.22" displayVersion="1.22">
<RegistryView>Registry32</RegistryView>
<KeyPath>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{80753BFC-D514-4211-9618-3758F723AD10}</KeyPath>
<DefaultValue />
<InstallLocation><![CDATA[]]></InstallLocation>
<UninstallString><![CDATA[MsiExec.exe /I{80753BFC-D514-4211-9618-3758F723AD10}]]></UninstallString>
@ALJEMor
ALJEMor / 11.02.2025_циклический сдвиг.cs
Last active February 11, 2025 20:27
11.02.2025_циклический сдвиг
using System;
namespace циклический_сдвиг
{
internal class Program
{
static void Main(string[] args)
{
int[] numbers = { 1, 2, 3, 4, 5 };
Option Explicit
Function IsArrayInitialized(arr As Variant) As Boolean
On Error Resume Next
IsArrayInitialized = (IsArray(arr) And (LBound(arr) <= UBound(arr)))
On Error GoTo 0
End Function
Sub AddRowToPage(MyMultiPage As Object, pageIndex As Integer, Optional IsInitial As Boolean = False)
Dim Ws As Worksheet