Skip to content

Instantly share code, notes, and snippets.

Option Explicit
'/functions
Function IsArrayInitialized(arr As Variant) As Boolean
On Error Resume Next
IsArrayInitialized = IsArray(arr) And Not IsEmpty(arr) And UBound(arr) >= 0
On Error GoTo 0
End Function
@HyeroDrimm
HyeroDrimm / WeightedRandomList.cs
Last active February 11, 2025 20:33
Class made for getting rolls with weighted chances
public class WeightedRandomList
{
private int weightSum;
private List<int> weights;
public int WeightSum => weightSum;
public List<int> Weights => weights;
public WeightedRandomList(List<int> weights)
{
@choco-bot
choco-bot / FilesSnapshot.xml
Created February 11, 2025 20:20
advor v0.3.1.2 - 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\advor\AdvOR-0.3.1.2.zip.txt" checksum="1CF65A3B4CC103411B30EF2337C9084A" />
<file path="C:\ProgramData\chocolatey\lib\advor\advor.nupkg" checksum="BD318EA7A1D544A72A164D6D8824C2D2" />
<file path="C:\ProgramData\chocolatey\lib\advor\advor.nuspec" checksum="E09BF9E8F7E41E3808AEDAA338695724" />
<file path="C:\ProgramData\chocolatey\lib\advor\tools\chocolateyInstall.ps1" checksum="2354E99F91A97C75C68E4AFBF9B3F458" />
<file path="C:\ProgramData\chocolatey\lib\advor\tools\AdvOR\AdvOR-English.lng" checksum="B29DBFE8F999AFE812868FA7FF9A1D0B" />
<file path="C:\ProgramData\chocolatey\lib\advor\tools\AdvOR\AdvOR.dll" checksum="AA65C7D2890AF6ABD5BD431ECC16D581" />
<file path="C:\ProgramData\chocolatey\lib\advor\tools\AdvOR\AdvOR.exe" checksum="ADEDD8C6BB7E2D893733E426ABB15F67" />
@voyanimg168
voyanimg168 / 10homeworkPycharm12.py
Created February 11, 2025 20:20
Intro_to_Python_HW10.py
# Homework: Classes (4 Tasks + 5 Exercises)
# Read carefully until the end before you start solving the exercises.
# Practice the Basics
# TASK 1: Basic Class
# - Create an empty class HouseForSale
# - Create two instances.
# - Add number_of_rooms and price as instance attributes.
# - Create print statements that show the attribute values for the instances.
class HouseForSale:
Pipeline still running ...
PipelineRun is still running: Tasks Completed: 22 (Failed: 1, Cancelled 0), Incomplete: 1, Skipped: 9
[set-github-started-label : post-comment] + EXTRA_ARGS=
[set-github-started-label : post-comment] + [[ ! -z operator-release-pipeline/started ]]
[set-github-started-label : post-comment] + EXTRA_ARGS+=' --add-labels operator-release-pipeline/started'
[set-github-started-label : post-comment] Editing GitHub labels to PR https://github.com/redhat-openshift-ecosystem/redhat-marketplace-operators/pull/968
[set-github-started-label : post-comment] + [[ ! -z pipeline/trigger-release ]]
[set-github-started-label : post-comment] + EXTRA_ARGS+=' --remove-labels pipeline/trigger-release'
[set-github-started-label : post-comment] + [[ true == \t\r\u\e ]]
[set-github-started-label : post-comment] + EXTRA_ARGS+=' --remove-matching-namespace-labels'
def vector_db_search(user_liked_paper, collection_name, num_results):
start_time = time.time()
search_results = abstract_collection.query(
query_embeddings=[user_liked_paper['embedding']],
n_results=num_results,
# Make sure the results don't contain the same paper as the query
where={"doi": {"$ne": user_liked_paper['doi']}}
)
@choco-bot
choco-bot / Install.txt
Created February 11, 2025 20:19
armory v0.96 - Passed - Package Tests Results
2025-02-11 20:17:50,553 2572 [DEBUG] - XmlConfiguration is now operational
2025-02-11 20:17:50,675 2572 [DEBUG] - Adding new type 'CygwinService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-02-11 20:17:50,691 2572 [DEBUG] - Adding new type 'CygwinService' for type 'IInstallSourceRunner' from assembly 'choco'
2025-02-11 20:17:50,691 2572 [DEBUG] - Adding new type 'PythonService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-02-11 20:17:50,691 2572 [DEBUG] - Adding new type 'PythonService' for type 'IListSourceRunner' from assembly 'choco'
2025-02-11 20:17:50,691 2572 [DEBUG] - Adding new type 'PythonService' for type 'IInstallSourceRunner' from assembly 'choco'
2025-02-11 20:17:50,719 2572 [DEBUG] - Adding new type 'PythonService' for type 'IUninstallSourceRunner' from assembly 'choco'
2025-02-11 20:17:50,719 2572 [DEBUG] - Adding new type 'RubyGemsService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-02-11 20:17:50,719 2572 [DEBUG] - Adding new typ
@kshirsagar-krn
kshirsagar-krn / bloc template
Last active February 11, 2025 20:21
bloc template using flutter/dart
// TODO: bloc use clean arthiteture
lib/
├── core/
│ ├── constants/
│ ├── errors/
│ ├── network/
│ ├── theme/
│ ├── utils/
│ └── services/
├── data/
batch_size = 1000
for i in range(0, len(data_df), batch_size):
data_batch = data_df.iloc[i:i+batch_size]
abstract_collection.add(
ids=data_batch['id'].tolist(),
embeddings=data_batch['embedding'].tolist(),
documents=data_batch['abstract'].tolist(),
metadatas=data_batch[['doi']].to_dict(orient='records')
)
@donbr
donbr / competency-questions-economics-finance.md
Created February 11, 2025 20:18
Competency Questions - economics & finance

title: Competency Questions - economics & finance author:

  • Don created: 2025-02-11 tags:
  • cq
  • competency
  • ontology
  • requirements