start new:
tmux
start new with session name:
tmux new -s myname
class Location(BaseAddress, TimeStampedModel): | |
location_name = models.CharField(max_length=50, blank=False, null=False) | |
default_location = models.BooleanField(default=False) | |
def __unicode__(self): | |
if self.location_name and self.city: | |
return unicode(str(self.location_name + '-' + self.city)) | |
class Meta: | |
verbose_name = 'Location' |
from django.contrib import admin | |
from django.forms.models import BaseInlineFormSet | |
from .models import Item, ItemLocation | |
@admin.register(Item) | |
class ItemAdmin(admin.ModelAdmin): | |
fieldsets = ( | |
('Item Details', { | |
'fields': ('sku', 'item_name', 'item_description', 'item_search', |
#!/bin/bash | |
# Pretty Welcome Message | |
echo -e " *************************************************** " | |
echo -e " *************************************************** " | |
echo -e " Amazon S3 Restore MySQL Databases " | |
echo -e " 4-18-2017 - Craig Derington " | |
echo -e " GitHub @craigderington " | |
echo -e " " | |
echo -e " *************************************************** " |
I hereby claim:
To claim this, I am signing this object:
# urls.py | |
from django.conf.urls import url | |
from views import CustomerListView | |
urlpatterns = [ | |
url(r'^customers/$', CustomerListView.as_view()), | |
] |
# *-* coding: utf-8 *-* | |
lst_a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
lst_b = [1, 4, 5, 7, 9, 11, 14] | |
def de_duplicate(l1, l2): | |
""" | |
Return a de-duplicated list | |
:param l1: list splash visitor |
# *-* coding: utf-8 *-* | |
import csv | |
d = {} | |
j = {} | |
followups = [] | |
with open('data/campaign1.csv', 'r') as f1: |
#! *-* coding: utf-8 *-* | |
import csv | |
import config | |
import requests | |
from datetime import datetime | |
today = datetime.now() | |
# -*- coding: utf-8 -*- | |
import csv | |
import xml.etree.ElementTree as ET | |
import logging | |
import ipaddress | |
from udger import Udger | |
from db import db_session | |
from sqlalchemy import text |