This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- put whatever you need --> | |
</head> | |
<body> | |
<app-root>Loading... </app-root> | |
{% csrf_token %} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
import time | |
class LoginTest(unittest.TestCase): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Tkinter | |
import random | |
import tkMessageBox | |
def check_guess(): | |
if int(guess.get()) == secret: | |
result_text = 'CORRECT!' | |
elif int(guess.get()) > secret: | |
result_text = 'WRONG! Too high!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>SmartNinja basic Jinja template</title> | |
<link rel="stylesheet" href="/assets/css/style.css"> | |
</head> | |
<body> | |
<h1>Hello, SmartNinja!</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
with open('tasks.csv', mode='r') as infile: | |
reader = csv.reader(infile) | |
tasks = [{'task': row[0], 'done': row[1]} for row in reader] | |
print tasks | |
incomplete = [task for task in tasks if task['done'] == 'ne'] | |
while incomplete: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Generiranje n kombinacij dolzine m, pri cemer se lahko eno stevilo uporabi samo v eni kombinaciji | |
""" | |
import random | |
loto_list = [] | |
loto_comb_size = int(raw_input('Vnesi stevilo loto kombinacij: ')) | |
loto_size = int(raw_input('Vnesi stevilo loto stevilk: ')) | |
used_numbers = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.main { | |
margin-right: auto; | |
margin-left: auto; | |
width: 550px; | |
height: 250px; | |
margin-top: 250px; | |
} | |
.main img { | |
margin-left: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search(request): | |
try: | |
q = request.GET.get('q') | |
except: | |
q = None | |
if q: | |
queries = q.split(' ') | |
items = Item.objects.none() | |
for query in queries: | |
items = items | Item.objects.filter(Q(title__icontains=query)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import io | |
import boto3 | |
import ast | |
from urllib.request import urlopen | |
import time | |
from boto3.dynamodb.conditions import Key, Attr | |
from PIL import Image | |
s3_client=boto3.client('s3') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from boto3.dynamodb.conditions import Key | |
from pydantic import BaseModel, ValidationError | |
from pydantic import EmailStr | |
from flask import Flask, jsonify, request, Response | |
app = Flask(__name__) | |
OlderNewer