index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
86,548 | bit-ranger/exp | refs/heads/master | /exp/Operator.py | class BinaryOperator:
def __init__(self, env):
self.env = env
@property
def mark(self):
return ''
@property
def priority(self):
return 0
def apply(self, left, right):
pass
def __str__(self):
return self.mark
class UnaryOperator:
def __init_... | {"/test/test.py": ["/exp/__init__.py"], "/exp/__init__.py": ["/exp/Operator.py"]} |
86,549 | bit-ranger/exp | refs/heads/master | /test/test.py | from exp import run, get_ast
env = {'a': {'b': [{'c': '2'}, {'d': ''}]}, 'e': 3}
assert run('!(a.b.0.c == {})', env)
assert run('a.b.1.d == {}', env)
assert run('a.b.2 == None', env)
assert run('a.b.0.c == (1+(2*(4/4))-1) & (!(1>2))', env), "assert failure"
assert get_ast('a.b.0.c == a.b.0.c & (!({a|b+c-d&f/f%4} == ... | {"/test/test.py": ["/exp/__init__.py"], "/exp/__init__.py": ["/exp/Operator.py"]} |
86,550 | bit-ranger/exp | refs/heads/master | /exp/__init__.py | from exp.AST import AST
from exp.Operator import get_all_operator
from exp.Tokenizer import Tokenizer
def run(exp, env):
ao = get_all_operator(env)
tokens = Tokenizer(ao).tokenizer(exp)
return AST(ao, tokens).eval(env)
def get_ast(exp, env):
ao = get_all_operator(env)
tokens = Tokenizer(ao).toke... | {"/test/test.py": ["/exp/__init__.py"], "/exp/__init__.py": ["/exp/Operator.py"]} |
86,580 | stupid-beard/pyFY3200S | refs/heads/master | /test.py | #!/usr/bin/env python3
import funcgen.fy3200s as fg;
import time;
###############################################################################
funcGen = fg.FY3200S()
funcGen.debug_mode = True
print(funcGen.get_device_id())
funcGen[0].set_frequency(10000)
funcGen[0].set_amplitude(2.5)
time.sleep(0.1)
funcGen[0].s... | {"/test.py": ["/funcgen/fy3200s.py"]} |
86,581 | stupid-beard/pyFY3200S | refs/heads/master | /funcgen/fy3200s.py | #!/usr/bin/env python3
import serial
import io
from enum import IntEnum
###############################################################################
class Waveform(IntEnum):
sine = 0
square = 1
triangle = 2
arb1 = 3
arb2 = 4
arb3 = 5
arb4 = 6
lorentz_pulse = 7
multi_tone = 8
... | {"/test.py": ["/funcgen/fy3200s.py"]} |
86,582 | stupid-beard/pyFY3200S | refs/heads/master | /funcgen/__init__.py | #!/usr/bin/env python3
__all__ = [
'fy3200s'
]
from . import *
| {"/test.py": ["/funcgen/fy3200s.py"]} |
86,583 | scbunn/dumb-monitor | refs/heads/master | /monitor/manager.py | """Monitor Manager.
The monitor manager is responsible for managing the monitor thread pools and
requests.
Manager lifecycle:
- Spawn request thread. The request thread drops a new request on the
queue every N seconds.
- Spawn Monitor thread pool. The monitor thread pool pop an item from the
que... | {"/app.py": ["/monitor/manager.py", "/monitor/endpoint.py"]} |
86,584 | scbunn/dumb-monitor | refs/heads/master | /monitor/endpoint.py | """Request Endpoints.
"""
import logging
import datetime
import requests
import time
class GetTaxSoapEndpoint(object):
"""GetTax SOAP Endpoint."""
def __init__(self):
self.url = 'https://www.google.com'
self.payload = {}
self.logger = logging.getLogger(__name__)
def request(self... | {"/app.py": ["/monitor/manager.py", "/monitor/endpoint.py"]} |
86,585 | scbunn/dumb-monitor | refs/heads/master | /app.py | """Monitor GetTax SOAP Requests
"""
import logging
import signal
import time
from monitor.manager import Manager
from monitor.endpoint import GetTaxSoapEndpoint
class SignalCatcher(object):
shutdown = False
def __init__(self):
signal.signal(signal.SIGINT, self.terminate)
signal.signal(signal... | {"/app.py": ["/monitor/manager.py", "/monitor/endpoint.py"]} |
86,598 | NiBu-dev/JSONtoCBOR | refs/heads/master | /test.py | import unittest
from in_out import InOut
from converter import JsonToCbor
import re
class InputTesCase(unittest.TestCase):
io_inst = InOut()
conv_inst = JsonToCbor({})
def test_input_file_extension(self):
expected_extension = "json"
user_input_extension = re.findall(r"\w+.(\w+)", self.io... | {"/test.py": ["/in_out.py", "/converter.py"]} |
86,599 | NiBu-dev/JSONtoCBOR | refs/heads/master | /converter.py |
class JsonToCbor:
def __init__(self, data: dict) -> None:
self.data = data
self.majorTypes = {"u_int": 0 << 5, "s_int": 1 << 5, "string": 3 << 5, "array": 4 << 5,
"map": 5 << 5}
self.intTypes = {"uint_8": 24, "uint_16": 25, "uint_32": 26, "uint_64": 27}
def text_... | {"/test.py": ["/in_out.py", "/converter.py"]} |
86,600 | NiBu-dev/JSONtoCBOR | refs/heads/master | /in_out.py | import json
class InOut:
def __init__(self) -> None:
# self.input = input("Enter the name of the input json file: ")
# self.output = input("Enter the name of the output CBOR file: ")
self.input = "myJson.json"
self.output = "out.cbor"
self.bin_data = None
def read_jso... | {"/test.py": ["/in_out.py", "/converter.py"]} |
86,723 | Cattaneo123/quiz-system-phase2 | refs/heads/master | /quiz_app/__init__.py | # This file initializes our actual Flask application
from flask import Flask
# creating our app
app = Flask(__name__, static_url_path="/static")
# assigning secret key in order to encrypt our cookies and safely send them to the browser
app.config['SECRET_KEY'] = '77a2c153f819019e8657ceea0848de0d'
app.config["QUIZ... | {"/quiz_app/routes.py": ["/quiz_app/__init__.py"]} |
86,724 | Cattaneo123/quiz-system-phase2 | refs/heads/master | /quiz_app/routes.py | from flask import render_template, request, redirect, url_for, send_file, send_from_directory, flash
from quiz_app import app
from quiz_app.forms import *
from datetime import datetime
import csv
@app.route("/")
@app.route("/home")
def home():
return render_template('home.html', title='Home Page')
@app.route(... | {"/quiz_app/routes.py": ["/quiz_app/__init__.py"]} |
86,728 | nyu-compphys-2016/recitation5 | refs/heads/master | /analysis.py | import numpy as np
def linear_fit(x, y):
assert x.shape[0] == y.shape[0]
xind = np.isfinite(x)
yind = np.isfinite(y)
X = x[xind * yind]
Y = y[xind * yind]
N = X.shape[0]
Ex = X.sum()/N
Ey = Y.sum()/N
Exx = (X*X).sum()/N
Exy = (X*Y).sum()/N
m = (Exy - Ex*Ey) / (Exx - ... | {"/other.py": ["/test.py"], "/test.py": ["/analysis.py"]} |
86,729 | nyu-compphys-2016/recitation5 | refs/heads/master | /other.py | import test
print(test.makeA(4))
print(test.makeb(4))
| {"/other.py": ["/test.py"], "/test.py": ["/analysis.py"]} |
86,730 | nyu-compphys-2016/recitation5 | refs/heads/master | /test.py | import numpy as np
import matplotlib.pyplot as plt
import analysis as an
import time
def makeA(N):
A = np.random.rand(N,N)
return A
def makeb(N):
b = np.zeros(N)
b[-1] = 100
return b
if __name__ == "__main__":
N = 10
A = makeA(N)
b = makeb(N)
N = np.array([400,800,1600,3200,6400... | {"/other.py": ["/test.py"], "/test.py": ["/analysis.py"]} |
86,732 | matthewearl/Telescope-Guide | refs/heads/master | /camera.py | from numpy import *
__all__ = ['CameraModel', 'BarrelDistortionCameraModel']
class CameraModel(object):
def pixel_to_vec(self, x, y):
raise NotImplementedException()
class BarrelDistortionCameraModel(object):
def __init__(self, pixel_scale, bd_coeff, image_width, image_height):
self.pixel_sca... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,733 | matthewearl/Telescope-Guide | refs/heads/master | /fit_project_ellipse.py | #!/usr/bin/python
import fit
import sys
import util
from numpy import *
class EllipseProjectFitter(fit.Fitter):
def __init__(self):
pass
def solve(self,
world_points,
image_features,
pixel_scale=None,
annotate_image=None):
assert pixel_... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,734 | matthewearl/Telescope-Guide | refs/heads/master | /astdb.py | #!/usr/bin/python
import subprocess
import cv
import sys
import argparse
import itertools
import sys
import math
import time
import stardb
import scipy.spatial
import camera
import collections
import util
from numpy import *
# When creating the asterism database the celestial sphere is
# (quasi-efficiently) covered... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,735 | matthewearl/Telescope-Guide | refs/heads/master | /calibrate_from_stars.py | #!/usr/bin/python
import numpy
import fit_lm
import stardb
__all__ = (
'calibrate',
)
def calibrate(star_to_pixel, image_size, annotate_image=None):
print "Loading database..."
db = stardb.StarDatabase(stardb.hip_star_gen('data/hip_main.dat'))
world_points = dict(
(star_name, tuple(10000. *... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,736 | matthewearl/Telescope-Guide | refs/heads/master | /fit_project.py | #!/usr/bin/python
import getopt, sys, cv, math
import numpy.linalg
import scipy.linalg
from numpy import *
import find_circles
import util
def solve(world_points_in, image_points_in, pixel_scale, annotate_image=None):
"""
Find a camera's orientation and pixel scale given a set of world
coordinates and cor... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,737 | matthewearl/Telescope-Guide | refs/heads/master | /gen_target.py | #!/usr/bin/python
import math
import operator
margin=10
width=210
height=297
padding = 5
radius = 15.
__all__ = ['get_targets']
def gen_target(xpos, ypos, radius, number, num_bits=6):
out = ""
code = [[True, False] if number & 1<<bit else [False, True] for bit in reversed(xrange(num_bits))]
code = redu... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,738 | matthewearl/Telescope-Guide | refs/heads/master | /fit.py | import getopt
import find_circles
import gen_target
import cv
import util
from numpy import *
__all__ = ['fitter_main', 'Fitter']
class Fitter(object):
def solve(self,
world_points,
image_features,
pixel_scale=None,
annotate_image=None):
raise NotImp... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,739 | matthewearl/Telescope-Guide | refs/heads/master | /stardb.py | #!/usr/bin/python
import pyfits
import os
import sys
import math
import struct
import util
import re
import scipy.spatial
import cPickle as pickle
from numpy import *
__all__ = ['StarDatabase', 'hip_star_gen', 'bsc_star_gen', 'xy_list_star_gen', 'HipStar']
RA_RE = re.compile("([+-]?)([0-9]+)[: ]([0-9]+)[: ]([0-9]+\... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,740 | matthewearl/Telescope-Guide | refs/heads/master | /util.py | import operator
import math
import numpy
import scipy.linalg
__all__ = ['draw_points', 'get_circle_pattern']
def matrix_rotate_x(theta):
s = math.sin(theta)
c = math.cos(theta)
return numpy.matrix([[1.0, 0.0, 0.0, 0.0],
[0.0, c, -s, 0.0],
[0.0, s, c... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,741 | matthewearl/Telescope-Guide | refs/heads/master | /fit_lm.py | #!/usr/bin/python
import getopt, sys, math, cv
import argparse
import gen_target
import numpy
from numpy import *
import find_circles
import util
import fit
import fit_project_ellipse
import scipy.linalg
__all__ = ['solve']
STEP_FRACTION = 1.
ERROR_CUTOFF = 0.001
# sub_jacobian_point_<transformation>()
#
# Gives:
... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,742 | matthewearl/Telescope-Guide | refs/heads/master | /fit_dlt.py | #!/usr/bin/python
import getopt, sys, cv
import numpy
import scipy.linalg
from numpy import *
import find_circles
import util
__all__ = ['solve']
# Implementation of algorithm described here:
#
# http://users.cecs.anu.edu.au/~hartley/Papers/CVPR99-tutorial/tut_4up.pdf
#
# Compute the 3x4 camera matrix using a direct... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,743 | matthewearl/Telescope-Guide | refs/heads/master | /find_circles.py | #!/usr/bin/python
import operator
import getopt
import random
import sys
import cv
import cv2
import math
import util
OUTER_SEARCH_RADIUS = 20
INNER_SEARCH_RADIUS = 5
MIN_CONTOUR_AREA = 20
__all__ = ['find_concentric_circles', 'find_circles']
def dist_sqr(c1, c2):
return (c1[0] - c2[0]) ** 2 + (c1[1] - c2[1]) *... | {"/fit_project_ellipse.py": ["/fit.py", "/util.py"]} |
86,764 | brunoisy/reference_pattern_finder | refs/heads/master | /build_compact_reference_mask.py | import re
import pandas as pd
import numpy as np
from sqlalchemy import create_engine
from skbio.alignment import global_pairwise_align
from custom_sequence import CustomSequence, subst_matrix
# return array containing reference format corresponding to each ref (ref with digits replaced by 0 and _..._IS removed)
def ... | {"/build_compact_reference_mask.py": ["/custom_sequence.py"]} |
86,765 | brunoisy/reference_pattern_finder | refs/heads/master | /custom_sequence.py | from skbio.sequence import GrammaredSequence
from skbio.util import classproperty
import string
subst_matrix = {}
for x1 in string.ascii_lowercase+string.ascii_uppercase:
subst_matrix[x1]={}
for x2 in string.ascii_lowercase+string.ascii_uppercase:
if x1 == x2:
subst_matrix[x1][x2] = 1
... | {"/build_compact_reference_mask.py": ["/custom_sequence.py"]} |
86,766 | brunoisy/reference_pattern_finder | refs/heads/master | /old.py | import re
import pandas as pd
import numpy as np
from sqlalchemy import create_engine
# return array containing reference format corresponding to each ref (ref with digits replaced by 0 and _..._IS removed)
def to_reference_format(refs):
reference_formats = ['' for _ in range(len(refs))]
for (i, r) in enumer... | {"/build_compact_reference_mask.py": ["/custom_sequence.py"]} |
86,775 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/models/Meeting.py | class Meeting:
"""Defines a Microsoft Teams meeting.
Attributes:
id_: id of the meeting
title: title of the meeting
time_started: time when meeting started
channel: channel of the meeting
"""
def __init__(self, id_, title, channel=None):
self.id_ = id_
s... | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,776 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/common/exceptions.py | class ConfigError(Exception):
"""Config was not loaded correctly"""
def __init__(self,
msg="Invalid config data. Check environmental entries"):
self.msg = msg
super().__init__(self.msg)
def __str__(self):
return self.msg
class NoSignInDataError(ConfigError):
... | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,777 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/common/constants.py | greeting = "> I'm in deal!" | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,778 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/__main__.py | from .run import run
run()
| {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,779 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/models/Bot.py | from time import sleep
from selenium.webdriver.common.keys import Keys
from .Team import Team
from .Meeting import Meeting
from ..common.settings import config
from ..common import functions as fn
class User:
"""Defines an Microsoft Teams user.
Attributes:
email (str): stores email of the user
... | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,780 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/common/functions.py | from selenium.webdriver.common.by import By
from selenium.common import exceptions
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from .settings import browser
def query_selector(sele... | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,781 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/models/Channel.py | class Channel:
"""Defines a channel of a team.
Attributes:
name (str): name of the channel
id_ (str): id of the channel
has_meeting (bool): if the channel has a meeting now.
Defaults to False.
"""
def __init__(self, name, id_, has_meeting=False):
... | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,782 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/common/settings.py | from . import exceptions
from dotenv import find_dotenv
from dotenv import dotenv_values
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
# Environment entries
config = dotenv_values(find_dotenv())
if not config:
raise exceptions.NoSignInDataError
# Settings of the webdriv... | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,783 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/run.py | from .common.settings import browser
from .common.settings import config
from .common.constants import greeting
from .models.Bot import Bot
def run() -> None:
# Greet us
print(greeting)
# Create an instance of the bot
bot = Bot(config["EMAIL"], config["PASSWORD"])
# Get to the MS Teams page
b... | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,784 | gaievskyi/quarantine-bot-core | refs/heads/main | /bot/models/Team.py | from .Channel import Channel
from ..common import functions as fn
class Team:
"""Defines a Microsoft Teams team.
Attributes:
name: name of a Team
id_: id of a Team
"""
def __init__(self, name, id_, channels: list[Channel]=None):
self.name = name
self.id_ = id_
... | {"/bot/__main__.py": ["/bot/run.py"], "/bot/models/Bot.py": ["/bot/models/Team.py", "/bot/models/Meeting.py", "/bot/common/settings.py"], "/bot/common/functions.py": ["/bot/common/settings.py"], "/bot/run.py": ["/bot/common/settings.py", "/bot/common/constants.py", "/bot/models/Bot.py"], "/bot/models/Team.py": ["/bot/m... |
86,810 | Abrahann/wishlist | refs/heads/master | /apps/first_app/models.py | import re
from django.db import models
import bcrypt
EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$')
NAME_REGEX = re.compile(r'^[a-zA-z]*$')
# Create your models here.
class UserManager(models.Manager):
def login(self, email, password):
encodedPassword = password.encode(encoding... | {"/apps/first_app/views.py": ["/apps/first_app/models.py"]} |
86,811 | Abrahann/wishlist | refs/heads/master | /apps/first_app/views.py | from django.shortcuts import render, redirect
from .models import *
from django.contrib import messages
# Create your views here.
def index(request):
if "id" in request.session:
return redirect("/dashboard")
return render(request, "index.html")
def validate(request):
if request.method != "POST":
... | {"/apps/first_app/views.py": ["/apps/first_app/models.py"]} |
86,812 | Abrahann/wishlist | refs/heads/master | /apps/first_app/urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index),
url(r'^validate$', views.validate),
url(r'^dashboard$', views.dashboard),
url(r'^create$', views.create),
url(r'^additem$', views.additem),
url(r'^wishes/(?P<id>\d+)$', views.wishes),
url(r'^log... | {"/apps/first_app/views.py": ["/apps/first_app/models.py"]} |
86,813 | Abrahann/wishlist | refs/heads/master | /apps/first_app/migrations/0002_auto_20180625_1643.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-06-25 21:43
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('first_app', '0001_initial'),
]
operations = [
migrations.RemoveField(
... | {"/apps/first_app/views.py": ["/apps/first_app/models.py"]} |
86,814 | Abrahann/wishlist | refs/heads/master | /apps/first_app/migrations/0003_auto_20180626_0756.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-06-26 12:56
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('first_app', '0002_auto_20180625_1643'),
]
operations... | {"/apps/first_app/views.py": ["/apps/first_app/models.py"]} |
86,832 | cybergoose13/flashcards | refs/heads/master | /flashcard_app/views/views.py | from django.http.response import HttpResponse, JsonResponse
from django.shortcuts import render, redirect
from django.contrib import messages
from flashcard_app.models import *
import bcrypt
# Create your views here.
def index(request):
return render(request, 'index.html')
def newCard(request):
return render... | {"/flashcard_app/views/views.py": ["/flashcard_app/models.py"]} |
86,833 | cybergoose13/flashcards | refs/heads/master | /flashcard_app/models.py | from django.db import models
# Create your models here.
import bcrypt
class CardManager(models.Manager):
def card_validator(self, postData):
errors= {}
if len(postData['category']) < 2:
errors['category']= "Category must contain more than 1 characters."
if len(postData['questio... | {"/flashcard_app/views/views.py": ["/flashcard_app/models.py"]} |
86,834 | cybergoose13/flashcards | refs/heads/master | /flashcard_app/migrations/0001_initial.py | # Generated by Django 3.1.4 on 2021-01-04 07:55
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Card',
fields=[
('id', models.AutoField(aut... | {"/flashcard_app/views/views.py": ["/flashcard_app/models.py"]} |
86,835 | cybergoose13/flashcards | refs/heads/master | /flashcard_app/urls.py | from django.urls import path
from . import views
from .views import views
urlpatterns = [
path('', views.index, name= 'index'),
path('new', views.newCard, name= 'new'),
path('addcard', views.addCard, name= 'addcard'),
path('categories', views.categories, name= 'categories'),
path('card/<str:categor... | {"/flashcard_app/views/views.py": ["/flashcard_app/models.py"]} |
86,900 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/requestprocessor.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,901 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/apps.py | from django.apps import AppConfig
class OseoServerConfig(AppConfig):
name = "oseoserver"
verbose_name = "OSEO server"
def ready(self):
import oseoserver.signals.handlers
| {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,902 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/mailsender.py | import logging
try:
from io import StringIO
except ImportError: # python2
from StringIO import StringIO
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.contrib.auth import get_user_model
from django.core.... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,903 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/soap.py | """Functions for dealing with SOAP in oseoserver."""
from __future__ import absolute_import
from lxml import etree
from .constants import NAMESPACES
from .errors import InvalidSoapVersionError
from .auth import usernametoken
def get_soap_version(request_element):
"""Return a request"s SOAP version
Support... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,904 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/auth/usernametoken.py | # Copyright 2015 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,905 | pyoseo/django-oseoserver | refs/heads/master | /tests/unittests/test_operations_get_status.py | """Unit tests for oseoserver.operations.getstatus"""
import pytest
import mock
from oseoserver.operations import getstatus
from oseoserver import constants
from oseoserver import errors
pytestmark = pytest.mark.unit
class TestGetStatus(object):
def test_creation(self):
getstatus.GetStatus()
| {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,906 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/signals/handlers.py | # Copyright 2016 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,907 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/constants.py | """Enumerations and constants for oseoserver."""
import enum
ENCODING = "utf-8"
NAMESPACES = {
"soap": "http://www.w3.org/2003/05/soap-envelope",
"soap1.1": "http://schemas.xmlsoap.org/soap/envelope/",
"wsse": "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-"
"wssecurity-secext-1.0.... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,908 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/scripts/configureapache.py | '''
A script for setting pyoseo up in the apache webserver as part of the giosystem
framework
'''
import os
import sys
import getpass
import argparse
import subprocess
import socket
import datetime as dt
import shutil
import inspect
def build_parser():
parser = argparse.ArgumentParser()
parser.add_argument('p... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,909 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/signals/signals.py | # Copyright 2015 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,910 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/operations/submit.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,911 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/operations/getcapabilities.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,912 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/views.py | from __future__ import absolute_import
import logging
import celery
from django.http import HttpResponse
from django.http import HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from lxml import etree
from rest_framework import viewsets
from rest_framework.decorators import detail_route
from ... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,913 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/operations/getoptions.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,914 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/scripts/fabfile_ftp.py | '''
Install and manage an FTP service with virtual users.
This fabfile will set up the vsftpd server with virtual users, so that it is
ready to be used for delivering orders.
It will:
* install vsftpd and a pam module for using pwdfiles
* create the vsftpd configuration file
* create the pam service file... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,915 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/serializers.py | import dateutil.parser
import pytz
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from . import models
from . import settings
class SubscriptionOrderSerializer(serializers.ModelSerializer):
class Meta:
model = models.Order
fields = (
"id"... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,916 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/auth/noop.py | # Copyright 2015 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,917 | pyoseo/django-oseoserver | refs/heads/master | /setup.py | #!/usr/bin/env python
import io
from os.path import dirname, join
from setuptools import find_packages, setup
def read(*names, **kwargs):
return io.open(
join(dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf-8")
).read()
setup(
name="oseoserver",
version=read("VERSI... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,918 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/operations/cancel.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,919 | pyoseo/django-oseoserver | refs/heads/master | /tests/integrationtests/test_operations_getcapabilities_integration.py | """Integration tests for oseoserver.operations.getcapabilities."""
import pytest
from pyxb.bundles.opengis import oseo_1_0 as oseo
pytestmark = pytest.mark.integration
def test_get_capabilities():
request = oseo.GetCapabilities(
service="OS",
version="1.0.0"
) | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,920 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/__init__.py | import pkg_resources
__version__ = pkg_resources.require("oseoserver")[0].version
default_app_config = "oseoserver.apps.OseoServerConfig"
| {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,921 | pyoseo/django-oseoserver | refs/heads/master | /tests/unittests/test_requestprocessor.py | """Unit tests for the oseoserver.requestprocessor module."""
import pytest
from lxml import etree
from oseoserver import errors
from oseoserver import requestprocessor
pytestmark = pytest.mark.unit
def test_parse_xml_correct():
fake_xml = etree.fromstring("""
<?xml version="1.0" encoding="UTF-8"?>
<Get... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,922 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/orderpreparation/__init__.py | __author__ = 'geo2'
| {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,923 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/migrations/0003_batch_additional_status_info.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-20 17:45
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('oseoserver', '0002_auto_20170220_1610'),
]
operations = [
migrations.AddFie... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,924 | pyoseo/django-oseoserver | refs/heads/master | /tests/unittests/test_models.py | """unit tests for oseoserver.models"""
import pytest
from oseoserver import models
pytestmark = pytest.mark.unit
class TestOrderItem(object):
@pytest.mark.django_db
def test_create_no_batch(self):
item = models.OrderItem.objects.create(
collection="fake_collection",
item_id... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,925 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/errors.py | # Copyright 2016 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,926 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/operations/getstatus.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,927 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/models.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,928 | pyoseo/django-oseoserver | refs/heads/master | /tests/integrationtests/test_requestprocessor_integration.py | """Integration tests for oseoserver.requestprocessor"""
from lxml import etree
import pytest
from pyxb.bundles.opengis import oseo_1_0 as oseo
from oseoserver import requestprocessor
from oseoserver import errors
from oseoserver import constants
pytestmark = pytest.mark.integration
class TestServer(object):
d... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,929 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/operations/describeresultaccess.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,930 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/tasks.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,931 | pyoseo/django-oseoserver | refs/heads/master | /tests/unittests/test_utilities.py | """Unit tests for oseoserver.utilities"""
import pytest
import mock
from mock import DEFAULT
from oseoserver import errors
from oseoserver.models import Order
from oseoserver import utilities
pytestmark = pytest.mark.unit
def test_get_generic_order_config_incorrect_order_type():
order_type = "fake"
with py... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,932 | pyoseo/django-oseoserver | refs/heads/master | /tests/integrationtests/test_operations_getstatus_integration.py | """Integration tests for oseoserver.operations.getstatus"""
import pytest
from pyxb.bundles.opengis import oseo_1_0 as oseo
from lxml import etree
from oseoserver import errors
from oseoserver import models
from oseoserver.operations import getstatus
from oseoserver import requestprocessor
pytestmark = pytest.mark.i... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,933 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/migrations/0002_auto_20170220_1610.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-20 16:10
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('oseoserver', '0001_initial'),
]
operations = [
... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,934 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/admin.py | from __future__ import absolute_import
from django.contrib import admin
from django.core.urlresolvers import reverse
from django.utils.html import format_html
from . import models
from . import requestprocessor
from . import utilities
def order_change_form_link(instance):
change_form_url = reverse("admin:oseose... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,935 | pyoseo/django-oseoserver | refs/heads/master | /tests/integrationtests/test_operations_submit_integration.py | """Integration tests for oseoserver.operations.submit"""
from lxml import etree
import pytest
from pyxb import BIND
from pyxb.bundles.opengis import oseo_1_0 as oseo
from pyxb.binding import datatypes as xsd
from pyxb.binding import basis
from pyxb import namespace
from oseoserver.operations import submit
from oseose... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,936 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/utilities.py | # Copyright 2017 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,937 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/orderpreparation/exampleorderprocessor.py | # Copyright 2015 Ricardo Garcia Silva
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,938 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-20 11:53
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,939 | pyoseo/django-oseoserver | refs/heads/master | /tests/conftest.py | """pytest configuration file."""
import pytest
def pytest_configure(config):
config.addinivalue_line(
"markers",
"unit: run only unit tests"
)
config.addinivalue_line(
"markers",
"integration: run only integration tests"
)
| {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,940 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/settings.py | """Providing custom values for oseoserver's settings."""
from django.conf import settings
from . import constants
def _get_setting(parameter, default_value):
return getattr(settings, parameter, default_value)
def get_mail_recipient_handler():
return _get_setting("OSEOSERVER_MAIL_RECIPIENT_HANDLER", None)
... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,941 | pyoseo/django-oseoserver | refs/heads/master | /tests/unittests/test_operations_submit.py | """Unit tests for oseoserver.operations.submit"""
from lxml import etree
import mock
import pytest
from pyxb import BIND
from pyxb.bundles.opengis import oseo_1_0 as oseo
from oseoserver import errors
from oseoserver.operations import submit
from oseoserver import models
from oseoserver.models import Order
from oseos... | {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,942 | pyoseo/django-oseoserver | refs/heads/master | /oseoserver/urls.py | from __future__ import absolute_import
from django.conf.urls import url
from . import views
urlpatterns = [
url(r"^$", views.oseo_endpoint, name="oseo_endpoint"),
]
| {"/oseoserver/requestprocessor.py": ["/oseoserver/__init__.py", "/oseoserver/constants.py", "/oseoserver/models.py", "/oseoserver/settings.py"], "/oseoserver/apps.py": ["/oseoserver/signals/handlers.py"], "/oseoserver/mailsender.py": ["/oseoserver/__init__.py"], "/oseoserver/soap.py": ["/oseoserver/constants.py", "/ose... |
86,943 | Smunity/Smunity-Backend | refs/heads/main | /smunity/main/migrations/0002_auto_20210328_0443.py | # Generated by Django 3.1.7 on 2021-03-27 23:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
migrations.RenameField(
... | {"/smunity/main/views.py": ["/smunity/main/models.py"]} |
86,944 | Smunity/Smunity-Backend | refs/heads/main | /smunity/main/migrations/0004_auto_20210328_0451.py | # Generated by Django 3.1.7 on 2021-03-27 23:51
from django.db import migrations, models
import main.models
class Migration(migrations.Migration):
dependencies = [
('main', '0003_auto_20210328_0445'),
]
operations = [
migrations.CreateModel(
name='Company',
field... | {"/smunity/main/views.py": ["/smunity/main/models.py"]} |
86,945 | Smunity/Smunity-Backend | refs/heads/main | /smunity/main/views.py | from django.shortcuts import render
from django.http import JsonResponse
from .models import User,Community,Company
from django.contrib.auth import login, logout,authenticate
from django.views.decorators.csrf import csrf_exempt
# Create your views here.
@csrf_exempt
def signup(request):
if request.method=="POST":
... | {"/smunity/main/views.py": ["/smunity/main/models.py"]} |
86,946 | Smunity/Smunity-Backend | refs/heads/main | /smunity/main/models.py | from django.db import models
from django.contrib.auth.models import AbstractUser
import os
from django.conf import settings
from django_countries.fields import CountryField
# Create your models here.
def upload_user_image(instance,filename):
# path_to_upload=os.path(instance.username+"/ProfilePicture")
direc... | {"/smunity/main/views.py": ["/smunity/main/models.py"]} |
86,947 | Smunity/Smunity-Backend | refs/heads/main | /smunity/main/migrations/0003_auto_20210328_0445.py | # Generated by Django 3.1.7 on 2021-03-27 23:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20210328_0443'),
]
operations = [
migrations.AlterField(
model_name='event',
name='speaker',
... | {"/smunity/main/views.py": ["/smunity/main/models.py"]} |
86,950 | kadirturan0/PythonKampi | refs/heads/master | /Gun_7/Class_2.py | # print(2+6)
# print(2*6)
# print(type(2))
class sayi:
def __init__(self,deger):
self.deger=deger
def __add__(self, other):
return self.deger + other.deger
class Iki(sayi):
pass
class Alti(sayi):
pass
print(Alti(6).deger + Iki(2).deger) | {"/Gun_5/tekrar.py": ["/Gun_5/zar_atma_fonksiyonel.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.