index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
46,844
maciejbiesek/poleval-cyberbullying
refs/heads/master
/config.py
import configparser class Parser: def __init__(self): self.parser = configparser.ConfigParser() self.parser.read("params.ini") def get_section(self, section_name): return dict(self.parser.items(section_name)) def get_sections(self, section_names): args = {} for se...
{"/run_svm.py": ["/dataset.py", "/models/svm_classifier.py"], "/utils.py": ["/config.py"], "/dataset.py": ["/config.py"], "/models/flair_classifier.py": ["/config.py"], "/run_rnn.py": ["/config.py", "/dataset.py", "/models/gru_classifier.py", "/utils.py"], "/models/svm_classifier.py": ["/config.py"], "/run_flair.py": [...
46,846
brynpatel/Deck-of-cards
refs/heads/master
/black_jack.py
from deck_of_cards import * def check(card1, card2): if card1.number == card2.number: check = True #Add special cards elif card1.suit == card2.suit: check = True else: check = False return check def turn(myCard, myHand, opponentsHand, deck): cardplayed = False w...
{"/black_jack.py": ["/deck_of_cards.py"]}
46,847
brynpatel/Deck-of-cards
refs/heads/master
/deck_of_cards.py
import random class Card: """ The Card class represents a single playing card and is initialised by passing a suit and number. """ def __init__(self, suit, number): self._suit = suit self._number = number def __repr__(self): return self._number + " of " + self._suit ...
{"/black_jack.py": ["/deck_of_cards.py"]}
46,856
onionwyl/score-crawler
refs/heads/master
/score.py
import requests import getpass import os import io, sys from decaptcha import decaptcha from bs4 import BeautifulSoup sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='gb18030') print('\n********** 欢迎使用东北大学研究生成绩查询系统 **********') s = requests.Session() url_home = "http://219.216.96.73/pyxx/login.aspx" req = s.g...
{"/score.py": ["/decaptcha.py"]}
46,857
onionwyl/score-crawler
refs/heads/master
/decaptcha.py
from PIL import Image import pytesseract def decaptcha(image="code.jpg"): # 替换列表 rep = {'O': '0', 'D': '0', 'I': '1', 'L': '1', 'T': '7', 'Z': '2', 'S': '8', 'E': '8', 'A': '8', 'B': '8' }; im = Image.open(image) # im = im.convert("L") threshold = 54 ...
{"/score.py": ["/decaptcha.py"]}
46,858
Josedaniel98/Cotizaciones
refs/heads/master
/api/serializers/historialProducto.py
from rest_framework import serializers from api.models import historialProducto class historialProductoSerializer(serializers.ModelSerializer): class Meta: model = historialProducto fields = '__all__' class historialProductoRegistroSerializer(serializers.ModelSerializer): class Meta: m...
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,859
Josedaniel98/Cotizaciones
refs/heads/master
/api/viewsets/cotizaciones.py
import json from django.core.files import File from django_filters.rest_framework import DjangoFilterBackend from rest_framework import status, filters, viewsets from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from rest_framework.decorators import action from rest_framework...
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,860
Josedaniel98/Cotizaciones
refs/heads/master
/api/models/__init__.py
from .profile import Profile from .productos import Producto from .cotizaciones import Cotizacion from .historialProducto import historialProducto
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,861
Josedaniel98/Cotizaciones
refs/heads/master
/api/models/historialProducto.py
from django.db import models from django.contrib.auth.models import User class historialProducto(models.Model): id_producto=models.IntegerField() nombre = models.CharField(max_length=15) activo = models.BooleanField(default=True) creado = models.DateTimeField(auto_now_add=True) modificado = m...
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,862
Josedaniel98/Cotizaciones
refs/heads/master
/api/viewsets/productos.py
import json from django.core.files import File from django_filters.rest_framework import DjangoFilterBackend from rest_framework import status, filters, viewsets from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from rest_framework.decorators import action from rest_framework...
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,863
Josedaniel98/Cotizaciones
refs/heads/master
/api/viewsets/__init__.py
from .user import UserViewset from .productos import ProductoViewset from .cotizaciones import CotizacionViewset from .historialProducto import historialProductoViewset
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,864
Josedaniel98/Cotizaciones
refs/heads/master
/api/viewsets/historialProducto.py
import json from django.core.files import File from django_filters.rest_framework import DjangoFilterBackend from rest_framework import status, filters, viewsets from django.contrib.auth.models import User from rest_framework.authtoken.models import Token from rest_framework.decorators import action from rest_framework...
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,865
Josedaniel98/Cotizaciones
refs/heads/master
/api/models/cotizaciones.py
from django.db import models from django.contrib.auth.models import User class Cotizacion(models.Model): usuario = models.ForeignKey(User, on_delete=models.CASCADE, null=False) productos = models.ManyToManyField('Producto', related_name='producto') total= models.IntegerField(null=False) activo = ...
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,866
Josedaniel98/Cotizaciones
refs/heads/master
/api/serializers/cotizaciones.py
# Django REST framework from rest_framework import serializers # Model from api.models import Producto from api.models import Cotizacion class ProductoReadSerializer( serializers.ModelSerializer ): class Meta: model = Producto fields = ('id','nombre','descripcion','precio') class CotizacionReadS...
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,867
Josedaniel98/Cotizaciones
refs/heads/master
/api/serializers/__init__.py
from .user import UserSerializer, UserReadSerializer from .productos import ProductoSerializer, ProductoRegistroSerializer from .cotizaciones import CotizacionReadSerializer, CotizacionRegistroSerializer from .historialProducto import historialProductoSerializer, historialProductoRegistroSerializer
{"/api/serializers/historialProducto.py": ["/api/models/__init__.py"], "/api/viewsets/cotizaciones.py": ["/api/models/__init__.py", "/api/serializers/__init__.py"], "/api/models/__init__.py": ["/api/models/cotizaciones.py", "/api/models/historialProducto.py"], "/api/viewsets/productos.py": ["/api/models/__init__.py", "...
46,872
rfarrow1010/economistaudio
refs/heads/master
/playecon.py
#!/usr/bin/env python # Author: Ryan Farrow # Date created: 10 Apr 2020 # https://docs.python-guide.org/writing/structure/ # For the terminal scripting: # https://unix.stackexchange.com/questions/43075/how-to-change-the-contents-of-a-line-on-the-terminal-as-opposed-to-writing-a-new # http://www.tldp.org/HOWTO/NCURSE...
{"/src/play.py": ["/src/utils.py"]}
46,873
rfarrow1010/economistaudio
refs/heads/master
/src/unzip.py
#!/usr/bin/env python # Author: Ryan Farrow # Date: 16 May 2020 import zipfile import os def unzip(path, cleanup=False, dest=os.path.dirname(os.path.realpath(__file__))): """ Unzips the file with path given in first parameter. Deletes the zip file and puts the new folder in the specified destination, d...
{"/src/play.py": ["/src/utils.py"]}
46,874
rfarrow1010/economistaudio
refs/heads/master
/src/setup.py
#!/usr/bin/env python from distutils.core import setup, Extension def main(): ncurses = Extension('termUtils', sources = ['termUtils.c']) setup(name = 'termUtils', version = '1.0', description = 'Package for employing the ncurses terminal features in Economist Command Line Player', author='R...
{"/src/play.py": ["/src/utils.py"]}
46,875
rfarrow1010/economistaudio
refs/heads/master
/src/fetch.py
#!/usr/bin/env python # Author: Ryan Farrow # Date created: 10 Apr 2020 # For reference: https://people.csail.mit.edu/hubert/pyaudio/#docs # pydub: https://github.com/jiaaro/pydub # simpleaudio: https://simpleaudio.readthedocs.io/en/latest/tutorial.html import wave import time import sys, os def get_files(path): ...
{"/src/play.py": ["/src/utils.py"]}
46,876
rfarrow1010/economistaudio
refs/heads/master
/src/utils.py
#!/usr/bin/env python # Author: Ryan Farrow # Date created: 23 Jun 2020 # note: may just need to use the Python curses library documented here: # https://docs.python.org/3/howto/curses.html import curses def catalogue(playlist, labels): ''' Catalogues the articles into sections based on topic. Return a...
{"/src/play.py": ["/src/utils.py"]}
46,877
rfarrow1010/economistaudio
refs/heads/master
/src/play.py
#!/usr/bin/env python # Creates subprocess that plays audio, allowing parent process to take inputs # Requires mp3info to be present on the machine # Author: Ryan Farrow # Date created: 11 Apr 2020 import os, signal, subprocess, time import src.utils import ctypes, pathlib # main file needs to intelligently use th...
{"/src/play.py": ["/src/utils.py"]}
46,882
danielforgacs/NamingConvention
refs/heads/master
/basecls_test.py
import basecls import pytest @pytest.mark.parametrize('value', ( 1, (), [], 1.23, )) def test_StringType_is_string_only(value): class TestClass: testattr = basecls.StringType(attr='testattr') name = TestClass() name.testattr = '123' with pytest.raises(Exception): name.testat...
{"/basecls_test.py": ["/basecls.py"]}
46,883
danielforgacs/NamingConvention
refs/heads/master
/basecls.py
# module to create sanity checked strings like # product names. The string consist of multiple # elements. Rules for the elements come # from a configuration. class Descriptor: """ Root descriptor class. All elements are set here if they passed the tests in the subclasses. The attributes name must be ...
{"/basecls_test.py": ["/basecls.py"]}
46,908
toytag/LanguageModeling
refs/heads/master
/tokenizer.py
import re, json from collections import Counter class WordTokenizer: def __init__( self, vocab_file=None, vocab_size_limit=10000, min_freq=10, lowercase=True, special_tokens=[] ): pattern = r'[a-zA-Z0-9\']+|[,<.>/?;:\'\"\[...
{"/evaluate.py": ["/tokenizer.py", "/model.py"], "/dataset.py": ["/tokenizer.py"], "/train.py": ["/dataset.py", "/model.py"]}
46,909
toytag/LanguageModeling
refs/heads/master
/model.py
import torch from torch import nn from LearnTransformer import PositionalEncoding, TransformerBlock class LanguageModel(nn.Module): def __init__(self, n_vocab, d_model=256, d_hidden=1024, n_layer=8, n_head=8, d_k=32, d_v=32, n_position=64, dropout=0.1, embed_weight_sharing=True):...
{"/evaluate.py": ["/tokenizer.py", "/model.py"], "/dataset.py": ["/tokenizer.py"], "/train.py": ["/dataset.py", "/model.py"]}
46,910
toytag/LanguageModeling
refs/heads/master
/evaluate.py
import torch import torch.nn.functional as F from tokenizer import WordTokenizer from model import LanguageModel if __name__ == '__main__': tokenizer = WordTokenizer('models/tokenizer/tokenizer.json') checkpoint = torch.load('models/lm/latest.pth') model = LanguageModel(n_vocab=10000) ...
{"/evaluate.py": ["/tokenizer.py", "/model.py"], "/dataset.py": ["/tokenizer.py"], "/train.py": ["/dataset.py", "/model.py"]}
46,911
toytag/LanguageModeling
refs/heads/master
/preprocess.py
import os, shutil from tqdm.contrib.concurrent import thread_map data_dir = 'data/Gutenberg/txt/' txt_files = [(i, data_dir + file_name) for i, file_name in enumerate(os.listdir(data_dir))] split_file_dir = 'data/Gutenberg/split/' def proprocess(args): idx, file_name = args with open(file_name, 'r', encodin...
{"/evaluate.py": ["/tokenizer.py", "/model.py"], "/dataset.py": ["/tokenizer.py"], "/train.py": ["/dataset.py", "/model.py"]}
46,912
toytag/LanguageModeling
refs/heads/master
/dataset.py
import os, time from multiprocessing import Pool, Manager import numpy as np from tqdm import tqdm import torch from torch.utils.data import Dataset, DataLoader from tokenizer import WordTokenizer tokenizer = WordTokenizer('models/tokenizer/tokenizer.json') class TextDataset(Dataset): def __init__(self, txt_...
{"/evaluate.py": ["/tokenizer.py", "/model.py"], "/dataset.py": ["/tokenizer.py"], "/train.py": ["/dataset.py", "/model.py"]}
46,913
toytag/LanguageModeling
refs/heads/master
/train.py
import os, time import numpy as np from tqdm import tqdm import torch from torch import nn, optim import torch.nn.functional as F from torch.utils.tensorboard import SummaryWriter from dataset import TextDataLoaderIterator from model import LanguageModel device = torch.device('cuda' if torch.cuda.is_available() else...
{"/evaluate.py": ["/tokenizer.py", "/model.py"], "/dataset.py": ["/tokenizer.py"], "/train.py": ["/dataset.py", "/model.py"]}
46,919
siliconcortex/caminade_shop
refs/heads/master
/shop/standard_email.py
import yagmail def send_email(sender, contents): """yagmail is a library to manage google smtp in a more simpler manner, for more information, visit https://github.com/kootenpv/yagmail""" USERNAME = 'cortexsilicon' APP_PASSWORD = 'jnzbhrbqcsavnlhu' yag = yagmail.SMTP(USERNAME, APP_PASSWORD) #inp...
{"/shop/models.py": ["/shop/standard_email.py"], "/shop/views.py": ["/shop/standard_email.py"]}
46,920
siliconcortex/caminade_shop
refs/heads/master
/shop/models.py
from django.db import models from django.urls import reverse_lazy, reverse from .image_helpers import Thumbnail from django.contrib.auth.models import User from .standard_email import send_email # Create your models here. class Image(models.Model): caption = models.CharField(max_length = 100) image = models.Im...
{"/shop/models.py": ["/shop/standard_email.py"], "/shop/views.py": ["/shop/standard_email.py"]}
46,921
siliconcortex/caminade_shop
refs/heads/master
/shop/views.py
from django.shortcuts import render from django.urls import reverse_lazy, reverse from django.http import HttpResponse, HttpResponseRedirect from django.views.generic import View from . import models from . import forms from django.utils import timezone from django.views.generic.edit import FormView, CreateView, Dele...
{"/shop/models.py": ["/shop/standard_email.py"], "/shop/views.py": ["/shop/standard_email.py"]}
46,922
siliconcortex/caminade_shop
refs/heads/master
/shop/urls.py
from django.urls import path from . import views from django.urls import include, path app_name = 'shop' urlpatterns = [ path('item_list', views.IndexView.as_view(), name = 'item_list'), path('item_create', views.ItemCreateView.as_view(), name = 'item_create'), path('item_detail/<pk>', views.ItemDetailVi...
{"/shop/models.py": ["/shop/standard_email.py"], "/shop/views.py": ["/shop/standard_email.py"]}
46,923
mr-sagarmandal/modtran_requester
refs/heads/main
/csv_writer_utils.py
import csv import sys import utils from datetime import datetime def merge_lists(list1, list2): list1.extend(list2) return list1 def merge_dicts(base_dict, curr_dict): used_keys = {'x'} for key in base_dict.keys(): if key in used_keys: continue closest_key = '' clo...
{"/csv_writer_utils.py": ["/utils.py"], "/modtran_request.py": ["/modtran_client.py"], "/verification.py": ["/csv_writer_utils.py", "/formatting_utils.py"], "/modtran_client.py": ["/csv_writer_utils.py", "/formatting_utils.py", "/utils.py"]}
46,924
mr-sagarmandal/modtran_requester
refs/heads/main
/formatting_utils.py
import json def getFormattedData(content): flux_script = json.loads(content)['flux_script'] docs_json_first_ind = flux_script.index("docs_json = ") + len("docs_json = ") docs_json_end_ind = flux_script.index(";", docs_json_first_ind) docs_json = flux_script[docs_json_first_ind + 1:docs_json_end_ind - ...
{"/csv_writer_utils.py": ["/utils.py"], "/modtran_request.py": ["/modtran_client.py"], "/verification.py": ["/csv_writer_utils.py", "/formatting_utils.py"], "/modtran_client.py": ["/csv_writer_utils.py", "/formatting_utils.py", "/utils.py"]}
46,925
mr-sagarmandal/modtran_requester
refs/heads/main
/modtran_request.py
import modtran_client ## rtmode choices are: RT_SOLAR_AND_THERMAL, RT_TRANSMITTANCE ## atmosphere_model choices are: ATM_MIDLAT_SUMMER, ATM_US_STANDARD_1976, ATM_SUBARC_WINTER, ATM_SUBARC_SUMMER, ATM_TROPICAL, ATM_MIDLAT_WINTER ## spectral_units choices are: microns, wavenumbers ## aerosol_model are: AER_MARITIME_NAVY...
{"/csv_writer_utils.py": ["/utils.py"], "/modtran_request.py": ["/modtran_client.py"], "/verification.py": ["/csv_writer_utils.py", "/formatting_utils.py"], "/modtran_client.py": ["/csv_writer_utils.py", "/formatting_utils.py", "/utils.py"]}
46,926
mr-sagarmandal/modtran_requester
refs/heads/main
/verification.py
import csv_writer_utils import formatting_utils def getSampleContent(fileName): all_of_it = "" try: with open(fileName, mode='r') as file: all_of_it = file.read() finally: file.close() return all_of_it if __name__ == "__main__": content = getSampleContent("test.tx...
{"/csv_writer_utils.py": ["/utils.py"], "/modtran_request.py": ["/modtran_client.py"], "/verification.py": ["/csv_writer_utils.py", "/formatting_utils.py"], "/modtran_client.py": ["/csv_writer_utils.py", "/formatting_utils.py", "/utils.py"]}
46,927
mr-sagarmandal/modtran_requester
refs/heads/main
/modtran_client.py
import requests import time import csv_writer_utils import formatting_utils import utils headers = { 'Host' : 'modtran.spectral.com', 'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0', 'Accept' : 'application/json, text/javascript, */*; q=0.01', 'Accept-Lan...
{"/csv_writer_utils.py": ["/utils.py"], "/modtran_request.py": ["/modtran_client.py"], "/verification.py": ["/csv_writer_utils.py", "/formatting_utils.py"], "/modtran_client.py": ["/csv_writer_utils.py", "/formatting_utils.py", "/utils.py"]}
46,928
mr-sagarmandal/modtran_requester
refs/heads/main
/utils.py
import os import sys def dumpContent(content): try: with open('./out/out.json', 'w+') as file: file.write(json.dumps(content, indent=4)) finally: file.close() def calculate_content_length(payload): keys = payload.keys() values = payload.values() totalLength = len(ke...
{"/csv_writer_utils.py": ["/utils.py"], "/modtran_request.py": ["/modtran_client.py"], "/verification.py": ["/csv_writer_utils.py", "/formatting_utils.py"], "/modtran_client.py": ["/csv_writer_utils.py", "/formatting_utils.py", "/utils.py"]}
46,935
EliRibble/pre-commit-change-id
refs/heads/main
/setup.py
"Logic for installing the module." import setuptools # type: ignore setuptools.setup( install_requires=[ "precommit-message-preservation==0.6", ], extras_require={ "develop": [ "mypy", "nose2", "pylint", "twine", "wheel", ] }, )
{"/test_pcci.py": ["/precommit_changeid/__init__.py"]}
46,936
EliRibble/pre-commit-change-id
refs/heads/main
/test_pcci.py
"Tests for the eureka_prepare_commit_message module" import contextlib import re from typing import Generator import unittest import unittest.mock from nose2.tools import params # type: ignore import precommit_changeid as pci SAMPLE_VERBOSE_COMMIT_LINES = [ "This is some summary line.", "", "You'll notice that...
{"/test_pcci.py": ["/precommit_changeid/__init__.py"]}
46,937
EliRibble/pre-commit-change-id
refs/heads/main
/precommit_changeid/__init__.py
"All module logic." import argparse import logging import os import re import sys import uuid from typing import Dict, Tuple import precommit_message_preservation LOGGER = logging.getLogger("precommit-changeid") def create_change_id() -> str: "Create a Change-Id that Gerrit will accept." return "I" + uuid.uuid4()...
{"/test_pcci.py": ["/precommit_changeid/__init__.py"]}
46,941
rgaudin/tools
refs/heads/master
/ethiopian_date/ethiopian_date/tests.py
#!/usr/bin/env python # encoding=utf-8 # maintainer: rgaudin from __future__ import absolute_import from __future__ import unicode_literals import unittest import datetime from ethiopian_date import EthiopianDateConverter class TestEthiopianCalendar(unittest.TestCase): def test_gregorian_to_ethiopian(self): ...
{"/ethiopian_date/ethiopian_date/__init__.py": ["/ethiopian_date/ethiopian_date/ethiopian_date.py"]}
46,942
rgaudin/tools
refs/heads/master
/ethiopian_date/setup.py
#!/usr/bin/env python # encoding=utf-8 # maintainer: rgaudin from __future__ import absolute_import from __future__ import unicode_literals import setuptools setuptools.setup( name='ethiopian_date', version='1.0', license='GNU General Public License (GPL), Version 3', provides=['ethiopian_date'], ...
{"/ethiopian_date/ethiopian_date/__init__.py": ["/ethiopian_date/ethiopian_date/ethiopian_date.py"]}
46,943
rgaudin/tools
refs/heads/master
/ethiopian_date/ethiopian_date/ethiopian_date.py
#!/usr/bin/env python # encoding=utf-8 # maintainer: rgaudin """ Ethiopian Calendar tool for Python 2.6 Copyright (c) 2010 Renaud Gaudin <rgaudin@gmail.com> This tool is a python port of Java Code from Ealet 2.0 by Senamirmir Project. This code is free software; you can redistribute it and/or modify it under the t...
{"/ethiopian_date/ethiopian_date/__init__.py": ["/ethiopian_date/ethiopian_date/ethiopian_date.py"]}
46,944
rgaudin/tools
refs/heads/master
/gcontact2nokia/gcontact2nokia.py
#!/usr/bin/env python # encoding=utf-8 ''' Generates Gammu-formatted backup file from Google Contact CSV file Takes a CSV file (Google CSV format) as input and generates a plain text file for use with gammu. Examples: gcontact2nokia.py google.csv gammu.bck && gammu restore gammu.bck -yes This sc...
{"/ethiopian_date/ethiopian_date/__init__.py": ["/ethiopian_date/ethiopian_date/ethiopian_date.py"]}
46,945
rgaudin/tools
refs/heads/master
/ethiopian_date/ethiopian_date/__init__.py
#!/usr/bin/env python # encoding=utf-8 # maintainer: rgaudin """ Ethiopian Date Converter Convert from Ethiopian date to Gregorian date (and vice-versa) Examples: greg_date = EthiopianDateConverter.to_gregorian(2003, 4, 11) ethi_date = EthiopianDateConverter.date_to_ethiopian(datetime.date.today()) """ from __fut...
{"/ethiopian_date/ethiopian_date/__init__.py": ["/ethiopian_date/ethiopian_date/ethiopian_date.py"]}
46,948
atpham4/virtual_xray
refs/heads/master
/x_ray.py
import matplotlib.pyplot as plt import numpy as np import math from tkinter import * from phantom import generate_2d_phantom, generate_bigger_broken_leg, generate_leg, generate_3d_phantom, generate_tissue, generate_broken_leg, get_2d_profile, intensity_function, intensity_line_graph #Simple GUI to input values...
{"/x_ray.py": ["/phantom.py"]}
46,949
atpham4/virtual_xray
refs/heads/master
/phantom.py
import matplotlib.pyplot as plt import numpy as np import math import mpl_toolkits.mplot3d.axes3d as axes3d import scipy.misc from scipy import ndimage from scipy.interpolate import spline from mpl_toolkits.mplot3d import Axes3D from scipy.ndimage import generic_filter, correlate, minimum_filter #Function to...
{"/x_ray.py": ["/phantom.py"]}
46,950
mrahul17/kgp_erp
refs/heads/master
/main.py
import requests import json from bs4 import BeautifulSoup urls = { 'HOME_URL' : 'https://erp.iitkgp.ernet.in/IIT_ERP3/welcome.jsp', 'AUTH_URL' :'https://erp.iitkgp.ernet.in/SSOAdministration/auth.htm', 'SECURITYQ_URL' : 'https://erp.iitkgp.ernet.in/SSOAdministration/getSecurityQues.htm', 'TP_URL' : 'ht...
{"/resume_fetcher.py": ["/main.py"]}
46,951
mrahul17/kgp_erp
refs/heads/master
/resume_fetcher.py
import requests from main import login, urls import csv import sys try: s = login() except: sys.exit("Unable to login. Exiting..") with open('roll_list.csv') as f: csvfile = csv.reader(f) for row in csvfile: r = s.get(urls['CV_URL'].format(row[0])) if r.content != '': with ...
{"/resume_fetcher.py": ["/main.py"]}
46,975
jmeline/DesignPatternsInPy
refs/heads/master
/Singleton/singleton_py3.py
#Python3 # singleton using metaclasses (I like this way) class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls._instances[cls] # # # # # # # # # # ...
{"/tests/singleton_py2_test.py": ["/Singleton/singleton_py2.py"], "/tests/singleton_py3_test.py": ["/Singleton/singleton_py3.py"]}
46,976
jmeline/DesignPatternsInPy
refs/heads/master
/tests/conftest.py
## More information ## http://pytest.org/latest/example/pythoncollection.html # Content of conftest.py import sys collect_ignore = [] # collect_ignore['setup.py'] ## This is typically ignored during tests if sys.version_info[0] > 2: ## Py3 behavior ## py.test --collect-only collect_ignore.append('single...
{"/tests/singleton_py2_test.py": ["/Singleton/singleton_py2.py"], "/tests/singleton_py3_test.py": ["/Singleton/singleton_py3.py"]}
46,977
jmeline/DesignPatternsInPy
refs/heads/master
/Singleton/singleton_py2.py
# # # # # # # # # # # # # # # # # # # # # # # # # # Design Pattern: Singleton # # singleton is a design pattern where only one # # instance may exist at any given time # # # # # # # # # # # # # # # # # # # # # # # # # # # Refer here to for more information # https://stackoverflow.com/questions/67606...
{"/tests/singleton_py2_test.py": ["/Singleton/singleton_py2.py"], "/tests/singleton_py3_test.py": ["/Singleton/singleton_py3.py"]}
46,978
jmeline/DesignPatternsInPy
refs/heads/master
/Strategy/strategy.py
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Design Pattern: Strategy Pattern # # Strategy Pattern is a pattern that enables an algorithm's # # behavior to be selected at runtime. The strategy pattern # # defines a family of algorithms, enc...
{"/tests/singleton_py2_test.py": ["/Singleton/singleton_py2.py"], "/tests/singleton_py3_test.py": ["/Singleton/singleton_py3.py"]}
46,979
jmeline/DesignPatternsInPy
refs/heads/master
/tests/singleton_py2_test.py
# # # # # # # # # # # # # # # # # # # # # # # # # # Singleton python unittest # # # # # # # # # # # # # # # # # # # # # # # # # # from __future__ import print_function from Singleton.singleton_py2 import * import sys class TestSingletonPy2(): def test_example1(self): print ("Singleton Example1") x = MySin...
{"/tests/singleton_py2_test.py": ["/Singleton/singleton_py2.py"], "/tests/singleton_py3_test.py": ["/Singleton/singleton_py3.py"]}
46,980
jmeline/DesignPatternsInPy
refs/heads/master
/tests/singleton_py3_test.py
# # # # # # # # # # # # # # # # # # # # # # # # # # Singleton python unittest # # # # # # # # # # # # # # # # # # # # # # # # # # from __future__ import print_function from Singleton.singleton_py3 import * import sys class TestSingletonPy3(): def test_challengeOne(self): instance = None instanceList = [Cha...
{"/tests/singleton_py2_test.py": ["/Singleton/singleton_py2.py"], "/tests/singleton_py3_test.py": ["/Singleton/singleton_py3.py"]}
46,983
Engineering-Geek/ThermoLab
refs/heads/main
/main.py
from System import ThermodynamicPath, ThermodynamicPoint, ClosedSystem import numpy as np import pyromat as pm from typing import List, Dict, Union import pandas as pd from matplotlib import pyplot as plt # noinspection PyAttributeOutsideInit class LabExperiment: def __init__(self, data: pd.Series, expande...
{"/main.py": ["/System.py"]}
46,984
Engineering-Geek/ThermoLab
refs/heads/main
/System.py
import pyromat as pm import numpy as np from typing import List from matplotlib import pyplot as plt class ThermodynamicPoint: def __init__(self, fluid, temperature: float = None, pressure: float = None, dummy: bool = False, h: float = None, s: float = None, d: float = None): self.fluid = fl...
{"/main.py": ["/System.py"]}
46,988
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/calender/tests.py
from rest_framework.test import APITestCase from rest_framework import status from django.contrib.auth.models import User from .models import Calender import json UPDATE_CALENDER_DATA = { "title": "new_title", "start_day": "2021-02-01", "cycle_with": "day", "cycle_unit": 10 } CREATE_CALENDER_DATA = { ...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,989
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/memorialCalender/urls.py
from django.urls import path, include from rest_framework_nested import routers from calender.views import CalenderViewSet from user.views import UserViewSet from auth.views import SigninViewSet, SignupViewSet router = routers.SimpleRouter() router.register(r'auth/signup', SignupViewSet, 'Auth') router.register(r'auth...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,990
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/user/tests.py
from rest_framework.test import APITestCase from rest_framework import status from django.contrib.auth import authenticate from django.contrib.auth.models import User import json PASSWORD_MODIFY_DATA = {"password": "new password"} class CalenderTests(APITestCase): def setUp(self): self.client.post("/auth...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,991
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/calender/views.py
from rest_framework.response import Response from rest_framework import viewsets from .serializers import CalenderSerializer from rest_framework.permissions import IsAuthenticated from .models import Calender from lib.response_form import CREATED_RESPONSE, SUCCESS_RESPONSE, PERMISSION_DENIED_RESPONSE class CalenderVie...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,992
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/calender/apps.py
from django.apps import AppConfig class CalenderConfig(AppConfig): name = 'calender'
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,993
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/calender/serializers.py
from django.db.models import fields from .models import Calender from rest_framework import serializers class CycleWithField(serializers.Field): CYCLE_WITH_TO_INTERNAL_DICT={ "day": 0, "week": 1, "month": 2, "year": 3 } CYCLE_WITH_TO_EXTERNAL_LIST = ["day", "week", "mo...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,994
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/user/serializers.py
from rest_framework import serializers from django.contrib.auth import get_user_model from django.contrib.auth.password_validation import validate_password # User = get_user_model() # class UserSerializer(serializers.ModelSerializer): # class Meta: # model = User # fields = '__all__' # rea...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,995
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/calender/models.py
from django.db import models from django.contrib.auth.models import User class Calender(models.Model): user = models.ForeignKey(User,on_delete=models.CASCADE) title = models.CharField(max_length=20, null=False) start_day = models.DateField() # cycle_with # 0 : day # 1 : week # 2 : month ...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,996
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/user/views.py
from .serializers import PasswordModifySerializer from rest_framework.permissions import IsAuthenticated from django.contrib.auth.models import User from rest_framework import viewsets from lib.response_form import SUCCESS_RESPONSE, PERMISSION_DENIED_RESPONSE class UserViewSet(viewsets.GenericViewSet): queryset = ...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,997
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/auth/serializers.py
from rest_framework import serializers from django.contrib.auth.models import User from django.contrib.auth import authenticate from rest_framework_jwt.settings import api_settings from django.contrib.auth.models import update_last_login from django.contrib.auth import get_user_model # JWT 사용을 위한 설정 JWT_PAYLOAD_HANDL...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,998
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/auth/views.py
from rest_framework.response import Response from .serializers import AuthSerializer, UserSerializer from rest_framework.permissions import AllowAny from rest_framework import viewsets from lib.response_form import CREATED_RESPONSE, FAILED_RESPONSE class SignupViewSet(viewsets.GenericViewSet): permission_classes =...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
46,999
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/calender/migrations/0003_auto_20210306_1506.py
# Generated by Django 3.1.6 on 2021-03-06 06:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('calender', '0002_auto_20210215_1745'), ] operations = [ migrations.AlterField( model_name='calender', name='cycle_wi...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
47,000
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/lib/response_form.py
from rest_framework.response import Response from rest_framework import status CREATED_RESPONSE = Response({"Message": "Created"}, status=status.HTTP_201_CREATED) SUCCESS_RESPONSE = Response({"Message": "Success"}) FAILED_RESPONSE = Response({"Message": "Failed"}, status=status.HTTP_400_BAD_REQUEST) PERMISSION_DENIED_...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
47,001
Root-kjh/MemorialDay-Calendar
refs/heads/master
/memorialCalender/auth/tests.py
from rest_framework.test import APITestCase from rest_framework import status from django.contrib.auth.models import User from rest_framework_jwt.settings import api_settings import json JWT_DECODE_HANDLER = api_settings.JWT_DECODE_HANDLER class AuthTests(APITestCase): def tearDown(self): User.object...
{"/memorialCalender/calender/tests.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/calender/views.py": ["/memorialCalender/calender/serializers.py", "/memorialCalender/calender/models.py"], "/memorialCalender/calender/serializers.py": ["/memorialCalender/calender/models.py"], "/memorialCalender/user/v...
47,008
MichalJanusz/webshop
refs/heads/develop
/webshop/views.py
from django.contrib.auth.views import LoginView, LogoutView from django.shortcuts import render from django.views import View from webshop.forms import LoginForm # Create your views here. class MainView(View): def get(self, request): return render(request, 'webshop/index.html') class LogInView(LoginV...
{"/webshop/views.py": ["/webshop/forms.py"]}
47,009
MichalJanusz/webshop
refs/heads/develop
/webshop/forms.py
from django import forms from django.contrib.auth.forms import AuthenticationForm # Create your forms here class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'login'}), label=False) password = forms.CharField(widget=forms.PasswordInput(attrs={'placeho...
{"/webshop/views.py": ["/webshop/forms.py"]}
47,011
williamrobotma/mlstm4reco
refs/heads/master
/experiments/run.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import shutil import pickle import time import argparse import torch import numpy as np from IPython.core import ultratb from spotlight.sequence.implicit import ImplicitSequenceModel from spotlight.cross_validation import user_based_train_test_split fr...
{"/src/mlstm4reco/representations.py": ["/src/mlstm4reco/layers.py"]}
47,012
williamrobotma/mlstm4reco
refs/heads/master
/src/mlstm4reco/representations.py
# -*- coding: utf-8 -*- """ Classes defining user and item latent representations in factorization models. """ import torch from torch import nn from spotlight.layers import ScaledEmbedding, ZeroEmbedding from .layers import mLSTM PADDING_IDX = 0 class mLSTMNet(nn.Module): """ Module representing users thr...
{"/src/mlstm4reco/representations.py": ["/src/mlstm4reco/layers.py"]}
47,013
williamrobotma/mlstm4reco
refs/heads/master
/src/mlstm4reco/layers.py
import math import torch from torch.nn import Parameter from torch.nn.modules.rnn import RNNBase, LSTMCell from torch.nn import functional as F class mLSTM(RNNBase): def __init__(self, input_size, hidden_size, bias=True): super(mLSTM, self).__init__( mode='LSTM', input_size=input_size, hidden...
{"/src/mlstm4reco/representations.py": ["/src/mlstm4reco/layers.py"]}
47,022
seashaw/image-site
refs/heads/master
/app/__init__.py
""" File: __init__.py Authors: 2014-11-14 - C.Shaw <shaw.colin@gmail.com> Description: Initialization module for object tracker application. Order of initializations and imports is particular. """ import os from datetime import datetime from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy ...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,023
seashaw/image-site
refs/heads/master
/manage.py
#!/usr/bin/env python3 """ Name: manage.py Authors: 2014-11-14 - C.Shaw <shaw.colin@gmail.com> Description: Script to manage database migrations. """ from app import app, db, model from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand # Migrate object initialization. mig =...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,024
seashaw/image-site
refs/heads/master
/app/admin.py
""" File: admin.py Authors: 2014-12-12 - C.Shaw <shaw.colin@gmail.com> Description: Administrative views. """ from .roles import admin_permission from flask.ext.admin import expose, BaseView, AdminIndexView from flask.ext.admin.contrib.sqla import ModelView from flask.ext.admin.contrib.fileadmin import FileAd...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,025
seashaw/image-site
refs/heads/master
/app/forms.py
""" File: forms.py Created: 2014-11-14 - C.Shaw <shaw.colin@gmail.com> Description: Forms and custom validators for form fields. """ from .model import User from flask.ext.wtf import Form import wtforms from flask.ext.login import current_user from wtforms import TextField, SubmitField, PasswordField, TextAreaFiel...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,026
seashaw/image-site
refs/heads/master
/recreate_tables.py
#!/usr/bin/env python3 from app import db, bc import app.model from app.model import User, Role import os import shutil from datetime import datetime from pytz import utc # Drop all database tables. print("Dropping and recreating database tables.") db.drop_all() db.create_all() # Remove all user uploads. print("Removin...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,027
seashaw/image-site
refs/heads/master
/app/controller.py
""" File: controller.py Authors: 2014-11-14 - C.Shaw <shaw.colin@gmail.com> Description: Routing for web application, generates views using templates, and handles logic for user input. """ import os import uuid import math import re from datetime import datetime import pytz from pytz import timezone, utc ...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,028
seashaw/image-site
refs/heads/master
/app/model.py
''' File: model.py Authors: 2014-11-14 - C.Shaw <shaw.colin@gmail.com> Description: Handles database connection and manipulation. ''' from . import app, db from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy import desc from sqlalchemy.ext.orderinglist import ordering_list from flask.ext.login impo...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,029
seashaw/image-site
refs/heads/master
/wsgi.py
#!/usr/bin/env python3 ''' File: wsgi.py Authors: 2014-11-14 - C.Shaw <shaw.colin@gmail.com> Description: Application entry point for uWSGI. ''' from app import app, admin, FileView app.config['SERVER_NAME'] = 'image-site.colinshaw.org' app.config['UPLOAD_FOLDER'] = \ '/home/colin/applications/image-s...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,030
seashaw/image-site
refs/heads/master
/app/roles.py
''' File: roles.py Authors: 2015-03-09 by C. Shaw <shaw.colin@gmail.com> Description: Settings and initialization for role based access control using principal. ''' from collections import namedtuple from functools import partial from flask.ext.principal import Principal, identity_loaded, Permission, \ ...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,031
seashaw/image-site
refs/heads/master
/local.py
#!/usr/bin/env python3 ''' File: local.py Authors: 2015-04-15 - C.Shaw <shaw.colin@gmail.com> Description: DEVELOPMENT ONLY ''' from app import app, admin, FileView app.config['SERVER_NAME'] = 'localhost:8080' app.config['UPLOAD_FOLDER'] = \ '/home/colin/workspace/image-site/app/static/uploads' admin...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,032
seashaw/image-site
refs/heads/master
/tests.py
#!/usr/bin/env python3 ''' File: tests.py Authors: 2015-03-17 - C.Shaw <shaw.colin@gmail.com> Description: Test suite for angryhos.com, makes use of selenium to drive testing procedures. ''' import os import shutil from datetime import datetime from pytz import utc import unittest from app import db, bc...
{"/app/__init__.py": ["/app/model.py", "/app/admin.py"], "/manage.py": ["/app/__init__.py"], "/app/admin.py": ["/app/roles.py"], "/app/forms.py": ["/app/model.py"], "/recreate_tables.py": ["/app/__init__.py", "/app/model.py", "/app/roles.py"], "/app/controller.py": ["/app/__init__.py", "/app/roles.py", "/app/model.py",...
47,033
friku/game
refs/heads/master
/test_main.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 23 17:31:40 2018 @author: riku """ import pytest import unittest from main import main from setting import follower,field,BattleDeck,makeCard,makeDeck,BattleSystem class TestMain(unittest.TestCase): def test_main(self): main()...
{"/test_main.py": ["/main.py", "/setting.py"], "/makecard.py": ["/Utils.py"], "/setting.py": ["/makecard.py"], "/main.py": ["/setting.py", "/makecard.py"], "/test_setting.py": ["/main.py"]}
47,034
friku/game
refs/heads/master
/Utils.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 30 15:20:38 2018 @author: riku """ def selectMyPlace(Field,PlayerID,fanfareFlag=0):#自カードを対象にしたくない時はfanfareFlagを1にする selectFlag = 0 while selectFlag == 0: SelectFieldID = int(input('カードを選択0~4>> ')) #0~4 placeのカード 5~13手札 14END 15自情報取得...
{"/test_main.py": ["/main.py", "/setting.py"], "/makecard.py": ["/Utils.py"], "/setting.py": ["/makecard.py"], "/main.py": ["/setting.py", "/makecard.py"], "/test_setting.py": ["/main.py"]}
47,035
friku/game
refs/heads/master
/makecard.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 30 02:45:08 2018 @author: riku """ from Utils import selectMyPlace,selectEnemyPlace,evolveChangeStatus,addRush,ReduceDamage class card: def __init__(self,name,cost,Enhance=[100],Accelerate=None): self.name = name self.cost = cos...
{"/test_main.py": ["/main.py", "/setting.py"], "/makecard.py": ["/Utils.py"], "/setting.py": ["/makecard.py"], "/main.py": ["/setting.py", "/makecard.py"], "/test_setting.py": ["/main.py"]}
47,036
friku/game
refs/heads/master
/calculator.py
# -*- coding: utf-8 -*- """ Created on Sun Dec 23 00:44:03 2018 @author: 陸 """ class Calculator(): def add(self, a, b): return a + b def sub(self, a, b): return a - b def mul(self, a, b): return a * b def div(self, a, b): return a / b
{"/test_main.py": ["/main.py", "/setting.py"], "/makecard.py": ["/Utils.py"], "/setting.py": ["/makecard.py"], "/main.py": ["/setting.py", "/makecard.py"], "/test_setting.py": ["/main.py"]}
47,037
friku/game
refs/heads/master
/setting.py
# -*- coding: utf-8 -*- """ Created on Thu Dec 20 23:11:33 2018 @author: 陸 """ from makecard import follower class field: def __init__(self,playerName,BTDeck,PlayerID,EP): self.HP = 20 self.PP = 0 self.EP = EP self.MaxPP = 0 self.TurnNum = 0 self.cemetery = [] ...
{"/test_main.py": ["/main.py", "/setting.py"], "/makecard.py": ["/Utils.py"], "/setting.py": ["/makecard.py"], "/main.py": ["/setting.py", "/makecard.py"], "/test_setting.py": ["/main.py"]}
47,038
friku/game
refs/heads/master
/main.py
# -*- coding: utf-8 -*- """ Created on Thu Dec 20 23:55:18 2018 @author: 陸 """ from setting import field,BattleSystem from makecard import card,follower,Amulet,Spell,BubetuNoSinja,makeCard,makeDeck,BattleDeck,BubetuNoEnsou,Aira,Filene,ServantOfDisdain,DragonOracle,VileVioletDragon,WatersOfTheOrca def main(): car...
{"/test_main.py": ["/main.py", "/setting.py"], "/makecard.py": ["/Utils.py"], "/setting.py": ["/makecard.py"], "/main.py": ["/setting.py", "/makecard.py"], "/test_setting.py": ["/main.py"]}
47,039
friku/game
refs/heads/master
/test_setting.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 24 00:00:06 2018 @author: riku """ import unittest from main import main from io import StringIO import contextlib from parameterized import parameterized, param import numpy as np class redirect_stdin(contextlib._RedirectStream): _stream = "st...
{"/test_main.py": ["/main.py", "/setting.py"], "/makecard.py": ["/Utils.py"], "/setting.py": ["/makecard.py"], "/main.py": ["/setting.py", "/makecard.py"], "/test_setting.py": ["/main.py"]}
47,052
alka653/PrediosEjido
refs/heads/master
/PrediosEjido/apps/principal/views.py
from django.contrib.auth.decorators import user_passes_test from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from easy_pdf.views import PDFTemplateView from django.contrib.auth import logout from django.short...
{"/PrediosEjido/apps/principal/views.py": ["/PrediosEjido/apps/principal/models.py", "/PrediosEjido/apps/principal/forms.py"], "/PrediosEjido/apps/principal/admin.py": ["/PrediosEjido/apps/principal/models.py"], "/PrediosEjido/apps/principal/urls.py": ["/PrediosEjido/apps/principal/views.py"], "/PrediosEjido/apps/princ...
47,053
alka653/PrediosEjido
refs/heads/master
/PrediosEjido/apps/principal/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Predio', fields=[ ('id', models.AutoField(verbo...
{"/PrediosEjido/apps/principal/views.py": ["/PrediosEjido/apps/principal/models.py", "/PrediosEjido/apps/principal/forms.py"], "/PrediosEjido/apps/principal/admin.py": ["/PrediosEjido/apps/principal/models.py"], "/PrediosEjido/apps/principal/urls.py": ["/PrediosEjido/apps/principal/views.py"], "/PrediosEjido/apps/princ...
47,054
alka653/PrediosEjido
refs/heads/master
/PrediosEjido/apps/principal/models.py
from django.db import models class Propieta(models.Model): id_propieta = models.CharField(max_length = 15) name = models.CharField(max_length = 30) def __unicode__(self): return self.id_propieta+' '+self.name class Predio(models.Model): c_catastral = models.CharField(max_length = 15) t_ord = models.CharField(m...
{"/PrediosEjido/apps/principal/views.py": ["/PrediosEjido/apps/principal/models.py", "/PrediosEjido/apps/principal/forms.py"], "/PrediosEjido/apps/principal/admin.py": ["/PrediosEjido/apps/principal/models.py"], "/PrediosEjido/apps/principal/urls.py": ["/PrediosEjido/apps/principal/views.py"], "/PrediosEjido/apps/princ...
47,055
alka653/PrediosEjido
refs/heads/master
/PrediosEjido/apps/principal/migrations/0002_auto_20151222_1504.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('principal', '0001_initial'), ] operations = [ migrations.AlterField( model_name='predio', name='area...
{"/PrediosEjido/apps/principal/views.py": ["/PrediosEjido/apps/principal/models.py", "/PrediosEjido/apps/principal/forms.py"], "/PrediosEjido/apps/principal/admin.py": ["/PrediosEjido/apps/principal/models.py"], "/PrediosEjido/apps/principal/urls.py": ["/PrediosEjido/apps/principal/views.py"], "/PrediosEjido/apps/princ...