index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
93,592 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/sre_compile.py | /Users/varunpatel/anaconda3/lib/python3.6/sre_compile.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,593 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/hmac.py | /Users/varunpatel/anaconda3/lib/python3.6/hmac.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,594 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/rebu/marketplace/test_orders.py | from django.test import TestCase, Client
import urllib.request
import urllib.parse
from django.core.files.uploadedfile import SimpleUploadedFile
import os.path
from marketplace.models import Item, Order, OrderItem, Cart
from accounts.models import Consumer, Producer
class OrderTestHere(TestCase):
def setUp(self):... | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,595 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/_bootlocale.py | /Users/varunpatel/anaconda3/lib/python3.6/_bootlocale.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,596 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/stat.py | /Users/varunpatel/anaconda3/lib/python3.6/stat.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,597 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/_collections_abc.py | /Users/varunpatel/anaconda3/lib/python3.6/_collections_abc.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,598 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/rebu/rebu/admin.py | from django.contrib import admin
from marketplace.models import Cart, Item, Order, OrderItem
from accounts.models import Consumer, Producer, Admin
from reviews.models import Review
admin.site.register(Cart)
admin.site.register(Item)
admin.site.register(Order)
admin.site.register(OrderItem)
admin.site.register(Consume... | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,599 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/posixpath.py | /Users/varunpatel/anaconda3/lib/python3.6/posixpath.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,600 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/linecache.py | /Users/varunpatel/anaconda3/lib/python3.6/linecache.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,601 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/rebu/accounts/forms.py | from django.forms import ModelForm
from .models import Consumer, Producer
from marketplace.models import Item
from django import forms
class ConsumerUserForm(ModelForm):
""" ModelForm to create Consumer Users """
class Meta:
model = Consumer
fields = ['first_name', 'last_name', 'email', 'passwo... | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,602 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/sre_parse.py | /Users/varunpatel/anaconda3/lib/python3.6/sre_parse.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,603 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/token.py | /Users/varunpatel/anaconda3/lib/python3.6/token.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,604 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/lib/python3.6/bisect.py | /Users/varunpatel/anaconda3/lib/python3.6/bisect.py | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,605 | mmw5hy/rebu-ii | refs/heads/master | /src/newenv/rebu/marketplace/test_pages.py | from django.test import TestCase, Client
import urllib.request
import urllib.parse
from django.contrib.auth.models import AnonymousUser, User
from django.contrib import auth
from django_private_chat.models import Dialog, Message
from django.core.files.uploadedfile import SimpleUploadedFile
import os.path
try:
fro... | {"/src/newenv/rebu/accounts/tests.py": ["/src/newenv/rebu/accounts/forms.py", "/src/newenv/rebu/accounts/views.py"], "/src/newenv/rebu/marketplace/viewsItems.py": ["/src/newenv/rebu/marketplace/models.py"], "/src/newenv/rebu/marketplace/viewsOrders.py": ["/src/newenv/rebu/marketplace/models.py", "/src/newenv/rebu/marke... |
93,606 | varsha-venkataramu/csv2bib | refs/heads/master | /csv2bib.py | #!/usr/bin/env python3
import sys, getopt, csv
from collections import namedtuple
SCRIPT_NAME = 'csv2bib'
BIB_ATTRIBUTE_MAP = {
'address': ['address', 'place of publication'],
'author': ['author', 'authors'],
'chapter': ['chapter'],
'edition': ['edition'],
'editor': ['editor', 'e... | {"/csv2bib_test.py": ["/csv2bib.py"]} |
93,607 | varsha-venkataramu/csv2bib | refs/heads/master | /csv2bib_test.py | import csv2bib
import pytest
def test_guess_refs_type_from_headers():
assert csv2bib.guess_refs_type_from_headers({0:' key', 1: 'title', 5: 'year'}) == 'book'
assert csv2bib.guess_refs_type_from_headers({0:' key', 1: 'title', 5: 'year', 6: 'pages'}) == 'incollection'
assert csv2bib.guess_refs_type_from_headers({... | {"/csv2bib_test.py": ["/csv2bib.py"]} |
93,613 | vladim0105/VoiceTest | refs/heads/master | /preprocess.py | from threading import Thread
import socket as skt
import random as rand
import librosa
import io
import numpy as np
import glob
import time
import argparse
import warnings
def process_stft(stft):
"""Converts the complex values in the stft to real numbers in the shape [real, imaginary], makes time the primary axis... | {"/learning.py": ["/preprocess.py"]} |
93,614 | vladim0105/VoiceTest | refs/heads/master | /learning.py |
import warnings
warnings.simplefilter(
action='ignore', category=FutureWarning)
import tensorflow as tf
import tensorflow.python.keras as keras
from tensorflow.python.keras import Model
from tensorflow.python.keras.layers import Input, LSTM, TimeDistributed, Dense
import librosa
import preprocess
import numpy as n... | {"/learning.py": ["/preprocess.py"]} |
93,615 | vladim0105/VoiceTest | refs/heads/master | /model.py | import warnings
warnings.simplefilter(
action='ignore', category=FutureWarning)
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
from tensorflow.keras.layers import Input, LSTM, Dense
from tensorflow.keras import Model
from tensorflow.keras.models import Sequential
import sklearn.preproc... | {"/learning.py": ["/preprocess.py"]} |
93,619 | chansonzhang/intrada | refs/heads/master | /intrada/controllers/api/api.py | # @Time : 2016/12/10 14:44
# @Author : Zhang Chen
# @Email : zhangchen.shaanxi@gmail.com
# @File : api.py
from intrada.controllers.api import order
from intrada.controllers.api import autoconfig
class ApiController(object):
orders = order.OrdersController()
autoconfig = autoconfig.AutoConfigControl... | {"/intrada/controllers/api/api.py": ["/intrada/controllers/api/__init__.py"], "/intrada/controllers/root.py": ["/intrada/controllers/api/__init__.py"]} |
93,620 | chansonzhang/intrada | refs/heads/master | /intrada/controllers/v1.py | # @Time : 2016/12/9 17:52
# @Author : Zhang Chen
# @Email : zhangchen.shaanxi@gmail.com
# @File : v1.py
import pecan
from pecan import rest
class VersionController(rest.RestController):
@pecan.expose('json')
def get(self):
return {"version": "1.0.0"} | {"/intrada/controllers/api/api.py": ["/intrada/controllers/api/__init__.py"], "/intrada/controllers/root.py": ["/intrada/controllers/api/__init__.py"]} |
93,621 | chansonzhang/intrada | refs/heads/master | /intrada/controllers/api/__init__.py | # @Time : 2016/12/10 14:46
# @Author : Zhang Chen
# @Email : zhangchen.shaanxi@gmail.com
# @File : __init__.py | {"/intrada/controllers/api/api.py": ["/intrada/controllers/api/__init__.py"], "/intrada/controllers/root.py": ["/intrada/controllers/api/__init__.py"]} |
93,622 | chansonzhang/intrada | refs/heads/master | /intrada/controllers/root.py | from pecan import expose, redirect
from webob.exc import status_map
from intrada.controllers import v1
from intrada.controllers.api import api
class RootController(object):
api = api.ApiController() | {"/intrada/controllers/api/api.py": ["/intrada/controllers/api/__init__.py"], "/intrada/controllers/root.py": ["/intrada/controllers/api/__init__.py"]} |
93,650 | mahdids/tweet | refs/heads/master | /hello/views.py | from django.shortcuts import render
from django.http import HttpResponse
from rest_framework import viewsets, permissions
import json
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework import views
from rest_framework.response import Response
from .models import Greetin... | {"/gettingstarted/urls.py": ["/hello/views.py"]} |
93,651 | mahdids/tweet | refs/heads/master | /gettingstarted/urls.py | from django.urls import path, include
from django.urls import path
from django.contrib import admin
from django.conf.urls import include, url
admin.autodiscover()
import hello.views
# To add a new path, first import the app:
# import blog
#
# Then add the new path:
# path('blog/', blog.urls, name="blog")
#
# Learn mo... | {"/gettingstarted/urls.py": ["/hello/views.py"]} |
93,654 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/workflows/dftutilities.py | from .atomic_convention1 import spin, basis_set, pseudo
from aiida.orm.data.parameter import ParameterData
from aiida.work import workfunction as wf
def dict_merge(dct, merge_dct):
""" Taken from https://gist.github.com/angstwad/bf22d1822c38a92ec0a9
Recursive dict merge. Inspired by :meth:``dict.update()``, in... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,655 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/workflows/dftmd.py | from aiida.orm.code import Code
from aiida.orm.utils import CalculationFactory, DataFactory
from aiida.work.workchain import WorkChain, ToContext, Outputs, while_
from aiida.work.run import submit
from .dftutilities import dict_merge, default_options, disable_printing_charges_dict, empty_pd
from copy import deepcopy
#... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,656 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/workflows/dftbase.py | from aiida.orm import Code
from aiida.orm.data.base import Str
from aiida.orm.data.parameter import ParameterData
from aiida.orm.data.remote import RemoteData
from aiida.orm.data.structure import StructureData
from aiida.orm.utils import CalculationFactory, DataFactory
from aiida.work.run import submit
from aiida.work.... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,657 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/workflows/dftcellopt.py | from aiida.orm.code import Code
from aiida.orm.utils import CalculationFactory, DataFactory
from aiida.work.workchain import WorkChain, ToContext, Outputs, while_
from aiida.work.run import submit
from .dftutilities import dict_merge, default_options, disable_printing_charges_dict, empty_pd
from copy import deepcopy
#... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,658 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/workflows/dftbandstructure.py | from aiida.common.extendeddicts import AttributeDict
from aiida.work.run import submit
from aiida.work.workchain import WorkChain, Outputs
from aiida.work.workfunction import workfunction
from aiida.orm import Code
from aiida.orm.data.base import Str
from aiida.orm.data.parameter import ParameterData
from aiida.orm.dat... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,659 | kjappelbaum/aiida-cp2k | refs/heads/master | /test/workflows/run_mdnvt_water.py | from aiida.common.example_helpers import test_and_get_code # noqa
from aiida.orm.data.structure import StructureData # noqa
from aiida.orm.data.parameter import ParameterData # noqa
from aiida.orm.data.base import Str
from aiida.work.run import submit
import ase.build
from aiida_cp2k.workflows import Cp2kMdWorkChai... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,660 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/workflows/__init__.py | from .dftbase import Cp2kDftBaseWorkChain
from .dftgeoopt import Cp2kGeoOptWorkChain
from .dftcellopt import Cp2kCellOptWorkChain
from .dftmd import Cp2kMdWorkChain
from .dftrobustgeoopt import Cp2kRobustGeoOptWorkChain
from .dftrobustcellopt import Cp2kRobustCellOptWorkChain
from .dftbandstructure import Cp2kBandStruc... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,661 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/workflows/atomic_convention1.py | basis_set = {
"H": "DZVP-MOLOPT-SR-GTH-q1",
"He": "DZVP-MOLOPT-SR-GTH-q2",
"Li": "DZVP-MOLOPT-SR-GTH-q3",
"Be": "DZVP-MOLOPT-SR-GTH-q4",
"B": "DZVP-MOLOPT-SR-GTH-q3",
"C": "DZVP-MOLOPT-SR-GTH-q4",
"N": "DZVP-MOLOPT-SR-GTH-q5",
"O": "DZVP-MOLOPT-SR-GTH-q6",
"F": "DZVP-MOLOPT-SR-GTH-q7... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,662 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/calculations/__init__.py | # -*- coding: utf-8 -*-
###############################################################################
# Copyright (c), The AiiDA-CP2K authors. #
# SPDX-License-Identifier: MIT #
# AiiDA-CP2K is hosted on GitHub at https://github.com/c... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,663 | kjappelbaum/aiida-cp2k | refs/heads/master | /test/workflows/run_robust_CuMOF74.py | from aiida.common.example_helpers import test_and_get_code # noqa
from aiida.orm.data.structure import StructureData # noqa
from aiida.orm.data.parameter import ParameterData # noqa
from aiida.orm.data.base import Str
from aiida.work.run import submit
from ase.io import read
from aiida_cp2k.workflows import Cp2kRob... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,664 | kjappelbaum/aiida-cp2k | refs/heads/master | /aiida_cp2k/workflows/dftrobustgeoopt.py | from aiida.orm.code import Code
from aiida.orm.data.base import Float
from aiida.orm.utils import CalculationFactory, DataFactory
from aiida.work import workfunction as wf
from aiida.work.workchain import WorkChain, ToContext, Outputs, while_
from aiida.work.run import submit
from .dftutilities import default_options, ... | {"/aiida_cp2k/workflows/dftutilities.py": ["/aiida_cp2k/workflows/atomic_convention1.py"], "/aiida_cp2k/workflows/dftmd.py": ["/aiida_cp2k/workflows/dftutilities.py", "/aiida_cp2k/workflows/__init__.py"], "/aiida_cp2k/workflows/dftbase.py": ["/aiida_cp2k/workflows/dftutilities.py"], "/aiida_cp2k/workflows/dftcellopt.py... |
93,687 | Tamjiat/AI_Analyzer | refs/heads/main | /json_parse.py | from config import config as cfg
import os
import json
import pandas as pd
import cv2
def json_parse():
jsonnames = os.listdir(cfg.json_path)
fruit_0 = []
fruit_0_p = []
fruit_1 = []
fruit_1_p = []
leaf_0 =[]
leaf_0_p =[]
leaf_1 =[]
leaf_1_p =[]
for jsonname in jsonnames:
... | {"/json_parse.py": ["/config.py"], "/test.py": ["/config.py"], "/file_division.py": ["/config.py", "/json_parse.py"], "/AI_Test.py": ["/config.py"], "/training.py": ["/json_parse.py", "/models.py", "/config.py"], "/app.py": ["/AI_Test.py"], "/models.py": ["/config.py"]} |
93,688 | Tamjiat/AI_Analyzer | refs/heads/main | /test.py | import numpy as np
import cv2
from keras.models import load_model
from config import config as cfg
model = load_model('backup/pepper.h5')
# 적용해볼 이미지
test_image = '/media/user/My Passport/AI HUB2/노지 작물 질병 진단 이미지/Validation/고추이미지/V006_79_1_01_01_01_13_2_9315z_20200922_28_a0009.JPG'
path_dir = "../myapp/public/images"
i... | {"/json_parse.py": ["/config.py"], "/test.py": ["/config.py"], "/file_division.py": ["/config.py", "/json_parse.py"], "/AI_Test.py": ["/config.py"], "/training.py": ["/json_parse.py", "/models.py", "/config.py"], "/app.py": ["/AI_Test.py"], "/models.py": ["/config.py"]} |
93,689 | Tamjiat/AI_Analyzer | refs/heads/main | /file_division.py | import os
import shutil
import json
import cv2
from config import config as cfg
from json_parse import json_parse
from tensorflow.keras.preprocessing.image import ImageDataGenerator
fruit_0,fruit_0_p,fruit_1,fruit_1_p,leaf_0,leaf_0_p,leaf_1,leaf_1_p = json_parse()
class_name = [fruit_0,fruit_1,leaf_0,leaf_1]
class_po... | {"/json_parse.py": ["/config.py"], "/test.py": ["/config.py"], "/file_division.py": ["/config.py", "/json_parse.py"], "/AI_Test.py": ["/config.py"], "/training.py": ["/json_parse.py", "/models.py", "/config.py"], "/app.py": ["/AI_Test.py"], "/models.py": ["/config.py"]} |
93,690 | Tamjiat/AI_Analyzer | refs/heads/main | /config.py |
class config():
FAST_RUN = False
IMAGE_WIDTH = 160
IMAGE_HEIGHT = 160
IMAGE_SIZE=(IMAGE_WIDTH, IMAGE_HEIGHT)
IMAGE_CHANNELS = 3
image_path = "/media/user/My Passport/AI HUB2/노지 작물 질병 진단 이미지/Training/고추/image/"
json_path = "/media/user/My Passport/AI HUB2/노지 작물 질병 진단 이미지/Training/고추/json/" | {"/json_parse.py": ["/config.py"], "/test.py": ["/config.py"], "/file_division.py": ["/config.py", "/json_parse.py"], "/AI_Test.py": ["/config.py"], "/training.py": ["/json_parse.py", "/models.py", "/config.py"], "/app.py": ["/AI_Test.py"], "/models.py": ["/config.py"]} |
93,691 | Tamjiat/AI_Analyzer | refs/heads/main | /AI_Test.py | import numpy as np
import cv2
from keras.models import load_model
from config import config as cfg
def AI_Test(file):
model = load_model('backup/pepper.h5')
# 이미지 resize
img = cv2.imread(file)
img = cv2.resize(img,dsize=(cfg.IMAGE_WIDTH,cfg.IMAGE_HEIGHT),interpolation=cv2.INTER_AREA)
X =[]
X.ap... | {"/json_parse.py": ["/config.py"], "/test.py": ["/config.py"], "/file_division.py": ["/config.py", "/json_parse.py"], "/AI_Test.py": ["/config.py"], "/training.py": ["/json_parse.py", "/models.py", "/config.py"], "/app.py": ["/AI_Test.py"], "/models.py": ["/config.py"]} |
93,692 | Tamjiat/AI_Analyzer | refs/heads/main | /training.py |
from json_parse import json_parse
from models import get_model
from keras.models import load_model
from sklearn.model_selection import train_test_split
from keras.callbacks import EarlyStopping, ReduceLROnPlateau #콜백 클래스 import
from config import config as cfg
import numpy as np
import cv2
import os
fruit_0,fruit_0_p... | {"/json_parse.py": ["/config.py"], "/test.py": ["/config.py"], "/file_division.py": ["/config.py", "/json_parse.py"], "/AI_Test.py": ["/config.py"], "/training.py": ["/json_parse.py", "/models.py", "/config.py"], "/app.py": ["/AI_Test.py"], "/models.py": ["/config.py"]} |
93,693 | Tamjiat/AI_Analyzer | refs/heads/main | /app.py | from flask import Flask ,render_template, request
import ssl
from werkzeug.utils import secure_filename
from AI_Test import AI_Test
import pymysql
import os
from dotenv import load_dotenv
load_dotenv()
app = Flask(__name__)
@app.route("/",methods=['GET','POST'])
def hello():
return "HELLO"
@app.route("/test",met... | {"/json_parse.py": ["/config.py"], "/test.py": ["/config.py"], "/file_division.py": ["/config.py", "/json_parse.py"], "/AI_Test.py": ["/config.py"], "/training.py": ["/json_parse.py", "/models.py", "/config.py"], "/app.py": ["/AI_Test.py"], "/models.py": ["/config.py"]} |
93,694 | Tamjiat/AI_Analyzer | refs/heads/main | /models.py | from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, Dropout, Flatten, Dense, Activation, BatchNormalization
from config import config as cfg
import keras
def get_model(X_train, nb_classes):
model = Sequential()
model.add(Conv2D(32, (3, 3), input_shape=X_train.shape[1:], padding='... | {"/json_parse.py": ["/config.py"], "/test.py": ["/config.py"], "/file_division.py": ["/config.py", "/json_parse.py"], "/AI_Test.py": ["/config.py"], "/training.py": ["/json_parse.py", "/models.py", "/config.py"], "/app.py": ["/AI_Test.py"], "/models.py": ["/config.py"]} |
93,722 | chuajiesheng/tic-tac-toe | refs/heads/master | /game/state.py | class State:
NEW = 'NEW'
PLAY = 'PLAY'
WON = 'WON'
def __init__(self):
self.val = self.NEW
def move(self):
if self.val is self.NEW:
self.val = self.PLAY
else:
self.val = self.WON
def is_new(self):
return self.val == self.NEW
def is_... | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,723 | chuajiesheng/tic-tac-toe | refs/heads/master | /game/board.py | class Board(object):
DEFAULT_GRID = 3
PLAYER_SHAPE = {
0: 'x',
1: 'o'
}
def __init__(self, size):
self.grid = size
self.options = [None] * (self.grid * self.grid)
def get_grid(self):
def x_or_o(xy, state):
return str(xy) if state is None else sel... | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,724 | chuajiesheng/tic-tac-toe | refs/heads/master | /tests/test_game_play.py | from .context import GamePlay
import pytest
def test_prompt():
g = GamePlay(3)
first_prompt = g.prompt()
assert first_prompt == 'Enter name for Player 1:\n>> '
def test_save_player():
g = GamePlay(3)
new_player = 'Player X'
g.next_step(new_player)
assert len(g.players) == 1
assert g.... | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,725 | chuajiesheng/tic-tac-toe | refs/heads/master | /game/main.py | from game import GamePlay
from game import Board
import sys
class Main:
def __init__(self, size):
self.game_play = GamePlay(size)
def start(self):
while True:
resp = input(self.game_play.prompt())
has_next = self.game_play.next_step(resp)
if not has_next:
... | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,726 | chuajiesheng/tic-tac-toe | refs/heads/master | /game/__init__.py | from .state import State
from .board import Board
from .game_play import GamePlay
from .main import Main | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,727 | chuajiesheng/tic-tac-toe | refs/heads/master | /tests/test_main.py | from .context import Main
class NewGamePlay:
def __init__(self):
pass
def next_step(self, resp):
pass
def test_gameplay_prompt(monkeypatch):
monkeypatch.setitem(__builtins__, 'input', lambda x: 'user input')
def prompt(self):
self.prompt_called = True
return 'someth... | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,728 | chuajiesheng/tic-tac-toe | refs/heads/master | /game/game_play.py | from game import Board, State
class GamePlay(object):
CHOICE_PROMPT = "{}\n{}, choose a box to place an '{}' into\n>> "
INVALID_OPTION = 'Please input a option from 1-{}.\n\n'
OPTION_TAKEN = 'Option taken. Please choose another option.\n\n'
WIN_BANNER = 'Congratulations {}! You have won.'
DRAW_BA... | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,729 | chuajiesheng/tic-tac-toe | refs/heads/master | /tests/test_board.py | from .context import Board
import pytest
def test_grid():
b = Board(3)
assert b.get_grid() == '1 | 2 | 3\n' \
'-----------\n' \
'4 | 5 | 6\n' \
'-----------\n' \
"7 | 8 | 9\n"
def test_grid_with_one_a... | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,730 | chuajiesheng/tic-tac-toe | refs/heads/master | /tests/test_state.py | from .context import State
def test_new():
s = State()
assert s.is_new()
def test_move():
s = State()
s.move()
assert s.is_play()
def test_move_2():
s = State()
s.move()
s.move()
assert s.is_won()
| {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,731 | chuajiesheng/tic-tac-toe | refs/heads/master | /tests/context.py | import os
import sys
sys.path.insert(0, os.path.abspath('..'))
from game import GamePlay
from game import Main
from game import State
from game import Board | {"/tests/test_game_play.py": ["/tests/context.py"], "/game/main.py": ["/game/__init__.py"], "/game/__init__.py": ["/game/state.py", "/game/board.py", "/game/game_play.py", "/game/main.py"], "/tests/test_main.py": ["/tests/context.py"], "/game/game_play.py": ["/game/__init__.py"], "/tests/test_board.py": ["/tests/contex... |
93,732 | silvareal/GGS-portal | refs/heads/master | /portal/api/views.py | from django.shortcuts import render
from rest_framework import viewsets
from portal.models import Student, StudentTutionPayment
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from portal.api.serializers import StudentSerializer, StudentTutionPaymentSerializer
class StudentViewSet(viewsets.ModelViewS... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,733 | silvareal/GGS-portal | refs/heads/master | /portal/models.py | from django.contrib.auth.models import AbstractUser
from django.db.models.signals import post_save
from django.dispatch import receiver
from school import settings
from django.db import models
from .utils import (upload_location,
phone_regex,
school_session_regex,
intcomma
... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,734 | silvareal/GGS-portal | refs/heads/master | /portal/urls.py | from django.urls import path, include
from .views import index
app_name = 'portal'
urlpatterns = [
path('signup/', index.PortalIndex.as_view(), name='portal-index'),
#portal urls
path('dashboard/', index.dashboard, name='portal-dashboard'),
path('dashboard/add_update_student/', index.add_update, nam... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,735 | silvareal/GGS-portal | refs/heads/master | /portal/migrations/0001_initial.py | # Generated by Django 2.1.2 on 2007-05-20 23:55
from django.conf import settings
import django.contrib.auth.models
import django.contrib.auth.validators
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import portal.utils
class Migra... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,736 | silvareal/GGS-portal | refs/heads/master | /portal/resources.py | from import_export import resources
from import_export.widgets import (ForeignKeyWidget,
BooleanWidget,
IntegerWidget)
from import_export import fields
from .models import (User,
Student,
Class,
... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,737 | silvareal/GGS-portal | refs/heads/master | /school/urls.py | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include, re_path
from portal.views import index, student, teacher
from django.contrib.auth import views
from rest_framework import routers
from portal.api.views import StudentViewS... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,738 | silvareal/GGS-portal | refs/heads/master | /portal/forms.py | from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.db import transaction
from django.forms.utils import ValidationError
from django.contrib.auth.forms import PasswordResetForm
from .models import Teacher, Student, User
class EmailValidationOnForgotPassword(PasswordResetForm):
... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,739 | silvareal/GGS-portal | refs/heads/master | /portal/api/serializers.py | from rest_framework import serializers
from portal.models import Student, User, Class, Teacher, Session, StudentTutionPayment
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('profile_image', 'username', 'first_name', 'last_name', 'phone_number',)
c... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,740 | silvareal/GGS-portal | refs/heads/master | /portal/views/index.py | from django.shortcuts import render
from django.views.generic.base import TemplateView
from django.shortcuts import render
from django.contrib.auth.views import PasswordResetView
from portal.models import Student, Teacher, User
from django.contrib.auth.decorators import login_required
from django.core.mail import BadHe... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,741 | silvareal/GGS-portal | refs/heads/master | /portal/utils.py | from django.core.validators import RegexValidator
# upload to the media_cdn
def upload_location(instance, filename):
return f'{instance.id}{filename}'
# phone number regex
phone_regex = RegexValidator(
r'^\d{11}$',
message="Input a valid phone number (must be 11 digits)."
)
# school session regex
sc... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,742 | silvareal/GGS-portal | refs/heads/master | /portal/admin.py | from django.contrib import admin
from django.shortcuts import render
from django.contrib.admin import AdminSite
from django.template.response import TemplateResponse
from django.utils.translation import gettext as _, gettext_lazy
from django.contrib.auth.models import Group
from django.utils.html import format_html
fro... | {"/portal/api/views.py": ["/portal/models.py", "/portal/api/serializers.py"], "/portal/models.py": ["/portal/utils.py"], "/portal/migrations/0001_initial.py": ["/portal/utils.py"], "/portal/resources.py": ["/portal/models.py"], "/school/urls.py": ["/portal/api/views.py"], "/portal/forms.py": ["/portal/models.py"], "/po... |
93,791 | den250400/FaceRecognizer | refs/heads/master | /recognition.py | from tensorflow.keras.models import load_model
from mtcnn.mtcnn import MTCNN
from os import listdir, makedirs
from os.path import join
from PIL import Image
from pyautogui import prompt
import cv2
import numpy as np
from pathlib import PurePath
from sklearn.svm import SVC
import pickle
from IPython.display import clear... | {"/main.py": ["/recognition.py"]} |
93,792 | den250400/FaceRecognizer | refs/heads/master | /main.py | from IPython.display import clear_output
from recognition import Predictor
import cv2
import time
import argparse
model_path = 'models/facenet_keras.h5'
train_path = 'data/train'
clf_path = "classifier.pickle"
id_path = "identities_dict.pickle"
system = Predictor(model_path, train_path, continuous_train=False)
parse... | {"/main.py": ["/recognition.py"]} |
93,793 | iCodeIN/diff-imitation | refs/heads/master | /tests/test_basic.py | import unittest
from diff import diff, DiffResult
class BasicTest(unittest.TestCase):
def test_same_text(self):
original_list = ["aaaaa"]
modified_list = ["aaaaa"]
expected_result = []
actual_result = diff(original_list, modified_list)
assert expected_result =... | {"/tests/test_basic.py": ["/diff/__init__.py"], "/example/app.py": ["/diff/__init__.py"], "/diff/__init__.py": ["/diff/main.py"], "/diff/main.py": ["/diff/diff_result.py"]} |
93,794 | iCodeIN/diff-imitation | refs/heads/master | /example/formatter.py | import colored
from base_formatter import BaseFormatter
class Added(BaseFormatter):
def __init__(self, items):
self._items = items
def get_range(self):
diff_range = f'{colored.fg("cyan")}{self._items[0][1]}a{self._items[0][2]}'
if len(self._items) > 1:
diff_range += f",{s... | {"/tests/test_basic.py": ["/diff/__init__.py"], "/example/app.py": ["/diff/__init__.py"], "/diff/__init__.py": ["/diff/main.py"], "/diff/main.py": ["/diff/diff_result.py"]} |
93,795 | iCodeIN/diff-imitation | refs/heads/master | /example/app.py | import sys
from typing import List
from diff import diff, DiffResult
from formatter import Added, Deleted, Updated
def print_diff(diff_result_list: List[DiffResult]):
added_items = [item for item in diff_result_list if item[0] == 1]
deleted_items = [item for item in diff_result_list if item[0] == 0]
if ... | {"/tests/test_basic.py": ["/diff/__init__.py"], "/example/app.py": ["/diff/__init__.py"], "/diff/__init__.py": ["/diff/main.py"], "/diff/main.py": ["/diff/diff_result.py"]} |
93,796 | iCodeIN/diff-imitation | refs/heads/master | /example/base_formatter.py | from abc import ABC, abstractmethod
class BaseFormatter(ABC):
@abstractmethod
def get_range(self) -> str:
"""
get changed range of document as ed style format (e.g. "11,15d16", "0a1,6")
:return: colored changed range of document
"""
pass
@abstractmethod
def fo... | {"/tests/test_basic.py": ["/diff/__init__.py"], "/example/app.py": ["/diff/__init__.py"], "/diff/__init__.py": ["/diff/main.py"], "/diff/main.py": ["/diff/diff_result.py"]} |
93,797 | iCodeIN/diff-imitation | refs/heads/master | /diff/diff_result.py | from typing import NamedTuple
class DiffResult(NamedTuple):
flag: int
old_line_number: int
new_line_number: int
text: str
| {"/tests/test_basic.py": ["/diff/__init__.py"], "/example/app.py": ["/diff/__init__.py"], "/diff/__init__.py": ["/diff/main.py"], "/diff/main.py": ["/diff/diff_result.py"]} |
93,798 | iCodeIN/diff-imitation | refs/heads/master | /diff/__init__.py | from .main import diff, DiffResult # noqa: F401
all = ["diff", "DiffResult"]
| {"/tests/test_basic.py": ["/diff/__init__.py"], "/example/app.py": ["/diff/__init__.py"], "/diff/__init__.py": ["/diff/main.py"], "/diff/main.py": ["/diff/diff_result.py"]} |
93,799 | iCodeIN/diff-imitation | refs/heads/master | /diff/main.py | from typing import List
from .diff_result import DiffResult
def _lcs(old_list: List[str], new_list: List[str]) -> List[List[int]]:
"""
Find longest common subsequence of given two list of string
:param old_list: List of original strings to be compared
:param new_list: List of modified stri... | {"/tests/test_basic.py": ["/diff/__init__.py"], "/example/app.py": ["/diff/__init__.py"], "/diff/__init__.py": ["/diff/main.py"], "/diff/main.py": ["/diff/diff_result.py"]} |
93,800 | iCodeIN/diff-imitation | refs/heads/master | /setup.py | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="diff-imitation",
version="0.0.1",
author="blurfx",
author_email="iam@xo.dev",
description="A tiny imitation thing of unix diff",
long_description=long_description,
long... | {"/tests/test_basic.py": ["/diff/__init__.py"], "/example/app.py": ["/diff/__init__.py"], "/diff/__init__.py": ["/diff/main.py"], "/diff/main.py": ["/diff/diff_result.py"]} |
93,801 | liangliangtian/liangliang.github.com | refs/heads/master | /liangPro/index/views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from django.shortcuts import render,redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, logout,login
from django.http import HttpResponse
from django.http import HttpResponseRedirect
fr... | {"/liangPro/index/views.py": ["/liangPro/index/models.py"], "/liangPro/index/admin.py": ["/liangPro/index/models.py"], "/liangPro/index/urls.py": ["/liangPro/index/views.py"]} |
93,802 | liangliangtian/liangliang.github.com | refs/heads/master | /liangPro/index/admin.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from .models import *
class UserAdmin(admin.ModelAdmin):
list_display = ['username', 'password','email','create_time']
list_display_links = ['username']
search_fields = ['username']
list_filter = ['username'... | {"/liangPro/index/views.py": ["/liangPro/index/models.py"], "/liangPro/index/admin.py": ["/liangPro/index/models.py"], "/liangPro/index/urls.py": ["/liangPro/index/views.py"]} |
93,803 | liangliangtian/liangliang.github.com | refs/heads/master | /liangPro/index/models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from datetime import datetime
# Create your models here.
class User(models.Model):
username = models.CharField(max_length = 100)
password = models.CharField(max_length = 100)
email = models.EmailField(blank=True)
create_ti... | {"/liangPro/index/views.py": ["/liangPro/index/models.py"], "/liangPro/index/admin.py": ["/liangPro/index/models.py"], "/liangPro/index/urls.py": ["/liangPro/index/views.py"]} |
93,804 | liangliangtian/liangliang.github.com | refs/heads/master | /liangPro/index/migrations/0003_auto_20190514_0038.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2019-05-14 00:38
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('index', '0002_auto_20190513_0227'),
]
operations = [
migrations.AlterField(... | {"/liangPro/index/views.py": ["/liangPro/index/models.py"], "/liangPro/index/admin.py": ["/liangPro/index/models.py"], "/liangPro/index/urls.py": ["/liangPro/index/views.py"]} |
93,805 | liangliangtian/liangliang.github.com | refs/heads/master | /liangPro/index/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2019-05-13 02:25
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
... | {"/liangPro/index/views.py": ["/liangPro/index/models.py"], "/liangPro/index/admin.py": ["/liangPro/index/models.py"], "/liangPro/index/urls.py": ["/liangPro/index/views.py"]} |
93,806 | liangliangtian/liangliang.github.com | refs/heads/master | /liangPro/index/urls.py | from django.conf.urls import url
from .views import *
urlpatterns = [
url(r'^upload/',upload_video,name='upload'),
url(r'^show', show_image,name='sh'),
url(r'^dete1/',dete1,name='det'),
url(r'^result',result,name='res'),
url(r'^login/', index_login,name='login'),
url(r'^register/', index_registe... | {"/liangPro/index/views.py": ["/liangPro/index/models.py"], "/liangPro/index/admin.py": ["/liangPro/index/models.py"], "/liangPro/index/urls.py": ["/liangPro/index/views.py"]} |
93,823 | briansrls/Robinhood-for-Google-Finance | refs/heads/master | /Robinhood/__init__.py | import six
if six.PY3:
from Robinhood.Robinhood import Robinhood
else:
from Robinhood import Robinhood
import exceptions as RH_exception
| {"/Robinhood/__init__.py": ["/Robinhood/Robinhood.py"], "/gf-export.py": ["/Robinhood/__init__.py"], "/Robinhood/Robinhood.py": ["/Robinhood/__init__.py"]} |
93,824 | briansrls/Robinhood-for-Google-Finance | refs/heads/master | /Robinhood/endpoints.py | def login():
return "https://api.robinhood.com/oauth2/token/"
def logout():
return "https://api.robinhood.com/api-token-logout/"
def investment_profile():
return "https://api.robinhood.com/user/investment_profile/"
def accounts():
return "https://api.robinhood.com/accounts/"
def ach(option):
'''... | {"/Robinhood/__init__.py": ["/Robinhood/Robinhood.py"], "/gf-export.py": ["/Robinhood/__init__.py"], "/Robinhood/Robinhood.py": ["/Robinhood/__init__.py"]} |
93,825 | briansrls/Robinhood-for-Google-Finance | refs/heads/master | /gf-export.py | from Robinhood import Robinhood
import shelve
import json
import csv
logged_in = False
def get_symbol_from_instrument_url(rb_client, url, db):
instrument = {}
if type(url) != str:
url = url.encode('utf8')
if url in db:
instrument = db[url]
else:
db[url] = fetch_json_by_url(rb_c... | {"/Robinhood/__init__.py": ["/Robinhood/Robinhood.py"], "/gf-export.py": ["/Robinhood/__init__.py"], "/Robinhood/Robinhood.py": ["/Robinhood/__init__.py"]} |
93,826 | briansrls/Robinhood-for-Google-Finance | refs/heads/master | /Robinhood/Robinhood.py | """Robinhood.py: a collection of utilities for working with Robinhood's Private API """
#Standard libraries
import logging
import warnings
from enum import Enum
#External dependencies
from six.moves.urllib.parse import unquote # pylint: disable=E0401
from six.moves.urllib.request import getproxies # pylint: disabl... | {"/Robinhood/__init__.py": ["/Robinhood/Robinhood.py"], "/gf-export.py": ["/Robinhood/__init__.py"], "/Robinhood/Robinhood.py": ["/Robinhood/__init__.py"]} |
93,827 | briansrls/Robinhood-for-Google-Finance | refs/heads/master | /Robinhood/exceptions.py | """
Exceptions: custom exceptions for library
"""
class RobinhoodException(Exception):
"""
Wrapper for custom Robinhood library exceptions
"""
pass
class LoginFailed(RobinhoodException):
"""
Unable to login to Robinhood
"""
pass
class TwoFactorRequired(LoginFailed):
... | {"/Robinhood/__init__.py": ["/Robinhood/Robinhood.py"], "/gf-export.py": ["/Robinhood/__init__.py"], "/Robinhood/Robinhood.py": ["/Robinhood/__init__.py"]} |
93,840 | aagong/WebScraper | refs/heads/master | /crawler_base.py | from Resource import Resource
import csv
# <editor-fold desc="Protocol constants">
HTTP = 'http://'
preFTP = 'ftp://'
# </editor-fold>
"""
Program begins.
"""
# Total visited links
visited = []
# Total working links found
urls = []
resources = []
# Create excel file
# wb = Workbook()
# filename = input("Enter a t... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,841 | aagong/WebScraper | refs/heads/master | /disciplines_known.py | # Domains
disciplinesKnown = {'Agriculture': ["agriculture", "farming", 'Agronomics', 'Agroforestry', 'Agrophysics',
'Aquaculture', 'Horticulture'],
'Atmosphere': ["atmosphere", 'Air', 'Pressure', 'Hydrometeorology', 'Climatology', 'Meteorology',
... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,842 | aagong/WebScraper | refs/heads/master | /Resource.py |
__author__ = 'Anoushka'
from check_link import check_link
from check_type import check_type
from disciplines_known import disciplinesKnown
from resourceTypes import resourceTypesKnown
from visible import visible
import tldextract
from bs4 import BeautifulSoup
from urllib.request import urlopen
from urllib.error impor... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,843 | aagong/WebScraper | refs/heads/master | /check_link.py |
__author__ = 'Raquel'
from urllib.request import urlopen
from urllib.error import URLError, HTTPError
from socket import error as SocketError
# <editor-fold desc="Protocol constants">
HTTP = 'http://'
preFTP = 'ftp://'
# </editor-fold>
def check_link(url):
if url:
try:
urlopen(url, timeout=... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,844 | aagong/WebScraper | refs/heads/master | /Organization.py | __author__ = 'Raquel'
import xml.etree.ElementTree as ET
from urllib.request import urlopen
import urllib.parse
import re
# VIAF base url
viaf_base_search = 'http://viaf.org/viaf/search'
viaf_base = 'http://viaf.org/viaf/'
# string for searching corporate names
corporate_names = 'local.corporateNames'
# String for ... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,845 | aagong/WebScraper | refs/heads/master | /write.py | __author__ = 'Raquel'
from term_links import find_term_links
def write_resource(ws, row_num, resource):
term_links = []
ws['A%s' % row_num].value = resource.title
ws['B%s' % row_num].value = resource.link
term_links.append('URL Type: http://cinergiterms.weebly.com/url-type.html')
ws['C%s' % row_nu... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,846 | aagong/WebScraper | refs/heads/master | /check_type.py | __author__ = 'Anoushka'
def check_type(url):
url_front = url[:url.index(':')]
if url_front == "http" or url_front == "https":
return "HTTP"
elif url_front == "ftp":
return "FTP"
else:
return "None"
| {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,847 | aagong/WebScraper | refs/heads/master | /harvestGCMD.py | __author__ = 'Raquel'
import xml.etree.ElementTree as eTree
from urllib.request import urlopen
# Concept schemes to ignore due to mostly internal usage by NASA or too broad to be helpful
toIgnore = ['horizontalresolutionrange', 'locations', 'temporalresolutionrange' 'verticalresolutionrange']
tree = eTree.parse(urlop... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,848 | aagong/WebScraper | refs/heads/master | /resourceTypes.py | __author__ = 'Raquel'
resourceTypesKnown = {'Activity': ['conference', 'meeting', 'project'],
'Catalog': ['database', 'catalog'],
'Collection': ['data portal', 'portal'],
'Community': ["community"],
'Data or Information Resource': ... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,849 | aagong/WebScraper | refs/heads/master | /visible.py | __author__ = 'Anoushka'
import re
def visible(element):
if element.parent.name in ['style', 'script', '[document]', 'head', 'title', 'a']:
return False
elif re.match('<!--.*-->', str(element)):
return False
return True | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,850 | aagong/WebScraper | refs/heads/master | /term_links.py | __author__ = 'Raquel'
def find_term_links(string):
ret_url = []
# Domains
for each in string:
if "Agriculture" in string:
ret_url.append("http://cinergiterms.weebly.com/uploads/7/5/1/1/7511984/agr2.jpg, ")
if "Atmosphere" in string:
ret_url.append("http://cinergite... | {"/crawler_base.py": ["/Resource.py"], "/Resource.py": ["/check_link.py", "/check_type.py", "/disciplines_known.py", "/resourceTypes.py", "/visible.py", "/Organization.py"], "/write.py": ["/term_links.py"]} |
93,875 | 3-Rider/Investment-Pandas- | refs/heads/master | /returnClasses.py | import numpy as np
import pandas as pd
import statsmodels.api as sm
import date_functions as dtf
# helper functions, the following functions are used in the ReturnSeries and ReturnFrame classes
# ===========================================================================
def _duplicates(collection):
# ... | {"/returnClasses.py": ["/date_functions.py"], "/dataModule.py": ["/returnClasses.py", "/date_functions.py"], "/examples.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"], "/main.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"]} |
93,876 | 3-Rider/Investment-Pandas- | refs/heads/master | /dataModule.py | import pandas as pd
import returnClasses as rc
import date_functions as dtf
""""module to convert prices into returns and load the data in an DataFrame, index is set to a DateTimeIndex.
The columns contain fund/index returns"""
def csv_to_df(file, dateformat='%d/%m/%Y'):
# Converts csv to DataFrame, se... | {"/returnClasses.py": ["/date_functions.py"], "/dataModule.py": ["/returnClasses.py", "/date_functions.py"], "/examples.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"], "/main.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"]} |
93,877 | 3-Rider/Investment-Pandas- | refs/heads/master | /date_functions.py | import numpy as np
import pandas as pd
# set end date
def ts_date(date):
# converts date (in format yyyy-m-dd) to normalized pd.TimeStamp date (normalized)
if isinstance(date, pd.Timestamp):
date = date.normalize()
elif isinstance(date, str):
date = pd.to_datetime(date, format='%... | {"/returnClasses.py": ["/date_functions.py"], "/dataModule.py": ["/returnClasses.py", "/date_functions.py"], "/examples.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"], "/main.py": ["/dataModule.py", "/returnClasses.py", "/date_functions.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.