Skip to content

Instantly share code, notes, and snippets.

View guinslym's full-sized avatar

Guinslym guinslym

View GitHub Profile
from playwright.sync_api import Playwright, sync_playwright, expect
def run_site(playwright: Playwright, url: str, link_text: str, use_firefox: bool):
try:
if use_firefox:
# Use Firefox
browser = playwright.firefox.launch(headless=False)
else:
# Use Chromium
browser = playwright.chromium.launch(headless=False)
import lh3.api
client = lh3.api.Client()
from pprint import pprint as print
from datetime import datetime, date, timedelta
import re
import time
from dateutil.parser import parse
from bs4 import BeautifulSoup
import pandas as pd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<html>
<head>
<link type=”text/css” rel=”stylesheet” href=”/documentation/css/style.css”>
<meta content=”text/html; charset=ISO-8859-1” http-equiv=”content-type”>
<title>TITLE OF PAGE</title>
</head>
<body>
<script type=”text/javascript” src=”/documentation/css/header.js”></script>
<div class=”Section1”>
<h2>TITLE OF PAGE</h2> PAGE CONTENT(see note below for more information)
@guinslym
guinslym / answer.py
Last active February 13, 2023 04:44
#https://stackoverflow.com/a/75431789/2327456
#You will also need to increase height of figsize (width, height)
fig_result = calplot.calplot(
events,
figsize=(20,7),
cmap='Spectral_r',
)
fig, mylist = fig_result
fig.suptitle('lorem ipsum', fontsize=20)
.container-scanning:
before_script: []
after_script: []
services: []
image:
name: docker.io/aquasec/trivy:0.36.1
entrypoint: [""]
stage: test
variables:
# No need to clone the repo, we exclusively work on artifacts. See
#create user
useradd -m -s /bin/bash -G sudo john
passwd john
#verify if user exist
cat /etc/passwd | grep john
groups john
#Upload SSH Key from local to remote server
#create ssh-key
cd ~/.ssh
import lh3.api
from lh3.api import *
import re
content_range_pattern = re.compile(r"chats (\d+)-(\d+)\/(\d+)")
def extract_content_range(content_range):
matches = content_range_pattern.match(content_range)
begin = matches.group(1)
@guinslym
guinslym / bootstrap-contact-form.markdown
Created September 5, 2022 20:51
Bootstrap Contact Form
version: '3.3'
services:
db:
image: postgres:14.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env.dev