index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
25,599 | fgassert/eeUtil | refs/heads/master | /eeUtil/__init__.py | '''
Python wrapper for easier data management on Google Earth Engine.
Files are staged via Google Cloud Storage for upload.
A service account with access to GEE and Storage is required.
See: https://developers.google.com/earth-engine/service_account
```
import eeUtil
# initialize from environment variables
eeUtil.i... | {"/eeUtil/eeutil.py": ["/eeUtil/__init__.py"], "/eeUtil/__init__.py": ["/eeUtil/eeutil.py"], "/eeUtil/gsbucket.py": ["/eeUtil/__init__.py"]} |
25,600 | fgassert/eeUtil | refs/heads/master | /eeUtil/gsbucket.py | import os
import re
from google.cloud import storage
import logging
from . import eeutil
# Silence warnings from googleapiclient.discovery_cache
# see https://github.com/googleapis/google-api-python-client/issues/299
logging.getLogger('googleapiclient.discovery_cache').setLevel(logging.ERROR)
logger = logging.getLog... | {"/eeUtil/eeutil.py": ["/eeUtil/__init__.py"], "/eeUtil/__init__.py": ["/eeUtil/eeutil.py"], "/eeUtil/gsbucket.py": ["/eeUtil/__init__.py"]} |
25,622 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/migrations/0004_auto_20191129_0751.py | # Generated by Django 2.2.6 on 2019-11-29 07:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0003_auto_20191116_1921'),
]
operations = [
migrations.AlterField(
model_name='baseoption',
name='color',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,623 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/test_views_base.py | from django.test import TestCase, Client
import json
from products.base.models import Base, BaseOption
from brand.models import Brand
from products.base.serializers import BaseSerializer, BaseOptionSerializer
class BaseTestCase(TestCase):
def setUp(self):
self.client=Client()
self.brand = Bran... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,624 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/migrations/0003_auto_20191123_1835.py | # Generated by Django 2.2.7 on 2019-11-23 18:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ml', '0002_ml_user_id'),
]
operations = [
migrations.AlterField(
model_name='ml',
name='result',
field=m... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,625 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/face_color_ml.py | """ Face Color Machine Learning code """
from collections import Counter
import pprint
import base64
from io import BytesIO
from facenet_pytorch import MTCNN, InceptionResnetV1, extract_face
from PIL import Image, ImageDraw
import numpy as np
import cv2
from sklearn.cluster import KMeans
import imutils
from matplotlib ... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,626 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/test_views_ml.py | from django.test import TestCase, Client
from urllib.request import urlopen
from django.core.files import File
from django.core import files
from django.core.files.temp import NamedTemporaryFile
from ml.models import ML
from brand.models import Brand
import json
from products.base.models import Base, BaseOption
class... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,627 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/migrations/0005_auto_20191130_1643.py | # Generated by Django 2.2.6 on 2019-11-30 16:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('base', '0004_auto_20191129_0751'),
]
operations = [
migrations.AddField(
model_name='base',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,628 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/migrations/0004_auto_20191123_1840.py | # Generated by Django 2.2.7 on 2019-11-23 18:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ml', '0003_auto_20191123_1835'),
]
operations = [
migrations.AlterField(
model_name='ml',
name='file',
f... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,629 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0004_lipoption_optionname.py | # Generated by Django 2.2.6 on 2019-11-01 13:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lip', '0003_lipoption'),
]
operations = [
migrations.AddField(
model_name='lipoption',
name='optionName',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,630 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/migrations/0011_auto_20191126_1335.py | # Generated by Django 2.2.6 on 2019-11-26 13:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ml', '0010_auto_20191126_1333'),
]
operations = [
migrations.AlterField(
model_name='ml',
name='result',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,631 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/models.py | """ ML model """
from django.db import models
# from products.base import models as product_models
# Create your models here.
from products.base import models as base_model
class ML(models.Model):
""" model for ML results """
user_id = models.CharField(max_length=30, default="NONE")
result = models.CharFi... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,632 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/spiders/mac_lip.py | # -*- coding: utf-8 -*-
""" scrapy spider for aritaum webpage """
import random
import scrapy
from crawl.items import LipProduct, LipColor
from brand.models import Brand as Brand_db
from products.lip.models import Lip as Lip_db
from .color_tag import cal_color_tag
class MacLipSpider(scrapy.Spider):
""" scrapy spi... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,633 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/test_models.py | from products.lip.models import Lip, LipOption
from products.base.models import Base, BaseOption
from products.cheek.models import Cheek, CheekOption
from brand.models import Brand
import unittest
from ml.models import ML
from user.models import Profile
from django.contrib.auth.models import User
class ItemTest(unitte... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,634 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/views.py | """VIEW MODEL"""
import json
from json import JSONDecodeError
from django.http import JsonResponse, HttpResponseBadRequest
from rest_framework.parsers import FileUploadParser
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
from products.base impor... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,635 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/cheek/migrations/0001_initial.py | # Generated by Django 2.2.6 on 2019-12-02 11:34
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('brand', '0003_brand_name_ko'),
]
operations = [
migrations.CreateModel(
nam... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,636 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/urls.py | """ ML model urls """
from django.urls import path
from .views import *
urlpatterns = [
path('ml/', FileUploadView.as_view(), name="ML"),
]
| {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,637 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0011_auto_20191126_1807.py | # Generated by Django 2.2.6 on 2019-11-26 18:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lip', '0010_auto_20191121_0959'),
]
operations = [
migrations.AlterField(
model_name='lipoption',
name='color',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,638 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/admin.py | """ django admin page setting """
from django.contrib import admin
from .lip.models import Lip, LipOption
from .base.models import Base, BaseOption
from .cheek.models import Cheek, CheekOption
admin.site.register(Lip)
admin.site.register(LipOption)
admin.site.register(Base)
admin.site.register(BaseOption)
admin.site.r... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,639 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0010_auto_20191121_0959.py | # Generated by Django 2.2.6 on 2019-11-21 09:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lip', '0009_auto_20191117_2206'),
]
operations = [
migrations.AlterField(
model_name='lipoption',
name='sub_color',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,640 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/spiders/spider_helper.py | """ Help Scrapy Aritaum Spider for multiple product category """
def translate_category(raw_text, category):
""" get eng value """
trim_size = {'lip': 12, 'base': 14, 'cheek': 13}
eng_name = {'lip': {
"립스틱": "LIP_S",
"립글로즈": "LIP_G",
"립케어/립밤": "LIP_B",
"립틴트": "LIP_T",
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,641 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/models.py | """ Django Base Product Model """
from django.db import models
from brand import models as brand_models
# Create your models here.
class Base(models.Model):
""" django Base model """
POWDER = 'BAS_P'
CUSHION = 'BAS_CU'
FOUNDATION = 'BAS_F'
PRIMER = 'BAS_PR'
BB = 'BAS_B'
CONCEALER = 'BAS_C'... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,642 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/serializers.py | """ TODO : DOCSTRING"""
from rest_framework import serializers
from .models import Lip, LipOption
class LipOptionSerializer(serializers.ModelSerializer):
""" TODO : DOCSTRING"""
class Meta:
""" TODO : DOCSTRING"""
model = LipOption
fields = ['color', 'sub_color', 'color_hex', 'optionNa... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,643 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/cheek/serializers.py | """ TODO : DOCSTRING"""
from rest_framework import serializers
from .models import Cheek, CheekOption
class CheekOptionSerializer(serializers.ModelSerializer):
""" TODO : DOCSTRING"""
class Meta:
""" TODO : DOCSTRING"""
model = CheekOption
fields = ['color', 'sub_color', 'color_hex', '... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,644 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/migrations/0006_auto_20191202_1618.py | # Generated by Django 2.2.6 on 2019-12-02 16:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0005_auto_20191130_1643'),
]
operations = [
migrations.AlterField(
model_name='base',
name='category',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,645 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0002_auto_20191101_1303.py | # Generated by Django 2.2.6 on 2019-11-01 13:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('brand', '0001_initial'),
('lip', '0001_initial'),
]
operations = [
migrations.AddField(
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,646 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/models.py | """ model for lip cosmetic information """
from django.db import models
from brand import models as brand_models
# Create your models here.
class Lip(models.Model):
""" django lip model """
STICK = 'LIP_S'
GLOSS = 'LIP_G'
BALM = 'LIP_B'
TINT = 'LIP_T'
CATEGORY = (
(STICK, 'Stick'),
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,647 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/test_views_lip.py | """ test views """
from django.test import TestCase, Client
import json
from products.lip.models import Lip, LipOption
from brand.models import Brand
from products.lip.serializers import LipSerializer, LipOptionSerializer
class LipTestCase(TestCase):
def setUp(self):
self.client=Client()
self.b... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,648 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0008_lipoption_sub_color.py | # Generated by Django 2.2.6 on 2019-11-11 17:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lip', '0007_auto_20191111_1712'),
]
operations = [
migrations.AddField(
model_name='lipoption',
name='sub_color',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,649 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/spiders/mac_base.py | # -*- coding: utf-8 -*-
""" scrapy spider for aritaum webpage """
import random
import scrapy
from crawl.items import BaseProduct, BaseColor
from brand.models import Brand as Brand_db
from products.base.models import Base as Base_db
from .color_tag import cal_color_tag
class MacLipSpider(scrapy.Spider):
""" scrap... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,650 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/user/tests.py | """ TODO : DOCSTRING"""
# pylint: disable=unused-variable
# pylint: disable=unused-import
import json
from django.test import TestCase, Client
from django.contrib.auth.models import User
from .models import Profile
class ModelTestCase(TestCase):
""" TODO : DOCSTRING"""
def test_csrf(self):
""" TODO :... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,651 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/user/views.py | """VIEW MODEL"""
import json
from json import JSONDecodeError
from django.http import HttpResponse, HttpResponseNotAllowed, JsonResponse, HttpResponseBadRequest
from django.contrib.auth import login, authenticate, logout
from django.contrib.auth.models import User
from django.views.decorators.csrf import ensure_csrf_co... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,652 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0006_auto_20191108_1920.py | # Generated by Django 2.2.6 on 2019-11-08 19:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lip', '0005_lip_img_url'),
]
operations = [
migrations.AddField(
model_name='lipoption',
name='color_hex',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,653 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/migrations/0019_ml_output_image.py | # Generated by Django 2.2.6 on 2019-12-04 11:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ml', '0018_ml_product'),
]
operations = [
migrations.AddField(
model_name='ml',
name='output_image',
fie... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,654 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/migrations/0002_auto_20191116_1735.py | # Generated by Django 2.2.6 on 2019-11-16 17:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='baseoption',
name='color',
f... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,655 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/apps.py | """ ML apps.py """
from django.apps import AppConfig
class MlConfig(AppConfig):
""" docstring """
name = 'ml'
| {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,656 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/migrations/0017_auto_20191126_1355.py | # Generated by Django 2.2.6 on 2019-11-26 13:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ml', '0016_auto_20191126_1350'),
]
operations = [
migrations.AlterField(
model_name='ml',
name='base',
f... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,657 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/views.py | """ TODO : DOCSTRING"""
from urllib.parse import urlparse, parse_qs
from django.http import JsonResponse, HttpResponseNotAllowed
from .models import Base, BaseOption
from .serializers import BaseSerializer
def search(request, option):
""" TODO : DOCSTRING"""
# pylint: disable=too-many-branches
if request.... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,658 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/migrations/0002_ml_user_id.py | # Generated by Django 2.2.7 on 2019-11-23 17:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ml', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='ml',
name='user_id',
field=model... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,659 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0012_auto_20191126_1917.py | # Generated by Django 2.2.6 on 2019-11-26 19:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lip', '0011_auto_20191126_1807'),
]
operations = [
migrations.AddField(
model_name='lip',
name='product_url',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,660 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0007_auto_20191111_1712.py | # Generated by Django 2.2.6 on 2019-11-11 17:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lip', '0006_auto_20191108_1920'),
]
operations = [
migrations.AddField(
model_name='lip',
name='form',
f... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,661 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/user/models.py | """MODELS"""
from django.db import models
from django.db.models.signals import post_save
from django.conf import settings
from django.dispatch import receiver
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
class Profile(models.Model):
"""PROFILE MODELS"""
user = ... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,662 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/brand/models.py | """ model for brands information """
from django.db import models
class Brand(models.Model):
""" django brand model store name, url for sale calender """
name = models.CharField(max_length=20)
url = models.TextField(default="//:0")
name_ko = models.CharField(max_length=20)
def __str__(self):
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,663 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/cheek/migrations/0002_auto_20191202_1618.py | # Generated by Django 2.2.6 on 2019-12-02 16:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cheek', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='cheek',
name='category',
fi... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,664 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/cheek/views.py | """ CHEEK VIEWS """
from urllib.parse import urlparse, parse_qs
from django.http import JsonResponse, HttpResponseNotAllowed
from .models import Cheek, CheekOption
from .serializers import CheekSerializer
def search(request, option):
""" TODO : DOCSTRING"""
if request.method == "GET":
url = urlparse('... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,665 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/urls.py | """products URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,666 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/test_items.py | import unittest
import os
import django
from crawl.items import LipProduct, Brand
from scrapy_djangoitem import DjangoItem
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend.settings")
django.setup()
class ItemTest(unittest.TestCase):
def assert_sorted_equal(self, first, second, msg=None):
return ... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,667 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/spiders/aritaum_cheek.py | # -*- coding: utf-8 -*-
""" scrapy spider for aritaum webpage """
import scrapy
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
import requests
import webcolors
from PIL import Image
from crawl.items import CheekProduct, CheekColor, Brand
from brand.models import Brand as Br... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,668 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/spiders/mac_cheek.py | # -*- coding: utf-8 -*-
""" scrapy spider for aritaum webpage """
import scrapy
from crawl.items import CheekProduct, CheekColor
from brand.models import Brand as Brand_db
from products.cheek.models import Cheek as Cheek_db
from .color_tag import cal_color_tag
class MacLipSpider(scrapy.Spider):
""" scrapy spider ... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,669 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/items.py | """Define Scrapy Items"""
# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy_djangoitem import DjangoItem
from brand.models import Brand as BrandModel
from products.lip.models import Lip, Lip... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,670 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0009_auto_20191117_2206.py | # Generated by Django 2.2.6 on 2019-11-17 22:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('lip', '0008_lipoption_sub_color'),
]
operations = [
migrations.AlterField(
model_name='lipoptio... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,671 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/admin.py | """ admin """
from django.contrib import admin
# Register your models here.
from .models import ML
admin.site.register(ML)
| {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,672 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/serializers.py | """ file serializer """
from rest_framework import serializers
from .models import ML
class FileSerializer(serializers.ModelSerializer):
""" docstring """
class Meta:
""" docstring """
model = ML
fields = "__all__"
| {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,673 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/spiders/color_tag.py | """ finds closest sub_color tag """
import webcolors
from colormath.color_objects import sRGBColor, LabColor
from colormath.color_conversions import convert_color
from colormath.color_diff import delta_e_cie2000
# PINK COLOR
PINK_LIST = [(255, 202, 226), (236, 199, 205), (252, 174, 187), (255, 141, 161), (251, 132, 18... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,674 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/views.py | """ TODO : DOCSTRING"""
from urllib.parse import urlparse, parse_qs
from django.http import JsonResponse, HttpResponseNotAllowed
from .models import Lip, LipOption
from .serializers import LipSerializer
def search(request, option):
""" TODO : DOCSTRING"""
# pylint: disable=too-many-branches, too-many-nested-b... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,675 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0013_auto_20191202_1618.py | # Generated by Django 2.2.6 on 2019-12-02 16:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lip', '0012_auto_20191126_1917'),
]
operations = [
migrations.AlterField(
model_name='lip',
name='category',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,676 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/cheek/models.py | """ model for lip cosmetic information """
from django.db import models
from brand import models as brand_models
class Cheek(models.Model):
""" django lip model """
BLUSHER = 'CHK_B'
CONTOURING = 'CHK_C'
HIGHLIGHT = 'CHK_H'
CATEGORY = (
(BLUSHER, 'Blusher'),
(CONTOURING, 'Contourin... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,677 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/serializers.py | """ TODO : DOCSTRING"""
from rest_framework import serializers
from .models import Base, BaseOption
class BaseOptionSerializer(serializers.ModelSerializer):
""" TODO : DOCSTRING"""
class Meta:
""" TODO : DOCSTRING"""
model = BaseOption
fields = ['color', 'sub_color', 'color_hex', 'opti... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,678 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/brand/migrations/0002_auto_20191102_1642.py | # Generated by Django 2.2.6 on 2019-11-02 16:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('brand', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='brand',
name='url',
field=m... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,679 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/crawl/pipelines.py | """ spider pipelines """
# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
from products.lip.models import Lip, LipOption
from products.base.models import Base, BaseOption
fro... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,680 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/migrations/0001_initial.py | # Generated by Django 2.2.6 on 2019-11-16 17:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('brand', '0003_brand_name_ko'),
]
operations = [
migrations.CreateModel(
nam... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,681 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/lip/migrations/0003_lipoption.py | # Generated by Django 2.2.6 on 2019-11-01 13:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('lip', '0002_auto_20191101_1303'),
]
operations = [
migrations.CreateModel(
name='LipOption',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,682 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/test_views_cheek.py | from django.test import TestCase, Client
import json
from products.cheek.models import Cheek, CheekOption
from brand.models import Brand
from products.cheek.serializers import CheekSerializer, CheekOptionSerializer
class BaseTestCase(TestCase):
def setUp(self):
self.client=Client()
self.brand ... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,683 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/migrations/0018_ml_product.py | # Generated by Django 2.2.6 on 2019-11-29 04:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('base', '0003_auto_20191116_1921'),
('ml', '0017_auto_20191126_1355'),
]
operations = [
migrations.A... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,684 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/products/base/migrations/0003_auto_20191116_1921.py | # Generated by Django 2.2.6 on 2019-11-16 19:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0002_auto_20191116_1735'),
]
operations = [
migrations.AlterField(
model_name='baseoption',
name='color',
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,685 | swsnu/swpp2019-team2 | refs/heads/dev/master | /backend/ml/find_base.py | """ finds closest base product """
def hex_into_rgb(hexa):
""" change hex value into rgb value """
if hexa[0] == '#':
hexa = hexa[1:]
str_r = hexa[0:2]
str_g = hexa[2:4]
str_b = hexa[4:]
hex_r = '0x' + str_r
hex_g = '0x' + str_g
hex_b = '0x' + str_b
rgb_r = int(hex_r, 16)
... | {"/backend/crawl/spiders/mac_lip.py": ["/backend/crawl/spiders/color_tag.py"], "/backend/ml/views.py": ["/backend/ml/face_color_ml.py", "/backend/ml/serializers.py", "/backend/ml/models.py", "/backend/ml/find_base.py"], "/backend/ml/urls.py": ["/backend/ml/views.py"], "/backend/products/admin.py": ["/backend/products/l... |
25,689 | waynekwon/finalproject | refs/heads/master | /clean_data.py | import pandas as pd
def get_clean_data(file_name):
moviedata=pd.read_csv(file_name)
#sort by years and drop observations before year 2000
moviedata.sort_values(by='title_year')
moviedata = moviedata.drop(moviedata[moviedata.title_year < 2000].index)
#binning response variable into categorical v... | {"/website.py": ["/clean_data.py", "/final_model.py", "/movie_recommend.py"]} |
25,690 | waynekwon/finalproject | refs/heads/master | /linreg.py | from sklearn.linear_model import LinearRegression
from sklearn.cross_validation import train_test_split
import pandas as pd
import numpy as np
#must run code to clean the dataset first upon using the linear regression
mydata=pd.read_csv('rough_cleandata.csv', index_col = 0)
#creating variables
predictors = ['color', ... | {"/website.py": ["/clean_data.py", "/final_model.py", "/movie_recommend.py"]} |
25,691 | waynekwon/finalproject | refs/heads/master | /website.py | from flask import Flask, render_template, redirect, url_for, request
from clean_data import get_clean_data
from final_model import predict_movie_rating
from movie_recommend import recommend_movie
import pandas
app = Flask(__name__)
#importing rawdata and cleaning it so that it can be used in the model
file_n = 'movie... | {"/website.py": ["/clean_data.py", "/final_model.py", "/movie_recommend.py"]} |
25,692 | waynekwon/finalproject | refs/heads/master | /final_model.py | import numpy as np
import pandas as pd
from sklearn.linear_model import LogisticRegression
def predict_movie_rating(list_of_user_input, data_for_prediction):
#storing the resopnse variable in 'response' for easier code writing
response = data_for_prediction['movie_response']
#create a list of predictors... | {"/website.py": ["/clean_data.py", "/final_model.py", "/movie_recommend.py"]} |
25,693 | waynekwon/finalproject | refs/heads/master | /correlation.py | import pandas as pd
import matplotlib.pyplot as plt
from pandas.tools import plotting
mydata=pd.read_csv('rough_cleandata.csv')
mydata.drop(['Unnamed: 0'], axis = 1, inplace = True)
#correlation of selective variables - put in name of columns you wish to calculate
mydata.loc[mydata["movie_response"]=="Bad", "mov... | {"/website.py": ["/clean_data.py", "/final_model.py", "/movie_recommend.py"]} |
25,694 | waynekwon/finalproject | refs/heads/master | /movie_recommend.py | import pandas
def recommend_movie(genre_from_user, data_used_for_recommendation):
#filtering user_input for movie recommendation
for genres in genre_from_user:
data_used_for_recommendation = data_used_for_recommendation[data_used_for_recommendation[genres]== 1]
data_used_for_recommendation.sort_val... | {"/website.py": ["/clean_data.py", "/final_model.py", "/movie_recommend.py"]} |
25,695 | waynekwon/finalproject | refs/heads/master | /classification_models.py | import numpy as np
import pandas as pd
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.cross_validation import train_test_split
from sklearn import metrics
from sklearn.tree import DecisionTreeClassifier
from clean_data import get_clean_data
file_n =... | {"/website.py": ["/clean_data.py", "/final_model.py", "/movie_recommend.py"]} |
25,728 | dongxiangcat/questionnaire | refs/heads/master | /utils.py | # -*- coding: utf-8 -*-
from django.shortcuts import render
def mp_render(request,template,context = {}):
pass
return render(request,template,context) | {"/question/models.py": ["/theme/models.py"], "/theme/views.py": ["/theme/models.py", "/theme/forms.py", "/utils.py"]} |
25,729 | dongxiangcat/questionnaire | refs/heads/master | /theme/forms.py | # -*- coding: utf-8 -*-
from django import forms
class AddThemeForm(forms.Form):
title = forms.CharField(max_length=250)
description = forms.CharField(max_length=500)
| {"/question/models.py": ["/theme/models.py"], "/theme/views.py": ["/theme/models.py", "/theme/forms.py", "/utils.py"]} |
25,730 | dongxiangcat/questionnaire | refs/heads/master | /question/models.py | from django.db import models
from theme.models import Theme
from django.utils import timezone
# Create your models here.
class Question(models.Model):
title = models.CharField(max_length=250,null=False,default='')
description = models.CharField(max_length=250,null=False,default='')
theme = mod... | {"/question/models.py": ["/theme/models.py"], "/theme/views.py": ["/theme/models.py", "/theme/forms.py", "/utils.py"]} |
25,731 | dongxiangcat/questionnaire | refs/heads/master | /theme/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Theme',
fields=[
('id', models.AutoField(verbos... | {"/question/models.py": ["/theme/models.py"], "/theme/views.py": ["/theme/models.py", "/theme/forms.py", "/utils.py"]} |
25,732 | dongxiangcat/questionnaire | refs/heads/master | /question/views.py | from django.shortcuts import render
from django.http import HttpResponse
from .models import Question,Answer
from theme.models import Theme
from utils import mp_render
import json
# Create your views here.
def index(request,question_id):
try:
question = Question.objects.get(id=question_id)
answers = Answer.obje... | {"/question/models.py": ["/theme/models.py"], "/theme/views.py": ["/theme/models.py", "/theme/forms.py", "/utils.py"]} |
25,733 | dongxiangcat/questionnaire | refs/heads/master | /theme/views.py | # -*- coding: utf-8 -*-
from django.shortcuts import render
from django.http import HttpResponse,HttpResponseRedirect
from .models import Theme
from .forms import AddThemeForm
from utils import mp_render
# Create your views here.
#首页
def index(request):
try:
theme = Theme.objects.latest()
context =... | {"/question/models.py": ["/theme/models.py"], "/theme/views.py": ["/theme/models.py", "/theme/forms.py", "/utils.py"]} |
25,734 | dongxiangcat/questionnaire | refs/heads/master | /theme/models.py | from django.db import models
from django.utils import timezone
# Create your models here.
class Theme(models.Model):
title = models.CharField(max_length=250,null=False,default='')
description = models.TextField(max_length=500,null=False,default='')
question_num = models.IntegerField(null=... | {"/question/models.py": ["/theme/models.py"], "/theme/views.py": ["/theme/models.py", "/theme/forms.py", "/utils.py"]} |
25,758 | gitter-badger/ethically | refs/heads/master | /ethically/we/__init__.py | __all__ = ['GenderBiasWE']
from .bias import GenderBiasWE
| {"/ethically/we/core.py": ["/ethically/we/utils.py"], "/ethically/tests/test_we.py": ["/ethically/we/__init__.py", "/ethically/we/utils.py"]} |
25,759 | gitter-badger/ethically | refs/heads/master | /ethically/we/utils.py | import numpy as np
def normalize(v):
if v.ndim != 1:
raise ValueError('v should be 1-D, {}-D was given'.format(
v.ndim))
norm = np.linalg.norm(v)
if norm == 0:
return v
return v / norm
def cosine_similarity(v, u):
v_norm = np.linalg.norm(v)
u_norm = np.linalg.norm... | {"/ethically/we/core.py": ["/ethically/we/utils.py"], "/ethically/tests/test_we.py": ["/ethically/we/__init__.py", "/ethically/we/utils.py"]} |
25,760 | gitter-badger/ethically | refs/heads/master | /ethically/we/core.py | import copy
import os
import warnings
import matplotlib.pylab as plt
import numpy as np
import pandas as pd
import seaborn as sns
from gensim.models.keyedvectors import KeyedVectors
from pkg_resources import resource_filename
from sklearn.decomposition import PCA
from sklearn.svm import LinearSVC
from tqdm import tqdm... | {"/ethically/we/core.py": ["/ethically/we/utils.py"], "/ethically/tests/test_we.py": ["/ethically/we/__init__.py", "/ethically/we/utils.py"]} |
25,761 | gitter-badger/ethically | refs/heads/master | /ethically/tests/test_we.py | "Unit test module for ethically.we.core "
# pylint: disable=redefined-outer-name,unused-variable,expression-not-assigned,singleton-comparison,protected-access
import copy
import os
from math import isclose
import numpy as np
import pytest
from gensim.models.keyedvectors import KeyedVectors
from pkg_resources import r... | {"/ethically/we/core.py": ["/ethically/we/utils.py"], "/ethically/tests/test_we.py": ["/ethically/we/__init__.py", "/ethically/we/utils.py"]} |
25,763 | DM8tyProgrammer/ml-movie-trailer | refs/heads/master | /util.py | """
This modules contains the utilities code.
"""
import unicodecsv
def read_csv(file):
""" loads the csv as list of dictionary from the specfied file """
with open(file, "rb") as f:
return list(unicodecsv.DictReader(f))
| {"/movie_center.py": ["/util.py", "/movie.py"]} |
25,764 | DM8tyProgrammer/ml-movie-trailer | refs/heads/master | /movie_center.py | """
This module integrates all the pieces together to wield the website
"""
import util
from fresh_tomatoes import open_movies_page
from movie import Movie
def main():
""" load the movies meta-data from the csv and \
objectify them and showcase the site """
# load the movies
raw_movies = util.re... | {"/movie_center.py": ["/util.py", "/movie.py"]} |
25,765 | DM8tyProgrammer/ml-movie-trailer | refs/heads/master | /movie.py | """
This module holds the Movie class which represents meta-data of a movie.
"""
import re
class Movie():
"""Represents meta data of a Moive"""
def __init__(self, title, poster_image_url, trailer_youtube_url, genres):
self.title = title
self.poster_image_url = poster_image_url
self.... | {"/movie_center.py": ["/util.py", "/movie.py"]} |
25,791 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /util/log.py | import logging
from datetime import datetime
from locale import LC_ALL, setlocale
setlocale(LC_ALL, 'pt_BR.utf-8')
def log(nome_do_arquivo, mensagem, tipo, titulo=False, console=True, modo="a"):
logger = logging.getLogger(f"{mensagem}")
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.s... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,792 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /modules/conteudo.py | # importando a classe Inserir_Conteudo
from classes.Conteudo import Inserir_Conteudo
from util.funcoes import * # funcao de criacao de menu e pasta
from util.log import log # funcao de criacao de logs.
from locale import LC_ALL, setlocale
import os
import sys
import eel
from datetime import datetime, timedelta
# fun... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,793 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /modules/prova.py | from classes.Conteudo import Inserir_Prova
from util.funcoes import *
from config.prova import configuracao_prova
import os
from util.log import log
from locale import LC_ALL, setlocale
from datetime import datetime, timedelta
def iniciar_insercao_prova(disciplinas, configuracoes, iniciar, configuracao_prova=configur... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,794 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /util/funcoes.py | import os
import pathlib
from util.log import log
from datetime import datetime
import json
def menu(*args):
os.system("cls")
print(f"\nAUTOSEI\n\n")
for key, item in enumerate(args):
print(f"{key+1}. {item}")
print(f"\n{len(args)+1}. Sair\n\n\n")
return len(args)+1
def criar_pasta(... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,795 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /teste/main.py | import pymongo
class ConteudoMDB:
def __init__(self, banco):
self.client = pymongo.MongoClient(
"mongodb+srv://novousuario:ggwaE2eZPpPAGAEx@cluster0.2if2x.mongodb.net")
self.banco = self.client[f"{banco}"]
self.table = None
def tabela(self, tabela):
table = self.... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,796 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /modules/conteudoMDB.py | from classes.ConteudoMDB import ConteudoMDB
import eel
def criar_db(nome):
criar = ConteudoMDB(nome)
criar.tabela("tabela de teste")
result = criar.insert({"criado": True})
return result
def listar_dbs():
listar = ConteudoMDB()
result = listar.list_dbs()
return result
def inserir(banco, d... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,797 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /main.py | import eel
import json
from modules.conteudo import iniciar_insercao
from modules.conteudoMDB import *
# from modules.prova import iniciar_insercao_prova
from util.funcoes import *
import os
# APLICAÇÂO
eel.init('HTMLS', allowed_extensions=['.js', '.html'])
@eel.expose
def inserir_documento(banco, document, tabela,... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,798 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /classes/ConteudoMDB.py | import pymongo
class ConteudoMDB:
def __init__(self, banco="Default"):
self.client = pymongo.MongoClient(
f"mongodb://novousuario:ggwaE2eZPpPAGAEx@cluster0-shard-00-00.2if2x.mongodb.net:27017,cluster0-shard-00-01.2if2x.mongodb.net:27017,cluster0-shard-00-02.2if2x.mongodb.net:27017/{banco}?ss... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,799 | Rutemberg/AUTOSEI-GUI | refs/heads/main | /classes/Conteudo.py | from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.... | {"/modules/conteudo.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/modules/prova.py": ["/classes/Conteudo.py", "/util/funcoes.py", "/util/log.py"], "/util/funcoes.py": ["/util/log.py"], "/modules/conteudoMDB.py": ["/classes/ConteudoMDB.py"], "/main.py": ["/modules/conteudo.py", "/modules/conteudoM... |
25,801 | siliu3/c-SewpPocket | refs/heads/master | /layers/use_case_layer/actors/__init__.py | from .someone_actor import SomeoneActor
from .contributor_actor import ContributorActor
from .consumer_actor import ConsumerActor
from .user_actor import UserActor
from .regulator_actor import RegulatorActor
| {"/layers/use_case_layer/actors/__init__.py": ["/layers/use_case_layer/actors/someone_actor.py", "/layers/use_case_layer/actors/contributor_actor.py", "/layers/use_case_layer/actors/consumer_actor.py", "/layers/use_case_layer/actors/user_actor.py", "/layers/use_case_layer/actors/regulator_actor.py"], "/layers/domain_la... |
25,802 | siliu3/c-SewpPocket | refs/heads/master | /layers/domain_layer/repositories/repository.py | from layers.infrastructure_layer.db.orm_db import OrmDb
from libs.cutoms.singleton import Singleton
class Repository(object):
__metaclass__ = Singleton
def __init__(self):
self.session = OrmDb().get_session()
| {"/layers/use_case_layer/actors/__init__.py": ["/layers/use_case_layer/actors/someone_actor.py", "/layers/use_case_layer/actors/contributor_actor.py", "/layers/use_case_layer/actors/consumer_actor.py", "/layers/use_case_layer/actors/user_actor.py", "/layers/use_case_layer/actors/regulator_actor.py"], "/layers/domain_la... |
25,803 | siliu3/c-SewpPocket | refs/heads/master | /layers/domain_layer/repositories/user_repository.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
user_repository.py
Created by BigYuki on 15/11/10.
"""
from repository import Repository
from layers.domain_layer.user_aggregate import User,Contributor,Consumer
class UserRepository(Repository):
def add(self, user):
self.session.add(user)
self.... | {"/layers/use_case_layer/actors/__init__.py": ["/layers/use_case_layer/actors/someone_actor.py", "/layers/use_case_layer/actors/contributor_actor.py", "/layers/use_case_layer/actors/consumer_actor.py", "/layers/use_case_layer/actors/user_actor.py", "/layers/use_case_layer/actors/regulator_actor.py"], "/layers/domain_la... |
25,804 | siliu3/c-SewpPocket | refs/heads/master | /devhelper/gendata/__init__.py | from gen_account import Generate_Account
from gen_regulator import Generate_Regulator
from layers.infrastructure_layer.context import Transaction_
@Transaction_
def Generate_Data():
regulator_id = Generate_Regulator()
account_username = Generate_Account(regulator_id)
| {"/layers/use_case_layer/actors/__init__.py": ["/layers/use_case_layer/actors/someone_actor.py", "/layers/use_case_layer/actors/contributor_actor.py", "/layers/use_case_layer/actors/consumer_actor.py", "/layers/use_case_layer/actors/user_actor.py", "/layers/use_case_layer/actors/regulator_actor.py"], "/layers/domain_la... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.