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
View find_python_2_7_code.rst
pip install black
black . --target-version=py36 --check --quiet
@barseghyanartur
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
View expose_local_port_to_the_world.md
View install_postgresql9.4_postgis2.1_ubuntu.md

Remove old PostGIS Installation

The first step is to remove older version of PostGIS if any.

sudo apt-get purge postgis

Setup repository

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
@barseghyanartur
barseghyanartur / instructions.rst
Last active Jan 23, 2019
Find coordinates by postal code
View instructions.rst

Install pgeocode package:

pip install pgeocode

Find the geo coordinates by postal code:

View example.rst
@barseghyanartur
barseghyanartur / urls.py
Last active Feb 9, 2019
Minimalistic REST API view
View urls.py
from django.conf.urls import url
from views import sample_api_view
urlpatterns = [
url(
r'^sample-api-view/$',
sample_api_view,
name="sample_api_view"
),
@barseghyanartur
barseghyanartur / mk1tv.go
Created Nov 20, 2018 — forked from davi807/mk1tv.go
Սա օգտագործում եմ films-hy.blogspot.com կայքի ֆիլմերը ավելորդ մասերից մաքրելու համար
View mk1tv.go
package main
import (
"fmt"
"os"
"os/exec"
"strconv"
)
func main() {
@barseghyanartur
barseghyanartur / pyaudio-ubuntu-install.md
Created Nov 5, 2018 — forked from diegopacheco/pyaudio-ubuntu-install.md
How to Install pyaudio ubuntu 16.04 LTS?
View pyaudio-ubuntu-install.md
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
sudo apt-get install ffmpeg libav-tools
sudo pip install pyaudio
You can’t perform that action at this time.