index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
4,750 | gboquizo/hackathon_optimizacion_entregas_material | refs/heads/master | /app/utils.py | import os
import sys
from pprint import pprint
def dd(variable):
pprint(variable)
sys.exit()
| {"/app/modules/donor.py": ["/app/__init__.py", "/app/models.py"], "/app/schemas.py": ["/app/__init__.py", "/app/models.py"], "/app/__init__.py": ["/app/modules/auth.py", "/app/modules/admin.py", "/app/modules/dealer.py", "/app/modules/donor.py"], "/app/models.py": ["/app/__init__.py"], "/app/modules/admin.py": ["/app/m... |
4,751 | gboquizo/hackathon_optimizacion_entregas_material | refs/heads/master | /app/modules/dealer.py | # app/modules/manager.py
import os
from app import db
from flask import render_template, Blueprint, request, flash, redirect, send_file, jsonify
from flask_login import login_required, current_user
from werkzeug.utils import secure_filename
from werkzeug.exceptions import abort
# Use modules for each logical domain
... | {"/app/modules/donor.py": ["/app/__init__.py", "/app/models.py"], "/app/schemas.py": ["/app/__init__.py", "/app/models.py"], "/app/__init__.py": ["/app/modules/auth.py", "/app/modules/admin.py", "/app/modules/dealer.py", "/app/modules/donor.py"], "/app/models.py": ["/app/__init__.py"], "/app/modules/admin.py": ["/app/m... |
4,752 | gboquizo/hackathon_optimizacion_entregas_material | refs/heads/master | /main.py | # !usr/bin/env python
import os
from app import create_app
app = create_app()
if __name__ == "__main__":
app.run(debug=os.getenv('FLASK_DEBUG'))
| {"/app/modules/donor.py": ["/app/__init__.py", "/app/models.py"], "/app/schemas.py": ["/app/__init__.py", "/app/models.py"], "/app/__init__.py": ["/app/modules/auth.py", "/app/modules/admin.py", "/app/modules/dealer.py", "/app/modules/donor.py"], "/app/models.py": ["/app/__init__.py"], "/app/modules/admin.py": ["/app/m... |
4,753 | gboquizo/hackathon_optimizacion_entregas_material | refs/heads/master | /app/modules/auth.py | # app/modules/auth.py
"""Routes for user authentication."""
from app import login_manager, db
from app.forms import LoginForm, RegisterForm
from app.models import User
from flask import render_template, redirect, flash, url_for, Blueprint, request
from flask_login import current_user, login_user, logout_user, login_re... | {"/app/modules/donor.py": ["/app/__init__.py", "/app/models.py"], "/app/schemas.py": ["/app/__init__.py", "/app/models.py"], "/app/__init__.py": ["/app/modules/auth.py", "/app/modules/admin.py", "/app/modules/dealer.py", "/app/modules/donor.py"], "/app/models.py": ["/app/__init__.py"], "/app/modules/admin.py": ["/app/m... |
4,754 | gboquizo/hackathon_optimizacion_entregas_material | refs/heads/master | /app/forms.py | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import DataRequired, Email, EqualTo, Length
class LoginForm(FlaskForm):
"""User Login Form."""
email = StringField('Correo electrónico', validators=[
Email('Por favor, intr... | {"/app/modules/donor.py": ["/app/__init__.py", "/app/models.py"], "/app/schemas.py": ["/app/__init__.py", "/app/models.py"], "/app/__init__.py": ["/app/modules/auth.py", "/app/modules/admin.py", "/app/modules/dealer.py", "/app/modules/donor.py"], "/app/models.py": ["/app/__init__.py"], "/app/modules/admin.py": ["/app/m... |
4,784 | tschuy/gpi-web | refs/heads/master | /gpi/gpi_web/models.py | import os
from django.db import models
from django.contrib.auth.models import User
from semantic_version.django_fields import VersionField
def version_file_name(instance, filename):
filename = '/'.join(
[instance.project.package_name,
unicode(instance.version),
'{}-{}.tar.gz'.format(
... | {"/gpi/gpi_web/admin.py": ["/gpi/gpi_web/models.py"], "/gpi/gpi_web/serializer.py": ["/gpi/gpi_web/models.py"]} |
4,785 | tschuy/gpi-web | refs/heads/master | /gpi/gpi_web/views.py | from django.http import JsonResponse
from django.shortcuts import get_object_or_404, render
from django.views.decorators.http import require_POST
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from django.db import IntegrityError
import json
from gpi.gpi_web.model... | {"/gpi/gpi_web/admin.py": ["/gpi/gpi_web/models.py"], "/gpi/gpi_web/serializer.py": ["/gpi/gpi_web/models.py"]} |
4,786 | tschuy/gpi-web | refs/heads/master | /gpi/gpi_web/admin.py | from django.contrib import admin
from gpi.gpi_web.models import Release, Project
class ReleaseAdmin(admin.ModelAdmin):
pass
class ProjectAdmin(admin.ModelAdmin):
pass
admin.site.register(Release, ReleaseAdmin)
admin.site.register(Project, ProjectAdmin)
| {"/gpi/gpi_web/admin.py": ["/gpi/gpi_web/models.py"], "/gpi/gpi_web/serializer.py": ["/gpi/gpi_web/models.py"]} |
4,787 | tschuy/gpi-web | refs/heads/master | /gpi/gpi_web/serializer.py | from django.core.serializers import json
from gpi.gpi_web.models import Project, Release
class PackageSerializer(json.Serializer):
def get_dump_object(self, obj):
self._current['id'] = obj.id
if isinstance(obj, Project):
self._current['releases'] = [
{
... | {"/gpi/gpi_web/admin.py": ["/gpi/gpi_web/models.py"], "/gpi/gpi_web/serializer.py": ["/gpi/gpi_web/models.py"]} |
4,788 | tschuy/gpi-web | refs/heads/master | /gpi/gpi_web/urls.py | from django.conf.urls import patterns
from django.conf.urls import url
urlpatterns = patterns(
'',
url(r'^package/(?P<name>[^/]+)/?$',
'gpi.gpi_web.views.project_details',
name='package-details'),
url(r'^packages/?$',
'gpi.gpi_web.views.project_list',
name='package-list'),
)... | {"/gpi/gpi_web/admin.py": ["/gpi/gpi_web/models.py"], "/gpi/gpi_web/serializer.py": ["/gpi/gpi_web/models.py"]} |
4,789 | tschuy/gpi-web | refs/heads/master | /gpi/gpi_web/__init__.py | default_app_config = 'gpi.gpi_web.YourAppConfig'
from django.apps import AppConfig
class YourAppConfig(AppConfig):
name = 'gpi.gpi_web'
verbose_name = 'GIMP Plugin Installer'
| {"/gpi/gpi_web/admin.py": ["/gpi/gpi_web/models.py"], "/gpi/gpi_web/serializer.py": ["/gpi/gpi_web/models.py"]} |
4,790 | redhat-openstack/octario | refs/heads/master | /plugins/callbacks/debug.py | # Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,791 | redhat-openstack/octario | refs/heads/master | /octario/lib/component.py | #!/usr/bin/env python
# Copyright 2016,2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,792 | redhat-openstack/octario | refs/heads/master | /setup.py | #!/usr/bin/env python
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,793 | redhat-openstack/octario | refs/heads/master | /octario/lib/tester.py | #!/usr/bin/env python
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,794 | redhat-openstack/octario | refs/heads/master | /components_config/16.2/openstack-tempest/scripts/comment_deps.py | # Copyright 2018 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,795 | redhat-openstack/octario | refs/heads/master | /octario/lib/logger.py | #!/usr/bin/env python
# Borrowed from InfraRed project
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,796 | redhat-openstack/octario | refs/heads/master | /octario/lib/execute.py | #!/usr/bin/env python
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,797 | redhat-openstack/octario | refs/heads/master | /octario/lib/exceptions.py | #!/usr/bin/env python
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,798 | redhat-openstack/octario | refs/heads/master | /ir-plugin/osp_version_name.py | #!/usr/bin/env python
# Copyright 2017 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,799 | redhat-openstack/octario | refs/heads/master | /octario/lib/cli.py | #!/usr/bin/env python
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | {"/octario/lib/logger.py": ["/octario/lib/exceptions.py"], "/octario/lib/exceptions.py": ["/octario/lib/tester.py"], "/ir-plugin/osp_version_name.py": ["/octario/lib/component.py"], "/octario/lib/cli.py": ["/octario/lib/component.py", "/octario/lib/tester.py"]} |
4,800 | stefan-cross/choraoke | refs/heads/main | /backend/ultimate-api/server/views.py | from server import app
from flask import request, jsonify
from urllib.parse import urlparse
from .tab_parser import dict_from_ultimate_tab
SUPPORTED_UG_URI = 'tabs.ultimate-guitar.com'
@app.route('/')
def index():
return 'hi'
@app.route('/tab')
def tab():
try:
ultimate_url = request.args.get('url')
... | {"/backend/ultimate-api/server/views.py": ["/backend/ultimate-api/server/tab_parser.py"], "/backend/ultimate-api/server/tab_parser.py": ["/backend/ultimate-api/server/parser.py"], "/backend/ultimate-api/server/parser.py": ["/backend/ultimate-api/server/tab.py"]} |
4,801 | stefan-cross/choraoke | refs/heads/main | /backend/ultimate-api/test.py | ## ToDo:
- [ ] Add Unit Tests
- Test for Ed Sheeran - Perfect
- Test for Jason Mraz - I'm Yours (because of the title parsing)
- Test for Passenger - Let Her Go
| {"/backend/ultimate-api/server/views.py": ["/backend/ultimate-api/server/tab_parser.py"], "/backend/ultimate-api/server/tab_parser.py": ["/backend/ultimate-api/server/parser.py"], "/backend/ultimate-api/server/parser.py": ["/backend/ultimate-api/server/tab.py"]} |
4,802 | stefan-cross/choraoke | refs/heads/main | /backend/ultimate-api/server/tab_parser.py | import sys
import json
import requests
from .parser import html_tab_to_json_dict
def dict_from_ultimate_tab(url: str) -> json:
'''
Given a Ultimate Guitar tab url, will return a dictionary representing the
song along with the song info
'''
html = requests.get(url).content
ug_tags = ['js-tab-con... | {"/backend/ultimate-api/server/views.py": ["/backend/ultimate-api/server/tab_parser.py"], "/backend/ultimate-api/server/tab_parser.py": ["/backend/ultimate-api/server/parser.py"], "/backend/ultimate-api/server/parser.py": ["/backend/ultimate-api/server/tab.py"]} |
4,803 | stefan-cross/choraoke | refs/heads/main | /backend/ultimate-api/server/tab.py | from typing import Any
# tab {
# title: "tab name",
# artist_name: "",
# author: "",
# capo: "" (can be null),
# Tuning: "" (can be null),
#
# lines: [
# {
# type: "chord" (OR "lyrics", "blank"),
# chords: [
# {
# note: "G",
# ... | {"/backend/ultimate-api/server/views.py": ["/backend/ultimate-api/server/tab_parser.py"], "/backend/ultimate-api/server/tab_parser.py": ["/backend/ultimate-api/server/parser.py"], "/backend/ultimate-api/server/parser.py": ["/backend/ultimate-api/server/tab.py"]} |
4,804 | stefan-cross/choraoke | refs/heads/main | /backend/ultimate-api/server/parser.py | import json
from bs4 import BeautifulSoup
from .tab import UltimateTab, UltimateTabInfo
import re
def _tab_info_from_soup(soup: BeautifulSoup) -> UltimateTabInfo:
'''
Returns a populated UltimateTabInfo object based on the provided soup.
Parses based on UG site construction as of 9/3/17.
Parameters:
... | {"/backend/ultimate-api/server/views.py": ["/backend/ultimate-api/server/tab_parser.py"], "/backend/ultimate-api/server/tab_parser.py": ["/backend/ultimate-api/server/parser.py"], "/backend/ultimate-api/server/parser.py": ["/backend/ultimate-api/server/tab.py"]} |
4,807 | ij-knct/.Research | refs/heads/master | /recipict.py | import os
import re
import json
import requests
from ibm_watson import VisualRecognitionV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from box import Box
from googletrans import Translator
import imagePreprocessing
class recipicture():
def __init__(self, file_name, threshold):
self.aut... | {"/recipict.py": ["/imagePreprocessing.py"]} |
4,808 | ij-knct/.Research | refs/heads/master | /imagePreprocessing.py | import os
import subprocess
import numpy as np
import cv2
def imagePreprocessing(fn):
filename = fn
# get file name without file type
filenotype = os.path.splitext(filename)[0]
img = cv2.imread(filename)
# launch a window to select region to grabcut
cv2.namedWindow("Image", 2)
# resize... | {"/recipict.py": ["/imagePreprocessing.py"]} |
4,809 | ij-knct/.Research | refs/heads/master | /tempCodeRunnerFile.py | # def get_ingredients_list(self, index):
# r_str = r'(?<="ingredients": \[)(.*)'
# i_str = r'(.*)(?=\])'
# for moji in self.j:
# mo1 = re.search(r_str, moji)
# mo2 = re.search(i_str, mo1.group())
# s = re.sub('"', '', mo2.group())
# | {"/recipict.py": ["/imagePreprocessing.py"]} |
4,843 | fipanther/christoffel | refs/heads/master | /christoffel.py | from __future__ import division, print_function
import sympy
import numpy
import scipy
class christoffel2:
def __init__(self, metric):
# takes a Sympy matrix and makes the metric g_{ab}
self.metric = metric
self.metric_dim = numpy.shape(self.metric)
# raise an ... | {"/christoffeltest.py": ["/christoffel.py"]} |
4,844 | fipanther/christoffel | refs/heads/master | /christoffeltest.py | from __future__ import division, print_function
from christoffel import christoffel2
import sympy
from sympy.matrices import Matrix
import numpy
import scipy
r, t = sympy.symbols('r t')
metric = Matrix([[1,0],[0,r**2]])
a = christoffel2(metric)
christoffel_trt = a.calculate((r, t), t, r, t)
christoffel_ttr = a.calc... | {"/christoffeltest.py": ["/christoffel.py"]} |
4,875 | johnatasr/CoolPark | refs/heads/master | /automobilies/tests/tests_models.py | from automobilies.models import Automobilie
from django.test import TestCase
class AutomobilieModelTest(TestCase):
"""
Tests of Automobilie in parking.models.py
"""
def setUp(self):
Automobilie.objects.create(
plate="ABC-1234",
)
def test_create_auto(self):
Au... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,876 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_entities.py | from automobilies.entities import Automobilie
from django.test import TestCase
from datetime import datetime
from parking.entities import ParkingOcurrency
class ParkingOcurrencyEnttityTestCase(TestCase):
"""
Tests of ParkingOcurrency in parking.entities.py
"""
def setUp(self):
self.po_one = P... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,877 | johnatasr/CoolPark | refs/heads/master | /parking/serializers.py | from .interfaces import ISerializer
class DefaultSerializer(ISerializer):
def __init__(self, parking: object, msg: str):
self.parking = parking
self.msg = msg
def mount_payload(self):
payload: dict = {
"id": self.parking.id,
"msg": self.msg,
"plate"... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,878 | johnatasr/CoolPark | refs/heads/master | /parking/validators.py | from configs.exceptions import InvalidPayloadException
from .interfaces import IValidator
from .helpers import ParkingHelpers
class ParkValidator(IValidator):
DEFAULT_PLATE_MASK: str = "[A-Z]{3}-[0-9]{4}\Z"
def __init__(self):
self.helper = ParkingHelpers()
@staticmethod
def validate(value:... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,879 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_factories.py | from django.test import TestCase
from parking.factories import ParkFactory
import unittest
class ParkingFactoryTestCase(TestCase):
"""
Tests of ParkFactory in parking.factories.py
"""
def setUp(self):
self.factory = ParkFactory
def test_create_check_in_iterator(self):
msg = self.... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,880 | johnatasr/CoolPark | refs/heads/master | /parking/migrations/0001_initial.py | # Generated by Django 3.1.7 on 2021-03-21 18:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
("automobilies", "0001_initial"),
]
operations = [
migrations.CreateModel(
na... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,881 | johnatasr/CoolPark | refs/heads/master | /automobilies/migrations/0002_auto_20210322_1803.py | # Generated by Django 3.1.7 on 2021-03-22 21:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("automobilies", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="automobilie",
name="plate",
... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,882 | johnatasr/CoolPark | refs/heads/master | /parking/helpers.py | from typing import Type
from django.utils import timezone
from dateutil import relativedelta
from datetime import datetime
import re
class ParkingHelpers:
@staticmethod
def transform_date_checkout(
start_date: Type[datetime], end_date: Type[datetime]
) -> str:
""" "
Transform the r... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,883 | johnatasr/CoolPark | refs/heads/master | /parking/iterators.py | from configs.exceptions import InteratorException
from .interfaces import IIterator
from typing import Any
"""
In Iterators occour all iteration beetween repositories, serializers and validators
adding the business rules in process
"""
class CheckInIterator(IIterator):
""" "
Interactor responsibl... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,884 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_helpers.py | from django.test import TestCase
from parking.helpers import ParkingHelpers
from typing import Any, Type
from datetime import datetime
from django.utils import timezone
import unittest
class ParkingHelpersTestCase(TestCase):
"""
Tests of ParkingHelpers in parking.helpers.py
"""
def setUp(self):
... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,885 | johnatasr/CoolPark | refs/heads/master | /automobilies/repositories.py | from configs.exceptions import ConflictException
from .entities import Automobilie
from .models import Automobilie as AutomobilieModel
from typing import Any
class AutomobiliesRepo:
def create_auto_model(self, auto_entity):
"""
Save the model Automobilie with the Entity created previously
... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,886 | johnatasr/CoolPark | refs/heads/master | /parking/migrations/0004_auto_20210322_1803.py | # Generated by Django 3.1.7 on 2021-03-22 21:03
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("parking", "0003_auto_20210321_1530"),
]
operations = [
migrations.RenameModel(
old_name="Park",
new_name="Parking",
... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,887 | johnatasr/CoolPark | refs/heads/master | /parking/repository.py | from configs.exceptions import ConflictException
from automobilies.repositories import AutomobiliesRepo
from .helpers import ParkingHelpers
from .entities import (
ParkingOcurrency as ParkingOcurrencyEntity,
)
from .models import ParkingOcurrency, Parking
from typing import Any, Type
class ParkRepo:
"""
... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,888 | johnatasr/CoolPark | refs/heads/master | /automobilies/models.py | from django.db import models
# Create your models here.
class Automobilie(models.Model):
plate = models.CharField("Auto Plate", max_length=8, null=False, blank=False)
def __str__(self):
return self.plate
| {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,889 | johnatasr/CoolPark | refs/heads/master | /automobilies/apps.py | from django.apps import AppConfig
class AutomobiliesConfig(AppConfig):
name = "automobilies"
| {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,890 | johnatasr/CoolPark | refs/heads/master | /parking/urls.py | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import ParkViewSet
router = DefaultRouter(trailing_slash=False)
router.register("", ParkViewSet, basename="parking")
app_name = "parking"
urlpatterns = [
path("", include(router.urls)),
]
| {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,891 | johnatasr/CoolPark | refs/heads/master | /automobilies/entities.py | class Automobilie:
def __init__(self, plate: str):
self._id = None
self._plate = plate
def __repr__(self):
return f"Entity: Automobilie<id:{self.id}, plate:{self.plate}>"
def __eq__(self, other):
return self.__dict__ == other.__dict__
def __ne__(self, other):
... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,892 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_models.py | from parking.models import Parking, ParkingOcurrency
from automobilies.models import Automobilie
from django.test import TestCase
class POTest(TestCase):
"""
Tests of ParkingOcurrency in parking.models.py
"""
def test_create_po(self):
auto = Automobilie.objects.create(plate=f"ABC-1234")
... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,893 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_views_api.py | from rest_framework import status
from rest_framework.test import APITestCase
class ParkViewSetTests(APITestCase):
"""
Tests of ParkViewSet in parking.views.py
"""
def setUp(self):
self.data = {"plate": "ABC-1234"}
def test_check_in_with_data(self):
response = self.client.post("/... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,894 | johnatasr/CoolPark | refs/heads/master | /parking/migrations/0003_auto_20210321_1530.py | # Generated by Django 3.1.7 on 2021-03-21 18:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("parking", "0002_auto_20210321_1523"),
]
operations = [
migrations.AlterField(
model_name="parkingocurrency",
name="e... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,895 | johnatasr/CoolPark | refs/heads/master | /automobilies/tests/tests_repo.py | from automobilies.models import Automobilie
from automobilies.entities import Automobilie as AutoEntity
from automobilies.repositories import AutomobiliesRepo
from django.test import TestCase
class AutoRepoTestCase(TestCase):
"""
Tests of AutomobiliesRepo in automobilies.repository.py
"""
def setUp(s... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,896 | johnatasr/CoolPark | refs/heads/master | /parking/apps.py | from django.apps import AppConfig
class ParkConfig(AppConfig):
name = "parking"
| {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,897 | johnatasr/CoolPark | refs/heads/master | /automobilies/migrations/0001_initial.py | # Generated by Django 3.1.7 on 2021-03-21 18:17
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Automobilie",
fields=[
(
"id... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,898 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_interators.py | from django.test import TestCase
from parking.iterators import (
CheckInIterator,
CheckOutIterator,
DoPaymentIterator,
HistoricIterator,
)
from parking.serializers import DefaultSerializer, HistoricSerializer
from parking.validators import ParkValidator
from parking.repository import ParkRepo
class Ch... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,899 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_validators.py | from parking.validators import ParkValidator
from configs.exceptions import InvalidPayloadException
from django.test import TestCase
import unittest
class ParkValidatorTestCase(TestCase):
"""
Tests of ParkValidator in parking.validators.py
"""
def setUp(self):
self.validator = ParkValidator()... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,900 | johnatasr/CoolPark | refs/heads/master | /parking/views.py | # Create your views here.
from rest_framework import viewsets
from rest_framework.decorators import action
from rest_framework.status import HTTP_200_OK, HTTP_400_BAD_REQUEST
from rest_framework.response import Response
from parking.factories import ParkFactory
# Register your viewsets here.
class ParkViewSet(viewset... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,901 | johnatasr/CoolPark | refs/heads/master | /parking/entities.py | from typing import List, Type
from datetime import datetime
from automobilies.models import Automobilie
class ParkingOcurrency:
"""
Representation in Object of Model ParkingOcurrency
"""
def __init__(self, paid: bool, left: bool, auto: Type[Automobilie]):
self._id = None
self._time =... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,902 | johnatasr/CoolPark | refs/heads/master | /parking/models.py | from django.db import models
from django.core.cache import cache
from django.utils import timezone
from automobilies.models import Automobilie
# Create your models here.
class ParkingOcurrency(models.Model):
time = models.CharField("Time elapsed", max_length=244, null=True, blank=True)
entry = models.DateTim... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,903 | johnatasr/CoolPark | refs/heads/master | /automobilies/tests/tests_entities.py | from automobilies.entities import Automobilie
from django.test import TestCase
class AutomobilieEntityTestCase(TestCase):
"""
Tests of Automobilie in automobilies.entities.py
"""
def setUp(self):
self.auto_one = Automobilie(plate="ABC-1234")
self.auto_two = Automobilie(plate="CBA-432... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,904 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_serializers.py | from parking.entities import ParkingOcurrency
from parking.models import ParkingOcurrency as ParkingOcurrencyModel
from parking.serializers import DefaultSerializer, HistoricSerializer
from automobilies.models import Automobilie
from django.test import TestCase
class DefaultSerializerTestCase(TestCase):
"""
T... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,905 | johnatasr/CoolPark | refs/heads/master | /parking/factories.py | from .repository import ParkRepo
from .iterators import (
CheckInIterator,
CheckOutIterator,
DoPaymentIterator,
HistoricIterator,
)
from .validators import ParkValidator
from .serializers import DefaultSerializer, HistoricSerializer
from typing import Any
class ParkFactory:
@staticmethod
def c... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,906 | johnatasr/CoolPark | refs/heads/master | /parking/tests/tests_repo.py | from parking.models import ParkingOcurrency as ParkingOcurrencyModel
from automobilies.models import Automobilie
from parking.entities import ParkingOcurrency
from parking.repository import ParkRepo
from django.test import TestCase
class ParkingRepoTestCase(TestCase):
"""
Tests of ParkRepo in parking.reposito... | {"/automobilies/tests/tests_models.py": ["/automobilies/models.py"], "/parking/tests/tests_entities.py": ["/automobilies/entities.py", "/parking/entities.py"], "/parking/validators.py": ["/parking/helpers.py"], "/parking/tests/tests_factories.py": ["/parking/factories.py"], "/parking/tests/tests_helpers.py": ["/parking... |
4,907 | JackLorentz/Genetic-K-means-with-Spark | refs/heads/master | /Main.py | from Kmeans import Kmeans
from Genetic_Kmeans import Genetic_Kmeans, Chromosome
import sys
import random
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from sklearn import datasets
from sklearn.decomposition import PCA
from sklearn.preprocessing i... | {"/Main.py": ["/Kmeans.py", "/Genetic_Kmeans.py"]} |
4,908 | JackLorentz/Genetic-K-means-with-Spark | refs/heads/master | /GKA_spark_testing.py | #import findspark
#findspark.init()
import sys
import pyspark
from pyspark import SparkContext, SparkConf
#from pyspark.sql import SparkSession
conf = SparkConf().setAppName("GKA_test").setMaster("local[*]")
sc = SparkContext(conf=conf)
import pandas as pd
import numpy as np
import random
import math
impo... | {"/Main.py": ["/Kmeans.py", "/Genetic_Kmeans.py"]} |
4,909 | JackLorentz/Genetic-K-means-with-Spark | refs/heads/master | /kmeans_spark_testing.py | from __future__ import print_function
import sys
import time
import numpy as np
from pyspark.sql import SparkSession
from pyspark import SparkContext
from pyspark import SparkConf
def parseVector(line):
return np.array([float(x) for x in line.split(',')])
def closestPoint(p, centers):
bestIndex ... | {"/Main.py": ["/Kmeans.py", "/Genetic_Kmeans.py"]} |
4,910 | JackLorentz/Genetic-K-means-with-Spark | refs/heads/master | /Genetic_Kmeans.py | import pandas as pd
import numpy as np
import random
import math
import time
import matplotlib.colors as colors
from sklearn import datasets
from sklearn.preprocessing import normalize
from sklearn.metrics import davies_bouldin_score
from sklearn.metrics.cluster import adjusted_rand_score, silhouette_score
... | {"/Main.py": ["/Kmeans.py", "/Genetic_Kmeans.py"]} |
4,911 | JackLorentz/Genetic-K-means-with-Spark | refs/heads/master | /Kmeans.py | import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import time
import random
import copy
from math import sqrt
random.seed(0)
class Kmeans:
def cen_init(self, k, x):
center = np.empty([k, x.shape[1]])
selected = random.sampl... | {"/Main.py": ["/Kmeans.py", "/Genetic_Kmeans.py"]} |
4,912 | Sreehariskj/djangoTodo | refs/heads/master | /core/urls.py | from django.urls import path
from .views import home,update,delete
urlpatterns=[
path('',home,name ='home'),
path('update/<int:todo_id>/',update,
name ='update'),
path('delete/<int:todo_id>/',delete,
name = 'delete'),
] | {"/core/urls.py": ["/core/views.py"], "/core/views.py": ["/core/forms.py"]} |
4,913 | Sreehariskj/djangoTodo | refs/heads/master | /core/views.py | from django.shortcuts import render,redirect
from core.forms import TodoForm
from core.models import Todo
def home(request):
form = TodoForm()
todos = Todo.objects.all()
if request.method == 'POST':
form = TodoForm(request.POST)
if form.is_valid():
form.save()
return... | {"/core/urls.py": ["/core/views.py"], "/core/views.py": ["/core/forms.py"]} |
4,914 | Sreehariskj/djangoTodo | refs/heads/master | /core/forms.py | from django import forms
from core.models import Todo
class TodoForm(forms.ModelForm):
class Meta:
model =Todo
fields = '__all__'
widgets = {
'title': forms.TextInput(attrs={'class': 'form-control'}),
} | {"/core/urls.py": ["/core/views.py"], "/core/views.py": ["/core/forms.py"]} |
4,936 | konitaku/unit-converter | refs/heads/master | /converter.py | from decimal import Decimal, ROUND_HALF_UP
def convert(num: float, init_unit: str, change_unit: str) -> int:
result = 0
if init_unit == "m":
cv_rate = {
"m": 1,
"mile": 1/1609,
"yard": 1.09,
"feet": 3.281,
"inch": 39.370
}
res... | {"/server.py": ["/converter.py"]} |
4,937 | konitaku/unit-converter | refs/heads/master | /server.py | from flask import Flask, render_template
from flask_wtf import FlaskForm
from wtforms import StringField, SelectField
from wtforms.validators import DataRequired
from converter import convert
import os
app = Flask(__name__)
app.config["SECRET_KEY"] = os.environ.get("SECRET_KEY")
class ConvertForm(FlaskForm):
num... | {"/server.py": ["/converter.py"]} |
4,939 | bioinfoUQAM/CASTOR_KRFE | refs/heads/master | /analyzer.py |
##########################################################################################
### Resources ###
### https://biopython.org/docs/1.75/api/Bio.pairwise2.html ###
### https://biocheminsider.com/difference-... | {"/analyzer.py": ["/data.py", "/kmers.py"], "/main.py": ["/ml.py", "/krfe.py", "/analyzer.py", "/configuration.py"], "/krfe.py": ["/ml.py", "/data.py", "/kmers.py", "/matrix.py"], "/ml.py": ["/data.py", "/kmers.py", "/matrix.py"]} |
4,940 | bioinfoUQAM/CASTOR_KRFE | refs/heads/master | /matrix.py | import numpy
from joblib import Parallel, delayed
from collections import defaultdict
# Function to compute the count of each k-mer in a sequence
def computeSequenceVector(d, k):
sequence = d[1]
vector = defaultdict(int)
for j in range(len(sequence) - k + 1):
kmer = sequence[j:j+k]
vector[... | {"/analyzer.py": ["/data.py", "/kmers.py"], "/main.py": ["/ml.py", "/krfe.py", "/analyzer.py", "/configuration.py"], "/krfe.py": ["/ml.py", "/data.py", "/kmers.py", "/matrix.py"], "/ml.py": ["/data.py", "/kmers.py", "/matrix.py"]} |
4,941 | bioinfoUQAM/CASTOR_KRFE | refs/heads/master | /main.py | # Imports
import ml
import sys
import krfe
import analyzer
import configuration
# Main program loop
while(True):
# Display the menu
print("\n#######################")
print("##### CASTOR-KRFE #####")
print("#######################")
print("\n1) Extract k-mers\n2) Fit a model\n3) Predict a sequences\n4) Motif anal... | {"/analyzer.py": ["/data.py", "/kmers.py"], "/main.py": ["/ml.py", "/krfe.py", "/analyzer.py", "/configuration.py"], "/krfe.py": ["/ml.py", "/data.py", "/kmers.py", "/matrix.py"], "/ml.py": ["/data.py", "/kmers.py", "/matrix.py"]} |
4,942 | bioinfoUQAM/CASTOR_KRFE | refs/heads/master | /krfe.py | # Imports
import ml
import sys
import data
import kmers
import numpy
import time
import matrix
import matplotlib.pyplot as plt
from operator import itemgetter
from sklearn.model_selection import cross_validate
from sklearn.metrics import make_scorer, f1_score
from sklearn.feature_selection import SelectFromModel
from s... | {"/analyzer.py": ["/data.py", "/kmers.py"], "/main.py": ["/ml.py", "/krfe.py", "/analyzer.py", "/configuration.py"], "/krfe.py": ["/ml.py", "/data.py", "/kmers.py", "/matrix.py"], "/ml.py": ["/data.py", "/kmers.py", "/matrix.py"]} |
4,943 | bioinfoUQAM/CASTOR_KRFE | refs/heads/master | /data.py | # Import
import Bio.SeqIO
# Function to load test data from a fasta file
def loadData(file_path):
# Initialize the data matrix
D = []
# Iterate through the fasta file
for record in Bio.SeqIO.parse(file_path, "fasta"):
# If there is a class label, save id, sequence and class label in the data list
try:
inde... | {"/analyzer.py": ["/data.py", "/kmers.py"], "/main.py": ["/ml.py", "/krfe.py", "/analyzer.py", "/configuration.py"], "/krfe.py": ["/ml.py", "/data.py", "/kmers.py", "/matrix.py"], "/ml.py": ["/data.py", "/kmers.py", "/matrix.py"]} |
4,944 | bioinfoUQAM/CASTOR_KRFE | refs/heads/master | /ml.py | # Imports
import data
import kmers
import joblib
import matrix
from sklearn.svm import SVC
from sklearn.metrics import f1_score
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import classification_report
from sklearn.ensemble import RandomForestClassifier
# Function to instantiate a linear svm cla... | {"/analyzer.py": ["/data.py", "/kmers.py"], "/main.py": ["/ml.py", "/krfe.py", "/analyzer.py", "/configuration.py"], "/krfe.py": ["/ml.py", "/data.py", "/kmers.py", "/matrix.py"], "/ml.py": ["/data.py", "/kmers.py", "/matrix.py"]} |
4,945 | bioinfoUQAM/CASTOR_KRFE | refs/heads/master | /kmers.py | # Import
import re
import Bio.SeqIO
from collections import defaultdict
from joblib import Parallel, delayed
# Define a function to count the occurrences of k-mers in a single sequence
def count_seq(seq, k):
# Create an empty dictionary to store the counts for each k-mer
counts = defaultdict(int)
# Iterate... | {"/analyzer.py": ["/data.py", "/kmers.py"], "/main.py": ["/ml.py", "/krfe.py", "/analyzer.py", "/configuration.py"], "/krfe.py": ["/ml.py", "/data.py", "/kmers.py", "/matrix.py"], "/ml.py": ["/data.py", "/kmers.py", "/matrix.py"]} |
4,946 | bioinfoUQAM/CASTOR_KRFE | refs/heads/master | /configuration.py | # Import
import configparser
# Fonction to get the parameters from the configuration file
def getParameters(configuration_file):
# Initialize the parser
configurationParser = configparser.ConfigParser()
# Read the configuration file
configurationParser.read(configuration_file)
# Get the parameters
parameters = d... | {"/analyzer.py": ["/data.py", "/kmers.py"], "/main.py": ["/ml.py", "/krfe.py", "/analyzer.py", "/configuration.py"], "/krfe.py": ["/ml.py", "/data.py", "/kmers.py", "/matrix.py"], "/ml.py": ["/data.py", "/kmers.py", "/matrix.py"]} |
4,947 | fginter/document-dedup | refs/heads/master | /idx_pbank.py | import get_text
import argparse
import dedup
import scipy.sparse
import gzip
import json
import re
parser = argparse.ArgumentParser(description='Index')
parser.add_argument("--section", default=0, type=int, help='Which part to ask 0...N-1 (default %(default)d)')
parser.add_argument("--all", default=10, type=int, help=... | {"/idx_pbank.py": ["/dedup.py"]} |
4,948 | fginter/document-dedup | refs/heads/master | /dedup.py | import six
assert six.PY3, "Run me with Python3"
import numpy as np
import scipy.sparse
import csr_csc_dot as ccd
import time
import sys
import re
from sklearn.feature_extraction.text import HashingVectorizer
discard_re=re.compile(r"[^a-zA-ZåäöÅÄÖ0-9 ]") #regex to discard characters which are not of our interest
wspa... | {"/idx_pbank.py": ["/dedup.py"]} |
4,955 | oooleemandy/hogwarts_lg4 | refs/heads/master | /podemo1/page/index_page.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from selenium.webdriver.common.by import By
from podemo1.page.addmemberpage import AddMemberPage
from podemo1.page.base_page import BasePage
class IndexPage(BasePage):
_base_url = "https://work.weixin.qq.com/wework_admin/frame#"
def click_add_member(self):
... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,956 | oooleemandy/hogwarts_lg4 | refs/heads/master | /test_selenium/test_js.py | from time import sleep
from selenium import webdriver
class TestJs():
def setup(self):
self.driver = webdriver.Chrome()
self.driver.implicitly_wait(5)
self.driver.maximize_window()
def teardown(self):
self.driver.quit()
def test_js_scroll(self):
self.driver.get("ht... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,957 | oooleemandy/hogwarts_lg4 | refs/heads/master | /test_pytest/tests/test_calc.py | import yaml
from test_pytest.core.calc import Calc
import pytest
import allure
'''yaml文件驱动'''
def load_data(path='data.yaml'):
with open(path) as f:
data = yaml.safe_load(f)
keys = ",".join(data[0].keys())
values = [d.values() for d in data]
return {'keys':keys,'values':val... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,958 | oooleemandy/hogwarts_lg4 | refs/heads/master | /test_selenium/test_cssss.py | from selenium import webdriver
from selenium.webdriver.common.by import By
class TestCSSS():
def setup(self):
self.driver = webdriver.Chrome()
self.driver.get("https://www.baidu.com/")
def test_fnd(self):
self.driver.find_element(By.XPATH, '//*[@id="kw"]').send_keys("Hogwarts")
... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,959 | oooleemandy/hogwarts_lg4 | refs/heads/master | /201024homework/Class12345.py | # 1、定义人类 属性有姓名年龄体重 方法有吃饭睡觉加班
class Person():
def __init__(self,name,age,weight):
self.name = name
self.age = age
self.weight = weight
def eat(self):
print(f"{self.name}在吃饭")
def work(self):
print(f"{self.name}在加班")
def sleep(self):
print(f"{self.name}在睡... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,960 | oooleemandy/hogwarts_lg4 | refs/heads/master | /test_selenium/test_alert.py | from time import sleep
from selenium.webdriver import ActionChains
from test_pytest.base import Base
class TestAlert(Base):
def test_alert(self):
self.driver.get("https://www.runoob.com/try/try.php?filename=jqueryui-api-droppable")
#切换frame,找到”请拖拽我“这个元素所在的frame,用id取出
self.driver.switch_t... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,961 | oooleemandy/hogwarts_lg4 | refs/heads/master | /test_selenium/test_file.py | from time import sleep
from test_pytest.base import Base
class TestFile(Base):
def test_file(self):
'''
1、进入百度图库首页
2、点击加图片按钮
'''
self.driver.get("https://image.baidu.com/")
self.driver.find_element_by_xpath("//*[@id='sttb']/img[1]").click()
self.driver.fin... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,962 | oooleemandy/hogwarts_lg4 | refs/heads/master | /page/Register.py | '''
注册页面
'''
from selenium.webdriver.common.by import By
from page.base_page import BasePage
class Register(BasePage):
def register(self):
self.find(By.ID, "corp_name").send_keys("填写企业名称")
self.find(By.ID,"manager_name").send_keys("管理员姓名")
return True | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,963 | oooleemandy/hogwarts_lg4 | refs/heads/master | /page/base_page.py | '''
放一些公共的方法。页面的一些都会用到的操作
'''
from selenium import webdriver
from selenium.webdriver.remote.webdriver import WebDriver
class BasePage:
#访问的url
_base_url=""
#初始化
#构造方法 会自动调用
def __init__(self,driver:WebDriver=None):
#如果不传driver,每个页面都要初始化一次driver。下面复用driver,而不是每次调用。当testcase很多时不用每次都新初始化driv... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,964 | oooleemandy/hogwarts_lg4 | refs/heads/master | /test_selenium/test_testclick.py | # Generated by Selenium IDE
import shelve
from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By
class TestTestclick():
def setup_method(self, method):
self.driver = webdriver.Chrome()
self.vars = {}
self.driver.implicitly_wait(5)
def teardown_method(se... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,965 | oooleemandy/hogwarts_lg4 | refs/heads/master | /10thstep/test_demo2.py | import requests
from requests.auth import HTTPBasicAuth
class Api:
data={
"method":"get",
"url":"url",
"headers":None,
}
#data 是一个请求信息
def send(self,data:dict):
requests.request(method=data["method"] , url =data["url"] ,headers = data["headers"] ) | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,966 | oooleemandy/hogwarts_lg4 | refs/heads/master | /test_selenium/test_window.py | from time import sleep
from test_pytest.base import Base
class TestWindow(Base):
'''
百度首页-点击登陆-点击立刻注册
'''
def test_window(self):
self.driver.get("https://www.baidu.com/")
self.driver.find_element_by_link_text("登录").click()
#打印出当前窗口
print(self.driver.current_window_han... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,967 | oooleemandy/hogwarts_lg4 | refs/heads/master | /test_selenium/test_wait.py | '''
打开测试人网站
点击分类
查看“最新“是否出现
如果出现了就点击热门
'''
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
class TestWait:
def setup(self):
self.driver=webdriver.Chrome()
... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,968 | oooleemandy/hogwarts_lg4 | refs/heads/master | /201024homework/XuZhu.py | """
定义一个XuZhu类,继承于童姥。虚竹宅心仁厚不想打架。所以虚竹只有一个read(念经)的方法。每次调用都会打印“罪过罪过”
"""
class XuZhu(TongLao):
def read(self):
print("罪过罪过")
tl = XuZhu(1000,200)
tl.see_people('WYZ')
tl.see_people('李秋水')
tl.see_people('丁春秋')
tl.fight_zms(1000,200)
tl.read()
| {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,969 | oooleemandy/hogwarts_lg4 | refs/heads/master | /python_practice/python_class/python_opp.py | #面向对象
class House:
#静态属性 类变量(在类之中,在方法之外)
door = "red"
floor = "white"
#构造函数,在类实例化时直接执行了
def __init__(self):
#在方法中调用类变量,需要加self.
print(self.door)
#实例变量,类当中,方法中,"self.变量名"定义
self.kitchen = "cook"
#定义动态方法
def sleep(self):
#普通变量 在类中 方法中,并且没有self
... | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,970 | oooleemandy/hogwarts_lg4 | refs/heads/master | /10thstep/test_requests.py | import requests
def test_demo():
url ="http://httpbin.ceshiren.com/cookies"
header = {
'User-Agent': 'hogwarts'
}
cookie_data={
"hogwarts": "school",
"teacher":"AD"
}
r=requests.get(url = url,headers = header,cookies=cookie_data)
print(r.request.headers) | {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
4,971 | oooleemandy/hogwarts_lg4 | refs/heads/master | /python1029_alluredemo/result/test_alluredemo_link_issue_case.py | import allure
@allure.link("https://www.baidu.com")
def test_with_link():
print(("这是一条加了链接的测试"))
pass
| {"/podemo1/page/index_page.py": ["/podemo1/page/addmemberpage.py"], "/page/Register.py": ["/page/base_page.py"], "/page/main.py": ["/page/Register.py", "/page/base_page.py"], "/testcase/test_register.py": ["/page/main.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.