Using angularjs + ui router
Three abstract states:
- Welcome (static home page)
- Unlogged (login, logout, register)
- Logged (application)
var myApp = angular.module('myapp') | |
.controller('SubmissionAdminController', function ($scope) { | |
$scope.types = [ | |
{value: 0, text: 'string'}, | |
{value: 1, text: 'number'}, | |
{value: 2, text: 'range'}, | |
{value: 3, text: 'date'}, | |
{value: 4, text: 'email'}, | |
]; |
filecsv = "input.csv" | |
with open(filecsv, mode='r') as csvfile: | |
reader = csv.reader(csvfile) | |
line_count = 0 | |
head = [] | |
data = [] | |
for rows in reader: | |
if line_count < 1: | |
head = rows |
############################### | |
# You can change these | |
dir='/path/to/localhost/dbfolder' | |
mysql_version='5.5' | |
# No need to change here | |
mypwd='test' | |
dname='dumpmysqldb' | |
hdir=`basename $dir` | |
mdir="/var/lib/mysql" |
A way to easily start the next python project with one command line command
Based on the following python libraries:
We may check celery tasks queued at any time. Let's see how.
When you launch the task you get the AsyncResult back. To save the id you may:
res = my_async_task.delay(i)
from ..base import ExtendedApiResource | |
class MyTest(ExtendedApiResource): | |
@decorate.add_endpoint_parameter('test') | |
@decorate.apimethod | |
def get(self, id=None): | |
""" | |
This works for all methods: GET, POST, PUT, PATCH, DELETE | |
""" |