Skip to content

Instantly share code, notes, and snippets.

Change: /etc/lxc/default.conf
lxc.network.type = veth
lxc.network.script.up = /etc/lxc/ovs_up
lxc.network.script.down = /etc/lxc/ovs_down
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
OVS_UP
#!/bin/bash
#!/usr/bin/env python
# coding: UTF-8
# code extracted from nigiri
import os
import datetime
import sys
import traceback
import re
@roaet
roaet / useful_pandas_snippets.py
Created January 10, 2017 20:31 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
# List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
# Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
# Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(valuelist)]