Installing Ubuntu 19.10 with latest docker, docker-compose.
Install latest Ubuntu 19.10 and then upgrade to latest
sudo apt-get update
(function () { | |
var ffmpeg = require('fluent-ffmpeg'); | |
function baseName(str) { | |
var base = new String(str).substring(str.lastIndexOf('/') + 1); | |
if(base.lastIndexOf(".") != -1) { | |
base = base.substring(0, base.lastIndexOf(".")); | |
} | |
return base; | |
} |
; Assumes dockerfile with: | |
; ENTRYPOINT ["/usr/bin/supervisord", "-c", "/var/app/supervisord.conf"] | |
[supervisord] | |
;logfile=/var/app/logs/ ; (main log file;default $CWD/supervisord.log) | |
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) | |
logfile_backups=5 ; (num of main logfile rotation backups;default 10) | |
loglevel=debug ; (log level;default info; others: debug,warn,trace) | |
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | |
nodaemon=true ; (start in foreground if true;default false) |
# 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 | |
""" |
from django.test import TestCase, RequestFactory | |
from django.utils.importlib import import_module | |
from django.contrib.auth import get_user_model | |
from django.core.urlresolvers import reverse | |
from django.contrib.sessions.middleware import SessionMiddleware | |
from django.contrib.messages.middleware import MessageMiddleware | |
from rest_framework import status | |
from .models import * |
import sys | |
import os | |
import argparse | |
import getpass | |
import logging | |
logging.basicConfig(stream=sys.stdout, level=logging.INFO) | |
logger = logging.getLogger('upload_bom') | |
if __name__ == '__main__': |
__author__ = 'dkarchmer' | |
''' | |
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but | |
requires your Django server to have an API for your user to access Cognito based credentials | |
Because of Cognito, the client (this script) will only get temporary AWS credentials associated | |
to your user and only your user, and based on whatever you configure your AIM Policy to be. | |
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate | |
how to create a stand-alone Python script but operating similarly to these apps. |
{% extends "base.html" %} | |
{% load i18n %} | |
{% block media %} | |
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/s/bs/dt-1.10.10,r-2.0.0/datatables.min.css"/> | |
{% endblock %} | |
{% block js %} | |
<!-- DataTable --> | |
<script type="text/javascript" src="https://cdn.datatables.net/s/bs/dt-1.10.10,r-2.0.0/datatables.min.js"></script> |
sudo apt-get update | |
sudo apt-get upgrade | |
# Store Github credentials | |
git config --global credential.helper store | |
git clone ... | |
# Install Python | |
sudo apt-get install -y python | |
sudo apt-get install python3.8 |