index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
1,755 | Redent0r/Libra | refs/heads/master | /master_admin.py |
### std lib ###
import sys
import sqlite3
import time
import os
### PyQt4 ###
from PyQt4 import QtCore, QtGui, QtSql
### GUIs ###
from gui_inventory import Ui_MainWindow as InventoryGui
from gui_purchase import Ui_Dialog as PurchaseGui
from gui_sale import Ui_Dialog as SaleGui
from gui_client import Ui... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,756 | Redent0r/Libra | refs/heads/master | /gui_login.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_login.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,757 | Redent0r/Libra | refs/heads/master | /gui_purchase.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_compra.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s)... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,758 | Redent0r/Libra | refs/heads/master | /gui_client.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_cliente.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,759 | Redent0r/Libra | refs/heads/master | /mec_login.py | """
Author:Christopher Holder
Project : Version 1.0(Login)
"""
import sqlite3
import sys
def create_login_table(cursor,connection):#Creates login table.
cursor.execute("CREATE TABLE IF NOT EXISTS login(ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, User TEXT NOT NULL, Pass TEXT NOT NULL,class TEXT NOT NULL... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,760 | Redent0r/Libra | refs/heads/master | /gui_move.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_mover.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,761 | Redent0r/Libra | refs/heads/master | /gui_inventory.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_inventory.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,762 | Redent0r/Libra | refs/heads/master | /main_login.py |
import sys
import sqlite3
from PyQt4 import QtCore, QtGui, QtSql
from gui_login import Ui_Dialog as LoginGui
import master_admin
import mec_login
from mec_login import check_login # tengo que importarlo
class Login(QtGui.QDialog, LoginGui):
def __init__(self, parent=None):
QtGui.QDi... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,763 | Redent0r/Libra | refs/heads/master | /mec_inventory.py |
"""
Author:Christopher Holder
"""
def create_tables(connection,cursor):
"""
This function creates the neccessary tables in the database.
"""
cursor.execute("CREATE TABLE IF NOT EXISTS OrdinalNumber(ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,num TEXT NOT NULL)")
cursor.execute('CREATE... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,764 | Redent0r/Libra | refs/heads/master | /gui_sale.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_venta.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):... | {"/master_admin.py": ["/gui_inventory.py", "/gui_purchase.py", "/gui_sale.py", "/gui_client.py", "/gui_move.py", "/mec_inventory.py"], "/main_login.py": ["/gui_login.py", "/master_admin.py", "/mec_login.py"]} |
1,765 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/models/patent_doctorTb.py | from django.db import models
from .doctors import Doctors
from .patients import Patient
class PatentDoctorTb(models.Model):
'''
we can add extra fields here
'''
doctor = models.ForeignKey(Doctors, blank=False, null=False, on_delete=models.CASCADE)
patient = models.ForeignKey(Patient, blank=False... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,766 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/migrations/0006_alter_patient_doctor.py | # Generated by Django 3.2.8 on 2021-10-28 06:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('necktieapp', '0005_auto_20211028_1129'),
]
operations = [
migrations.AlterField(
model_name='patient',
name='doctor'... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,767 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/migrations/0003_patient.py | # Generated by Django 3.2.8 on 2021-10-27 16:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('necktieapp', '0002_alter_doctors_d_phone'),
]
operations = [
migrations.CreateModel(
name='Pati... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,768 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/models/doctors.py | from django.db import models
from model_utils import Choices
SPECIALIZATIONS = Choices(
("CD", "Cardiology"),
("GS", "General Surgery"),
("EC", "Endocrinology"),
("NT", "Neonatology"),
)
class Doctors(models.Model):
d_surname = models.CharField(max_length=20, blank=True, null=True)
d_firstnam... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,769 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/views/__init__.py | from .doctor_view import DoctorViewset # noqa: F401
from .patient_view import PatientViewset # noqa: F401 | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,770 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/migrations/0004_auto_20211027_2226.py | # Generated by Django 3.2.8 on 2021-10-27 16:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('necktieapp', '0003_patient'),
]
operations = [
migrations.RemoveField(
model_name='patient',
... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,771 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/migrations/0005_auto_20211028_1129.py | # Generated by Django 3.2.8 on 2021-10-28 05:59
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('necktieapp', '0004_auto_20211027_2226'),
]
operations = [
migrations.RenameField(
model_name='doctors',
old_name='d_state',
... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,772 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/serializers/__init__.py | from .doctor_serializer import DoctorSerializer
from .patient_serializer import PatientSerializer | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,773 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/migrations/0002_alter_doctors_d_phone.py | # Generated by Django 3.2.8 on 2021-10-27 16:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('necktieapp', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='doctors',
name='d_phone',
... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,774 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/models/patients.py | from django.db import models
from .doctors import Doctors
class Patient(models.Model):
p_surname = models.CharField(max_length=20, blank=True, null=True)
doctor = models.ManyToManyField(Doctors, through="PatentDoctorTb", null=True, blank=True)
p_fullname = models.CharField(max_length=20, blank=True, null... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,775 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/views/patient_view.py | from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import viewsets, filters
from rest_framework.permissions import IsAuthenticated
from necktieapp.models import Patient
from necktieapp.serializers import PatientSerializer
class PatientViewset(viewsets.ModelViewSet):
permission_class... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,776 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/admin.py | from django.contrib import admin
from .models import Doctors, Patient, PatentDoctorTb
admin.site.register(Doctors)
admin.site.register(Patient)
admin.site.register(PatentDoctorTb)
| {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,777 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/urls.py | from rest_framework.routers import DefaultRouter
from django.conf.urls import url, include
from necktieapp import views
router = DefaultRouter(trailing_slash=False)
router.register(r'doctors', views.DoctorViewset)
router.register(r'patients', views.PatientViewset)
urlpatterns = [
url(r'^v1/', include(router.urls... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,778 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/views/doctor_view.py | from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import viewsets, filters
from rest_framework.permissions import IsAuthenticated
from necktieapp.models import Doctors
from necktieapp.serializers import DoctorSerializer
class DoctorViewset(viewsets.ModelViewSet):
permission_classes... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,779 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/management/commands/bulk_create.py | import random
import string
from django.core.management.base import BaseCommand
from django.utils.crypto import get_random_string
from necktieapp.models import Doctors
sample_data = {
'd_surname': get_random_string(),
'd_firstname': get_random_string(),
'd_username': "",
'd_phone': get_random_string(... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,780 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/tests/test_doctors.py | from django.test import TestCase, TransactionTestCase
from necktieapp.models import Doctors
sample_data = {
'd_surname': "sudheer",
'd_firstname': "mandi",
'd_username': "smre",
'd_phone': "7702231789",
'd_address': "Ramalingapuram",
'd_country': "India",
'd_specialization': "CD",
'd_pi... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,781 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/serializers/doctor_serializer.py | from rest_framework import serializers
from necktieapp.models import Doctors
class DoctorSerializer(serializers.ModelSerializer):
class Meta:
model = Doctors
fields = "__all__" | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,782 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/migrations/0001_initial.py | # Generated by Django 3.2.8 on 2021-10-27 15:55
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Doctors',
fields=[
('id', models.BigAutoFie... | {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,783 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/apps.py | from django.apps import AppConfig
class NecktieappConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'necktieapp'
| {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,784 | sudheermouni/NeckTie | refs/heads/main | /Necktie/necktieapp/models/__init__.py | from .doctors import Doctors
from .patients import Patient
from .patent_doctorTb import PatentDoctorTb
| {"/Necktie/necktieapp/models/patent_doctorTb.py": ["/Necktie/necktieapp/models/doctors.py", "/Necktie/necktieapp/models/patients.py"], "/Necktie/necktieapp/views/__init__.py": ["/Necktie/necktieapp/views/doctor_view.py", "/Necktie/necktieapp/views/patient_view.py"], "/Necktie/necktieapp/serializers/__init__.py": ["/Nec... |
1,789 | guanjz20/MM21_FME_solution | refs/heads/master | /dataset/params.py | SAMM_ROOT = '/data/gjz_mm21/SAMM'
CASME_2_LABEL_DIR = '/data/gjz_mm21/CASME_2_LongVideoFaceCropped/CASME_2_longVideoFaceCropped/labels'
# kernel path
GAUSS_KERNEL_PATH = {
'sm_kernel': '/home/gjz/lry_kernels/gauss2D-smooth.npy',
'dr1_kernel': '/home/gjz/lry_kernels/gauss1D-derivative1.npy',
'dr2_kernel': '... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,790 | guanjz20/MM21_FME_solution | refs/heads/master | /utils.py | import os
import sys
import cv2
from timm.utils import reduce_tensor
import torch
import shutil
import numpy as np
import os.path as osp
import torch.nn.functional as F
import matplotlib.pyplot as plt
import torch.distributed as dist
from torch.nn.modules import loss
from datetime import datetime
import paths
import d... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,791 | guanjz20/MM21_FME_solution | refs/heads/master | /paths.py | # SAMM
SAMM_ROOT = '/data/gjz_mm21/SAMM'
SAMM_LABEL_DIR = SAMM_ROOT
SAMM_VIDEO_DIR = '/data/gjz_mm21/SAMM/SAMM_longvideos'
# CASME_2
CASME_2_ROOT = '/data/gjz_mm21/CASME_2_LongVideoFaceCropped/CASME_2_longVideoFaceCropped'
CASME_2_LABEL_DIR = '/data/gjz_mm21/CASME_2_LongVideoFaceCropped/CASME_2_longVideoFaceCropped/la... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,792 | guanjz20/MM21_FME_solution | refs/heads/master | /dataset/me_dataset.py | from unicodedata import name
import cv2
import os
import pdb
import torch
import time
import pywt
import glob
import numpy as np
import os.path as osp
from tqdm import tqdm
from torch.utils.data import Dataset
from torch import nn as nn
from . import params
from . import utils
WT_CHANNEL = 4
sm_kernel = np.load(param... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,793 | guanjz20/MM21_FME_solution | refs/heads/master | /model/network.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import glob
import os
import os.path as osp
from torch.serialization import load
class MLP(nn.Module):
def __init__(self, hidden_units, dropout=0.3):
super(MLP, self).__init__()
input_feature_dim = hidden_units[... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,794 | guanjz20/MM21_FME_solution | refs/heads/master | /config.py | import argparse
parser = argparse.ArgumentParser(description="x")
parser.add_argument('--store_name', type=str, default="")
parser.add_argument('--save_root', type=str, default="")
parser.add_argument('--tag', type=str, default="")
parser.add_argument('--snap', type=str, default="")
parser.add_argument('--dataset',
... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,795 | guanjz20/MM21_FME_solution | refs/heads/master | /preprocess/params.py | # CASME_2
CASME_2_ROOT = '/data/gjz_mm21/CASME_2_LongVideoFaceCropped/CASME_2_longVideoFaceCropped'
CASME_2_LABEL_DIR = '/data/gjz_mm21/CASME_2_LongVideoFaceCropped/CASME_2_longVideoFaceCropped/labels'
CASME_2_VIDEO_DIR = '/data/gjz_mm21/CASME_2_LongVideoFaceCropped/CASME_2_longVideoFaceCropped/longVideoFaceCropped'
#... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,796 | guanjz20/MM21_FME_solution | refs/heads/master | /submit.py | import pandas as pd
import numpy as np
import os.path as osp
dataset = 'CASME_2'
# dataset = 'SAMM'
submit_name = 'submit_{}.csv'.format(dataset)
result_dir_name = 'results'
submit_npy_name = 'match_regions_record_all.npy'
submit_id = 'done_exp_cls_ca_20210708-215035'
def convert_key(k, dataset):
if dataset == '... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,797 | guanjz20/MM21_FME_solution | refs/heads/master | /trainer_cls.py | import time
from matplotlib.pyplot import winter
import torch
import torch.nn.functional as F
import numpy as np
import utils
import dataset.utils as dataset_utils
import dataset.params as DATASET_PARAMS
def train(dataloader, model, criterion, optimizer, epoch, logger, args,
amp_autocast, loss_scaler):
... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,798 | guanjz20/MM21_FME_solution | refs/heads/master | /preprocess/casme_2_label_generation.py | '''
generate the emotion intensity of each frame
'''
# %%
import pdb
import os
import os.path as osp
from numpy.core.numeric import ones, ones_like
from numpy.lib.function_base import percentile
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import params
# %% ID2NAME and NAME2ID
# CASME_2_P... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,799 | guanjz20/MM21_FME_solution | refs/heads/master | /preprocess/samm_2_label_generation.py | '''
generate the emotion intensity of each frame
'''
# %%
import os
import pdb
import os.path as osp
from numpy.core.numeric import ones
from numpy.lib.function_base import percentile
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import params
# %% main
anno_dict = {} # intensity
label_dict... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,800 | guanjz20/MM21_FME_solution | refs/heads/master | /preprocess/CNN_feature_extraction.py | from __future__ import division
from typing import Iterable
import cv2
import os
import time
import six
import sys
from tqdm import tqdm
import argparse
import pickle
import torch
import torch.nn as nn
import numpy as np
import pandas as pd
import torch.utils.data
import os.path as osp
import torch.backends.cudnn as cu... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,801 | guanjz20/MM21_FME_solution | refs/heads/master | /preprocess/openface/face_crop_align.py | import os
import os.path as osp
from tqdm import tqdm
from glob import glob
from video_processor import Video_Processor
import params
# OpenFace parameters
save_size = 224
OpenFace_exe = params.OpenFace_exe
quiet = True
nomask = True
grey = False
tracked_vid = False
noface_save = False
# dataset
video_root = params.... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,802 | guanjz20/MM21_FME_solution | refs/heads/master | /model/utils.py | import torch.nn as nn
def init_weights(model):
for k, m in model.named_modules():
if isinstance(m, nn.Conv3d) or isinstance(m, nn.Conv2d):
nn.init.kaiming_normal_(m.weight,
mode='fan_out',
nonlinearity='relu')
#... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,803 | guanjz20/MM21_FME_solution | refs/heads/master | /main_cls.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from genericpath import exists
import os
from typing import Final
import cv2
import sys
from matplotlib.pyplot import xcorr
from numpy.random import f, sample, shuffle
from torch.utils.data import dataset
from config import parser
if len(sys.argv) > 1:
# use shell a... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,804 | guanjz20/MM21_FME_solution | refs/heads/master | /dataset/utils.py | from albumentations.augmentations.transforms import GaussNoise
import cv2
import os
import numpy as np
import os.path as osp
import albumentations as alb
# from torch._C import Ident
# from torch.nn.modules.linear import Identity
class IsotropicResize(alb.DualTransform):
def __init__(self,
max_si... | {"/utils.py": ["/paths.py", "/dataset/utils.py"], "/trainer_cls.py": ["/utils.py", "/dataset/utils.py", "/dataset/params.py"], "/main_cls.py": ["/config.py", "/model/network.py", "/dataset/me_dataset.py", "/utils.py", "/trainer_cls.py"]} |
1,816 | CellProfiling/cpias | refs/heads/master | /cpias/cli/__init__.py | # type: ignore
"""Provide a CLI."""
import logging
import click
from cpias import __version__
from cpias.cli.client import run_client
from cpias.cli.server import start_server
SETTINGS = dict(help_option_names=["-h", "--help"])
@click.group(
options_metavar="", subcommand_metavar="<command>", context_settings=... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,817 | CellProfiling/cpias | refs/heads/master | /cpias/__init__.py | """Provide a server for image analysis."""
from .const import VERSION
from .message import Message
from .server import CPIAServer
__all__ = ["Message", "CPIAServer"]
__version__ = VERSION
| {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,818 | CellProfiling/cpias | refs/heads/master | /cpias/cli/client.py | # type: ignore
"""Provide a CLI to start a client."""
import asyncio
import click
from cpias.cli.common import common_tcp_options
from cpias.client import tcp_client
DEFAULT_MESSAGE = '{"cli": "client-1", "cmd": "hello", "dta": {"planet": "world"}}\n'
@click.command(options_metavar="<options>")
@click.option("--me... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,819 | CellProfiling/cpias | refs/heads/master | /cpias/exceptions.py | """Provide exceptions."""
class CPIASError(Exception):
"""Represent a generic CPIAS exception."""
| {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,820 | CellProfiling/cpias | refs/heads/master | /cpias/commands/__init__.py | """Provide commands to the server."""
from functools import wraps
from types import ModuleType
from typing import Callable, Mapping
import pkg_resources
import voluptuous as vol
from voluptuous.humanize import humanize_error
from cpias.const import LOGGER
from cpias.message import Message
def get_commands() -> Mapp... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,821 | CellProfiling/cpias | refs/heads/master | /cpias/message.py | """Provide a model for messages sent and received by the server."""
from __future__ import annotations
import json
from enum import Enum
from typing import Optional, cast
from .const import LOGGER
class Message:
"""Represent a client/server message."""
def __init__(self, *, client: str, command: str, data:... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,822 | CellProfiling/cpias | refs/heads/master | /cpias/cli/server.py | # type: ignore
"""Provide a CLI to start the server."""
import asyncio
import click
from cpias.cli.common import common_tcp_options
from cpias.server import CPIAServer
@click.command(options_metavar="<options>")
@common_tcp_options
@click.pass_context
def start_server(ctx, host, port):
"""Start an async tcp ser... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,823 | CellProfiling/cpias | refs/heads/master | /cpias/client.py | """Provide a test client for the CPIAServer."""
import asyncio
from cpias.const import LOGGER
async def tcp_client(message: str, host: str = "127.0.0.1", port: int = 8555) -> None:
"""Connect to server and send message."""
reader, writer = await asyncio.open_connection(host, port)
data = await reader.rea... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,824 | CellProfiling/cpias | refs/heads/master | /setup.py | """Set up file for cpias package."""
from pathlib import Path
from setuptools import find_packages, setup
PROJECT_DIR = Path(__file__).parent.resolve()
README_FILE = PROJECT_DIR / "README.md"
LONG_DESCR = README_FILE.read_text(encoding="utf-8")
VERSION = (PROJECT_DIR / "cpias" / "VERSION").read_text().strip()
GITHUB_... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,825 | CellProfiling/cpias | refs/heads/master | /cpias/const.py | """Provide constants for cpias."""
import logging
from pathlib import Path
VERSION = (Path(__file__).parent / "VERSION").read_text().strip()
API_VERSION = "1.0.0"
LOGGER = logging.getLogger(__package__)
| {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,826 | CellProfiling/cpias | refs/heads/master | /cpias/cli/common.py | # type: ignore
"""Provide common CLI options."""
import click
def common_tcp_options(func):
"""Supply common tcp connection options."""
func = click.option(
"-p",
"--port",
default=8555,
show_default=True,
type=int,
help="TCP port of the connection.",
)(func... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,827 | CellProfiling/cpias | refs/heads/master | /cpias/process.py | """Provide process tools."""
import asyncio
import signal
from multiprocessing import Pipe, Process
from multiprocessing.connection import Connection
from time import sleep
from typing import TYPE_CHECKING, Any, Callable, Dict, Tuple
from cpias.const import LOGGER
from cpias.exceptions import CPIASError
if TYPE_CHECK... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,828 | CellProfiling/cpias | refs/heads/master | /cpias/server.py | """Provide an image analysis server."""
import asyncio
import concurrent.futures
import logging
from typing import Any, Callable, Coroutine, Dict, Optional
from .commands import get_commands
from .const import API_VERSION, LOGGER, VERSION
from .message import Message
class CPIAServer:
"""Represent an image analy... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,829 | CellProfiling/cpias | refs/heads/master | /tests/test_message.py | """Provide tests for message."""
from cpias.message import Message
def test_message_decode():
"""Test message decode."""
msg = Message.decode(
'{"cli": "client-1", "cmd": "hello", "dta": {"param1": "world"}}'
)
assert msg.client == "client-1"
assert msg.command == "hello"
assert msg.d... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,830 | CellProfiling/cpias | refs/heads/master | /cpias/commands/hello.py | """Provide the hello command."""
from typing import TYPE_CHECKING, Callable, Optional, Tuple
from cpias.commands import validate
from cpias.const import LOGGER
from cpias.message import Message
from cpias.process import ReceiveError, create_process
if TYPE_CHECKING:
from cpias.server import CPIAServer
# pylint: ... | {"/cpias/cli/__init__.py": ["/cpias/__init__.py", "/cpias/cli/client.py", "/cpias/cli/server.py"], "/cpias/__init__.py": ["/cpias/const.py", "/cpias/message.py", "/cpias/server.py"], "/cpias/cli/client.py": ["/cpias/cli/common.py", "/cpias/client.py"], "/cpias/commands/__init__.py": ["/cpias/const.py", "/cpias/message.... |
1,835 | b2aff6009/crawler | refs/heads/master | /tests/testutils.py | import os
import sys
import inspect
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
import crawler as crawler
def find_gen(baseSettings, tests):
for i, test in enumerate(tests):
settings = baseS... | {"/tests/testutils.py": ["/crawler.py"], "/tests/test_crawler.py": ["/crawler.py"], "/tests/test_googlecrawler.py": ["/crawler.py"], "/tests/test_localcrawler.py": ["/crawler.py"]} |
1,836 | b2aff6009/crawler | refs/heads/master | /tests/test_crawler.py | import pytest
import os
import sys
import inspect
import json
import datetime
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
import crawler as crawler
baseSettings = {
"type": "local",
"memo" : "... | {"/tests/testutils.py": ["/crawler.py"], "/tests/test_crawler.py": ["/crawler.py"], "/tests/test_googlecrawler.py": ["/crawler.py"], "/tests/test_localcrawler.py": ["/crawler.py"]} |
1,837 | b2aff6009/crawler | refs/heads/master | /crawler.py | import os
import json
import time
import sys
def createCrawler(settings, callback = None):
selector = {
"local" : localCrawler,
"google" : googleCrawler,
"git" : gitCrawler
}
return selector[settings.get("type", "local")](settings, callback)
class Crawler:
def __init__(self, s... | {"/tests/testutils.py": ["/crawler.py"], "/tests/test_crawler.py": ["/crawler.py"], "/tests/test_googlecrawler.py": ["/crawler.py"], "/tests/test_localcrawler.py": ["/crawler.py"]} |
1,838 | b2aff6009/crawler | refs/heads/master | /tests/test_googlecrawler.py | import pytest
import os
import sys
import inspect
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
import crawler as crawler
import testutils as tu
baseSettings = {
"type": "google",
"memo" : "./te... | {"/tests/testutils.py": ["/crawler.py"], "/tests/test_crawler.py": ["/crawler.py"], "/tests/test_googlecrawler.py": ["/crawler.py"], "/tests/test_localcrawler.py": ["/crawler.py"]} |
1,839 | b2aff6009/crawler | refs/heads/master | /tests/test_localcrawler.py | import pytest
import os
import sys
import inspect
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
import crawler as crawler
import testutils as tu
baseSettings = {
"type": "local",
"memo" : "./tes... | {"/tests/testutils.py": ["/crawler.py"], "/tests/test_crawler.py": ["/crawler.py"], "/tests/test_googlecrawler.py": ["/crawler.py"], "/tests/test_localcrawler.py": ["/crawler.py"]} |
1,852 | ckjoon/teambuilding | refs/heads/master | /runserver.py | from teambuildingapp import app
app.run(debug=True) | {"/runserver.py": ["/teambuildingapp/__init__.py"], "/teambuildingapp/views.py": ["/teambuildingapp/__init__.py", "/teambuildingapp/db_util.py"], "/teambuildingapp/__init__.py": ["/teambuildingapp/views.py"], "/teambuildingapp/models.py": ["/teambuildingapp/__init__.py"]} |
1,853 | ckjoon/teambuilding | refs/heads/master | /teambuildingapp/views.py | from teambuildingapp import app
from flask import render_template, request, url_for, redirect, session, make_response
from flask_cas import login_required
import os
#from roster_processor import process_roster
from teambuildingapp.db_util import *
@app.route("/")
def main():
return render_template('si... | {"/runserver.py": ["/teambuildingapp/__init__.py"], "/teambuildingapp/views.py": ["/teambuildingapp/__init__.py", "/teambuildingapp/db_util.py"], "/teambuildingapp/__init__.py": ["/teambuildingapp/views.py"], "/teambuildingapp/models.py": ["/teambuildingapp/__init__.py"]} |
1,854 | ckjoon/teambuilding | refs/heads/master | /teambuildingapp/db_util.py | import psycopg2
from teambuildingapp.config import *
def get_user_info(username):
conn = psycopg2.connect(**db)
cur = conn.cursor()
cmd = 'SELECT is_instructor, email, first_name, last_name, comment FROM users WHERE gt_username = \'%s\';'
data = (username)
cur.execute(cmd, data)
... | {"/runserver.py": ["/teambuildingapp/__init__.py"], "/teambuildingapp/views.py": ["/teambuildingapp/__init__.py", "/teambuildingapp/db_util.py"], "/teambuildingapp/__init__.py": ["/teambuildingapp/views.py"], "/teambuildingapp/models.py": ["/teambuildingapp/__init__.py"]} |
1,855 | ckjoon/teambuilding | refs/heads/master | /teambuildingapp/roster_processor.py | import xlrd
import db_util
class RosterProcessor:
def __init__(self, file, class_id=None):
self.file = file
self.students = []
self.class_id = class_id
def process(self):
wb = xlrd.open_workbook(file_contents=self.file)
ws = wb.sheet_by_index(0)
for i in range(... | {"/runserver.py": ["/teambuildingapp/__init__.py"], "/teambuildingapp/views.py": ["/teambuildingapp/__init__.py", "/teambuildingapp/db_util.py"], "/teambuildingapp/__init__.py": ["/teambuildingapp/views.py"], "/teambuildingapp/models.py": ["/teambuildingapp/__init__.py"]} |
1,856 | ckjoon/teambuilding | refs/heads/master | /teambuildingapp/db_setup.py | import psycopg2
from config import *
def setup_tables():
tables = get_tables()
print('Found tables:{}'.format(tables))
if 'users' not in tables:
print('Users table not found, creating one...')
setup_users_table()
if 'classes' not in tables:
print('Classes table not f... | {"/runserver.py": ["/teambuildingapp/__init__.py"], "/teambuildingapp/views.py": ["/teambuildingapp/__init__.py", "/teambuildingapp/db_util.py"], "/teambuildingapp/__init__.py": ["/teambuildingapp/views.py"], "/teambuildingapp/models.py": ["/teambuildingapp/__init__.py"]} |
1,857 | ckjoon/teambuilding | refs/heads/master | /teambuildingapp/__init__.py | from flask import Flask
from flask_cas import CAS
from flask_sqlalchemy import SQLAlchemy
from teambuildingapp import config
import os
app = Flask(__name__)
CAS(app, '/cas') # this adds the prefix '/api/cas/' to the /login and /logout
# routes that CAS provides
#db = SQLAlchemy(app)
app.config.from_py... | {"/runserver.py": ["/teambuildingapp/__init__.py"], "/teambuildingapp/views.py": ["/teambuildingapp/__init__.py", "/teambuildingapp/db_util.py"], "/teambuildingapp/__init__.py": ["/teambuildingapp/views.py"], "/teambuildingapp/models.py": ["/teambuildingapp/__init__.py"]} |
1,858 | ckjoon/teambuilding | refs/heads/master | /teambuildingapp/models.py | from teambuildingapp import app
from flask_sqlalchemy import Model, Column, Integer, String
# Represents a user. User is related to a team by it's team ID'
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True)
email = db.Column(db.String(120), u... | {"/runserver.py": ["/teambuildingapp/__init__.py"], "/teambuildingapp/views.py": ["/teambuildingapp/__init__.py", "/teambuildingapp/db_util.py"], "/teambuildingapp/__init__.py": ["/teambuildingapp/views.py"], "/teambuildingapp/models.py": ["/teambuildingapp/__init__.py"]} |
1,922 | Ashafix/argparse2HTML | refs/heads/master | /blueprints/celery_task.py | import os
import logging
import contextlib
import dill
import binascii
from flask import request, jsonify, Response
from flask import Blueprint, redirect, url_for
from celery import Celery
from args import get_cli
from config import JOB_FOLDER, CELERY_BROKER_URL, RESULT_BACKEND
celery = Celery('argparser_server', bro... | {"/blueprints/celery_task.py": ["/args.py", "/config.py"], "/blueprints/subprocess_task.py": ["/args.py", "/config.py"], "/args.py": ["/example_argparser.py"], "/server.py": ["/args.py", "/argparse2dict.py", "/config.py", "/blueprints/celery_task.py", "/blueprints/subprocess_task.py"]} |
1,923 | Ashafix/argparse2HTML | refs/heads/master | /example_argparser.py | import argparse
import itertools
import time
import builtins
parser1 = argparse.ArgumentParser(prog='simple math', description='a simple math command line interface')
parser1.add_argument('x', help='first value',
default='2',
type=int)
parser1.add_argument('y', help='second va... | {"/blueprints/celery_task.py": ["/args.py", "/config.py"], "/blueprints/subprocess_task.py": ["/args.py", "/config.py"], "/args.py": ["/example_argparser.py"], "/server.py": ["/args.py", "/argparse2dict.py", "/config.py", "/blueprints/celery_task.py", "/blueprints/subprocess_task.py"]} |
1,924 | Ashafix/argparse2HTML | refs/heads/master | /blueprints/subprocess_task.py | import sys
import os
import uuid
import psutil
import subprocess
from flask import request, jsonify, Response
from flask import Blueprint, redirect, url_for
from args import get_cli
from config import JOB_FOLDER
FILENAME_LOG = os.path.join(JOB_FOLDER, '{}.log')
FILENAME_PID = os.path.join(JOB_FOLDER, '{}.pid')
SEP =... | {"/blueprints/celery_task.py": ["/args.py", "/config.py"], "/blueprints/subprocess_task.py": ["/args.py", "/config.py"], "/args.py": ["/example_argparser.py"], "/server.py": ["/args.py", "/argparse2dict.py", "/config.py", "/blueprints/celery_task.py", "/blueprints/subprocess_task.py"]} |
1,925 | Ashafix/argparse2HTML | refs/heads/master | /args.py | from example_argparser import parser1, simple_math
from example_argparser import parser_cycler, cycler
from example_argparser import parser_wrapper, wrapper
from collections import namedtuple
Parser = namedtuple('CLI', ('name', 'parser', 'function'))
parsers = [Parser(name=parser1.prog,
parser=par... | {"/blueprints/celery_task.py": ["/args.py", "/config.py"], "/blueprints/subprocess_task.py": ["/args.py", "/config.py"], "/args.py": ["/example_argparser.py"], "/server.py": ["/args.py", "/argparse2dict.py", "/config.py", "/blueprints/celery_task.py", "/blueprints/subprocess_task.py"]} |
1,926 | Ashafix/argparse2HTML | refs/heads/master | /argparse2dict.py | import argparse
from collections import OrderedDict
def argparser_to_dict(parser):
"""
Converts an ArgumentParser from the argparse module to a dictionary
:param parser: ArgumentParser, argparser which should be converted to a dictionary
:return: dict, key: argparser.dest, value: dict with key: argpar... | {"/blueprints/celery_task.py": ["/args.py", "/config.py"], "/blueprints/subprocess_task.py": ["/args.py", "/config.py"], "/args.py": ["/example_argparser.py"], "/server.py": ["/args.py", "/argparse2dict.py", "/config.py", "/blueprints/celery_task.py", "/blueprints/subprocess_task.py"]} |
1,927 | Ashafix/argparse2HTML | refs/heads/master | /config.py | import os
CELERY_BROKER_URL = 'redis://localhost:6379/0'
RESULT_BACKEND = 'redis://localhost:6379/0'
USE_CELERY = False
SERVER_PORT = 5000
JOB_FOLDER = os.path.join(os.getcwd(), 'jobs')
os.makedirs(JOB_FOLDER, exist_ok=True)
| {"/blueprints/celery_task.py": ["/args.py", "/config.py"], "/blueprints/subprocess_task.py": ["/args.py", "/config.py"], "/args.py": ["/example_argparser.py"], "/server.py": ["/args.py", "/argparse2dict.py", "/config.py", "/blueprints/celery_task.py", "/blueprints/subprocess_task.py"]} |
1,928 | Ashafix/argparse2HTML | refs/heads/master | /server.py | import os
from collections import OrderedDict
import importlib
import socket
from flask import Flask, request, url_for, redirect
import jinja2
import args
from argparse2dict import argparser_to_dict
from config import CELERY_BROKER_URL, RESULT_BACKEND, USE_CELERY, SERVER_PORT
app = Flask(__name__)
if USE_CELERY:
... | {"/blueprints/celery_task.py": ["/args.py", "/config.py"], "/blueprints/subprocess_task.py": ["/args.py", "/config.py"], "/args.py": ["/example_argparser.py"], "/server.py": ["/args.py", "/argparse2dict.py", "/config.py", "/blueprints/celery_task.py", "/blueprints/subprocess_task.py"]} |
1,937 | hillarry/sentiment | refs/heads/master | /DlogSysInfo.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\DELL\Desktop\finalGUI\DlogSysInfo.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_SystemInfo(object):
def setupUi(... | {"/DesignedWelWindow.py": ["/DesignedHomeWin.py"], "/DesignedHomeWin.py": ["/DlogSysInfo.py", "/DlogExtLink.py", "/prouitest.py"]} |
1,938 | hillarry/sentiment | refs/heads/master | /prouitest.py | # -*- coding: utf-8 -*-
"""
Created on Sun Jul 21 21:41:50 2019
@author: User
"""
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 14 22:02:39 2019
@author: User
"""
import nltk
import pandas as pd
import numpy as np
from nltk.stem import PorterStemmer
from nltk.corpus import stopwords
from nltk.stem import WordNetLe... | {"/DesignedWelWindow.py": ["/DesignedHomeWin.py"], "/DesignedHomeWin.py": ["/DlogSysInfo.py", "/DlogExtLink.py", "/prouitest.py"]} |
1,939 | hillarry/sentiment | refs/heads/master | /DesignedWelWindow.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\DELL\Desktop\finalGUI\DesignedWelWindow.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from DesignedHomeWin import Ui_HomeMainW... | {"/DesignedWelWindow.py": ["/DesignedHomeWin.py"], "/DesignedHomeWin.py": ["/DlogSysInfo.py", "/DlogExtLink.py", "/prouitest.py"]} |
1,940 | hillarry/sentiment | refs/heads/master | /DlogExtLink.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\DELL\Desktop\finalGUI\DlogExtLink.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_ExternalLinks(object):
def setup... | {"/DesignedWelWindow.py": ["/DesignedHomeWin.py"], "/DesignedHomeWin.py": ["/DlogSysInfo.py", "/DlogExtLink.py", "/prouitest.py"]} |
1,941 | hillarry/sentiment | refs/heads/master | /DesignedHomeWin.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\DELL\Desktop\finalGUI\DesignedHomeWin.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from DlogSysInfo import Ui_SystemInfo
fro... | {"/DesignedWelWindow.py": ["/DesignedHomeWin.py"], "/DesignedHomeWin.py": ["/DlogSysInfo.py", "/DlogExtLink.py", "/prouitest.py"]} |
1,951 | Dorothylyly/proxyPool | refs/heads/master | /loggingCustom.py | import logging
LOG_FORMAT = "%(asctime)s - %(levelname)s - %(message)s"
DATE_FORMAT = "%m/%d/%Y %H:%M:%S %p"
def log():
logging.basicConfig(filename='RedisClient.log', level=logging.DEBUG,
format=LOG_FORMAT, datefmt=DATE_FORMAT)
return logging
| {"/RedisClient.py": ["/loggingCustom.py"], "/together.py": ["/loggingCustom.py", "/tester.py"], "/tester.py": ["/RedisClient.py"]} |
1,952 | Dorothylyly/proxyPool | refs/heads/master | /RedisClient.py |
import redis
# 生成随机数
from random import choice
"""
操作缓存数据库的有序集合,实现分数的设置,代理的获取
检测代理
"""
# 最大分数 100分为高可用
MAX_SCORE = 100
# 最低分数 一旦低于0分 立即剔除
MIN_SCORE = 0
# 刚爬取到的代理的初始化分数
INITIAL_SCORE = 10
#
# #LOG_FORMAT = "%(asctime)s - %(levelname)s - %(message)s"
# DATE_FORMAT = "%m/%d/%Y %H:%M:%S %p"
REDIS_HOST = "localho... | {"/RedisClient.py": ["/loggingCustom.py"], "/together.py": ["/loggingCustom.py", "/tester.py"], "/tester.py": ["/RedisClient.py"]} |
1,953 | Dorothylyly/proxyPool | refs/heads/master | /together.py | from loggingCustom import log as logging
from tester import Tester
from Getter import Getter
import time
# 多线程模块
from multiprocessing import Process
from flaskWeb import app
API_ENABLE = True
TESTER_CYCLE = 20
GETTER_CYCLE = 20
TESTER_ENABLED = True
GETTER_ENABLE = True
class Scheduler():
def schedule_teste... | {"/RedisClient.py": ["/loggingCustom.py"], "/together.py": ["/loggingCustom.py", "/tester.py"], "/tester.py": ["/RedisClient.py"]} |
1,954 | Dorothylyly/proxyPool | refs/heads/master | /tester.py |
from RedisClient import RedisClient
import aiohttp
import asyncio
import time
# 定义合法的状态码
VALID_STATUS_CODE = [200]
TEST_URL = "http://desk.zol.com.cn/fengjing/"
# 定义一次最多验证多少个代理IP
BATCH_TEST_SIZE = 100
# aiohttp 其实表示协程
class Tester(object):
def __init__(self):
self.redis = RedisClient()
# 异步的方法
... | {"/RedisClient.py": ["/loggingCustom.py"], "/together.py": ["/loggingCustom.py", "/tester.py"], "/tester.py": ["/RedisClient.py"]} |
1,959 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/__init__.py | from pyResearchInsights.Scraper import scraper_main
from pyResearchInsights.Cleaner import cleaner_main
from pyResearchInsights.Analyzer import analyzer_main
from pyResearchInsights.NLP_Engine import nlp_engine_main
from pyResearchInsights.common_functions import pre_processing, arguments_parser, end_process
from pyRes... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,960 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/common_functions.py | '''Hello! This script contains functions that are resued by other pieces of code and scripts belonging to this
project as well.
Checkout the README.md for more details regarding the project itself.
Sarthak J Shetty
12/09/2018'''
'''datetime is used while building the database logs'''
from datetime import datetime
''... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,961 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/Visualizer.py | '''Hello! This code code is part of the pyResearchInsights project.
We will be displaying the results from the NLP_Engine.py code here, using primarily using pyLDAvis library.
Check out the repository README.md for a high-level overview of the project and the objective.
Sarthak J. Shetty
24/11/2018'''
from pyResearc... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,962 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/Scraper.py | '''The aim of this script is to scrape abstracts, author names and date of publication from Springer
Sarthak J. Shetty
04/08/2018'''
'''Adding the libraries to be used here.'''
'''Importing urllib.request to use urlopen'''
from urllib.request import build_opener, HTTPCookieProcessor
''''Importing urllib.error to hand... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,963 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/system_functions.py | '''Hello! This portion of the code that acts as the processing code corroborating with the main scripts [re: Scraper, Analyzer+NLP_Engine, Visualizer]
- Sarthak J. Shetty
06/02/2019
This script has been renamed as the system_functions.py to carry out OS level interactions, such as:
1. tarballing the LOGS generated to... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,964 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/NLP_Engine.py | '''Hello! This module of code is a part of the larger pyResearchInsights project.
This file was earlier named as Temp_Gensim_Code; code is now bifurcated into Gensim code (this) and a seperate
visualization code that will be added to the repository as well.
Checkout the Bias README.md for an overview of the project.
... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,965 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/Cleaner.py | '''
Hello! This script is part of the larger pyResearchInsights project that you can check out here: https://github.com/SarthakJShetty/pyResearchInsights
We are trying to build an end-to-end ACA tool here
-Sarthak
(03/10/2019)
Purpose of this script:
Clean the corpus of special character'''
'''Importing the status lo... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,966 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/example.py | '''Hello! We have decided to modularize the entire code, and run it off of one common script.
In the future, the Analyzer.py and the Visualizer.py scripts will be called here as well.
Check out the build-log.md for a detailed changes implemented.
Check out the README.md for more details about the project.
Sarthak J. ... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,967 | SarthakJShetty/pyResearchInsights | refs/heads/master | /pyResearchInsights/Analyzer.py | '''This code is part of the larger pyResearchInsights project, where we aim
to study the research themes being discussed in scientific publications.
This portion of the code analyzes the contents of the .txt file developed
by the Scraper.py and saves it to a .csv for later visualization by the
soon to be built Visuali... | {"/pyResearchInsights/__init__.py": ["/pyResearchInsights/Scraper.py", "/pyResearchInsights/Cleaner.py", "/pyResearchInsights/Analyzer.py", "/pyResearchInsights/NLP_Engine.py", "/pyResearchInsights/common_functions.py", "/pyResearchInsights/system_functions.py"], "/pyResearchInsights/Visualizer.py": ["/pyResearchInsigh... |
1,974 | Tarun-yadav777/Djanjo-Project-Schemer- | refs/heads/master | /schemegen/migrations/0003_auto_20201116_1718.py | # Generated by Django 3.0.8 on 2020-11-16 11:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('schemegen', '0002_delete_genre'),
]
operations = [
migrations.AlterField(
model_name='schemegen',
name='type',
... | {"/schemegen/views.py": ["/schemegen/models.py"], "/schemegen/admin.py": ["/schemegen/models.py"]} |
1,975 | Tarun-yadav777/Djanjo-Project-Schemer- | refs/heads/master | /schemegen/models.py | from django.db import models
class Schemegen(models.Model):
choices = [
("Women's Development", "Women's Development"),
("Social Justice", "Social Justice"),
("Sports", "Sports"),
("Ruler Development", "Ruler Development"),
("Child Development", "Child Development")
]
... | {"/schemegen/views.py": ["/schemegen/models.py"], "/schemegen/admin.py": ["/schemegen/models.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.