index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
83,635
Atuahene3/house-deal
refs/heads/master
/lib/python3.7/heapq.py
/Users/theoatadu/anaconda3/lib/python3.7/heapq.py
{"/main.py": ["/form.py"]}
83,636
Atuahene3/house-deal
refs/heads/master
/main.py
from flask import Flask,render_template,redirect,flash,url_for from form import Prediction from joblib import load app = Flask(__name__) app.config['SECRET_KEY'] = 'bb82e940866b9446a62342d10665020f' @app.route('/' , methods=['GET','POST']) def home(): form = Prediction() result = '' if form.validate_on_su...
{"/main.py": ["/form.py"]}
83,637
Atuahene3/house-deal
refs/heads/master
/lib/python3.7/io.py
/Users/theoatadu/anaconda3/lib/python3.7/io.py
{"/main.py": ["/form.py"]}
83,638
Atuahene3/house-deal
refs/heads/master
/lib/python3.7/os.py
/Users/theoatadu/anaconda3/lib/python3.7/os.py
{"/main.py": ["/form.py"]}
83,639
Atuahene3/house-deal
refs/heads/master
/lib/python3.7/random.py
/Users/theoatadu/anaconda3/lib/python3.7/random.py
{"/main.py": ["/form.py"]}
83,641
patelvishu05/PythonURLShortener
refs/heads/master
/app.py
#!/usr/bin/python3 import json from os import path class ShortURL: def __init__(self,debug): self.shortenedUrls = {} self.visitCounter = {} self.debug = False if path.exists("data.json"): with open("data.json") as f: self.shortenedUrls = json.load(f) ...
{"/test.py": ["/app.py"]}
83,642
patelvishu05/PythonURLShortener
refs/heads/master
/simple.py
#!/usr/bin/python3 import json from os import path class ShortURL: def __init__(self): if path.exists("data.json"): with open("data.json") as f: shortenedUrls = json.load(f) visitCounter = {} if path.exists("counter.json"): with open("counter.json") as f: ...
{"/test.py": ["/app.py"]}
83,643
patelvishu05/PythonURLShortener
refs/heads/master
/test.py
#!/usr/bin/python3 from app import * import unittest class MyTest(unittest.TestCase): urlObj = ShortURL(False) def test_shortURLTest(self): self.assertEqual(urlObj.shorten("www.samsung.com","sam"),"http://localhost/sam") def test_visitURLTest(self): self.assertEqual(urlObj.visit("htt...
{"/test.py": ["/app.py"]}
83,647
EmperorYP7/covid-simulator
refs/heads/master
/simulation.py
import matplotlib.pyplot as plt import params import virus def main(): covidparams = params.COVID19_PARAMS coronavirus = virus.Virus(covidparams) coronavirus.animate() plt.show() if __name__ == "__main__": main()
{"/simulation.py": ["/params.py"]}
83,648
EmperorYP7/covid-simulator
refs/heads/master
/virus_test.py
import unittest import virus class TestVirus(unittest.TestCase): def test_init(self): CUSTOM_PARAMS = { "r0": -1, "incubation": 5, "percent_mild": 0.8, "mild_recovery": (7, 14), "percent_severe": 0.2, "severe_recovery": (21, 42), ...
{"/simulation.py": ["/params.py"]}
83,649
EmperorYP7/covid-simulator
refs/heads/master
/params.py
GREY = (0.78, 0.78, 0.78) # uninfected RED = (0.96, 0.15, 0.15) # infected GREEN = (0, 0.86, 0.03) # recovered BLACK = (0, 0, 0) # dead COVID19_PARAMS = { "r0": 2.28, "incubation": 5, "percent_mild": 0.8, "mild_recovery": (7, 14), "percent_severe": 0.2, "severe_recovery": (21, 42...
{"/simulation.py": ["/params.py"]}
83,650
acristoffers/ahio
refs/heads/master
/ahio/drivers/__init__.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,651
acristoffers/ahio
refs/heads/master
/ahio/drivers/arduino.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,652
acristoffers/ahio
refs/heads/master
/ahio/drivers/siso_model.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,653
acristoffers/ahio
refs/heads/master
/ahio/drivers/dummy.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,654
acristoffers/ahio
refs/heads/master
/ahio/drivers/modbus.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,655
acristoffers/ahio
refs/heads/master
/ahio/__init__.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,656
acristoffers/ahio
refs/heads/master
/ahio/drivers/generic_tcp_io.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,657
acristoffers/ahio
refs/heads/master
/ahio/drivers/snap7.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,658
acristoffers/ahio
refs/heads/master
/ahio/abstract_driver.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,659
acristoffers/ahio
refs/heads/master
/ahio/drivers/raspberry.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # 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, ...
{"/ahio/drivers/arduino.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/siso_model.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/dummy.py": ["/ahio/abstract_driver.py"], "/ahio/drivers/modbus.py": ["/ahio/abstract_driver.py"], "/ahio/__init__.py": ["/ahio/drivers/__init__.py"], "/ahio/drivers/generic_tcp_io.py": ...
83,660
katunold/Andela_Switch_Reverse
refs/heads/master
/main.py
from switch_reverser import list_check def main(): global run run = True values = [] while run: print("Enter exit to stop") value = input("Please insert items : ") if value.lower() == "exit": run = False return else: try: ...
{"/main.py": ["/switch_reverser.py"], "/test_switch_reverser.py": ["/switch_reverser.py"]}
83,661
katunold/Andela_Switch_Reverse
refs/heads/master
/test_switch_reverser.py
from unittest import TestCase from switch_reverser import list_check class Tests(TestCase): def test_reverse_list(self): self.assertEqual(list_check([1, 2, 3, 4, 5, 6, 7, 8, 9]), [9, 8, 7, 6, 5, 4, 3, 2, 1]) self.assertEqual(list_check(["Air", "God", "Jesus", "Developer", "Man"]), ...
{"/main.py": ["/switch_reverser.py"], "/test_switch_reverser.py": ["/switch_reverser.py"]}
83,662
katunold/Andela_Switch_Reverse
refs/heads/master
/switch_reverser.py
def list_check(list_values): # Add item to list of string if it is a string int_list = [item for item in list_values if isinstance(item, int)] # Add item to list of ints if it is an int str_list = [item for item in list_values if isinstance(item, str)] if len(list_values) == len(int_list): r...
{"/main.py": ["/switch_reverser.py"], "/test_switch_reverser.py": ["/switch_reverser.py"]}
83,674
ShouravAhmed/Educational-Organization-List
refs/heads/main
/bdPopulate.py
import json def populateBdData(): with open("finalData.json", 'r') as f: finalData = json.load(f) bdData = list() for organization in finalData['organization']: try: if finalData['organization'][organization]['country'].strip().lower() == "bangladesh": ...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,675
ShouravAhmed/Educational-Organization-List
refs/heads/main
/codeOrg/codeorg.py
import requests import json import csv import time import os projectPath = os.path.normpath(os.getcwd() + os.sep + os.pardir) class codeOrgPublicSchoolData(): def __init__(self): self.finalData = dict() self.finalData["source"] = "https://code.org/schools.json" self.finalData["description"...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,676
ShouravAhmed/Educational-Organization-List
refs/heads/main
/margeData.py
import json import time def margeFinalData(): finalData = dict() finalData['source'] = "https://github.com/ShouravAhmed/EduOrgList"; finalData['description'] = 'Details of educational institutes' finalData['creation time'] = int(time.time()) finalData['organization'] = dict() dirr = ['uniAZ', ...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,677
ShouravAhmed/Educational-Organization-List
refs/heads/main
/hipoUnilist/hipo.py
import requests import json import time import os projectPath = os.path.normpath(os.getcwd() + os.sep + os.pardir) class hipoUniDomainList(): def __init__(self): self.finalData = dict() self.finalData["source"] = "https://github.com/Hipo/university-domains-list" self.finalData["description...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,678
ShouravAhmed/Educational-Organization-List
refs/heads/main
/schoolNameOnly/school.py
import requests import json import time import os projectPath = os.path.normpath(os.getcwd() + os.sep + os.pardir) class hipoUniDomainList(): def __init__(self): self.finalData = dict() self.finalData["source"] = "https://github.com/MLH/mlh-policies/blob/master/schools.csv" self.finalData[...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,679
ShouravAhmed/Educational-Organization-List
refs/heads/main
/uniAZ/uniaz.py
import os import json import sys import csv import time projectPath = os.path.normpath(os.getcwd() + os.sep + os.pardir) sys.path.append(projectPath) import ots import threading from concurrent.futures import ThreadPoolExecutor urlList = dict() finalData = dict() totalProcessed = 0 processLap = 0 class allUniver...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,680
ShouravAhmed/Educational-Organization-List
refs/heads/main
/ots.py
import requests from bs4 import BeautifulSoup import csv import json import re import os class one_time_scraper(object): def __init__(self): self.cookies = dict() self.rheaders = "" # ---------------------------------------------------------- self.page_htm = None self.bts = ...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,681
ShouravAhmed/Educational-Organization-List
refs/heads/main
/bdedu/bdedu.py
import openpyxl import re import json import csv import time import os projectPath = os.path.normpath(os.getcwd() + os.sep + os.pardir) import threading from concurrent.futures import ThreadPoolExecutor finalData = dict() class bdEduDataCollector(): # data source # https://banbeis.portal.gov.bd/ def ...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,682
ShouravAhmed/Educational-Organization-List
refs/heads/main
/codeforces/cf.py
import os import json import sys import csv import requests import time projectPath = os.path.normpath(os.getcwd() + os.sep + os.pardir) sys.path.append(projectPath) class codeforces(): def __init__(self): self.finalData = dict() self.finalData["source"] = "https://codeforces.com/api/user.ratedLis...
{"/uniAZ/uniaz.py": ["/ots.py"]}
83,684
UMNLibraries/oclc-datasync-reports
refs/heads/master
/datasync_unres.py
''' This script produces an .xlsx file and a .txt file for each of the 5 University of Minnesota OCLC symbols (MNU, MLL, MND, MNX, MCR. Files are to be used for manual processing of records returned as unresolved by OCLC Datasync. Inputs required: OCLC Datasync unresolved cross-ref report, One .csv file per symbol fr...
{"/datasync_delete_report.py": ["/datasync_unres_analytics.py"]}
83,685
UMNLibraries/oclc-datasync-reports
refs/heads/master
/datasync_xref.py
# coding: utf-8 '''This script creates two files from the OCLC Datasync report file *xrefrept.txt: 1)a .txt. file of Alma MMS IDS formatted for input to Alma's set creation job; 2) a file of brief MARC records from the OCLC Datasync report file *xrefrept.txt to be used as input for Alma import profile Add 035 (OCoLC)...
{"/datasync_delete_report.py": ["/datasync_unres_analytics.py"]}
83,686
UMNLibraries/oclc-datasync-reports
refs/heads/master
/datasync_delete_report.py
'''This script fetches predefined deleted holdings reports from Alma Analytics for each OCLC symbol managed under UMMBL (MNU, MND, MCR, MNX, MLL), parses the reports, and outputs a CSV file for the OCLC Datasync process.''' import csv import requests import pandas as pd from datetime import date from lxml import etre...
{"/datasync_delete_report.py": ["/datasync_unres_analytics.py"]}
83,687
UMNLibraries/oclc-datasync-reports
refs/heads/master
/datasync_unres_analytics.py
'''This script requires as input the OCLC Datasync unresolved report file *unresxrefrpt.txt. Based on that file, the script creates a CSV from the text file, creates an Alma Analytics filter of Alma MMS IDs from the list in the unresolved report, pulls an XML report via the Alma Analytics API using that filter, parse...
{"/datasync_delete_report.py": ["/datasync_unres_analytics.py"]}
83,688
UMNLibraries/oclc-datasync-reports
refs/heads/master
/datasync_exception_report.py
# coding: utf-8 '''This script turns the OCLC Datasync exceptions report file bibdetailexcpt.txt into something more useful for subsequent manual processing (Excel). The .txt file is parsed based on the content of each error message, and output is written to an Excel Workbook with two worksheets: one for MARC errors u...
{"/datasync_delete_report.py": ["/datasync_unres_analytics.py"]}
83,689
UMNLibraries/oclc-datasync-reports
refs/heads/master
/datasync_xref_update.py
'''This script updates OCLC numbers in Alma bibliographic records based on the OCLC Datasync cross-reference report *xrefrpt.txt. Based on that file, the script fetches each record via the Alma bib API, adds or changes the OCLC number in the MARCXML record, and replaces the Alma bib record with the updated record. It...
{"/datasync_delete_report.py": ["/datasync_unres_analytics.py"]}
83,692
phanirajl/row-estimator-for-apache-cassandra
refs/heads/main
/row_estimator_for_apache_cassandra/estimator.py
#Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #Licensed under the Apache License, Version 2.0 (the "License"). #You may not use this file except in compliance with the License. #You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 #Unless required by ap...
{"/row_estimator_for_apache_cassandra/__main__.py": ["/row_estimator_for_apache_cassandra/estimator.py"]}
83,693
phanirajl/row-estimator-for-apache-cassandra
refs/heads/main
/test/test_cassandra_row_estimator.py
import pytest from cassandra.cluster import Cluster from cassandra.auth import PlainTextAuthProvider from cassandra import ConsistencyLevel from cassandra.cluster import ExecutionProfile from cassandra.policies import WhiteListRoundRobinPolicy from cassandra_row_estimator.estimator import Estimator def add_helper(n)...
{"/row_estimator_for_apache_cassandra/__main__.py": ["/row_estimator_for_apache_cassandra/estimator.py"]}
83,694
phanirajl/row-estimator-for-apache-cassandra
refs/heads/main
/row_estimator_for_apache_cassandra/__main__.py
#Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #Licensed under the Apache License, Version 2.0 (the "License"). #You may not use this file except in compliance with the License. #You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 #Unless required by ap...
{"/row_estimator_for_apache_cassandra/__main__.py": ["/row_estimator_for_apache_cassandra/estimator.py"]}
83,695
phanirajl/row-estimator-for-apache-cassandra
refs/heads/main
/setup.py
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name = "row-estimator-for-apache-cassandra", packages = ["row_estimator_for_apache_cassandra"], include_package_data=True, version = "0.0.3", description = "The Row Estima...
{"/row_estimator_for_apache_cassandra/__main__.py": ["/row_estimator_for_apache_cassandra/estimator.py"]}
83,706
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/api/view/products_viewssets.py
from rest_framework import generics, serializers from rest_framework import status from rest_framework import viewsets from rest_framework.response import Response from base.api import GeneralListApiView from productos.api.serializers.product_serializers import ProductSerializer from users.authentication_mixin import...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,707
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/api/serializers/product_serializers.py
from rest_framework import serializers from productos.models import Product class ProductSerializer(serializers.ModelSerializer): class Meta: model= Product #exclude=('state') exclude=('state','created_date','modified_date','deleted_date') def to_representation(self, instance): return { ...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,708
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/models.py
from django.db import models from simple_history.models import HistoricalRecords from base.models import ModeloBase # MODELO QUE VA A TENER LA UNIDAD DE MEDIDA DE LOS PRODCUTOS class MeasureUnit(ModeloBase): descripton=models.CharField('Descripcion', max_length=250,blank=False,null=False,unique=True) historica...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,709
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/users/authentication.py
from datetime import timedelta from django.utils import timezone from django.conf import settings from rest_framework.authentication import TokenAuthentication from rest_framework.exceptions import AuthenticationFailed class ExpiringTokenAuthentication(TokenAuthentication): expired =False # CALCULA EL TIEMPO DE EXP...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,710
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/users/api/serializers.py
from rest_framework import serializers from users.models import User ''' SERIALIZERS PARA LISTAR CON EL TOKEN ''' class UserTokenSerializer(serializers.ModelSerializer): class Meta: model=User fields=('username','email','name','last_name') class UserSerializers(serializers.ModelSerializer): class M...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,711
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/api/serializers/general_serializers.py
from productos.models import MeasureUnit,CategoryProduct,Indicator from rest_framework import fields, serializers class MeasureUnitSerializer(serializers.ModelSerializer): class Meta: model=MeasureUnit #fields='__all__' #exclude=('state',) exclude=('state','created_date','modified_date','deleted_dat...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,712
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/api/urls.py
from django.urls import path from productos.api.view.general_view import IndicatorListAPIView, MeasureUnitListAPIView, IndicatorListAPIView, CategoryProductListAPIView urlpatterns=[ path('unidad_medida/',MeasureUnitListAPIView.as_view(),name='unidad_medida_view'), path('ofertas/',IndicatorListAPIView.as_view(),...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,713
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/users/views.py
#PARA CONTROLAR LAS SESIONES ACTIVAS from django.contrib.admin.sites import all_sites from django.contrib.sessions.models import Session from datetime import datetime from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response # PARA GENERAL Y ACTUALIZAR T...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,714
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/base/models.py
from django.db import models # Create your models here. class ModeloBase(models.Model): id=models.AutoField(primary_key=True) state=models.BooleanField('Estado',default=True) created_date=models.DateField('Fecha creacion',auto_now=False,auto_now_add=True) modified_date=models.DateField('Fecha modificacion',a...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,715
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/admin.py
from django.contrib import admin from productos.models import * # Register your models here. class MeasureUnitAdmin(admin.ModelAdmin): list_display=('id','descripton') class CategoryProductAdmin(admin.ModelAdmin): list_display=('id','description') admin.site.register(MeasureUnit, MeasureUnitAdmin) admin.site...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,716
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/users/api/api.py
from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view from users.models import User from users.api.serializers import UserSerializers, UserListSerializers @api_view(['GET','POST']) def user_api_view(request): if request.method =='GET': ...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,717
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/api/view/general_view.py
from rest_framework import viewsets from rest_framework.response import Response from productos.models import MeasureUnit, Indicator, CategoryProduct from productos.api.serializers.general_serializers import MeasureUnitSerializer, IndicatorSerializer,CategoryProductSerializer class MeasureUnitViewSet(viewsets.Gene...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,718
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/api/routers.py
from rest_framework.routers import DefaultRouter from productos.api.view.general_view import * from productos.api.view.products_viewssets import ProductViewSet router = DefaultRouter() router.register(r'',ProductViewSet,basename='products') router.register(r'meazure-unit',MeasureUnitViewSet,basename='meazure-unit'...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,719
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/ApiRestaurante/urls.py
from django.contrib import admin from django.urls import path, include, re_path from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi from django.conf import settings from django.conf.urls.static import static from users.views import Login, Logout, UserToken ...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,720
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/users/api/urls.py
from django.urls import path from users.api.api import user_api_view,user_detail_api_view urlpatterns = [ path('',user_api_view,name='usuarios_api'), path('<int:pk>',user_detail_api_view,name='user_detail_api') ]
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,721
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/users/models.py
from django.db import models from django.contrib.auth.models import BaseUserManager,AbstractBaseUser,PermissionsMixin, UserManager from simple_history.models import HistoricalRecords class UserManage(BaseUserManager): def _create_user(self, username,email,last_name,password,is_staff,is_superuser,**extra_fields): ...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,722
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/users/authentication_mixin.py
from re import U from rest_framework import response from rest_framework import status from rest_framework.authentication import get_authorization_header from rest_framework.response import Response from rest_framework.renderers import JSONRenderer from users.authentication import ExpiringTokenAuthentication class Au...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,723
CarlosGiovannyG/ProyectoUnalApi
refs/heads/master
/productos/migrations/0001_initial.py
# Generated by Django 3.2.8 on 2021-10-13 03:40 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import simple_history.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
{"/productos/api/view/products_viewssets.py": ["/productos/api/serializers/product_serializers.py", "/users/authentication_mixin.py"], "/productos/api/serializers/product_serializers.py": ["/productos/models.py"], "/productos/models.py": ["/base/models.py"], "/users/api/serializers.py": ["/users/models.py"], "/producto...
83,731
pblankley/cs207-FinalProject
refs/heads/master
/demo.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 16 @author: ryanjanssen """ import numpy as np import chemkin207 as ck import os import matplotlib as mpl #if os.environ.get('DISPLAY','') == '': # print('no display found. Using non-interactive Agg backend') # mpl.use('Agg') import matplotl...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,732
pblankley/cs207-FinalProject
refs/heads/master
/chemkin207/supporting/make_coef_SQL.py
import sqlite3 import numpy as np import os BASE_DIR = os.path.dirname(os.path.abspath(__file__)) def drop_empty(this_list): """ # SOURCE: ADAPTED FROM HCS207 HOMEWORK 9 SOLUTION - RYAN JANSSEN Helper function to remove empty items from a list. Used in parsing the string lists from the text file. ...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,733
pblankley/cs207-FinalProject
refs/heads/master
/chemkin207/_tester.py
import os import sys BASE_PATH = os.path.dirname(os.path.dirname(__file__)) def test(): try: import pytest except ImportError: raise ImportError("You need pytest>=3.0 to run these tests") cmd = [BASE_PATH+'/chemkin207'] print("running: pytest {}".format(cmd)) sys.exit(pytest.main(cmd)) ...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,734
pblankley/cs207-FinalProject
refs/heads/master
/chemkin207/__init__.py
from .chemkin207 import ReactionSet from .chemkin207 import IrreversibleReaction from .chemkin207 import ReversibleReaction from .chemkin207 import Reaction from .chemkin207 import MultiReactionOutput from ._tester import test
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,735
pblankley/cs207-FinalProject
refs/heads/master
/chemkin207/chemkin207.py
import numpy as np from functools import reduce import os import xml.etree.ElementTree as ET import sqlite3 import csv import matplotlib as mpl #if os.environ.get('DISPLAY','') == '': # print('no display found. Using non-interactive Agg backend') # mpl.use('Agg') import matplotlib.pyplot as plt import h5py BASE...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,736
pblankley/cs207-FinalProject
refs/heads/master
/demo_table.py
import numpy as np import chemkin207 as ck import os # create a reaction set from the chemkin207 module demo_reaction = ck.ReactionSet("demo_xmls/rxns_reversible.xml") demo_reaction2 = ck.ReactionSet("demo_xmls/rxns.xml") concs = np.array([2.0, 1.0, .5, 1.0, 1.0, 1.0, 0.5, 1.5]) # Single table output - txt demo_rea...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,737
pblankley/cs207-FinalProject
refs/heads/master
/demo_graphic.py
import numpy as np import chemkin207 as ck import os import matplotlib as mpl #if os.environ.get('DISPLAY','') == '': # print('no display found. Using non-interactive Agg backend') # mpl.use('Agg') import matplotlib.pyplot as plt # create a reaction set from the chemkin207 module demo_reaction = ck.ReactionSet(...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,738
pblankley/cs207-FinalProject
refs/heads/master
/setup.py
#from distutils.core import setup from setuptools import setup setup( name = 'chemkin207', packages = ['chemkin207','chemkin207.tests'], package_data={'chemkin207': ['supporting/*.sqlite','tests/test_xmls/*.xml','tests/test_tables/*.tex']}, version = '0.1.13', description = 'Simple chemical kinetic...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,739
pblankley/cs207-FinalProject
refs/heads/master
/chemkin207/tests/test_chemkin207.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 16 17:12:32 2017 @author: paulblankley """ import numpy as np import os from chemkin207 import ReactionSet,MultiReactionOutput BASE_DIR = os.path.dirname(os.path.abspath(__file__)) def test_reaction_rates(): x = np.array([[1.],[2.]...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,740
pblankley/cs207-FinalProject
refs/heads/master
/demo_numeric.py
import numpy as np import chemkin207 as ck # create a reaction set from the chemkin207 module demo_reaction = ck.ReactionSet("demo_xmls/rxns_reversible.xml") concs = np.array([2.0, 1.0, .5, 1.0, 1.0, 1.0, 0.5, 1.5]).reshape(-1, 1) min_rate = demo_reaction.find_rates('H2', concs, [1500,2000], 'min') print('H2 min rate...
{"/demo.py": ["/chemkin207/__init__.py"], "/chemkin207/__init__.py": ["/chemkin207/chemkin207.py", "/chemkin207/_tester.py"], "/demo_table.py": ["/chemkin207/__init__.py"], "/demo_graphic.py": ["/chemkin207/__init__.py"], "/chemkin207/tests/test_chemkin207.py": ["/chemkin207/__init__.py"], "/demo_numeric.py": ["/chemki...
83,774
esirK/ShoppingListAPI
refs/heads/master
/app/models/item.py
from datetime import datetime from app.init_db import db class Item(db.Model): __tablename__ = "items" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64)) price = db.Column(db.Float()) quantity = db.Column(db.Float()) shoppinglist_id = db.Column(db.Integer, db.Foreign...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,775
esirK/ShoppingListAPI
refs/heads/master
/app/controller.py
import sqlalchemy from sqlalchemy.orm import make_transient from app.exceptions import UserAlreadyExist from app.init_db import db from app.models import ShoppingList, Item def save_user(user): """ Adds current user into the Database """ try: db.session.add(user) db.session.commit() ...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,776
esirK/ShoppingListAPI
refs/heads/master
/app/init_db.py
from flask_sqlalchemy import SQLAlchemy # initialize sql-alchemy db = SQLAlchemy()
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,777
esirK/ShoppingListAPI
refs/heads/master
/app/models/user.py
from datetime import datetime from time import time from itsdangerous import TimedJSONWebSignatureSerializer as Serializer, SignatureExpired, BadSignature from werkzeug.security import generate_password_hash, check_password_hash from app import config from app.init_db import db from app.models.item import Item from a...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,778
esirK/ShoppingListAPI
refs/heads/master
/tests/test_user.py
import unittest from app import create_app from app.init_db import db from app.models.user import User from app.controller import save_user class TestUser(unittest.TestCase): configurations = "testing" app = create_app(configurations) app.app_context().push() db.drop_all() db.create_all() d...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,779
esirK/ShoppingListAPI
refs/heads/master
/app/exceptions.py
class TokenExpired(Exception): """ This Will be raised incases where a token is valid but expired """ pass class InvalidToken(Exception): """ This Will be raised incases where a token is invalid """ pass class UserAlreadyExist(Exception): """ This Will be raised incases whe...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,780
esirK/ShoppingListAPI
refs/heads/master
/app/apis/v1.py
import os from flask import g, jsonify, Blueprint, request from flask_restplus import Resource, Api, marshal from flask_httpauth import HTTPBasicAuth from sqlalchemy import func from app.apis.parsers import parser, master_parser, update_parser, shoppinglist_parser, item_parser, \ update_shoppinglist_parser, upda...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,781
esirK/ShoppingListAPI
refs/heads/master
/tests/test_validators.py
from flask import json from tests.base_test import BaseTest class TestValidators(BaseTest): def test_un_available_end_point(self): """Tests what happens when a non existing endpoint is accessed""" response = self.client.get("/v1/shop") self.assertEqual(True, self.is_json(response.data)) ...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,782
esirK/ShoppingListAPI
refs/heads/master
/app/apis/parsers.py
from flask_restplus import reqparse, inputs master_parser = reqparse.RequestParser() master_parser.add_argument('email', type=inputs.email(), required=True, help='Email Of User Being Registered') master_parser.add_argument('password', type=str, required=True, help=...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,783
esirK/ShoppingListAPI
refs/heads/master
/app/models/__init__.py
from flask_restplus import fields, Namespace from . import item from . import shoppinglist from . import user Item = item.Item User = user.User ShoppingList = shoppinglist.ShoppingList ns = Namespace('api', description='Endpoints for accessing ' 'shoppingList App Resources') # MODEL...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,784
esirK/ShoppingListAPI
refs/heads/master
/tests/test_authentication.py
from flask import json from tests.base_test import BaseTest class TestAuthentication(BaseTest): def test_user_registration(self): """Test if a user is created using the api""" response = self.client.post("/v1/register", data=json.dumps({"name": "esirick", ...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,785
esirK/ShoppingListAPI
refs/heads/master
/tests/test_shoppinglist_items.py
import unittest from flask import json from tests.base_test import BaseTest class TestMain(BaseTest): def test_shopping_list_item_created_successfully(self): """ Test a Logged In User Can Add items to their shopping_lists """ self.create_shopping_lists("School") response...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,786
esirK/ShoppingListAPI
refs/heads/master
/app/models/shoppinglist.py
from datetime import datetime from app.init_db import db from app.models.item import Item class ShoppingList(db.Model): __tablename__ = "shoppinglists" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64)) description = db.Column(db.String(180)) owner_id = db.Column(db.Inte...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,787
esirK/ShoppingListAPI
refs/heads/master
/tests/base_test.py
import unittest from base64 import b64encode from flask import json from app import create_app from app.init_db import db class BaseTest(unittest.TestCase): configurations = "testing" app = create_app(configurations) def setUp(self): with self.app.app_context(): db.session.commit() ...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,788
esirK/ShoppingListAPI
refs/heads/master
/app/__init__.py
from flask import Flask from flask_migrate import Migrate from app.configurations import config from app.apis.v1 import api, bp, ns from app.init_db import db from flask_cors import CORS api.add_namespace(ns, path="/v1") def create_app(config_name): app = Flask(__name__) CORS(app) app.supports_credent...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,789
esirK/ShoppingListAPI
refs/heads/master
/tests/test_shoppinglist.py
from base64 import b64encode from flask import json from tests.base_test import BaseTest class TestShoppingList(BaseTest): def test_add_shopping_list(self): """ Test a Logged in User can add a shopping list into his/her account """ response = self.client.post( "/v1/sh...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,790
esirK/ShoppingListAPI
refs/heads/master
/app/apis/validators.py
import re from flask import jsonify def name_validalidatior(name, context, update=None): if update is not None: if name is '': name = "None" """Method used to validate various names""" if len(name.strip()) == 0 or not re.match("^[-a-zA-Z0-9_\\s]*$", name): response = { ...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,791
esirK/ShoppingListAPI
refs/heads/master
/tests/test_configurations.py
import os import unittest from app import config class TestConfig(unittest.TestCase): def setUp(self): self.dev_config = config['development'] self.testing_config = config['testing'] self.production_config = config['production'] def test_development_config(self): """Test For ...
{"/app/models/item.py": ["/app/init_db.py"], "/app/controller.py": ["/app/exceptions.py", "/app/init_db.py", "/app/models/__init__.py"], "/app/models/user.py": ["/app/__init__.py", "/app/init_db.py", "/app/models/item.py", "/app/models/shoppinglist.py", "/app/exceptions.py"], "/tests/test_user.py": ["/app/__init__.py",...
83,792
keithlee/shakeAppPyDev
refs/heads/master
/dbindexes.py
from models import Recipe, Question from dbindexer.api import register_index register_index(Recipe, {'text': 'icontains'})
{"/indexes.py": ["/shakeapp/indexes.py"]}
83,793
keithlee/shakeAppPyDev
refs/heads/master
/shakeapp/models.py
__author__ = "Keith Lee" __email__ = "keithlee002@gmail.com" from django.db import models from django.contrib.auth.models import User # Create your models here. class Recipe(models.Model): name = models.CharField(max_length=200) text = models.TextField(blank=True, null=True) numLikes = models.IntegerField(default=...
{"/indexes.py": ["/shakeapp/indexes.py"]}
83,794
keithlee/shakeAppPyDev
refs/heads/master
/shakeapp/views.py
__author__ = "Keith Lee" __email__ = "keithlee002@gmail.com" # Create your views here. from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect, HttpResponseServerError, Http404 from models import * from django.shortcuts import render_to_response, get_object_or_404 from django.template import R...
{"/indexes.py": ["/shakeapp/indexes.py"]}
83,795
keithlee/shakeAppPyDev
refs/heads/master
/shakeapp/indexes.py
from models import Recipe, Question from dbindexer.api import register_index register_index(Recipe, {'name': 'icontains'}) register_index(Question, {'name': 'icontains'})
{"/indexes.py": ["/shakeapp/indexes.py"]}
83,796
keithlee/shakeAppPyDev
refs/heads/master
/urls.py
from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('shakeapp.views', # Examples: #url(r'^shakeApp/', 'shakeApp.views.index'), url(r'^$', 'index', name= 'indexname'), url(r'^shakeApp/$', ...
{"/indexes.py": ["/shakeapp/indexes.py"]}
83,797
keithlee/shakeAppPyDev
refs/heads/master
/indexes.py
from dbindexer import autodiscover autodiscover() import shakeapp.indexes
{"/indexes.py": ["/shakeapp/indexes.py"]}
83,821
saifkaka66/ud036_StarterCode
refs/heads/master
/media.py
'''A program that prsesnts movie's trailers through a web browser''' class Movie(): ''' Attributes: title (str): title of the movie. poster_image_url (str): URL link for the movies's poster image. trailer_youtube_url (str): URL link for the movie trailer. ''' def __init__(self, title, pos...
{"/entertainment_center.py": ["/media.py"]}
83,822
saifkaka66/ud036_StarterCode
refs/heads/master
/entertainment_center.py
import media import fresh_tomatoes '''choosing favorite movies and providing their titles, posters and trailer videos ''' inception = media.Movie('inception', r'https://upload.wikimedia.org/wikipedia/en/2/2e/Ince' 'ption_%282010%29_theatrical_poster.jpg', ...
{"/entertainment_center.py": ["/media.py"]}
83,835
Core-coders/Angadi
refs/heads/main
/mainapp/models.py
from django.db import models from django.contrib.auth.models import AbstractUser TYPE = ((1, 'enduser'),(2, 'ration store'),(3,'food-departmnet')) class User(AbstractUser): email = models.EmailField( blank=False,max_length=254, verbose_name='email address') # ration_no = models.IntegerField() user_type =...
{"/mainapp/Views/ration.py": ["/mainapp/forms.py"], "/survey/forms.py": ["/survey/models.py"], "/mainapp/admin.py": ["/mainapp/models.py"], "/mainapp/Views/user.py": ["/mainapp/forms.py"], "/mainapp/Views/food.py": ["/mainapp/forms.py"], "/survey/views.py": ["/survey/forms.py", "/survey/models.py"]}
83,836
Core-coders/Angadi
refs/heads/main
/mainapp/Views/ration.py
from allauth.account.views import SignupView from ..forms import FoodSignupForm,RationSignupForm class RationUserRegistrationView(SignupView): template_name = 'account/signup_ration.html' form_class = RationSignupForm success_url = None def get_context_data(self, **kwargs): ret = super(RationU...
{"/mainapp/Views/ration.py": ["/mainapp/forms.py"], "/survey/forms.py": ["/survey/models.py"], "/mainapp/admin.py": ["/mainapp/models.py"], "/mainapp/Views/user.py": ["/mainapp/forms.py"], "/mainapp/Views/food.py": ["/mainapp/forms.py"], "/survey/views.py": ["/survey/forms.py", "/survey/models.py"]}
83,837
Core-coders/Angadi
refs/heads/main
/survey/forms.py
from django import forms from .models import Survey class ItemForm(forms.ModelForm): class Meta: model = Survey fields = [ 'item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7', 'item8', ...
{"/mainapp/Views/ration.py": ["/mainapp/forms.py"], "/survey/forms.py": ["/survey/models.py"], "/mainapp/admin.py": ["/mainapp/models.py"], "/mainapp/Views/user.py": ["/mainapp/forms.py"], "/mainapp/Views/food.py": ["/mainapp/forms.py"], "/survey/views.py": ["/survey/forms.py", "/survey/models.py"]}