Skip to content

Instantly share code, notes, and snippets.

Artur Barseghyan barseghyanartur

Block or report user

Report or block barseghyanartur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
barseghyanartur / .travis.yml
Created Nov 22, 2019 — forked from shaypal5/.travis.yml
Comprehensive Python testing on Travis CI
View .travis.yml
language: python
# ===== Linux ======
dist: xenial
- 2.7
- 3.5
- 3.6
- 3.7
git log --oneline 7de7970..master


git log --oneline 7de7970..4cb34a9

Above command will give all logs between commit A and commit B including commit A and commit B.

barseghyanartur / .gitignore
Created Oct 24, 2019 — forked from octocat/.gitignore
Some common .gitignore configurations
View .gitignore
# Compiled source #
# Packages #
barseghyanartur / random_data_generators.rst
Created Oct 1, 2019
Random bank number and address generators (for the Netherlands)
View random_data_generators.rst

As proposed by Guido van Rossum himself here:

from typing import *
T = TypeVar('T')

class Base:
    fit: Callable

class Foo(Base):

This works for me:

from enum import Enum
import graphene

class NoValue(Enum):

    def __repr__(self):
barseghyanartur / django_union_snippet.rst
Last active Aug 22, 2019
Django: Select 3 most recent Post objects from 3 different users in a single database query
View django_union_snippet.rst



  • There are a lot of Post objects.
  • There are 3 users.

What we want:

  • Select 3 most recent Post objects from 3 different users.
View find_python_2_7_code.rst
pip install black
black . --target-version=py36 --check --quiet
barseghyanartur / index.rst
Created May 28, 2019
Body weight/height BMI calculation
View index.rst

BMI is weight divided by height in the power of two.

bmi = weight / height**2

Body Mass Index Scale

  • Underweight: less than 18.5
  • Normal weight: 18.5 - 25
You can’t perform that action at this time.