index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
51,823 | STrucks/EventAnalysis | refs/heads/master | /data_crawler/__main__.py | from data_crawler.data_manager import DataManager
if __name__ == '__main__':
dm = DataManager()
for i in range(5000):
print(i)
dm.next_batch()
| {"/data_crawler/crawler.py": ["/data_crawler/configurations/config_loader.py", "/data_crawler/models/reddit_post.py"], "/data_crawler/data_manager.py": ["/data_crawler/crawler.py", "/data_crawler/database_handler.py"], "/data_crawler/__main__.py": ["/data_crawler/data_manager.py"], "/data_crawler/database_handler.py": ... |
51,824 | STrucks/EventAnalysis | refs/heads/master | /analyser/__main__.py |
if __name__ == '__main__':
# extract key words:
pass | {"/data_crawler/crawler.py": ["/data_crawler/configurations/config_loader.py", "/data_crawler/models/reddit_post.py"], "/data_crawler/data_manager.py": ["/data_crawler/crawler.py", "/data_crawler/database_handler.py"], "/data_crawler/__main__.py": ["/data_crawler/data_manager.py"], "/data_crawler/database_handler.py": ... |
51,825 | STrucks/EventAnalysis | refs/heads/master | /data_crawler/database_handler.py | import logging
from pymongo import MongoClient
from data_crawler.configurations.config_loader import ConfigLoader
from data_crawler.models.reddit_post import RedditPost
class DatabaseHandler:
def __init__(self):
cl = ConfigLoader()
logging.basicConfig(level=cl.get_logging_level())
clien... | {"/data_crawler/crawler.py": ["/data_crawler/configurations/config_loader.py", "/data_crawler/models/reddit_post.py"], "/data_crawler/data_manager.py": ["/data_crawler/crawler.py", "/data_crawler/database_handler.py"], "/data_crawler/__main__.py": ["/data_crawler/data_manager.py"], "/data_crawler/database_handler.py": ... |
51,830 | ChatchapongC/myform | refs/heads/master | /myform/views.py | from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.forms import UserCreationForm
from django.http import HttpResponseRedirect
from django.urls import reverse, reverse_lazy
from django.views import generic
from django.views.generic import TemplateView... | {"/myform/views.py": ["/myform/forms.py", "/myform/models.py"], "/myform/forms.py": ["/myform/models.py"], "/myform/urls.py": ["/myform/views.py"]} |
51,831 | ChatchapongC/myform | refs/heads/master | /myform/forms.py | from django import forms
from django.contrib.auth.models import User
from django.forms import EmailInput, TextInput, PasswordInput, Field
from .models import *
class UserRegistrationForm(forms.ModelForm):
class Meta:
model = User
fields = ['email', 'username', 'password']
widgets = {
... | {"/myform/views.py": ["/myform/forms.py", "/myform/models.py"], "/myform/forms.py": ["/myform/models.py"], "/myform/urls.py": ["/myform/views.py"]} |
51,832 | ChatchapongC/myform | refs/heads/master | /myform/urls.py | from django.contrib import admin
from django.urls import path
from myform.views import HomeView, IndexView, CreateProjectView, ContactView ,SummaryView, event_delete, create_question, create_event, event_edit, \
evaluator_view, create_question, save_answer
from django.contrib.auth.decorators import login_required
... | {"/myform/views.py": ["/myform/forms.py", "/myform/models.py"], "/myform/forms.py": ["/myform/models.py"], "/myform/urls.py": ["/myform/views.py"]} |
51,833 | ChatchapongC/myform | refs/heads/master | /myform/models.py | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
import datetime
class Event(models.Model):
owner = models.ForeignKey(User, on_delete=models.CASCADE, null=True)
event_name = models.CharField(max_length=100)
event_date = models.DateTimeField(auto_no... | {"/myform/views.py": ["/myform/forms.py", "/myform/models.py"], "/myform/forms.py": ["/myform/models.py"], "/myform/urls.py": ["/myform/views.py"]} |
51,836 | AlexeyKulyasov/Build-RESTful-Api-with-flask_restful-marshmallow | refs/heads/main | /routes.py | from typing import Tuple, List, Dict
from flask import Flask, request, jsonify, make_response
from flask_restful import Api, Resource, abort
from marshmallow import ValidationError
from models import (
DATA, get_all_books, init_db,
add_book, get_book_by_id, update_book_by_id,
delete_book_by_id, get_all_au... | {"/routes.py": ["/models.py", "/schemas.py"], "/schemas.py": ["/models.py"]} |
51,837 | AlexeyKulyasov/Build-RESTful-Api-with-flask_restful-marshmallow | refs/heads/main | /schemas.py | from typing import Dict
from marshmallow import (
Schema, fields, validates,
ValidationError, post_load, validates_schema
)
from models import (
get_author_by_name,
is_book_exists, Book, Author
)
class BookSchema(Schema):
id = fields.Int(dump_only=True)
title = fields.Str(required=True)
... | {"/routes.py": ["/models.py", "/schemas.py"], "/schemas.py": ["/models.py"]} |
51,838 | AlexeyKulyasov/Build-RESTful-Api-with-flask_restful-marshmallow | refs/heads/main | /models.py | import sqlite3
from dataclasses import dataclass
from typing import List, Optional, Tuple
ENABLE_FOREIGN_KEY = "PRAGMA foreign_keys = ON;"
DATA = [
{'id': 1, 'title': 'A Byte of Python', 'author': 'Swaroop C. H.'},
{'id': 2, 'title': 'Moby-Dick; or, The Whale', 'author': 'Herman Melville'},
{'id': 3, 'tit... | {"/routes.py": ["/models.py", "/schemas.py"], "/schemas.py": ["/models.py"]} |
51,840 | ondi-project/ondi-back | refs/heads/master | /ondi/main/migrations/0004_product_p_viewcount.py | # Generated by Django 3.1.6 on 2021-02-05 02:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0003_auto_20210205_1134'),
]
operations = [
migrations.AddField(
model_name='product',
name='p_viewcount',
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,841 | ondi-project/ondi-back | refs/heads/master | /ondi/main/migrations/0001_initial.py | # Generated by Django 3.1.6 on 2021-02-04 17:24
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='LiveProduct',
fields=[
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,842 | ondi-project/ondi-back | refs/heads/master | /ondi/main/migrations/0005_auto_20210205_1211.py | # Generated by Django 3.1.6 on 2021-02-05 03:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0004_product_p_viewcount'),
]
operations = [
migrations.AlterField(
model_name='product',
name='p_live',
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,843 | ondi-project/ondi-back | refs/heads/master | /ondi/main/urls.py | from django.urls import path
from .views import *
from . import views
urlpatterns = [
path('', ProductListCreateView.as_view()),
path('livelist',views.livelist, name='livelist'),
path('post', views.post, name='post'),
path('view_product', views.view_product,name='view_product'),
path('category', vi... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,844 | ondi-project/ondi-back | refs/heads/master | /ondi/main/migrations/0007_product_p_buy.py | # Generated by Django 3.1.6 on 2021-02-05 06:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0006_merge_20210205_1506'),
]
operations = [
migrations.AddField(
model_name='product',
name='p_buy',
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,845 | ondi-project/ondi-back | refs/heads/master | /ondi/main/admin.py | from django.contrib import admin
from .models import *
@admin.register(Product)
class ProductAdmin(admin.ModelAdmin):
list_display = ('id', 'p_category','p_name','p_date','p_seller','p_tag')
fields =()
# admin.site.register(Product)
@admin.register(LiveProduct)
class LiveProductAdmin(admin.ModelAdmin):
lis... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,846 | ondi-project/ondi-back | refs/heads/master | /ondi/user/models.py | from django.apps import apps
from django.contrib.auth.models import AbstractUser
from django.core.validators import MaxValueValidator
from django.core.validators import MinLengthValidator
from django.core.validators import MinValueValidator
from django.db import models
class User(AbstractUser):
phone = models.Char... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,847 | ondi-project/ondi-back | refs/heads/master | /ondi/user/migrations/0007_auto_20210205_0642.py | # Generated by Django 3.1.6 on 2021-02-05 06:42
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0003_auto_20210205_0553'),
('user', '0006_auto_20210205_0534'),
]
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,848 | ondi-project/ondi-back | refs/heads/master | /ondi/user/serializers.py | from django.db import transaction
from dj_rest_auth.registration.serializers import RegisterSerializer
from rest_framework import serializers
from .models import *
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = [
'id',
'username',
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,849 | ondi-project/ondi-back | refs/heads/master | /ondi/user/urls.py | from django.urls import path
from .views import *
urlpatterns = [
path('users', UserListView.as_view()),
path('users/<int:pk>', UserRetrieveView.as_view()),
path('users/<int:pk>/selling', UserSellingListView.as_view()),
path('users/<int:pk>/sold', UserSoldListView.as_view()),
path('reports', Repor... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,850 | ondi-project/ondi-back | refs/heads/master | /ondi/user/migrations/0009_purchased.py | # Generated by Django 3.1.6 on 2021-02-05 12:13
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0008_auto_20210205_1806'),
('user', '0008_auto_20210205_0736'),
]
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,851 | ondi-project/ondi-back | refs/heads/master | /ondi/main/serializer.py | from django.contrib.auth.models import *
from rest_framework import generics,serializers
from rest_framework.response import Response
from .models import *
from django.db.models import Q
class ProductSerializer(serializers.ModelSerializer):
class Meta:
model = Product
fields = '__all__'
# ... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,852 | ondi-project/ondi-back | refs/heads/master | /ondi/main/migrations/0003_auto_20210205_0553.py | # Generated by Django 3.1.6 on 2021-02-05 05:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20210205_1014'),
]
operations = [
migrations.AddField(
model_name='liveproduct',
name='l_sprice',
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,853 | ondi-project/ondi-back | refs/heads/master | /ondi/main/migrations/0008_auto_20210205_1806.py | # Generated by Django 3.1.6 on 2021-02-05 09:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0007_product_p_buy'),
]
operations = [
migrations.AlterField(
model_name='product',
name='p_category',
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,854 | ondi-project/ondi-back | refs/heads/master | /ondi/main/migrations/0006_merge_20210205_1506.py | # Generated by Django 3.1.6 on 2021-02-05 06:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0005_auto_20210205_1211'),
('main', '0003_auto_20210205_0553'),
]
operations = [
]
| {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,855 | ondi-project/ondi-back | refs/heads/master | /ondi/main/views.py | from django.shortcuts import render
from rest_framework import generics,serializers
from rest_framework.response import Response
from .models import *
from .serializer import *
from django.contrib.auth.hashers import make_password,check_password
from django.http import HttpResponse, JsonResponse
from django.views.decor... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,856 | ondi-project/ondi-back | refs/heads/master | /ondi/user/views.py | from django.shortcuts import render
from rest_framework import generics
from rest_framework.response import Response
from .models import *
from .serializers import *
from main.serializers import *
class UserListView(generics.ListAPIView):
queryset = User.objects.all()
serializer_class = UserSerializer
class U... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,857 | ondi-project/ondi-back | refs/heads/master | /ondi/user/migrations/0008_auto_20210205_0736.py | # Generated by Django 3.1.6 on 2021-02-05 07:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_auto_20210205_0553'),
('user', '0007_auto_20210205_0642'),
]
operations = [
migrations.AlterUniqueTogether(
name='l... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,858 | ondi-project/ondi-back | refs/heads/master | /ondi/main/models.py | from django.db import models
from user.models import *
from django.utils import timezone
# Create your models here.
class Product(models.Model):
#상품 DB
# {카테고리 / 이름/가격/내용/사진/태그/협상여부/등록시간/좋아요수/판매자}
p_category = models.CharField(max_length=20)#카테고리선택으로
p_name = models.CharField(max_length=20, verbose_nam... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,859 | ondi-project/ondi-back | refs/heads/master | /ondi/main/migrations/0003_auto_20210205_1134.py | # Generated by Django 3.1.6 on 2021-02-05 02:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20210205_1014'),
]
operations = [
migrations.AddField(
model_name='liveproduct',
name='l_sprice',
... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,860 | ondi-project/ondi-back | refs/heads/master | /ondi/user/migrations/0005_auto_20210205_0532.py | # Generated by Django 3.1.6 on 2021-02-05 05:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0004_user_image'),
]
operations = [
migrations.AlterField(
model_name='user',
name='image',
fiel... | {"/ondi/main/urls.py": ["/ondi/main/views.py"], "/ondi/main/admin.py": ["/ondi/main/models.py"], "/ondi/user/serializers.py": ["/ondi/user/models.py"], "/ondi/user/urls.py": ["/ondi/user/views.py"], "/ondi/main/serializer.py": ["/ondi/main/models.py"], "/ondi/main/views.py": ["/ondi/main/models.py", "/ondi/main/seriali... |
51,868 | Raytr0/Pong | refs/heads/main | /menu.py | import pygame
import sys
# Setup pygame/window ---------------------------------------- #
mainClock = pygame.time.Clock()
from pygame.locals import *
pygame.init()
pygame.display.set_caption('Menu')
screen = pygame.display.set_mode((500, 500), 0, 32)
font = pygame.font.Font("freesansbold.ttf", 50)
start_... | {"/menu.py": ["/game.py"]} |
51,869 | Raytr0/Pong | refs/heads/main | /game.py | #Credit to HaltonCoders for the amazing pong code
#Modified and edited by Raytr0
import sys
import pygame
import random
# Text to RGB
# A dictionary where the color word is the key and the rbg equivalent is the value
Colors = {
"black": (0, 0, 0),
"white": (255, 255, 255),
"red": (255, 0, 0),
... | {"/menu.py": ["/game.py"]} |
51,872 | jc26/CMU_Coursebook | refs/heads/master | /cmucoursebook/urls.py | from django.conf.urls import url
from django.contrib.auth import views as auth_views
from cmucoursebook import views
from forms import CustomLoginForm
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^profile/(?P<username>[\w.@+-]+)$', views.profile, name='profile'),
url(r'^edit-profile$', views.... | {"/cmucoursebook/forms.py": ["/cmucoursebook/models.py"], "/cmucoursebook/views.py": ["/cmucoursebook/models.py", "/cmucoursebook/forms.py"]} |
51,873 | jc26/CMU_Coursebook | refs/heads/master | /cmucoursebook/forms.py | from django import forms
from django.contrib.auth.forms import AuthenticationForm
from cmucoursebook.models import *
from django.core.validators import validate_email
MAX_UPLOAD_SIZE = 3000000
class CustomLoginForm(AuthenticationForm):
username = forms.CharField(label='username', widget=forms.TextInput(attrs={'p... | {"/cmucoursebook/forms.py": ["/cmucoursebook/models.py"], "/cmucoursebook/views.py": ["/cmucoursebook/models.py", "/cmucoursebook/forms.py"]} |
51,874 | jc26/CMU_Coursebook | refs/heads/master | /cmucoursebook/models.py | from __future__ import unicode_literals
from django.db import models
# User class for built-in authentication module
from django.contrib.auth.models import User
class Course(models.Model):
cid = models.CharField(max_length=5, primary_key=True)
name = models.CharField(max_length=100)
department = models.C... | {"/cmucoursebook/forms.py": ["/cmucoursebook/models.py"], "/cmucoursebook/views.py": ["/cmucoursebook/models.py", "/cmucoursebook/forms.py"]} |
51,875 | jc26/CMU_Coursebook | refs/heads/master | /cmucoursebook/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-27 00:02
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | {"/cmucoursebook/forms.py": ["/cmucoursebook/models.py"], "/cmucoursebook/views.py": ["/cmucoursebook/models.py", "/cmucoursebook/forms.py"]} |
51,876 | jc26/CMU_Coursebook | refs/heads/master | /cmucoursebook/views.py | from django.shortcuts import render, redirect, get_object_or_404
from django.core.urlresolvers import reverse
from django.http import HttpResponse, Http404, JsonResponse
from django.core import serializers
# Django transaction system so we can use @transaction.atomic
from django.db import transaction
# Decorator to u... | {"/cmucoursebook/forms.py": ["/cmucoursebook/models.py"], "/cmucoursebook/views.py": ["/cmucoursebook/models.py", "/cmucoursebook/forms.py"]} |
51,877 | jc26/CMU_Coursebook | refs/heads/master | /cmucoursebook/apps.py | from __future__ import unicode_literals
from django.apps import AppConfig
class CmucoursebookConfig(AppConfig):
name = 'cmucoursebook'
| {"/cmucoursebook/forms.py": ["/cmucoursebook/models.py"], "/cmucoursebook/views.py": ["/cmucoursebook/models.py", "/cmucoursebook/forms.py"]} |
51,879 | apeyrache/phy | refs/heads/master | /phy/cluster/manual/tests/test_session.py | # -*- coding: utf-8 -*-
"""Tests of session structure."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os
import os.path as op
import numpy as np
from numpy.testing import assert_array... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,880 | apeyrache/phy | refs/heads/master | /phy/cluster/manual/wizard.py | # -*- coding: utf-8 -*-
"""Wizard."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import math
from operator import itemgetter
import numpy as np
#------------------------------------------... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,881 | apeyrache/phy | refs/heads/master | /phy/plot/ccg.py | # -*- coding: utf-8 -*-
"""Plotting CCGs."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
from ._mpl_utils import _bottom_left_frame
#--... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,882 | apeyrache/phy | refs/heads/master | /phy/io/kwik_model.py | # -*- coding: utf-8 -*-
"""The KwikModel class manages in-memory structures and KWIK file open/save."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os.path as op
import numpy as np
f... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,883 | apeyrache/phy | refs/heads/master | /phy/stats/tests/test_ccg.py | # -*- coding: utf-8 -*-
"""Tests of CCG functions."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
from numpy.testing import assert_array_equal as ae
from pytest import rais... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,884 | apeyrache/phy | refs/heads/master | /phy/io/mock/tests/test_kwik.py | # -*- coding: utf-8 -*-
"""Tests of mock Kwik file creation."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os
import os.path as op
from random import randint
import numpy as np
from ... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,885 | apeyrache/phy | refs/heads/master | /phy/cluster/manual/session.py | # -*- coding: utf-8 -*-
"""Session structure."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os
import os.path as op
from functools import partial
import shutil
import numpy as np
fr... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,886 | apeyrache/phy | refs/heads/master | /phy/utils/event.py | # -*- coding: utf-8 -*-
"""Simple event system."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import re
from collections import defaultdict
from functools import partial
from inspect import ... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,887 | apeyrache/phy | refs/heads/master | /phy/cluster/manual/tests/test_wizard.py | # -*- coding: utf-8 -*-
"""Test wizard."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
import numpy.random as npr
from numpy.testing import assert_array_equal as ae
from py... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,888 | apeyrache/phy | refs/heads/master | /phy/io/mock/kwik.py | # -*- coding: utf-8 -*-
"""Mock Kwik files."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os
import os.path as op
from random import randint
import numpy as np
from numpy.testing imp... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,889 | apeyrache/phy | refs/heads/master | /phy/utils/_misc.py | # -*- coding: utf-8 -*-
"""Utility functions."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os
import os.path as op
from inspect import getargspec
from ..ext.six import string_types... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,890 | apeyrache/phy | refs/heads/master | /phy/plot/waveforms.py | # -*- coding: utf-8 -*-
"""Plotting waveforms."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
from vispy import gloo
from vispy.gloo import Texture2D
from vispy.visuals i... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,891 | apeyrache/phy | refs/heads/master | /phy/__init__.py | # -*- coding: utf-8 -*-
from .utils import default_logger
__author__ = 'Kwik Team'
__email__ = 'cyrille.rossant at gmail.com'
__version__ = '0.1.0-alpha'
# Set up the default logger.
default_logger()
| {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,892 | apeyrache/phy | refs/heads/master | /phy/cluster/manual/store.py | # -*- coding: utf-8 -*-
"""Cluster store."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os
import os.path as op
from ...utils.logging import debug
from ...utils._misc import (_concat... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,893 | apeyrache/phy | refs/heads/master | /phy/cluster/manual/tests/test_store.py | # -*- coding: utf-8 -*-
"""Test cluster store."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os.path as op
import numpy as np
from numpy.testing import assert_array_equal as ae
from... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,894 | apeyrache/phy | refs/heads/master | /phy/io/tests/test_kwik_model.py | # -*- coding: utf-8 -*-
"""Tests of Kwik file opening routines."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import os
import os.path as op
from random import randint
import numpy as np
fr... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,895 | apeyrache/phy | refs/heads/master | /phy/cluster/manual/_update_info.py | # -*- coding: utf-8 -*-
"""UpdateInfo class."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
from ...utils._bunch import Bunch
#------------------------------------------... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,896 | apeyrache/phy | refs/heads/master | /phy/io/mock/artificial.py | # -*- coding: utf-8 -*-
"""Mock datasets."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
import numpy.random as nr
from ...ext import six
from ...utils._color import _rand... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,897 | apeyrache/phy | refs/heads/master | /phy/plot/tests/test_ccg.py | # -*- coding: utf-8 -*-
"""Test CCG plotting."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
from ..ccg import plot_ccg
#----------------... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,898 | apeyrache/phy | refs/heads/master | /phy/utils/_bunch.py | # -*- coding: utf-8 -*-
"""Bunch class."""
#------------------------------------------------------------------------------
# Bunch class
#------------------------------------------------------------------------------
class Bunch(dict):
"""A dict with additional dot syntax."""
def __init__(self, *args, **kwa... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,899 | apeyrache/phy | refs/heads/master | /phy/utils/testing.py | # -*- coding: utf-8 -*-
"""Utility functions used for tests."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import sys
import time
from contextlib import contextmanager
from ..ext.six import ... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,900 | apeyrache/phy | refs/heads/master | /phy/cluster/manual/selector.py | # -*- coding: utf-8 -*-
"""Selector structure."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import numpy as np
from ...ext import six
from ...utils.array import _as_array
from ._utils impo... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,901 | apeyrache/phy | refs/heads/master | /phy/utils/tests/test_event.py | # -*- coding: utf-8 -*-
"""Test event system."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
from pytest import raises
from ..event import EventEmitter, ProgressReporter
#-----------------... | {"/phy/cluster/manual/tests/test_session.py": ["/phy/cluster/manual/session.py", "/phy/io/mock/artificial.py", "/phy/io/mock/kwik.py", "/phy/plot/waveforms.py"], "/phy/io/mock/tests/test_kwik.py": ["/phy/io/mock/artificial.py", "/phy/io/kwik_model.py", "/phy/io/mock/kwik.py"], "/phy/cluster/manual/session.py": ["/phy/u... |
51,910 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /Visualize_results.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 09/01/2020 21:14
@Author: XinZhi Yao
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
def read_file(loss_acc_file):
loss_list = []
acc_list = []
with open(loss_acc_file) as f:
for line in... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,911 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /data/data_Statistics.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 09/01/2020 15:08
@Author: XinZhi Yao
"""
import os
from collections import defaultdict, OrderedDict
import matplotlib.pyplot as plt
def sort_dic_key(dic: dict):
sorted_dic = OrderedDict()
key_sort = sorted(dic.keys(), key=lambda x: x,... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,912 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /utils.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 07/01/2020 16:03
@Author: XinZhi Yao
"""
import os
import functools
def logging(s, log_path, log_=True):
# write log file.
print(s)
if log_:
with open(log_path, 'a+') as f_log:
f_log.write(s + '\n')
def ge... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,913 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /data/AG_corpus_data/AG_pre.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 09/01/2020 9:57
@Author: XinZhi Yao
"""
from collections import defaultdict, OrderedDict
from string import punctuation
import matplotlib.pyplot as plt
def unzip_dic(count_dic: dict):
length_list = []
count_list = []
for len, cou... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,914 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /data_loader.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 07/01/2020 16:29
@Author: XinZhi Yao
"""
import os
import torch
import numpy as np
import random
from collections import defaultdict
# Done(20200108): Add start and end symbols
# Done: label2index label_class, turn lb_list to lb_index_list... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,915 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /config/config_ag.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 09/01/2020 10:48
@Author: XinZhi Yao
"""
params = {
# model parameters
'embed_dim': 64,
'hidden_size': 32,
'bidirectional': True,
'weight_decay': 0.001,
'momentum': 0,
'attention_size': 16,
# 'sequence_lengt... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,916 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /main_attention_lstm.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 07/01/2020 15:04
@Author: XinZhi Yao
"""
import os
import time
import importlib
import argparse
from tqdm import tqdm
import numpy as np
from sklearn import metrics
import torch
import torch.nn as nn
import torch.optim as optim
from ut... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,917 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /Attention_BiLSTM_model.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 08/01/2020 15:32
@Author: XinZhi Yao
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
class bilstm_attn(nn.Module):
def __init__(self, args):
super(b... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,918 | YaoXinZhi/Bi-LSTM-Attention | refs/heads/master | /config/config_ques.py | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Created on 07/01/2020 15:14
@Author: XinZhi Yao
"""
params = {
# model parameters
'embed_dim': 64,
'hidden_size': 32,
'bidirectional': True,
'weight_decay': 0.001,
'momentum': 0,
'attention_size': 16,
# 'sequence_lengt... | {"/main_attention_lstm.py": ["/utils.py", "/data_loader.py", "/Attention_BiLSTM_model.py"]} |
51,927 | dimayasin/SPI | refs/heads/master | /spi-project/SPI/apps/spiapps/models.py | from __future__ import unicode_literals
from django.db import models
from django.db import connection
import re #, bcrypt
import datetime
PN_REGEX = re.compile(r'^[a-zA-Z0-9.-\/#]+$')
class Part_Manager(models.Manager):
def validatePartsData(self, postData):
errors = []
mytime=datetime.datetime.st... | {"/spi-project/SPI/apps/spiapps/views.py": ["/spi-project/SPI/apps/spiapps/models.py"]} |
51,928 | dimayasin/SPI | refs/heads/master | /spi-project/SPI/apps/spiapps/urls.py | from django.conf.urls import url
from . import views # This line is new!
urlpatterns = [
url(r'^$', views.index),
url(r'summ$', views.summ),
url(r'inputData$', views.inputData),
url(r'brows$', views.brows),
url(r'pn$', views.pn),
url(r'desc$', views.desc),
url(r'bulk$', views.bulk)... | {"/spi-project/SPI/apps/spiapps/views.py": ["/spi-project/SPI/apps/spiapps/models.py"]} |
51,929 | dimayasin/SPI | refs/heads/master | /spi-project/SPI/apps/spiapps/views.py | from __future__ import unicode_literals
from django.shortcuts import render,redirect,HttpResponse
from django import forms
from django.db import connection
import django_excel as excel
import pyodbc
import openpyxl
from django.contrib import messages
from openpyxl import load_workbook, workbook
from .models import Part... | {"/spi-project/SPI/apps/spiapps/views.py": ["/spi-project/SPI/apps/spiapps/models.py"]} |
51,949 | indionapolis/test-task-SBER | refs/heads/main | /src/bots.py | from abc import ABC
from aiogram import Dispatcher, Bot as TelegramBotClient, executor, types
from collections import defaultdict
from src.actions import all_actions
TELEGRAM_API_TOKEN = "1649979045:AAFHeqndPGoqas48PQQ_o_hS516ohUkGm5g"
USER_COMMANDS_CACHE = defaultdict(set)
class Bot(ABC):
def __init__(self):
... | {"/src/bots.py": ["/src/actions.py"], "/src/actions.py": ["/src/restaurant_client.py"], "/tests/test_actions.py": ["/src/actions.py"], "/tests/test_telegram_bot.py": ["/src/bot_factory.py"], "/src/bot_factory.py": ["/src/bots.py"]} |
51,950 | indionapolis/test-task-SBER | refs/heads/main | /src/actions.py | import re
from abc import ABC
from typing import Tuple
from src.restaurant_client import Client
restaurant_client = Client()
class Action(ABC):
command: str = None
params: str = None
description: str = None
def execute(self, params: str) -> str:
pass
class MakeReservation(Action):
com... | {"/src/bots.py": ["/src/actions.py"], "/src/actions.py": ["/src/restaurant_client.py"], "/tests/test_actions.py": ["/src/actions.py"], "/tests/test_telegram_bot.py": ["/src/bot_factory.py"], "/src/bot_factory.py": ["/src/bots.py"]} |
51,951 | indionapolis/test-task-SBER | refs/heads/main | /tests/test_actions.py | import pytest
from src.actions import MakeReservation
@pytest.fixture
def reservation_action():
return MakeReservation()
def test_incorrect_reservation(reservation_action):
response = reservation_action.execute("")
assert response == "Incorrect format, example: <valid time: HH:MM> <number of people mor... | {"/src/bots.py": ["/src/actions.py"], "/src/actions.py": ["/src/restaurant_client.py"], "/tests/test_actions.py": ["/src/actions.py"], "/tests/test_telegram_bot.py": ["/src/bot_factory.py"], "/src/bot_factory.py": ["/src/bots.py"]} |
51,952 | indionapolis/test-task-SBER | refs/heads/main | /src/restaurant_client.py | def generate_time_table():
return {f'{i}:00': False for i in range(0, 23)}
class Client:
def __init__(self):
self._reservations = []
self._booking_table = [(2, generate_time_table()),
(2, generate_time_table()),
(4, generate_time_t... | {"/src/bots.py": ["/src/actions.py"], "/src/actions.py": ["/src/restaurant_client.py"], "/tests/test_actions.py": ["/src/actions.py"], "/tests/test_telegram_bot.py": ["/src/bot_factory.py"], "/src/bot_factory.py": ["/src/bots.py"]} |
51,953 | indionapolis/test-task-SBER | refs/heads/main | /tests/test_telegram_bot.py | import pytest
from aiogram import types, Bot
from src.bot_factory import BotFactory
from tests.fixtures import MESSAGE
@pytest.fixture
def telegram_bot():
return BotFactory.get_instance("TELEGRAM")
@pytest.fixture
def non_booking_message():
return types.Message(**MESSAGE)
@pytest.fixture
def booking_mess... | {"/src/bots.py": ["/src/actions.py"], "/src/actions.py": ["/src/restaurant_client.py"], "/tests/test_actions.py": ["/src/actions.py"], "/tests/test_telegram_bot.py": ["/src/bot_factory.py"], "/src/bot_factory.py": ["/src/bots.py"]} |
51,954 | indionapolis/test-task-SBER | refs/heads/main | /src/bot_factory.py | from src.bots import TelegramBot, Bot
BOTS = {"TELEGRAM": TelegramBot}
class BotFactory:
@staticmethod
def get_instance(bot_type: str) -> Bot:
bot = BOTS.get(bot_type)
if not bot:
raise ValueError(f"bot type {bot_type} is not available")
return bot()
| {"/src/bots.py": ["/src/actions.py"], "/src/actions.py": ["/src/restaurant_client.py"], "/tests/test_actions.py": ["/src/actions.py"], "/tests/test_telegram_bot.py": ["/src/bot_factory.py"], "/src/bot_factory.py": ["/src/bots.py"]} |
51,972 | vincycode7/maistore-jwt-extented | refs/heads/master | /resources/product.py | import sqlite3
from flask_restful import Resource, reqparse
from flask_jwt import jwt_required
from models.product import ProductModel
#class to create user and get user
class ProductList(Resource):
@jwt_required() #use for authentication before calling get
def get(self):
products = ProductModel.find_... | {"/resources/product.py": ["/models/product.py"], "/resources/user.py": ["/models/user.py"], "/app.py": ["/resources/store.py", "/resources/user.py", "/resources/product.py"], "/resources/store.py": ["/models/store.py"]} |
51,973 | vincycode7/maistore-jwt-extented | refs/heads/master | /resources/user.py | from flask_restful import Resource, reqparse
from flask_jwt import jwt_required
from werkzeug.security import safe_str_cmp
from flask_jwt_extended import create_access_token, create_refresh_token
from models.user import UserModel
#class to list all user
class UserList(Resource):
@jwt_required()
def get(self): ... | {"/resources/product.py": ["/models/product.py"], "/resources/user.py": ["/models/user.py"], "/app.py": ["/resources/store.py", "/resources/user.py", "/resources/product.py"], "/resources/store.py": ["/models/store.py"]} |
51,974 | vincycode7/maistore-jwt-extented | refs/heads/master | /app.py | import os,db
from resources.store import Store, StoreList
from resources.user import User, UserList, UserRegister, UserExt, UserLogin
from resources.product import Product, ProductList
from flask import Flask, request
# from flask_jwt import JWT, jwt_required
from flask_jwt_extended import JWTManager
from flask_restful... | {"/resources/product.py": ["/models/product.py"], "/resources/user.py": ["/models/user.py"], "/app.py": ["/resources/store.py", "/resources/user.py", "/resources/product.py"], "/resources/store.py": ["/models/store.py"]} |
51,975 | vincycode7/maistore-jwt-extented | refs/heads/master | /resources/store.py | from flask_restful import Resource, reqparse
from flask_jwt import jwt_required
from models.store import StoreModel
class Store(Resource):
parser = reqparse.RequestParser()
parser.add_argument(name="storename", required=True, help="a store name is required to proceed", type=str,case_sensitive=False)
parser... | {"/resources/product.py": ["/models/product.py"], "/resources/user.py": ["/models/user.py"], "/app.py": ["/resources/store.py", "/resources/user.py", "/resources/product.py"], "/resources/store.py": ["/models/store.py"]} |
51,976 | vincycode7/maistore-jwt-extented | refs/heads/master | /models/user.py | #import packages
from db import db
#class to create user and get user
class UserModel(db.Model):
__tablename__ = "user"
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(30))
password = db.Column(db.String(80))
email = db.Column(db.String(100))
stores = db.relations... | {"/resources/product.py": ["/models/product.py"], "/resources/user.py": ["/models/user.py"], "/app.py": ["/resources/store.py", "/resources/user.py", "/resources/product.py"], "/resources/store.py": ["/models/store.py"]} |
51,977 | vincycode7/maistore-jwt-extented | refs/heads/master | /models/product.py | from db import db
class ProductModel(db.Model):
__tablename__ = "product"
id = db.Column(db.Integer, primary_key=True)
productname = db.Column(db.String(40))
price = db.Column(db.Float(precision=2))
quantity = db.Column(db.Integer)
category = db.Column(db.String(40))
store_id = db.Column(d... | {"/resources/product.py": ["/models/product.py"], "/resources/user.py": ["/models/user.py"], "/app.py": ["/resources/store.py", "/resources/user.py", "/resources/product.py"], "/resources/store.py": ["/models/store.py"]} |
51,978 | vincycode7/maistore-jwt-extented | refs/heads/master | /models/store.py | from db import db
class StoreModel(db.Model):
__tablename__ = "store"
id = db.Column(db.Integer, primary_key=True)
storename = db.Column(db.String(40))
userid = db.Column(db.String(40))
location = db.Column(db.String(200))
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
user = db... | {"/resources/product.py": ["/models/product.py"], "/resources/user.py": ["/models/user.py"], "/app.py": ["/resources/store.py", "/resources/user.py", "/resources/product.py"], "/resources/store.py": ["/models/store.py"]} |
51,981 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /partB.py | """
This file runs the required components for part B
"""
import localization
robot_local = localization.Localization()
def compare_sequence_controls(noise=False):
""" compares the control sequence listed in question 2 between the
motion model and the filter
"""
robot_local.control_sequence()
def run... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,982 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /measure.py |
"""
This file contains the sensor model that estimates the
range and bearing of landmarks and other robots
"""
from params import*
import numpy as np
def sensor(landmark, pose, noise=False):
""" computes the expected range and bearing given a landmark and the robot pose
with the option to add noise
Args... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,983 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /run.py |
"""
All files written in python 3. See ReadMe.txt for help.
This file runs the required components for
part A by calling partA.py and the required components for part B by calling
partB.py. It provides the figures for questions
2 and 3, then prints the results to question
6 to the terminalself.
"""
from partA impor... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,984 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /motion.py |
"""
This file contains the motion model for a simple
differential drive mobile robot. In the robots frame
positive x is forward and positive y is to the left.
The control commands are forward velocity and angular
velocity. Positive angular velocity if considered counterclockwise.
"""
import numpy as np
from params im... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,985 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /utils.py | """
utility functions
"""
from params import*
def landmark_data(lm_dict):
""" creates a dictionary of landmark ground truth data """
file = open(landmark_truth, "r")
for line in file:
if not line.startswith("#"):
values = line.split()
# subject number, global x, globaly
... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,986 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /params.py |
#### data file paths from UTIAS ####
odom_path = "ds0/ds0_Odometry.dat"
ground_truth = "ds0/ds0_Groundtruth.dat"
landmark_truth = "ds0/ds0_Landmark_Groundtruth.dat"
measure_data = "ds0/ds0_Measurement.dat"
barcodes_file = "ds0/ds0_Barcodes.dat"
#### data file paths I wrote to #####
motion_model_odom = "ds0/motion_mod... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,987 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /partA.py | """
All files written in python 3
This file runs the required components for
part A. It provides the figures for questions
2 and 3, then prints the results to question
6 to the terminal
"""
from motion import mobile_robot
from measure import*
from params import*
from utils import landmark_data
import matplotlib.pyp... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,988 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /localization.py | """
This class runs the robot localization pipeline. Determines robot
pose using UKF
"""
import filter
from motion import mobile_robot
from utils import*
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
class Localization(object):
def __init__(self):
# s... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,989 | makarandmandolkar/Unscented-Kalman-Filter | refs/heads/master | /filter.py |
"""
UKF implementation for differential drive robot with landmark sensor
"""
import numpy as np
from scipy import linalg
from motion import mobile_robot
from measure import sensor
from params import*
class UKF(object):
def __init__(self):
# sigma weights
# first weight for mean
self.... | {"/partB.py": ["/localization.py"], "/measure.py": ["/params.py"], "/run.py": ["/partA.py", "/partB.py"], "/motion.py": ["/params.py"], "/utils.py": ["/params.py"], "/partA.py": ["/motion.py", "/measure.py", "/params.py", "/utils.py"], "/localization.py": ["/filter.py", "/motion.py", "/utils.py"], "/filter.py": ["/moti... |
51,999 | CodeRecipeJYP/flask-restapi-teamtreehouse | refs/heads/master | /resources/reviews.py | from flask import jsonify, Blueprint
from flask_restful import Resource, Api, reqparse, inputs
import models
class ReviewList(Resource):
def __init__(self):
self.reqparse = reqparse.RequestParser()
self.reqparse.add_argument(
'course',
required=True,
type=input... | {"/app.py": ["/resources/reviews.py", "/resources/forms.py"]} |
52,000 | CodeRecipeJYP/flask-restapi-teamtreehouse | refs/heads/master | /app.py | from flask import Flask
import models
from resources.courses import courses_api
from resources.reviews import reviews_api
from resources.forms import forms_api
from flask_cors import CORS
HOST = '0.0.0.0'
PORT = 5000
app = Flask(__name__)
CORS(app)
app.register_blueprint(courses_api)
app.register_blueprint(reviews_... | {"/app.py": ["/resources/reviews.py", "/resources/forms.py"]} |
52,001 | CodeRecipeJYP/flask-restapi-teamtreehouse | refs/heads/master | /resources/forms.py | from flask import jsonify, Blueprint
from flask_restful import (Resource, Api, reqparse,
inputs, fields, marshal,
marshal_with, url_for, abort)
import models
form_fields = {
'id': fields.Integer,
'libraryName': fields.String,
'libraryLocation': fields.... | {"/app.py": ["/resources/reviews.py", "/resources/forms.py"]} |
52,002 | opsiff/djangowebsite | refs/heads/master | /XianYuBack/authorize/utils/jwcAuth.py | import requests
import re
import re
headers={
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
'Origin': 'http//jwch.fzu.edu.cn',
'Proxy-Connection': 'keep-alive',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/7... | {"/XianYuBack/authorize/views.py": ["/XianYuBack/authorize/models.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.