Skip to content

Instantly share code, notes, and snippets.

View serbernar's full-sized avatar
🏠
Working from home

serbernar serbernar

🏠
Working from home
View GitHub Profile
@serbernar
serbernar / python_console.py
Last active May 24, 2019 18:34
Pycharm integration with Airflow project
import contextlib
import os
import sys
import warnings
__author__ = "serbernar"
warnings.filterwarnings("ignore", category=UserWarning, module="psycopg2")
doc, example = (
@serbernar
serbernar / .git-commit-template.txt
Created July 17, 2018 10:56 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@serbernar
serbernar / 0readme.md
Created July 13, 2018 08:46 — forked from mdamien/0readme.md
404 link detector with scrapy

List all the broken links on your website

Requirements:

python3 and scrapy (pip install scrapy)

Usage

  • scrapy runspider -o items.csv -a site="https://yoursite.org" 1spider.py
  • python3 2format_results.py
sudo pip install virtualenvwrapper
echo 'export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python' >> .bashrc
mkdir .virtualenvs
source .bashrc
sudo tar -xzvf /opt/pycharm-2.6.3.tar.gz
/opt/pycharm-2.6.3/bin/pycharm.sh
@serbernar
serbernar / up.py
Created January 17, 2018 06:49
count up
from unittest import TestCase
class CountUp:
def __init__(self, *args):
if not args:
n = 0
else:
n = args[0]
if not isinstance(n, (int, float)):
gitinspector foldername/ --grading=True -H -L -m -T -r --format=html >> foldername.html