Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
""" | |
Service API: | |
public string GetCurrency(Currency cur) აბრუნებს ვალუტის კურსს, მაგ. "1.0754" | |
public string GetCurrencyDescription(Currency cur) აბრუნებს ვალუტის აღწერას, მაგ. "10 ესტორნური კრონი" | |
public string GetCurrencyChange(Currency cur) აბრუნებს ვალუტის ცვლილების მნიშვნელობას, მაგ. "-0.0121" | |
public int GetCurrencyRate(Currency cur) 1 - თუ გაიზარდა; -1 - თუ დაიკლო, 0 - თუ იგივე დარჩა | |
public string GetDate() აბრუნებს კურსების შესაბამის თარიღს | |
""" |
# old django version: 1.6.x | |
# configure and run django script | |
if __name__ == '__main__': | |
import os | |
import sys | |
import importlib | |
proj_path = '/home/gogua/projects/profenv/profiling/' | |
sys.path.append(proj_path) |
# Python 2.x | |
for x in [unichr(i) for i in range(ord(u'ა'),ord(u'ჰ') +1)]: | |
pattern = unicode("!@#$%^&*()_+=-~`[]\{}|:\"?><,./;'\`„\"") | |
char = re.sub('[%s]' % re.escape(''.join(pattern)), '', x.strip()) | |
print char | |
# Python 3.x | |
for x in [chr(i) for i in range(ord('ა'),ord('ჰ') +1)]: | |
pattern = "!@#$%^&*()_+=-~`[]\{}|:\"?><,./;'\`„\"" |
#models.py | |
class Task(models.Model): | |
title = models.CharField(max_length=255) | |
description = models.TextField() | |
def __unicode__(self): | |
return self.title | |
# _*_ coding: utf-8 _*_ | |
""" | |
IPC | |
Created on Apr 24, 2017 | |
@author: lasha gogua | |
""" | |
from django import forms |
1. django (latest version) | |
$ pip install django | |
2. celery (latest version) | |
$ pip install celery | |
first steps | |
docs: http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html | |
install celery extension | |
$ pip install django-celery-beat | |
docs: http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html#django-celery-beat |
# ubutnu/debian Python installation requirements | |
sudo apt -y install build-essential checkinstall | |
sudo apt -y install libreadline-gplv2-dev libncursesw5-dev \ | |
libsqlite3-dev tk-dev libgdbm-dev libc6-dev | |
sudo apt -y install libjpeg-dev libpng-dev | |
sudo apt -y install zlib1g-dev libbz2-dev | |
sudo apt -y install krb5-multidev | |
sudo apt -y install openssl libssl-dev | |
sudo apt -y install libffi-dev | |
sudo apt -y install libgmp-dev |
[innotec@innotec ~]$ ps aux | grep 'manage.py' | awk '{print $2}' | xargs kill -9 | |
# add alias in .bashrc | |
# kill python processes | |
alias ppsk="pkill -f manage.py" | |
# or | |
[innotec@innotec ~]$ killall python | |
# or | |
alias pk="ps aux | grep 'manage.py' | awk '{print $2}' | xargs kill -9" |