index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
41,360,587 | dopplershift/MetPy | refs/heads/stop-dependabot | /examples/formats/NEXRAD_Level_3_File.py | # Copyright (c) 2015,2018 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
NEXRAD Level 3 File
===================
Use MetPy to read information from a NEXRAD Level 3 (NIDS product) file and plot
"""
import matplotlib.pyplot as plt
import numpy as... | {"/src/metpy/plots/declarative.py": ["/src/metpy/plots/__init__.py"], "/src/metpy/plots/__init__.py": ["/src/metpy/plots/declarative.py"]} |
41,360,588 | dopplershift/MetPy | refs/heads/stop-dependabot | /src/metpy/io/metar.py | # Copyright (c) 2019 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Parse METAR-formatted data."""
# Import the necessary libraries
from collections import namedtuple
from datetime import datetime
import warnings
import numpy as np
import pandas ... | {"/src/metpy/plots/declarative.py": ["/src/metpy/plots/__init__.py"], "/src/metpy/plots/__init__.py": ["/src/metpy/plots/declarative.py"]} |
41,360,589 | dopplershift/MetPy | refs/heads/stop-dependabot | /src/metpy/plots/__init__.py | # Copyright (c) 2014,2015,2016,2017 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
r"""Contains functionality for making meteorological plots."""
import logging
# Trigger matplotlib wrappers
from . import _mpl # noqa: F401
from ._util import (add_... | {"/src/metpy/plots/declarative.py": ["/src/metpy/plots/__init__.py"], "/src/metpy/plots/__init__.py": ["/src/metpy/plots/declarative.py"]} |
41,360,590 | dopplershift/MetPy | refs/heads/stop-dependabot | /tests/io/test_station_data.py | # Copyright (c) 2020 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Test station data information."""
import numpy as np
from numpy.testing import assert_almost_equal
import pandas as pd
from metpy.io import add_station_lat_lon
def test_add_lat... | {"/src/metpy/plots/declarative.py": ["/src/metpy/plots/__init__.py"], "/src/metpy/plots/__init__.py": ["/src/metpy/plots/declarative.py"]} |
41,360,591 | dopplershift/MetPy | refs/heads/stop-dependabot | /tests/io/test_metar.py | # Copyright (c) 2008,2015,2016,2017,2018,2019 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Test various metars."""
from datetime import datetime
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
import pytest
from ... | {"/src/metpy/plots/declarative.py": ["/src/metpy/plots/__init__.py"], "/src/metpy/plots/__init__.py": ["/src/metpy/plots/declarative.py"]} |
41,360,592 | dopplershift/MetPy | refs/heads/stop-dependabot | /tests/interpolate/test_points.py | # Copyright (c) 2018,2019 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Test the `points` module."""
import logging
import numpy as np
from numpy.testing import assert_almost_equal, assert_array_almost_equal
import pytest
from scipy.spatial im... | {"/src/metpy/plots/declarative.py": ["/src/metpy/plots/__init__.py"], "/src/metpy/plots/__init__.py": ["/src/metpy/plots/declarative.py"]} |
41,360,593 | dopplershift/MetPy | refs/heads/stop-dependabot | /examples/formats/NEXRAD_Level_2_File.py | # Copyright (c) 2015,2018,2019 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
NEXRAD Level 2 File
===================
Use MetPy to read information from a NEXRAD Level 2 (volume) file and plot
"""
import matplotlib.pyplot as plt
import numpy as ... | {"/src/metpy/plots/declarative.py": ["/src/metpy/plots/__init__.py"], "/src/metpy/plots/__init__.py": ["/src/metpy/plots/declarative.py"]} |
41,457,279 | kensonman/webframe | refs/heads/master | /views.py | # -*- coding: utf-8 -*-
# File: views.py
# Author: Kenson Man
# Date: 2017-05-11 11:53
# Desc: The webframe default views.
from datetime import datetime
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import get_user_model, logout as auth_logout, login as auth_login, authen... | {"/webframe/migrations/0012_numbering.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], "/webframe/migrations/0022_menuitem.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], "/webframe/migrations/0026_webauthnpubkey.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], ... |
41,457,280 | kensonman/webframe | refs/heads/master | /authentications.py | # -*- coding: utf-8 -*-
# File: webframe/authentications.py
# Author: Kenson Man <kenson@atomsystem.com.hk>
# Date: 2021-03-07 12:36
# Desc: Provide the customized AuthenticationBackend, which will take care of the effective period when authenticate(req, username, password)
from datetime import datetime
f... | {"/webframe/migrations/0012_numbering.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], "/webframe/migrations/0022_menuitem.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], "/webframe/migrations/0026_webauthnpubkey.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], ... |
41,457,281 | kensonman/webframe | refs/heads/master | /urls.py | # -*- coding: utf-8 -*-
#
from django.conf import settings
from django.urls import path, re_path, include
from django.views.i18n import JavaScriptCatalog
from . import views
app_name='webframe'
urlpatterns=[
re_path(r'^login/?$', views.Login.as_view(), name='login'),
re_path(r'^logout/?$', views.logout, name='lo... | {"/webframe/migrations/0012_numbering.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], "/webframe/migrations/0022_menuitem.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], "/webframe/migrations/0026_webauthnpubkey.py": ["/webframe/CurrentUserMiddleware.py", "/webframe/models.py"], ... |
41,469,441 | A2grey/Projet_POO | refs/heads/master | /fonctions.py | # -*- coding: utf8 -*-
import os, csv, re
import os.path
import pathlib
from os import path
import json
from fnmatch import fnmatch
from os import getcwd, chdir, mkdir
#Fonction de recherche des document abs et retournant les chemin.
def recherche_chemin(chemin_initial):
liste_chemin=[]
chemin = "./hep-th-abs"
f... | {"/communaute.py": ["/aide.py", "/auteur.py", "/initialisation.py"], "/auteur.py": ["/fonctions.py"], "/initialisation.py": ["/fonctions.py"]} |
41,469,442 | A2grey/Projet_POO | refs/heads/master | /auteur.py | from fonctions import fichier_citations
import networkx as nx
from pprint import pprint
import time
from pprint import pprint
import time
tmps1 = time.time()
#chargement des donnée
import json
from pprint import pprint
chemin1="./ArcticleAuteur.json"
chemin2="./CitationsArticles.json"
#telechargement de des do... | {"/communaute.py": ["/aide.py", "/auteur.py", "/initialisation.py"], "/auteur.py": ["/fonctions.py"], "/initialisation.py": ["/fonctions.py"]} |
41,469,443 | A2grey/Projet_POO | refs/heads/master | /initialisation.py |
# -*- coding: utf8 -*-
#Importation des modules
import os, sys, csv
import os.path
from os import getcwd, chdir, mkdir
from fonctions import * #recherche_ligne_auteurs, liste_auteurs, remplissage_baseArcticle
import time
class Initialisation:
#statut=
#if statut=="activé"
tmps1 = time.time() # On... | {"/communaute.py": ["/aide.py", "/auteur.py", "/initialisation.py"], "/auteur.py": ["/fonctions.py"], "/initialisation.py": ["/fonctions.py"]} |
41,469,444 | A2grey/Projet_POO | refs/heads/master | /communaute.py | # -*- coding: utf8 -*-
from sys import argv
#class Main():
#def condition(self):
statut = "desactivé"
nb_arguments = len(argv)
if argv[0] == "communaute.py":
if nb_arguments == 1:
print("")
print( "Veillez indiquer une operation que vous voulez que votre application 'communaute' fasse po... | {"/communaute.py": ["/aide.py", "/auteur.py", "/initialisation.py"], "/auteur.py": ["/fonctions.py"], "/initialisation.py": ["/fonctions.py"]} |
41,534,481 | sjacob-cn/dart-api | refs/heads/master | /dart/schema.py | import graphene
# from app.schema.data_gaps import Data_gapsQuery,DataMutation
# from app.schema.Pipeline_traceability import Pipeline_traceabilityQuery,Pipeline_traceabilityMutation
# from app.schema.system_traceability import system_traceabilityQuery,systemtraceabilityMutation
from app.schema.traceability import Trac... | {"/app/admin.py": ["/app/models.py"], "/dart/schema.py": ["/app/schema/traceability.py"], "/app/schema/traceability.py": ["/app/models.py", "/app/schema/utils.py", "/app/schema/descriptions.py", "/app/schema/validation.py"]} |
41,534,482 | sjacob-cn/dart-api | refs/heads/master | /app/schema/validation.py | from graphql import GraphQLError
class Validation:
def check_is_date_empty(value, field):
if value is None or value == '':
raise GraphQLError("{0} field can't be empty".format(field.title()))
def check_is_empty(value, field):
if value is None or value == '' or value.isspace():
... | {"/app/admin.py": ["/app/models.py"], "/dart/schema.py": ["/app/schema/traceability.py"], "/app/schema/traceability.py": ["/app/models.py", "/app/schema/utils.py", "/app/schema/descriptions.py", "/app/schema/validation.py"]} |
41,534,483 | sjacob-cn/dart-api | refs/heads/master | /app/schema/utils.py | from graphql import GraphQLError
import datetime
def get_wrapper_details(data_wrapper, qs,page, size):
if page <= 1:
skip = 0
current_page = 1
else:
skip = (page - 1) * size
current_page = page
total_elements = qs.count()
total_pages = int(total_elements / size)
... | {"/app/admin.py": ["/app/models.py"], "/dart/schema.py": ["/app/schema/traceability.py"], "/app/schema/traceability.py": ["/app/models.py", "/app/schema/utils.py", "/app/schema/descriptions.py", "/app/schema/validation.py"]} |
41,534,484 | sjacob-cn/dart-api | refs/heads/master | /app/schema/traceability.py | import graphene
from graphene_django import DjangoObjectType
from graphene import ObjectType
from app.models import *
from graphql import GraphQLError
from django.db import IntegrityError
from app.schema.validation import Validation
from .utils import *
from .descriptions import *
import json
class Touchpoints(Objec... | {"/app/admin.py": ["/app/models.py"], "/dart/schema.py": ["/app/schema/traceability.py"], "/app/schema/traceability.py": ["/app/models.py", "/app/schema/utils.py", "/app/schema/descriptions.py", "/app/schema/validation.py"]} |
41,550,791 | pyparsing/pyparsing | refs/heads/master | /examples/stackish.py | # stackish.py
#
# Stackish is a data representation syntax, similar to JSON or YAML. For more info on
# stackish, see http://www.savingtheinternetwithhate.com/stackish.html
#
# Copyright 2008, Paul McGuire
#
"""
NUMBER A simple integer type that's just any series of digits.
FLOAT A simple floating point typ... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,792 | pyparsing/pyparsing | refs/heads/master | /examples/builtin_parse_action_demo.py | #
# builtin_parse_action_demo.py
# Copyright, 2012 - Paul McGuire
#
# Simple example of using builtin functions as parse actions.
#
from pyparsing import *
integer = Word(nums).setParseAction(lambda t: int(t[0]))
# make an expression that will match a list of ints (which
# will be converted to actual ... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,793 | pyparsing/pyparsing | refs/heads/master | /examples/chemicalFormulas.py | #
# chemicalFormulas.py
#
# Copyright (c) 2003,2019 Paul McGuire
#
import pyparsing as pp
atomicWeight = {
"O": 15.9994,
"H": 1.00794,
"Na": 22.9897,
"Cl": 35.4527,
"C": 12.0107,
}
digits = "0123456789"
# Version 1
element = pp.Word(pp.alphas.upper(), pp.alphas.lower(), max=2)... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,794 | pyparsing/pyparsing | refs/heads/master | /examples/parsePythonValue.py | # parsePythonValue.py
#
# Copyright, 2006, by Paul McGuire
#
import pyparsing as pp
cvtBool = lambda t: t[0] == "True"
cvtInt = lambda toks: int(toks[0])
cvtReal = lambda toks: float(toks[0])
cvtTuple = lambda toks: tuple(toks.asList())
cvtDict = lambda toks: dict(toks.asList())
cvtList = lambda toks: [toks.asList()]... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,795 | pyparsing/pyparsing | refs/heads/master | /examples/numerics.py | #
# numerics.py
#
# Examples of parsing real and integers using various grouping and
# decimal point characters, varying by locale.
#
# Copyright 2016, Paul McGuire
#
# Format samples from https://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html
#
tests = """\
# Canadian (English and French)
4 29... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,796 | pyparsing/pyparsing | refs/heads/master | /examples/unicode_denormalizer.py | # unicode_denormalizer.py
#
# Demonstration of the pyparsing's transform_string() method, to
# convert identifiers in Python source code to equivalent Unicode
# characters. Python's compiler automatically normalizes Unicode
# characters back to their ASCII equivalents, so that identifiers may
# be rewritten using other... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,797 | pyparsing/pyparsing | refs/heads/master | /examples/greetingInKorean.py | #
# greetingInKorean.py
#
# Demonstration of the parsing module, on the prototypical "Hello, World!" example
#
# Copyright 2004-2016, by Paul McGuire
#
from pyparsing import Word, pyparsing_unicode as ppu
koreanChars = ppu.Korean.alphas
koreanWord = Word(koreanChars, min=2)
# define grammar
greet = korea... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,798 | pyparsing/pyparsing | refs/heads/master | /examples/adventureEngine.py | # adventureEngine.py
# Copyright 2005-2006, Paul McGuire
#
# Updated 2012 - latest pyparsing API
#
from pyparsing import *
import random
import string
def aOrAn(item):
if item.desc[0] in "aeiou":
return "an " + item.desc
else:
return "a " + item.desc
def enumerateItems(l):... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,799 | pyparsing/pyparsing | refs/heads/master | /examples/excelExpr.py | # excelExpr.py
#
# Copyright 2010, Paul McGuire
#
# A partial implementation of a parser of Excel formula expressions.
#
from pyparsing import (
CaselessKeyword,
Suppress,
Word,
alphas,
alphanums,
nums,
Optional,
Group,
oneOf,
Forward,
infixNotation,
opA... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,800 | pyparsing/pyparsing | refs/heads/master | /examples/rangeCheck.py | # rangeCheck.py
#
# A sample program showing how parse actions can convert parsed
# strings into a data type or object, and to validate the parsed value.
#
# Updated to use new addCondition method and expr() copy.
#
# Copyright 2011,2015 Paul T. McGuire
#
from pyparsing import Word, nums, Suppress, Optiona... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,801 | pyparsing/pyparsing | refs/heads/master | /examples/macroExpander.py | # macroExpander.py
#
# Example pyparsing program for performing macro expansion, similar to
# the C pre-processor. This program is not as fully-featured, simply
# processing macros of the form:
# #def xxx yyyyy
# and replacing xxx with yyyyy in the rest of the input string. Macros
# can also be composed us... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,802 | pyparsing/pyparsing | refs/heads/master | /tests/test_diagram.py | import unittest
from io import StringIO
from pathlib import Path
from typing import List
from examples.jsonParser import jsonObject
from examples.simpleBool import boolExpr
from examples.simpleSQL import simpleSQL
from examples.mozillaCalendarParser import calendars
from pyparsing.diagram import to_railroad, railroad_... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,803 | pyparsing/pyparsing | refs/heads/master | /examples/holaMundo.py | # escrito por Marco Alfonso, 2004 Noviembre
# importamos los símbolos requeridos desde el módulo
from pyparsing import (
Word,
alphas,
oneOf,
nums,
Group,
OneOrMore,
pyparsing_unicode as ppu,
)
# usamos las letras en latin1, que incluye las como 'ñ', 'á', 'é', etc.
alphas = p... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,804 | pyparsing/pyparsing | refs/heads/master | /examples/cpp_enum_parser.py | #
# cpp_enum_parser.py
#
# Posted by Mark Tolonen on comp.lang.python in August, 2009,
# Used with permission.
#
# Parser that scans through C or C++ code for enum definitions, and
# generates corresponding Python constant definitions.
#
#
from pyparsing import *
# sample string with enums and other stuf... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,805 | pyparsing/pyparsing | refs/heads/master | /examples/linenoExample.py | #
# linenoExample.py
#
# an example of using the location value returned by pyparsing to
# extract the line and column number of the location of the matched text,
# or to extract the entire line of text.
#
# Copyright (c) 2006, Paul McGuire
#
from pyparsing import *
data = """Now is the time
for all good m... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,806 | pyparsing/pyparsing | refs/heads/master | /tests/test_examples.py | #
# test_examples.py
#
from importlib import import_module
import unittest
class TestExamples(unittest.TestCase):
def _run(self, name):
mod = import_module("examples." + name)
getattr(mod, "main", lambda *args, **kwargs: None)()
def test_numerics(self):
self._run("numerics")
def ... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,550,807 | pyparsing/pyparsing | refs/heads/master | /examples/htmlStripper.py | #
# htmlStripper.py
#
# Sample code for stripping HTML markup tags and scripts from
# HTML source files.
#
# Copyright (c) 2006, 2016, Paul McGuire
#
from urllib.request import urlopen
from pyparsing import (
makeHTMLTags,
commonHTMLEntity,
replaceHTMLEntity,
htmlComment,
anyOpenTag,
anyCloseT... | {"/tests/test_unit.py": ["/examples/jsonParser.py", "/tests/json_parser_tests.py", "/examples/fourFn.py", "/examples/simpleSQL.py"], "/tests/test_diagram.py": ["/examples/jsonParser.py", "/examples/simpleBool.py", "/examples/simpleSQL.py", "/examples/mozillaCalendarParser.py"], "/examples/make_diagram.py": ["/examples/... |
41,621,156 | Brandon300055/ChessBot | refs/heads/master | /bot.py | from board import Board
from piece import Piece
class Bot:
def __init__(self, board, botColor = "b", whiteScore=0, blackScore=0, level=0):
self.board = board[:]
self.setBoard = board[:]
self.botColor = botColor
# score tracker
self.whiteScore = whiteScore
self.bl... | {"/main.py": ["/board.py", "/bot.py"], "/bot.py": ["/board.py", "/piece.py"], "/board.py": ["/piece.py"]} |
41,643,178 | rowlanja/CSU33012_Github_Visualizer | refs/heads/master | /wsgi.py | from app.main import app
import requests
if __name__ == "__main__":
app.run()
| {"/wsgi.py": ["/app/main.py"]} |
41,643,179 | rowlanja/CSU33012_Github_Visualizer | refs/heads/master | /app/main.py | from flask import Flask, redirect, request, render_template
import requests
import json
import random
import dateutil.parser
import datetime
labels = []
values = []
dates = []
commits= []
colors = [
"#F7464A", "#46BFBD", "#FDB45C", "#FEDCBA",
"#ABCDEF", "#DDDDDD", "#ABCABC", "#4169E1",
"#C71585", "#FF45... | {"/wsgi.py": ["/app/main.py"]} |
41,649,548 | chiranjeev11/chints11-microblog | refs/heads/master | /app/main/routes.py | from flask import Blueprint
from app import db
from datetime import datetime
main = Blueprint('main', __name__)
@main.before_request
def before_request():
if current_user.is_authenticated:
current_user.last_seen = datetime.utcnow()
db.session.commit() | {"/app/__init__.py": ["/config.py", "/app/users/routes.py", "/app/posts/routes.py", "/app/main/routes.py"], "/app/errors.py": ["/app/__init__.py"], "/app/main/routes.py": ["/app/__init__.py"], "/app/posts/routes.py": ["/app/__init__.py", "/app/posts/forms.py", "/app/models.py"], "/microblog.py": ["/app/__init__.py", "/... |
41,649,549 | chiranjeev11/chints11-microblog | refs/heads/master | /migrations/versions/66c72bb0f972_new_fields_in_user_model.py | """new fields in user model
Revision ID: 66c72bb0f972
Revises:
Create Date: 2021-02-08 12:01:43.512163
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '66c72bb0f972'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### comman... | {"/app/__init__.py": ["/config.py", "/app/users/routes.py", "/app/posts/routes.py", "/app/main/routes.py"], "/app/errors.py": ["/app/__init__.py"], "/app/main/routes.py": ["/app/__init__.py"], "/app/posts/routes.py": ["/app/__init__.py", "/app/posts/forms.py", "/app/models.py"], "/microblog.py": ["/app/__init__.py", "/... |
41,649,550 | chiranjeev11/chints11-microblog | refs/heads/master | /app/posts/routes.py | from flask import render_template, flash, redirect, url_for, request, Blueprint, current_app
from app import db
from flask_login import current_user
from app.posts.forms import EmptyForm, PostForm
from app.models import User, Post
from flask_login import login_required
from guess_language import guess_language
from fla... | {"/app/__init__.py": ["/config.py", "/app/users/routes.py", "/app/posts/routes.py", "/app/main/routes.py"], "/app/errors.py": ["/app/__init__.py"], "/app/main/routes.py": ["/app/__init__.py"], "/app/posts/routes.py": ["/app/__init__.py", "/app/posts/forms.py", "/app/models.py"], "/microblog.py": ["/app/__init__.py", "/... |
41,649,551 | chiranjeev11/chints11-microblog | refs/heads/master | /test.py | from app import app, db
from app.models import User, Post
from datetime import datetime, timedelta
import unittest
class UserModelCase(unittest.TestCase):
def setUp(self):
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
def test_... | {"/app/__init__.py": ["/config.py", "/app/users/routes.py", "/app/posts/routes.py", "/app/main/routes.py"], "/app/errors.py": ["/app/__init__.py"], "/app/main/routes.py": ["/app/__init__.py"], "/app/posts/routes.py": ["/app/__init__.py", "/app/posts/forms.py", "/app/models.py"], "/microblog.py": ["/app/__init__.py", "/... |
41,649,552 | chiranjeev11/chints11-microblog | refs/heads/master | /check_flask_sync_or_async.py | from flask import Flask
from flask_cors import CORS
app = Flask(__name__)
CORS(app, resources = {r'/*':{'origins': '*'}})
import time
@app.route('/')
def hello():
return 'ok1'
@app.route('/bc')
def hello2():
print('mc1')
time.sleep(50)
print('mc2')
return 'ok2'
@app.route('/bkl')
def hello3():
time.slee... | {"/app/__init__.py": ["/config.py", "/app/users/routes.py", "/app/posts/routes.py", "/app/main/routes.py"], "/app/errors.py": ["/app/__init__.py"], "/app/main/routes.py": ["/app/__init__.py"], "/app/posts/routes.py": ["/app/__init__.py", "/app/posts/forms.py", "/app/models.py"], "/microblog.py": ["/app/__init__.py", "/... |
41,796,228 | jorgeMunozMartinez/jenkins_ci | refs/heads/master | /script.py | #!/usr/bin/env python3
print ('Script de python')
| {"/pruebas.py": ["/script.py"]} |
41,805,996 | lukashaverbeck/parknet | refs/heads/master | /connection.py | # This module contains entities that are closely related to creating, maintaining and
# accessing a local network of agents.
# It defines a local webserver handing POST requests that are sent between multiple agents
# and a connector that ensures that a connection between the vehicles is created.
# it also implements u... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,805,997 | lukashaverbeck/parknet | refs/heads/master | /vision.py | # This module contains entities that collect information about the agent's environment
# including sensor data about the measured distances to the vehicle's front, right and back
# and visual camera data. It also uses the camera input to provide information about other agents
# in the agent's field of view.
#
# version... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,805,998 | lukashaverbeck/parknet | refs/heads/master | /tests/test_vehicle.py | import sys
from pathlib import Path
sys.path.append(str(Path(sys.path[0]).parent))
import unittest
from vehicle import Agent, Driver
class TestVehicle(unittest.TestCase):
def setUp(self):
self.driver_1 = Driver.instance()
self.driver_2 = Driver.instance()
self.agent_1 = Agent.ins... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,805,999 | lukashaverbeck/parknet | refs/heads/master | /scripts/hotspot.py | # This script opens up a standalone wifi network with user determined network information.
#
# version: 1.0 (31.12.2019)
import time
import threading
import time
import logging
from PyAccessPoint import pyaccesspoint
logging.basicConfig(format="%(asctime)s ::%(levelname)s:: %(message)s", level=logging.DEBUG)
access... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,000 | lukashaverbeck/parknet | refs/heads/master | /tests/test_util.py | import sys
from pathlib import Path
sys.path.append(str(Path(sys.path[0]).parent))
import unittest
from util import Singleton
@Singleton
class Something:
pass
class TestUtil(unittest.TestCase):
def setUp(self):
self.something_1 = Something.instance()
self.something_2 = Something.instance()
... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,001 | lukashaverbeck/parknet | refs/heads/master | /scripts/pca_controler.py | # This script is used to control any type of pwm-controlled hardware attached to the PCA9685 module.
# It allows to send a specific pwm signal to the seperate channels of the
# PCA9685 module as well as to one of several modules by specifying a I2C-address.
#
# version: 1.0 (30.12.2019)
import sys
import time
import... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,002 | lukashaverbeck/parknet | refs/heads/master | /scripts/manual_drive.py | # This script controls a picar with keyboard input via ssh console.
#
# version: 1.0 (31.12.2019)
import curses # keyboard input
import Adafruit_PCA9685 # PCA9685-module
from time import sleep
import threading
import RPi.GPIO as GPIO # GPIO-pin control
screen = curses.initscr() # create new screen
curses.noecho()... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,003 | lukashaverbeck/parknet | refs/heads/master | /scripts/distance.py | # This script calculates the distance between an HC-SR04 module and the nearest object.
# It is capable of handling multiple modules simultaneously.
#
# version: 1.0 (30.12.2019)
import RPi.GPIO as GPIO
import time
import curses # keyboard input and interface
screen = curses.initscr() # create new screen
screen.nod... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,004 | lukashaverbeck/parknet | refs/heads/master | /interaction.py | # This module contains entities that handle the communication and interaction between agents
# as well as the coordination of their actions.
# Therefore it defines a communication interface that allows to subscribe to, send and
# receive messages in a local network.
# It handles coordination by exchanging information ... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,005 | lukashaverbeck/parknet | refs/heads/master | /scripts/stepper.py | # This script rotates the stepper motor accordingly to user input.
#
# version: 1.0 (31.12.2019)
import sys
from time import sleep
import RPi.GPIO as GPIO
GPIO.setwarnings(False) # disable GPIO warnings for console convenience
GPIO.setmode(GPIO.BCM) # GPIO instance works in broadcom-memory mode
GPIO.setup(20, GPIO.... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,006 | lukashaverbeck/parknet | refs/heads/master | /scripts/init_esc.py | # This script initializes the ESC built into a picar with an activation pulse.
# Run this script before using any other PWM related ESC controls.
#
# version: 1.0 (30.12.2019)
import time
import Adafruit_PCA9685
pwm = Adafruit_PCA9685.PCA9685(address=0x40, busnum=1) # assign I2C-address and busnumber
pwm.set_pwm_fr... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,007 | lukashaverbeck/parknet | refs/heads/master | /util.py | # This module contains utility classes and functions that may be used
# throughout the whole project and cannot be assigned to single modules.
#
# version: 1.0 (02.01.2019)
from threading import Thread
class Singleton:
""" helper class ensuring that classes decorated with it can only be instantiated one single t... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,008 | lukashaverbeck/parknet | refs/heads/master | /scripts/angle.py | # Script gets user input from commandline and sets this as pwm value.
# Calculates the pwm value from an angle with a mathematical function.
#
# version: 1.0 (30.12.2019)
from __future__ import division
import time
import Adafruit_PCA9685
pwm = Adafruit_PCA9685.PCA9685(address=0x40, busnum=1) # create PCA9685 obje... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,009 | lukashaverbeck/parknet | refs/heads/master | /constants.py | # This module is a collection of global constants divided into multiple classes
# that represent a separate concern.
#
# version: 1.0 (28.12.2019)
class Connection:
WLAN_PASSWORD = "Hallo1234"
class Driving:
CAUTIOUS_VELOCITY = 8 # cm/s
STOP_VELOCITY = 0 # cm/s
MAX_VELOCITY = 9 ... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,010 | lukashaverbeck/parknet | refs/heads/master | /vehicle.py | # This module contains entities that are closely related to the vehicle itself.
# It defines Agents which are a general representation of an acting protagonist and
# a Driver controling the movement of the vehicle. Therefore a DriveThread applying this
# behaviour to the hardware and a RecorderThread handling the colle... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,011 | lukashaverbeck/parknet | refs/heads/master | /ai.py | # This module contains entities that provide the necessary functionality for the behaviour of a
# vehicle in complex situations that cannot be described by a set of simple rules.
# Therefore it defines a neural that takes in an image and the current steering angle
# and predicts a new steering angle for autnonomous dri... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,012 | lukashaverbeck/parknet | refs/heads/master | /tests/test_interaction.py | import sys
from pathlib import Path
sys.path.append(str(Path(sys.path[0]).parent))
import unittest
from vehicle import Agent
from connection import Server
from interaction import Communication, Message, ActionManager, Action
class TestInteraction(unittest.TestCase):
def setUp(self):
self.agent = Agent.in... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,013 | lukashaverbeck/parknet | refs/heads/master | /ui/interface.py | from flask import Flask, request, jsonify, render_template
app = Flask(__name__)
agent = None
driver = None
sensor_manager = None
action_manager = None
class WebInterface:
def __init__(self, agent_instance, driver_instance, sensor_manager_instance, action_manager_instance):
global agent, driver, sensor_m... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,806,014 | lukashaverbeck/parknet | refs/heads/master | /scripts/calculate_pwm.py | # This script tests the relation between pwm and steering angles or velocities.
# It gets user inputs and calculates the corresponding pwm values.
#
# NOTE This script is based on angle.py version: 2.0 (30.12.2019)
#
# version: 1.0 (13.12.2019)
import sys
import time
import Adafruit_PCA9685
mode = "" # global va... | {"/interaction/formation.py": ["/attributes/__init__.py", "/interaction.py", "/sensing/__init__.py", "/util.py"], "/util/concurrent.py": ["/util.py"], "/sensing/__init__.py": ["/sensing/distance.py", "/sensing/scanner.py"], "/attributes/agent.py": ["/util.py"], "/control/driver.py": ["/attributes/__init__.py", "/sensin... |
41,810,299 | VannieryFernandes/loja-de-carros | refs/heads/main | /app/v1/veiculos/veiculosRecursos.py | from fastapi import APIRouter
router = APIRouter()
@router.get("/lista-de-veiculos")
def lista_carros():
return [] | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,300 | VannieryFernandes/loja-de-carros | refs/heads/main | /app/v1/usuarios/usuariosModels.py | from sqlalchemy import Boolean, Column, Integer, String
from sqlalchemy.orm import relationship
from app.core.db import Base
class Usuario(Base):
__tablename__ = 'usuarios'
id = Column(Integer, primary_key=True, index=True)
full_name = Column(String, index=True)
email = Column(String, unique=True... | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,301 | VannieryFernandes/loja-de-carros | refs/heads/main | /app/v1/autenticacao/autenticacaoRecursos.py | from fastapi import APIRouter
router = APIRouter()
@router.post("/entrar")
def entrar():
return "Autenticando" | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,302 | VannieryFernandes/loja-de-carros | refs/heads/main | /app/v1/routers.py | from fastapi import APIRouter
from app.v1.veiculos import veiculosRecursos
from app.v1.autenticacao import autenticacaoRecursos
from app.v1.usuarios import usuariosRecursos
api_router = APIRouter()
api_router.include_router(autenticacaoRecursos.router, tags=["autenticacao"])
api_router.include_router(veiculosRecursos.... | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,303 | VannieryFernandes/loja-de-carros | refs/heads/main | /app/v1/clientes/clientesRecursos.py | from fastapi import APIRouter
router = APIRouter()
@router.get("/lista-de-clientes")
def lista_clientes():
return {"Hello":"Clientes"} | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,304 | VannieryFernandes/loja-de-carros | refs/heads/main | /app/core/db.py | import os
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import DeclarativeMeta, declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
from starlette.requests import Request
from dotenv import find_dotenv, load_dotenv
load_dotenv(find_dotenv())
SQLALCHEMY_DATABASE_URL = os.ge... | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,305 | VannieryFernandes/loja-de-carros | refs/heads/main | /tests/test_gerenciador.py | from core.main import app
from fastapi.testclient import TestClient
def test_quando_listar_carros_deve_ter_como_retorno_codigo_de_status_200():
cliente = TestClient(app)
resposta = cliente.get("/veiculos/lista-de-veiculos")
assert resposta.status_code == 200
# assert resposta.json() == {"msg": "Hello ... | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,306 | VannieryFernandes/loja-de-carros | refs/heads/main | /app/v1/usuarios/usuariosController.py | from typing import Optional
from sqlalchemy.orm import Session
from app.v1.usuarios.usuariosModels import Usuario
from app.v1.usuarios.usuariosSchema import UserCreate, UserUpdate
class UserController(Usuario):
def get_by_email( db_session: Session, email: str) -> Optional[Usuario]:
return db_session.q... | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,307 | VannieryFernandes/loja-de-carros | refs/heads/main | /main.py | from fastapi import FastAPI, Response, Request
from app.v1 import routers
from app.core.db import engine,SessionLocal
app = FastAPI(
title="Minha loja de veículos",
description="Autor: Vanniery Fernandes",
version="0.1"
)
@app.middleware("http")
async def db_session_middleware(request: Request, call_next)... | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,810,308 | VannieryFernandes/loja-de-carros | refs/heads/main | /app/v1/usuarios/usuariosRecursos.py | from fastapi import APIRouter, Body, Depends, HTTPException
from app.v1.usuarios.usuariosController import UserController
from app.v1.usuarios.usuariosSchema import User, UserCreate
from app.core.db import get_db
from sqlalchemy.orm import Session
router = APIRouter()
@router.post("/criar-usuario", response_model=Use... | {"/app/v1/usuarios/usuariosModels.py": ["/app/core/db.py"], "/tests/test_gerenciador.py": ["/core/main.py"], "/app/v1/usuarios/usuariosController.py": ["/app/v1/usuarios/usuariosModels.py"], "/main.py": ["/app/core/db.py"], "/app/v1/usuarios/usuariosRecursos.py": ["/app/v1/usuarios/usuariosController.py", "/app/core/db... |
41,853,684 | LoafBurger/ChainVote | refs/heads/main | /tiktokScraper.py | from os import link
from bs4 import BeautifulSoup
from urllib.request import urlopen as uReq #grab from the page
from bs4 import BeautifulSoup as soup #parse html text
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from urllib.request... | {"/Election/models.py": ["/Election/makeshiftHashNew.py", "/Election/initVoters.py", "/Election/globalValsGenerator.py"], "/Election/views.py": ["/Election/models.py", "/Election/makeshiftHashNew.py", "/Election/initVoters.py"], "/Election/blockchain.py": ["/Election/makeshiftHashNew.py", "/Election/block.py"], "/Elect... |
41,853,685 | LoafBurger/ChainVote | refs/heads/main | /rovtest.py | # from inputs import devices
# from inputs import get_gamepad
import pygame
import socket
import serial
import sys
# for device in devices:
# print(device)
pygame.init()
display = pygame.display.set_mode((600, 600))
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print(socket.gethostbyname(socket.getho... | {"/Election/models.py": ["/Election/makeshiftHashNew.py", "/Election/initVoters.py", "/Election/globalValsGenerator.py"], "/Election/views.py": ["/Election/models.py", "/Election/makeshiftHashNew.py", "/Election/initVoters.py"], "/Election/blockchain.py": ["/Election/makeshiftHashNew.py", "/Election/block.py"], "/Elect... |
41,853,686 | LoafBurger/ChainVote | refs/heads/main | /wInsta.py | import pandas as pd
pd.read_csv() | {"/Election/models.py": ["/Election/makeshiftHashNew.py", "/Election/initVoters.py", "/Election/globalValsGenerator.py"], "/Election/views.py": ["/Election/models.py", "/Election/makeshiftHashNew.py", "/Election/initVoters.py"], "/Election/blockchain.py": ["/Election/makeshiftHashNew.py", "/Election/block.py"], "/Elect... |
41,923,053 | MustafayevMohammed/To-Do | refs/heads/nihad | /tasks/migrations/0020_auto_20210508_1734.py | # Generated by Django 3.1.7 on 2021-05-08 13:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tasks', '0019_auto_20210508_1704'),
]
operations = [
migrations.AlterField(
model_name='task',
name='title',
... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,054 | MustafayevMohammed/To-Do | refs/heads/nihad | /tasks/models.py | from django.db import models
from django.db.models.deletion import CASCADE
from django.contrib.auth.models import User
# Create your models here.
class Task(models.Model):
author = models.ForeignKey(User ,on_delete=models.CASCADE ,null=True ,verbose_name="Yazan:",blank=True ,default=None)
title = models.TextFie... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,055 | MustafayevMohammed/To-Do | refs/heads/nihad | /tasks/views.py | from django.shortcuts import render,redirect
from . import models
from .forms import *
from django.contrib.auth.decorators import login_required
# Create your views here.
@login_required(login_url="user:login")
def index(request):
tasks = models.Task.objects.filter(confirm="False",author=request.user).order_by('-i... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,056 | MustafayevMohammed/To-Do | refs/heads/nihad | /user/views.py | from django.core.exceptions import ValidationError
from django.contrib.auth import authenticate, login, logout
from django.shortcuts import render,redirect
from .forms import *
# Create your views here.
def registerPage(request):
form = RegisterForm()
if request.method == "POST":
form = RegisterForm(re... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,057 | MustafayevMohammed/To-Do | refs/heads/nihad | /user/forms.py | from django.forms.forms import Form
from tasks.views import deleteTask
from django import forms
from django.db.models import fields
from django.forms import ModelForm, widgets
from django.forms.fields import CharField
from . import models
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.m... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,058 | MustafayevMohammed/To-Do | refs/heads/nihad | /tasks/forms.py | from django import forms
from django.db.models import fields
from django.forms import ModelForm, widgets
from . import models
# Forms
class TaskForm(forms.ModelForm):
class Meta:
model = models.Task
widgets = {
'title': forms.Textarea(attrs={'class':'addbar','spellcheck':'false','cols':... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,059 | MustafayevMohammed/To-Do | refs/heads/nihad | /user/urls.py | from django.conf.urls import include
from django.contrib import admin
from django.urls import path
from . views import *
app_name = "user"
urlpatterns = [
path("register/",registerPage,name="register"),
path("login/",loginPage,name="login"),
path("logout/",logoutPage,name="logout"),
] | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,060 | MustafayevMohammed/To-Do | refs/heads/nihad | /tasks/migrations/0019_auto_20210508_1704.py | # Generated by Django 3.1.7 on 2021-05-08 13:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tasks', '0018_auto_20210508_1703'),
]
operations = [
migrations.AlterField(
model_name='task',
name='title',
... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,061 | MustafayevMohammed/To-Do | refs/heads/nihad | /tasks/migrations/0017_auto_20210508_1648.py | # Generated by Django 3.1.7 on 2021-05-08 12:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tasks', '0016_task_author'),
]
operations = [
migrations.AlterField(
model_name='task',
name='title',
fi... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,062 | MustafayevMohammed/To-Do | refs/heads/nihad | /tasks/admin.py | from django.contrib import admin
from . import models
# Register your models here.
@admin.register(models.Task)
class TaskAdmin(admin.ModelAdmin):
list_display = ["id","title","author"]
list_display_links = ["id","title"]
class Meta:
model = models.Task | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,923,063 | MustafayevMohammed/To-Do | refs/heads/nihad | /tasks/urls.py | from django.contrib import admin
from django.urls import path
from . import views
app_name = "tasks"
urlpatterns = [
path("",views.index,name="index"),
path("updatetask/<str:id>/",views.updateTask,name="update_task"),
path("delete_task<str:id>/",views.deleteTask,name="delete_task"),
path("completed",vi... | {"/user/urls.py": ["/user/views.py"], "/tasks/views.py": ["/tasks/forms.py"], "/user/views.py": ["/user/forms.py"], "/user/forms.py": ["/tasks/views.py"]} |
41,948,519 | cszdzr/CITS-5505-Project2 | refs/heads/master | /migrations/versions/7b4aa852b80c_ass_enrollments_table.py | """ass enrollments table
Revision ID: 7b4aa852b80c
Revises: 356d5ec3bf71
Create Date: 2021-05-14 11:56:46.042334
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7b4aa852b80c'
down_revision = '356d5ec3bf71'
branch_labels = None
depends_on = None
def upgrade()... | {"/app/routes.py": ["/app/forms.py"]} |
41,948,520 | cszdzr/CITS-5505-Project2 | refs/heads/master | /app/routes.py | from datetime import datetime
from flask import render_template, flash, redirect, url_for, request
from flask_login import login_user, logout_user, current_user, login_required
from werkzeug.urls import url_parse
from app import app, db
from app.forms import LoginForm, RegistrationForm, \
ResetPasswordRequestForm, ... | {"/app/routes.py": ["/app/forms.py"]} |
41,948,521 | cszdzr/CITS-5505-Project2 | refs/heads/master | /app/setup.py | from app.models import Course
from app import db
u = Course(name="Reverse Parallel Park", content_url='https://www.youtube.com/embed/l4LcfZeS4qw', assessment_file="rpp_test.html", thumbnail='https://i.ytimg.com/vi/l4LcfZeS4qw/hqdefault.jpg')
db.session.add(u)
db.session.commit()
| {"/app/routes.py": ["/app/forms.py"]} |
41,948,522 | cszdzr/CITS-5505-Project2 | refs/heads/master | /migrations/versions/1358ad741915_update_course_table.py | """update course table
Revision ID: 1358ad741915
Revises: 2c8fa162f9f7
Create Date: 2021-05-11 15:47:41.090608
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1358ad741915'
down_revision = '2c8fa162f9f7'
branch_labels = None
depends_on = None
def upgrade():
... | {"/app/routes.py": ["/app/forms.py"]} |
41,948,523 | cszdzr/CITS-5505-Project2 | refs/heads/master | /migrations/versions/12aef4ff4368_add_course_name_to_enrollments.py | """add course_name to enrollments
Revision ID: 12aef4ff4368
Revises: 7b4aa852b80c
Create Date: 2021-05-14 12:54:44.110236
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '12aef4ff4368'
down_revision = '7b4aa852b80c'
branch_labels = None
depends_on = None
def ... | {"/app/routes.py": ["/app/forms.py"]} |
41,948,524 | cszdzr/CITS-5505-Project2 | refs/heads/master | /app/forms.py | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField, \
TextAreaField, RadioField
from wtforms.validators import ValidationError, DataRequired, Email, EqualTo, \
Length
from app.models import User
class LoginForm(FlaskForm):
username = StringField('User... | {"/app/routes.py": ["/app/forms.py"]} |
41,948,525 | cszdzr/CITS-5505-Project2 | refs/heads/master | /migrations/versions/2c8fa162f9f7_courses_table.py | """courses table
Revision ID: 2c8fa162f9f7
Revises: ae346256b650
Create Date: 2021-05-11 13:06:32.935452
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2c8fa162f9f7'
down_revision = 'ae346256b650'
branch_labels = None
depends_on = None
def upgrade():
# ... | {"/app/routes.py": ["/app/forms.py"]} |
41,948,526 | cszdzr/CITS-5505-Project2 | refs/heads/master | /migrations/versions/356d5ec3bf71_change_youtube_id_to_thumbnail_url.py | """change youtube id to thumbnail url
Revision ID: 356d5ec3bf71
Revises: 1358ad741915
Create Date: 2021-05-11 16:11:40.009867
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '356d5ec3bf71'
down_revision = '1358ad741915'
branch_labels = None
depends_on = None
... | {"/app/routes.py": ["/app/forms.py"]} |
42,007,602 | PlugRS/SharkFin | refs/heads/main | /config.py | TWITTER_CONSUMER_KEY = "PDhjzY9bX15cLkN4r6gdKPqdw"
TWITTER_CONSUMER_SECRET = "BtWpjw9JkLsgNW30qXQosZUtG5DwAtJh5nt6O6wDs1CJaRFd6S"
TWITTER_ACCESS_TOKEN = "1303281499714646016-GkZ3D456tvsGy3NbLT8spvJMyuOI3k"
TWITTER_ACCESS_TOKEN_SECRET = "VJ5vuhGLJCGJYoWNG1BnM3HN7XiCZa6qDGJD8FbtkYK74"
TWITTER_USERNAMES = [
"livemint... | {"/dashboard.py": ["/config.py"]} |
42,007,603 | PlugRS/SharkFin | refs/heads/main | /dashboard.py | import streamlit as st
import pandas as pd
import numpy as np
import requests
import config
import tweepy
from datetime import datetime, timedelta
import json
import yfinance as yf
import pandas as pd
auth = tweepy.OAuthHandler(config.TWITTER_CONSUMER_KEY, config.TWITTER_CONSUMER_SECRET)
auth.set_access_token(config.... | {"/dashboard.py": ["/config.py"]} |
42,035,517 | phtvo/yolo | refs/heads/master | /Experiments/voc2012/voc_data.py | # test
from torch.utils.data import DataLoader
#
import sys
import os
sys.path.insert(0, os.getcwd())
PATH = os.path.dirname(__file__)
from Yolov3.Dataset.dataformat import ReadXML_VOC_Format, readTxt
from Yolov3.Dataset.dataset import yoloCoreDataset, cv2, np
class VOC_data(yoloCoreDataset):
def __init__(self,... | {"/Experiments/voc2012/data.py": ["/Yolov3/Dataset/dataformat.py", "/Yolov3/Dataset/dataset.py"], "/Experiments/voc2012/model.py": ["/Yolov3/Model/yolov3.py"], "/Experiments/voc2012/visualize_data.py": ["/Yolov3/Dataset/dataformat.py"], "/Experiments/voc2012/voc_data.py": ["/Yolov3/Dataset/dataformat.py", "/Yolov3/Data... |
42,035,518 | phtvo/yolo | refs/heads/master | /Yolov3/Model/headv3.py | from torchvision import transforms
from torch.autograd import Variable
import torch.nn as nn
import torch
from Yolov3.Utils.utils import build_targets
from Yolov3.Utils.focal_loss import focal_loss
class yoloHeadv3(nn.Module):
def __init__(self, anchor,
num_classes,
img_size,
... | {"/Experiments/voc2012/data.py": ["/Yolov3/Dataset/dataformat.py", "/Yolov3/Dataset/dataset.py"], "/Experiments/voc2012/model.py": ["/Yolov3/Model/yolov3.py"], "/Experiments/voc2012/visualize_data.py": ["/Yolov3/Dataset/dataformat.py"], "/Experiments/voc2012/voc_data.py": ["/Yolov3/Dataset/dataformat.py", "/Yolov3/Data... |
42,035,519 | phtvo/yolo | refs/heads/master | /Yolov3/Dataset/dataset.py | import os
import random
import cv2
import numpy as np
import torch
import torch.nn as nn
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from .data_argument import custom_aug
import matplotlib.pyplot as plt
def random_random(v=0.5):
if random.random() > 0.5:
return Tr... | {"/Experiments/voc2012/data.py": ["/Yolov3/Dataset/dataformat.py", "/Yolov3/Dataset/dataset.py"], "/Experiments/voc2012/model.py": ["/Yolov3/Model/yolov3.py"], "/Experiments/voc2012/visualize_data.py": ["/Yolov3/Dataset/dataformat.py"], "/Experiments/voc2012/voc_data.py": ["/Yolov3/Dataset/dataformat.py", "/Yolov3/Data... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.