Skip to content

Instantly share code, notes, and snippets.

View guinslym's full-sized avatar

Guinslym guinslym

View GitHub Profile
@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
@guinslym
guinslym / coming-soon-page-with-countdown.markdown
Created March 13, 2022 03:20
Coming soon page with countdown
@guinslym
guinslym / coming-soon-page-with-countdown.markdown
Created March 13, 2022 03:18
Coming soon page with countdown
from django.db import models
#https://ddialliance.org/Specification/DDI-Codebook/2.1/DTD/Documentation/DDI2-1-tree.html
#https://ddialliance.org/Specification/DDI-Codebook/2.1/DTD/Documentation/version2-1-all.html#element-definition=codeBook
#https://ddialliance.org/Specification/DDI-Codebook/2.1/
class ElementAbstractModel(models.Model):
class Meta:
abstract = True
tagName = models.CharField(
max_length=40,
import numpy as np
import cv2
import imutils
vid = cv2.VideoCapture(0)
if not vid.isOpened():
print("Error: Could not open video.")
exit()