index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
39,993,758
binaryeast/teablog
refs/heads/master
/blog/admin.py
from django.contrib import admin from .models import TeaBlog, TeaPost, Comment @admin.register(TeaBlog) class TeaBlogAdmin(admin.ModelAdmin): list_display = ["title", "owner", "is_public"] list_display_link = ["title", "owner"] @admin.register(TeaPost) class TeaPostAdmin(admin.ModelAdmin): list_dis...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py", "/blog/serializers.py"], "/blog/serializers.py": ["/blog/models.py"], "/blog/urls.py": ["/blog/views.py"]}
39,993,759
binaryeast/teablog
refs/heads/master
/blog/migrations/0002_auto_20210318_1750.py
# Generated by Django 3.1.6 on 2021-03-18 08:50 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('blog', '0001_initial'), ...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py", "/blog/serializers.py"], "/blog/serializers.py": ["/blog/models.py"], "/blog/urls.py": ["/blog/views.py"]}
39,993,760
binaryeast/teablog
refs/heads/master
/blog/views.py
from django.http import Http404 from django.contrib.auth.models import User from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status, permissions, renderers, viewsets from rest_framework.decorators import action from .models import TeaBlog, TeaPost, Commen...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py", "/blog/serializers.py"], "/blog/serializers.py": ["/blog/models.py"], "/blog/urls.py": ["/blog/views.py"]}
39,993,761
binaryeast/teablog
refs/heads/master
/blog/serializers.py
from rest_framework import serializers from .models import TeaBlog, TeaPost, Comment from django.contrib.auth.models import User class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ['url', 'username', 'email', 'groups'] extra_kwargs = {'url': {'view_name'...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py", "/blog/serializers.py"], "/blog/serializers.py": ["/blog/models.py"], "/blog/urls.py": ["/blog/views.py"]}
39,993,762
binaryeast/teablog
refs/heads/master
/blog/models.py
from django.db import models from django.contrib.auth import get_user_model User = get_user_model() class TimeStampModel(models.Model): class Meta: abstract = True created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) class TeaBlog(models.Model): ...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py", "/blog/serializers.py"], "/blog/serializers.py": ["/blog/models.py"], "/blog/urls.py": ["/blog/views.py"]}
39,993,763
binaryeast/teablog
refs/heads/master
/blog/migrations/0001_initial.py
# Generated by Django 3.1.6 on 2021-03-14 07:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py", "/blog/serializers.py"], "/blog/serializers.py": ["/blog/models.py"], "/blog/urls.py": ["/blog/views.py"]}
39,993,764
binaryeast/teablog
refs/heads/master
/blog/urls.py
from django.urls import include, path, re_path from rest_framework.routers import DefaultRouter from .views import UserViewSet, BlogViewSet app_name = "blog" # Create a router and register our viewsets with it. router = DefaultRouter() router.register(r'blogs', BlogViewSet, basename="blog") router.register(r'users',...
{"/blog/admin.py": ["/blog/models.py"], "/blog/views.py": ["/blog/models.py", "/blog/serializers.py"], "/blog/serializers.py": ["/blog/models.py"], "/blog/urls.py": ["/blog/views.py"]}
40,068,069
neldis93/Python-Mysql
refs/heads/master
/python-mysql/manager.py
def listclients(clients): cont=1 for i in clients: data= "{0}. DNI: {1} | First name: {2} | Last name: {3}" print(data.format(cont, i[3], i[1], i[2] )) cont +=1 print(" ") def is_valid_client(): while True: first_name= str(input('Please enter your first name: ')) ...
{"/python-mysql/database/connection.py": ["/python-mysql/database/base.py"]}
40,068,070
neldis93/Python-Mysql
refs/heads/master
/python-mysql/database/connection.py
import mysql.connector from mysql.connector import Error from .base import get_secret class DAO: def __init__(self): try: self.myconnection= mysql.connector.connect( port=get_secret('PORT'), user=get_secret('USER'), password=get_secret('PASSWORD...
{"/python-mysql/database/connection.py": ["/python-mysql/database/base.py"]}
40,075,091
SlBl286/kivy
refs/heads/main
/main.py
from config import * from kivy.app import App from kivy.properties import StringProperty,BooleanProperty from kivy.uix.widget import Widget; from kivy.uix.button import Button; from kivy.uix.screenmanager import ScreenManager,Screen; from kivy.lang import Builder Builder.load_file('Screen/LayoutScreen.kv') class Layou...
{"/main.py": ["/config.py"]}
40,075,092
SlBl286/kivy
refs/heads/main
/config.py
from kivy.config import Config Config.set('kivy', 'exit_on_escape', '0')
{"/main.py": ["/config.py"]}
40,304,800
abhik92/avicii
refs/heads/master
/main.py
from nadal import Slam from datetime import datetime, timedelta match_score = open("points.txt",'r') score_board = open("scoresheet.txt",'w') MAX_DAYS = 200 end = datetime.now() start = end - timedelta(days=MAX_DAYS*7/5 + 50) for points in match_score: game = points.split() tournament = game[0] final = g...
{"/french.py": ["/nadal.py", "/hawkeye.py"], "/main.py": ["/nadal.py"]}
40,376,182
LaraM21/Vislice
refs/heads/master
/vislice.py
import bottle import model COOKIE_ID_IGRE = "ID_IGRE" @bottle.get("/") def index(): return bottle.template("index.tpl") @bottle.get("/igra/") def nova_igra(): vislice = model.Vislice.preberi_iz_datoteke() id_igre = vislice.nova_igra() print(vislice.igre) vislice.zapisi_v_datoteko() bottle.res...
{"/vislice.py": ["/model.py"], "/tekstovni_vmesnik.py": ["/model.py"]}
40,376,183
LaraM21/Vislice
refs/heads/master
/tekstovni_vmesnik.py
import model def izpis_igre(igra): tekst = f"""#######################\n Pravilni del gesla : {igra.pravilni_del_gesla()}\n Število poskusov : {model.STEVILO_DOVOLJENIH_NAPAK + 1 - igra.stevilo_napak()}\n Nepravilne črke : {igra.nepravilni.ugibi()} #######################\n""" return tekst d...
{"/vislice.py": ["/model.py"], "/tekstovni_vmesnik.py": ["/model.py"]}
40,376,184
LaraM21/Vislice
refs/heads/master
/model.py
import json STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = '+' PONOVLJENA_CRKA = 'o' NAPACNA_CRKA = '-' ZMAGA = 'W' PORAZ = 'X' ZACETEK = 'A' DATOTEKA_S_STANJEM= "podatki.json" class Vislice: """ Krovni objekt, ki upravlja z vsemi igrami (baza vseh iger in kaj dogaja noter) """ def __init__(self,za...
{"/vislice.py": ["/model.py"], "/tekstovni_vmesnik.py": ["/model.py"]}
40,459,277
vibrainium-analytics/ava
refs/heads/master
/User_Interface/Home_Page.py
import tkinter as tk from tkinter import messagebox from tkinter import * from tkinter import ttk # File system access library import glob, os import json class Home_Page(tk.Frame): # Update page with new content every 1 second def poll (self): with open(directory['app_data'] + 'select...
{"/ava.py": ["/User_Interface/Plot_Page.py", "/User_Interface/Home_Page.py", "/User_Interface/Configure_Test_Page.py", "/User_Interface/New_Vehicle_Page.py", "/User_Interface/Test_Is_Running_Page.py", "/User_Interface/Save_Test_Page.py", "/User_Interface/Results_Page.py", "/User_Interface/Tutorial_Main_Page.py", "/User...
40,459,278
vibrainium-analytics/ava
refs/heads/master
/User_Interface/Save_Test_Page.py
import tkinter as tk from tkinter import messagebox from tkinter import * from tkinter import ttk from Signal_Processing.Signal_Process import Signal_Process # File system access library import glob, os import json class Save_Test_Page(tk.Frame): def __init__(self, parent, controller): tk.Fra...
{"/ava.py": ["/User_Interface/Plot_Page.py", "/User_Interface/Home_Page.py", "/User_Interface/Configure_Test_Page.py", "/User_Interface/New_Vehicle_Page.py", "/User_Interface/Test_Is_Running_Page.py", "/User_Interface/Save_Test_Page.py", "/User_Interface/Results_Page.py", "/User_Interface/Tutorial_Main_Page.py", "/User...
40,459,279
vibrainium-analytics/ava
refs/heads/master
/User_Interface/New_Vehicle_Page.py
import tkinter as tk from tkinter import messagebox from tkinter import ttk from tkinter import * class New_Vehicle_Page(tk.Frame): def entry(self,controller): veh = self.name.get() cylinders = self.cylnd.get() tiresize = self.tire.get() advanced...
{"/ava.py": ["/User_Interface/Plot_Page.py", "/User_Interface/Home_Page.py", "/User_Interface/Configure_Test_Page.py", "/User_Interface/New_Vehicle_Page.py", "/User_Interface/Test_Is_Running_Page.py", "/User_Interface/Save_Test_Page.py", "/User_Interface/Results_Page.py", "/User_Interface/Tutorial_Main_Page.py", "/User...
40,459,280
vibrainium-analytics/ava
refs/heads/master
/User_Interface/Test_Is_Running_Page.py
import tkinter as tk from tkinter import messagebox from tkinter import * from tkinter import ttk from Signal_Processing.Delay_Bar import Delay_Bar # File system access library import glob, os import json class Test_Is_Running_Page(tk.Frame): # Update page with new content every 1 second ...
{"/ava.py": ["/User_Interface/Plot_Page.py", "/User_Interface/Home_Page.py", "/User_Interface/Configure_Test_Page.py", "/User_Interface/New_Vehicle_Page.py", "/User_Interface/Test_Is_Running_Page.py", "/User_Interface/Save_Test_Page.py", "/User_Interface/Results_Page.py", "/User_Interface/Tutorial_Main_Page.py", "/User...
40,459,281
vibrainium-analytics/ava
refs/heads/master
/User_Interface/Plot_Page.py
import tkinter as tk from tkinter import messagebox from tkinter import ttk from tkinter import * # File system access library import glob, os # Math functions library import numpy as np import matplotlib # Plotting library canvas tool matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvas...
{"/ava.py": ["/User_Interface/Plot_Page.py", "/User_Interface/Home_Page.py", "/User_Interface/Configure_Test_Page.py", "/User_Interface/New_Vehicle_Page.py", "/User_Interface/Test_Is_Running_Page.py", "/User_Interface/Save_Test_Page.py", "/User_Interface/Results_Page.py", "/User_Interface/Tutorial_Main_Page.py", "/User...
40,459,282
vibrainium-analytics/ava
refs/heads/master
/Signal_Processing/Signal_Process.py
import tkinter as tk from tkinter import ttk from scipy import signal import os, json, shutil, math, numpy import datetime class Signal_Process(tk.Tk): with open('directory.json','r') as g: global directory directory = json.load(g) g.close # create a message box. This will...
{"/ava.py": ["/User_Interface/Plot_Page.py", "/User_Interface/Home_Page.py", "/User_Interface/Configure_Test_Page.py", "/User_Interface/New_Vehicle_Page.py", "/User_Interface/Test_Is_Running_Page.py", "/User_Interface/Save_Test_Page.py", "/User_Interface/Results_Page.py", "/User_Interface/Tutorial_Main_Page.py", "/User...
40,560,970
solfamidasgroup/desarrollo-web
refs/heads/master
/module003/views.py
from application import get_app from flask_login import login_required, login_user, logout_user, current_user from flask import render_template, request, redirect, url_for, flash, Blueprint from sqlalchemy import or_ from models import User, get_db, Course, Assignment import datetime db = get_db() from module003.form...
{"/module003/views.py": ["/module003/forms.py"], "/module002/views.py": ["/module002/forms.py"]}
40,665,698
liuw20/LSTM_Fruit_simple
refs/heads/master
/Network/LSTM.py
import torch.nn as nn class LSTM_Regression(nn.Module): """ 使用LSTM进行回归 参数: - input_size: feature size - hidden_size: number of hidden units - output_size: number of output - num_layers: layers of LSTM to stack """ def __init__(self, input_size, hidden_size, ...
{"/main.py": ["/utils/dataloader.py", "/Network/LSTM.py", "/test.py", "/Error.py"], "/test.py": ["/Error.py"], "/train.py": ["/Error.py"]}
40,665,699
liuw20/LSTM_Fruit_simple
refs/heads/master
/Error.py
import pandas as pd from math import sqrt class pre_error(): '''该类实现计算误差函数''' def __init__(self, pre_data, true_data): self.pre_data = pre_data self.true_data = true_data def pre_RMSE(self): dis = self.pre_data - self.true_data RMSEP = sqrt(sum(sum(dis * dis))) / len(self...
{"/main.py": ["/utils/dataloader.py", "/Network/LSTM.py", "/test.py", "/Error.py"], "/test.py": ["/Error.py"], "/train.py": ["/Error.py"]}
40,665,700
liuw20/LSTM_Fruit_simple
refs/heads/master
/main.py
from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler import torch.optim as optim import torch from utils.dataloader import dataload from Network.LSTM import LSTM_Regression import torch.nn as nn from test import predicate from Error import pre_error from torchvision imp...
{"/main.py": ["/utils/dataloader.py", "/Network/LSTM.py", "/test.py", "/Error.py"], "/test.py": ["/Error.py"], "/train.py": ["/Error.py"]}
40,665,701
liuw20/LSTM_Fruit_simple
refs/heads/master
/test.py
from torch import FloatTensor from Error import pre_error def predicate(model, test_x, test_y): test_x = test_x.type(FloatTensor) test_y = test_y.type(FloatTensor) model = model.eval() pre_test = model(test_x) pre_test = pre_test.view(-1).data.numpy() print('预测结果:{}\n'.format(pre_test)) # ...
{"/main.py": ["/utils/dataloader.py", "/Network/LSTM.py", "/test.py", "/Error.py"], "/test.py": ["/Error.py"], "/train.py": ["/Error.py"]}
40,665,702
liuw20/LSTM_Fruit_simple
refs/heads/master
/train.py
from Error import pre_error def train(epoch,model,train_x,train_y,loss_function,optimizer): out = model(train_x) loss = loss_function(out, train_y) loss.backward() optimizer.step() optimizer.zero_grad() if (epoch+ 1) % 100 == 0: print('Epoch: {}, Loss:{:.5f}'.format((epoch + 1), loss.it...
{"/main.py": ["/utils/dataloader.py", "/Network/LSTM.py", "/test.py", "/Error.py"], "/test.py": ["/Error.py"], "/train.py": ["/Error.py"]}
40,665,703
liuw20/LSTM_Fruit_simple
refs/heads/master
/utils/dataloader.py
import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split import torch def dataload(spilt_size): '''数据读取部分''' input = pd.read_excel("E:\SeaFile\Grade2_Tsinghua\华慧芯实习\Test_data_total\Total data.xlsx") input_array = input.to_nu...
{"/main.py": ["/utils/dataloader.py", "/Network/LSTM.py", "/test.py", "/Error.py"], "/test.py": ["/Error.py"], "/train.py": ["/Error.py"]}
40,671,526
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0008_auto_20171009_1903.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-10-09 10:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0007_auto_20171009_1842'), ] operations = [ migrations.RemoveField(...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,527
pauluskim/StarLight
refs/heads/crawler-master
/starlight/web/models.py
# -*- coding: utf-8 -*- import sys, os reload(sys) sys.setdefaultencoding('utf-8') from django.db import models from django.utils import timezone from crawler.models import * class Subscriber(models.Model): product = models.CharField(max_length=200) email = models.EmailField() first_name = models.CharFie...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,528
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0021_auto_20171127_2155.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-27 12:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0020_auto_20171127_2152'), ] operations = [ migrations.AlterFiel...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,529
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0017_auto_20171114_2310.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-14 14:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0016_auto_20171103_2334'), ] operations = [ migrations.AddField(...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,530
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0014_auto_20171024_2159.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-24 12:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0013_auto_20171024_2157'), ] operations = [ migrations.AlterFiel...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,531
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/views.py
#-*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8') from django.shortcuts import render from django.http import JsonResponse, HttpResponseRedirect, HttpResponse from crawler.models import Influencer, Post, User, Follow, Hashtag_Dictionary, ScoreBoard from django.db.models import Q import pdb...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,532
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0006_follow.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-10-09 08:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0005_user'), ] operations = [ migrations.CreateModel( n...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,533
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0002_auto_20170917_0537.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-09-17 05:37 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0001_initial'), ] operations = [ migrations.AddField( m...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,534
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0004_post.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-09-23 06:43 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('crawler', '0003_auto_20170917_2014'), ] operations = [ ...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,535
pauluskim/StarLight
refs/heads/crawler-master
/starlight/web/views.py
#-*- coding: utf-8 -*- import sys , os, pdb reload(sys) sys.setdefaultencoding('utf-8') from django.shortcuts import render from django.http import JsonResponse, HttpResponseRedirect, HttpResponse #sys.path.append(os.path.abspath('../crawler')) from models import * from .forms import WebForm def landing(request): ...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,536
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0005_user.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-10-09 07:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0004_post'), ] operations = [ migrations.CreateModel( n...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,537
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0011_hashtag_dictionary.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-22 14:20 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('crawler', '0010_auto_20171010_1105'), ] operations = [...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,538
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0012_hashtag_dictionary_code_list.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-22 15:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0011_hashtag_dictionary'), ] operations = [ migrations.AddField(...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,539
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0025_auto_20171230_1613.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-12-30 07:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0024_scoreboard_created_date'), ] operations = [ migrations.Alte...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,540
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0018_auto_20171121_0612.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-20 21:12 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0017_auto_20171114_2310'), ] operations = [ migrations.AddField(...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,541
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/models.py
from __future__ import unicode_literals from django.db import models # Create your models here. from django.utils import timezone class ScoreBoard(models.Model): user_pk = models.BigIntegerField(db_index=True) brandname = models.CharField(max_length=200, db_index=True) page_rank = models.DecimalField(max...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,542
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/admin.py
from django.contrib import admin from .models import Influencer, Post # Register your models here. admin.site.register(Influencer) admin.site.register(Post)
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,543
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0003_auto_20170917_2014.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-09-17 11:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0002_auto_20170917_0537'), ] operations = [ migrations.RemoveField(...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,544
pauluskim/StarLight
refs/heads/crawler-master
/starlight/web/forms.py
from django import forms from .models import Subscriber class WebForm(forms.ModelForm): class Meta: model = Subscriber fields = ('product', 'email', 'first_name',)
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,545
pauluskim/StarLight
refs/heads/crawler-master
/starlight/web/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.landing, name='starlight_landing'), url(r'^influencers$', views.influencers, name='show_influencers'), url(r'^subscriber/add$', views.new_subscriber, name='save_new_subscriber'), ]
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,546
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/migrations/0023_scoreboard.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-12-30 06:29 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crawler', '0022_user_campaign_kind'), ] operations = [ migrations.CreateMod...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,671,547
pauluskim/StarLight
refs/heads/crawler-master
/starlight/crawler/urls.py
from django.conf.urls import url from . import views urlpatterns = [ #url(r'^$', views.influencer_list, name='influencer_list'), url(r'^crawl/hashtag_posts$', views.crawl_hashtag_posts, name='crawl_hashtag_posts'), url(r'^crawl/start_hashtag_posts$', views.start_hashtag_posts, name='start_hashtag_posts'), ...
{"/starlight/web/models.py": ["/crawler/models.py"], "/starlight/web/views.py": ["/starlight/web/forms.py"], "/starlight/crawler/admin.py": ["/starlight/crawler/models.py"], "/starlight/web/forms.py": ["/starlight/web/models.py"]}
40,697,807
mingqianye/gym-vim
refs/heads/master
/gym_vim/envs/encoded_emulator.py
import numpy as np from gym_vim.envs.emulator import Emulator, EmulatorState, ScreenString, EmulatorAction from gym_vim.envs.encoder import Encoder from gym_vim.envs.keys import keystrokes, displayable_chars, modes from gym import spaces from typing import NewType, Tuple, Dict, List EncodedObservation = NewType("Enc...
{"/tests/test_encoder.py": ["/gym_vim/__init__.py", "/gym_vim/envs/encoder.py"], "/gym_vim/envs/vim_env.py": ["/gym_vim/envs/encoded_emulator.py"], "/gym_vim/envs/emulator.py": ["/gym_vim/envs/fs.py", "/gym_vim/envs/edit_distance.py", "/gym_vim/envs/keys.py"], "/tests/test_emulator.py": ["/gym_vim/__init__.py", "/gym_v...
40,697,808
mingqianye/gym-vim
refs/heads/master
/tests/test_keys.py
import unittest from gym_vim.envs.keys import keystrokes class TestKeys(unittest.TestCase): def test_keystrokes(self): self.assertEqual(94, len(keystrokes))
{"/tests/test_encoder.py": ["/gym_vim/__init__.py", "/gym_vim/envs/encoder.py"], "/gym_vim/envs/vim_env.py": ["/gym_vim/envs/encoded_emulator.py"], "/gym_vim/envs/emulator.py": ["/gym_vim/envs/fs.py", "/gym_vim/envs/edit_distance.py", "/gym_vim/envs/keys.py"], "/tests/test_emulator.py": ["/gym_vim/__init__.py", "/gym_v...
40,697,809
mingqianye/gym-vim
refs/heads/master
/gym_vim/envs/emulator.py
import pynvim from typing import NewType, List, Tuple, Dict from dataclasses import dataclass from gym_vim.envs.fs import get_state, is_valid, feedkeys, VimState from gym_vim.envs.edit_distance import edit_distance from gym_vim.envs.keys import esc EmulatorAction = NewType("EmulatorAction", str) NvimMode = NewType("N...
{"/tests/test_encoder.py": ["/gym_vim/__init__.py", "/gym_vim/envs/encoder.py"], "/gym_vim/envs/vim_env.py": ["/gym_vim/envs/encoded_emulator.py"], "/gym_vim/envs/emulator.py": ["/gym_vim/envs/fs.py", "/gym_vim/envs/edit_distance.py", "/gym_vim/envs/keys.py"], "/tests/test_emulator.py": ["/gym_vim/__init__.py", "/gym_v...
40,697,810
mingqianye/gym-vim
refs/heads/master
/gym_vim/envs/fs.py
import subprocess import tempfile import json from dataclasses import dataclass from pynvim import attach, api from typing import Tuple, List @dataclass(eq=True, frozen=True) class VimState: mode: str curpos: List[int] strings: List[str] def get_state(nvim: api.nvim.Nvim) -> VimState: return VimState...
{"/tests/test_encoder.py": ["/gym_vim/__init__.py", "/gym_vim/envs/encoder.py"], "/gym_vim/envs/vim_env.py": ["/gym_vim/envs/encoded_emulator.py"], "/gym_vim/envs/emulator.py": ["/gym_vim/envs/fs.py", "/gym_vim/envs/edit_distance.py", "/gym_vim/envs/keys.py"], "/tests/test_emulator.py": ["/gym_vim/__init__.py", "/gym_v...
40,697,811
mingqianye/gym-vim
refs/heads/master
/gym_vim/envs/__init__.py
from gym_vim.envs.vim_env import VimEnv
{"/tests/test_encoder.py": ["/gym_vim/__init__.py", "/gym_vim/envs/encoder.py"], "/gym_vim/envs/vim_env.py": ["/gym_vim/envs/encoded_emulator.py"], "/gym_vim/envs/emulator.py": ["/gym_vim/envs/fs.py", "/gym_vim/envs/edit_distance.py", "/gym_vim/envs/keys.py"], "/tests/test_emulator.py": ["/gym_vim/__init__.py", "/gym_v...
40,697,812
mingqianye/gym-vim
refs/heads/master
/setup.py
from setuptools import setup setup(name='gym_vim', version='0.0.1', install_requires=['gym', 'sklearn', 'numpy', 'pynvim'] # And any other dependencies foo needs )
{"/tests/test_encoder.py": ["/gym_vim/__init__.py", "/gym_vim/envs/encoder.py"], "/gym_vim/envs/vim_env.py": ["/gym_vim/envs/encoded_emulator.py"], "/gym_vim/envs/emulator.py": ["/gym_vim/envs/fs.py", "/gym_vim/envs/edit_distance.py", "/gym_vim/envs/keys.py"], "/tests/test_emulator.py": ["/gym_vim/__init__.py", "/gym_v...
40,702,328
TooTiredOne/TatDFS
refs/heads/master
/namenode.py
from flask import Flask, Response, request, jsonify import logging from anytree import Node, RenderTree, Resolver from datetime import datetime from threading import Thread import os, requests, random, time from FileSystem import fs ROOT_DIR = "root" HOST = '0.0.0.0' PORT = 8080 DATANODES = ["http://0.0.0.0:8085"] # D...
{"/namenode.py": ["/FileSystem.py"]}
40,702,329
TooTiredOne/TatDFS
refs/heads/master
/testing/datanode3/datanode.py
import logging import os, requests import shutil from flask import Flask, Response, jsonify, request, send_file HOST = '0.0.0.0' PORT = 8087 CURRENT_DIR = os.path.join(os.getcwd(), "data") app = Flask(__name__) logging.basicConfig(filename='datanode.log', level=logging.DEBUG) @app.route("/ping") def ping(): ret...
{"/namenode.py": ["/FileSystem.py"]}
40,702,330
TooTiredOne/TatDFS
refs/heads/master
/client.py
import requests, os NAMENODE = "http://0.0.0.0:8080" CURRENT_DIR = "/" def mistake(): print("cannot execute command, please verify that you are using it correctly") def show_help(*arguments): if len(arguments) == 1: print("""COMMANDS USAGE\n NOTE: paths are resolved only with respect to...
{"/namenode.py": ["/FileSystem.py"]}
40,702,331
TooTiredOne/TatDFS
refs/heads/master
/testing.py
from anytree import Node, RenderTree, find, Resolver import os file1 = {"id": 0, "datanodes": [], "size": 32, "metadata": "grrrrrrrrr"} file2 = {"id": 1, "datanodes": [], "size": 12, "metadata": "dhdjhsgdhjas"} file3 = {"id": 2, "datanodes": [], "size": 12, "metadata": "dhdjhsgdhjas"} root = Node("root") pics = Node(...
{"/namenode.py": ["/FileSystem.py"]}
40,702,332
TooTiredOne/TatDFS
refs/heads/master
/testing/namenode/FileSystem.py
from anytree import Node, RenderTree, Resolver import random, requests from datetime import datetime import os ROOT_DIR = "root" HOST = '0.0.0.0' PORT = 8080 HEARTBEAT_RATE = 1 class FileSystem: def __init__(self): self.root = Node(ROOT_DIR, is_file=False) self.free_space = 1000000000000000000000...
{"/namenode.py": ["/FileSystem.py"]}
40,768,764
iSebDev/filewriter-python
refs/heads/main
/src/extra/placeholders.py
import time as times class placehold: def variable(name=None, var=None, time=None): if not name: try: except KeyError else: return name + var return times.sleep(time) if var == times.sleep: print("Error with function...
{"/run.py": ["/config.py"], "/config.py": ["/src/variables.py"]}
40,768,765
iSebDev/filewriter-python
refs/heads/main
/config.py
from src.variables import vars as v ## v.variable_name ## Config variables in .src/variables.py class config: FILE="paraadads.txt" ## FILE NAME + EXTENSION || example.txt || or other extension OS_ALIAS="my os aliases" class message: TEXT = f""" Hi1 HI + 2 Hi 3 _ Example 1 2 3 {v.variable1} {v.v...
{"/run.py": ["/config.py"], "/config.py": ["/src/variables.py"]}
40,768,766
iSebDev/filewriter-python
refs/heads/main
/src/write.py
import time import datetime from time import sleep as wait def __WRITE__(file=None, text=None): if not file: print("Please, set a file in config.py") elif(file == None): print("Please, set a file in config.py") else: with open(file, 'w') as f: f.write(text) ...
{"/run.py": ["/config.py"], "/config.py": ["/src/variables.py"]}
40,768,767
iSebDev/filewriter-python
refs/heads/main
/src/variables.py
import datetime import random class vars: variable1 = 1+1 # Simple sum in variable variable2 = "Hi" # Simple str var variable3 = "Hi {}".format(15-5) # Variables in str of var variable4 = datetime.datetime.utcnow() # Get time variable5 = random.randint(1,100) # Get random number variable variab...
{"/run.py": ["/config.py"], "/config.py": ["/src/variables.py"]}
40,768,768
iSebDev/filewriter-python
refs/heads/main
/run.py
from config import config as conf from config import message from config import options from time import sleep as wait import datetime from src import write import os import json def run(): write.__WRITE__(file=conf.FILE, text=message.TEXT) wait(5) print(f"File: {str(os.path.isfile(conf.FILE))}") if options.os...
{"/run.py": ["/config.py"], "/config.py": ["/src/variables.py"]}
40,837,686
NaxF11/12CharacterBattleOverlay
refs/heads/master
/12CB.py
import pygame, sys, time, remix_char from pygame.locals import * def opcion_1(): pygame.font.init() myfont = pygame.font.SysFont("Comic Sans MS", 10) myfont_stocks = pygame.font.SysFont("Comic Sans MS", 27) cont_texto = 48 cont_texto2 = 48 texto2 = "Designed by Nax & Bob" texto3 = "48"...
{"/12CB.py": ["/remix_char.py"]}
40,837,687
NaxF11/12CharacterBattleOverlay
refs/heads/master
/remix_char.py
import pygame # DR MARIO dr_mario = pygame.image.load("images/remix/dr_mario.png") dr_mario = pygame.transform.scale(dr_mario, (100,100)) dr_mariod = pygame.image.load("images/remix/dr_mariod.png") dr_mariod = pygame.transform.scale(dr_mariod, (100,100)) dr_marioCK = True dr_marioCK2 = True # YOUNG LINK y_link = pyga...
{"/12CB.py": ["/remix_char.py"]}
40,853,401
bstriner/pytorch-igniter-demo
refs/heads/master
/setup.py
from setuptools import find_packages, setup import os with open(os.path.abspath(os.path.join(__file__, '../README.rst')), encoding='utf-8') as f: long_description = f.read() setup(name='pytorch-igniter-demo', version='0.0.3', author='Ben Striner', author_email="bstriner@gmail.com", url='http...
{"/pytorch_igniter_demo/config.py": ["/pytorch_igniter_demo/dataprep.py"], "/pytorch_igniter_demo/main.py": ["/pytorch_igniter_demo/config.py", "/pytorch_igniter_demo/dataprep.py"]}
40,853,402
bstriner/pytorch-igniter-demo
refs/heads/master
/pytorch_igniter_demo/dataprep.py
from aws_sagemaker_remote.processing.main import ProcessingCommand import os import argparse import os import pprint from torch import nn from torch.utils import data from torchvision.datasets import MNIST import torchvision.transforms as transforms from aws_sagemaker_remote.processing import sagemaker_processing_main ...
{"/pytorch_igniter_demo/config.py": ["/pytorch_igniter_demo/dataprep.py"], "/pytorch_igniter_demo/main.py": ["/pytorch_igniter_demo/config.py", "/pytorch_igniter_demo/dataprep.py"]}
40,853,403
bstriner/pytorch-igniter-demo
refs/heads/master
/pytorch_igniter_demo/config.py
from pytorch_igniter.config import IgniterConfig from torchvision.models.resnet import resnet18 from torch.optim import Adam from torch.nn import CrossEntropyLoss from .dataprep import get_loader from torch import nn import torch.nn.functional as F import torch import pytorch_igniter_demo import os from pytorch_igniter...
{"/pytorch_igniter_demo/config.py": ["/pytorch_igniter_demo/dataprep.py"], "/pytorch_igniter_demo/main.py": ["/pytorch_igniter_demo/config.py", "/pytorch_igniter_demo/dataprep.py"]}
40,853,404
bstriner/pytorch-igniter-demo
refs/heads/master
/pytorch_igniter_demo/main.py
from pytorch_igniter.experiment_cli import experiment_cli from pytorch_igniter_demo.config import make_config from pytorch_igniter_demo.dataprep import DataprepCommand import pytorch_igniter_demo def main(dry_run=False): """ Generate experiment CLI. Running locally, this function is run by a wrapper create...
{"/pytorch_igniter_demo/config.py": ["/pytorch_igniter_demo/dataprep.py"], "/pytorch_igniter_demo/main.py": ["/pytorch_igniter_demo/config.py", "/pytorch_igniter_demo/dataprep.py"]}
40,916,247
Homagn/MOVILAN
refs/heads/main
/planner/params.py
camera_horizon_angle = 30 room_type = "Bedroom"
{"/main_interactive.py": ["/robot/sensing.py"], "/planner/low_level_planner/heat_objects.py": ["/planner/low_level_planner/object_localization.py", "/planner/low_level_planner/object_type.py", "/planner/low_level_planner/move_camera.py", "/planner/low_level_planner/resolve.py", "/planner/low_level_planner/handle_applia...
40,916,248
Homagn/MOVILAN
refs/heads/main
/planner/low_level_planner/grid_planning.py
import numpy as np from skimage.measure import regionprops, label import sys import os os.environ['MAIN'] = '/ai2thor' sys.path.append(os.path.join(os.environ['MAIN'])) from mapper import test_gcn from planner.low_level_planner import move_camera def occupancy_grid(target_object, localize_params, hallucinate = [0,0...
{"/main_interactive.py": ["/robot/sensing.py"], "/planner/low_level_planner/heat_objects.py": ["/planner/low_level_planner/object_localization.py", "/planner/low_level_planner/object_type.py", "/planner/low_level_planner/move_camera.py", "/planner/low_level_planner/resolve.py", "/planner/low_level_planner/handle_applia...
40,916,249
Homagn/MOVILAN
refs/heads/main
/robot/params.py
camera = {'width':300,'height':300}
{"/main_interactive.py": ["/robot/sensing.py"], "/planner/low_level_planner/heat_objects.py": ["/planner/low_level_planner/object_localization.py", "/planner/low_level_planner/object_type.py", "/planner/low_level_planner/move_camera.py", "/planner/low_level_planner/resolve.py", "/planner/low_level_planner/handle_applia...
40,916,250
Homagn/MOVILAN
refs/heads/main
/mapper/datagen.py
import numpy as np import math import sys import glob import os import json import random import copy import argparse #sys.path.append(os.path.join(os.environ['ALFRED_ROOT'])) #sys.path.append(os.path.join(os.environ['ALFRED_ROOT'], 'gen')) #from env.thor_env import ThorEnv os.environ['MAIN'] = '../' sys...
{"/main_interactive.py": ["/robot/sensing.py"], "/planner/low_level_planner/heat_objects.py": ["/planner/low_level_planner/object_localization.py", "/planner/low_level_planner/object_type.py", "/planner/low_level_planner/move_camera.py", "/planner/low_level_planner/resolve.py", "/planner/low_level_planner/handle_applia...
40,916,251
Homagn/MOVILAN
refs/heads/main
/planner/low_level_planner/refinement.py
import numpy as np from skimage.measure import regionprops, label import copy import sys import os os.environ['MAIN'] = '/ai2thor' sys.path.append(os.path.join(os.environ['MAIN'])) from mapper import test_gcn import planner.low_level_planner.object_localization as object_localization def nudge(areas, key, env, act1,...
{"/main_interactive.py": ["/robot/sensing.py"], "/planner/low_level_planner/heat_objects.py": ["/planner/low_level_planner/object_localization.py", "/planner/low_level_planner/object_type.py", "/planner/low_level_planner/move_camera.py", "/planner/low_level_planner/resolve.py", "/planner/low_level_planner/handle_applia...
40,916,252
Homagn/MOVILAN
refs/heads/main
/planner/low_level_planner/manipulation_signatures.py
import os import sys os.environ['MAIN'] = '/ai2thor' sys.path.append(os.path.join(os.environ['MAIN'])) import planner.params as params import numpy as np import cv2 import copy import math import random import time as t #all submodules in this folder import planner.low_level_planner.drawer_manipulation as drawer_man...
{"/main_interactive.py": ["/robot/sensing.py"], "/planner/low_level_planner/heat_objects.py": ["/planner/low_level_planner/object_localization.py", "/planner/low_level_planner/object_type.py", "/planner/low_level_planner/move_camera.py", "/planner/low_level_planner/resolve.py", "/planner/low_level_planner/handle_applia...
40,929,432
ThomasJensz/2810ICT-Assignment
refs/heads/main
/display.py
import openpyxl import wx import datetime import wx.lib.scrolledpanel as scrolled import matplotlib.pyplot as plt wb = openpyxl.load_workbook("Crash Statistics Victoria.xlsx", read_only=True) sheet = wb["Crash Statistics Victoria"] def FindWithinDates(a, b): DateStart = StringToDate(a) DateEnd = StringToDate(...
{"/main.py": ["/display.py"]}
40,929,433
ThomasJensz/2810ICT-Assignment
refs/heads/main
/main.py
import wx from display import * class myGUI(wx.Frame): def __init__ (self,parent,id,title): wx.Frame.__init__(self,parent,id,title) self.parent = parent self.initialise() def initialise(self): self.SetSize(wx.Size(900,500)) pnl = wx.Panel(self) #UI for Function ...
{"/main.py": ["/display.py"]}
40,944,719
maanavshah/cache-policy-lru-mru
refs/heads/master
/mru_example.py
from lib.mru import MRU mru = MRU() mru.insert(1) mru.get() mru.insert(2) mru.get() mru.insert(3) mru.get() mru.insert(4) mru.get() mru.insert(5) mru.get() mru.insert(6) mru.get() mru.insert(4) mru.get() mru.insert(1) mru.get() mru.insert(6) mru.get() mru.insert(8) mru.get() mru.insert(5) mru.get() mru.insert(1) mru....
{"/lib/lru.py": ["/lib/cache_policy.py"], "/lru_example.py": ["/lib/lru.py"]}
40,945,025
Wyesumu/restapi_app
refs/heads/main
/app/rest_app/models.py
from django.db import models class Deal(models.Model): customer = models.CharField(max_length=200) item = models.CharField(max_length=200) total = models.IntegerField(default=0) quantity = models.IntegerField(default=0) date = models.DateTimeField()
{"/app/rest_app/serializers.py": ["/app/rest_app/models.py"], "/app/rest_app/views.py": ["/app/rest_app/models.py", "/app/rest_app/utils.py", "/app/rest_app/serializers.py"], "/app/rest_app/utils.py": ["/app/rest_app/models.py", "/app/rest_app/serializers.py"]}
40,945,026
Wyesumu/restapi_app
refs/heads/main
/app/rest_app/serializers.py
from rest_framework.serializers import ModelSerializer from .models import Deal class DealsSerializer(ModelSerializer): class Meta: model = Deal fields = ["customer", "item", "total", "quantity", "date"]
{"/app/rest_app/serializers.py": ["/app/rest_app/models.py"], "/app/rest_app/views.py": ["/app/rest_app/models.py", "/app/rest_app/utils.py", "/app/rest_app/serializers.py"], "/app/rest_app/utils.py": ["/app/rest_app/models.py", "/app/rest_app/serializers.py"]}
40,945,027
Wyesumu/restapi_app
refs/heads/main
/app/rest_app/views.py
#from django.shortcuts import render from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.parsers import MultiPartParser import csv import io from .serializers import DealsSerializer from .models import Deal from django.db.models imp...
{"/app/rest_app/serializers.py": ["/app/rest_app/models.py"], "/app/rest_app/views.py": ["/app/rest_app/models.py", "/app/rest_app/utils.py", "/app/rest_app/serializers.py"], "/app/rest_app/utils.py": ["/app/rest_app/models.py", "/app/rest_app/serializers.py"]}
41,174,779
danysousa/krpsim
HEAD
/config.py
import sys import re class Config(object): def __init__(self, filename): self.filename = filename try: fd = open(filename, 'r') except IOError: print("Can't open " + filename) sys.exit(0) self.parse(fd) def parse(self, fd): for line in fd : if (line[0] == '#'): continue self.findAction...
{"/main.py": ["/Stock.py", "/Manager.py", "/Kprocess.py", "/config.py"], "/config.py": ["/Stock.py", "/Kprocess.py"]}
41,174,780
danysousa/krpsim
HEAD
/main.py
#!/usr/bin/python2.7 from config import Config import sys if ( len(sys.argv) == 2 ): c = Config(sys.argv[1]) else: print("Usage : ./main.py [config_file]")
{"/main.py": ["/Stock.py", "/Manager.py", "/Kprocess.py", "/config.py"], "/config.py": ["/Stock.py", "/Kprocess.py"]}
41,197,708
sviridchik/ISP2_4SEM
refs/heads/master
/services/__init__.py
__all__ = ['fabric', 'ordinary_types', 'SerBase', 'serFunc']
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,709
sviridchik/ISP2_4SEM
refs/heads/master
/services/fabric.py
from serializations import JsonClass, TomlClass as t, YamlClass as y, PickleClass as p def fabrica(s): if s == 'json': return JsonClass.JsonClassMy() elif s == 'pickle': return p.PickleClassMy() elif s == 'toml': return t.TomlClassMy() elif s == 'yaml': return y.YamlCla...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,710
sviridchik/ISP2_4SEM
refs/heads/master
/additionals/13.py
# https://www.youtube.com/watch?v=Xgaj0Vxz_to&ab_channel=%D0%A4%D0%BE%D0%BA%D1%81%D1%84%D0%BE%D1%80%D0%B4 # https://foxford.ru/wiki/informatika/bystraya-sortirovka-hoara-python # quick import random as ra def Quck_sort(data): if len(data) <= 1: return data else: pivot = ra.choice(data) ...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,711
sviridchik/ISP2_4SEM
refs/heads/master
/additionals/8.py
def dec(func): def wrapper(a): print("look what i have ",a) print("before") func(a) print("after") return wrapper @dec def stand_alone_function(a): print("Я простая одинокая функция, ты ведь не посмеешь меня изменять? ", a) storage = {} def cashed(func): def wrapper(...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,712
sviridchik/ISP2_4SEM
refs/heads/master
/serializations/TomlClass.py
from serializations.Exceptions import InvalidTypeSourceException a = """{ "AllData": {"ArchiveAndDearchieveConfiguration": { "Archieve": true, "DeArchieve": true }, "FinderInfo": { "Coding": "utf8", "SourceDirectory": "/Users/victoriasviridchik/Desktop/lab2/SourceDir", "TargetDi...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,713
sviridchik/ISP2_4SEM
refs/heads/master
/serializations/PickleClass.py
a = """{ "AllData": {"ArchiveAndDearchieveConfiguration": { "Archieve": true, "DeArchieve": true }, "FinderInfo": { "Coding": "utf8", "SourceDirectory": "/Users/victoriasviridchik/Desktop/lab2/SourceDir", "TargetDirectory": "/Users/victoriasviridchik/Desktop/lab2/TargetDir/", ...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,714
sviridchik/ISP2_4SEM
refs/heads/master
/tests.py
import os import unittest from serializations import * from services.ordinary_types import * from services.fabric import * import math def p(c): return "the res is {}".format(c) def summ(a=9, b=1): return p(a + b) def out_func(x): return math.cos(x) data_etalon = {'__closure__': None, ...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,715
sviridchik/ISP2_4SEM
refs/heads/master
/serializations/Exceptions.py
class InvalidTypeSourceException(Exception): pass # def __init__(self, *args): # super().__init__(self, *args) # # def __str__(self): # return 'InvalidTypeSourceException'
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,716
sviridchik/ISP2_4SEM
refs/heads/master
/file.py
from services import fabric # import json as js CONST = 6 def ya_func(x): x += CONST return x kaka = fabric.fabrica('pickle') kaka.dump(ya_func, 'fp') res = kaka.load('fp') print(res) print(res(10))
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,717
sviridchik/ISP2_4SEM
refs/heads/master
/setup.py
from setuptools import setup setup(name='Isp2lr', version='1.0', description='Python Distribution Utilities', author='VictoriaSv', author_email='viccisviri@gmail.com', packages=['serializations', 'services'], # install_requires=['PyYAML', 'toml'], scripts=['bin/magic.py'], ...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,718
sviridchik/ISP2_4SEM
refs/heads/master
/serializations/__init__.py
__all__ = ['JsonClass', 'PickleClass', 'TomlClass', 'YamlClass', 'Exceptions']
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,719
sviridchik/ISP2_4SEM
refs/heads/master
/serializations/JsonClass.py
from serializations.Exceptions import InvalidTypeSourceException a = """{ "AllData": {"ArchiveAndDearchieveConfiguration": { "Archieve": true, "DeArchieve": true }, "FinderInfo": { "Coding": "utf8", "SourceDirectory": "/Users/victoriasviridchik/Desktop/lab2/SourceDir", "TargetDi...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,720
sviridchik/ISP2_4SEM
refs/heads/master
/additionals/4.py
class Vector(object): """creates vector""" def __init__(self,x=0,y=0): self.x,self.y = x,y def __str__(self): return "({},{})".format(self.x,self.y) def __add__(self, other): return Vector(self.x+other.x,self.y+other.y) def __sub__(self, other): return Vector(sel...
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...
41,197,721
sviridchik/ISP2_4SEM
refs/heads/master
/additionals/9.py
def my_range(start:int , stop:int = None,step=1):
{"/services/fabric.py": ["/serializations/__init__.py"], "/serializations/TomlClass.py": ["/serializations/Exceptions.py", "/services/__init__.py"], "/serializations/PickleClass.py": ["/services/__init__.py", "/serializations/Exceptions.py", "/services/ordinary_types.py"], "/tests.py": ["/serializations/__init__.py", "...