index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
42,588 | laszlocseh/wise.msfd | refs/heads/master | /src/wise/msfd/compliance/nationaldescriptors/a34.py | import logging
from collections import defaultdict
from lxml.etree import fromstring
from Products.Five.browser.pagetemplatefile import \
ViewPageTemplateFile as Template
from wise.msfd.data import get_xml_report_data
from wise.msfd.translation import retrieve_translation
from wise.msfd.utils import (Item, ItemLa... | {"/src/wise/msfd/compliance/nationaldescriptors/a8esa.py": ["/src/wise/msfd/compliance/nationaldescriptors/data.py"], "/src/wise/msfd/compliance/nationalsummary/main.py": ["/src/wise/msfd/compliance/nationaldescriptors/main.py"], "/src/wise/msfd/compliance/regionalsummary/introduction.py": ["/src/wise/msfd/compliance/n... |
42,589 | Adil780/CUBIC-WORLD | refs/heads/main | /main.py | import pygame, time, view, controller, model
pygame.init()
model.create_level_1()
while True:
time.sleep(1/60)
view.draw()
model.always()
controller.events() | {"/main.py": ["/view.py", "/controller.py", "/model.py"], "/controller.py": ["/cubic.py", "/model.py"], "/model.py": ["/cubic.py", "/settings.py", "/ball.py"], "/ball.py": ["/settings.py", "/model.py", "/cubic.py"], "/view.py": ["/settings.py", "/model.py", "/cubic.py"]} |
42,590 | Adil780/CUBIC-WORLD | refs/heads/main | /controller.py | import pygame, cubic, model
pygame.init()
def events():
"""
process events
"""
t = pygame.event.get()
for i in t:
if i.type == pygame.QUIT:
exit()
if i.type == pygame.MOUSEBUTTONDOWN and i.button == pygame.BUTTON_LEFT:
pos = i.pos
g = model.butt... | {"/main.py": ["/view.py", "/controller.py", "/model.py"], "/controller.py": ["/cubic.py", "/model.py"], "/model.py": ["/cubic.py", "/settings.py", "/ball.py"], "/ball.py": ["/settings.py", "/model.py", "/cubic.py"], "/view.py": ["/settings.py", "/model.py", "/cubic.py"]} |
42,591 | Adil780/CUBIC-WORLD | refs/heads/main | /model.py | import pygame, cubic, settings, random, ball
pygame.init()
level = 1
cub_list = []
group = pygame.sprite.LayeredUpdates()
coin = 0
button_buy = pygame.Rect(settings.SCREEN_WIDTH - 250, 70, 70, 50)
ball_list = []
def buy_ball():
global coin
if coin >= 10:
coin -= 10
b = ball.Ball(100, 800, 1, ... | {"/main.py": ["/view.py", "/controller.py", "/model.py"], "/controller.py": ["/cubic.py", "/model.py"], "/model.py": ["/cubic.py", "/settings.py", "/ball.py"], "/ball.py": ["/settings.py", "/model.py", "/cubic.py"], "/view.py": ["/settings.py", "/model.py", "/cubic.py"]} |
42,592 | Adil780/CUBIC-WORLD | refs/heads/main | /cubic.py | import pygame
pygame.init()
from pygame.sprite import DirtySprite
f = pygame.font.SysFont("arial", 40, True)
class Cub(DirtySprite):
CUBIC_SIZE_W = 70
CUBIC_SIZE_H = 50
def dessapear(self):
print("12")
def __init__(self, posx, posy, hp, defended):
DirtySprite.__init__(self)
... | {"/main.py": ["/view.py", "/controller.py", "/model.py"], "/controller.py": ["/cubic.py", "/model.py"], "/model.py": ["/cubic.py", "/settings.py", "/ball.py"], "/ball.py": ["/settings.py", "/model.py", "/cubic.py"], "/view.py": ["/settings.py", "/model.py", "/cubic.py"]} |
42,593 | Adil780/CUBIC-WORLD | refs/heads/main | /settings.py | import pygame
pygame.init()
SCREEN_WIDTH = 1000
SCREEN_HEIGHT = 1000
| {"/main.py": ["/view.py", "/controller.py", "/model.py"], "/controller.py": ["/cubic.py", "/model.py"], "/model.py": ["/cubic.py", "/settings.py", "/ball.py"], "/ball.py": ["/settings.py", "/model.py", "/cubic.py"], "/view.py": ["/settings.py", "/model.py", "/cubic.py"]} |
42,594 | Adil780/CUBIC-WORLD | refs/heads/main | /ball.py | import pygame, settings, model, cubic
pygame.init()
from pygame.sprite import DirtySprite
class Ball(DirtySprite):
BALL_WIDTH = 50
BALL_HEIGHT = 50
def __init__(self, posx, posy, speedx, speedy):
DirtySprite.__init__(self)
self.layer = 2
self.speedx = speedx
self.speedy = ... | {"/main.py": ["/view.py", "/controller.py", "/model.py"], "/controller.py": ["/cubic.py", "/model.py"], "/model.py": ["/cubic.py", "/settings.py", "/ball.py"], "/ball.py": ["/settings.py", "/model.py", "/cubic.py"], "/view.py": ["/settings.py", "/model.py", "/cubic.py"]} |
42,595 | Adil780/CUBIC-WORLD | refs/heads/main | /view.py | import pygame, settings, model, cubic
pygame.init()
screen = pygame.display.set_mode([settings.SCREEN_WIDTH, settings.SCREEN_HEIGHT])
f = pygame.font.SysFont("arial", 50, True)
def draw():
screen.fill([255, 0, 0])
model.group.draw(screen)
coins = f.render("COINS " + str(model.coin), True, [255, 247... | {"/main.py": ["/view.py", "/controller.py", "/model.py"], "/controller.py": ["/cubic.py", "/model.py"], "/model.py": ["/cubic.py", "/settings.py", "/ball.py"], "/ball.py": ["/settings.py", "/model.py", "/cubic.py"], "/view.py": ["/settings.py", "/model.py", "/cubic.py"]} |
42,603 | damolaajayi/Hospital | refs/heads/master | /patient_input/forms.py | from django import forms
from patients.models import patient
from .models import DoctorInfo
class PatientInput(forms.ModelForm):
class Meta:
model = patient
fields = [
'Reg_No',
'first_name',
'Last_name',
'Email',
'Patient_Age',
'Gender',
'Contact_No',
'Patient_Address',
]
class DoctorInforma... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,604 | damolaajayi/Hospital | refs/heads/master | /patient_input/urls.py | from django.urls import path
from django.urls import include
from . import views
urlpatterns = [
path('patientinput/', views.home, name='patientinput'),
path('doctorinfo/', views.doc, name='doctorinfo')
] | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,605 | damolaajayi/Hospital | refs/heads/master | /patients/forms.py | from django import forms
from .models import Prescription, patient
class DoctorForm(forms.ModelForm):
class Meta:
model = Prescription
fields = [
'patient',
'Complaint',
'Prescription',
'Remarks',
]
#class DoctorForm(forms.Form):
#patient = forms.ModelChoiceField(queryset=patient.object... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,606 | damolaajayi/Hospital | refs/heads/master | /patients/urls.py | from django.urls import path
from django.urls import include
from . import views
urlpatterns = [
path('patientsview/', views.patient_list, name='patient_list'),
path('doctor/', views.doct, name='doct'),
path('doctorview/', views.docview, name='docview'),
path('prescription/', views.prescrip, name='pres... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,607 | damolaajayi/Hospital | refs/heads/master | /hospital/views.py | from django.views.generic import TemplateView
from django.shortcuts import render
from django.urls import reverse_lazy
from django.views import generic
from .forms import DoctorSignUpForm
class HomePageView(TemplateView):
template_name = 'home.html'
class SignUp(generic.CreateView):
form_class = DoctorSignUpForm
... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,608 | damolaajayi/Hospital | refs/heads/master | /patient_input/migrations/0001_initial.py | # Generated by Django 2.1rc1 on 2018-10-22 19:56
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='DoctorInfo',
fields=[
('Name', models.Char... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,609 | damolaajayi/Hospital | refs/heads/master | /hospital/admin.py | from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from .forms import DoctorSignUpForm, DoctorUserChangeForm
from .models import DoctorUser
class DoctorUserAdmin(UserAdmin):
model = DoctorUser
add_form = DoctorSignUpForm
form = DoctorUser... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,610 | damolaajayi/Hospital | refs/heads/master | /patients/migrations/0003_auto_20181024_1745.py | # Generated by Django 2.1rc1 on 2018-10-24 16:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('patients', '0002_auto_20181024_1742'),
]
operations = [
migrations.AlterField(
model_name='patient',
name='Patient_... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,611 | damolaajayi/Hospital | refs/heads/master | /patients/migrations/0001_initial.py | # Generated by Django 2.1rc1 on 2018-10-22 19:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='patient',
fields=[
... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,612 | damolaajayi/Hospital | refs/heads/master | /patients/migrations/0002_auto_20181024_1742.py | # Generated by Django 2.1rc1 on 2018-10-24 16:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('patients', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='patient',
name='Room_No',
... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,613 | damolaajayi/Hospital | refs/heads/master | /patients/views.py | from django.http import Http404
from django.shortcuts import render, get_object_or_404, redirect
from .models import patient, Prescription
from .forms import DoctorForm
from patient_input.models import DoctorInfo
from django.db.models import Q
from django.contrib.auth.decorators import login_required
# Create your vi... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,614 | damolaajayi/Hospital | refs/heads/master | /hospital/urls.py | from django.urls import path
from django.urls import include
from . import views
from django.contrib.auth.views import LoginView, LogoutView
from . import views
app_name = 'hospital'
urlpatterns = [
path('', views.HomePageView.as_view(), name='home'),
path('signup/', views.SignUp.as_view(), name='signup'),
path(... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,615 | damolaajayi/Hospital | refs/heads/master | /hospital/models.py | from django.contrib.auth.models import AbstractUser, UserManager
class DoctorUserManager(UserManager):
pass
class DoctorUser(AbstractUser):
objects = DoctorUserManager()
# Create your models here.
| {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,616 | damolaajayi/Hospital | refs/heads/master | /patient_input/views.py | from django.shortcuts import render
from .forms import PatientInput, DoctorInformation
from patients.models import patient
from .models import DoctorInfo
from django.contrib.auth.decorators import login_required
@login_required(login_url="/users/login")
def home(request):
if request.method == 'POST':
form = Patien... | {"/hospital/admin.py": ["/hospital/models.py"], "/patients/views.py": ["/patients/forms.py"], "/patient_input/views.py": ["/patient_input/forms.py"]} |
42,619 | wbutler/beyondtv-podcast-app | refs/heads/master | /Tester.py | import Config
import Debug
import RecordingsWatcher
strs = ["Daily", "Colbert", "Soup"]
files = []
results = RecordingsWatcher.GetAvailableFiles(strs)
for fileSet in results.values():
for fileName in fileSet:
files.append( fileName )
print RecordingsWatcher.RemoveGrowingFiles( files )
| {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,620 | wbutler/beyondtv-podcast-app | refs/heads/master | /RecordingsWatcher.py |
import os
import sys
import time
import Config
import Debug
import Recording
# Initialization - make sure we're allowed to read the recordings directory
if (not os.access( Config.TV_SOURCE_DIR, os.R_OK ) ):
Debug.LogEntry( "Unable to read recordings directory", Debug.ERROR )
sys.exit( -1 )
# Given a list of ... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,621 | wbutler/beyondtv-podcast-app | refs/heads/master | /StorageManager.py | import os
import pickle
import re
import shutil
import sys
import Config
import Debug
import Podcast
import Recording
# This function looks at the config files and returns a list of
# strings that specify the search inputs for each of the podcasts.
def GetSearchStrings( ):
searchStrings = Podcasts.keys()
... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,622 | wbutler/beyondtv-podcast-app | refs/heads/master | /Config.py | import os
CONFIG_DIR = os.path.join( os.path.expanduser("~"), ".tvpodcast" )
SEARCHES_FILE = "searches.txt"
LOG_FILE = "logs.txt"
HASHES_FILE = "hashes.pk"
RUN_FILE = ".lock"
PODCAST_METADATA_FILE = "podcasts.pk"
TV_SOURCE_DIR = "/mnt/tv"
TV_SOURCE_EXTENSIONS = ["avi"]
WWW_ROOT_DIR = "/www"
WWW_PODCAST_DIR = "/podca... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,623 | wbutler/beyondtv-podcast-app | refs/heads/master | /Debug.py | import Config
import os
import sys
import time
# Available logging levels; output at higher values is a
# superset of output at lower levels. Use these values as
# input to SetLogLevel
ERROR = 0
NORMAL = 1
DEBUG = 2
# Default level of logging for the application
RUNTIME_LOG_LEVEL = DEBUG
# If this file is present in... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,624 | wbutler/beyondtv-podcast-app | refs/heads/master | /Recording.py | import datetime
import os
import re
import Debug
class Recording:
title = ""
author = ""
subtitle = ""
summary = ""
guid = ""
pubDate = datetime.datetime.min
duration = 0
pathToFile = ""
def __init__( self, path="" ):
self.pathToFile = path
def __str__( self ):
... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,625 | wbutler/beyondtv-podcast-app | refs/heads/master | /podcastgen.py | from xml.dom.minidom import Document
import random
# Text constants
TTL_TIMEOUT = "60"
TITLE = "BeyondTV Test Podcast"
LINK = "http://192.168.1.105/testpodcast.xml"
LANGUAGE = "en-us"
COPYRIGHT_NOTICE = " 2008 Flaming Penguin Heavy Industries"
SUBTITLE = "Subtitle"
AUTHOR = "Author"
SUMMARY = "Summary"
DESCRIPTION = "... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,626 | wbutler/beyondtv-podcast-app | refs/heads/master | /pickletest.py | import pickle
import random
random.seed()
try:
# Read in some data
inFile = open('tempdata.pk', 'r')
data = pickle.load( inFile )
print( "Reading old data:\n%s\n" % str(data) )
inFile.close()
except:
# Couldn't read in any data
print( "No old data available.\n" )
data = [random.randrang... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,627 | wbutler/beyondtv-podcast-app | refs/heads/master | /Podcast.py | import copy
import datetime
import os
import shutil
import sys
from xml.dom.minidom import Document
import Config
import Debug
import Recording
DEFAULT_TTL = "60"
DEFAULT_LANGUAGE = "en-us"
DEFAULT_COPYRIGHT = str(datetime.datetime.now().year) + " Frumjous Bandersnatch"
DEFAULT_AUTHOR = "Author TK"
DEFAULT_CATEGORY =... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,628 | wbutler/beyondtv-podcast-app | refs/heads/master | /Main.py | import os
import sys
import fcntl
import time
import Config
# Before we do anything, let's acquire the run lock to make
# sure that we're the only instance running.
runFilePath = os.path.join( Config.CONFIG_DIR, Config.RUN_FILE)
lockFile = open( runFilePath, 'a+' )
try:
fcntl.flock( lockFile, fcntl.LOCK_EX|fcntl.L... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,629 | wbutler/beyondtv-podcast-app | refs/heads/master | /Transcoder.py | import copy
import os
import tempfile
import Config
import Debug
def ConvertFile( inputRecording ):
Debug.LogEntry( "Beginning transcoder module with %s" % str( inputRecording ), Debug.DEBUG )
# Find a working directory
tempDir = tempfile.gettempdir()
Debug.LogEntry( "Using temporary directory at %s"... | {"/RecordingsWatcher.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/StorageManager.py": ["/Config.py", "/Debug.py", "/Podcast.py", "/Recording.py"], "/Debug.py": ["/Config.py"], "/Recording.py": ["/Debug.py"], "/Podcast.py": ["/Config.py", "/Debug.py", "/Recording.py"], "/Main.py": ["/Config.py", "/Debug.py", "/R... |
42,630 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/ThoraricSurgery.py | import pandas as pd
from scipy.io.arff import loadarff
def cat_to_num(df):
"""
Convert a Pandas column (Series) from categorical/qualitative values to continuous/quantitative values.
"""
feature_vals = sorted(df.unique())
feature_vals_mapping = dict(zip(feature_vals, range(0, len(feature_vals) +
... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,631 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/steel_plate_faults.py | import numpy as np
import pandas as pd
def load_steel_faults_data() :
filePath = "C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Steel plate faults/Faults.NNA"
data_csv = pd.read_csv(filePath, delim_whitespace=True, header=None)
X= data_csv.iloc[:,:27]
y= data_csv.il... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,632 | AliD101v/ml-course-project-f19 | refs/heads/master | /intrprt/cifar.py | import numpy as np
import sklearn
from sklearn.tree import DecisionTreeClassifier
from data.CIFAR10 import *
from sklearn import metrics
import matplotlib
import matplotlib.pyplot as plt
from sklearn import multiclass
train, test = load_CIFAR10()
n = 5
print(f'First {n} records in...')
X = train[0][b'data']
y = train[... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,633 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/ParkinsonSpeech.py | import pandas as pd
def load_Parkinson_Speech():
# Read the dataset
featureNames = ['Subject id', 'Jitter (local)','Jitter (local, absolute)','Jitter (rap)','Jitter (ppq5)','Jitter (ddp)','Shimmer (local)','Shimmer (local, dB)','Shimmer (apq3)','Shimmer (apq5)',' Shimmer (apq11)','Shimmer (dda)','AC','NTH','H... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,634 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/StudentPerformance_data.py | import pandas as pd
from sklearn import preprocessing
def load_studentPerformance():
df=pd.read_csv("C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/student performance/student-por.csv",delimiter=';')
categorical_columns = df.select_dtypes(['category','object']).columns
... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,635 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/seismic_bumps.py | import pandas as pd
import numpy as np
from scipy.io.arff import loadarff
def load_seismic_data():
file_path = filePath = "C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Seismic Bumps/seismic-bumps.arff"
raw_data = loadarff(filePath) # data type tuple
seismic_df = pd... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,636 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/Concrete_data.py | #!/usr/bin/env python
# coding: utf-8
# In[9]:
import pandas as pd
from sklearn import preprocessing
def load_concrete():
df = pd.read_excel("Concrete_Data.xls",)
X=df[df.columns[:8]]
y=df[df.columns[-1]]
return X,y
| {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,637 | AliD101v/ml-course-project-f19 | refs/heads/master | /Resources/Code Templates/ML_Experiments.py | # suppress sklearn warnings
def warn(*args, **kwargs):
pass
import warnings
warnings.warn = warn
# imports
import pandas as pd
from pandas.plotting import scatter_matrix
import numpy as np
import sklearn
from sklearn import preprocessing
from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImpute... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,638 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/QSARAquaticToxicity.py | import pandas as pd
def load_QSAR_aquatic_toxicity():
# Read the dataset
featureNames = ['TPSA(Tot)', 'SAacc', 'H-050', 'MLOGP', 'RDCHI', 'GATS1p', 'nN', 'C-040', 'LC50 [-LOG(mol/L)]']
df = pd.read_csv('data/QSAR aquatic toxicity/qsar_aquatic_toxicity.csv',
delimiter=';', header=None, names=featu... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,639 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/wine_quality.py | import numpy as np
import pandas as pd
def load_wine_quality() :
filePath_red = "C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Wine Quality/winequality-red.csv"
filePath_white = "C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Wine Quality... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,640 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/SGEMM_data.py | import numpy as np
import pandas as pd
#### import pandas as pd
from sklearn import preprocessing
def load_SGEMM():
df=pd.read_csv("C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/SGEMM/sgemm_product.csv",delimiter=',')
y=(df['Run1 (ms)']+df['Run1 (ms)']+df['Run1 (ms)']+df[... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,641 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/BikeSharing.py | import pandas as pd
def load_BikeSharing():
# Read the dataset
df = pd.read_csv('data/Bike Sharing/hour.csv',
delimiter=',', header=0, index_col='instant')
return df
# df = load_BikeSharing()
# print(df[df.columns[1:-3]].head())
# df.info()
# df.describe() | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,642 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/NOAAWeatherBellevue.py | import numpy as np
import pandas as pd
def load_NOAAWeatherBellevue():
featureNames = ['Temperature','Dew Point','Sea Level Pressure','Visibility','Average Wind Speed','Maximum Sustained Wind Speed','Maximum Temperature','Minimum Temperature']
# Read the dataset
df_X = pd.read_csv('data/NOAA Weather Bellev... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,643 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/Diabetic_Retinopathy_Analysis.py | # suppress sklearn warnings
def warn(*args, **kwargs):
pass
import warnings
warnings.warn = warn
# imports
import pandas as pd
from pandas.plotting import scatter_matrix
import numpy as np
import sklearn
from sklearn.pipeline import Pipeline
import pickle
# preprocessing
from sklearn import preprocessing
from skle... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,644 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/facebookMetricData.py | import pandas as pd
from sklearn import preprocessing
def load_facebookMetric():
df = pd.read_csv("C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Facebook/dataset_Facebook.csv",delimiter=';')
categorical_columns = df.select_dtypes(['category','object']).columns
# conv... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,645 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/Merck_data.py | import numpy as np
import pandas as pd
#This dataset takes a lot of time to run due to it's size.
def load_set_2_data():
with open("C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Merck/ACT2_competition_training.csv") as f:
cols = f.readline().rstrip('\n').split(',')
... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,646 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/austrailian_data.py | import pandas as pd
from sklearn.model_selection import train_test_split
def load_austrailian():
df=pd.read_table('C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Australian credit/australian.dat',sep='\s+',header=None)
df.columns=['X1','X2','X3','X4','X5','X6','X7','X8','X9'... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,647 | AliD101v/ml-course-project-f19 | refs/heads/master | /rgs/data/crime_data.py | import numpy as np
import pandas as pd
def load_crime_data():
df =pd.read_table('C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Communities and Crime/communities.data',delimiter=',',header=None)
df = df.replace('?', None)
# df = df.where(df =="\?",None)
df = df.dr... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,648 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/GermanCreditData.py | import pandas as pd
from sklearn.model_selection import train_test_split
def load_GermanCredit():
df=pd.read_table('C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/German credit/german.data',sep='\s+',header=None)
X = df[df.columns[:-1]]
y = df[df.columns[-1]]
r... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,649 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/Diabetic_Retinopathy.py | import pandas as pd
from scipy.io.arff import loadarff
def load_diabetic_data():
file_path = "C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Diabetic Retinopathy/messidor_features.arff"
# path = "ml-course-project-f19\data\Diabetic Retinopathy\messidor_features.arff"
raw... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,650 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/YeastData.py | import pandas as pd
def load_yeastData():
df=df=pd.read_table('C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Yeast/yeast.data',sep='\s+',header=None)
categorical_columns = df.select_dtypes(['category','object']).columns
# convert categorical data to numeric values
df[c... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,651 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/credit_card.py | import numpy as np
import pandas as pd
def load_credit_card_data():
# data reading
filePath = "C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/data/Default of credit card clients/default_of_credit_card_clients.xls"
data_excel = pd.read_excel(filePath, sheet_name='Data')
X... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,652 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/Adult.py | import pandas as pd
def load_Adult():
# Read the dataset
# Prepare the feature names
featureNames = ['age', 'workclass', 'fnlwgt', 'education', 'education-num', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'capital-gain', 'capital-loss', 'hours-per-week', 'native-country', 'Prediction']
... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,653 | AliD101v/ml-course-project-f19 | refs/heads/master | /intrprt/CIFAR10_CNN.py | #%%
# CUDA test code
# import only for the CUDA test cell
# from __future__ import print_function
import numpy as np
import sklearn
from sklearn.tree import DecisionTreeClassifier
import torch
import torchvision
import torchvision.transforms as transforms
import torch.nn as nn
import torch.nn.functional as F
import to... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,654 | AliD101v/ml-course-project-f19 | refs/heads/master | /cls/data/WDBC.py | import pandas as pd
def load_WDBC():
# Read the dataset
# Prepare the feature names
featureNames_org = ['Radius', 'Texture', 'Perimeter', 'Area', 'Smoothness', 'Compactness', 'Concavity', 'Concave points', 'Symmetry', 'Fractal dimension']
featureNames = [f'{s} (M)' for s in featureNames_org]
featu... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,655 | AliD101v/ml-course-project-f19 | refs/heads/master | /intrprt/data/CIFAR10.py | import numpy as np
import pickle
def unpickle(file):
with open(file, 'rb') as fo:
dict = pickle.load(fo, encoding='bytes')
return dict
def load_CIFAR10(transform=False):
train = list()
for i in range(5):
# C:/Users/sidha/OneDrive/Documents/ml-course-project-f19/ml-course-project-f19/da... | {"/intrprt/CIFAR10_CNN.py": ["/intrprt/data/CIFAR10.py"]} |
42,659 | arhamhameed/Language-Parsers-and-Translators | refs/heads/master | /parser1.py | from cyk import parse
'''
The array sentence contains the test sentenses that our machine recognizes or not.
Recognizable sentences:
'I and Arham drove the bike down the dirty street'
'I jumped over the aesthetic mountains down the magnificent Himalayas lake'
'I drank the Argentina'
'laptop dra... | {"/parser1.py": ["/cyk.py"], "/ParseFunc.py": ["/cyk.py"], "/translator.py": ["/chomsky.py", "/cyk.py"], "/cyk.py": ["/chomsky.py"], "/fun_gen.py": ["/chomsky.py", "/cyk.py"]} |
42,660 | arhamhameed/Language-Parsers-and-Translators | refs/heads/master | /ParseFunc.py | from cyk import parse
'''
The array function contains the test functions that our machine recognizes or not.
Recognizable functions:
f ( x ) = x * 5
f ( x , z ) = sin ( x * z )
f ( x , z ) = ( x + z ) / 2
Non Recognizable functions:
x + y + z
f ( a ) = a / 2
g ( x ) = f ( z )
'''... | {"/parser1.py": ["/cyk.py"], "/ParseFunc.py": ["/cyk.py"], "/translator.py": ["/chomsky.py", "/cyk.py"], "/cyk.py": ["/chomsky.py"], "/fun_gen.py": ["/chomsky.py", "/cyk.py"]} |
42,661 | arhamhameed/Language-Parsers-and-Translators | refs/heads/master | /translator.py | from chomsky import convert_grammar, read_grammar
from cyk import parse
translation_key = {
'and': 'y','but': 'pero', 'or': 'o',
'a': 'uno', 'an': 'un', 'this': 'esto', 'the': 'el',
'from': 'desde', 'to': 'a', 'over': 'encima', 'down': 'abajo', 'in': 'en',
'me': 'yo', 'I': 'yo', 'we': 'Nosotros', 'you': 'tú'... | {"/parser1.py": ["/cyk.py"], "/ParseFunc.py": ["/cyk.py"], "/translator.py": ["/chomsky.py", "/cyk.py"], "/cyk.py": ["/chomsky.py"], "/fun_gen.py": ["/chomsky.py", "/cyk.py"]} |
42,662 | arhamhameed/Language-Parsers-and-Translators | refs/heads/master | /cyk.py | import typing
from typing import List
from chomsky import read_grammar, convert_grammar
def parse(grammar_file_path: List[str], sentence: str) -> bool:
"""
The code for Cocke-Younger-Kasami (CYK) algorithm is taken from this
source: https://github.com/RobMcH/CYK-Parser/blob/master/cyk_parser.py
... | {"/parser1.py": ["/cyk.py"], "/ParseFunc.py": ["/cyk.py"], "/translator.py": ["/chomsky.py", "/cyk.py"], "/cyk.py": ["/chomsky.py"], "/fun_gen.py": ["/chomsky.py", "/cyk.py"]} |
42,663 | arhamhameed/Language-Parsers-and-Translators | refs/heads/master | /fun_gen.py | from chomsky import convert_grammar
from cyk import parse
def fun_gen(function_generator: str) -> str:
'''
This function determines if a given input is in the language
If it belongs to the language then the function Auto- generates a python function
param: The string that is checked for mem... | {"/parser1.py": ["/cyk.py"], "/ParseFunc.py": ["/cyk.py"], "/translator.py": ["/chomsky.py", "/cyk.py"], "/cyk.py": ["/chomsky.py"], "/fun_gen.py": ["/chomsky.py", "/cyk.py"]} |
42,664 | arhamhameed/Language-Parsers-and-Translators | refs/heads/master | /chomsky.py | '''
The code I used to convert the Context Free Grammar to Chomsky Normal form is taken from this
source: https://github.com/RobMcH/CYK-Parser/blob/master/grammar_converter.py
I added documentations to understand it better and removed the functions that were not required.
Also changed the code to align with the t... | {"/parser1.py": ["/cyk.py"], "/ParseFunc.py": ["/cyk.py"], "/translator.py": ["/chomsky.py", "/cyk.py"], "/cyk.py": ["/chomsky.py"], "/fun_gen.py": ["/chomsky.py", "/cyk.py"]} |
42,680 | skiesx/django-project-version | refs/heads/master | /djversion/context_processors.py | # -*- coding: utf-8 -*-
# django-project-version
# djversion/context_processors.py
from __future__ import unicode_literals
from djversion.utils import get_version
__all__ = [
"version",
]
def version(request):
"""
Return formatted version string named as "VERSION" to context.
Args:
reques... | {"/djversion/context_processors.py": ["/djversion/utils.py"], "/djversion/templatetags/djversion_tags.py": ["/djversion/utils.py"], "/djversion/utils.py": ["/djversion/settings.py"]} |
42,681 | skiesx/django-project-version | refs/heads/master | /djversion/templatetags/djversion_tags.py | # -*- coding: utf-8 -*-
# django-project-version
# djversion/templatetags/djversion_tags.py
from __future__ import unicode_literals
from django import template
from djversion.utils import get_version
__all__ = [
"project_version",
]
register = template.Library()
@register.simple_tag()
def project_version(... | {"/djversion/context_processors.py": ["/djversion/utils.py"], "/djversion/templatetags/djversion_tags.py": ["/djversion/utils.py"], "/djversion/utils.py": ["/djversion/settings.py"]} |
42,682 | skiesx/django-project-version | refs/heads/master | /djversion/settings.py | # -*- coding: utf-8 -*-
# django-project-version
# djversion/settings.py
from __future__ import unicode_literals
from django.conf import settings
__all__ = [
"VERSION",
"UPDATED",
"FORMAT_STRING",
]
VERSION = getattr(settings, "DJVERSION_VERSION", None)
UPDATED = getattr(settings, "DJVERSION_UPDATED"... | {"/djversion/context_processors.py": ["/djversion/utils.py"], "/djversion/templatetags/djversion_tags.py": ["/djversion/utils.py"], "/djversion/utils.py": ["/djversion/settings.py"]} |
42,683 | skiesx/django-project-version | refs/heads/master | /setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# django-project-version
# setup.py
from setuptools import (
setup,
find_packages,
)
# metadata
VERSION = (0, 2, 4)
__version__ = ".".join(map(str, VERSION))
setup(
name="django-project-version",
version=__version__,
packages=find_packages(),
ins... | {"/djversion/context_processors.py": ["/djversion/utils.py"], "/djversion/templatetags/djversion_tags.py": ["/djversion/utils.py"], "/djversion/utils.py": ["/djversion/settings.py"]} |
42,684 | skiesx/django-project-version | refs/heads/master | /djversion/models.py | # -*- coding: utf-8 -*-
# django-project-version
# djversion/models.py
from __future__ import unicode_literals
__all__ = []
| {"/djversion/context_processors.py": ["/djversion/utils.py"], "/djversion/templatetags/djversion_tags.py": ["/djversion/utils.py"], "/djversion/utils.py": ["/djversion/settings.py"]} |
42,685 | skiesx/django-project-version | refs/heads/master | /djversion/utils.py | # -*- coding: utf-8 -*-
# django-project-version
# djversion/utils.py
from __future__ import unicode_literals
from datetime import date, datetime
from django.templatetags.l10n import localize
from djversion.settings import (
VERSION,
UPDATED,
FORMAT_STRING,
)
__all__ = [
"get_version",
]
def ge... | {"/djversion/context_processors.py": ["/djversion/utils.py"], "/djversion/templatetags/djversion_tags.py": ["/djversion/utils.py"], "/djversion/utils.py": ["/djversion/settings.py"]} |
42,686 | skiesx/django-project-version | refs/heads/master | /djversion/templatetags/__init__.py | # -*- coding: utf-8 -*-
# django-project-version
# djversion/templatetags/__init__.py
from __future__ import unicode_literals
__all__ = []
| {"/djversion/context_processors.py": ["/djversion/utils.py"], "/djversion/templatetags/djversion_tags.py": ["/djversion/utils.py"], "/djversion/utils.py": ["/djversion/settings.py"]} |
42,687 | skiesx/django-project-version | refs/heads/master | /djversion/__init__.py | # -*- coding: utf-8 -*-
# django-project-version
# djversion/__init__.py
from __future__ import unicode_literals
__all__ = [
"default_app_config",
]
default_app_config = "djversion.apps.Config"
| {"/djversion/context_processors.py": ["/djversion/utils.py"], "/djversion/templatetags/djversion_tags.py": ["/djversion/utils.py"], "/djversion/utils.py": ["/djversion/settings.py"]} |
42,691 | lucaputelli/ddi_joint | refs/heads/master | /constants.py | from spacy.util import compile_infix_regex, compile_prefix_regex, compile_suffix_regex
import spacy
from spacy.language import Language, Tokenizer
from gensim.models import Word2Vec
from pre_processing_lib import get_character_dictionary
def custom_tokenizer(nlp):
prefix_re = compile_prefix_regex(Language.Defaults... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,692 | lucaputelli/ddi_joint | refs/heads/master | /error_check.py | from relation_format_extraction import sentences_from_prediction
from pre_processing_lib import get_sentences
def has_numbers(string):
return any(char.isdigit() for char in string)
def get_entity_dict():
xml_sentences = get_sentences('Dataset/Test/Overall')
entity_dict = dict()
for i in range(0, len... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,693 | lucaputelli/ddi_joint | refs/heads/master | /data_model.py | from typing import List
from spacy.language import Doc
from constants import *
class NERToken:
def __init__(self, word: str, label: str):
self.word = word
self.label = label
def __str__(self):
return self.word + ' ' + self.label
def __len__(self):
return len(self.word)
... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,694 | lucaputelli/ddi_joint | refs/heads/master | /post_processing.py | import numpy as np
from matplotlib import pyplot
from sklearn.metrics import confusion_matrix, classification_report
from keras.callbacks import History
def plot(folder: str, name: str, history: History):
pyplot.clf()
pyplot.figure(1, figsize=(13, 6))
pyplot.subplot(1, 2, 1)
pyplot.plot(history.histor... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,695 | lucaputelli/ddi_joint | refs/heads/master | /ner_format_extraction.py | from pre_processing_lib import get_sentences, number_substitution
import spacy
from spacy.language import Language, Tokenizer
from typing import Dict
prefix_re = spacy.util.compile_prefix_regex(Language.Defaults.prefixes + (';', '\*', '\(', '\)'))
suffix_re = spacy.util.compile_suffix_regex(Language.Defaults.suffixes... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,696 | lucaputelli/ddi_joint | refs/heads/master | /char_embedding_test.py | from pre_processing_lib import *
from model import character_network
from relation_format_extraction import double_format, get_tokenized_sentences
from constants import word_model, tag_model
from data_model import SequencePair
import os
from post_processing import joint_plot
from random import randint
def generative_... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,697 | lucaputelli/ddi_joint | refs/heads/master | /test.py | import datetime
import pickle
from os import mkdir
from os.path import exists
from gensim.models import Word2Vec
from pre_processing_lib import *
from post_processing import plot, error_analysis, metrics
from model import neural_network
from relation_format_extraction import instances_from_prediction, joint_negative_fi... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,698 | lucaputelli/ddi_joint | refs/heads/master | /model.py | from keras.layers import Input, Concatenate, Bidirectional, LSTM, Dense, TimeDistributed, Embedding, Lambda, Layer, RepeatVector
from keras.optimizers import Adam
from keras.models import Model
from AttentionMechanism import AttentionL
from ChainCRF import ChainCRF
import keras.backend as K
import tensorflow as tf
from... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,699 | lucaputelli/ddi_joint | refs/heads/master | /relation_format_extraction.py | from typing import List
from spacy.language import Doc
from spacy.attrs import LEMMA, LOWER, POS, TAG, ENT_TYPE, IS_ALPHA, DEP, HEAD, SPACY
import networkx as nx
from pre_processing_lib import get_sentences, graph_creation
from networkx.exception import *
from spacy import displacy
from pathlib import Path
import en_co... | {"/error_check.py": ["/relation_format_extraction.py"], "/data_model.py": ["/constants.py"], "/char_embedding_test.py": ["/model.py", "/relation_format_extraction.py", "/constants.py", "/data_model.py", "/post_processing.py"], "/test.py": ["/post_processing.py", "/model.py", "/relation_format_extraction.py"], "/model.p... |
42,702 | rileythejones/lambdata | refs/heads/master | /lambdata__test.py | # import the unit test package and functions we want to test out
import unittest
from lambdata_rileythejones import CleanData
from lambdata_rileythejones.df_utils import df_null
from lambdata_rileythejones.df_utils import df_random, df_random_column
class LambdataTests(unittest.TestCase):
"""Test for existence of... | {"/lambdata__test.py": ["/lambdata_rileythejones/__init__.py", "/lambdata_rileythejones/df_utils.py"]} |
42,703 | rileythejones/lambdata | refs/heads/master | /lambdata_rileythejones/df_utils.py | """"
utility functions for working with DataFrames
"""
import pandas as pd
import numpy as np
df_null = pd.DataFrame([1, 2, 3, 4, 5, 6, 7, 8, 9, np.NaN, 0, 0])
df_random = pd.DataFrame(np.random.randn(100, 3))
df_random_column = df_random[0]
| {"/lambdata__test.py": ["/lambdata_rileythejones/__init__.py", "/lambdata_rileythejones/df_utils.py"]} |
42,704 | rileythejones/lambdata | refs/heads/master | /lambdata_rileythejones/__init__.py | """lambdata_rileythejones - a collection of data science helper functions """
import pandas as pd
import numpy as np
from scipy import stats
class CleanData:
"""
functions to clean a dataset
"""
def __init__(self, df):
self.df = df
"""
returns the total number of null values in the en... | {"/lambdata__test.py": ["/lambdata_rileythejones/__init__.py", "/lambdata_rileythejones/df_utils.py"]} |
42,729 | CrawlAll/ZuipinTea | refs/heads/master | /zuipin_tea/spiders/goods_info.py | # -*- coding: utf-8 -*-
import re
import scrapy
from zuipin_tea.items import GoodsItem
class GoodsInfoSpider(scrapy.Spider):
name = 'goods_info'
allowed_domains = ['zuipin.cn']
# start_urls = ['https://www.zuipin.cn/goods?id=ZONGY0840-250']
start_urls = ['https://www.zuipin.cn/']
def parse(self, ... | {"/zuipin_tea/spiders/goods_info.py": ["/zuipin_tea/items.py"]} |
42,730 | CrawlAll/ZuipinTea | refs/heads/master | /zuipin_tea/items.py | # -*- coding: utf-8 -*-
import scrapy
class GoodsItem(scrapy.Item):
title = scrapy.Field()
detail = scrapy.Field()
goods_title = scrapy.Field()
goods_desc = scrapy.Field()
scj_price = scrapy.Field()
zp_price = scrapy.Field()
brand = scrapy.Field()
weight = scrapy.Field()
goods_id =... | {"/zuipin_tea/spiders/goods_info.py": ["/zuipin_tea/items.py"]} |
42,731 | CrawlAll/ZuipinTea | refs/heads/master | /zuipin_tea/middlewares.py | # -*- coding: utf-8 -*-
import random
class RandomUserAgentMiddleware(object):
def __init__(self, user_agent):
self.user_agent = user_agent
@classmethod
def from_crawler(cls, crawler):
return cls(
user_agent=crawler.settings.get('PC_USER_AGENT')
)
def process_req... | {"/zuipin_tea/spiders/goods_info.py": ["/zuipin_tea/items.py"]} |
42,754 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /CS235Flix/adapters/memory_repository.py | import csv
import os
from datetime import datetime
from typing import List
from bisect import bisect_left, insort_left
from werkzeug.security import generate_password_hash
from CS235Flix.adapters.repository import AbstractRepository
from CS235Flix.domain.model import Actor, Director, Genre, Movie, Review, ... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,755 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /Tests/data/Access to CSV/csv reader.py | import omdb
from csv import writer
from csv import reader
import ast
default_text = 'Some Text'
import requests
url = "http://www.omdbapi.com/"
# Open the input_file in read mode and output_file in write mode
with open('test.csv', 'r') as read_obj, \
open('test_output.csv', 'w', newline='') as writ... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,756 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /Tests/unit/test_domain_model/test_movie.py | from CS235Flix.domain.model import Movie, Genre, Actor, Director
import pytest
@pytest.fixture()
def movie():
return Movie('', 0)
def test_init(movie):
#test cr3
movie1 = Movie("Moana", 2016)
assert repr(movie1) == "<Movie Moana, 2016>"
movie3 = Movie("Moana", 1899)
assert movie3... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,757 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /Tests/unit/test_domain_model/test_review.py | from CS235Flix.domain.model import Movie, Actor, Review, User
import pytest
from datetime import datetime
@pytest.fixture()
def review():
timestamp = datetime.today()
return Review(User("",""), Movie("", 0),"", timestamp,0)
def test_init(review):
user = User('Steve', 'pass123')
movie = Mo... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,758 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /CS235Flix/domain/model.py | from datetime import datetime
class Actor:
def __init__(self, actor_full_name : str):
self.colleagues = []
if actor_full_name == "" or type(actor_full_name ) is not str:
self.__actor_full_name = None
else:
self.__actor_full_name = actor_full_name .stri... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,759 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /Tests/unit/test_domain_model/test_actor.py | from CS235Flix.domain.model import Actor
import pytest
@pytest.fixture()
def actor():
return Actor('')
def test_init(actor):
actor1 = Actor("Angelina Jolie")
assert repr(actor1) == "<Actor Angelina Jolie>"
actor2 = Actor("")
assert actor2.actor_full_name is None
actor3 = Actor(42)
... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,760 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /Tests/unit/test_domain_model/test_director.py | from CS235Flix.domain.model import Director
import pytest
@pytest.fixture()
def director():
return Director('')
def test_init(director):
director1 = Director("Taika Waititi")
assert repr(director1) == "<Director Taika Waititi>"
director2 = Director("")
assert director2.director_full_nam... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,761 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /Tests/unit/test_domain_model/test_genre.py | from CS235Flix.domain.model import Genre
import pytest
@pytest.fixture()
def genre():
return Genre("")
def test_init(genre):
genre1 = Genre("Horror")
assert repr(genre1) == "<Genre Horror>"
genre2 = Genre("")
assert genre2.genre_name is None
genre3 = Genre(42)
assert genre3.ge... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,762 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /Tests/unit/test_services.py | from datetime import date
import pytest
from CS235Flix.authentication.services import AuthenticationException
from CS235Flix.authentication import services as auth_services
from CS235Flix.movies import services as movies_services
from CS235Flix.movies.services import NonExistentMovieException
from CS235Flix.d... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,763 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /Tests/unit/test_memory_repository.py | from datetime import date, datetime
from typing import List
import pytest
from CS235Flix.adapters.repository import AbstractRepository, RepositoryException
from CS235Flix.domain.model import Actor, Director, Genre, Movie, Review, User, WatchList, make_review
def test_repository_can_add_a_user(in_memory_repo)... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,764 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /CS235Flix/movies/services.py | from typing import List, Iterable
from datetime import datetime
import random
from CS235Flix.adapters.repository import AbstractRepository
from CS235Flix.domain.model import make_review
class NonExistentMovieException(Exception):
pass
class UnknownUserException(Exception):
pass
def add_revi... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
42,765 | Steve-XD/qkan100-compsci235-a2 | refs/heads/main | /CS235Flix/adapters/repository.py | import abc
from typing import List
from CS235Flix.domain.model import Movie, Review, User
repo_instance = None
class RepositoryException(Exception):
def __init__(self, message=None):
pass
class AbstractRepository(abc.ABC):
@abc.abstractmethod
def add_user(self, user: User):
... | {"/CS235Flix/adapters/memory_repository.py": ["/CS235Flix/adapters/repository.py", "/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_movie.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_review.py": ["/CS235Flix/domain/model.py"], "/Tests/unit/test_domain_model/test_actor.py": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.