index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
56,310
saltant-org/saltant
refs/heads/master
/tasksapi/apps.py
from django.apps import AppConfig class TasksApiConfig(AppConfig): name = "tasksapi" verbose_name = "tasks API"
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,311
saltant-org/saltant
refs/heads/master
/tasksapi/serializers/container_tasks.py
"""Contains serializers for the container tasks models.""" from django.core.exceptions import ValidationError from rest_framework import serializers from tasksapi.models import ContainerTaskInstance, ContainerTaskType from .abstract_tasks import ( AbstractTaskInstanceSerializer, AbstractTaskTypeSerializer, ) ...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,312
saltant-org/saltant
refs/heads/master
/tasksapi/serializers/task_queues.py
"""Contains serializers for task queues.""" from rest_framework import serializers from tasksapi.models import TaskQueue, TaskWhitelist class TaskQueueSerializer(serializers.ModelSerializer): """A serializer for a task type.""" user = serializers.SlugRelatedField(slug_field="username", read_only=True) ...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,313
saltant-org/saltant
refs/heads/master
/tasksapi/models/abstract_tasks.py
"""Models to represent abstract task types and instances. Other task type and task instance models should inherit from these. """ import json from uuid import uuid4 from django.contrib.postgres.fields import JSONField from django.core.exceptions import ValidationError from django.db import models from tasksapi.consta...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,314
saltant-org/saltant
refs/heads/master
/tasksapi/serializers/__init__.py
"""Collect all serializers to "export" from this directory.""" from .container_tasks import ( ContainerTaskTypeSerializer, ContainerTaskInstanceSerializer, ) from .executable_tasks import ( ExecutableTaskTypeSerializer, ExecutableTaskInstanceSerializer, ) from .task_instance_update import ( TaskIns...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,315
saltant-org/saltant
refs/heads/master
/frontend/views/accounts.py
"""Views for accounts.""" from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.views.generic import UpdateView from tasksapi.models import User class UserUpdate(LoginRequiredMixin, UpdateView): """A view for editing one's user info.""" model = User f...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,316
saltant-org/saltant
refs/heads/master
/frontend/views/utils_logs.py
"""Contains helpers for getting task instance logs.""" import os from django.conf import settings import boto3 def get_s3_logs_for_task_instance(job_uuid): """Get logs for a task instance. The text from the job logs will be one long text strings, so no splitting at new lines here. If the project doesn't...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,317
saltant-org/saltant
refs/heads/master
/tasksapi/migrations/0001_initial.py
# Generated by Django 2.1.2 on 2018-12-05 05:50 from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators import django.contrib.postgres.fields.jsonb import django.core.validators from django.db import migrations, models import django.db.models.deletion import django.util...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,318
saltant-org/saltant
refs/heads/master
/tasksapi/views.py
"""Contains view(sets) related to tasks.""" from celery.result import AsyncResult from django.core.exceptions import ObjectDoesNotExist from drf_yasg.utils import swagger_auto_schema from rest_framework import permissions, serializers, viewsets from rest_framework.decorators import action, api_view, permission_classes...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,319
saltant-org/saltant
refs/heads/master
/tasksapi/tests/requests_tests/user_editing_permissions_requests_tests.py
"""Contains tests for user editing permissions.""" from rest_framework import status from rest_framework.test import APITestCase from .utils import ( TEST_CONTAINER_TASK_TYPE_DICT, TEST_EXECUTABLE_TASK_TYPE_DICT, ) # Put info about our fixtures data as constants here NON_ADMIN_USER_AUTH_TOKEN = "02d205bc79d5e...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,320
saltant-org/saltant
refs/heads/master
/frontend/views/tasktypes.py
"""Views for task types.""" from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.views.generic import ( CreateView, DeleteView, DetailView, ListView, UpdateView, ) from tasksapi.constants import CONTAINER_TASK, EXECUTABLE_TASK from tasksapi.mode...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,321
saltant-org/saltant
refs/heads/master
/saltant/urls.py
"""saltant URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,322
saltant-org/saltant
refs/heads/master
/frontend/context_processors.py
"""Give common information to templates.""" import os def export_env_vars(_): """Let templates know about common things.""" data = {} data["DJANGO_BASE_URL"] = os.environ["DJANGO_BASE_URL"] data["FLOWER_URL"] = os.environ["FLOWER_URL"] data["PROJECT_NAME"] = os.environ["PROJECT_NAME"] data["P...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,323
saltant-org/saltant
refs/heads/master
/tasksapi/migrations/0002_auto_20181204_2210.py
# Generated by Django 2.1.2 on 2018-12-05 06:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tasksapi', '0001_initial'), ] operations = [ migrations.AlterField( ...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,324
saltant-org/saltant
refs/heads/master
/tasksapi/paginators.py
"""Contains paginators for the API. See http://www.django-rest-framework.org/api-guide/pagination/ """ from rest_framework.pagination import PageNumberPagination class PageNumberVariableSizePagination(PageNumberPagination): """A paginator that allows for variable page size.""" page_size_query_param = "page...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,325
saltant-org/saltant
refs/heads/master
/tasksapi/serializers/abstract_tasks.py
"""Contains serializers for the abstract tasks models.""" from django.core.exceptions import ValidationError from rest_framework import serializers from tasksapi.models import AbstractTaskInstance, AbstractTaskType from tasksapi.utils import get_allowed_queues_sorted class AbstractTaskTypeSerializer(serializers.Mode...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,326
saltant-org/saltant
refs/heads/master
/saltant/__init__.py
"""Things here get run first. This initializes the Celery app, and makes sure that environment variables are loaded for it. """ from __future__ import absolute_import # for Python 2.x workers import os import warnings import dotenv # Load environment variables from .env file with warnings.catch_warnings(): warn...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,327
saltant-org/saltant
refs/heads/master
/frontend/views/mixins.py
"""Contains CBV mixins for frontend views.""" from frontend.constants import SELECTED_TASK_CLASS from frontend.widgets import JSONEditorWidget from tasksapi.constants import CONTAINER_TASK, EXECUTABLE_TASK class IsAdminOrOwnerOnlyMixin: """Allow access views only for admin or associated object user. This is...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,328
saltant-org/saltant
refs/heads/master
/tasksapi/migrations/0003_auto_20181204_2211.py
# Generated by Django 2.1.2 on 2018-12-05 06:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tasksapi', '0002_auto_20181204_2210'), ] operations = [ migrations.AlterField( model_name='containertasktype', name=...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,329
saltant-org/saltant
refs/heads/master
/tasksapi/tasks/container_tasks.py
"""Contains task functionality for container-based tasks. Note that none of these functions themselves are registered with Celery; instead they are used by other functions which *are* registered with Celery. """ from __future__ import absolute_import from __future__ import division from __future__ import print_functi...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,330
saltant-org/saltant
refs/heads/master
/saltant/celery.py
"""Celery app settings.""" from __future__ import absolute_import # for Python 2.x workers from celery import Celery from saltant import settings from tasksapi.tasks import run_task # Run the celery app app = Celery("saltant") # Set the config options specified in settings app.conf.update( broker_pool_limit=se...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,331
saltant-org/saltant
refs/heads/master
/frontend/constants.py
"""Constants for the frontend.""" from tasksapi.constants import ( CREATED, PUBLISHED, RUNNING, SUCCESSFUL, FAILED, TERMINATED, ) # Use this to translate from weekday number to day of week DATES_LIST = ["Mon", "Tues", "Weds", "Thurs", "Fri", "Sat", "Sun"] # States we care about emphasizing. T...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,332
saltant-org/saltant
refs/heads/master
/tasksapi/models/__init__.py
"""Collect all models to "export" from this directory.""" from .abstract_tasks import AbstractTaskInstance, AbstractTaskType from .container_tasks import ContainerTaskInstance, ContainerTaskType from .executable_tasks import ExecutableTaskInstance, ExecutableTaskType from .task_queues import TaskQueue, TaskWhitelist f...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,333
saltant-org/saltant
refs/heads/master
/frontend/views/taskinstances_create.py
"""Views for creating and cloning task instances. There's a fair amount of complexity with these views, such that it warrants these views having a separate module. """ import json from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import ValidationError from django.http import HttpR...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,334
saltant-org/saltant
refs/heads/master
/tasksapi/models/users.py
"""Contains custom user model.""" from django.contrib.auth.models import AbstractUser from timezone_field import TimeZoneField class User(AbstractUser): """Custom user model.""" time_zone = TimeZoneField(default="America/Vancouver")
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,335
saltant-org/saltant
refs/heads/master
/tasksapi/tasks/executable_tasks.py
"""Contains task functionality for executable-based tasks. Note that none of these functions themselves are registered with Celery; instead they are used by other functions which *are* registered with Celery. """ from __future__ import absolute_import from __future__ import division from __future__ import print_funct...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,336
saltant-org/saltant
refs/heads/master
/tasksapi/tests/__init__.py
"""Import tests here so Django notices them.""" # Comment out any tests you don't want to run from .execution_tests.container_execution_tests import ContainerExecutionTests from .execution_tests.executable_execution_tests import ( ExecutableExecutionTests, ) from .models_tests.queue_permission_attrs_tests import (...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,337
saltant-org/saltant
refs/heads/master
/frontend/views/view_classes.py
"""Contains view classes.""" from django.conf import settings from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.views.generic.base import RedirectView from frontend.constants import SELECTED_TASK_CLASS from tasksapi.constants import CONTAINER_TASK class TaskCl...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,338
saltant-org/saltant
refs/heads/master
/frontend/views/__init__.py
"""Contains views for the frontend.""" # Make stuff in this package visible from .accounts import UserUpdate from .errors import ( BadRequest400, PermissionDenied403, PageNotFound404, ServerError500, ) from .misc import ( Home, About, TaskTypeRedirect, TaskInstanceRedirect, Containe...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,339
saltant-org/saltant
refs/heads/master
/tasksapi/tasks/base_task.py
"""Contains the base task and signal handlers to register with Celery.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from celery import shared_task from celery.signals import ( after_task_publish, task_prerun, task_success, tas...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,340
saltant-org/saltant
refs/heads/master
/frontend/templatetags/color_state.py
"""Add background color to a status.""" import json from django.template import Library from frontend.constants import STATE_COLOR_LIGHTER_DICT register = Library() @register.filter(is_safe=True) def color_state(state): """Add background colour to state text.""" return ( '<span style="background-co...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,341
saltant-org/saltant
refs/heads/master
/frontend/views/misc.py
"""Contains views that don't fit in other modules. The other views usually *directly* act on models, while these either don't, or do it indirectly. I guess "directly" isn't super well defined here, but whatever. """ from datetime import date, timedelta import json from django.contrib.auth.mixins import LoginRequiredM...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,342
saltant-org/saltant
refs/heads/master
/tasksapi/middleware.py
"""Custom middleware for tasksapi.""" from django.utils import timezone from django.utils.deprecation import MiddlewareMixin class TimezoneMiddleware(MiddlewareMixin): """Make saltant timezone aware.""" def process_request(self, request): """Get the timezone from the user's profile. Provide...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,343
saltant-org/saltant
refs/heads/master
/frontend/forms.py
"""Forms for the frontend.""" from django import forms from tasksapi.models import ContainerTaskType, ExecutableTaskType, TaskQueue from .widgets import JSONEditorWidget class BaseTaskInstanceCreateForm(forms.Form): """Base form for creating both types of task instances.""" name = forms.CharField( r...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,344
saltant-org/saltant
refs/heads/master
/tasksapi/models/executable_tasks.py
"""Models to represent task types and instances which run commands directly.""" from django.db import models from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from django.utils import timezone from tasksapi.constants import SUCCESSFUL, FAILED, EXECUTABLE_TASK from tasksapi.t...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,345
saltant-org/saltant
refs/heads/master
/tasksapi/migrations/0006_auto_20181217_1212.py
# Generated by Django 2.1.2 on 2018-12-17 20:12 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tasksapi', '0005_auto_20181211_1415'), ] operations = [ migrations.CreateM...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,346
saltant-org/saltant
refs/heads/master
/frontend/views/queues.py
"""Views for queues.""" from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.views.generic import ( CreateView, DeleteView, DetailView, ListView, UpdateView, ) from tasksapi.models import TaskQueue from .mixins import ( DisableUserSelectForm...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,347
saltant-org/saltant
refs/heads/master
/tasksapi/models/validators.py
"""Contains validators for task models.""" def task_instance_args_are_valid(instance, fill_missing_args=False): """Determines whether a task instance's arguments are valid. The arguments are valid if the instance's argument includes all of its task type's required arguments (but not necessarily the a...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,348
saltant-org/saltant
refs/heads/master
/frontend/urls.py
"""Contains URLs for the front-end.""" from django.contrib.auth import views as auth_views from django.urls import path, reverse_lazy from frontend import views urlpatterns = [ path(r"", views.Home.as_view(), name="home"), path(r"about/", views.About.as_view(), name="about"), path(r"account/", views.User...
{"/tasksapi/tests/execution_tests/executable_execution_tests.py": ["/tasksapi/tasks/__init__.py"], "/tasksapi/utils.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py"], "/frontend/views/taskinstances.py": ["/tasksapi/constants.py", "/tasksapi/models/__init__.py", "/frontend/views/mixins.py", "/frontend/view...
56,349
NikoIina/discord_reddit_bot
refs/heads/main
/discord_bot.py
import discord from discord.ext import commands from config import bot_config, reddit_config from reddit import * bot = commands.Bot(command_prefix=bot_config['prefix']) @bot.event async def on_ready(): print(f'Bot connected as {bot.user}') @bot.event async def on_message(message): if message.content.startsw...
{"/discord_bot.py": ["/config.py", "/reddit.py"], "/reddit.py": ["/config.py"]}
56,350
NikoIina/discord_reddit_bot
refs/heads/main
/config.py
bot_config = { 'token' : 'Your-Discord-Bot-Token', 'bot' : 'BotName', 'id' : id, 'prefix' : 'some-prefix' } reddit_config = { 'client_id' : 'your-app-client-id', 'secret' : 'your-app-secret', 'user_agent' : 'your-user-agent', 'username' : 'your-user-name', 'password' : 'your-passwor...
{"/discord_bot.py": ["/config.py", "/reddit.py"], "/reddit.py": ["/config.py"]}
56,351
NikoIina/discord_reddit_bot
refs/heads/main
/reddit.py
import praw from config import reddit_config import pandas as pd reddit = praw.Reddit(client_id=reddit_config['client_id'], client_secret = reddit_config['secret'], user_agent = reddit_config['user_agent'], username= reddit_config['username'...
{"/discord_bot.py": ["/config.py", "/reddit.py"], "/reddit.py": ["/config.py"]}
56,373
dkgee/tkspam3
refs/heads/master
/geo/cfg.py
""" 配置的config文件 """ # firefox config is_headless=False # user config username='15651025913' password='33183319ef' # url index_url=r'http://geo.ckcest.cn/' captcha_url=r'https://sso.ckcest.cn/portal/captchaCode' international_url=r'http://geo.ckcest.cn/scientific/InternationalData/list.html' literature_url=r'http://geo...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,374
dkgee/tkspam3
refs/heads/master
/pytorch/demo02/demo_02.py
# -*- coding: utf-8 -*- from __future__ import print_function, division import os import torch import pandas as pd from skimage import io, transform import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils #Ignore warnings import w...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,375
dkgee/tkspam3
refs/heads/master
/mlap/pca/test_logging.py
# -*- coding: utf-8 -*- import logging # path="name.log" # logging.basicConfig(level=logging.INFO,format='', filename=path, filemode='a') # format = logging.Formatter("%(asctime)s - %(message)s") # logging.info("this is error") logger = logging.getLogger() # logging对象 # fh = logging.FileHandler("test.log") # 文件对象...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,376
dkgee/tkspam3
refs/heads/master
/dlcvae/rabbitmq/demo_producer.py
# -*- coding: utf-8 -*- import pika host_ip ="172.30.154.241" uport="8101" uuser="admin" upass="123456" virtual_host="/" credentials = pika.PlainCredentials(uuser, upass) connection = pika.BlockingConnection(pika.ConnectionParameters(host=host_ip,port=uport,virtual_host=virtual_host, credentials=credentials)) channe...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,377
dkgee/tkspam3
refs/heads/master
/dlcvae/vcode/csv_to_xls.py
# -*- coding: utf-8 -*- # py-version: Python 3.7 # requirement: csv、openpyxl # description:将csv文件导出至Excel保存,每超过65536行,新建一个sheet保存 # author: jht # date: 2018-12-12 09:34 import csv from openpyxl import Workbook csv_file_path = "D:/bootleg.csv" # csv文件保存路径 xls_file_path = "D:/target.xlsx" # Excel文件保存路径 sh...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,378
dkgee/tkspam3
refs/heads/master
/dlcvae/rabbitmq/demo_consumer.py
# -*- coding: utf-8 -*- import pika host_ip ="172.30.154.241" uport="8101" uuser="admin" upass="123456" virtual_host="/" credentials = pika.PlainCredentials(uuser, upass) connection = pika.BlockingConnection(pika.ConnectionParameters(host=host_ip,port=uport,virtual_host=virtual_host, credentials=credentials)) channe...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,379
dkgee/tkspam3
refs/heads/master
/dlcvae/tf/tutorial/fashion_mnist_p2.py
# -*- coding: utf-8 -*- #基本训练 # Tensorflow and tf.keras import tensorflow as tf from tensorflow import keras import os # Helper libraries import numpy as np import matplotlib.pyplot as plt print('Tensorflow Version: %s'%tf.__version__) #step01:导入Fashion MNIST数据集 fashion_mnist = keras.datasets.fashion_mnist # 从文件中读取...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,380
dkgee/tkspam3
refs/heads/master
/geo/auto_gxr_v3.py
# -*- coding: utf-8 -*- """ Created on Thu May 10 14:33:16 2018 """ # import time import sys sys.path.append(r'../../tkspam3') import geo.cfg as cfg from splinter import Browser from pil.lib.geo_predict import crack_captcha class Geo: def __init__(self): if cfg.is_headless: self.driver=Browser("firefox", he...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,381
dkgee/tkspam3
refs/heads/master
/mlap/pca/test_demo01.py
# -*- coding: utf-8 -*- import time import logging from sklearn.datasets import fetch_olivetti_faces from sklearn.model_selection import train_test_split import numpy as np import matplotlib.pyplot as plt #logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s') logger = logging.getLogger() sh = logg...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,382
dkgee/tkspam3
refs/heads/master
/pil/lib/svm_train.py
""" SVM示例: - http://www.cnblogs.com/Finley/p/5329417.html """ from pil.lib.svm_lib.svm import svm_problem, svm_parameter from pil.lib.svm_lib.svmutil import * def svm_model_train(train_file_name, model_path): """ 使用图像的特征文件 来训练生成model文件 :return: """ y, x = svm_read_problem(train_file_name) mod...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,383
dkgee/tkspam3
refs/heads/master
/dlcvae/vcode/gsxt_1811/generate_word_img.py
# -*- coding: utf-8 -*- import os import pygame import io from PIL import Image def yStart(grey): m,n = grey.size for j in range(n): for i in range(m): if grey.getpixel((i,j)) == 0: return j def yEnd(grey): m,n = grey.size for j in range(n-1,-1,-1): for i ...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,384
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/test_jieba_classification.py
# -*- coding: utf-8 -*- import pickle import os import jieba from sklearn.datasets.base import Bunch from sklearn.feature_extraction.text import TfidfTransformer from sklearn.feature_extraction.text import TfidfVectorizer def savefile(savepath, content): #保存至文件 fp = open(savepath, "w", encoding="utf-8") fp...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,385
dkgee/tkspam3
refs/heads/master
/pil/lib/img_tools.py
# -*- coding: utf-8 -*- import cv2 def get_clear_bin_image(imgBuf): img = cv2.imdecode(imgBuf, cv2.IMREAD_COLOR) #step01 灰阶二值化处理 img = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) #灰值化 img = cv2.adaptiveThreshold(img, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 21, 1)#二值化 #step02 清理边框 h, ...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,386
dkgee/tkspam3
refs/heads/master
/pil/lib/geo_predict.py
# -*- coding: utf-8 -*- """ 在训练结束后,一个完整的hack流程: 1. 从网站动态请求相应的验证文件 #. 进行图像预处理 #. 将图像进行分割成最小基本单位 #. 计算出本图像的特征 #. 使用SVM训练好的模型进行对新的验证图片来做结果预测 """ import time import requests import numpy as np import cv2 import random from PIL import Image from pil.lib.img_tools import get_clear_bin_image, get_crop_imgs, get_label_by_...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,387
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/bayes/Nbayes_lib.py
# -*- coding: utf-8 -*- import numpy as np def loadDataSet(): #训练集文本 postingList = [['my','dog','has','flea','problems','help','please'], ['maybe','not','take','him','to','dog','park','stupid'], ['my','dalmation','is','so','cute','I','love','him','my'], ['stop','posting','stupid','wort...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,388
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/test_lxml.py
# -*- coding: utf-8 -*- from lxml import html path = "D:\\test\\dream.html" content = open(path, "rb").read() page = html.document_fromstring(content) #解析文件 text = page.text_content() #去除所有标签 print(text)
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,389
dkgee/tkspam3
refs/heads/master
/pytorch/demo02/Rescale.py
# -*- coding: utf-8 -*- import torch import numpy as np import torchvision.transforms as transforms import matplotlib.pyplot as plt class Rescale(object): """Rescale the image in a sample to a given size. Args: output_size (tuple or int): Desired output size. If tuple, output is matched to...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,390
dkgee/tkspam3
refs/heads/master
/faceai/test_detact_face.py
# -*- coding: utf-8 -*- import cv2 # filepath = 'data/angelababy.png' # 能够识别 # filepath = 'data/jp.png' # 能识别 # filepath = 'data/jp2.png' # 未识别出来,可能原因裸露皮肤太多 # filepath = 'data/jp3.png' # 识别错误,裸露皮肤太多 # filepath = 'data/jp22.png' # 未识别出来,可能原因是脸被头发遮挡 # filepath = 'data/jp33.png' # 未识别出来,可能原因是脸被头发遮挡 # fil...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,391
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/test_wrd_testvector.py
# -*- coding: utf-8 -*- import pickle from sklearn.datasets.base import Bunch from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import TfidfTransformer def readbunchobj(path): file_obj = open(path, "rb") bunch = pickle.load(file_obj) file_obj.close() ret...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,392
dkgee/tkspam3
refs/heads/master
/pil/vcodepretreat.py
# -*- coding: utf-8 -*- from PIL import Image from fnmatch import fnmatch from os.path import join import cv2 import os # # pytesseract.pytesseract.tesseract_cmd = r'D:\\tesseract-ocr\\tesseract.exe' # tessdata_dir_config = '--tessdata-dir "D:\\tesseract-ocr\\tessdata" -psm 10' def _get_dynamic_binary_image(img_src_...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,393
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/test_jieba.py
# -*- coding: utf-8 -*- import sys import os import jieba # seg_list=jieba.cut("小明1995年毕业于北京清华大学", cut_all=False) # print("DefaultMode:","".join(seg_list)) #默认切分 # # seg_list=jieba.cut("小明1995年毕业于北京清华大学") # print(" ".join(seg_list)) ##分析效果比较自然,相比较全切分,比较粗糙 # seg_list=jieba.cut("小明1995年毕业于北京清华大学", cut_all=True) # pri...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,394
dkgee/tkspam3
refs/heads/master
/pil/vcode.py
# -*- coding: utf-8 -*- import numpy as np import requests import pytesseract import os import cv2 import lib.img_tools as imgtool pytesseract.pytesseract.tesseract_cmd = r'D:\\tesseract-ocr\\tesseract.exe' tessdata_dir_config = '--tessdata-dir "D:\\tesseract-ocr\\tessdata" -psm 10' #下载验证码图片 def downloads_pic(pic...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,395
dkgee/tkspam3
refs/heads/master
/tw/tweet_test.py
# -*- coding: utf-8 -*- # from twitterscraper import query_tweets # import os # import socks # proxy=(socks.SOCKS5, "127.0.0.1", "1080") # os.environ["HTTPS_PROXY"] = "https://161.202.226.195:8123/" # os.environ["HTTPS_PROXY"] = "https://61.118.35.94:55725/" # if __name__ == '__main__': # list_of_tweets = query...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,396
dkgee/tkspam3
refs/heads/master
/geo/ygyx.py
# -*- coding: utf-8 -*- """ Created on Thu May 10 14:33:16 2018 @author: JIANGHOU """ import time from splinter import Browser from selenium import webdriver browser = Browser() url='http://geo.ckcest.cn/' browser.visit(url) #人工登陆 #遥感影像 browser.visit('http://geo.ckcest.cn/scientific/InternationalData/list.html') #然...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,397
dkgee/tkspam3
refs/heads/master
/geo/auto_gxr2.py
# -*- coding: utf-8 -*- """ Created on Thu May 10 14:33:16 2018 """ # import time from splinter import Browser from selenium import webdriver class Geo: # 输出用户名 xxxx # 输入密码 xxxxx # 验证码 xxxx def login(self): print("》》》》》》》》》》》》》》首页开始登录(您有 20s 时间输入用户名、密码、验证码).....") self.driver=Browser("firefox") br=self....
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,398
dkgee/tkspam3
refs/heads/master
/pil/lib/svm_features.py
""" 将图片的像素信息,利用特征工程,降维 为 特征列表文件 """ import os from os.path import join from PIL import Image def get_feature(img): """ 获取指定图片的特征值, 1. 按照每排的像素点,高度为10,然后宽度为6,总共16个维度 1. 按照每排的像素点,高度为42,然后宽度为16,总共58个维度 2. 计算每个维度(行 或者 列)上有效像素点的和 :type img: Image :return:一个维度为16的列表 """ width, height =...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,399
dkgee/tkspam3
refs/heads/master
/faceai/test_detact_face_dlib.py
# -*- coding: utf-8 -*- import cv2 import dlib # path = "data/angelababy.png" #能识别 #path = "data/jp.png" #能识别 # path = "data/jp2.png" #能识别 # path = "data/jp3.png" #能识别 # path = "data/jp22.png" #能识别 # path = "data/jp33.png" #能识别 # path = "data/ldh.png" #能识别 # path = "data/zxc.png" #能识别 # path = "data/ldh....
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,400
dkgee/tkspam3
refs/heads/master
/dlcvae/ch06/opencv_demo1.py
# -*- coding: utf-8 -*- import cv2 #### demo1 # color_img = cv2.imread('test_120x40.jpg') # print(color_img.shape) # gray_img = cv2.imread('test_120x40.jpg', cv2.IMREAD_GRAYSCALE) # print(gray_img.shape) # cv2.imwrite('test_grayscale.jpg', gray_img) # reload_grayscale = cv2.imread('test_grayscale.jpg') # print(reload...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,401
dkgee/tkspam3
refs/heads/master
/dlcvae/ch05/numpy_demo.py
# -*- coding: utf-8 -*- import numpy as np import numpy.random as random # array 数组,numpy中最基本的数据结构 ## 一维数组 # a = [1,2,3,4] # b = np.array(a) # print(b) # print(type(b)) # print(b.shape) # b的维度 # print(b.argmax()) # b中最大值的索引 # print(b.max()) #返回b中最大值 # print(b.mean()) #返回b中平均值 ##二维数组 # c = [[1,7], [3,4], [5,6]] # ...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,402
dkgee/tkspam3
refs/heads/master
/dlcvae/mxnet/ndarray_01.py
# -*- coding: utf-8 -*- from mxnet import nd x = nd.arange(12) print(x) print(x.shape) print(x.size) x = x.reshape((3, 4)) print(x) y = nd.zeros((2, 3, 4)) print(y) z = nd.ones((3, 4)) print(z) yy = nd.array([[2,1,4,3],[1,2,3,4],[4,3,2,1]]) print(yy) xx = nd.random.normal(0, 1, (3, 4)) print(xx) zz = x + yy pri...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,403
dkgee/tkspam3
refs/heads/master
/faceai/test_ocr.py
# -*- coding: utf-8 -*- from PIL import Image import pytesseract path = "data/text-img.png" text = pytesseract.image_to_string(Image.open(path), lang='chi_sim') print(text)
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,404
dkgee/tkspam3
refs/heads/master
/dlcvae/tf/tutorial/fashion_mnist.py
# -*- coding: utf-8 -*- #基本训练 # Tensorflow and tf.keras import tensorflow as tf from tensorflow import keras import os # Helper libraries import numpy as np import matplotlib.pyplot as plt print('Tensorflow Version: %s'%tf.__version__) #step01:导入Fashion MNIST数据集 fashion_mnist = keras.datasets.fashion_mnist (train_i...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,405
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/test_wrd_naivebayes.py
# -*- coding: utf-8 -*- import pickle from sklearn.naive_bayes import MultinomialNB def readbunchobj(path): file_obj = open(path, "rb") bunch = pickle.load(file_obj) file_obj.close() return bunch ##写入bunch对象 def writebunchobj(path, bunchobj): file_obj = open(path, "wb") pickle.dump(bunchobj,...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,406
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/test_jieba_bunch.py
# -*- coding: utf-8 -*- from sklearn.datasets.base import Bunch import os import pickle def readfile(path): #读取文件 fp = open(path, "rb") content = fp.read().decode('utf-8') fp.close() return content # Bunch类提供一种key,value的对象形式 # target_name:所有分类集名称列表 # label: 每个文件的分类标签列表 # filenames: 文件路径 # contents: 分...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,407
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/knn/test_knn.py
# -*- coding: utf-8 -*- from numpy import * import operator from mlap.text_classification.bayes.Nbayes_lib import * k = 3 #夹角余弦距离公式 def cosdist(vector1, vector2): return dot(vector1, vector2) /(linalg.norm(vector1) * linalg.norm(vector2)) #kNN分类器 #测试集:testdata;训练集:trainSet;类别标签:listClasses;k:k个邻居数 def classify(t...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,408
dkgee/tkspam3
refs/heads/master
/faceai/test_img.py
# -*- coding: utf-8 -*- import cv2 filepath = "data/girl.png" img = cv2.imread(filepath) cv2.namedWindow('Girl') cv2.imshow('Girl', img) cv2.waitKey(0) cv2.destroyAllWindows()
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,409
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/test_wrd_vector.py
# -*- coding: utf-8 -*- from sklearn.datasets.base import Bunch import pickle from sklearn.feature_extraction.text import TfidfTransformer from sklearn.feature_extraction.text import TfidfVectorizer def readfile(path): #读取文件 fp = open(path, "rb") content = fp.read().decode('utf-8') fp.close() return c...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,410
dkgee/tkspam3
refs/heads/master
/geo/auto.py
# -*- coding: utf-8 -*- """ Created on Thu May 10 14:33:16 2018 """ import time from splinter import Browser from selenium import webdriver browser = Browser() url='http://geo.ckcest.cn/' browser.visit(url) #人工登陆 #文献下载#文献下载 browser.visit('http://geo.ckcest.cn/scientific/literature/techdoc_v.html') #然后跳转到一个页码 li...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,411
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/test_jieba_file.py
# -*- coding: utf-8 -*- import os import sys import jieba def savefile(savepath, content): #保存至文件 fp = open(savepath, "w", encoding="utf-8") fp.write(content) fp.close() def readfile(path): #读取文件 fp = open(path, "rb") content = fp.read().decode('utf-8') fp.close() return content ###主...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,412
dkgee/tkspam3
refs/heads/master
/geo/ttt.py
#coding=utf-8 import time from selenium import webdriver from splinter import Browser # driver=webdriver.Firefox() # driver.get("http://geo.ckcest.cn/") # print(dir(driver)) # remotelist=[1,2,3,4,5,6] # print("====" + str(len(remotelist))) # for i in range(0,len(remotelist)): # print(i) ####### Browser 功能测试 de...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,413
dkgee/tkspam3
refs/heads/master
/pytorch/demo01/demo_tensor.py
# -*- coding: utf-8 -*- from __future__ import print_function import torch ## 声明一个5 x 3且初始值为0的向量 # x = torch.empty(5, 3) # print(x) ## 构建一个随机向量组,随机数是保留4位小数的浮点数 # x = torch.rand(5, 3) # print(x) ## 构建一个零向量,且数据类型为long的矩阵 # x = torch.zeros(5, 3, dtype=torch.long) # print(x) ## 从数据中直接构建一个向量矩阵, 会转换为保留4位浮点精度的数据 # x =...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,414
dkgee/tkspam3
refs/heads/master
/dlcvae/redis/redis_demo.py
# -*- coding: utf-8 -*- import redis # r = redis.Redis(host='172.30.154.242', port=7001) # r.set('name','tk') # print(r.get('name')) # pool = redis.ConnectionPool(host='172.30.154.242', port=7001) # r = redis.Redis(connection_pool=pool) # 1,键值对方式 # r.set('name', 'jht') # print(r.get('name').decode()) #解码redis中...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,415
dkgee/tkspam3
refs/heads/master
/mlap/text_classification/knn/test_vector_location.py
# -*- coding: utf-8 -*- import os from numpy import * import matplotlib.pyplot as plt import operator def createDataSet(): group = array([[1.0, 1.1], [1.0, 1.0], [0, 0], [0, 0.1]]) labels = ['A', 'A', 'B', 'B'] return group, labels dataSet, labels = createDataSet() #绘图 fig = plt.figure() ax = fig.add_su...
{"/pytorch/demo02/demo_02.py": ["/pytorch/demo02/Rescale.py"], "/geo/auto_gxr_v3.py": ["/geo/cfg.py", "/pil/lib/geo_predict.py"], "/pil/lib/geo_predict.py": ["/pil/lib/img_tools.py", "/pil/lib/svm_features.py"], "/mlap/text_classification/knn/test_knn.py": ["/mlap/text_classification/bayes/Nbayes_lib.py"]}
56,424
MaxyLee/Vision-Language-Transformer
refs/heads/main
/callbacks/learning_scheduler.py
from __future__ import absolute_import from __future__ import print_function from keras.callbacks import Callback import keras.backend as K class LearningRateScheduler(Callback): """Learning rate scheduler. # Arguments schedule: a function that takes an epoch index as input (...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,425
MaxyLee/Vision-Language-Transformer
refs/heads/main
/executor.py
import json import os from abc import abstractmethod from datetime import datetime import keras import keras.backend as K from keras.callbacks import ModelCheckpoint, TensorBoard from keras.layers import Input, Lambda from keras.models import Model from keras.optimizers import Adam from callbacks.common import Redire...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,426
MaxyLee/Vision-Language-Transformer
refs/heads/main
/callbacks/eval.py
import keras import numpy as np from loader.loader import get_random_data import cv2 import keras.backend as K from matplotlib.pyplot import cm import spacy import progressbar class Evaluate(keras.callbacks.Callback): """ Evaluation callback for arbitrary datasets. """ def __init__( self, ...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,427
MaxyLee/Vision-Language-Transformer
refs/heads/main
/data/data_process_v2.py
# encoding=utf8 import numpy as np import os from refer import REFER import cv2 import argparse from tqdm import tqdm import json parser = argparse.ArgumentParser(description='Data preparation') parser.add_argument('--data_root', type=str) parser.add_argument('--output_dir', type=str) parser.add_argument('--dataset'...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,428
MaxyLee/Vision-Language-Transformer
refs/heads/main
/loader/loader.py
import numpy as np import cv2 import os import spacy import keras class Generator(keras.utils.Sequence): """ Abstract generator class. """ def __init__( self, data, config, shuffle=True, train_mode=True, ): self.shuffle = shuffle ...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,429
MaxyLee/Vision-Language-Transformer
refs/heads/main
/model/transfromer_model.py
from keras import layers as L from keras_transformer import get_encoder_component, get_decoder_component from keras_multi_head import MultiHeadAttention from keras_pos_embd import TrigPosEmbedding def ref_tf(encoder_input, decoder_input, feat_size, encoder_num=2, decoder_nu...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,430
MaxyLee/Vision-Language-Transformer
refs/heads/main
/vlt.py
import argparse import os import numpy as np import tensorflow as tf from tensorflow.python.client import device_lib from yacs.config import CfgNode as CN from executor import Tester, Trainer, Debugger MODES = ['train', 'test', 'debug'] parser = argparse.ArgumentParser() parser.add_argument('phase', choices=MODES) p...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,431
MaxyLee/Vision-Language-Transformer
refs/heads/main
/model/vlt_model.py
"""YOLO_v3 Model Defined in Keras.""" import tensorflow as tf from keras import backend as K from keras import layers as L from keras.models import Model from model.language_backbone import build_nlp_model from model.transfromer_model import ref_tf, lang_tf_enc from model import utils as utils from model import visua...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,432
MaxyLee/Vision-Language-Transformer
refs/heads/main
/model/language_backbone.py
import tensorflow as tf from keras.layers.recurrent import GRU from keras.layers import Bidirectional, Dense, Lambda, Masking, Dropout, Multiply import keras.backend as K def gru_rnn_module_a(word_embs, rnn_dim, dropout, return_seq): with tf.variable_scope('gru_module'): if dropout > 0.: ...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,433
MaxyLee/Vision-Language-Transformer
refs/heads/main
/model/utils.py
import keras.backend as K import tensorflow as tf def expand_and_tile(x, outsize): x = K.expand_dims(x, axis=1) x = K.expand_dims(x, axis=1) x = K.tile(x, [1, outsize, outsize, 1]) return x def expand_and_tile_1(x, outchannels): x = K.expand_dims(x, axis=-1) x = K.tile(x, [1, 1,...
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,434
MaxyLee/Vision-Language-Transformer
refs/heads/main
/model/visual_backbone.py
# from keras.layers import Conv2D, Add, ZeroPadding2D, ReLU, UpSampling2D, Flatten, Concatenate, MaxPooling2D, Multiply, Input, Lambda, Dense, Dropout, Dot, Reshape, Activation, GlobalAveragePooling2D, AveragePooling2D from functools import reduce from keras.layers import Conv2D, Add, ZeroPadding2D, ReLU from keras....
{"/executor.py": ["/callbacks/eval.py", "/callbacks/learning_scheduler.py", "/loader/loader.py", "/model/vlt_model.py"], "/callbacks/eval.py": ["/loader/loader.py"], "/vlt.py": ["/executor.py"], "/model/vlt_model.py": ["/model/language_backbone.py", "/model/transfromer_model.py"]}
56,438
adrianomiranda14/framework-predictor
refs/heads/main
/cleaning.py
import pandas as pd from helpers import * from collections import Counter import numpy as np from sklearn.naive_bayes import BernoulliNB from sklearn.feature_extraction.text import CountVectorizer from sklearn.model_selection import train_test_split from sklearn.metrics import balanced_accuracy_score from sklearn.metri...
{"/cleaning.py": ["/helpers.py"], "/main.py": ["/helpers.py"]}
56,439
adrianomiranda14/framework-predictor
refs/heads/main
/skill-model.py
import pandas as pd df = pd.read_csv('csv for Predictor/cshr-mappings.gs - Extracted DDaT Roles.csv') print(df)
{"/cleaning.py": ["/helpers.py"], "/main.py": ["/helpers.py"]}
56,440
adrianomiranda14/framework-predictor
refs/heads/main
/model.py
from sklearn.naive_bayes import BernoulliNB from sklearn.feature_extraction.text import CountVectorizer from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.ensemble import RandomForestClassifier vectorizer = CountVectorizer(stop_words='english', binary=...
{"/cleaning.py": ["/helpers.py"], "/main.py": ["/helpers.py"]}
56,441
adrianomiranda14/framework-predictor
refs/heads/main
/main.py
# -*- coding: utf-8 -*- """from google.colab import drive drive.mount('/content/drive')""" import pandas as pd from helpers import * from collections import Counter import numpy as np from sklearn.naive_bayes import BernoulliNB from sklearn.feature_extraction.text import CountVectorizer from sklearn.model_selection i...
{"/cleaning.py": ["/helpers.py"], "/main.py": ["/helpers.py"]}