index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
89,141
vlimant/NADE
refs/heads/master
/convnade/convnade/tasks.py
import pickle import numpy as np from os.path import join as pjoin import theano from smartlearner.tasks import Task class DeepNadeOrderingTask(Task): """ This task changes the ordering before each update. """ def __init__(self, D, batch_size, ordering_seed=1234): super(DeepNadeOrderingTask, self)._...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,142
vlimant/NADE
refs/heads/master
/convnade/convnade/convnade.py
from __future__ import division from collections import OrderedDict import pickle import theano import theano.tensor as T from theano.tensor.nnet import conv from theano.tensor.signal import downsample import numpy as np from os.path import join as pjoin from smartlearner import Model import smartlearner.initialize...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,143
vlimant/NADE
refs/heads/master
/convnade/convnade/utils.py
from __future__ import division, print_function import sys import json import numpy as np import theano import itertools import hashlib from time import time class NumpyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, np.ndarray): return {"__ndarray__": obj.tolist()} ...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,144
vlimant/NADE
refs/heads/master
/deepnade/buml/Utils/__init__.py
import nnet from MVNormal import MVNormal import theano_helpers import svn import random from DropoutMask import *
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,145
vlimant/NADE
refs/heads/master
/deepnade/buml/Instrumentation/__init__.py
from Instrumentable import Instrumentable from Instrumentation import Instrumentation from Measurement import Measurement from Configuration import Configuration from ActivationRate import ActivationRate from Error import Error from ClassificationError import ClassificationError from Parameters import Parameters from T...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,146
vlimant/NADE
refs/heads/master
/deepnade/buml/Utils/random.py
import numpy as np def random_binary_mask(shape, ones_per_column): """ Returns a random binary maks with ones_per_columns[i] ones on the i-th column Example: random_binary_maks((3,5),[1,2,3,1,2]) Out: array([[ 0., 1., 1., 1., 1.], [ 1., 1., 1., 0., 0.], [ 0., 0....
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,147
vlimant/NADE
refs/heads/master
/deepnade/buml/Backends/Backend.py
class Backend (object): def __init__(self): pass def write(route, attribute, value): pass
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,148
vlimant/NADE
refs/heads/master
/deepnade/buml/Utils/Estimation.py
import numpy as np class Estimation(object): def __init__(self, estimation, se): self.estimation = estimation self.se = se def __str__(self): return "%f (se:%f)" % (self.estimation, self.se) def __float__(self): return self.estimation def __lt__(self, other): ...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,149
vlimant/NADE
refs/heads/master
/deepnade/buml/Instrumentation/Instrumentable.py
class Instrumentable (object): def __init__(self): self.instrumentation = [] def add_instrumentation(self, ins): self.instrumentation.append(ins) def get_context(self): return [] def initialize_instrumentation(self): for i in self.instrumentation: i.ini...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,150
vlimant/NADE
refs/heads/master
/deepnade/buml/Data/utils/utils.py
import numpy as np from Utils.Estimation import Estimation def get_dataset_statistics(dataset, element=0): def reduction(sums_sqsums_n, *data): sums, sqsums, n = sums_sqsums_n sums += data[element].sum(0) sqsums += np.square(data[element]).sum(0) n += data[element].shape[0] ...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,151
vlimant/NADE
refs/heads/master
/deepnade/buml/Model/__init__.py
from Model import *
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,152
vlimant/NADE
refs/heads/master
/convnade/convnade/batch_schedulers.py
import theano import pickle import numpy as np import theano.tensor as T from os.path import join as pjoin from smartlearner.batch_schedulers import BatchScheduler, MiniBatchScheduler from smartlearner.utils import sharedX floatX = theano.config.floatX class MiniBatchSchedulerWithAutoregressiveMask(MiniBatchSchedul...
{"/convnade/convnade/__init__.py": ["/convnade/convnade/convnade.py"], "/convnade/convnade/convnade.py": ["/convnade/convnade/utils.py"]}
89,153
ralfsantacruz/Sqlalchemy_ORM
refs/heads/master
/app.py
import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify # Defined function to get date two years ago. from twoyear import two_yr ##############################################...
{"/app.py": ["/twoyear.py"]}
89,154
ralfsantacruz/Sqlalchemy_ORM
refs/heads/master
/twoyear.py
import datetime as dt def two_yr(): two_yr_ago = dt.datetime.now() - dt.timedelta(days=365*2) two_yr_ago = dt.datetime.strftime(two_yr_ago,'%Y-%m-%d') return two_yr_ago
{"/app.py": ["/twoyear.py"]}
89,157
PRREMIA/prremia-django
refs/heads/master
/business/templatetags/models_ex.py
from ..models import Home from django import template register = template.Library() @register.simple_tag def Home_model(title): return Home.objects.filter(title=title).first().description
{"/business/templatetags/models_ex.py": ["/business/models.py"], "/business/views.py": ["/business/models.py"]}
89,158
PRREMIA/prremia-django
refs/heads/master
/business/migrations/0002_auto_20190710_1011.py
# Generated by Django 2.2.3 on 2019-07-10 04:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('business', '0001_initial'), ] operations = [ migrations.CreateModel( name='Home', fields=[ ('id', mo...
{"/business/templatetags/models_ex.py": ["/business/models.py"], "/business/views.py": ["/business/models.py"]}
89,159
PRREMIA/prremia-django
refs/heads/master
/business/models.py
from django.db import models class Home(models.Model): description = models.TextField() DROP = [ ('Home', 'Home'), ('Phone', 'Phone'), ('Email', 'Email'), ('Products', 'Products'), ('About', 'About'), ] title = models.CharField(max_length=50,choices=DROP) de...
{"/business/templatetags/models_ex.py": ["/business/models.py"], "/business/views.py": ["/business/models.py"]}
89,160
PRREMIA/prremia-django
refs/heads/master
/business/migrations/0003_auto_20190710_1018.py
# Generated by Django 2.2.3 on 2019-07-10 04:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('business', '0002_auto_20190710_1011'), ] operations = [ migrations.RemoveField( model_name='home', name='choices', ...
{"/business/templatetags/models_ex.py": ["/business/models.py"], "/business/views.py": ["/business/models.py"]}
89,161
PRREMIA/prremia-django
refs/heads/master
/business/views.py
from django.shortcuts import render from .models import Home def home(request): home = Home.objects.filter(title='Home').first().description about = Home.objects.filter(title='About').first().description products = Home.objects.filter(title='Products').first().description tags = { '<img ': '<d...
{"/business/templatetags/models_ex.py": ["/business/models.py"], "/business/views.py": ["/business/models.py"]}
89,162
Nikita-lys/RayTracing
refs/heads/master
/main.py
""" Лысенко Никита 4.8 2019 Создать сцену: Корнуэльская комната обязательно в виде большого куба. Внутри как минимум 1 объект (не прозоачный и не отражающий). На выбор куб или шар. Один точечный источник света. -- 4 балла 1. За 2-й объект того же вида + 1 балл. 2. За дополнительный объект другого вида ( шар и куб) ещ...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,163
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/MakePicture.py
from timeit import default_timer as timer from tkinter import * from PIL import Image, ImageTk, ImageDraw from RayTracing.ColorOfPicture import * class MakePicture: """ Создание выходной картинки. """ def __init__(self, width=300, height=300): self.width = width self.height = height s...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,164
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/Sphere.py
from RayTracing.Shape import * class Sphere(Shape): def __init__(self, center: Point, radius: float, material: Material, eps: float = 0.0001): """ Конструток сферы. :param center: координаты центра :param radius: радиус :param material: материал сферы :param eps: ...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,165
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/Side.py
from RayTracing.Shape import * class Side(Shape): def __init__(self, points: list, material: Material, norm: Point, eps: float = 0.0001): """ Конструктор стороны куба. :param points: расположение стороны куба. Список из четырёх точек :param material: материал стороны :par...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,166
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/ColorOfPicture.py
from RayTracing.Sphere import * from RayTracing.Side import * from RayTracing.Light import * EPS = 0.0001 class ColorOfPicture: """ Посчёт цвета в кадждом пикселе выходной картинки. """ def __init__(self, camera=Point(), width=0, height=0, shapes=list(), lights=list(), buffer=list()): self.camera: ...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,167
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/Shape.py
from abc import abstractmethod from RayTracing.Material import * class Shape(Point): def __init__(self, material: Material): """ Конструктор класса формы с абстрактными методами. :param material: материал объекта """ self.material = material @abstractmethod def d...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,168
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/Material.py
from RayTracing.Point import * class Material: def __init__(self, refractive: float, diffuse: Point, specular: float, albedo: list): """ Конструктор материала объекта. :param refractive: показатель преломления :param diffuse: показатель рассеянности :param specular: показ...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,169
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/__init__.py
def start(): print('sooooomebody once told me')
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,170
Nikita-lys/RayTracing
refs/heads/master
/setup.py
from setuptools import setup setup(name='RayTracing', version='0.1', description='Lab RayTracing for computer graphics course', url='https://github.com/Nikita-lys/RayTracing', author='Nikita-lys', author_email='lysenkonikita61@yandex.ru', packages=[ 'numpy', 'PIL...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,171
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/Point.py
import numpy as np class Point: def __init__(self, x=0., y=0., z=0.): """ Конструктор точки. :param x: позиция точки по x :param y: позиция точки по y :param z: позиция точки по z """ self.x = x self.y = y self.z = z def __add__(self, ...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,172
Nikita-lys/RayTracing
refs/heads/master
/RayTracing/Light.py
from RayTracing.Point import * class Light: def __init__(self, intensity: float, position: Point): """ Конструктор света. :param intensity: интенсивность источника света :param position: позиция источника света """ self.intensity = intensity self.position ...
{"/main.py": ["/RayTracing/MakePicture.py"], "/RayTracing/MakePicture.py": ["/RayTracing/ColorOfPicture.py"], "/RayTracing/Sphere.py": ["/RayTracing/Shape.py"], "/RayTracing/Side.py": ["/RayTracing/Shape.py"], "/RayTracing/ColorOfPicture.py": ["/RayTracing/Sphere.py", "/RayTracing/Side.py", "/RayTracing/Light.py"], "/R...
89,173
ajaymaity/eda-viz
refs/heads/master
/tests/test_bar_plot.py
"""Test bar_plot() method in eda_viz.viz module.""" import mock import os import pytest import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) from tests.test_data import CATEGORICAL_LIST, CATEGORICAL_NUMPY, \ CATEGORICAL_PANDAS_SERIES, CATEGORICAL_PANDAS_DF, \ CATEGORICAL_LIST_WITH_NONE,...
{"/tests/test_bar_plot.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_column_distribution.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py"], "/eda_viz/viz.py": ["/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_histog...
89,174
ajaymaity/eda-viz
refs/heads/master
/eda_viz/warnings.py
"""Custom Warning module.""" class DifferentLengthWarning(UserWarning): """Raised when the arguments to visualization have different lengths.""" pass
{"/tests/test_bar_plot.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_column_distribution.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py"], "/eda_viz/viz.py": ["/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_histog...
89,175
ajaymaity/eda-viz
refs/heads/master
/tests/test_column_distribution.py
"""Test column_distribution() method in eda_viz.viz module.""" import mock import os import pytest import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) from tests.test_data import CATEGORICAL_LIST, CATEGORICAL_NUMPY, \ CATEGORICAL_PANDAS_SERIES, CATEGORICAL_PANDAS_DF, \ CATEGORICAL_LIST...
{"/tests/test_bar_plot.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_column_distribution.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py"], "/eda_viz/viz.py": ["/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_histog...
89,176
ajaymaity/eda-viz
refs/heads/master
/tests/test_data.py
"""Contains test data needed to test this application.""" import numpy as np import pandas as pd # List of Categorical Data CATEGORICAL_LIST = ['A', 'B', 'A', 'C', 'D', 'B', 'A'] CATEGORICAL_NUMPY = np.array(CATEGORICAL_LIST) CATEGORICAL_PANDAS_SERIES = pd.Series(CATEGORICAL_LIST) CATEGORICAL_PANDAS_DF = pd.DataFrame(...
{"/tests/test_bar_plot.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_column_distribution.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py"], "/eda_viz/viz.py": ["/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_histog...
89,177
ajaymaity/eda-viz
refs/heads/master
/eda_viz/exceptions.py
"""Custom Exception module.""" class TypeNotSupportedError(Exception): """Raised when a non-acceptable data is passed.""" pass # pylint: disable=W0107 class NonNumericTypeNotSupportedError(TypeNotSupportedError): """Raised when a non-numeric data is passed.""" pass # pylint: disable=W0107 class ...
{"/tests/test_bar_plot.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_column_distribution.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py"], "/eda_viz/viz.py": ["/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_histog...
89,178
ajaymaity/eda-viz
refs/heads/master
/eda_viz/viz.py
"""Visualization module.""" import gc import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import warnings from eda_viz.exceptions import InvalidDataError, \ NonNumericTypeNotSupportedError, TypeNotSupportedError from eda_viz.warnings import DifferentLengthWarning # from tes...
{"/tests/test_bar_plot.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_column_distribution.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py"], "/eda_viz/viz.py": ["/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_histog...
89,179
ajaymaity/eda-viz
refs/heads/master
/tests/test_histogram.py
"""Test histogram() method in eda_viz.viz module.""" import mock import os import pytest import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) from tests.test_data import CATEGORICAL_LIST, CATEGORICAL_NUMPY, \ CATEGORICAL_PANDAS_SERIES, CATEGORICAL_PANDAS_DF, \ CATEGORICAL_LIST_WITH_NONE...
{"/tests/test_bar_plot.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_column_distribution.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py"], "/eda_viz/viz.py": ["/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_histog...
89,180
ajaymaity/eda-viz
refs/heads/master
/setup.py
import pathlib from setuptools import setup from configparser import ConfigParser # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() # Load the version-config file config = ConfigParser() config.read('{}/version-config.ini...
{"/tests/test_bar_plot.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_column_distribution.py": ["/tests/test_data.py", "/eda_viz/viz.py", "/eda_viz/exceptions.py"], "/eda_viz/viz.py": ["/eda_viz/exceptions.py", "/eda_viz/warnings.py"], "/tests/test_histog...
89,183
kesler20/reinforcement_learning
refs/heads/master
/check_for_errors.py
from bionic_society import model_emg import numpy as np import pandas as pd ''' from serial import Serial ser = Serial('COM3', 9600) data = ser.readline(1000) ''' mark_data = pd.read_excel(r'bionic_society\clean_data_mark.xlsx') mark_data = mark_data.drop(['time'], axis=1) X = np.array(mark_data.drop(['Classes'],...
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,184
kesler20/reinforcement_learning
refs/heads/master
/emg_data_view.py
import numpy as np import pandas as pd from matplotlib import pyplot as plt mark_data = pd.read_excel(r'bionic_society\clean_data_mark.xlsx') data = mark_data['emg0'] data = np.cumsum(data) plt.plot(data) plt.show()
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,185
kesler20/reinforcement_learning
refs/heads/master
/bell_test.py
import numpy as np from numpy import ndarray class Bellman(object): def __init__(self, states: list, gamma: float =0.5): self.gamma = gamma self.states = states class Action(object): def __init__(self, probability, utility): self.probability: float = probability self.destina...
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,186
kesler20/reinforcement_learning
refs/heads/master
/data_processing.py
import pandas as pd from numpy.core.numeric import NaN import pandas as pd from pandas.core import series import talib as tl from matplotlib import pyplot as plt import numpy as np class DataProcessing(object): def __init__(self, data): self.data = data def get_datetime_from_twelve(self): dat...
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,187
kesler20/reinforcement_learning
refs/heads/master
/DNN.py
import tensorflow as tf from tensorflow import keras from tensorflow.keras.models import Sequential, load_model from tensorflow.keras.layers import Activation, Dense from tensorflow.keras.optimizers import Adam from tensorflow.keras.metrics import categorical_crossentropy import numpy as np import pandas as pd import s...
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,188
kesler20/reinforcement_learning
refs/heads/master
/kernels.py
import numpy as np from numpy import ndarray import pandas as pd class Kernel(object): def __init__(self, x_m, x_n): self.x_m: ndarray = x_m/np.argmax(x_m) self.x_n: ndarray = x_n/np.argmax(x_n) self.result : ndarray = {} def __repr__(self): return f''' { ...
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,189
kesler20/reinforcement_learning
refs/heads/master
/bell_machine.py
from bell_test import * import numpy as np from kernels import Kernel from test import data_frame, observed, predicted #reward = Kernel(observed, predicted) #reward = reward.gaussian_kernel action_space = [data_frame[0].fillna(0)] print(action_space) state = State(np.array([i for i in range(len(action_space))]),2,a...
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,190
kesler20/reinforcement_learning
refs/heads/master
/support_vector_machine.py
import numpy as np import matplotlib.pyplot as plt import cvxopt from cvxopt import matrix as mx from kernels import Kernel from numpy import ndarray def create_dataset(N, K=2): N = 100 # number of points per class D = 2 X = np.zeros((N * K, D)) # data matrix (each row = single example) y = np.zeros...
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,191
kesler20/reinforcement_learning
refs/heads/master
/test.py
from kernels import Kernel import pandas as pd from matplotlib import pyplot as plt df = pd.read_excel('clean_data_mark.xlsx') df.drop([len(df)-1],axis=0,inplace=True) observed = df['gyro2'].sample(n=round(len(df)/2)) predicted = df['gyro0'].sample(n=round(len(df)/2)) print(observed) print(predicted) k = Kernel(observ...
{"/DNN.py": ["/data_processing.py"], "/bell_machine.py": ["/bell_test.py", "/kernels.py", "/test.py"], "/support_vector_machine.py": ["/kernels.py"], "/test.py": ["/kernels.py"]}
89,192
hodd1988/djcode
refs/heads/master
/sblog/urls.py
from django.conf.urls import patterns, include, url urlpatterns = patterns('sblog.views', url(r'^bloglist/$', 'blog_list', name = 'bloglist'), url(r'^blog/(?P<blog_id>\d+)/$', 'blog_show', name = 'detailblog'), url(r'^blog/tag/(?P<blog_id>\d+)/$', 'blog_filter', name = 'filtrblog'), url(r'^blog/(?P<blog_id>\w+)/u...
{"/sblog/views.py": ["/sblog/forms.py"]}
89,193
hodd1988/djcode
refs/heads/master
/sblog/forms.py
from django import forms class BlogForm(forms.Form): caption = forms.CharField(label = 'title', max_length = 100) content = forms.CharField(widget = forms.Textarea) class Tagform(forms.Form): tag_name = forms.CharField()
{"/sblog/views.py": ["/sblog/forms.py"]}
89,194
hodd1988/djcode
refs/heads/master
/sblog/views.py
from django.shortcuts import render from django.shortcuts import render_to_response from sblog.models import Blog from sblog.models import Author from sblog.forms import BlogForm from django.http import Http404 # Create your views here. def blog_list(request): blogs = Blog.objects.all() return render_to_response("...
{"/sblog/views.py": ["/sblog/forms.py"]}
89,199
Camilo9611/encuesta
refs/heads/master
/core/admin.py
from django.contrib import admin # Register your models here. from core.models import Usuario,Preguntas # Register your models here. admin.site.register(Usuario) admin.site.register(Preguntas)
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,200
Camilo9611/encuesta
refs/heads/master
/core/api/serializers.py
from rest_framework.serializers import ModelSerializer from core.models import Usuario,Preguntas class UsuarioSerializer(ModelSerializer): class Meta: model= Usuario fields=['nroencuesta','nombre','apellido','correo','empresa','telefono','fecha'] class PreguntasSerializer(ModelSerializer): cla...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,201
Camilo9611/encuesta
refs/heads/master
/core/api/views.py
from core.models import Usuario, Preguntas from .serializers import UsuarioSerializer,PreguntasSerializer from rest_framework import viewsets from django.shortcuts import render, redirect from rest_framework.response import Response from django.contrib.auth.forms import AuthenticationForm as au from django.contrib.aut...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,202
Camilo9611/encuesta
refs/heads/master
/encuestas/router.py
from core.api.views import UsuarioViewSet,PreguntasViewSet from rest_framework import routers router= routers.DefaultRouter() router.register('users', UsuarioViewSet), router.register('questions', PreguntasViewSet)
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,203
Camilo9611/encuesta
refs/heads/master
/core/models.py
from django.db import models from phone_field import PhoneField # Create your models here. #################################################### TABLA #1 ############################################################################ class Usuario(models.Model): fecha=models.DateTimeField(auto_now_add=True) nroenc...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,204
Camilo9611/encuesta
refs/heads/master
/core/migrations/0015_auto_20200413_1719.py
# Generated by Django 3.0.3 on 2020-04-13 22:19 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0014_auto_20200413_1325'), ] operations = [ migrations.CreateModel( name='PregExpectati...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,205
Camilo9611/encuesta
refs/heads/master
/core/migrations/0005_auto_20200411_1926.py
# Generated by Django 3.0.3 on 2020-04-12 00:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20200411_1913'), ] operations = [ migrations.AlterField( model_name='pregservicio', name='agilidad...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,206
Camilo9611/encuesta
refs/heads/master
/core/migrations/0001_initial.py
# Generated by Django 3.0.3 on 2020-04-11 23:26 from django.db import migrations, models import django.db.models.deletion import phone_field.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Usuario', ...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,207
Camilo9611/encuesta
refs/heads/master
/core/migrations/0017_auto_20200414_1817.py
# Generated by Django 3.0.3 on 2020-04-14 23:17 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0016_pregexperiencia'), ] operations = [ migrations.CreateModel( name='Preguntas', ...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,208
Camilo9611/encuesta
refs/heads/master
/core/migrations/0006_auto_20200413_1241.py
# Generated by Django 3.0.3 on 2020-04-13 17:41 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20200411_1926'), ] operations = [ migrations.RemoveField( model_name='pregservicio', name='agilidad', ...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,209
Camilo9611/encuesta
refs/heads/master
/core/migrations/0016_pregexperiencia.py
# Generated by Django 3.0.3 on 2020-04-13 23:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0015_auto_20200413_1719'), ] operations = [ migrations.CreateModel( name='PregExperienc...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,210
Camilo9611/encuesta
refs/heads/master
/core/migrations/0013_auto_20200413_1314.py
# Generated by Django 3.0.3 on 2020-04-13 18:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0012_auto_20200413_1313'), ] operations = [ migrations.AlterField( model_name='pregserv...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,211
Camilo9611/encuesta
refs/heads/master
/core/migrations/0007_auto_20200413_1254.py
# Generated by Django 3.0.3 on 2020-04-13 17:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0006_auto_20200413_1241'), ] operations = [ migrations.AlterField( model_name='pregservicio', name='calidad'...
{"/core/admin.py": ["/core/models.py"], "/core/api/serializers.py": ["/core/models.py"], "/core/api/views.py": ["/core/models.py", "/core/api/serializers.py"], "/encuestas/router.py": ["/core/api/views.py"]}
89,215
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/urls.py
from rest_framework.routers import DefaultRouter from views import rest router = DefaultRouter() router.register(r'watersheds', rest.WatershedViewSet, 'watershed') router.register(r'watersheds_boundaries', rest.WatershedBoundaryViewSet, 'watershedboundary') router.register(r'gi_instances', rest.GIInstanceViewSet, 'gi...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,216
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/ginotebook/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin from gidb.urls import router urlpatterns = patterns('', # Examples: # url(r'^$', 'ginotebook.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^gidesigner/', include('gidesigner.urls', namespa...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,217
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/admin.py
from django.contrib.gis import admin from .models import Watershed from .models import WatershedBoundary from .models import GIInstance from .models import HumanPrefImage from .models import GIVegGrowthState from .models import TemplatesForEcoClimate from .models import GITemplate from .models import GIElement from .m...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,218
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/migrations/0005_remove_watershed_location_poly.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('gidb', '0004_watershed_location_poly'), ] operations = [ migrations.RemoveField( model_name='watershed', ...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,219
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='GIElement', fields=[...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,220
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/models.py
from django.contrib.gis.db import models class Watershed(models.Model): name = models.CharField(max_length=64) model_url = models.URLField(max_length=1024) template_menu = models.ForeignKey('TemplatesForEcoClimate') boundary = models.ForeignKey('WatershedBoundary', blank=True, null=True) # TODO: Make r...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,221
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/migrations/0002_auto_20150725_0053.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('gidb', '0001_initial'), ] operations = [ migrations.AlterField( model_name='gielement', name='model_...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,222
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/serializers.py
from rest_framework import serializers from .models import Watershed from .models import WatershedBoundary from .models import GIInstance from .models import HumanPrefImage from .models import GIVegGrowthState from .models import TemplatesForEcoClimate from .models import GITemplate from .models import GIElement from ...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,223
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/views/rest.py
from rest_framework import authentication, permissions, viewsets from rest_framework_gis.filters import DistanceToPointFilter from ..models import Watershed from ..serializers import WatershedSerializer from ..models import WatershedBoundary from ..serializers import WatershedBoundarySerializer from ..models import G...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,224
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidesigner/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^main$', views.main, name='main'), url(r'^birdview/(?P<watershed_id>[0-9]+)/$', views.birdview, name='birdview'), url(r'^streetview/(?P<watershed_id>[0-9]+)/$', views.streetview, name='str...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,225
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/ginotebook/settings.py
""" Django settings for ginotebook project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,226
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/migrations/0006_auto_20150824_1501.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ('gidb', '0005_remove_watershed_location_poly'), ] operations = [ migrations.Create...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,227
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidb/migrations/0003_auto_20150806_1437.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('gidb', '0002_auto_20150725_0053'), ] operations = [ migrations.AddField( model_name='gielement', nam...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,228
ResearchSoftwareInstitute/ginotebook
refs/heads/master
/gidesigner/views.py
from django.shortcuts import render from django.http import HttpResponse from django.core.context_processors import csrf from gidb.models import Watershed def index(request): context = {'watersheds_url': '/api/watersheds/'} return render(request, 'gidesigner/index.html', context) def main(request): water...
{"/ginotebook/urls.py": ["/gidb/urls.py"], "/gidb/admin.py": ["/gidb/models.py"], "/gidb/serializers.py": ["/gidb/models.py"], "/gidb/views/rest.py": ["/gidb/models.py", "/gidb/serializers.py"], "/gidesigner/views.py": ["/gidb/models.py"]}
89,231
anrosent/schedulers
refs/heads/master
/schedulers/tqueue.py
from schedulers import SchedulerBase, Timer, locked from threading import Lock def _insert_sorted(lst, el, cp): for i, e in enumerate(lst): if cp(el, e) <= 0: lst.insert(i, el) break else: lst.append(el) class TimerQueueScheduler(SchedulerBase): def __init__(self):...
{"/schedulers/tqueue.py": ["/schedulers/__init__.py"], "/tests/test.py": ["/schedulers/__init__.py", "/schedulers/tlist.py", "/schedulers/tqueue.py", "/schedulers/tring.py"], "/schedulers/tring.py": ["/schedulers/__init__.py"], "/schedulers/tlist.py": ["/schedulers/__init__.py"]}
89,232
anrosent/schedulers
refs/heads/master
/tests/test.py
from random import randint from schedulers import * from schedulers.tlist import * from schedulers.tqueue import * from schedulers.tring import * #TODO: tests for stop API #TODO: tests in context of actual concurrency for races/deadlocks #TODO: tests for scheduling when T != 0 N = 100 def oracle(cls, n): schedu...
{"/schedulers/tqueue.py": ["/schedulers/__init__.py"], "/tests/test.py": ["/schedulers/__init__.py", "/schedulers/tlist.py", "/schedulers/tqueue.py", "/schedulers/tring.py"], "/schedulers/tring.py": ["/schedulers/__init__.py"], "/schedulers/tlist.py": ["/schedulers/__init__.py"]}
89,233
anrosent/schedulers
refs/heads/master
/schedulers/__init__.py
from time import sleep from collections import namedtuple from threading import Thread def locked(f): def wr(self, *args, **kwargs): self.mutex.acquire() result = f(self, *args, **kwargs) self.mutex.release() return result return wr class Timer(object): def __init__(self, ...
{"/schedulers/tqueue.py": ["/schedulers/__init__.py"], "/tests/test.py": ["/schedulers/__init__.py", "/schedulers/tlist.py", "/schedulers/tqueue.py", "/schedulers/tring.py"], "/schedulers/tring.py": ["/schedulers/__init__.py"], "/schedulers/tlist.py": ["/schedulers/__init__.py"]}
89,234
anrosent/schedulers
refs/heads/master
/schedulers/tring.py
from schedulers import SchedulerBase, Timer, locked from threading import Lock class TimerRingScheduler(SchedulerBase): def __init__(self, ringsize = 64): self.mutex = Lock() self.rid_ctr = 0 self.ring = [list() for i in range(ringsize)] self.t = 0 @locked def stop(self, r...
{"/schedulers/tqueue.py": ["/schedulers/__init__.py"], "/tests/test.py": ["/schedulers/__init__.py", "/schedulers/tlist.py", "/schedulers/tqueue.py", "/schedulers/tring.py"], "/schedulers/tring.py": ["/schedulers/__init__.py"], "/schedulers/tlist.py": ["/schedulers/__init__.py"]}
89,235
anrosent/schedulers
refs/heads/master
/schedulers/tlist.py
from threading import Lock from schedulers import SchedulerBase, Timer, locked class TimerListScheduler(SchedulerBase): def __init__(self): self.mutex = Lock() self.timers = [] self.rid_ctr = 0 self.t = 0 def _start_timer(self, interval: int, rid: int, fun) -> Timer: t...
{"/schedulers/tqueue.py": ["/schedulers/__init__.py"], "/tests/test.py": ["/schedulers/__init__.py", "/schedulers/tlist.py", "/schedulers/tqueue.py", "/schedulers/tring.py"], "/schedulers/tring.py": ["/schedulers/__init__.py"], "/schedulers/tlist.py": ["/schedulers/__init__.py"]}
89,236
abrusebas1997/Contractor1.2
refs/heads/master
/project/urls.py
from django.urls import path, include from project.views import CodeListView, CodeDetailView, CodeCreateView, CodeUpdateView, CodeDeleteView, Home urlpatterns = [ path('', Home.as_view(), name='home-page'), path('list_of_codes/', CodeListView.as_view(), name='code-list-project'), path('new_project/', Code...
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,237
abrusebas1997/Contractor1.2
refs/heads/master
/project/forms.py
from django import forms from project.models import Code class CodeForm(forms.ModelForm): class Meta: # """ Render and process a form based on the Code model. """ model = Code fields = ("title", "content", "author")
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,238
abrusebas1997/Contractor1.2
refs/heads/master
/project/admin.py
from django.contrib import admin from project.models import Code admin.site.register(Code)
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,239
abrusebas1997/Contractor1.2
refs/heads/master
/payments/views.py
from django.shortcuts import render # Create your views here. import stripe from django.conf import settings from django.views.generic.base import TemplateView from django.shortcuts import render stripe.api_key = settings.STRIPE_SECRET_KEY class HomePageView(TemplateView): template_name = 'payment.html' # Create...
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,240
abrusebas1997/Contractor1.2
refs/heads/master
/api/serializers.py
from rest_framework.serializers import ModelSerializer from project.models import Code class CodeSerializer(ModelSerializer): class Meta: model = Code fields = '__all__'
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,241
abrusebas1997/Contractor1.2
refs/heads/master
/project/views.py
from django.shortcuts import render from django.views import generic from django.urls import reverse_lazy from project.forms import CodeForm from project.models import Code from django.http import HttpResponse, HttpResponseRedirect class Home(generic.CreateView): def get(self, request): return render(r...
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,242
abrusebas1997/Contractor1.2
refs/heads/master
/api/urls.py
from django.urls import path from api.views import CodeList, CodeDetail urlpatterns = [ path('code/', CodeList.as_view(), name='code_list'), path('code/<int:pk>', CodeDetail.as_view(), name='code_detail') ]
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,243
abrusebas1997/Contractor1.2
refs/heads/master
/api/views.py
from rest_framework.views import APIView from rest_framework.response import Response from django.shortcuts import get_object_or_404 from project.models import Code from api.serializers import CodeSerializer class CodeList(APIView): def get(self, request): codes = Code.objects.all()[:20] data = C...
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,244
abrusebas1997/Contractor1.2
refs/heads/master
/project/tests.py
from django.contrib.auth.models import User from django.test import TestCase, Client from django.urls import reverse_lazy from project.models import Code import unittest # Create your tests here. class ProjectTestCase(TestCase): def test_true_is_true(self): """ Tests if True is equal to True. Should always...
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,245
abrusebas1997/Contractor1.2
refs/heads/master
/accounts/urls.py
from django.urls import path, include from project.views import CodeListView from accounts.views import SignUpView urlpatterns = [ path('list_of_codes/', CodeListView.as_view(), name='accounts'), path('signup/', SignUpView.as_view(), name='templates-signup-page'), path('accounts/', include('django.contr...
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,246
abrusebas1997/Contractor1.2
refs/heads/master
/accounts/tests.py
from django.test import TestCase from django.contrib.auth.models import User from django.urls import reverse_lazy from accounts.forms import UserCreationForm ​ class RegisterViewTest(TestCase): # Tests to see that there is a sign up page def test_one_page(self): response = self.client.get(reverse_laz...
{"/project/urls.py": ["/project/views.py"], "/project/views.py": ["/project/forms.py"], "/api/urls.py": ["/api/views.py"], "/api/views.py": ["/api/serializers.py"], "/accounts/urls.py": ["/project/views.py"]}
89,249
NekitPnt/kafka_app_demo
refs/heads/master
/ingest_waves_demo/kafka_ingest_consumer.py
from kafka import KafkaConsumer from json import loads ingest_consumer = KafkaConsumer( 'ingest', auto_offset_reset='earliest', enable_auto_commit=True, group_id='my-group-2', value_deserializer=lambda v: loads(v.decode('utf-8')), bootstrap_servers=['localhost:9092'] ) if __name__ == "__main...
{"/ingest_waves_demo/repositories/content.py": ["/ingest_waves_demo/types.py"]}
89,250
NekitPnt/kafka_app_demo
refs/heads/master
/ingest_waves_demo/kafka_ingest_app.py
from kafka import KafkaConsumer, KafkaProducer from json import loads, dumps from ingest_waves_demo.repositories import content, meta import logging # logging.basicConfig(level=logging.INFO) upload_consumer = KafkaConsumer( 'upload', auto_offset_reset='earliest', enable_auto_commit=True, group_id='m...
{"/ingest_waves_demo/repositories/content.py": ["/ingest_waves_demo/types.py"]}
89,251
NekitPnt/kafka_app_demo
refs/heads/master
/ingest_waves_demo/repositories/content.py
import random from datetime import datetime from faker import Faker from ingest_waves_demo.types import UploadData, MetaType, MetaGenre, MetaZodiac fake: Faker = Faker() def new_content(): meta_class = random.choice([MetaType, MetaGenre, MetaZodiac]) meta = meta_class( fake.catch_phrase(), f...
{"/ingest_waves_demo/repositories/content.py": ["/ingest_waves_demo/types.py"]}
89,252
NekitPnt/kafka_app_demo
refs/heads/master
/ingest_waves_demo/repositories/meta.py
def save_meta_to_db(meta: dict): print(f"Meta saved: {meta}") def convert_upload_content_meta(meta: dict): return meta def convert_meta_for_kafka_ingest(new_meta: dict): meta = { 'availability': new_meta['availability'], 'track_id': 1234, 'duration': 4321, 'format': 'mp3'...
{"/ingest_waves_demo/repositories/content.py": ["/ingest_waves_demo/types.py"]}
89,253
NekitPnt/kafka_app_demo
refs/heads/master
/ingest_waves_demo/kafka_upload_app.py
import time import random from kafka import KafkaProducer from json import dumps from repositories import content import logging logging.basicConfig(level=logging.INFO) upload_producer = KafkaProducer( value_serializer=lambda m: dumps(m).encode('utf-8'), retries=5, request_timeout_ms=2000, bootstrap...
{"/ingest_waves_demo/repositories/content.py": ["/ingest_waves_demo/types.py"]}
89,254
NekitPnt/kafka_app_demo
refs/heads/master
/ingest_waves_demo/types.py
import random from dataclasses import dataclass from typing import Union from faker import Faker fake: Faker = Faker() @dataclass class BaseMeta: title: str = fake.catch_phrase() duration: int = fake.numerify() position: int = 1 play_count: int = 0 date: str = fake.time() availability: bool =...
{"/ingest_waves_demo/repositories/content.py": ["/ingest_waves_demo/types.py"]}
89,275
HuddleEng/octopose
refs/heads/master
/octopose/octo.py
""" This module is used to call through to the Octopus Deploy APIs""" # MIT License # # Copyright (c) 2018 Huddle # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
{"/octopose/deploy.py": ["/octopose/local_deploy.py"]}