index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
6,337 | sbxg/sbxg | refs/heads/master | /sbxg/__main__.py | # Copyright (c) 2017 Jean Guyomarc'h
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dis... | {"/sbxg/__main__.py": ["/sbxg/utils.py"]} |
6,338 | sbxg/sbxg | refs/heads/master | /tests/test_boards.py | # Copyright (c) 2017 Jean Guyomarc'h
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dis... | {"/sbxg/__main__.py": ["/sbxg/utils.py"]} |
6,339 | sbxg/sbxg | refs/heads/master | /sbxg/model.py | # Copyright (c) 2017 Jean Guyomarc'h
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dis... | {"/sbxg/__main__.py": ["/sbxg/utils.py"]} |
6,340 | sbxg/sbxg | refs/heads/master | /tests/conftest.py | # Copyright (c) 2017 Jean Guyomarc'h
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dis... | {"/sbxg/__main__.py": ["/sbxg/utils.py"]} |
6,341 | sbxg/sbxg | refs/heads/master | /sbxg/error.py | # Copyright (c) 2017 Jean Guyomarc'h
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dis... | {"/sbxg/__main__.py": ["/sbxg/utils.py"]} |
6,342 | sbxg/sbxg | refs/heads/master | /bootstrap.py | #! /usr/bin/env python3
#
# Copyright (c) 2017 Jean Guyomarc'h
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | {"/sbxg/__main__.py": ["/sbxg/utils.py"]} |
6,343 | sbxg/sbxg | refs/heads/master | /scripts/gen-rootfs.py | #! /usr/bin/env python
#
# Copyright (c) 2017 Jean Guyomarc'h
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mo... | {"/sbxg/__main__.py": ["/sbxg/utils.py"]} |
6,344 | sbxg/sbxg | refs/heads/master | /scripts/create-initramfs.py | #! /usr/bin/env python
#
# Copyright (c) 2017 Jean Guyomarc'h
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mo... | {"/sbxg/__main__.py": ["/sbxg/utils.py"]} |
6,346 | Naatoo/energy-visualization | refs/heads/master | /app/data_crud/__init__.py | from flask import Blueprint
data = Blueprint('data_crud', __name__)
from app.data_crud import views
| {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,347 | Naatoo/energy-visualization | refs/heads/master | /app/models.py | from database import db
class Energy(db.Model):
building = db.Column(db.String, primary_key=True)
year = db.Column(db.Integer, primary_key=True)
month = db.Column(db.Integer, primary_key=True)
quantity = db.Column(db.Integer, unique=False)
consumption_price = db.Column(db.Float, unique=False)
... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,348 | Naatoo/energy-visualization | refs/heads/master | /app/analyse/plots_generation/surface_chart.py | from math import pi
import pandas as pd
from bokeh.models import LinearColorMapper, ColorBar, BasicTicker
from bokeh.plotting import figure
def generate_surface_chart(data: dict, title: str):
data = pd.DataFrame(data)
data['Year'] = data['Year'].astype(str)
data = data.set_index('Year')
data.columns.... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,349 | Naatoo/energy-visualization | refs/heads/master | /app/__init__.py | import os
import pandas
from flask import Flask
from flask_bootstrap import Bootstrap
from .analyse import analyse as analyse_blueprint
from .data_crud import data as data_blueprint
from app.models import Gas, Energy
from database import db
def create_app():
app = Flask(__name__)
app.config['DEBUG'] = True
... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,350 | Naatoo/energy-visualization | refs/heads/master | /run.py | import os
from app import create_app, setup_database
app = create_app()
if __name__ == '__main__':
if not os.path.isfile('main_data.db'):
setup_database(app)
app.run(debug=True)
| {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,351 | Naatoo/energy-visualization | refs/heads/master | /app/analyse/views.py | from flask import request, render_template
from app.analyse import analyse
from app.analyse.forms import ChartForm
from app.analyse.chart_tool import ChartTool
from bokeh.embed import components
@analyse.route('/', methods=['GET', 'POST'])
def show():
"""
Handle requests to the /show route
Displays cha... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,352 | Naatoo/energy-visualization | refs/heads/master | /app/analyse/__init__.py | from flask import Blueprint
analyse = Blueprint('analyse', __name__)
from app.analyse import views
| {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,353 | Naatoo/energy-visualization | refs/heads/master | /app/analyse/plots_generation/column_line_chart.py | import json
from bokeh.models import HoverTool
from bokeh.models import ColumnDataSource, LinearAxis, Grid
from bokeh.plotting import figure
from bokeh.models import Legend, LegendItem
from app.tools.global_paths import TRANSLATIONS_FILE
def generate_stacked_chart(data: dict, text: dict, width=1200, height=800, cha... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,354 | Naatoo/energy-visualization | refs/heads/master | /app/data_crud/prepare_data.py | import json
from app.models import Energy, Gas
from app.tools.global_paths import MONTHS_NAMES_FILE, BUILDINGS_NAMES_POLISH_FILE
def get_data(type_choice):
with open(MONTHS_NAMES_FILE) as f:
months_names_mapping = json.loads(f.read())
with open(BUILDINGS_NAMES_POLISH_FILE) as f:
buildings_na... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,355 | Naatoo/energy-visualization | refs/heads/master | /app/tools/global_paths.py | import os
from pathlib import Path
MAIN_DIR = str(Path(__file__).parent.parent)
MAPPING_DIR = os.path.join(MAIN_DIR, "mapping/")
MONTHS_NAMES_FILE = os.path.join(MAPPING_DIR, "months_names.json")
BUILDINGS_NAMES_POLISH_FILE = os.path.join(MAPPING_DIR, "buildings_names_polish.json")
BUILDINGS_CODE_FILE = os.path.join(... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,356 | Naatoo/energy-visualization | refs/heads/master | /app/analyse/forms.py | from flask_wtf import FlaskForm
from wtforms import SubmitField, SelectField
from wtforms.validators import DataRequired
class ChartForm(FlaskForm):
"""
Form for users to add new energy bill
"""
year = SelectField('Okres', validators=[DataRequired()], choices=[("2015", "2015"), ("2016", "2016"),
... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,357 | Naatoo/energy-visualization | refs/heads/master | /app/analyse/chart_tool.py | import json
from collections import defaultdict, OrderedDict
from statistics import mean
from app.analyse.plots_generation.surface_chart import generate_surface_chart
from app.models import Energy, Gas
from app.tools.global_paths import MONTHS_NAMES_FILE
from app.analyse.plots_generation.column_line_chart import gener... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,358 | Naatoo/energy-visualization | refs/heads/master | /app/data_crud/views.py | from flask import render_template, redirect, url_for
from app.data_crud import data
from app.data_crud.forms import EnergyAdditionForm, GasAdditionForm
from app.data_crud.prepare_data import get_data
from app.models import Energy, Gas
from database import db
@data.route('/add/energy', methods=['GET', 'POST'])
def ad... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,359 | Naatoo/energy-visualization | refs/heads/master | /app/data_crud/forms.py | from flask_wtf import FlaskForm
from wtforms import SubmitField, FloatField, SelectField
from wtforms.fields.html5 import DateField
from wtforms.validators import DataRequired
class EnergyAdditionForm(FlaskForm):
"""
Form for users to add new energy bill
"""
date = DateField('Data', validators=[DataRe... | {"/app/__init__.py": ["/app/analyse/__init__.py", "/app/data_crud/__init__.py", "/app/models.py"], "/run.py": ["/app/__init__.py"], "/app/analyse/views.py": ["/app/analyse/__init__.py", "/app/analyse/forms.py", "/app/analyse/chart_tool.py"], "/app/analyse/plots_generation/column_line_chart.py": ["/app/tools/global_path... |
6,367 | robotriot/smart_reminders | refs/heads/master | /custom_components/smart_reminders/__init__.py | from datetime import datetime, timedelta
import logging
import re
import traceback
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.util import Throttl... | {"/custom_components/smart_reminders/__init__.py": ["/custom_components/smart_reminders/const.py"]} |
6,368 | robotriot/smart_reminders | refs/heads/master | /custom_components/smart_reminders/const.py | DOMAIN = "smart_reminders"
DB = "db"
| {"/custom_components/smart_reminders/__init__.py": ["/custom_components/smart_reminders/const.py"]} |
6,408 | logarithm27/Object_Store_Versioning | refs/heads/main | /client.py | import socket
from menu import *
import pickle
import os
''' I write some few comments here
because I have already mentioned it in the server file
since the latter contains some symmetric functions '''
ADDR_PORT = (socket.gethostbyname(socket.gethostname()),1234)
FORMAT = 'utf-8'
HEADER_SIZE = 16
QUIT_ME... | {"/server.py": ["/operations.py"], "/main.py": ["/operations.py"], "/operations.py": ["/database.py"]} |
6,409 | logarithm27/Object_Store_Versioning | refs/heads/main | /server.py | import socket
from operations import *
import threading
import pickle
# get the host address by its hostname and set a port
ADDR_PORT = (socket.gethostbyname(socket.gethostname()), 1234)
# used as flag to listening to clients
LISTENING = True
# the format of encoding when we receive/retrieve data with client
... | {"/server.py": ["/operations.py"], "/main.py": ["/operations.py"], "/operations.py": ["/database.py"]} |
6,410 | logarithm27/Object_Store_Versioning | refs/heads/main | /main.py | from operations import *
from menu import *
'''
TO TEST THE OPERATIONS ENGINE IN LOCAL SYSTEM, USE THIS FILE
TO TEST THE ENGINE WITH CLIENT SERVER, RUN THE server.py then client.py
'''
def run():
op = Operations()
m = Menu()
input_command = m.printing()
input_command = input_command.split('... | {"/server.py": ["/operations.py"], "/main.py": ["/operations.py"], "/operations.py": ["/database.py"]} |
6,411 | logarithm27/Object_Store_Versioning | refs/heads/main | /operations.py | from database import *
import os
import ntpath
import platform
import posixpath
import macpath
MAX_ver = 100
class Policy():
Global = 1
Dynamic = 2
class Operations :
def __init__(self):
self.db = Database()
self.db.connect_db()
self.remote_or_local = "from_local"... | {"/server.py": ["/operations.py"], "/main.py": ["/operations.py"], "/operations.py": ["/database.py"]} |
6,412 | logarithm27/Object_Store_Versioning | refs/heads/main | /database.py | import os
import sqlite3
from sqlite3 import Error
# global variable that creates a working directory where we can store the database file
current_working_directory = os.getcwd()
# sqlite3 database file name
db_file_name = "/drive.db"
# database creation and connection
class Database:
def __init__(se... | {"/server.py": ["/operations.py"], "/main.py": ["/operations.py"], "/operations.py": ["/database.py"]} |
6,421 | RedaMansy/ProjectV_3 | refs/heads/master | /player_project.py | from item_project import *
from map_project import rooms
inventory = []
#For example: item_id
# Start game at the reception
current_room = rooms["Reception"]
#====================================
# Player status
energy_min = 0
#Minimum energyof player
energy_max = 100
#Maximum energy of player
project_process = 0
... | {"/player_project.py": ["/map_project.py"]} |
6,422 | RedaMansy/ProjectV_3 | refs/heads/master | /map_project.py | from item_project import *
room_reception = {
"name": "The Reception",
"description":
"""You have just entered the Reception. The interior is very modern, with sleek furnishings and glass walls.
To your North, you can see the cafeteria.
To your west, you can see the cinema.
To your east, yo... | {"/player_project.py": ["/map_project.py"]} |
6,423 | tcb72/motif-mark | refs/heads/master | /motif_mark.py | import cairocffi as cairo
from gene import Gene
from itertools import product
import random
import seaborn as sns
import argparse
def multiline_to_dict_fasta(file):
fasta_dict = dict()
with open(file) as f:
for index,line in enumerate(f):
if (line.startswith('>')):
curr_head... | {"/motif_mark.py": ["/gene.py"]} |
6,424 | tcb72/motif-mark | refs/heads/master | /gene.py | import re
from operator import itemgetter
from itertools import *
class Gene:
def __init__(self, header, sequence):
self.header = header
self.sequence = sequence
def get_gene_name(self):
return(self.header.split(' ')[0][1:])
def get_intron_exon_locations(self):
exon_index... | {"/motif_mark.py": ["/gene.py"]} |
6,439 | PradeepNalluri/Prefix-Tuning-Bert | refs/heads/master | /distributed_training.py | import numpy as np
import pandas as pd
import torch
from transformers import BertTokenizer
import numpy as np
import multiprocessing as mp
import time
from tqdm import tqdm
import os
os.environ["MASTER_ADDR"] = "127.0.0.1"
os.environ['MASTER_PORT'] = '8888'
from transformers import BertModel
from transformers.modelin... | {"/distributed_training.py": ["/SARCBertClassifier.py"], "/baselines/baseline_code.py": ["/SARCBertClassifier.py"], "/train.py": ["/SARCBertClassifier.py"]} |
6,440 | PradeepNalluri/Prefix-Tuning-Bert | refs/heads/master | /SARCBertClassifier.py | import transformers
import torch
from transformers.modeling_outputs import SequenceClassifierOutput
import torch.nn as nn
from transformers import BertTokenizer,BertForSequenceClassification,BertModel
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
class SARCBertClassifier(BertForSequenceClassificat... | {"/distributed_training.py": ["/SARCBertClassifier.py"], "/baselines/baseline_code.py": ["/SARCBertClassifier.py"], "/train.py": ["/SARCBertClassifier.py"]} |
6,441 | PradeepNalluri/Prefix-Tuning-Bert | refs/heads/master | /baselines/baseline_code.py | import numpy as np
import pandas as pd
from pandas import DataFrame
import torch
import torch.nn as nn
import multiprocessing as mp
from torch.utils.data import TensorDataset, random_split
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler
from transformers import BertTokenizer
from transformer... | {"/distributed_training.py": ["/SARCBertClassifier.py"], "/baselines/baseline_code.py": ["/SARCBertClassifier.py"], "/train.py": ["/SARCBertClassifier.py"]} |
6,442 | PradeepNalluri/Prefix-Tuning-Bert | refs/heads/master | /baselines/SARCBertClassifier.py | from transformers import BertModel
from transformers.modeling_outputs import SequenceClassifierOutput
from torch.nn import CrossEntropyLoss
import torch.nn as nn
from transformers import BertForSequenceClassification, AdamW, BertConfig
class SARCBertClassifier(BertForSequenceClassification):
"""
Classifier to... | {"/distributed_training.py": ["/SARCBertClassifier.py"], "/baselines/baseline_code.py": ["/SARCBertClassifier.py"], "/train.py": ["/SARCBertClassifier.py"]} |
6,443 | PradeepNalluri/Prefix-Tuning-Bert | refs/heads/master | /train.py | from urllib import parse
import numpy as np
import pandas as pd
from pandas import DataFrame
import torch
import torch.nn as nn
import multiprocessing as mp
from torch.utils.data import TensorDataset, random_split
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler
from transformers import BertT... | {"/distributed_training.py": ["/SARCBertClassifier.py"], "/baselines/baseline_code.py": ["/SARCBertClassifier.py"], "/train.py": ["/SARCBertClassifier.py"]} |
6,444 | ZhangYet/vulcan | refs/heads/master | /vulcan/data/jp_word.py | STAR = '☆'
class Word:
def __str__(self):
return '{0.lesson}, {0.word}, {0.gana}, {0.tone}, {0.attr}, {0.chinese}'.format(self)
def __init__(self, lesson: str, word: str, gana: str, tone: str, attr: str, chinese):
self.lesson = lesson
self.word = word
self.gana = gana
... | {"/main.py": ["/vulcan/data/jp_word.py", "/vulcan/anki.py"], "/vulcan/anki.py": ["/vulcan/data/jp_word.py"]} |
6,445 | ZhangYet/vulcan | refs/heads/master | /main.py | from vulcan.data.jp_word import load_from_file
from vulcan.anki import Vulcan
if __name__ == '__main__':
word_list = load_from_file('vulcan/data/new_japanese_1.csv')
v = Vulcan('新编日语(上海教育出版社)第一册')
for word in word_list:
v.add(word)
v.save()
| {"/main.py": ["/vulcan/data/jp_word.py", "/vulcan/anki.py"], "/vulcan/anki.py": ["/vulcan/data/jp_word.py"]} |
6,446 | ZhangYet/vulcan | refs/heads/master | /vulcan/anki.py | import genanki
import datetime
from vulcan.data.jp_word import Word
CSS = '''
div.front, div.back {
text-align:center;
font-family: Courier;
font-size: 30px;
}
span.small {font-size: 15px;}
span.normal {font-size: 30px;}
span.large {font-size: 60px;}
span.italic {font-style:italic;}
'''
def gen_id() -... | {"/main.py": ["/vulcan/data/jp_word.py", "/vulcan/anki.py"], "/vulcan/anki.py": ["/vulcan/data/jp_word.py"]} |
6,450 | AKkkAha/API_WITH_EXCEL | refs/heads/master | /Execute.py | # -*- coding:utf-8 -*-
import xlrd
import os
import json
import glob
import config
import re
import HTTP_API
import time
from parse_dict import *
import logger
import sys
from HTML import *
reload(sys)
sys.setdefaultencoding("utf-8")
pre_case_list = []
pre_recv = None
pre_var = config.custom_var
titledict = {}
logr = ... | {"/logger.py": ["/config.py"]} |
6,451 | AKkkAha/API_WITH_EXCEL | refs/heads/master | /HTML.py | #coding=utf-8
import os
import sys
import re
import collections
import shutil
from os.path import join
import time
from pyh import *
import cPickle as pickle
import config
from platform import system
# from ExcelAccessor import *
reload(sys)
sys.setdefaultencoding('utf8')
sys.path.append('log')
RECORD_TITLE = '测试'
cl... | {"/logger.py": ["/config.py"]} |
6,452 | AKkkAha/API_WITH_EXCEL | refs/heads/master | /HTTP_API.py | #!/usr/bin/python
# -*- coding:utf-8 -*-
import requests
import json
import logger
# import time
class HTTP_Cls(object):
def __init__(self, arg):
self.log = logger.logcls(arg)
self.r = None
# application/json;charset=UTF-8
# application/x-www-form-urlencoded
# self.header... | {"/logger.py": ["/config.py"]} |
6,453 | AKkkAha/API_WITH_EXCEL | refs/heads/master | /logger.py | import logging
import config
import time
import os
now = time.strftime("%Y-%m-%d-%H_%M_%S", time.localtime(time.time()))
class logcls:
# _singleton = None
# logger = None
def __init__(self, arg):
# now = time.strftime("%Y-%m-%d-%H_%M_%S", time.localtime(time.time()))
filename = "log\\"+... | {"/logger.py": ["/config.py"]} |
6,454 | AKkkAha/API_WITH_EXCEL | refs/heads/master | /parse_dict.py | # -*- coding:utf-8 -*-
def search_dict(target, temp_dict): # 返回target在temp_dict中的索引
value = ""
if target in temp_dict.keys():
value = "['" + str(target) + "']"
else:
for key in temp_dict.keys():
if type(temp_dict[key]) is list and temp_dict[key]:
temp_dict[key]... | {"/logger.py": ["/config.py"]} |
6,455 | AKkkAha/API_WITH_EXCEL | refs/heads/master | /config.py | # -*- coding:utf-8 -*-
test_module = {
"testcase": ["3-13"], # 要执行的用例sheet和具体用例,单个用例用整形表示如 1 ,多个连续用例用字符串表示如 "2-6" ,都储存在列表钟
}
# 预设的参数,字典格式表示。
custom_var = {
}
| {"/logger.py": ["/config.py"]} |
6,459 | DmitrievaNatalia/-PP_Homework_5 | refs/heads/master | /main.py | import requests
from bs4 import BeautifulSoup
from logger_and_log_path import set_log_path
KEYWORDS = {'дизайн', 'фото', 'web', 'python'}
URL = 'https://habr.com'
def get_articles():
ret = requests.get('https://habr.com/ru/all/')
soup = BeautifulSoup(ret.text, features='html.parser')
return soup.find_al... | {"/main.py": ["/logger_and_log_path.py"]} |
6,460 | DmitrievaNatalia/-PP_Homework_5 | refs/heads/master | /logger_and_log_path.py | import datetime
def set_log_path(log_path):
def logger(some_func):
log_str = ''
def new_some_func(*args, **kwargs):
with open(log_path, 'a', encoding='utf-8') as logfile:
nonlocal log_str
log_str = f'{datetime.datetime.now()} : '
log_str... | {"/main.py": ["/logger_and_log_path.py"]} |
6,461 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/tests/test_cam_utils.py | import pytest
import numpy as np
from .. import cam_utils
from . import conftest
@pytest.fixture()
def onaxis_image():
# TODO: an actual image would be nice...
return np.random.random((100, 100))
def test_smoke_jet_detect(onaxis_image):
print(cam_utils.jet_detect(onaxis_image))
def test_smoke_get_jet_... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,462 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/jettracking.py | '''
Calls the GUI for jet tracking. Ultimately only this file should need to be run, and the GUI will
control when the jet tracking methods e.g. calibrate(), jet_detect(), etc should be run
'''
from qtpy.QtCore import QThread
from pydm import Display
import jt_utils
import jet_control
from time import sleep
class T... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,463 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/jt_utils.py | # methods for jet tracking that do not involve the camera
import numpy as np
from scipy.optimize import curve_fit
def gaussianslope(x, a, mean, std, m, b):
'''
Define the function for a Gaussian on a slope (Gaussian + linear)
Parameters
----------
x : float
x-coordinate
a : float
amplitude of Ga... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,464 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/tests/test_sim.py | import os.path
import numpy as np
import pandas as pd
import pytest
from jet_tracking.sim import generate_simulation
@pytest.fixture(scope='session')
def simulated_data():
return pd.read_csv(os.path.join(os.path.dirname(__file__), 'sim.csv'))
def test_generate_simulation(simulated_data):
ns = generate_sim... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,465 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/tests/conftest.py | import numpy as np
import pytest
import types
import inspect
from ..devices import (Injector, Selector, CoolerShaker, HPLC,
PressureController, FlowIntegrator, Offaxis, Questar,
Parameters, OffaxisParams, Control, Diffract,
SDS)
from ophyd.areadetecto... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,466 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/devices.py | import pandas as pd
import epics
from ophyd.device import Device, FormattedComponent as FCpt, Component as Cpt
from ophyd.signal import EpicsSignal
from ophyd.areadetector.plugins import ROIPlugin, StatsPlugin, ImagePlugin
from pcdsdevices.areadetector.detectors import PCDSDetector
from pcdsdevices.epics_motor import... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,467 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/sim.py | import types
import numpy as np
from ophyd.sim import SynAxis, SynSignal
def generate_simulation(motor_column, signal_column, dataframe,
motor_precision=3, random_state=None):
"""
Generate a simulation based on a provided DataFrame
Use collected data to simulate the relationship ... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,468 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/cam_utils.py | import numpy as np
import cv2
from scipy.signal import peak_widths
from skimage.feature import register_translation
from skimage.feature import register_translation
from skimage.feature import canny, peak_local_max
from skimage.transform import hough_line, hough_line_peaks, rotate
def image_stats(img):
'''
P... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,469 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/jet_control.py | from time import sleep
from . import cam_utils
from . import jt_utils
from .move_motor import movex
class JetControl:
'''
Jet tracking control class using jet_tracking methods
'''
def __init__(self, name, injector, camera, params, diffract, *,
offaxis=False, **kwargs):
self.... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,470 | jeannas/jet_tracking | refs/heads/master | /jet_tracking/tests/test_control.py | import pytest
from . import conftest
def test_smoke_set_beam(jet_control):
from ..jet_control import set_beam
set_beam(1, 2, jet_control.params)
assert jet_control.params.beam_x_px.get() == 1
assert jet_control.params.beam_y_px.get() == 2
@pytest.mark.parametrize("use_offaxis", [False, True])
def te... | {"/jet_tracking/tests/test_sim.py": ["/jet_tracking/sim.py"], "/jet_tracking/tests/conftest.py": ["/jet_tracking/devices.py", "/jet_tracking/jet_control.py"], "/jet_tracking/tests/test_control.py": ["/jet_tracking/jet_control.py"]} |
6,491 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/cart/models.py | from django.db import models
from datetime import datetime
from django.utils import timezone
# Create your models here.
class Cart(models.Model):
customer_id = models.IntegerField(blank=False,null=False)
product_id = models.IntegerField(blank=False,null=False)
address_id = models.IntegerField(blank=False,nu... | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,492 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/account/urls.py | from django.urls import path
from . import views
urlpatterns = [
path("register/",views.register,name="register"),
path("login/",views.login,name="login"),
path("logout/",views.logout,name="logout"),
path("profile/",views.profile,name="profile"),
path("edit_address/",views.edit_address,name="edit_... | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,493 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/cart/views.py | from django.shortcuts import render,redirect
from django.http import HttpResponseNotFound
from .models import Cart,Shipment
from product.models import Product
from account.models import Address
from django.contrib.auth.models import User,auth
def cart_data_add(cid):
data = Cart.objects.filter(customer_id=cid,shipm... | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,494 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/account/views.py | from django.shortcuts import render,redirect
from django.http import HttpResponseNotFound
from django.contrib import messages
from django.contrib.auth.models import User,auth
from .models import Address
from cart.models import Cart, Shipment
from product.models import Product
def cart_data_add(cid):
data = Cart.o... | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,495 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/product/urls.py | from django.urls import path
from . import views
urlpatterns = [
path('',views.index,name = 'index'),
path('product/<int:id>',views.product_view,name ="product_view"),
path('search/',views.search,name="search"),
] | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,496 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/cart/urls.py | from django.urls import path
from . import views
urlpatterns = [
path('',views.cart,name="cart"),
path('addtocart/<int:id>',views.addtocart,name="addtocart"),
path('addrm_pro_qnt/<int:id>/<int:v>', views.addrm_pro_qut, name='addrm_pro_qut'),
path('pro_remove/<int:id>', views.pro_remove, name='pro_remo... | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,497 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/product/models.py | from django.db import models
# Create your models here.
class Product(models.Model):
name = models.CharField(max_length=120)
image = models.ImageField(upload_to = 'pics')
description = models.TextField(blank=False,null=False)
price = models.DecimalField(decimal_places=2,max_digits= 1000)
| {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,498 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/cart/migrations/0002_auto_20200824_2040.py | # Generated by Django 3.1 on 2020-08-24 20:40
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cart', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Shipment',
fields=[
... | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,499 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/product/views.py | from django.shortcuts import render
from .models import Product
from cart.models import Cart
#from django.http import HttpResponse
def cart_data_add(cid):
data = Cart.objects.filter(customer_id=cid,shipment=False)
data = dict({"count":len(data)})
return data
# Create your views here.
def index(request):
... | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,500 | amaan2398/EcommerceWebsiteDjango | refs/heads/master | /src/account/models.py | from django.db import models
# Create your models here.
class Address(models.Model):
customer_id = models.IntegerField(blank=False,null=False)
street_address = models.CharField(max_length=125)
city = models.CharField(max_length = 30)
state = models.CharField(max_length = 30)
country = models.CharFi... | {"/src/cart/views.py": ["/src/cart/models.py"], "/src/account/views.py": ["/src/account/models.py"], "/src/product/views.py": ["/src/product/models.py"]} |
6,506 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/info/views.py | from django.db.models import Prefetch
from rest_framework.response import Response
from rest_framework.viewsets import generics
from rest_framework.permissions import AllowAny
from django_filters.rest_framework import DjangoFilterBackend
from drf_yasg.utils import swagger_auto_schema
from apps.brand.pagination impor... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,507 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/notifications/serializers.py | import json
from rest_framework import serializers
from apps.notifications.models import Notification
class NotificationSerializer(serializers.ModelSerializer):
body = serializers.SerializerMethodField()
class Meta:
model = Notification
fields = [
'id', 'notice_type', 'is_on_cre... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,508 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/check/migrations/0003_auto_20210426_1106.py | # Generated by Django 2.2.16 on 2021-04-26 05:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('check', '0002_auto_20210415_1834'),
]
operations = [
migrations.AlterField(
model_name='check',
name='accrued_point... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,509 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/urls.py | from django.urls import path, include
from apps.brand.views import (
BrandRetrieveAPIView, BrandListAPIView, FilialListAPIView,
FilialRetrieveAPIView
)
urlpatterns = [
path('', BrandListAPIView.as_view(), name='brand_list'),
path('<int:id>/', BrandRetrieveAPIView.as_view(), name='brand_detail'),
... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,510 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/check/urls.py | from django.urls import path
from apps.check.views import (
QRCodeAPIView, CheckListAPIView, CheckRetrieveAPIView
)
urlpatterns = [
path('', CheckListAPIView.as_view(), name='check_list'),
path('<int:pk>/', CheckRetrieveAPIView.as_view(), name='check_detail'),
path('qr/', QRCodeAPIView.as_view(), nam... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,511 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/account/urls.py | from django.urls import path
from fcm_django.api.rest_framework import FCMDeviceAuthorizedViewSet
from apps.account.views import (
AuthAPIView, LoginConfirmAPIView, CityListAPIView,
UserUpdateAPIView, UserAvatarRetrieveUpdateAPIView,
SendSmsToOldPhoneAPIView, OldPhoneConfirmAPIView,
ChangeOldPhoneAPIVi... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,512 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/setting/migrations/0002_appversion.py | # Generated by Django 2.2.16 on 2021-04-07 07:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('setting', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='AppVersion',
fields=[
('i... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,513 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/check/admin.py | from django.contrib import admin
from apps.check.models import Check
@admin.register(Check)
class CheckAdmin(admin.ModelAdmin):
list_display = ('unique_1c_check_code', 'user', 'filial',)
search_fields = ('unique_1c_check_code',)
readonly_fields = (
'unique_1c_check_code', 'money_paid', 'bonus_pai... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,514 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/info/migrations/0001_initial.py | # Generated by Django 2.2 on 2021-03-29 07:58
import core.utils
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Banner',
f... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,515 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/setting/urls.py | from django.urls import path
from .views import AppVersionAPIView
urlpatterns = [
path('version/', AppVersionAPIView.as_view(), name='app-version'),
]
| {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,516 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /core/settings/base.py | import os
import logging
import environ
BASE_DIR = os.path.dirname(
os.path.dirname(os.path.dirname((os.path.abspath(__file__)))))
env = environ.Env()
INSTALLED_APPS = [
'huey.contrib.djhuey',
'jet',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.co... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,517 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/notifications/migrations/0002_auto_20210428_1228.py | # Generated by Django 2.2.16 on 2021-04-28 06:28
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('info', '0008_auto_20210428_1228'),
('check', '0003_auto_20210426_1106'),
('notifications', '0001_initial'),... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,518 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/info/migrations/0002_auto_20210329_1451.py | # Generated by Django 2.2 on 2021-03-29 08:51
import ckeditor_uploader.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('info', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='programcondition',
... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,519 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/setting/migrations/0004_auto_20210505_1513.py | # Generated by Django 2.2.16 on 2021-05-05 09:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('setting', '0003_appversion_ios_build_number'),
]
operations = [
migrations.AlterField(
model_name='appversion',
nam... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,520 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/__init__.py | default_app_config = 'apps.brand.apps.BrandConfig'
| {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,521 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/info/tests/factories.py | from random import choice
import factory
from apps.info.models import (
Banner, ProgramCondition,
Contact, PromotionAndNews,
PromotionAndNewsImage, ContactIcon,
)
from core.constants import PROMOTION, NEWS
class ContactIconFactory(factory.django.DjangoModelFactory):
class Meta:
model = Conta... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,522 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/migrations/0009_auto_20210426_1104.py | # Generated by Django 2.2.16 on 2021-04-26 05:04
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('brand', '0008_auto_20210415_1834'),
]
operations = [
migrations.AlterField(
model_name='filial',
... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,523 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/service.py | from datetime import datetime
from rest_framework import exceptions
from haversine import haversine
from apps.brand.models import WorkTime
from core.constants import WEEKDAY
class FilialService:
"""
Service for check filial status
"""
@staticmethod
def check_filial_status(filial_obj) -> bo... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,524 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/info/urls.py | from django.urls import path
from .views import (
BannerAndPromotionAPIView,
BannerRetrieveAPIView,
ProgramConditionAPIView,
ContactListAPIView,
PromotionAndNewsListAPIView,
PromotionAndNewsRetrieveAPIView,
)
urlpatterns = [
path(
'promotions-news/',
PromotionAndNewsListAPI... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,525 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/migrations/0011_auto_20210601_1549.py | # Generated by Django 2.2.16 on 2021-06-01 09:49
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('brand', '0010_auto_20210512_1145'),
]
operations = [
migrations.RemoveField(
model_name='filia... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,526 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /core/constants.py | MALE = 'male'
FEMALE = 'female'
GENDER_TYPE = (
(MALE, 'Мужской'),
(FEMALE, 'Женский')
)
NEWS = 'news'
PROMOTION = 'promotion'
INFORMATION_TYPE = (
(NEWS, 'Новость'),
(PROMOTION, 'Акция'),
)
ACCRUED = 'accrued'
WITHDRAW = 'withdrawn'
ACCRUED_AND_WITHDRAW = 'accrued_and_withdrawn'
NOTIFICATION_TYPE ... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,527 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/account/migrations/0006_user_user_1c_code.py | # Generated by Django 2.2.16 on 2021-04-14 05:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0005_user_is_old_phone_confirmed'),
]
operations = [
migrations.AddField(
model_name='user',
name='user_... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,528 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/info/__init__.py | default_app_config = 'apps.info.apps.InfoConfig'
| {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,529 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/pagination.py | from rest_framework.response import Response
from rest_framework.pagination import PageNumberPagination
class LargeListPagination(PageNumberPagination):
page_size = 20
def get_paginated_response(self, data):
return Response({
'count': self.page.paginator.count,
'next': self.pa... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,530 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/tests/test_views.py | from collections import OrderedDict
from django.urls import reverse
from rest_framework import status
from rest_framework.exceptions import ErrorDetail
from rest_framework.test import APITestCase
from apps.brand.models import Brand
class TestBrandListAPIView(APITestCase):
def setUp(self) -> None:
Brand... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,531 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/account/migrations/0005_user_is_old_phone_confirmed.py | # Generated by Django 2.2.16 on 2021-04-07 07:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0004_auto_20210402_1044'),
]
operations = [
migrations.AddField(
model_name='user',
name='is_old_phone_c... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,532 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/setting/tests/test_middleware.py | from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from apps.setting.tests.factories import SettingFactory
class SettingMiddlewareTest(TestCase):
@classmethod
def setUpTestData(cls):
cls.admin_url = reverse('ad... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,533 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/info/migrations/0009_auto_20210506_1458.py | # Generated by Django 2.2.16 on 2021-05-06 08:58
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('info', '0008_auto_20210428_1228'),
]
operations = [
migrations.AlterField(
model_name='promotionandnews',
... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,534 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/admin.py | from django.contrib import admin
from django.forms.models import BaseInlineFormSet
from adminsortable2.admin import SortableAdminMixin
from django_2gis_maps.admin import DoubleGisAdmin
from apps.brand.models import (
Brand, BrandImage, Filial, FilialImage, FilialPhone, WorkTime
)
from apps.brand.service import Wo... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,535 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/brand/migrations/0003_remove_filial_description.py | # Generated by Django 2.2.16 on 2021-03-30 08:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('brand', '0002_auto_20210329_2332'),
]
operations = [
migrations.RemoveField(
model_name='filial',
name='description',
... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
6,536 | TimurAbdymazhinov/adeliya-backend | refs/heads/main | /apps/check/migrations/0006_auto_20210504_1222.py | # Generated by Django 2.2.16 on 2021-05-04 06:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('check', '0005_auto_20210503_1341'),
]
operations = [
migrations.AlterField(
model_name='check',
name='status',
... | {"/apps/info/views.py": ["/apps/brand/pagination.py", "/core/constants.py", "/apps/info/models.py", "/apps/info/serializers.py", "/apps/notifications/service.py"], "/apps/notifications/serializers.py": ["/apps/notifications/models.py"], "/apps/brand/urls.py": ["/apps/brand/views.py"], "/apps/check/urls.py": ["/apps/che... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.