Skip to content

Instantly share code, notes, and snippets.

View UlvacMoscow's full-sized avatar
🎓

Arsenei Abraamyan UlvacMoscow

🎓
  • Moscow
View GitHub Profile
import time
def ping():
time.sleep(1)
print('ping')
def pong():
print('pong')
import threading
import time
def ping():
time.sleep(1)
print('ping')
def pong():
print('pong')
from cms.cms_menus import Modifier
from cms.cms_menus import menu_pool
from cms.models import Page
class Level(Modifier):
post_cut = True
def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb):
#my view
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from shop.signals import * #мой сигнал
class CodeCompare(View):
def post(self, request):
body_unicode = request.body.decode('utf-8')
body_unicode = json.loads(body_unicode)
from datetime import datetime
# декораторы
def timeit(arg):
print(arg)
def outer(func):
def wrapper(*args, **kwargs):
start = datetime.now()
@UlvacMoscow
UlvacMoscow / main.php
Created September 6, 2018 14:37
TestPHP created by Ulvac - https://repl.it/@Ulvac/TestPHP
<?php
echo "-------------------------------задание 1--------------------------\n";
$authors =
[
["name" => "ivan ivanov",
"email" => "ivan@mail.hell",
"birthday" => "1888",
"books" => [
@UlvacMoscow
UlvacMoscow / main.php
Created September 6, 2018 14:02
TestPHP created by Ulvac - https://repl.it/@Ulvac/TestPHP
<?php
/*-------------------------------задание 1--------------------------*/
$books = [
["name" => 'mertvec',
"publishing" => 1901,
"author" => [
"name" => "ivan ivanov",
"email" => "ivan@mail.hell",
@UlvacMoscow
UlvacMoscow / main.php
Created September 6, 2018 14:01
TestPHP created by Ulvac - https://repl.it/@Ulvac/TestPHP
<?php
/*-------------------------------задание 1--------------------------*/
$books = [
["name" => 'mertvec',
"publishing" => 1901,
"author" => [
"name" => "ivan ivanov",
"email" => "ivan@mail.hell",
@UlvacMoscow
UlvacMoscow / main.php
Created September 6, 2018 13:39
TestPHP created by Ulvac - https://repl.it/@Ulvac/TestPHP
<?php
/*-------------------------------задание 1--------------------------*/
$books = [
["name" => 'mertvec',
"publishing" => 1901,
"author" => [
"name" => "ivan ivanov",
"email" => "ivan@mail.hell",
'use strict'
//1
function guarantee(yearsGuarantee) {
yearsGuarantee = yearsGuarantee === undefined ? 0 : yearsGuarantee;
if (yearsGuarantee === 1) {
return console.log(`гарантийное обслуживание на ${yearsGuarantee} год будет стоить 1250 Q`);
}