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
#!/bin/bash | |
# Function to check if the branch exists on the remote | |
branch_exists_on_remote() { | |
git ls-remote --quiet --exit-code origin "refs/heads/$1" &>/dev/null | |
return $? | |
} | |
# Function to check if the branch exists locally | |
branch_exists_locally() { |
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
/* eslint-disable @typescript-eslint/no-unsafe-call */ | |
/* eslint-disable @typescript-eslint/no-unsafe-return */ | |
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ | |
/* eslint-disable @typescript-eslint/no-unsafe-argument */ | |
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | |
/* eslint-disable react-hooks/exhaustive-deps */ | |
import { useRouter } from "next/router"; | |
import { z } from "zod"; |
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 requests | |
import re | |
from bs4 import BeautifulSoup | |
import random | |
URL = "http://www.ljod.is/index.php/ljod/poem_collection/author" | |
page = requests.get(URL) | |
soup = BeautifulSoup(page.content, "html.parser") |
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
# 87116010 = Lítil rafknúin ökutæki og hlaupahjól gerð fyrir aksturshraða < 25 km á klst (reiðhjól b og c, létt bifhjól 1) | |
# 87116090 = Létt bifhjól 2 | |
# 87120000 = Reiðjól | |
# From january 2020 | |
# 8711.6011 = reiðhjól b | |
# 8711.6012 = reiðhjól c | |
# 8711.6013 = létt bifhjól 1 | |
library(scales) |
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 re | |
from typing import Dict, Iterable | |
from reynir import Greynir | |
from reynir.reynir import _Sentence | |
greynir = Greynir() | |
COMPANY_SUFFIXES = ( | |
"ehf.", |
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
""" | |
Look at the split of non-working-day windows for each year | |
Produces something like this: | |
2020 - 117 frídagar (119 í frígluggum sem hefjast á árinu) | |
- 1x fimm daga frí - 9.4 (Holy Thursday) | |
- 2x fjögurra daga frí - 24.12 (Christmas Eve), 31.12 (New Year's Eve) | |
- 3x þriggja daga frí - 1.5 (Labour Day), 3.5 (Whit Monday), 1.8 (Commerce Day) | |
- 47x tveggja daga frí |
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 | |
from enum import Enum as PyEnum | |
from collections import namedtuple | |
from fastapi import Depends, FastAPI, HTTPException | |
from starlette.requests import Request | |
from starlette.templating import Jinja2Templates | |
from sqlalchemy import ( | |
create_engine, |
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 python:2.7 | |
MAINTAINER Solberg Audunsson <[email protected]> | |
# Install uWSGI | |
RUN pip install uwsgi pipenv | |
# Standard set up Nginx | |
ENV NGINX_VERSION 1.9.11-1~jessie |
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 json | |
import lxml.html | |
from lxml.cssselect import CSSSelector | |
import requests | |
cookies = { | |
'session_name': 'dpoiudav0gnu6e8uf2uklift63', | |
} |
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
OAUTH_CONSUMER_KEY= | |
OAUTH_CONSUMER_SECRET= | |
OAUTH_TOKEN= | |
OAUTH_TOKEN_SECRET= | |
IMGIX_TOKEN= |
NewerOlder