index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
96,599
itactuk/isc-206-septiembre-2019
refs/heads/master
/Introduccion/EjemploDeclaracionVaribles.py
# Todo lo que se encuentra despues de un signo de # es un comentario # Los comentarios son ignorados por el interprete # declarar variable entera cantidad_estudiantes = 14 # declarar variable decimal precio = 102.98 # declarar variable compleja corriente = 3 + 3j # variable string nombre = "Stanley" # linea 12 y 13 ...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,600
itactuk/isc-206-septiembre-2019
refs/heads/master
/Archivos/GuardarVariableEnArchivo.py
import pickle lista_estudiante = [ {'nombre': 'jose'}, {'nombre': 'miguel'}, {'nombre': 'alexandra'}, ] with open("mivar.pickle", "wb") as archivo: pickle.dump(lista_estudiante, archivo)
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,601
itactuk/isc-206-septiembre-2019
refs/heads/master
/FuncionesIntro/EjemploFunciones.py
# funcion que halle el maximo de una lista de numeros def hallar_el_maximo(lista_de_numeros): el_mas_alto = -999999999999999999999999999999999999999999999 for numero_actual in lista_de_numeros: if numero_actual > el_mas_alto: el_mas_alto = numero_actual return el_mas_alto def calc_fuer...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,602
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploIfZodiaco.py
mes = 4 dia = 3 fecha_valida = True if mes in [1,3,5,7,8,10,12]: if dia > 31: print("Dia invalido") fecha_valida = False elif mes == 2: if dia > 29: print("Dia invalido") fecha_valida = False elif mes in [2,4,6,9,11]: if dia > 30: print("Dia invalido") fech...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,603
itactuk/isc-206-septiembre-2019
refs/heads/master
/Recursividad/TestRecursividad.py
import Recursividad.EjemploRecursividad as ej import unittest class Pruebas(unittest.TestCase): def test_factorial(self): self.assertEqual(120, ej.factorial_recursivo(5)) self.assertEqual(1, ej.factorial_recursivo(0)) self.assertEqual(24, ej.factorial_recursivo(4))
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,604
abhinavasingh16/RandomForestImplementation
refs/heads/master
/DecisionTree.py
import math import operator from Node import Node def col_range(d): col_ranges = {} for column in range(len(d[0])): for row in d: if column in col_ranges: col_ranges[column].add(row[column]) else: col_ranges[column] = set([row[column]]) return col_ranges def entrop...
{"/RandomForest.py": ["/DecisionTree.py"]}
96,605
abhinavasingh16/RandomForestImplementation
refs/heads/master
/RandomForest.py
import math import operator import sys import random from random import shuffle import DecisionTree from DecisionTree import Decision_Tree class RandomForrest: def __init__(self,num_trees): self.num_trees = num_trees self.forrest = [] def train(self,data,labels): #Set up bagging num_subsets = self.num_trees...
{"/RandomForest.py": ["/DecisionTree.py"]}
96,606
abhinavasingh16/RandomForestImplementation
refs/heads/master
/Node.py
class Node: ''' This is a node class which keeps track of its children. It learns a split rule and also becomes a label if it is a leaf. ''' def __init__(self,lc=None,rc=None,lbl=None): self.lchild = lc self.rchild = rc self.label = lbl self.split_rule = (None,None) def __repr__(self): return "labe...
{"/RandomForest.py": ["/DecisionTree.py"]}
96,607
xbinglzh/paddle_imagenet_fast
refs/heads/master
/fast_imagenet_train.py
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"/models/resnet_lars.py": ["/reader_fast.py"]}
96,608
xbinglzh/paddle_imagenet_fast
refs/heads/master
/reader_fast.py
import os import math import random import functools import numpy as np import logging import datareader from datareader.tool.imgtransformer import reader_transformer from datareader.tool import pytransformer from datareader.datasets import dataset from Queue import Queue from threading import Thread import time impor...
{"/models/resnet_lars.py": ["/reader_fast.py"]}
96,609
xbinglzh/paddle_imagenet_fast
refs/heads/master
/models/resnet_lars.py
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
{"/models/resnet_lars.py": ["/reader_fast.py"]}
96,627
libryclone/lbryschema
refs/heads/master
/lbryschema/claim.py
import json from google.protobuf import json_format from google.protobuf.message import Message from collections import OrderedDict from lbryschema.schema.claim import Claim from lbryschema.schema import claim_pb2 from lbryschema.validator import get_validator from lbryschema.signer import get_signer from lbryschema.sc...
{"/lbryschema/claim.py": ["/lbryschema/validator.py"], "/lbryschema/decode.py": ["/lbryschema/error.py", "/lbryschema/claim.py"], "/tests/test_lbryschema.py": ["/lbryschema/claim.py"]}
96,628
libryclone/lbryschema
refs/heads/master
/lbryschema/decode.py
import json from lbryschema.error import DecodeError from lbryschema.legacy.migrate import migrate as schema_migrator from lbryschema.claim import ClaimDict from google.protobuf import json_format from google.protobuf.internal.decoder import _DecodeError def migrate_json_claim_value(claim_value): try: d...
{"/lbryschema/claim.py": ["/lbryschema/validator.py"], "/lbryschema/decode.py": ["/lbryschema/error.py", "/lbryschema/claim.py"], "/tests/test_lbryschema.py": ["/lbryschema/claim.py"]}
96,629
libryclone/lbryschema
refs/heads/master
/lbryschema/validator.py
import ecdsa import hashlib from lbryschema.schema import NIST256p, NIST384p, SECP256k1 def validate_claim_id(claim_id): hex_chars = "0123456789abcdefABCDEF" assert len(claim_id) == 64, "Incorrect claimid length: %i" % len(claim_id) for c in claim_id: assert c in hex_chars, "Claim id is not hex en...
{"/lbryschema/claim.py": ["/lbryschema/validator.py"], "/lbryschema/decode.py": ["/lbryschema/error.py", "/lbryschema/claim.py"], "/tests/test_lbryschema.py": ["/lbryschema/claim.py"]}
96,630
libryclone/lbryschema
refs/heads/master
/lbryschema/error.py
class UnknownSourceType(Exception): pass class InvalidSourceHashLength(Exception): pass class DecodeError(Exception): pass
{"/lbryschema/claim.py": ["/lbryschema/validator.py"], "/lbryschema/decode.py": ["/lbryschema/error.py", "/lbryschema/claim.py"], "/tests/test_lbryschema.py": ["/lbryschema/claim.py"]}
96,631
libryclone/lbryschema
refs/heads/master
/lbryschema/schema/schema.py
import json import google.protobuf.json_format as json_pb from google.protobuf.message import Message class Schema(Message): @classmethod def load(cls, message): raise NotImplementedError @classmethod def _load(cls, data, message): if isinstance(data, dict): data = json.du...
{"/lbryschema/claim.py": ["/lbryschema/validator.py"], "/lbryschema/decode.py": ["/lbryschema/error.py", "/lbryschema/claim.py"], "/tests/test_lbryschema.py": ["/lbryschema/claim.py"]}
96,632
libryclone/lbryschema
refs/heads/master
/setup.py
from setuptools import setup, find_packages import os requires = [ 'protobuf', ] base_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), "lbryschema") setup(name="lbryschema", description="Schema for publications made to the lbrycrd blockchain", version="0.0.1", author="jackrobison...
{"/lbryschema/claim.py": ["/lbryschema/validator.py"], "/lbryschema/decode.py": ["/lbryschema/error.py", "/lbryschema/claim.py"], "/tests/test_lbryschema.py": ["/lbryschema/claim.py"]}
96,633
libryclone/lbryschema
refs/heads/master
/tests/test_lbryschema.py
import json import ecdsa from copy import deepcopy from twisted.trial import unittest from test_data import example_003, example_010, example_010_serialized, claim_id_1, claim_id_2 from test_data import nist256p_private_key, claim_010_signed_nist256p, nist256p_cert from test_data import nist384p_private_key, claim_010...
{"/lbryschema/claim.py": ["/lbryschema/validator.py"], "/lbryschema/decode.py": ["/lbryschema/error.py", "/lbryschema/claim.py"], "/tests/test_lbryschema.py": ["/lbryschema/claim.py"]}
96,634
libryclone/lbryschema
refs/heads/master
/tests/test_data.py
claim_id_1 = "8e3472bbf59381a8e45df8d26467a2ff08a52ac0d82678383b83f6dd9765a2ab" claim_id_2 = "9703427964feb8ce8c35cfe1fbf06b4dd114f2be6f7bbfacbf0f9fb92b78fb79" nist256p_private_key = """-----BEGIN EC PRIVATE KEY----- MHcCAQEEIBM3iJ+xJLx3RLngcublNSX8lmEJUoIXf3lrZ3ZnClCAoAoGCCqGSM49 AwEHoUQDQgAEj8okJt9D2FvAyKfB6eHi0NW...
{"/lbryschema/claim.py": ["/lbryschema/validator.py"], "/lbryschema/decode.py": ["/lbryschema/error.py", "/lbryschema/claim.py"], "/tests/test_lbryschema.py": ["/lbryschema/claim.py"]}
96,651
Programacion-Algoritmos-18-2/ejercicios-clases-6-1-mariovalarezo
refs/heads/master
/MiArchivo/Archivo.py
import codecs import sys class Mi_archivo: """ """ def __init__(self): """ """ self.archivo = codecs.open("datos.txt", "r") # Manda a abrir el archivp def obtener_informacion(self): return self.archivo.readlines() # Retorna los datos contenidos en el txt def cer...
{"/Run.py": ["/MiArchivo/Archivo.py", "/MiModelo/modelo.py"]}
96,652
Programacion-Algoritmos-18-2/ejercicios-clases-6-1-mariovalarezo
refs/heads/master
/Run.py
from MiArchivo.Archivo import * from MiModelo.modelo import * #Obtencion de la lista del txt m = Mi_archivo() listaN= m.obtener_informacion() listaN = [l.split(",") for l in listaN] #Creacion de lista contenedora lista = [] #Doble ciclo de for para separar todos los datos y agregarlos a la lista contenedora como ...
{"/Run.py": ["/MiArchivo/Archivo.py", "/MiModelo/modelo.py"]}
96,653
Programacion-Algoritmos-18-2/ejercicios-clases-6-1-mariovalarezo
refs/heads/master
/MiModelo/modelo.py
class Busqueda(): def __init__(self, lis): self.lista = lis print(self.lista) #Adaptacion de busqueda binaria def busuedaB(self, elen): self.elemento= elen self.inf =0 self.sup= len(self.lista) self.medio = int((self.inf+self.sup)/2) self.ubi = -1 ...
{"/Run.py": ["/MiArchivo/Archivo.py", "/MiModelo/modelo.py"]}
96,664
0xnurl/gamla
refs/heads/master
/gamla/data.py
import dataclasses import json import dataclasses_json def get_encode_config(): return dataclasses.field( metadata=dataclasses_json.config( encoder=lambda lst: sorted(lst, key=json.dumps, reverse=False) ) )
{"/gamla/__init__.py": ["/gamla/data.py", "/gamla/functional.py", "/gamla/functional_async.py"], "/gamla/functional_async.py": ["/gamla/__init__.py"]}
96,665
0xnurl/gamla
refs/heads/master
/gamla/__init__.py
# flake8: noqa from .data import * from .functional import * from .functional_async import * from .graph import * from .graph_async import * from .io_utils import *
{"/gamla/__init__.py": ["/gamla/data.py", "/gamla/functional.py", "/gamla/functional_async.py"], "/gamla/functional_async.py": ["/gamla/__init__.py"]}
96,666
0xnurl/gamla
refs/heads/master
/gamla/functional.py
import builtins import cProfile import functools import hashlib import heapq import inspect import itertools import json import logging from concurrent import futures from typing import Callable, Iterable, Text, Type import heapq_max import toolz from toolz import curried from toolz.curried import operator do_breakpo...
{"/gamla/__init__.py": ["/gamla/data.py", "/gamla/functional.py", "/gamla/functional_async.py"], "/gamla/functional_async.py": ["/gamla/__init__.py"]}
96,667
0xnurl/gamla
refs/heads/master
/gamla/functional_async.py
import asyncio import inspect from typing import Any, AsyncGenerator, Awaitable, Callable, Dict, Iterable import toolz from toolz import curried from gamla import functional async def to_awaitable(value): if inspect.isawaitable(value): return await value return value async def apipe(val, *funcs): ...
{"/gamla/__init__.py": ["/gamla/data.py", "/gamla/functional.py", "/gamla/functional_async.py"], "/gamla/functional_async.py": ["/gamla/__init__.py"]}
96,723
miwakawaguti/modelo_quest
refs/heads/master
/modelo_quest/apps/treinamentoOOP/forms.py
# -*- coding: utf-8 -*- from django import forms from modelo_quest.apps.treinamentoOOP.models import * class PesquisadorForm(forms.ModelForm): class Meta: model = Pesquisador fields = ['nome',] abstract = True class DocenteForm(PesquisadorForm): class Meta: model = Docente ...
{"/modelo_quest/apps/treinamentoOOP/urls.py": ["/modelo_quest/apps/treinamentoOOP/views.py", "/modelo_quest/apps/treinamentoOOP/forms.py"]}
96,724
miwakawaguti/modelo_quest
refs/heads/master
/modelo_quest/apps/treinamentoOOP/urls.py
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from modelo_quest.apps.treinamentoOOP.models import * from modelo_quest.apps.treinamentoOOP.views import * from modelo_quest.apps.treinamentoOOP.forms import * urlpatterns = patterns('', url(r'^$', ListarDocente.as_view(), name='list_notes...
{"/modelo_quest/apps/treinamentoOOP/urls.py": ["/modelo_quest/apps/treinamentoOOP/views.py", "/modelo_quest/apps/treinamentoOOP/forms.py"]}
96,725
miwakawaguti/modelo_quest
refs/heads/master
/modelo_quest/apps/treinamentoOOP/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Pesquisador', fields=[ ('id', models.AutoField(...
{"/modelo_quest/apps/treinamentoOOP/urls.py": ["/modelo_quest/apps/treinamentoOOP/views.py", "/modelo_quest/apps/treinamentoOOP/forms.py"]}
96,726
miwakawaguti/modelo_quest
refs/heads/master
/modelo_quest/apps/treinamentoOOP/views.py
# -*- coding: utf-8 -*- from django.shortcuts import render from django.core.urlresolvers import reverse_lazy from modelo_quest.apps.treinamentoOOP.models import * from django.views.generic import View #Importar para usar class-based-views (CBV) from vanilla import CreateView, DeleteView, ListView, UpdateView class C...
{"/modelo_quest/apps/treinamentoOOP/urls.py": ["/modelo_quest/apps/treinamentoOOP/views.py", "/modelo_quest/apps/treinamentoOOP/forms.py"]}
96,727
miwakawaguti/modelo_quest
refs/heads/master
/modelo_quest/apps/treinamentoOOP/viewsExemplo.py
# -*- coding: utf-8 -*- from django.shortcuts import render from django.core.urlresolvers import reverse_lazy from treinametoOOP.models import * # Create your views here. # Exemplo de FBV def preco_alterar(request): if request.method == 'GET': preco = Preco_cartao.objects.get(id = id_preco_cartao) ...
{"/modelo_quest/apps/treinamentoOOP/urls.py": ["/modelo_quest/apps/treinamentoOOP/views.py", "/modelo_quest/apps/treinamentoOOP/forms.py"]}
96,731
leejaek/thePlaces
refs/heads/main
/user/views.py
import json import re from datetime import timedelta from django.http import JsonResponse from django.views import View from django.utils import timezone import jwt import bcrypt from .models import User from local_settings import SECRET_KEY, ALGORITHM REGEX_EMAIL = '([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+(\.[a-zA-Z]{2...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,732
leejaek/thePlaces
refs/heads/main
/place/tests.py
import json from django.test import TestCase, Client from django.utils import timezone from .models import MetroRegion, LocalRegion, PlaceType, Place class CreateTest(TestCase): def setUp(self): test_metro = MetroRegion.objects.create(name='테스트광역시') test_local = LocalRegion.objects.create(nam...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,733
leejaek/thePlaces
refs/heads/main
/place/models.py
from django.db import models class MetroRegion(models.Model): """광역 지역 (특별시, 광역시, 도, 특별자치시, 특별자치도)""" name = models.CharField(max_length=20, unique = True) class Meta: db_table = 'metro_regions' class LocalRegion(models.Model): """지역 (시, 구, 읍, 면, 동)""" name = models.CharField(max_...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,734
leejaek/thePlaces
refs/heads/main
/place/views.py
import json import re from django.http import JsonResponse from django.views import View from django.utils import timezone from .models import MetroRegion, LocalRegion, PlaceType, Place REGEX_ROAD_ADDRESS = '(([가-힣A-Za-z·\d~\-\.]{2,}(로|길).[\d]+)|([가-힣A-Za-z·\d~\-\.]+(읍|동)\s)[\d]+)' class PlaceCreateView(View): ...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,735
leejaek/thePlaces
refs/heads/main
/user/tests.py
import json import bcrypt import jwt from django.test import TestCase, Client from user.models import User from local_settings import SECRET_KEY, ALGORITHM class SignUpTest(TestCase): def tearDown(self): User.objects.all().delete() def test_signup(self): client = Client() data = { ...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,736
leejaek/thePlaces
refs/heads/main
/place/urls.py
from django.urls import path from .views import PlaceCreateView, PlaceView urlpatterns = [ path('/', PlaceCreateView.as_view()), path('/<int:place_pk>', PlaceView.as_view()) ]
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,737
leejaek/thePlaces
refs/heads/main
/archive/urls.py
from django.urls import path from .views import CheckInView, CheckInDeleteView, ReviewView, ReviewUpdateDeleteView urlpatterns = [ path('/checkin/place/<int:place_pk>', CheckInView.as_view()), path('/checkin/<int:checkin_pk>', CheckInDeleteView.as_view()), path('/review/place/<int:place_pk>', ReviewView.a...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,738
leejaek/thePlaces
refs/heads/main
/archive/tests.py
import json import bcrypt import jwt from datetime import timedelta from django.test import TestCase, Client from django.utils import timezone from .models import CheckIn, Review from place.models import MetroRegion, LocalRegion, PlaceType, Place from user.models import User from local_settings import SECRET_KEY, AL...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,739
leejaek/thePlaces
refs/heads/main
/archive/models.py
from django.db import models from place.models import Place from user.models import User class CheckIn(models.Model): user = models.ForeignKey('user.User', on_delete=models.CASCADE) place = models.ForeignKey('place.Place', on_delete=models.CASCADE) created_at = models.DateTimeField(auto_now_ad...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,740
leejaek/thePlaces
refs/heads/main
/user/models.py
from django.db import models class User(models.Model): """유저 테이블""" email = models.EmailField() password = models.CharField(max_length = 150) nickname = models.CharField(max_length=20) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,741
leejaek/thePlaces
refs/heads/main
/place/migrations/0001_initial.py
# Generated by Django 3.1.3 on 2021-03-04 05:02 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='LocalRegion', fields=[ ...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,742
leejaek/thePlaces
refs/heads/main
/archive/views.py
import json from django.http import JsonResponse from django.views import View from django.utils import timezone from django.db.models import Count from .models import CheckIn, Review from user.models import User from place.models import Place from user.utils import id_auth class CheckInView(View): @id_auth ...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,743
leejaek/thePlaces
refs/heads/main
/user/utils.py
import jwt import json from functools import wraps from django.utils import timezone from django.http import JsonResponse from user.models import User from local_settings import SECRET_KEY, ALGORITHM def id_auth(func): @wraps(func) def decorated_function(self, request, *args, **kwargs): try: ...
{"/user/views.py": ["/user/models.py"], "/place/tests.py": ["/place/models.py"], "/place/views.py": ["/place/models.py"], "/user/tests.py": ["/user/models.py"], "/place/urls.py": ["/place/views.py"], "/archive/urls.py": ["/archive/views.py"], "/archive/tests.py": ["/archive/models.py", "/place/models.py", "/user/models...
96,747
flaneuse/biodata-portal
refs/heads/master
/discovery/config.py
# pylint: disable=unused-wildcard-import, wildcard-import, unused-import, invalid-name ''' Discovery App Configuration ''' from biothings.web.settings.default import * from tornado.web import RedirectHandler from discovery.web.handlers import APP_LIST as WEB_ENDPOINTS # **********************************...
{"/discovery/config.py": ["/discovery/web/handlers.py"], "/discovery/index.py": ["/discovery/web/settings.py"], "/discovery/web/handlers.py": ["/discovery/web/siteconfig.py"]}
96,748
flaneuse/biodata-portal
refs/heads/master
/discovery/web/siteconfig.py
# DO NOT comment out # (REQ) REQUIRED # ***************************************************************************** # DATA DISCOVERY ENGINE - MAIN (REQ) # ***************************************************************************** # name also used on metadata SITE_NAME = "NIAID Data Portal" SITE_DESC = 'An aggr...
{"/discovery/config.py": ["/discovery/web/handlers.py"], "/discovery/index.py": ["/discovery/web/settings.py"], "/discovery/web/handlers.py": ["/discovery/web/siteconfig.py"]}
96,749
flaneuse/biodata-portal
refs/heads/master
/discovery/web/settings.py
from biothings.web.settings import BiothingESWebSettings from elasticsearch_dsl.connections import connections from elasticsearch import ConnectionSelector class KnownLiveSelecter(ConnectionSelector): """ Select the first connection all the time """ def select(self, connections): return conne...
{"/discovery/config.py": ["/discovery/web/handlers.py"], "/discovery/index.py": ["/discovery/web/settings.py"], "/discovery/web/handlers.py": ["/discovery/web/siteconfig.py"]}
96,750
flaneuse/biodata-portal
refs/heads/master
/discovery/index.py
''' Tornado Web Server Starting Script - Application Entry Point ''' import logging import os from biothings.web.index_base import main from discovery.web.settings import DiscoveryWebSettings WEB_SETTINGS = DiscoveryWebSettings(config='config') SRC_PATH = os.path.dirname(os.path.abspath(__file__)) STATIC_PATH = os....
{"/discovery/config.py": ["/discovery/web/handlers.py"], "/discovery/index.py": ["/discovery/web/settings.py"], "/discovery/web/handlers.py": ["/discovery/web/siteconfig.py"]}
96,751
flaneuse/biodata-portal
refs/heads/master
/discovery/web/handlers.py
# pylint: disable=abstract-method, arguments-differ, missing-docstring ''' Discovery Web Tornado Request Handler''' import json import logging import os from jinja2 import Environment, FileSystemLoader from tornado.httputil import url_concat import sass from biothings.web.api.helper import BaseHandler as BioThingsB...
{"/discovery/config.py": ["/discovery/web/handlers.py"], "/discovery/index.py": ["/discovery/web/settings.py"], "/discovery/web/handlers.py": ["/discovery/web/siteconfig.py"]}
96,758
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/setup.py
import setuptools with open("readme.md", "r") as fh: long_description = fh.read() REQUIRE = [] with open("requirements.txt", "r") as f: requirements = f.readlines() REQUIRE = [r.strip() for r in requirements if not r.startswith("#")] setuptools.setup( name="cloudQueryLogAndNotify", version="0.0....
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,759
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/cloudQueryLogAndNotify/notifications.py
import json import requests # import slack from .settings import logger from .notificationMessageFormat import DefaultSlackFormatMessage from .customExceptions import ( IgnoreMessage, MissingArgs ) class BaseNotification: def __init__(self): self._format_message_objs = self.init_format_message()...
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,760
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py
import json import datetime from dataclasses import dataclass @dataclass class AlarmData: status: str alert_name: str alert_level: str alert_description: str current_state: str old_state: str alert_reason: str state_change_utc_time: str metric_name: str statistic: str unit:...
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,761
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/cloudQueryLogAndNotify/notificationMessageFormat.py
import time import json from datetime import datetime from .baseClass import BaseSlackFormartMessage from .settings import DEFAULT_SLACK_MESSAGE_COLOR class DefaultSlackFormatMessage(BaseSlackFormartMessage): def __init__(self): self.template = { "attachments": [ { ...
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,762
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/cloudQueryLogAndNotify/queryLogInsight.py
import time import boto3 class AWSCloudWatchLogInsightQuery: def __init__(self, client=None, access_key_id=None, secret_key=None, region=None, log_groups=None, log_limit=10): if client: self.client = client elif access_key_id and secret_key and region: self.session = sessi...
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,763
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/cloudQueryLogAndNotify/customExceptions.py
class IgnoreMessage(Exception): pass class MissingArgs(Exception): pass
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,764
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/cloudQueryLogAndNotify/settings.py
import logging import os logger = logging.getLogger() def setLogLevel(log_level): logger.setLevel(log_level) def get_logger(): return logger DEFAULT_SLACK_MESSAGE_COLOR = os.getenv("DEFAULT_SLACK_MESSAGE_COLOR", "#c48b9f")
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,765
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/cloudQueryLogAndNotify/baseClass.py
from .customExceptions import IgnoreMessage class BaseFormatMessage: def validate(self, message): return True def ignore_message(self): raise IgnoreMessage("ignore_message") def format(self, message): if self.validate(message): return self.format_message(messa...
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,766
diepthuyhan/cloudQueryLogAndNotify
refs/heads/master
/cloudQueryLogAndNotify/__init__.py
from .settings import ( setLogLevel, get_logger ) from .notifications import ( BaseNotification, SlackNotification ) from .queryLogInsight import AWSCloudWatchLogInsightQuery from .notificationMessageFormat import ( DefaultSlackFormatMessage ) from .baseClass import ( BaseSlackFormartMessage...
{"/cloudQueryLogAndNotify/notifications.py": ["/cloudQueryLogAndNotify/settings.py", "/cloudQueryLogAndNotify/notificationMessageFormat.py", "/cloudQueryLogAndNotify/customExceptions.py"], "/cloudQueryLogAndNotify/aws/lambdaCloudwatchSnsParse.py": ["/cloudQueryLogAndNotify/__init__.py"], "/cloudQueryLogAndNotify/notifi...
96,791
konraddroptable/wykop-crawler
refs/heads/master
/Wykop/spiders/wykop.py
import scrapy import re from Wykop.items import WykopItem, Comment, Subcomment, Author import datetime class WykopSpider(scrapy.Spider): name = "Wykop" allowed_domains = ["wykop.pl"] start_urls = ["http://www.wykop.pl/strona/" + str(i) + "/" for i in range(1, 2794)] xpath_url = "//div[@class='grid-mai...
{"/Wykop/spiders/wykop.py": ["/Wykop/items.py"]}
96,792
konraddroptable/wykop-crawler
refs/heads/master
/Wykop/items.py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class Author(scrapy.Item): username = scrapy.Field() signup_date = scrapy.Field() nick_color = scrapy.Field() class Subcomment(scrapy.Item)...
{"/Wykop/spiders/wykop.py": ["/Wykop/items.py"]}
96,855
mayotte203/vkosubot
refs/heads/master
/osu/beatmap.py
class OSUBeatmap: def __init__(self, set_id=0, map_id=0, artist="", title="", creator="", genre=0, language=0, difficulty={}): self.set_id = set_id self.map_id = map_id self.artist = artist self.title = title self.creator = creator self.genre = genre self.lang...
{"/bot/bot.py": ["/osu/account.py", "/osu/api.py"], "/osu/api.py": ["/osu/account.py", "/osu/beatmap.py"]}
96,856
mayotte203/vkosubot
refs/heads/master
/osu/account.py
class OSUAccount: user_id = 0 username = "" playcount = 0 ranked_score = 0 total_score = 0 pp_rank = 0 pp_raw = 0 accuracy = 0.0
{"/bot/bot.py": ["/osu/account.py", "/osu/api.py"], "/osu/api.py": ["/osu/account.py", "/osu/beatmap.py"]}
96,857
mayotte203/vkosubot
refs/heads/master
/bot/bot.py
import vk_api import re from vk_api.longpoll import VkLongPoll, VkEventType import random import datetime from osu.account import OSUAccount from osu.api import OSUApi import json class bot: class State: MENU_STATE = 1 SETTINGS_STATE = 2 NOTIFICATIONS_STATE = 3 GENRES_STATE = 4 ...
{"/bot/bot.py": ["/osu/account.py", "/osu/api.py"], "/osu/api.py": ["/osu/account.py", "/osu/beatmap.py"]}
96,858
mayotte203/vkosubot
refs/heads/master
/osu/api.py
import urllib import json from osu.account import OSUAccount from osu.beatmap import OSUBeatmap class OSUApi: def __init__(self, token): self.token = token def get_osu_account(self, username): request = "https://osu.ppy.sh/api/get_user?k=" + self.token + "&" + urllib.parse.urlencode({'u': use...
{"/bot/bot.py": ["/osu/account.py", "/osu/api.py"], "/osu/api.py": ["/osu/account.py", "/osu/beatmap.py"]}
96,859
TaftT/deployassignment
refs/heads/master
/payPds_db.py
import os import psycopg2 import psycopg2.extras import urllib.parse # def dict_factory(cursor, row): # d = {} # for idx, col in enumerate(cursor.description): # d[col[0]] = row[idx] # return d class payPdsDB: def __init__(self): urllib.parse.uses_netloc.append("postgres...
{"/server.py": ["/payPds_db.py"]}
96,860
TaftT/deployassignment
refs/heads/master
/teste.py
from passlib.hash import bcrypt # if self.path == "/hello": # self.send_responce(200) # self.send_header("Set-Cookie", "type=ChocolaTeChip") # self.send_header("Set-Cookie", "size=VeryHuge") # self.end_headers() # # return def encryptPass(password): hash = bcrypt.hash(password) ret...
{"/server.py": ["/payPds_db.py"]}
96,861
TaftT/deployassignment
refs/heads/master
/server.py
from http.server import BaseHTTPRequestHandler, HTTPServer from urllib.parse import parse_qs, urlencode from payPds_db import payPdsDB, usersDB from http import cookies from passlib.hash import bcrypt from sessionstore import SessionStore import json import datetime import sys sessionStore = SessionStore() ...
{"/server.py": ["/payPds_db.py"]}
96,862
musegay/SMCR
refs/heads/main
/Dgl_Graph.py
# -*- coding: utf-8 -*- """ Created on Mon Nov 8 14:51 2021 @author: musegay """ import torch.nn as nn import torch import dgl import numpy as np from DataManager import DataManager from scipy.sparse import coo_matrix from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence class Encod...
{"/MultihopSparseTopicRNN.py": ["/Dgl_Graph.py", "/SparseGraphAttention.py"]}
96,863
musegay/SMCR
refs/heads/main
/MultihopSparseTopicRNN.py
# -*- coding: utf-8 -*- """ Created on Sun Dec 30 12:28:54 2018 @author: truthless """ import random import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from Dat...
{"/MultihopSparseTopicRNN.py": ["/Dgl_Graph.py", "/SparseGraphAttention.py"]}
96,864
musegay/SMCR
refs/heads/main
/SparseGraphAttention.py
# -*- coding: utf-8 -*- """ Created on Mon Nov 8 14:51 2021 @author: musegay """ import torch import torch.nn as nn import dgl.function as fn from dgl.nn.pytorch import edge_softmax import numpy as np import torch.nn.functional as F from torch.utils.tensorboard import SummaryWriter sig = nn.Sigmoid() ...
{"/MultihopSparseTopicRNN.py": ["/Dgl_Graph.py", "/SparseGraphAttention.py"]}
96,865
ES-Alexander/DIY-sky-imager
refs/heads/master
/makebinary.py
# Cloud coverage computation for on-board computation import os import cv2 import numpy as np from datetime import datetime def preprocess(image): """ Preprocess 'image' to help separate cloud and sky. """ B, G, R = cv2.split(image) # extract the colour channels # construct a ratio between the b...
{"/makebinary.py": ["/cmask.py"], "/capture_image.py": ["/makebinary.py"]}
96,866
ES-Alexander/DIY-sky-imager
refs/heads/master
/cmask.py
# This function generates the circular mask for the input fish-eye image # Input: # center = center co-ordanates of the image (row, col) # radius = radius of the circular image # array = input image # Output: # image_mask = binary output image import numpy as np def cmask(center, radius, image): c_y, c_x = cente...
{"/makebinary.py": ["/cmask.py"], "/capture_image.py": ["/makebinary.py"]}
96,867
ES-Alexander/DIY-sky-imager
refs/heads/master
/capture_image.py
import os import sys from datetime import datetime from makebinary import makebinary # enable switching to picamera from commandline call (pass in 'picamera') if len(sys.argv) == 1: capture_method = 'gphoto' else: capture_method = sys.argv[1] basedir = '/home/pi/Pictures' # The radius in pixels of the fisheye...
{"/makebinary.py": ["/cmask.py"], "/capture_image.py": ["/makebinary.py"]}
96,884
singh1114/facility-booking
refs/heads/master
/custom_exceptions.py
class DateFormatNotValidException(Exception): def __init__(self): super().__init__('Format of date is not correct.') class TimeFormatNotValidException(Exception): def __init__(self): super().__init__('Time format is not correct.') class FeatureNotAvailableException(Exception): def __in...
{"/book_facility.py": ["/custom_exceptions.py", "/constants.py", "/utils.py"], "/tests/tests.py": ["/book_facility.py", "/custom_exceptions.py"]}
96,885
singh1114/facility-booking
refs/heads/master
/book_facility.py
from abc import ABCMeta, abstractmethod import time import datetime from custom_exceptions import ( CantBookFacility, CantBookVariablePricing, DateFormatNotValidException, TimeFormatNotValidException ) from constants import ClubHouse, TennisCourt from utils import get_hour_bucket_from_slot class Bas...
{"/book_facility.py": ["/custom_exceptions.py", "/constants.py", "/utils.py"], "/tests/tests.py": ["/book_facility.py", "/custom_exceptions.py"]}
96,886
singh1114/facility-booking
refs/heads/master
/constants.py
class ClubHouse: """Club house constants.""" # ('start_time', 'end_time'): hourly_price SLOT_MAP = { ('10:00', '16:00'): 100, ('16:00', '22:00'): 500, } class TennisCourt: """Tennis Court constants.""" HOURLY_PRICE = 50
{"/book_facility.py": ["/custom_exceptions.py", "/constants.py", "/utils.py"], "/tests/tests.py": ["/book_facility.py", "/custom_exceptions.py"]}
96,887
singh1114/facility-booking
refs/heads/master
/utils.py
def get_hour_bucket_from_slot(slot): slot_hour_tuple = list() slot_hour_tuple.append(int(slot[0].split(':')[0])) slot_hour_tuple.append(int(slot[1].split(':')[0])) return slot_hour_tuple
{"/book_facility.py": ["/custom_exceptions.py", "/constants.py", "/utils.py"], "/tests/tests.py": ["/book_facility.py", "/custom_exceptions.py"]}
96,888
singh1114/facility-booking
refs/heads/master
/tests/tests.py
import unittest from book_facility import BookClubHouse, BookFacility, BookTennisCourt from custom_exceptions import CantBookFacility class TestBookFacility(unittest.TestCase): def test_tennis_court_booking(self): facility = 'Tennis Court' date = '2019-01-27' start_time = '10:00' ...
{"/book_facility.py": ["/custom_exceptions.py", "/constants.py", "/utils.py"], "/tests/tests.py": ["/book_facility.py", "/custom_exceptions.py"]}
96,904
Ilyakrasnyak/otus_oop_homework
refs/heads/main
/test_geometrical_figures.py
from pytest import raises, mark def test_necessary_fields_exist(figure): assert figure.area == 1 assert figure.perimeter == 1 assert figure.name in ["triangle", "rectangle", "square", "circle"] assert figure.angles in [4, 3, 0] @mark.parametrize("init_val", [("one", 1), (2.01, 1), ([1, 2, 3], 1)]) d...
{"/conftest.py": ["/geometrical_figures.py"]}
96,905
Ilyakrasnyak/otus_oop_homework
refs/heads/main
/geometrical_figures.py
from abc import ABC class GeometricalFigure(ABC): def __init__(self, area: int, perimeter: int): self.area = area self.perimeter = perimeter self._name = None self._angles = None @property def area(self): return self._area @area.setter def area(self, valu...
{"/conftest.py": ["/geometrical_figures.py"]}
96,906
Ilyakrasnyak/otus_oop_homework
refs/heads/main
/conftest.py
from pytest import fixture from geometrical_figures import Triangle, Rectangle, Square, Circle @fixture(params=[Triangle(1, 1), Rectangle(1, 1), Square(1, 1), Circle(1, 1)], scope="session") def figure(request): return request.param @fixture(params=[Triangle, ...
{"/conftest.py": ["/geometrical_figures.py"]}
96,907
swampxiix/addr
refs/heads/master
/Xmas.py
from Template import Template from tools import get_all_contacts, get_xmas_by_year import time class Xmas (Template): def writeContent(self): wr = self.writeln showaddr = self.request().fields().get('showaddr', '') nowyr = time.localtime(time.time())[0] got_cards = get_xmas_by_yea...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,908
swampxiix/addr
refs/heads/master
/Login.py
from Template import Template from tools import * import glob, os from tools import is_logged_in, ismatch class Login (Template): def writeBodyParts(self): self.writeContent() def writeContent(self): wr = self.writeln if self.request()._environ.get('REQUEST_METHOD') == 'POST': ...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,909
swampxiix/addr
refs/heads/master
/Form.py
from Template import Template from tools import text, get_one_contact class Form (Template): def writeContent(self): wr = self.writeln editMode = 0 qs = self.request().fields() ###################################################### # 'edit' in query string *must* also have ...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,910
swampxiix/addr
refs/heads/master
/Handler.py
from Template import Template import random, string from tools import writePick class Handler(Template): def getID(self, fn, sn): r = random.randint(0, 999) rn = string.zfill(r, 3) id = fn[0] + sn + rn return id def writeContent(self): wr = self.writeln form = ...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,911
swampxiix/addr
refs/heads/master
/ToggleXmas.py
from Template import Template from tools import toggle_card_recipient class ToggleXmas (Template): def writeContent(self): form = self.request().fields() cid = form.get('cid') yr = form.get('yr') toggle_card_recipient(yr, cid) redir = 'Main#%s' % (form.get('bookmark')) ...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,912
swampxiix/addr
refs/heads/master
/Logout.py
from Template import Template class Logout (Template): def title(self): return 'Logging Out...' def writeContent(self): self.session().invalidate() self.response().sendRedirect('Login')
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,913
swampxiix/addr
refs/heads/master
/View.py
from Template import Template from tools import get_mod, get_one_contact class View(Template): def writeContent(self): wr = self.writeln qs = self.request().fields() cid = qs.get('cid') from_archive = qs.get('archived') if from_archive: pick = get_one_contact(c...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,914
swampxiix/addr
refs/heads/master
/DoDel.py
from Template import Template from tools import CDIR import os class DoDel(Template): def writeContent(self): cid = self.request().fields().get('cid') os.unlink(os.path.join(CDIR, cid)) redir = 'Main' self.response().sendRedirect(redir)
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,915
swampxiix/addr
refs/heads/master
/Main.py
from Template import Template from tools import get_mod, get_all_contacts, get_xmas_by_year import time class Main (Template): def writeContent(self): nowyr = time.localtime(time.time())[0] got_cards = get_xmas_by_year(nowyr) # list wr = self.writeln foundLetters = [] cur...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,916
swampxiix/addr
refs/heads/master
/Archived.py
from Template import Template from tools import get_all_contacts class Archived (Template): def writeContent(self): wr = self.writeln contacts = get_all_contacts(archived=True) sns = contacts.keys() sns.sort() wr('<table>') for surname in sns: pick, snl ...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,917
swampxiix/addr
refs/heads/master
/Template.py
from WebKit.Page import Page from tools import is_logged_in, get_all_contacts import string class Template (Page): def writeStyleSheet (self): self.writeln('<link rel="stylesheet" href="./default.css" type="text/css">') self.writeln('<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/fon...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,918
swampxiix/addr
refs/heads/master
/Delete.py
from Template import Template from tools import get_one_contact class Delete(Template): def writeContent(self): wr = self.writeln cid = self.request().fields().get('cid') pick = get_one_contact(cid) name = '%s %s' % (pick.get('fn'), pick.get('sn')) wr('<h2>Delete %s?</h2>' ...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,919
swampxiix/addr
refs/heads/master
/Archive.py
from Template import Template from tools import get_one_contact, archive_contact class Archive (Template): def writeContent(self): wr = self.writeln cid = self.request().fields().get('cid') pick = get_one_contact(cid) name = '%s %s' % (pick.get('fn'), pick.get('sn')) if s...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,920
swampxiix/addr
refs/heads/master
/tools.py
import cPickle, os.path, sha, time, glob, shutil states = {'Alabama': 'AL', 'Alaska': 'AK', 'Arizona': 'AZ', 'Arkansas': 'AR', 'California': 'CA', 'Colorado': 'CO', 'Connecticut': 'CT', 'Delaware': 'DE', 'District of Columbia': 'DC', 'Florida': 'FL', 'Georgia': 'GA', 'Hawaii': 'HI', 'Idaho': 'ID', 'Illinois': 'IL', 'I...
{"/Xmas.py": ["/Template.py", "/tools.py"], "/Login.py": ["/Template.py", "/tools.py"], "/Form.py": ["/Template.py", "/tools.py"], "/Handler.py": ["/Template.py", "/tools.py"], "/ToggleXmas.py": ["/Template.py", "/tools.py"], "/Logout.py": ["/Template.py"], "/View.py": ["/Template.py", "/tools.py"], "/DoDel.py": ["/Tem...
96,931
deekshith-hari/twitterclone
refs/heads/master
/tweet/urls.py
from django.urls import path from . import views urlpatterns = [ path('', views.home, name='home'), path('update/<int:pk>/', views.update_tweet, name='update_tweet'), path('delete/<int:pk>/', views.delete_tweet, name='delete_tweet'), path('like_tweet/<int:pk>/', views.like_tweet, name='like_tweet'), ]
{"/accounts/views.py": ["/accounts/models.py"], "/tweet/views.py": ["/tweet/models.py", "/accounts/models.py"]}
96,932
deekshith-hari/twitterclone
refs/heads/master
/accounts/views.py
from django.shortcuts import render, redirect from .forms import RegisterForm, ProfileForm from django.contrib import messages from django.contrib.auth.decorators import login_required from .models import Profile from django.contrib.auth.models import User def register(request): if request.method == 'POST': ...
{"/accounts/views.py": ["/accounts/models.py"], "/tweet/views.py": ["/tweet/models.py", "/accounts/models.py"]}
96,933
deekshith-hari/twitterclone
refs/heads/master
/tweet/models.py
from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.urls import reverse from cloudinary.models import CloudinaryField # Create your models here. class Tweet(models.Model): body = models.TextField(max_length=140) likes = models.ManyToManyField(Us...
{"/accounts/views.py": ["/accounts/models.py"], "/tweet/views.py": ["/tweet/models.py", "/accounts/models.py"]}
96,934
deekshith-hari/twitterclone
refs/heads/master
/tweet/views.py
from django.shortcuts import render, redirect from .models import Tweet from django.contrib.auth.models import User from django.views.generic import ListView, CreateView from django.contrib.auth.decorators import login_required from django.views.generic import UpdateView, DeleteView from .forms import TweetForm from ac...
{"/accounts/views.py": ["/accounts/models.py"], "/tweet/views.py": ["/tweet/models.py", "/accounts/models.py"]}
96,935
deekshith-hari/twitterclone
refs/heads/master
/accounts/models.py
from django.db import models from django.contrib.auth.models import User from cloudinary.models import CloudinaryField # Create your models here. class Profile(models.Model): user = models.OneToOneField(User, on_delete = models.CASCADE) image = CloudinaryField(blank=True) bio = models.TextField(default=''...
{"/accounts/views.py": ["/accounts/models.py"], "/tweet/views.py": ["/tweet/models.py", "/accounts/models.py"]}