index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
33,759
Jasperabez/PPTSynchro
refs/heads/master
/Threads/toggle_thread.py
import pyWinhook as pyHook import pythoncom from win10toast import ToastNotifier from config import * def ToggleThread(program_state, thread_lock): def OnKeyPress(event): print(event.Key) if event.Key == TOGGLE_KEY: if program_state.isSet(): program_state.clear() ...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,760
Jasperabez/PPTSynchro
refs/heads/master
/main.py
from config import * if __name__ == '__main__': try: if PROGRAM_MODE == 'Controller_server': import ControllerServer ControllerServer.main() if PROGRAM_MODE == 'Controller_client': import ControllerClient ControllerClient.main() else: ...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,761
Jasperabez/PPTSynchro
refs/heads/master
/ControllerClient.py
import logging from sys import platform if platform == "linux": import pyxhook as pyhook elif platform == "win32": import pythoncom import pyWinhook as pyhook from config import * if COMMS_TYPE == 'Wifi': from Handlers.SocketHandler import SocketHandler as CommsHandler else: from Handlers.BtComms...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,762
Jasperabez/PPTSynchro
refs/heads/master
/Handlers/PptHandler.py
from win32com import client class PptHandler: def __init__(self): self.win32 = client def GrabPptSession(self): try: self.ppt_app = self.win32.GetActiveObject("PowerPoint.Application") self.active_ppt = self.ppt_app.activePresentation.SlideShowWindow return ...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,763
Jasperabez/PPTSynchro
refs/heads/master
/Threads/controller_thread.py
from time import sleep import pythoncom from Handlers.PptHandler import PptHandler from config import * def ControllerThread(program_state, thread_lock, command_bind_funcs, comms_msg_queue): pythoncom.CoInitialize() slide_handler = PptHandler() while True: thread_lock.acquire() if program...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,764
Jasperabez/PPTSynchro
refs/heads/master
/config.py
import logging import confuse class MyConfiguration(confuse.Configuration): def config_dir(self): return './' config_yaml = MyConfiguration('PPTController') APP_NAME = config_yaml["APP_NAME"].get() COMMS_TYPE = config_yaml["COMMS_TYPE"].get() PROGRAM_MODE = config_yaml["PROGRAM_MODE"].get() SERVER_HOST =...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,765
Jasperabez/PPTSynchro
refs/heads/master
/Threads/bt_comms_thread.py
from Handlers.BtCommsHandler import BtCommsHandler from config import * def CommsThread(program_state, thread_lock, comms_msg_queue): comms_socket = BtCommsHandler(BT_SERVER_HOST, BT_SERVER_PORT, "Server") comms_socket.Open() while True: data = comms_socket.RecvMsg() if program_state.isSet...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,766
Jasperabez/PPTSynchro
refs/heads/master
/Handlers/SocketHandler.py
import socket class SocketHandler: def __init__(self, own_host, own_port, server_host="", server_port=0, comms_buff_size=1024): self.own_host= own_host self.own_port = own_port self.server = (server_host, server_port) self.comms_buff_size = comms_buff_size self.s = socket.so...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,767
Jasperabez/PPTSynchro
refs/heads/master
/SniffKey.py
import logging from sys import platform if platform == "linux": import pyxhook as pyhook elif platform == "win32": import pythoncom import pyWinhook as pyhook from config import * logging.basicConfig(handlers=[logging.FileHandler(filename=LOG_FILE, encodi...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,768
Jasperabez/PPTSynchro
refs/heads/master
/Handlers/BtCommsHandler.py
import errno import winerror import socket import logging class BtCommsHandler: def __init__(self, server_mac_addr,server_port, role, comms_buff_size=1024): self.comms_buff_size = comms_buff_size self.server_port = server_port self.server_mac_addr = server_mac_addr self.role = role ...
{"/Threads/comms_thread.py": ["/Handlers/SocketHandler.py", "/config.py"], "/ControllerServer.py": ["/config.py", "/Threads/toggle_thread.py", "/Threads/controller_thread.py", "/Threads/comms_thread.py", "/Threads/bt_comms_thread.py"], "/Threads/toggle_thread.py": ["/config.py"], "/main.py": ["/config.py", "/Controller...
33,776
whdtjdgld/RESTAPI_STUDY
refs/heads/main
/quickstart/serializers.py
from rest_framework import serializers from .models import comment, quiz # 데이터를 json(가장 보편적), xml등 데이터로 변환 class QuizSerializer(serializers.ModelSerializer): class Meta: model = quiz fields = ('title', 'body', 'image', 'answer') class CommentSerializer(serializers.ModelSerializer): class Meta:...
{"/quickstart/serializers.py": ["/quickstart/models.py"], "/quickstart/views.py": ["/quickstart/models.py", "/quickstart/serializers.py"]}
33,777
whdtjdgld/RESTAPI_STUDY
refs/heads/main
/quickstart/views.py
from rest_framework.response import Response from rest_framework.decorators import api_view from .models import comment, quiz from .serializers import CommentSerializer, QuizSerializer import random from rest_framework import viewsets # urls 에서 넘어와 api에 보여지는 views @api_view(['GET']) # HELLO API 는 get 메소드로 def helloA...
{"/quickstart/serializers.py": ["/quickstart/models.py"], "/quickstart/views.py": ["/quickstart/models.py", "/quickstart/serializers.py"]}
33,778
whdtjdgld/RESTAPI_STUDY
refs/heads/main
/quickstart/models.py
from django.db import models # Create your models here. class quiz(models.Model): title = models.CharField(max_length=200) body = models.TextField() answer = models.IntegerField() image = models.ImageField(upload_to="%Y/%m/%d") # 저장경로가 년/ 월/ 일 디렉토리로 class comment(models.Model): text = models.CharF...
{"/quickstart/serializers.py": ["/quickstart/models.py"], "/quickstart/views.py": ["/quickstart/models.py", "/quickstart/serializers.py"]}
33,779
whdtjdgld/RESTAPI_STUDY
refs/heads/main
/quickstart/migrations/0003_comment.py
# Generated by Django 3.1 on 2021-07-06 08:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('quickstart', '0002_quiz_image'), ] operations = [ migrations.CreateModel( name='comment', ...
{"/quickstart/serializers.py": ["/quickstart/models.py"], "/quickstart/views.py": ["/quickstart/models.py", "/quickstart/serializers.py"]}
33,780
whdtjdgld/RESTAPI_STUDY
refs/heads/main
/API/urls.py
"""API URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vie...
{"/quickstart/serializers.py": ["/quickstart/models.py"], "/quickstart/views.py": ["/quickstart/models.py", "/quickstart/serializers.py"]}
33,781
paparakri/raspBatteryServer
refs/heads/master
/backend_client.py
import ftplib import os import webbrowser from tkinter import * from tkinter import filedialog as fd ftp = ftplib.FTP() LARGE_FONT = ('Verdana',20) def checkIfMain(): print(ftp.pwd()) return str(ftp.pwd()) def enterFolder_back(folderName): ftp.cwd(folderName) def Connect(HOST,username,pass...
{"/frontendClient.py": ["/backend_client.py"]}
33,782
paparakri/raspBatteryServer
refs/heads/master
/frontendClient.py
from tkinter import * from tkinter import filedialog as fd import socket import backend_client empty = ' ' LARGE_FONT = ('Verdana',20) MEDIUM_FONT = ('Verdana',15) SMALL_FONT = ('Calibri (Body)',10) #Command Functions def goBack(): backend_client.enterFolder_back('../') t1.insert(END...
{"/frontendClient.py": ["/backend_client.py"]}
33,783
paparakri/raspBatteryServer
refs/heads/master
/FTPServer.py
from pyftpdlib.servers import FTPServer from pyftpdlib.authorizers import DummyAuthorizer from pyftpdlib.handlers import FTPHandler import os, socket HOSTNAME = [l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][:1], [[(s.connect(('8.8.8.8', 53)), s.getsockname()[...
{"/frontendClient.py": ["/backend_client.py"]}
33,794
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/model.py
"""The Satellite class.""" from sgp4.alpha5 import from_alpha5 from sgp4.earth_gravity import wgs72old, wgs72, wgs84 from sgp4.ext import invjday, jday from sgp4.io import twoline2rv from sgp4.propagation import sgp4, sgp4init WGS72OLD = 0 WGS72 = 1 WGS84 = 2 gravity_constants = wgs72old, wgs72, wgs84 # indexed usin...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,795
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/wrapper.py
from . import vallado_cpp class Satrec(vallado_cpp.Satrec): """High-speed computation of satellite positions and velocities.""" __slots__ = () def sgp4_array(self, jd, fr): """Compute positions and velocities for the times in a NumPy array. Given NumPy arrays ``jd`` and ``fr`` of the sam...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,796
brandon-rhodes/python-sgp4
refs/heads/master
/bin/print_attributes.py
#!/usr/bin/env python from __future__ import print_function from fileinput import input from sgp4.vallado_cpp import Satrec def main(): lines = iter(input()) for line in lines: name = line line1 = next(lines) line2 = next(lines) sat = Satrec.twoline2rv(line1, line2) fo...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,797
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/api.py
"""Public API that tries to import C++ module, but falls back to Python.""" __all__ = ( 'SGP4_ERRORS', 'Satrec', 'SatrecArray', 'WGS72OLD', 'WGS72', 'WGS84', 'accelerated', 'jday', 'days2mdhms', ) from .functions import jday, days2mdhms SGP4_ERRORS = { 1: 'mean eccentricity is outside the range 0.0 to 1....
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,798
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/omm.py
"""Support for the new Orbit Mean-Elements Message format for TLE data.""" import csv import xml.etree.ElementTree as ET from datetime import datetime from math import pi from sgp4.api import WGS72 def parse_csv(file): return csv.DictReader(file) def parse_xml(file): root = ET.parse(file).getroot() for s...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,799
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/__init__.py
# -*- coding: utf-8 -*- """Track Earth satellites given TLE data, using up-to-date 2020 SGP4 routines. This package compiles the official C++ code from `Revisiting Spacetrack Report #3`_ (AIAA 2006-6753) — specifically, the 2023 May 09 release from David Vallado’s `Fundamentals of Astrodynamics and Applications`_ webp...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,800
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/wulfgar.py
"""Support test functions, in a module small enough to carry inline.""" from importlib import import_module from unittest import TestCase __unittest = 1 # Tell unittest not to include run() in test tracebacks. def add_test_functions(loader, tests, module_name): """Run our main documentation as a test and test fu...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,801
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/exporter.py
"""Export orbit data to a Two-Line-Element representation. Contributed by Egemen Imre https://github.com/egemenimre """ from math import pi from sgp4.io import compute_checksum from sgp4.conveniences import sat_epoch_datetime # Define constants _deg2rad = pi / 180.0 # 0.0174532925199433 _xpdotp = 1440.0 / (2.0 * pi...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,802
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/ext.py
# -*- coding: utf-8 -*- """Utility routines from "sgp4ext.cpp".""" from math import (acos, asinh, atan2, copysign, cos, fabs, fmod, pi, sin, sinh, sqrt, tan) from .functions import days2mdhms undefined = None """ /* ----------------------------------------------------------------------------- * * ...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,803
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/conveniences.py
"""Various conveniences. Higher-level libraries like Skyfield that use this one usually have their own date and time handling. But for folks using this library by itself, native Python datetime handling could be convenient. """ import datetime as dt import sgp4 from .functions import days2mdhms, jday class _UTC(dt....
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,804
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/functions.py
"""General-purpose routines. It seemed a shame for the ``api`` module to have to import large legacy modules to offer simple date handling, so this small module holds the routines instead. """ def jday(year, mon, day, hr, minute, sec): """Return two floats that, when added, produce the specified Julian date. ...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,805
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/io.py
"""Read the TLE earth satellite file format. This is a minimally-edited copy of "sgp4io.cpp". """ import re from datetime import datetime from math import pi, pow from sgp4.ext import days2mdhms, invjday, jday from sgp4.propagation import sgp4init INT_RE = re.compile(r'[+-]?\d*') FLOAT_RE = re.compile(r'[+-]?\d*(\.\...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,806
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/alpha5.py
"""Alpha 5 encoding of satellite numbers to fit in 5 characters.""" def to_alpha5(n): if n < 100000: return '%05d' % n if n > 339999: raise ValueError('satellite number cannot exceed 339999,' " whose Alpha 5 encoding is 'Z9999'") i, n = divmod(n, 10000) i += ord...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,807
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/earth_gravity.py
"""Three earth-gravity models for use with SGP4.""" from collections import namedtuple from sgp4.propagation import getgravconst EarthGravity = namedtuple( 'EarthGravity', 'tumin mu radiusearthkm xke j2 j3 j4 j3oj2', ) wgs72old = EarthGravity(*getgravconst('wgs72old')) wgs72 = EarthGravity(*getgravconst(...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,808
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/propagation.py
"""The sgp4 procedures for analytical propagation of a satellite. I have made the rather unorthodox decision to leave as much of this C++ code alone as possible: if a line of code would run without change in Python, then I refused to re-indent it or remove its terminal semicolon, so that in the future it will be easie...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,809
brandon-rhodes/python-sgp4
refs/heads/master
/sgp4/tests.py
"""Test suite for SGP4.""" try: from unittest2 import TestCase, main except: from unittest import TestCase, main import datetime as dt import re import os import sys from doctest import DocTestSuite, ELLIPSIS from math import pi, isnan from pkgutil import get_data try: from io import StringIO except Impo...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,810
brandon-rhodes/python-sgp4
refs/heads/master
/setup.py
import os import sys from distutils.core import setup, Extension import sgp4 description, long_description = sgp4.__doc__.split('\n', 1) # Force compilation on Travis CI + Python 3 to make sure it keeps working. optional = True if sys.version_info[0] != 2 and os.environ.get('TRAVIS') == 'true': optional = False ...
{"/sgp4/model.py": ["/sgp4/alpha5.py", "/sgp4/earth_gravity.py", "/sgp4/ext.py", "/sgp4/io.py", "/sgp4/propagation.py"], "/sgp4/wrapper.py": ["/sgp4/__init__.py"], "/sgp4/api.py": ["/sgp4/functions.py", "/sgp4/wrapper.py", "/sgp4/model.py"], "/sgp4/omm.py": ["/sgp4/api.py"], "/sgp4/exporter.py": ["/sgp4/io.py", "/sgp4/...
33,811
mjuopperi/fud
refs/heads/master
/restaurants/models.py
from django.db import models from django.core.exceptions import ValidationError from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField import re RESERVED_SUBDOMAINS = [ 'static', 'api', 'fud', ] SUBDOMAIN_PATTERN = re.compile("^[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9]...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,812
mjuopperi/fud
refs/heads/master
/fud/settings/prod.py
import requests from fud.util.email import SESEmailSender from .base import * try: from .secrets import * except ImportError: pass DEBUG = False SECRET_KEY = FUD_SECRET_KEY AWS_ACCESS_KEY = AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY = AWS_SECRET_ACCESS_KEY # HTTPS settings SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWA...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,813
mjuopperi/fud
refs/heads/master
/restaurants/tests/functional/test_register.py
from restaurants.tests.functional.selenium_spec import SeleniumSpec from restaurants.tests.util import * User = get_user_model() class RegisterSpec(SeleniumSpec): def setUp(self): User.objects.create_user('test-user', 'test-user@example.com', 'password') self.selenium.delete_all_cookies() d...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,814
mjuopperi/fud
refs/heads/master
/restaurants/tests/functional/test_menus.py
import time from restaurants.tests.functional.selenium_spec import SeleniumSpec from restaurants.tests.util import * User = get_user_model() class RestaurantMenuSpec(SeleniumSpec): def tearDown(self): Restaurant.objects.all().delete() Menu.objects.all().delete() def test_render_menus(self)...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,815
mjuopperi/fud
refs/heads/master
/fud/util/auth.py
from django.contrib.auth import get_user_model from django.views.generic import View from rest_framework.authentication import TokenAuthentication User = get_user_model() class TokenAuthenticatedView(View, TokenAuthentication): def user_from_request(self): if 'authToken' in self.request.COOKIES: ...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,816
mjuopperi/fud
refs/heads/master
/restaurants/serializers.py
from rest_framework import serializers from restaurants.models import Restaurant, Menu class RestaurantSerializer(serializers.ModelSerializer): class Meta: model = Restaurant fields = ('name', 'subdomain', 'address', 'postal_code', 'city', 'phone_number', 'email') class MenuSerializer(serialize...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,817
mjuopperi/fud
refs/heads/master
/restaurants/tests/api/test_menus.py
from rest_framework import status from rest_framework.test import APITestCase from restaurants.serializers import MenuSerializer from restaurants.tests.util import * User = get_user_model() class MenuApiSpec(APITestCase): def tearDown(self): User.objects.all().delete() Restaurant.objects.all().d...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,818
mjuopperi/fud
refs/heads/master
/restaurants/apps.py
from django.apps import AppConfig from django.conf import settings class RestaurantsConfig(AppConfig): name = 'restaurants' verbose_name = 'Restaurants' def ready(self): if settings.DJOSER['SEND_ACTIVATION_EMAIL']: from restaurants.signals.handlers import UserDisabler
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,819
mjuopperi/fud
refs/heads/master
/restaurants/tests/functional/test_login.py
from django.contrib.auth import get_user_model from restaurants.tests.functional.selenium_spec import SeleniumSpec User = get_user_model() class LoginSpec(SeleniumSpec): def setUp(self): self.selenium.delete_all_cookies() User.objects.create_user('test-user', 'test-user@example.com', 'password'...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,820
mjuopperi/fud
refs/heads/master
/fud/urls/fud.py
from django.conf import settings from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(settings.ADMIN_URL, include(admin.site.urls)), url(r'^', include('restaurants.urls.fud', namespace='restaurants')), ]
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,821
mjuopperi/fud
refs/heads/master
/fud/settings/base.py
""" Django settings for fud project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths in...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,822
mjuopperi/fud
refs/heads/master
/restaurants/urls/api.py
from django.conf.urls import url, include from restaurants import views app_name = 'restaurants' urlpatterns = [ url(r'^auth/register/$', views.CustomRegistrationView.as_view()), url(r'^auth/password/reset/$', views.CustomPasswordResetView.as_view()), url(r'^auth/', include('djoser.urls.authtoken')), u...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,823
mjuopperi/fud
refs/heads/master
/restaurants/permissions.py
from rest_framework import permissions from restaurants.models import Restaurant class IsOwnerOrReadOnly(permissions.BasePermission): """ Custom permission to only allow owners of an object to edit it. """ def has_object_permission(self, request, view, obj): if request.method in permissions....
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,824
mjuopperi/fud
refs/heads/master
/restaurants/migrations/0003_menu_order_defaults.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-10-03 06:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('restaurants', '0002_menu_order'), ] operations = [ migrations.AlterField( ...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,825
mjuopperi/fud
refs/heads/master
/restaurants/urls/fud.py
from django.conf.urls import url from django.views.generic import RedirectView from restaurants import views from restaurants.templatetags.revisioned_staticfiles import revisioned_static_url app_name = 'restaurants' urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^signup/?', views.signup, name='s...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,826
mjuopperi/fud
refs/heads/master
/restaurants/tests/api/test_users.py
from django.contrib.auth import get_user_model from rest_framework import status from rest_framework.test import APITestCase from restaurants.tests.util import * User = get_user_model() class AuthApiSpec(APITestCase): def setUp(self): User.objects.create_user('existing-user', 'existing@example.com', 'pass...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,827
mjuopperi/fud
refs/heads/master
/restaurants/tests/api/test_restaurants.py
from rest_framework import status from rest_framework.test import APITestCase from restaurants.serializers import RestaurantSerializer from restaurants.tests.util import * User = get_user_model() class RestaurantApiSpec(APITestCase): def tearDown(self): User.objects.all().delete() Restaurant.obj...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,828
mjuopperi/fud
refs/heads/master
/restaurants/signals/handlers.py
from django.contrib.auth import get_user_model from djoser.signals import user_registered from django.dispatch import receiver import logging User = get_user_model() logger = logging.getLogger(__name__) class UserDisabler: @receiver(user_registered) def user_disabler(sender, user, **kwargs): logger.d...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,829
mjuopperi/fud
refs/heads/master
/fud/util/email.py
from django.conf import settings from django.template.loader import get_template from boto3.session import Session TEMPLATE_BASE = 'restaurants/email/' def _get_template(template_name, context): return get_template(TEMPLATE_BASE + template_name).render(context) class EmailSender: @staticmethod def send...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,830
mjuopperi/fud
refs/heads/master
/fud/settings/test.py
from .base import * from subprocess import call DEBUG = True BASE_DOMAIN = 'testserver' # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'fud_test', 'USER': 'fuduser', ...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,831
mjuopperi/fud
refs/heads/master
/fud/urls/restaurants.py
from django.conf.urls import url, include urlpatterns = [ url(r'^', include('restaurants.urls.restaurants', namespace='restaurants')), ]
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,832
mjuopperi/fud
refs/heads/master
/fud/settings/dev.py
from .base import * DEBUG = True BASE_DOMAIN = 'fud.localhost' ALLOWED_HOSTS = { '.fud.localhost', } MIDDLEWARE_CLASSES = ( 'fud.util.middleware.LocalhostRedirectionMiddleware', ) + MIDDLEWARE_CLASSES # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'default': {...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,833
mjuopperi/fud
refs/heads/master
/restaurants/tests/functional/test_profile.py
from restaurants.tests.functional.selenium_spec import SeleniumSpec from restaurants.tests.util import * User = get_user_model() class ProfileSpec(SeleniumSpec): def setUp(self): User.objects.create_user('test-user', 'test-user@example.com', 'password') def tearDown(self): User.objects.all(...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,834
mjuopperi/fud
refs/heads/master
/restaurants/tests/functional/test_forgot_password.py
import djoser.utils from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.tokens import default_token_generator from restaurants.tests.functional.selenium_spec import SeleniumSpec User = get_user_model() class ForgotPasswordSpec(SeleniumSpec): def setUp(self):...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,835
mjuopperi/fud
refs/heads/master
/restaurants/tests/util.py
import os import random import string from django.contrib.auth import get_user_model from rest_framework.authtoken.models import Token from rest_framework.renderers import JSONRenderer from restaurants.models import Restaurant, Menu User = get_user_model() API_HOST = 'api.testserver' def random_string(length=6): ...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,836
mjuopperi/fud
refs/heads/master
/restaurants/admin.py
from django.contrib import admin from restaurants import models # Register your models here. class RestaurantAdmin(admin.ModelAdmin): list_display = ('name', 'subdomain', 'owner') pass class MenuAdmin(admin.ModelAdmin): list_display = ('title', 'restaurant') pass admin.site.register(models.Restaura...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,837
mjuopperi/fud
refs/heads/master
/fud/urls/api.py
from django.conf.urls import url, include urlpatterns = [ url(r'^', include('restaurants.urls.api', namespace='restaurants')), ]
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,838
mjuopperi/fud
refs/heads/master
/fud/util/middleware.py
from django.http import HttpResponsePermanentRedirect class LocalhostRedirectionMiddleware(object): def process_request(self, request): """ Redirects requests to localhost to fud.localhost """ path = request.get_raw_uri() if 'localhost' in path and 'fud' not in path: ...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,839
mjuopperi/fud
refs/heads/master
/restaurants/tests/functional/test_restaurant.py
import time from restaurants.tests.functional.selenium_spec import SeleniumSpec from restaurants.tests.util import * User = get_user_model() class RestaurantSpec(SeleniumSpec): def setUp(self): self.selenium.delete_all_cookies() def tearDown(self): User.objects.all().delete() Resta...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,840
mjuopperi/fud
refs/heads/master
/restaurants/tests/functional/selenium_spec.py
from operator import mod from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test import override_settings from selenium.common.exceptions import TimeoutException, NoSuchElementException from selenium.webdriver.common.by import By from selenium import webdriver from selenium.webdriver....
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,841
mjuopperi/fud
refs/heads/master
/restaurants/tests/functional/test_signup.py
import djoser.utils from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.tokens import default_token_generator from restaurants.tests.functional.selenium_spec import SeleniumSpec User = get_user_model() class SignupSpec(SeleniumSpec): def setUp(self): ...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,842
mjuopperi/fud
refs/heads/master
/restaurants/forms.py
from django import forms from restaurants import models class RegistrationForm(forms.ModelForm): class Meta: model = models.Restaurant exclude = ['owner']
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,843
mjuopperi/fud
refs/heads/master
/restaurants/views.py
import time from django.conf import settings from django.http import Http404 from django.contrib.auth import get_user_model from django.shortcuts import render, get_object_or_404 from djoser.views import RegistrationView, PasswordResetView from rest_framework import permissions, mixins, generics from rest_framework.ex...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,844
mjuopperi/fud
refs/heads/master
/restaurants/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-14 21:58 from __future__ import unicode_literals from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion import restaurants.models class Migration(migrations.Mig...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,845
mjuopperi/fud
refs/heads/master
/restaurants/urls/restaurants.py
from django.conf.urls import url from restaurants import views app_name = 'restaurants' urlpatterns = [ url(r'^$', views.RestaurantIndexView.as_view(), name='home'), #url(r'^menu/?$', views.restaurant_menu, name='menu'), url(r'^menu/?$', views.RestaurantMenuView.as_view(), name='menu'), ]
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,846
mjuopperi/fud
refs/heads/master
/fabfile.py
from fabric.api import * from fabric.contrib import django, files, console django.project('fud') server_root = '/home/fud/' server_dir = server_root + 'server' virtualenv_dir = server_root + 'env/' virtualenv = virtualenv_dir + 'bin/activate' conf_dir = server_dir + '/tools/deploy/conf/' server_package = 'fud.tar.gz' ...
{"/fud/settings/prod.py": ["/fud/util/email.py", "/fud/settings/base.py"], "/restaurants/tests/functional/test_register.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/tests/util.py"], "/restaurants/tests/functional/test_menus.py": ["/restaurants/tests/functional/selenium_spec.py", "/restaurants/t...
33,875
tristenallgaier2023/bikers
refs/heads/master
/experiments/proj.py
from src.models import Bike_Classifier from src.run_model import run_model from data.load_data import load_proj_data from data.my_dataset import MyDataset import matplotlib.pyplot as plt import numpy as np import csv import os print("started") # train_count = number of training samples # test_count = number of testin...
{"/experiments/proj.py": ["/src/models.py", "/src/run_model.py", "/data/load_data.py"]}
33,876
tristenallgaier2023/bikers
refs/heads/master
/data/load_data.py
import numpy as np import os import csv def load_proj_helper(count, path): """ helper for load_proj_data Arguments: count - (int) The number of samples to load. path - (string) The path to the csv file to load from. Returns: X - (np.array) An Nxd array where N is count and d i...
{"/experiments/proj.py": ["/src/models.py", "/src/run_model.py", "/data/load_data.py"]}
33,877
tristenallgaier2023/bikers
refs/heads/master
/src/run_model.py
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import DataLoader import numpy as np def run_model(model,running_mode='train', train_set=None, valid_set=None, test_set=None, batch_size=1, learning_rate=0....
{"/experiments/proj.py": ["/src/models.py", "/src/run_model.py", "/data/load_data.py"]}
33,878
tristenallgaier2023/bikers
refs/heads/master
/src/models.py
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np class Bike_Classifier(nn.Module): """ This class creates a neural network for classifying bikers as casual(0) or member(1). Network architecture: - Input layer - First hidden layer: fully connected layer of s...
{"/experiments/proj.py": ["/src/models.py", "/src/run_model.py", "/data/load_data.py"]}
33,897
vlraik/Language-classification-using-boosted-decision-trees
refs/heads/master
/utils.py
from features import * from classifiers import * import pickle def traininginput(input_file): """ A function to read the training dataset from the file. :param input_file: The name of the input file. :return: The training dataset, along with the english and dutch dataset. """ data...
{"/utils.py": ["/features.py", "/classifiers.py"], "/classify.py": ["/utils.py"]}
33,898
vlraik/Language-classification-using-boosted-decision-trees
refs/heads/master
/features.py
from collections import Counter def lengthofwords(english, dutch, data): """ A function to calculate the average length of words in each of the language. :param english: English language dataset :param dutch: Dutch language dataset. :param data: The entire training data :return: The...
{"/utils.py": ["/features.py", "/classifiers.py"], "/classify.py": ["/utils.py"]}
33,899
vlraik/Language-classification-using-boosted-decision-trees
refs/heads/master
/classify.py
from utils import train, predict def main(): """ The main function to get the user input. """ train('train.dat','out','dt') predict('test.dat','out') while(True): command=input("Enter the option you want to use, type exit to quit: ").split() if command[0] == 'exit': ...
{"/utils.py": ["/features.py", "/classifiers.py"], "/classify.py": ["/utils.py"]}
33,900
vlraik/Language-classification-using-boosted-decision-trees
refs/heads/master
/classifiers.py
import numpy as np class Node: def __init__(self, question, englishbranch, dutchbranch): """ Node intialisation of the decision tree. :param question: Stores the node information. :param englishbranch: Datasets splitting into the English Branch :param dutchbranch...
{"/utils.py": ["/features.py", "/classifiers.py"], "/classify.py": ["/utils.py"]}
33,902
msomierick/chempy
refs/heads/master
/chempy/printing/numbers.py
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ..util.parsing import _unicode_sup def roman(num): """ Examples -------- >>> roman(4) 'IV' >>> roman(17) 'XVII' """ tokens = 'M CM D CD C XC L XL X IX V IV I'.split() values = 100...
{"/chempy/printing/tests/test_numbers.py": ["/chempy/printing/numbers.py"]}
33,903
msomierick/chempy
refs/heads/master
/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import os import shutil from setuptools import setup pkg_name = "chempy" RELEASE_VERSION = os.environ.get('CHEMPY_RELEASE_VERSION', '') # http://conda.pydata.org/docs/build.html#environment-variables-set-during-the-build-process if os.environ.get('CONDA_BUILD'...
{"/chempy/printing/tests/test_numbers.py": ["/chempy/printing/numbers.py"]}
33,904
msomierick/chempy
refs/heads/master
/chempy/util/regression.py
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) try: import numpy as np except ImportError: np = None import warnings def least_squares(x, y, w=1): # w == 1 => OLS, w != 1 => WLS """ Least-squares (w or w/o weights) fit to data series. Linear regression (...
{"/chempy/printing/tests/test_numbers.py": ["/chempy/printing/numbers.py"]}
33,905
msomierick/chempy
refs/heads/master
/chempy/printing/tests/test_numbers.py
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ..numbers import roman, number_to_scientific_html, number_to_scientific_latex, number_to_scientific_unicode def test_roman(): assert roman(4) == 'IV' assert roman(20) == 'XX' assert roman(94) == 'XCIV' ass...
{"/chempy/printing/tests/test_numbers.py": ["/chempy/printing/numbers.py"]}
33,906
msomierick/chempy
refs/heads/master
/chempy/util/_aqueous.py
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from itertools import chain from .periodic import groups, symbols, names _anions = { 'F-': 'fluoride', 'Cl-': 'chloride', 'Br-': 'bromide', 'I-': 'iodide', 'OH-': 'hydroxide', 'CN-': 'cyanide', 'SCN-...
{"/chempy/printing/tests/test_numbers.py": ["/chempy/printing/numbers.py"]}
33,930
lvaka/photoportfolio
refs/heads/master
/portfolio/folio/urls.py
from django.conf.urls import url, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from . import views urlpatterns = [ url(r'^$', views.main_page, name='main_page'), ] urlpatterns +...
{"/portfolio/folio/admin.py": ["/portfolio/folio/models.py"], "/portfolio/folio/views.py": ["/portfolio/folio/models.py"]}
33,931
lvaka/photoportfolio
refs/heads/master
/portfolio/folio/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import Picture # Register your models here. admin.site.register(Picture)
{"/portfolio/folio/admin.py": ["/portfolio/folio/models.py"], "/portfolio/folio/views.py": ["/portfolio/folio/models.py"]}
33,932
lvaka/photoportfolio
refs/heads/master
/portfolio/folio/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models # Create your models here. class Picture(models.Model): name = models.CharField(max_length=40) image = models.ImageField(upload_to="image/") def __str__(self): return self.name
{"/portfolio/folio/admin.py": ["/portfolio/folio/models.py"], "/portfolio/folio/views.py": ["/portfolio/folio/models.py"]}
33,933
lvaka/photoportfolio
refs/heads/master
/portfolio/folio/views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils import timezone from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from django.conf import settings from django.http import HttpResponse from .models import Picture f...
{"/portfolio/folio/admin.py": ["/portfolio/folio/models.py"], "/portfolio/folio/views.py": ["/portfolio/folio/models.py"]}
33,961
aleksandr-kazakov/testukas
refs/heads/master
/app1/models.py
from django.db import models class Question(models.Model): Q = models.TextField() A1 = models.TextField() A2 = models.TextField() A3 = models.TextField() A4 = models.TextField() A5 = models.TextField() A6 = models.TextField() QType = models.TextField() RightAnswer = models.CharField(max_length = 6) Source = ...
{"/app1/views.py": ["/app1/models.py"]}
33,962
aleksandr-kazakov/testukas
refs/heads/master
/testukas/urls.py
from django.conf.urls import include, url from django.contrib import admin from app1 import views urlpatterns = [ # Examples: # url(r'^$', 'testukas.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^question/(?P<id>\d+)/', views.q...
{"/app1/views.py": ["/app1/models.py"]}
33,963
aleksandr-kazakov/testukas
refs/heads/master
/app1/views.py
from django.shortcuts import render from django.http import Http404 from app1.models import Question # Create your views here. def index(request): questions = Question.objects.all() return render(request, 'app1/index.html', { 'questions': questions, }) def question_detail(request, id): try: question = Q...
{"/app1/views.py": ["/app1/models.py"]}
33,978
AlenaDos/openeo-python-client
refs/heads/master
/tests/test_usecase1.py
import unittest from unittest import TestCase import os from unittest.mock import MagicMock import openeo import requests_mock POST_DATA = '{"process_id": "filter_daterange", "args": { "imagery": { "product_id": "landsat7_ndvi"}, "from": "2014-01-01", "to": "2014-06-01"}}' @requests_mock.mock() class TestUsecase1(T...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...
33,979
AlenaDos/openeo-python-client
refs/heads/master
/openeo/job.py
from abc import ABC class Job(ABC): """Represents the result of creating a new Job out of a process graph. Jobs are stored in the backend and can be executed directly (in batch), or evaluated lazily.""" def __init__(self, job_id: str): self.job_id = job_id def download(self, outputfile: str,...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...
33,980
AlenaDos/openeo-python-client
refs/heads/master
/tests/test_rest_session.py
# -*- coding: utf-8 -*- import openeo from unittest import TestCase import tempfile import os import json import requests_mock @requests_mock.mock() class TestUserFiles(TestCase): def setUp(self): # configuration phase: define username, endpoint, parameters? self.endpoint = "http://localhost:80...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...
33,981
AlenaDos/openeo-python-client
refs/heads/master
/setup.py
import re from setuptools import setup, find_packages from sphinx.setup_command import BuildDoc test_requirements = ['requests','mock'] cmdclass = {'build_sphinx': BuildDoc} with open('openeo/__init__.py', 'r') as fd: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...
33,982
AlenaDos/openeo-python-client
refs/heads/master
/openeo/rest/job.py
from openeo.rest.rest_session import RESTSession from ..job import Job class ClientJob(Job): def __init__(self, job_id: str, session:RESTSession): super().__init__(job_id) self.session = session def download(self, outputfile:str, outputformat=None): """ Download the result as a raste...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...
33,983
AlenaDos/openeo-python-client
refs/heads/master
/openeo/rest/rest_session.py
import datetime import shutil import os import requests from ..auth.auth_none import NoneAuth import json from ..sessions import Session """ openeo.sessions ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings when interacting with the OpenEO API. """ class RESTSession(Session): ...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...
33,984
AlenaDos/openeo-python-client
refs/heads/master
/openeo/imagecollection.py
from abc import ABC from typing import List, Dict, Union from datetime import datetime,date from openeo.job import Job from shapely.geometry import Polygon, MultiPolygon class ImageCollection(ABC): """Class representing an Image Collection. """ def __init__(self): pass def date_range_filter(se...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...
33,985
AlenaDos/openeo-python-client
refs/heads/master
/tests/test_imagery.py
from unittest import TestCase from openeo.rest.imagery import RestImagery class TestImagery(TestCase): def setUp(self): self.imagery = RestImagery({}, None) def test_date_range_filter(self): new_imagery = self.imagery.date_range_filter("2016-01-01", "2016-03-10") graph = new_imagery...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...
33,986
AlenaDos/openeo-python-client
refs/heads/master
/examples/gee_example.py
import openeo import logging import time logging.basicConfig(level=logging.DEBUG) GEE_DRIVER_URL = "http://127.0.0.1:8080" OUTPUT_FILE = "/tmp/openeo_gee_output.png" #connect with GEE backend session = openeo.session("nobody", GEE_DRIVER_URL) #retrieve the list of available collections coperincus_s2_image = ses...
{"/tests/test_usecase1.py": ["/openeo/__init__.py"], "/tests/test_rest_session.py": ["/openeo/__init__.py"], "/openeo/rest/job.py": ["/openeo/rest/rest_session.py", "/openeo/job.py"], "/openeo/rest/rest_session.py": ["/openeo/sessions.py"], "/openeo/imagecollection.py": ["/openeo/job.py"], "/examples/gee_example.py": [...