Skip to content

Instantly share code, notes, and snippets.

View bzhr's full-sized avatar
💜
Upbeat-ing

Bozhidar Hristov bzhr

💜
Upbeat-ing
View GitHub Profile
@bzhr
bzhr / Vector Auto Regression with Statsmodels to predict the stock of Safe Assets in the U.S. Economy
Last active May 3, 2018 13:27
Vector Auto Regression with Statsmodels to predict the stock of Safe Assets in the U.S. Economy
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
{
"metadata": {
"name": "",
"signature": "sha256:07ff820bd34583fede01046d83d52b58918ac7465510c5fdb2bca54c4b494dce"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@bzhr
bzhr / Line Plot, Stacked Bar and Heatmap
Created March 25, 2015 17:37
Line Plot, Stacked Bar and Heatmap
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
@bzhr
bzhr / install_elixir.md
Created May 16, 2017 14:54 — forked from rubencaro/install_elixir.md
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

@bzhr
bzhr / gist:788c91e77b942052817d21ea7be68372
Created May 16, 2017 16:21 — forked from mbrochh/gist:964057
Fast Forward Your Fork
# kudos to https://github.com/drewlesueur
# stolen from here: https://github.com/blog/266-fast-forward-your-fork#comment-11535
git checkout -b upstream-master
git remote add upstream git://github.com/documentcloud/underscore.git
git pull upstream master
git checkout master // [my master branch]
git merge upstream-master
git push origin master
JS tools
1. nvm is updated by installing the latest version (it overwrites the previous). With nvm you can switch from more than one version of node.
2. Node is managed with nvm.
3. Npm is managed with node. To update run `npm install npm@latest -g`.
@bzhr
bzhr / facebook_test_user.sh
Created August 30, 2017 13:27 — forked from kesor/facebook_test_user.sh
Login URL for Facebook test user
#!/bin/sh
set -e
#
# create a test user at developer.facebook.com and set these
#
FULL_NAME="Bob+Amchicieafci+Martinazziman"
APP_ID="123456123456123"
APP_SECRET="123abc123abc123abc123abc123abc12"
@bzhr
bzhr / drf-nested-views.py
Created December 29, 2017 19:22 — forked from dkarchmer/drf-nested-views.py
Example of a Django Rest Framework ViewSet with nested views
# ViewSets define the view behavior.
class FooViewSet(viewsets.ModelViewSet):
lookup_field = 'slug'
queryset = Foo.objects.all()
serializer_class = FooSerializer
def get_queryset(self):
"""
This view should return a list of all records
"""
@bzhr
bzhr / pm_install.sh
Created March 1, 2018 13:14 — forked from punkdata/pm_install.sh
Postman Install Ubuntu 17.10
#!/usr/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
#Create a Desktop Entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
Name=Postman
@bzhr
bzhr / Helpers
Last active September 26, 2018 11:11
# Start MongoDB
`sudo systemctl start mongod`
# Check if MongoDB is running
`sudo systemctl status mongod`
# More info
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04
# Mount QNap NAS Folder to Ubuntu
Example:
sudo mount -t nfs sai.local:/Public /mnt/nas/Public