index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
23,785
ddu365/datawhale-code
refs/heads/master
/task2/array.py
class DynamicArray: def __init__(self, capacity=10): self._capacity = capacity self._array = [None] * self._capacity self._size = 0 def __str__(self): return str([e for e in self]) def __iter__(self): for i in range(self._capacity): yield self._array[i] ...
{"/task1/linkedlist_test.py": ["/task1/linkedlist.py"], "/task2/array_test.py": ["/task2/array.py"], "/task5/priority_queue.py": ["/task5/heap.py"], "/task2/trie_test.py": ["/task2/trie.py"]}
23,786
ddu365/datawhale-code
refs/heads/master
/task3/heap_sort.py
""" 堆是一种完全二叉树的数据结构 算法流程: 1.将待排序列表构建成完全二叉树 2.调整完全二叉树节点的顺序,使其成为最大堆(初始无序区),即父节点大于孩子节点[从最后一个父节点开始从右往左从下往上地调整,调整后还需反向检查调整后的节点是否满足最大堆的性质] 3.将堆顶元素L[1]与最后一个元素L[n]交换,得到新的无序区(L[1],L[2]...,L[n-1])和新的有序区L[n] 4.将新得到的无序区调整为最大堆,然后再次将调整后的最大堆的堆顶元素L[1]与最后一个元素L[n-1]交换,得到新的无序区(L[1],L[2]...,L[n-2])和新的有序区L[n-1],L[n] 5.重复上述过程直到有序区元素的个数为n-1 参...
{"/task1/linkedlist_test.py": ["/task1/linkedlist.py"], "/task2/array_test.py": ["/task2/array.py"], "/task5/priority_queue.py": ["/task5/heap.py"], "/task2/trie_test.py": ["/task2/trie.py"]}
23,787
ddu365/datawhale-code
refs/heads/master
/task2/trie_test.py
import task2.trie as trie if __name__ == '__main__': try: t = trie.Trie() t.insert('hello') t.insert('he') t.search('hello') print(t.search('he')) print(t.search('hel')) print(t.search('hello')) print(t.starts_with('hell')) except Exception as e:...
{"/task1/linkedlist_test.py": ["/task1/linkedlist.py"], "/task2/array_test.py": ["/task2/array.py"], "/task5/priority_queue.py": ["/task5/heap.py"], "/task2/trie_test.py": ["/task2/trie.py"]}
23,792
BANZZAAAIIII/Search_and_Sort
refs/heads/master
/search.py
import math from typing import List def binary_search(dataset, city_value, lat_value): def search(data, left_index, right_index): if right_index > 1: middle = (left_index + right_index) // 2 # Is using isclose a good idea? 41.728_ has a lot of cities if math.isclose(data[middle]["lat"], lat_value) and dat...
{"/main.py": ["/search.py", "/sorts.py"]}
23,793
BANZZAAAIIII/Search_and_Sort
refs/heads/master
/sorts.py
from typing import List, Optional import random import math merge_count = 0 node_count = 0 def reset_globals(): global merge_count global node_count merge_count = 0 node_count = 0 def calculateDistance(lat1, lng1): """" uses haversine formula from: https://www.movable-type.co.uk/scripts/latlong.html a = sin...
{"/main.py": ["/search.py", "/sorts.py"]}
23,794
BANZZAAAIIII/Search_and_Sort
refs/heads/master
/main.py
import random from operator import itemgetter from itertools import groupby from random import shuffle import filemanager import filemanager as fm import search import sorts def main(): dataset = fm.get_data() print("1.1:") sorted_by_lat = sorts.mergesort(list(dataset), "lat") print(f"\tnumber of merges done: {...
{"/main.py": ["/search.py", "/sorts.py"]}
23,795
KimSunUk/confidant
refs/heads/master
/tests/unit/confidant/encrypted_settings_test.py
import unittest from mock import patch from mock import Mock from confidant import settings from confidant.encrypted_settings import EncryptedSettings class EncprytedSettingsTest(unittest.TestCase): def test_register(self): enc_set = EncryptedSettings(None) enc_set.register('Foo', 'Bar') ...
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,796
KimSunUk/confidant
refs/heads/master
/tests/__init__.py
# Make the tests directory a python module # so that all unit tests are reported as part of the tests package. import os # Inject mandatory environment variables env_settings = [ ('SESSION_SECRET', 'secret'), ('DYNAMODB_TABLE', 'confidant-testing'), ('DYNAMODB_URL', 'http://dynamo:7777'), ('DYNAMODB_...
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,797
KimSunUk/confidant
refs/heads/master
/confidant/utils/__init__.py
import statsd from confidant.app import app stats = statsd.StatsClient( app.config['STATSD_HOST'], app.config['STATSD_PORT'], prefix='confidant' )
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,798
KimSunUk/confidant
refs/heads/master
/confidant/routes/__init__.py
from confidant.routes import static_files # noqa from confidant.routes import v1 # noqa from confidant.routes import saml # noqa
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,799
KimSunUk/confidant
refs/heads/master
/tests/unit/confidant/ciphermanager_test.py
import unittest from nose.tools import assert_raises from cryptography.fernet import Fernet from confidant.ciphermanager import CipherManager from confidant.ciphermanager import CipherManagerError class CipherManagerTest(unittest.TestCase): def test_cipher_version_2(self): key = Fernet.generate_key() ...
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,800
KimSunUk/confidant
refs/heads/master
/confidant/models/__init__.py
from confidant.app import app from confidant.utils.dynamodb import create_dynamodb_tables if app.config['DYNAMODB_CREATE_TABLE']: create_dynamodb_tables()
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,801
KimSunUk/confidant
refs/heads/master
/confidant/utils/misc.py
def dict_deep_update(a, b): """ Deep merge in place of two dicts. For all keys in `b`, override matching keys in `a`. If both `a` and `b` have a dict at a given key, recursively update `a`. :param a: Left hand side dict to update in place :type a: dict :param b: Right hand side with values...
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,802
KimSunUk/confidant
refs/heads/master
/confidant/models/connection_cls.py
import pynamodb.connection from confidant.app import app class DDBConnection(pynamodb.connection.Connection): def __init__(self, *args, **kwargs): super(DDBConnection, self).__init__(*args, **kwargs) _timeout_secs = app.config['PYNAMO_REQUEST_TIMEOUT_SECONDS'] self._request_timeout_second...
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,803
KimSunUk/confidant
refs/heads/master
/confidant/routes/v1.py
#python은 기본적으로 json 표준 라이브러리 제공, 라이브러리 사용시 python타입의 object를 json문자열로 변경가능(json인코딩), 또한 json문자열을 다시 python타입으로 변환 가능(json디코딩) import json #uuid는 기본적으로 어떤 개체(데이터)를 고유하게 식별하는 데 사용되는 16바이트 길이의 숫 예 : 022db29c-d0e2-11e5-bb4c-60f81dca7676 import uuid #객체를 복사하기 위한 용도 import copy #로그를 찍기위한 라이브러리 import logging #base64인코딩,디코딩을 ...
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,804
KimSunUk/confidant
refs/heads/master
/confidant/models/session_cls.py
from botocore.vendored.requests import Session as BotoRequestsSession from botocore.vendored.requests.adapters import HTTPAdapter as BotoHTTPAdapter from confidant.app import app class DDBSession(BotoRequestsSession): def __init__(self): super(DDBSession, self).__init__() self.mount('https://', B...
{"/confidant/routes/v1.py": ["/confidant/utils/__init__.py"]}
23,809
laranea/coronavirus-wallpaper
refs/heads/master
/wallpaper.py
import os import ctypes import PIL import api import config from PIL import Image, ImageFilter, ImageDraw, ImageFont d = os.getcwd() # Get current working dir globally def set_wallpaper_from_file(filename: str): use = os.path.normpath(config.resource_path(filename)) ctypes.windll.user32.SystemParametersInfoW(...
{"/wallpaper.py": ["/api.py"]}
23,810
laranea/coronavirus-wallpaper
refs/heads/master
/api.py
import COVID19Py correspondence = { "Thailand":0, "Japan":1, "Singapore":2, "Nepal":3, "Malaysia":4, "British Columbia, CA":5, "New South Wales, AU":6, "Victoria, AU":7, "Queensland, AU":8, "Cambodia":9, "Sri Lanka":10, "Germany":11, "Finland":12, "United Arab Emirates":13, ...
{"/wallpaper.py": ["/api.py"]}
23,886
johnfelipe/pmg-cms-2
refs/heads/master
/backend/models.py
from random import random import string import datetime import logging from sqlalchemy import desc, Index from sqlalchemy.orm import backref from sqlalchemy import UniqueConstraint from flask.ext.security import UserMixin, RoleMixin, \ Security, SQLAlchemyUserDatastore from flask.ext.sqlalchemy import models_comm...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,887
johnfelipe/pmg-cms-2
refs/heads/master
/backend/admin.py
from app import app, db from models import * from flask import Flask, flash, redirect, url_for, request, render_template, g, abort from flask.ext.admin import Admin, expose, BaseView, AdminIndexView from flask.ext.admin.contrib.sqla import ModelView from flask.ext.admin.form import RenderTemplateWidget from flask.ext.a...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,888
johnfelipe/pmg-cms-2
refs/heads/master
/backend/s3_upload.py
import boto import boto.s3 from boto.s3.key import Key import boto.s3.connection import math import os from app import db, app import logging UPLOAD_PATH = app.config['UPLOAD_PATH'] S3_BUCKET = app.config['S3_BUCKET'] logger = logging.getLogger(__name__) def rounded_megabytes(bytes): megabytes = bytes / float(...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,889
johnfelipe/pmg-cms-2
refs/heads/master
/fabfile.py
from __future__ import with_statement from fabdefs import * from fabric.api import * from contextlib import contextmanager @contextmanager def virtualenv(): with cd(env.project_dir): with prefix(env.activate): yield def rebuild_db(): sudo("supervisorctl stop pmg_cms") with virtualenv...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,890
johnfelipe/pmg-cms-2
refs/heads/master
/backend/app.py
import logging import logging.config from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import sys import os from flask_mail import Mail env = os.environ.get('FLASK_ENV', 'development') app = Flask(__name__, static_folder="not_static") app.config.from_pyfile('../config/%s/config.py' % env) db = SQLAl...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,891
johnfelipe/pmg-cms-2
refs/heads/master
/frontend/views.py
import logging from flask import request, flash, make_response, url_for, session, render_template, abort, redirect from frontend import app import requests from datetime import datetime, date import dateutil.parser import urllib import math import random import arrow import re import json API_HOST = app.config['API_HO...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,892
johnfelipe/pmg-cms-2
refs/heads/master
/frontend/__init__.py
import logging import logging.config from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os os.environ['PMG_LAYER'] = 'frontend' env = os.environ.get('FLASK_ENV', 'development') app = Flask(__name__, static_folder="static") app.config.from_pyfile('../config/%s/config.py' % env) db = SQLAlchem...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,893
johnfelipe/pmg-cms-2
refs/heads/master
/backend/search.py
import sys import math import argparse import logging import requests from pyelasticsearch import ElasticSearch from sqlalchemy import types from inflection import underscore, camelize from app import db, app import models from transforms import * class Search: esserver = app.config['ES_SERVER'] index_name ...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,894
johnfelipe/pmg-cms-2
refs/heads/master
/backend/transforms.py
from bs4 import BeautifulSoup class Transforms: @classmethod def data_types(cls): return cls.convert_rules.keys() # If there is a rule defined here, the corresponding CamelCase model # will be indexed convert_rules = { "committee": { "id": "id", "title": "na...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,895
johnfelipe/pmg-cms-2
refs/heads/master
/frontend/user_management.py
from flask import render_template, g, request, redirect, session, url_for, abort, flash from frontend import app from views import ApiException, load_from_api import os import forms import requests from requests import ConnectionError import json import logging API_HOST = app.config['API_HOST'] logger = logging.getLog...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,896
johnfelipe/pmg-cms-2
refs/heads/master
/rebuild_db.py
import os import json import time, datetime import parsers import logging import csv import re import requests from sqlalchemy import types from backend.app import app, db from backend.models import * from backend.search import Search from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound from sqlalchemy ...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,897
johnfelipe/pmg-cms-2
refs/heads/master
/parsers/main.py
from backend.app import logging from datetime import datetime import json class MyParser(): def __init__(self): print "i'm a parser" def strip_rtf(self, rtf_str): if rtf_str: return unicode(rtf_str.replace('\\"', '').replace('\\r', '').replace('\\n', '').replace('\\t', '')) ...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,898
johnfelipe/pmg-cms-2
refs/heads/master
/scrapers/scraper.py
from datetime import datetime import requests from lxml import html from flask import Flask import re import sys from cssselect import GenericTranslator import argparse import sys, os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) from backend.app import app, db from backend import mo...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,899
johnfelipe/pmg-cms-2
refs/heads/master
/backend/views.py
import logging from app import db, app from models import * import flask from flask import g, request, abort, redirect, url_for, session, make_response import json from sqlalchemy import func, or_, distinct, desc from sqlalchemy.orm import joinedload from sqlalchemy.orm.exc import NoResultFound import datetime from ope...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,900
johnfelipe/pmg-cms-2
refs/heads/master
/sync_content.py
import boto import boto.s3 from boto.s3.key import Key import boto.s3.connection import datetime import math import os from os.path import isfile, isdir, join def rounded_megabytes(bytes): megabytes = bytes/float(1024*1024) megabytes = math.ceil(megabytes*1000)/1000 # round the float return megabytes ...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,901
johnfelipe/pmg-cms-2
refs/heads/master
/backend/utils.py
from __future__ import division import nltk def levenshtein(first, second): """ Return a similarity ratio of two pieces of text. 0 means the strings are not similar at all, 1.0 means they're identical. This is the Levenshtein ratio: (lensum - ldist) / lensum where lensum is the sum of the length...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,902
johnfelipe/pmg-cms-2
refs/heads/master
/fabdefs.py
from fabric.api import * """ Define the server environments that this app will be deployed to. Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work. """ def production(): """ Env parameters for the production environment. """ env.host_string = 'ubuntu@new.pmg.org.za...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,903
johnfelipe/pmg-cms-2
refs/heads/master
/config/development/config.py
DEBUG = True SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://pmg:pmg@localhost/pmg' SECRET_KEY = "AEORJAEONIAEGCBGKMALMAENFXGOAERGN" API_HOST = "http://api.pmg.dev:5001/" FRONTEND_HOST = "http://pmg.dev:5000/" SESSION_COOKIE_DOMAIN = "pmg.dev" RESULTS_PER_PAGE = 50 SQLALCHEMY_ECHO = False STATIC_HOST = "http://eu-west...
{"/fabfile.py": ["/fabdefs.py"], "/frontend/user_management.py": ["/frontend/__init__.py"]}
23,904
slavi104/frog_leap_puzzle_python
refs/heads/master
/tests.py
from hw1 import * # test next_step function if next_step([-1, -1, -1, 0, 1, 1, 1]) == [-1, 0, -1, -1, 1, 1, 1]: print('OK') else: print(next_step([-1, -1, -1, 0, 1, 1, 1])) # if next_step(generate_start_step(3)) == [-1, 0, -1, -1, 1, 1, 1]: print('OK') else: print(next_step(generate_start_step(3))) # if next_st...
{"/tests.py": ["/hw1.py"]}
23,905
slavi104/frog_leap_puzzle_python
refs/heads/master
/hw1_work2.py
# HW 1 #!python3 import threading from queue import Queue import time def generate_final_step(n): n = int(n) elements_number = (2*n)+1 final_step = [0] * elements_number for i in range(0, elements_number): if (i < n): final_step[i] = 1; elif (i == n): final_step[i] = 0; else: final_step[i] = -1; ...
{"/tests.py": ["/hw1.py"]}
23,906
slavi104/frog_leap_puzzle_python
refs/heads/master
/hw1.py
# HW 1 #!python3 import sys, getopt CALCULATIONS = 0 def generate_final_step(n): n = int(n) elements_number = (2*n)+1 final_step = [0] * elements_number for i in range(0, elements_number): if (i < n): final_step[i] = 1; elif (i == n): final_step[i] = 0; ...
{"/tests.py": ["/hw1.py"]}
23,926
NitayRe/Team-Yafo
refs/heads/master
/dice.py
import pygame import random as rnd class Dice: IMGS = [pygame.image.load("number1.png") ,pygame.image.load("number2.png") ,pygame.image.load("number3.png") ,pygame.image.load("number4.png") ,pygame.image.load("number5.png") ,pygame.image.load("number6.png")] def __init__(self, x, y): ...
{"/logic.py": ["/pieces.py", "/dice.py", "/game.py"], "/game.py": ["/pieces.py", "/dice.py", "/logic.py"]}
23,927
NitayRe/Team-Yafo
refs/heads/master
/logic.py
import pieces import dice import pygame as pg from game import message_display, whichStack import time WHITE = pieces.Piece.WHITE BLACK = pieces.Piece.BLACK clock = pg.time.Clock() homeBlack = {x for x in range(6)} homeWhite = {x for x in range(23, 23-6, -1)} # assume islegal function was called before, and the move ...
{"/logic.py": ["/pieces.py", "/dice.py", "/game.py"], "/game.py": ["/pieces.py", "/dice.py", "/logic.py"]}
23,928
NitayRe/Team-Yafo
refs/heads/master
/pieces.py
import pygame as pg WIDTH = 800 HEIGHT = 600 class Piece: BLACK = 0,0,0 WHITE = 255,255,255 def __init__(self, color): self.color = color def getColor(self): return self.color def draw(self, screen, x, y): pg.draw.circle(screen, self.getColor(), (x + 45, y), 20) oppColor = 255-self.color[0], 255-s...
{"/logic.py": ["/pieces.py", "/dice.py", "/game.py"], "/game.py": ["/pieces.py", "/dice.py", "/logic.py"]}
23,929
NitayRe/Team-Yafo
refs/heads/master
/game.py
import pygame as pg from pieces import Stack, Piece, OutStack from dice import Dice import logic WIDTH = 800 HEIGHT = 600 DIFF_X=65 screen = pg.display.set_mode((WIDTH, HEIGHT)) background_image = pg.image.load("background.bmp") clock = pg.time.Clock() stacks = [] stackX = 0 stackY = 0 for _ in range(12): st...
{"/logic.py": ["/pieces.py", "/dice.py", "/game.py"], "/game.py": ["/pieces.py", "/dice.py", "/logic.py"]}
23,930
tina-pivk/Minesweeper
refs/heads/master
/minesweeper2.py
import tkinter as tk import model2 BARVE = ['0', 'blue2', 'green2', 'red4', 'purple1', 'cyan3', 'DarkOrange1', 'state gray', 'DarkGoldenrod2'] def meni(): meni_vrstica = tk.Menu(okno) meni_seznam = tk.Menu(okno, tearoff=0) meni_seznam.add_command(label='lahko', command=lambda: nova_igra(8, 8, 10))...
{"/minesweeper2.py": ["/model2.py"]}
23,931
tina-pivk/Minesweeper
refs/heads/master
/model2.py
from random import randint MEJNA = '#' PRAZNA = '0' ZADETA_BOMBA = 'B' NEVELJAVNA_POTEZA = '*' class Polje: def __init__(self, vrstica, stolpec): self.vrstica = vrstica self.stolpec = stolpec self.oznacena = False self.sosednje_bombe = 0 def __repr__(self): ...
{"/minesweeper2.py": ["/model2.py"]}
23,938
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/Nodo.py
class Nodo(): def __init__(self,nombre,fila,columna,f,c): self.fila = fila self.columna = columna self.nombre = nombre self.f = f self.c = c
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,939
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/celda.py
class Celda(): def __init__(self,a,b,d): self.fila = a self.columna = b self.valor = d def getFila(self): return self.fila def getColumna(self): return self.columna def getValor(self): return self.valor
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,940
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/NodoMatriz.py
class NodoMatriz(): def __init__(self,dato,fila,columna): self.dato = dato self.fila = fila self.columna = columna self.siguiente = None self.atras = None self.arriba = None self.abajo = None def getDato(self): return self.dato
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,941
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/main.py
from tkinter import Tk,Button,Label,Entry from tkinter import ttk import copy import webbrowser import time import subprocess from tkinter.colorchooser import askcolor from tkinter.filedialog import askopenfilename from tkinter.filedialog import askdirectory import xml.etree.ElementTree as ET from xml.etree.ElementTree...
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,942
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/NodoLista.py
class NodoLista(): def __init__(self,matriz,nombre,fila,columna): self.matriz = matriz self.nombre = nombre self.fila = fila self.columna = columna self.siguiente = None self.atras = None
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,943
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/Matriz.py
from Nodo import Nodo from ListaDoble import ListaDoble from NodoMatriz import NodoMatriz from NodoEncabezado import NodoEncabezado class Matriz(): def __init__(self,nombre,f,c): listaDeListas = ListaDoble() listaDeColumna = ListaDoble() self.primero = Nodo(nombre,listaDeListas,lista...
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,944
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/prueba.py
import subprocess path = 'indexx.pdf' subprocess.Popen([path], shell=True)
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,945
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/NodoEncabezado.py
class NodoEncabezado(): def __init__(self,identificador): self.identificador = identificador self.siguiente = None self.atras = None self.Nodo = None
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,946
EstuardoReyes/IPC2_Proyecto2_201709015
refs/heads/main
/Ventana.py
from tkinter import Tk, Label, Button class Main: def __init__(self, master): self.master = master master.title("Una simple interfaz gráfica") self.etiqueta = Label(master, text="Esta es la primera ventana!") self.etiqueta.pack() self.botonSaludo = Button(master, text="Saluda...
{"/main.py": ["/Matriz.py", "/NodoLista.py"], "/Matriz.py": ["/Nodo.py", "/NodoMatriz.py", "/NodoEncabezado.py"]}
23,947
venieri/cancan
refs/heads/master
/videopoker/views.py
import random import logging import pickle from django import forms from django.contrib.auth.decorators import login_required from django.shortcuts import render from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache from django.views.generic import TemplateView def...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,948
venieri/cancan
refs/heads/master
/accounts/templatetags/casino_tags.py
''' Created on Oct 24, 2011 @author: tvassila ''' import time #=============================================================================== # import copy # from django.template import TemplateSyntaxError, Node, Variable, Library # from django.utils.datastructures import SortedDict #=======================...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,949
venieri/cancan
refs/heads/master
/cancan/urls.py
"""cancan URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,950
venieri/cancan
refs/heads/master
/accounts/migrations/0003_auto_20200102_1847.py
# Generated by Django 3.0.1 on 2020-01-02 18:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_account_score'), ] operations = [ migrations.RenameField( model_name='account', old_name='address',...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,951
venieri/cancan
refs/heads/master
/accounts/urls.py
from django.urls import path from . import views urlpatterns = [ path('cashier/', views.Cashier.as_view(), name='cashier'), path('transactions/', views.Transactions.as_view(), name='transactions'), path('buy/', views.Buy.as_view(), name='buy'), ]
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,952
venieri/cancan
refs/heads/master
/accounts/models.py
from django.db import models # Create your models here. from django.contrib.auth.models import User class Account(models.Model): class Meta: permissions = ( ("play", "Can play in the casino"), ) OPENING_BALANCE = 5000 # This field is required. user = models.OneToOneField(...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,953
venieri/cancan
refs/heads/master
/accounts/views.py
from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache from django.views.generic import TemplateView from django.views.generic.list import ListView from django.shortcuts import render from django.http import Ht...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,954
venieri/cancan
refs/heads/master
/cancan/views.py
import random from django.http import HttpResponseRedirect from django.shortcuts import render from django.views.generic import TemplateView from accounts.models import Account from django import forms from django.forms import ModelForm from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from ...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,955
venieri/cancan
refs/heads/master
/roulette/urls.py
from django.urls import path from . import views urlpatterns = [ path('', views.Spin.as_view(), name='roulette'), ]
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,956
venieri/cancan
refs/heads/master
/jackpot/views.py
import random from django.http import HttpResponseRedirect from django.shortcuts import render from django.views.generic import TemplateView from accounts.models import Account from django import forms from django.forms import ModelForm from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from ...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,957
venieri/cancan
refs/heads/master
/accounts/admin.py
from django.contrib import admin import logging logger = logging.getLogger(__name__) from django.contrib import admin, messages from . import models class AccountLineInline(admin.TabularInline): model = models.AccountLine extra = 0 list_filter = ['status'] search_fields = ['entry_type', 'amount'] ...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,958
venieri/cancan
refs/heads/master
/utils/cards.py
import logging log = logging.getLogger(__name__) from random import shuffle, randint class Card: def __init__(self, ordinal=0, value=0, suite=0, open=0): self.ordinal = ordinal self.value = value self.suite = suite self.open = open and 1 or 0 def hide(self): self.ope...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,959
venieri/cancan
refs/heads/master
/jackpot/urls.py
from django.urls import path from . import views urlpatterns = [ path('', views.Jackpot.as_view(), name='jackpot'), ]
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,960
venieri/cancan
refs/heads/master
/cancan/forms.py
''' Created on Oct 21, 2011 @author: tvassila ''' from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from django.contrib.auth import authenticate, login from django.http import HttpResponseRedirect from django.utils.decorators import method_decorator from django.views.d...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,961
venieri/cancan
refs/heads/master
/videopoker/apps.py
from django.apps import AppConfig class VideopokerConfig(AppConfig): name = 'videopoker'
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
23,962
venieri/cancan
refs/heads/master
/roulette/views.py
from django.shortcuts import render # Create your views here. ''' Created on Oct 27, 2011 @author: tvassila ''' # Create your views here. import logging, json, time logger = logging.getLogger(__name__) from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.u...
{"/videopoker/views.py": ["/utils/cards.py"], "/cancan/views.py": ["/accounts/models.py"], "/jackpot/views.py": ["/accounts/models.py"], "/cancan/forms.py": ["/accounts/models.py"]}
24,003
Sirtsu55/Rocket-car
refs/heads/master
/drone.py
import pygame from pygame.sprite import Sprite import random class Drone(): def __init__(self, settings, screen): '''make a drone and then spawn it at the top''' self.screen = screen self.settings = settings #load the drone self.image = pygame.image.load('img\drone.png') ...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,004
Sirtsu55/Rocket-car
refs/heads/master
/button.py
import pygame.font import pygame class Button(): def __init__(self,settings, screen, msg): pygame.init() """make a button to start the game""" self.screen = screen self.settings = settings self.screen_rect = screen.get_rect() self.width, self.height = 200, 50 ...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,005
Sirtsu55/Rocket-car
refs/heads/master
/functions.py
import sys import pygame import random from bullet import Bullet from drone import Drone from car import Car from points import PointButton def collision(bullets, drones, settings, car): for bullet in bullets: bullet.collision_bullet(drones, settings, bullets) for drone in drones: car.collisi...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,006
Sirtsu55/Rocket-car
refs/heads/master
/car2.py
import pygame import time from stats import Stats class Car2(): def __init__(self, settings, screen): '''Car class and its start''' self.screen = screen self.settings = settings #load the car file self.image = pygame.image.load('img\car.png') self.car_rect = self.im...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,007
Sirtsu55/Rocket-car
refs/heads/master
/settings.py
class Settings(): def __init__(self): '''settings for the game''' # screen settings self.screen_w = 1000 #screen width self.screen_h = 600 #screen height self.bg_colour = (60,60,60) self.speed = 1 self.b_speed = 5 self.bullet_w = 40 self.bul...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,008
Sirtsu55/Rocket-car
refs/heads/master
/line.py
import pygame class Line(): def __init__(self, screen): '''a class for line''' self.screen = screen self.image = pygame.image.load('img\line.png') self.rect = self.image.get_rect() self.screen_rect = self.screen.get_rect() self.rect.centery = self.screen_rect.cente...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,009
Sirtsu55/Rocket-car
refs/heads/master
/stats.py
import sys class Stats(): """a class whre all the game stats will be""" def __init__(self, settings, drones, bullets): self.settings = settings self.bullets = bullets self.drones = drones self.settings = settings self.active = False self.two_player = False de...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,010
Sirtsu55/Rocket-car
refs/heads/master
/bullet.py
import pygame from pygame.sprite import Sprite from stats import Stats class Bullet(Sprite): def __init__(self, settings, screen, car): '''a bullet that is fired from the car''' super().__init__() self.screen = screen #make a Bullet self.rect = pygame.Rect(0, 0,settings.bull...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,011
Sirtsu55/Rocket-car
refs/heads/master
/game.py
import pygame import functions as f from settings import Settings from car import Car from line import Line from pygame.sprite import Group from stats import Stats from car2 import Car2 from button import Button from points import PointButton def run_game(): d_settings = Settings() screen = pygame.display.set_...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,012
Sirtsu55/Rocket-car
refs/heads/master
/points.py
import pygame import pygame.font class PointButton(): pygame.init() '''points counter''' def __init__(self, settings, screen, points): self.screen = screen self.settings = settings self.screen_rect = self.screen.get_rect() self.width, self.height = 200, 20 self.b_co...
{"/functions.py": ["/bullet.py", "/drone.py", "/points.py"], "/car2.py": ["/stats.py"], "/bullet.py": ["/stats.py"], "/game.py": ["/functions.py", "/settings.py", "/line.py", "/stats.py", "/car2.py", "/button.py", "/points.py"]}
24,030
Hcode4/pythonEveryDay
refs/heads/master
/OpFactory.py
import SpliteColumn import WriteExcel def op_factory(filePath): opType = input("请输入操作类型: \n 1. 按照某一列数据切割多行\n") opType = int(opType) if opType == 1: a = input("输入需要按某一列分行的列数,从0开始计数\n") a = int(a) b = input("输入间隔方式,如,等 注意中英文\n") tables = SpliteColumn.read_excel(filePath, ...
{"/OpFactory.py": ["/SpliteColumn.py", "/WriteExcel.py"], "/ReadExcel.py": ["/OpFactory.py"]}
24,031
Hcode4/pythonEveryDay
refs/heads/master
/SpliteColumn.py
# -*- coding: utf-8 -*- import xlrd import copy def read_excel(excelPath, splitCols, splitePattern): tables = [] # 打开文件 workbook = xlrd.open_workbook(excelPath) # sheet索引从0开始 sheet = workbook.sheet_by_index(0) for rown in range(sheet.nrows): array = [""] * sheet.ncols for ncol...
{"/OpFactory.py": ["/SpliteColumn.py", "/WriteExcel.py"], "/ReadExcel.py": ["/OpFactory.py"]}
24,032
Hcode4/pythonEveryDay
refs/heads/master
/ReadExcel.py
# -*- coding: utf-8 -*- import OpFactory if __name__ == '__main__': # 读取Excel filePath = input("输入文件路径, 请将\\ 改为 / 如 C:/Users/16146/Desktop/test.xls\n") OpFactory.op_factory(filePath)
{"/OpFactory.py": ["/SpliteColumn.py", "/WriteExcel.py"], "/ReadExcel.py": ["/OpFactory.py"]}
24,033
Hcode4/pythonEveryDay
refs/heads/master
/WriteExcel.py
import xlwt def writeExcel(table, localPath, numberCount, numberRange): workbook = xlwt.Workbook(localPath) # 在文件中创建一个名为TEST的sheet,不加名字默认为sheet1 worksheet = workbook.add_sheet("deal") for columnIndex in range(numberCount): for rangeIndex in range(numberRange): worksheet.write(col...
{"/OpFactory.py": ["/SpliteColumn.py", "/WriteExcel.py"], "/ReadExcel.py": ["/OpFactory.py"]}
24,047
ailling/webtest
refs/heads/master
/tests/compat.py
# -*- coding: utf-8 -*- import sys try: # py < 2.7 import unittest2 as unittest except ImportError: import unittest try: unicode() except NameError: u = str b = bytes else: def b(value): return str(value) def u(value): if isinstance(value, unicode): return v...
{"/tests/test_cookie.py": ["/tests/compat.py"]}
24,048
ailling/webtest
refs/heads/master
/tests/test_cookie.py
import webtest from webob import Request from tests.compat import unittest from webtest.compat import to_bytes def cookie_app(environ, start_response): req = Request(environ) status = "200 OK" body = '<html><body><a href="/go/">go</a></body></html>' headers = [ ('Content-Type', 'text/html'), ...
{"/tests/test_cookie.py": ["/tests/compat.py"]}
24,050
yashmahes/AppyHigh
refs/heads/master
/appyhigh/myapp/urls.py
from django.urls import include, path from rest_framework import routers from . import views router = routers.DefaultRouter() router.register('users', views.UserViewSet) router.register('foods', views.FoodViewSet) app_name = "movies" # Wire up our API using automatic URL routing. # Additionally, we include login URLs...
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,051
yashmahes/AppyHigh
refs/heads/master
/appyhigh/myapp/admin.py
from django.contrib import admin from .models import Food, User admin.site.register(Food) admin.site.register(User)
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,052
yashmahes/AppyHigh
refs/heads/master
/appyhigh/myapp/migrations/0003_auto_20190628_1742.py
# Generated by Django 2.1.7 on 2019-06-28 12:12 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('myapp', '0002_food_user_id'), ] operations = [ migrations.RemoveField( model_name='user', ...
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,053
yashmahes/AppyHigh
refs/heads/master
/appyhigh/common/validations.py
import re from datetime import date from common.messages import PASSWORD_VALIDATE, EMAIL_EXIST_MESSAGE, EMAIL_NOT_EXIST_MESSAGE from django.forms.utils import ValidationError from myapp.models import User, Food def validate_password(password): if len(password) < 7: raise ValidationError(PASSWORD_VALIDATE)...
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,054
yashmahes/AppyHigh
refs/heads/master
/appyhigh/myapp/views.py
from rest_framework import viewsets from .serializers import UserSerializer, FoodSerializer, RegisterSerializer, LoginSerializer from .models import User, Food from django.shortcuts import render, get_list_or_404, get_object_or_404, redirect from .forms import FoodForm, SearchFoodForm, LoginForm, RegisterForm from rest...
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,055
yashmahes/AppyHigh
refs/heads/master
/appyhigh/common/messages.py
REQUIRED = "This field is required" REGISTERED_SUCCESSFULLY = "Registered Successfully" EMAIL_VALID = "Please enter a valid email" PASSWORD_VALIDATE = "The password must be 7 to 12 characters long" EMAIL_EXIST_MESSAGE = "This email is already registered" INVALID_DETAIL = "Please provide valid credentials" ACCESS_TOKEN_...
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,056
yashmahes/AppyHigh
refs/heads/master
/appyhigh/myapp/models.py
from django.db import models # Create your models here. class Food(models.Model): name = models.CharField(max_length=255) carbohydrates_amount = models.IntegerField() fats_amount = models.IntegerField() proteins_amount = models.IntegerField() user_id = models.IntegerField() def __str__(self)...
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,057
yashmahes/AppyHigh
refs/heads/master
/appyhigh/myapp/serializers.py
from rest_framework import serializers from common.messages import REQUIRED, EMAIL_VALID from common.validations import validate_password, validate_email, validate_forgot_password_email, validate_phone_number from django.contrib.auth.hashers import make_password from .models import User, Food class RegisterSerializer...
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,058
yashmahes/AppyHigh
refs/heads/master
/appyhigh/myapp/forms.py
from .models import Food from django import forms class FoodForm(forms.Form): name = forms.CharField(max_length=255) carbohydrates_amount = forms.IntegerField() fats_amount = forms.IntegerField() proteins_amount = forms.IntegerField() class SearchFoodForm(forms.Form): food_name = forms.CharField...
{"/appyhigh/myapp/admin.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/views.py": ["/appyhigh/myapp/serializers.py", "/appyhigh/myapp/models.py", "/appyhigh/myapp/forms.py"], "/appyhigh/myapp/serializers.py": ["/appyhigh/myapp/models.py"], "/appyhigh/myapp/forms.py": ["/appyhigh/myapp/models.py"]}
24,062
nmtsylla/touba_fact
refs/heads/master
/blog/models.py
#-*-coding: utf-8-* from django.db import models from django.contrib.auth.models import User # Create your models here. class Profil(models.Model): user = models.OneToOneField(User) def __unicode__(self): return "Profil: {0}".format(self.user.username) class Categorie(models.Model): nom_catego...
{"/blog/views.py": ["/blog/models.py", "/blog/forms.py"]}
24,063
nmtsylla/touba_fact
refs/heads/master
/blog/views.py
#-*-coding:utf-8-* # Create your views here. from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, render_to_response from datetime import datetime from blog.models import Article from blog.forms import ContactForm, ArticleForm, LoginForm from django.contrib.auth import authenticate, login, logo...
{"/blog/views.py": ["/blog/models.py", "/blog/forms.py"]}
24,064
nmtsylla/touba_fact
refs/heads/master
/blog/forms.py
#-*-coding:utf-8-* from django import forms from models import Article class ContactForm(forms.Form): sujet = forms.CharField(max_length=100, label="Sujet:", required=True) message = forms.CharField(widget=forms.Textarea, label="Message:", required=True) envoyeur = forms.EmailField(label="Votre adresse mai...
{"/blog/views.py": ["/blog/models.py", "/blog/forms.py"]}
24,065
nmtsylla/touba_fact
refs/heads/master
/blog/urls.py
from django.conf.urls import patterns, url __author__ = 'nmtsylla' urlpatterns = patterns('blog.views', url(r'^$', 'homepage'), url(r'^login/$', 'connexion'), url(r'^logout/$', 'deconnexion'), url(r'^add_fact/$', 'add'), url(r'about/$', 'about'), url(r'mouridisme/$', 'mouridisme'), url(r'...
{"/blog/views.py": ["/blog/models.py", "/blog/forms.py"]}
24,086
sumitsk/HER
refs/heads/master
/model.py
import torch.nn as nn import torch import torch.nn.functional as F def weights_init(m): classname = m.__class__.__name__ if classname.find('Conv') != -1 or classname.find('Linear') != -1: nn.init.xavier_normal_(m.weight.data) # nn.init.orthogonal_(m.weight.data) if m.bias is not None: ...
{"/main.py": ["/utils.py", "/arguments.py", "/learner.py", "/policy.py"], "/policy.py": ["/model.py", "/replay_buffer.py", "/her.py", "/normalizer.py", "/utils.py"]}