Discover gists
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
The standard Lorem Ipsum passage, used since the 1500s | |
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | |
Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC | |
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, co |
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
# set syntax highlighting color to use shell theme colors | |
set -x fish_color_command foreground | |
set -x fish_color_comment yellow | |
set -x fish_color_error red | |
set -x fish_color_param foreground | |
set -x fish_color_quote green | |
set -x fish_color_redirection cyan | |
set -x fish_color_end purple | |
set -x fish_color_autosuggestion white |
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
#!/usr/bin/env python | |
import json | |
import sys | |
import time | |
from datetime import datetime | |
from pathlib import Path | |
""" | |
Parse nginx logs into a JSON log event stream for CloudWatch: |
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
<?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\advtor\AdvOR-0.3.1.2.zip.txt" checksum="6EB52D0A761ED7266D0933798B69144D" /> | |
<file path="C:\ProgramData\chocolatey\lib\advtor\advtor.nupkg" checksum="8981A26B498101D6A6FCDBDF2D41684F" /> | |
<file path="C:\ProgramData\chocolatey\lib\advtor\advtor.nuspec" checksum="A87052CBF6F913CBAB5205E7C02F6D07" /> | |
<file path="C:\ProgramData\chocolatey\lib\advtor\tools\chocolateyInstall.ps1" checksum="980AE8261C3031A02B623AB5F284AFFF" /> | |
<file path="C:\ProgramData\chocolatey\lib\advtor\tools\AdvOR\AdvOR-English.lng" checksum="B29DBFE8F999AFE812868FA7FF9A1D0B" /> | |
<file path="C:\ProgramData\chocolatey\lib\advtor\tools\AdvOR\AdvOR.dll" checksum="AA65C7D2890AF6ABD5BD431ECC16D581" /> | |
<file path="C:\ProgramData\chocolatey\lib\advtor\tools\AdvOR\AdvOR.exe" checksum="ADEDD8C6BB7E2D893733E426ABB15F6 |
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
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 |
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
public class WeightedRandomList | |
{ | |
private int weightSum; | |
private List<int> weights; | |
public int WeightSum => weightSum; | |
public List<int> Weights => weights; | |
public WeightedRandomList(List<int> weights) | |
{ |
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
<?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" /> |
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
# 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: |
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
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' |
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
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']}} | |
) | |