This file contains hidden or 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 asyncio | |
| from browser_use import Agent | |
| from langchain_ollama import ChatOllama | |
| import os | |
| os.environ['OLLAMA_HOST'] = 'http://ollama_server:11434' | |
| async def run_search() -> str: | |
| try: |
This file contains hidden or 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 * as cdk from '@aws-cdk/core'; | |
| import * as ec2 from '@aws-cdk/aws-ec2'; | |
| import * as apigwv2 from '@aws-cdk/aws-apigatewayv2'; | |
| import * as apigwv2i from '@aws-cdk/aws-apigatewayv2-integrations'; | |
| import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2' | |
| import * as lambda from '@aws-cdk/aws-lambda'; | |
| interface ApiStackProps extends cdk.StackProps { | |
| vpc: ec2.IVpc; | |
| reposmanagerAlbListener: elbv2.IApplicationListener; |
This file contains hidden or 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
| LIP=`cat /etc/hosts | grep 10. | awk 'END{print $1}'`;echo "<html><body>container IP: ${LIP}</body></html>" > usr/share/nginx/html/index.html |
This file contains hidden or 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
| package main | |
| import ( | |
| "crypto/sha256" | |
| "encoding/binary" | |
| "fmt" | |
| ) | |
| func main() { | |
| servers := []string{"10.10.10.10", "10.10.10.11", "10.10.10.12", "10.10.10.10.13"} |
This file contains hidden or 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
| // create codebuild project | |
| const codeBuildProject = new codebuild.Project( | |
| scope, | |
| `${props.environment}-${props.pipelineNamePrefix}-validation`, | |
| { | |
| projectName: `${props.environment}-${props.pipelineNamePrefix}-validation`, | |
| source: githubSource, | |
| buildSpec: codebuild.BuildSpec.fromSourceFilename('buildspec_pull_request.yml'), | |
| environment: { | |
| buildImage: codebuild.LinuxBuildImage.AMAZON_LINUX_2, |
This file contains hidden or 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 multiprocessing | |
| import time | |
| import datetime | |
| import collections | |
| import os | |
| import requests | |
| from pprint import pprint | |
| def timer(func): | |
| def function_wrapper(x): |
This file contains hidden or 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 collections import Counter | |
| with open("x.txt", "r") as rf: | |
| lines = rf.readlines() | |
| Counter(list(map(lambda x: x.split("From ")[1].split(":")[0], list(filter(lambda x: x.startswith("From "), lines))))) | |
| """ | |
| From 05:20:34 |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "DenyAllOutsideEUWEST1ExceptGlobalServices", | |
| "Effect": "Deny", | |
| "NotAction": [ | |
| "iam:*", | |
| "organizations:*", | |
| "route53:*", |
This file contains hidden or 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
| strace: Process 11159 attached | |
| select(0, NULL, NULL, NULL, {tv_sec=1, tv_usec=76529}) = 0 (Timeout) | |
| openat(AT_FDCWD, "tmp.txt", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 3 | |
| fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 | |
| ioctl(3, TCGETS, 0x7ffeda481580) = -1 ENOTTY (Inappropriate ioctl for device) | |
| lseek(3, 0, SEEK_CUR) = 0 | |
| ioctl(3, TCGETS, 0x7ffeda481560) = -1 ENOTTY (Inappropriate ioctl for device) | |
| lseek(3, 0, SEEK_CUR) = 0 | |
| lseek(3, 0, SEEK_CUR) = 0 | |
| write(3, "lolz", 4) = 4 |
This file contains hidden or 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 build_widget(name: str, region:str) -> dict: | |
| return { | |
| "type": "metric", | |
| "width": 12, | |
| "height": 9, | |
| "properties": { | |
| "metrics": [ | |
| [ "DX", "WaitingInQueue", "CustomerName", f"{name}", { "stat": "Sum" } ] | |
| ], |
NewerOlder