index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
49,695
bigdatasciencegroup/flightr-project
refs/heads/master
/Flightaware/restAdapter.py
class RestAdapter: def __init__(self): self.username = 'RaspberyPirates' self.apiKey = '4b694ca29e116426788a13a11672f6722f3f3353' self.url = 'https://flightxml.flightaware.com/json/FlightXML3/' username = None apiKey = None url = None
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,696
bigdatasciencegroup/flightr-project
refs/heads/master
/Presentation/views.py
from django.shortcuts import render from Presentation.forms import FlightCheckForm from Presentation.watcherService import WatcherService def index(request): """ Index page for the app """ form_class = FlightCheckForm return render(request, 'presentation/index.html', { 'form': form_class, ...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,697
bigdatasciencegroup/flightr-project
refs/heads/master
/Gmaps/googlemaps_service.py
""" Main google maps service """ import googlemaps class GooglemapsService(object): """ Main service for returning Gmap data, utilises the "googlemaps" python wrapper """ # put this in env variables/settings in live api_key = 'AIzaSyCHAy-DjgELWCsLPVdciEhm8gSkt4XACTc' @staticmethod def get_rever...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,698
bigdatasciencegroup/flightr-project
refs/heads/master
/Twitter/twitterAdapter.py
"""Creates an object of the twitter api""" from twython import Twython class TwitterAdaptor: """API authentication""" def __init__(self): self.app_key = '4am7P2QD0tVygnfhXXsYKNxy0' self.app_secret = 'Fmngx5ds15AHxI1ePYfm91yT0wMV20C8t4yWzyY6VaqjetaXjQ' self.oauth_token = '905805253907546...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,699
bigdatasciencegroup/flightr-project
refs/heads/master
/Flightaware/models.py
class Flight: def __init__(self, flight_number, aircraft_type, origin, status, actual_arrival_time, arrival_delay, estimated_arrival_time): self.fight_number = flight_number self.aircraft_type = aircraft_type self.origin = origin self.status = status self.actual_arrival_tim...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,700
bigdatasciencegroup/flightr-project
refs/heads/master
/Presentation/tests.py
"""Tests for the Presentation app module""" from django.test import TestCase, Client # Create your tests here. class HttpTests(TestCase): """Specfically Http status code tests""" CLIENT = Client() def test_site_root_http_code(self): """Checks that the main site root is reachable""" res...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,701
bigdatasciencegroup/flightr-project
refs/heads/master
/Gmaps/tests.py
""" Test module for Gmaps App """ import requests from django.test import TestCase from Gmaps.googlemaps_service import GooglemapsService # Create your tests here. class GooglemapsTests(TestCase): """ Test suite for Google Maps Service """ gmap = GooglemapsService() gmap_geocode_api = 'https://maps.goog...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,702
bigdatasciencegroup/flightr-project
refs/heads/master
/Presentation/forms.py
from django import forms class FlightCheckForm(forms.Form): """ Form schema for main submission """ flight_number = forms.CharField(required=True, widget=forms.TextInput(attrs={'class' : 'form-control'})) twitter_handle = forms.CharField(required=False, widget=forms.TextInput(attrs={'class' : 'form-control...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,703
bigdatasciencegroup/flightr-project
refs/heads/master
/Presentation/watcherService.py
import threading from Flightaware.flightawareService import FlightawareService from Gmaps.googlemaps_service import GooglemapsService from Presentation.models import FlightDetails from Twitter.TwitterService import TwitterService import time class WatcherService(object): @staticmethod def get_details(flight_...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,704
bigdatasciencegroup/flightr-project
refs/heads/master
/Twitter/tests.py
from django.test import TestCase from Twitter.twitterAdapter import TwitterAdaptor class TwitterTests(TestCase): def test_adapter_initialises(self): adapter = TwitterAdaptor() self.assertIsNotNone(adapter.api)
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,705
bigdatasciencegroup/flightr-project
refs/heads/master
/Flightaware/tests.py
from django.test import TestCase from mock import MagicMock from Flightaware.flightawareService import FlightawareService from Flightaware.models import Flight class FlightawareTests(TestCase): def test_find_flight(self): expected_flight = Flight(flight_number='N1234', ai...
{"/Twitter/TwitterService.py": ["/Twitter/twitterAdapter.py"], "/Flightaware/flightawareService.py": ["/Flightaware/models.py", "/Flightaware/restAdapter.py"], "/Presentation/views.py": ["/Presentation/forms.py", "/Presentation/watcherService.py"], "/Gmaps/tests.py": ["/Gmaps/googlemaps_service.py"], "/Presentation/wat...
49,707
campeon19/Engine3D_Graficas
refs/heads/main
/Lab1.py
# Programa principal # Christian Daniel Perez De Leon 19710 from gl import Renderer, V2 # width = 800 # height = 600 width = 940 height = 540 # width = 100 # height = 100 rend = Renderer(width, height) Pol1=[(165, 380), (185, 360), (180, 330), (207, 345), (233, 330), (230, 360), (250, 380), (220, 385), (205, 410)...
{"/Lab1.py": ["/gl.py"], "/shaders.py": ["/matematica.py"], "/gl.py": ["/obj.py", "/matematica.py"], "/Engine3D.py": ["/gl.py", "/obj.py", "/shaders.py"], "/Proyecto1.py": ["/gl.py", "/obj.py", "/shaders.py"]}
49,708
campeon19/Engine3D_Graficas
refs/heads/main
/shaders.py
from itertools import count import matematica as mate import numpy as np import random def flat(render, **kwargs): u,v,w = kwargs['baryCoords'] tA,tB,tC = kwargs['texCoords'] A, B, C = kwargs['verts'] b,g,r = kwargs['color'] b/=255 g/=255 r/=255 if render.active_texture: tx =...
{"/Lab1.py": ["/gl.py"], "/shaders.py": ["/matematica.py"], "/gl.py": ["/obj.py", "/matematica.py"], "/Engine3D.py": ["/gl.py", "/obj.py", "/shaders.py"], "/Proyecto1.py": ["/gl.py", "/obj.py", "/shaders.py"]}
49,709
campeon19/Engine3D_Graficas
refs/heads/main
/gl.py
# Christian Daniel Perez De Leon 19710 import struct from collections import namedtuple from obj import Obj from numpy import sin, cos, tan import matematica as mate V2 = namedtuple('Point2', ['x', 'y']) V3 = namedtuple('Point3', ['x', 'y', 'z']) V4 = namedtuple('Point4', ['x', 'y', 'z', 'w']) def char(c): retur...
{"/Lab1.py": ["/gl.py"], "/shaders.py": ["/matematica.py"], "/gl.py": ["/obj.py", "/matematica.py"], "/Engine3D.py": ["/gl.py", "/obj.py", "/shaders.py"], "/Proyecto1.py": ["/gl.py", "/obj.py", "/shaders.py"]}
49,710
campeon19/Engine3D_Graficas
refs/heads/main
/obj.py
# Christian Daniel Perez De Leon 19710 import struct def _color(r, g, b): return bytes([ int(b * 255), int(g* 255), int(r* 255)]) class Obj(object): def __init__(self, filename): with open(filename, 'r') as file: self.lines = file.read().splitlines() self.vertices = [] ...
{"/Lab1.py": ["/gl.py"], "/shaders.py": ["/matematica.py"], "/gl.py": ["/obj.py", "/matematica.py"], "/Engine3D.py": ["/gl.py", "/obj.py", "/shaders.py"], "/Proyecto1.py": ["/gl.py", "/obj.py", "/shaders.py"]}
49,711
campeon19/Engine3D_Graficas
refs/heads/main
/Engine3D.py
# Programa principal # Christian Daniel Perez De Leon 19710 from gl import Renderer, V2, V3, _color from obj import Texture from shaders import * width = 940 height = 540 rend = Renderer(width, height) # rend.background = Texture('Fondos/fondo.bmp') # rend.glClearBackground() # rend.active_shader = shader1 # rend....
{"/Lab1.py": ["/gl.py"], "/shaders.py": ["/matematica.py"], "/gl.py": ["/obj.py", "/matematica.py"], "/Engine3D.py": ["/gl.py", "/obj.py", "/shaders.py"], "/Proyecto1.py": ["/gl.py", "/obj.py", "/shaders.py"]}
49,712
campeon19/Engine3D_Graficas
refs/heads/main
/matematica.py
# Christian Daniel Perez De Leon 19710 # Libreria de matematica propia import sys pi = 3.14159265359 def restaVect(vec1, vec2): respuesta = [] for x in range(len(vec1)): res = vec1[x] - vec2[x] respuesta.append(res) return respuesta def productoPunto(vec1, vec2): respuesta = 0 fo...
{"/Lab1.py": ["/gl.py"], "/shaders.py": ["/matematica.py"], "/gl.py": ["/obj.py", "/matematica.py"], "/Engine3D.py": ["/gl.py", "/obj.py", "/shaders.py"], "/Proyecto1.py": ["/gl.py", "/obj.py", "/shaders.py"]}
49,713
campeon19/Engine3D_Graficas
refs/heads/main
/Proyecto1.py
# Programa principal # Christian Daniel Perez De Leon 19710 from gl import Renderer, V2, V3, _color from obj import Texture from shaders import * width = 1920 height = 1080 rend = Renderer(width, height) rend.background = Texture('Proyecto 1/Modelos/Background/opcion2.bmp') rend.glClearBackground() # -------------...
{"/Lab1.py": ["/gl.py"], "/shaders.py": ["/matematica.py"], "/gl.py": ["/obj.py", "/matematica.py"], "/Engine3D.py": ["/gl.py", "/obj.py", "/shaders.py"], "/Proyecto1.py": ["/gl.py", "/obj.py", "/shaders.py"]}
49,732
judealnas/PyHFSS
refs/heads/master
/hfss3DModeler/hfssModeler.py
from hfss3DModeler import _getModeler def GetObjName(o3DMod, obj_idx): """ :param o3DMod: oDesign.SetActiveEditor("3D Modeler") :param obj_idx: Object index (i.e. order of creation) :return: Object name """ return o3DMod.GetObjectName(obj_idx) def GetNumObjects(o3DMod): """ :param o3D...
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,733
judealnas/PyHFSS
refs/heads/master
/hfss3DModeler/hfssFillet.py
from hfss3DModeler import _getModeler def _filletParamListElmt(radius, setback, edges, vertices): return [ "NAME:FilletParameters", "Edges:=", edges, "Vertices:=", vertices, "Radius:=", "{}mm".format(radius), "Setback:=", "{}mm".format(setback) ] ...
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,734
judealnas/PyHFSS
refs/heads/master
/hfssReporter.py
def _getReporter(oDesign): return oDesign.GetModule("ReportSetup") def AddCartesianLimitLine(oDesign, report_name, x_vals, x_unit_str, y_vals, y_units_str, y_axis_name): """ Adds a limit line to a report on the X axis. :param oDesign: Target HFSS Design :param report_name: Target Report name :p...
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,735
judealnas/PyHFSS
refs/heads/master
/hfss3DModeler/hfssGetVertexIDs.py
from hfss3DModeler import _getModeler def GetVertexIDsFromObject(o3DMod, obj_id): """ :param o3DMod: oDesign.SetActiveEditor("3D Modeler") :param obj_id: target object ID (i.e. names) :return: 2D list where nested list correspond with object id in <obj_ids> """ return _getVtxIDs(o3DMod, obj_id,...
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,736
judealnas/PyHFSS
refs/heads/master
/hfssOutputVars.py
def _getOutVarModule(oDesign): return oDesign.GetModule("OutputVariable") def GetOutputVariableValue(oVars, name, variation, soln, report_type, context=[]): """ :param oVars: oDesign.GetModule("OutputVariable") :param name: output variable name :param variation: e.g. "Freq='1GHz'", "Theta='25deg'"...
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,737
judealnas/PyHFSS
refs/heads/master
/hfssDesign.py
def ValidateDesign(oDesign, filepath, b_clr_filepath): return oDesign.ValidateDesign(filepath, b_clr_filepath) def Analyze(oDesign, setup_name): return oDesign.Analyze(setup_name)
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,738
judealnas/PyHFSS
refs/heads/master
/hfss3DModeler/__init__.py
def _getModeler(oDesign): return oDesign.SetActiveEditor("3D Modeler")
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,739
judealnas/PyHFSS
refs/heads/master
/hfssAnalysisSetup.py
def _getAnalysisModule(oDesign): return oDesign.GetModule("AnalysisSetup") def GetSetups(oAnalysis): setups = oAnalysis.GetSetups() return setups def GetSetupCount(oAnalysis): cnt = oAnalysis.GetSetupCount() return cnt def GetSweeps(oAnalysis): sweeps = oAnalysis.GetSweeps() return sweeps...
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,740
judealnas/PyHFSS
refs/heads/master
/hfssRadiation.py
def _getRadFieldModule(oDesign): return oDesign.GetModule("RadField") def InsertFarFieldSphereSetup(oRad, name="Infinite Sphere1", theta_dict={"start": 0, "stop": 180, "step": 2}, phi_dict={"start": -180, "stop": 180, "step": 2}, ...
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,741
judealnas/PyHFSS
refs/heads/master
/hfssBoundaries.py
def _wrapToList(x): if not isinstance(x, list): x = [x] return x def _getBoundsModule(oDesign): return oDesign.GetModule("BoundarySetup") def AssignCopperBound(oBounds, bound_name="", obj_names=[], face_ids=[]): """ :param oBounds: oDesign.GetModule("BoundarySetup") :param bound_name: ...
{"/hfss3DModeler/hfssModeler.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssFillet.py": ["/hfss3DModeler/__init__.py"], "/hfss3DModeler/hfssGetVertexIDs.py": ["/hfss3DModeler/__init__.py"]}
49,803
jloemba/python-nl
refs/heads/master
/stop_word.py
from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.tag import pos_tag import string def extract_stop_in_sentence(sentence): if " - " in sentence : sentence = sentence[:sentence.index(" - ")] # Exclure le nom de l'article ( " - Le Monde " , "- LCI") stop_words = set(...
{"/app.py": ["/stop_word.py"]}
49,804
jloemba/python-nl
refs/heads/master
/app.py
import pprint import requests import pandas as pd from pandas.io.json import json_normalize import nltk from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from stop_word import extract_stop_in_sentence , remove_punctuation #nltk.download() Pour installer les packages dictionary = requests.get...
{"/app.py": ["/stop_word.py"]}
49,807
PaarthB/CPU-Scheduling-Algorithms
refs/heads/master
/FCFS.py
__author__ = "Paarth Bhasin" __title__ = "Assignment-3 FIT2070: Operating Systems" __tutor__ = "Hasanul Ferdaus" __StartDate__ = '20/10/2016' __studentID__ = 26356104 __LastModified__ = '24/10/2016' ''' First Come First Serve Scheduler (FCFS) Uses a queue to implement this scheduling algorithm OUTPUT: -...
{"/FCFS.py": ["/Process.py", "/queue.py"], "/RoundRobin.py": ["/Process.py", "/queue.py"], "/comparator.py": ["/FCFS.py", "/RoundRobin.py", "/SRT.py"], "/SRT.py": ["/Process.py"]}
49,808
PaarthB/CPU-Scheduling-Algorithms
refs/heads/master
/RoundRobin.py
__author__ = "Paarth Bhasin" __title__ = "Assignment-3 FIT2070: Operating Systems" __tutor__ = "Hasanul Ferdaus" __StartDate__ = '20/10/2016' __studentID__ = 26356104 __LastModified__ = '24/10/2016' from Process import Process import queue import os ''' Round Robin Scheduler (RR) Uses a queue to implemen...
{"/FCFS.py": ["/Process.py", "/queue.py"], "/RoundRobin.py": ["/Process.py", "/queue.py"], "/comparator.py": ["/FCFS.py", "/RoundRobin.py", "/SRT.py"], "/SRT.py": ["/Process.py"]}
49,809
PaarthB/CPU-Scheduling-Algorithms
refs/heads/master
/comparator.py
__author__ = "Paarth Bhasin" __title__ = "Assignment-3 FIT2070: Operating Systems" __tutor__ = "Hasanul Ferdaus" __StartDate__ = '22/8/2016' __studentID__ = 26356104 __LastModified__ = '31/8/2016' from FCFS import FCFS from RoundRobin import RoundRobin from SRT import SRT def main(): fcfs = FCFS() ...
{"/FCFS.py": ["/Process.py", "/queue.py"], "/RoundRobin.py": ["/Process.py", "/queue.py"], "/comparator.py": ["/FCFS.py", "/RoundRobin.py", "/SRT.py"], "/SRT.py": ["/Process.py"]}
49,810
PaarthB/CPU-Scheduling-Algorithms
refs/heads/master
/Process.py
__author__ = "Paarth Bhasin" __title__ = "Assignment-3 FIT2070: Operating Systems" __tutor__ = "Hasanul Ferdaus" __StartDate__ = '20/8/2016' __studentID__ = 26356104 __LastModified__ = '24/10/2016' class Process: def __init__(self, name="", start=0, duration=0): self.name = name self.st...
{"/FCFS.py": ["/Process.py", "/queue.py"], "/RoundRobin.py": ["/Process.py", "/queue.py"], "/comparator.py": ["/FCFS.py", "/RoundRobin.py", "/SRT.py"], "/SRT.py": ["/Process.py"]}
49,811
PaarthB/CPU-Scheduling-Algorithms
refs/heads/master
/SRT.py
__author__ = "Paarth Bhasin" __title__ = "Assignment-3 FIT2070: Operating Systems" __tutor__ = "Hasanul Ferdaus" __StartDate__ = '20/10/2016' __studentID__ = 26356104 __LastModified__ = '24/10/2016' # Using priority queue to handle processes based on time remaining. from PriorityQueue import PriorityQueue fro...
{"/FCFS.py": ["/Process.py", "/queue.py"], "/RoundRobin.py": ["/Process.py", "/queue.py"], "/comparator.py": ["/FCFS.py", "/RoundRobin.py", "/SRT.py"], "/SRT.py": ["/Process.py"]}
49,812
PaarthB/CPU-Scheduling-Algorithms
refs/heads/master
/queue.py
__author__ = "Paarth Bhasin" __title__ = "Assignment-3 FIT2070: Operating Systems" __tutor__ = "Hasanul Ferdaus" __StartDate__ = '20/8/2016' __studentID__ = 26356104 __LastModified__ = '24/10/2016' class Queue: def __init__(self, size): assert size > 0, "size should be positive" self.th...
{"/FCFS.py": ["/Process.py", "/queue.py"], "/RoundRobin.py": ["/Process.py", "/queue.py"], "/comparator.py": ["/FCFS.py", "/RoundRobin.py", "/SRT.py"], "/SRT.py": ["/Process.py"]}
49,863
arnegroskurth/python-on-whales
refs/heads/master
/tests/python_on_whales/components/test_image.py
import pytest from python_on_whales import DockerException, docker from python_on_whales.components.image import ImageInspectResult from python_on_whales.test_utils import random_name def test_image_remove(): docker.image.pull("busybox:1", quiet=True) docker.image.pull("busybox:1.32", quiet=True) docker....
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,864
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/components/service.py
from datetime import datetime from typing import Any, Dict, List, Optional, Union, overload from python_on_whales.client_config import ( ClientConfig, DockerCLICaller, ReloadableObjectFromJson, ) from python_on_whales.utils import DockerCamelModel, run, to_list class Resources(DockerCamelModel): limi...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,865
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/components/swarm.py
from typing import Optional from python_on_whales.client_config import DockerCLICaller from python_on_whales.utils import run class SwarmCLI(DockerCLICaller): def ca(self): """Not yet implemented""" raise NotImplementedError def init( self, advertise_address: Opt...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,866
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/components/manifest.py
from python_on_whales.client_config import DockerCLICaller class ManifestCLI(DockerCLICaller): def annotate(self): """Not yet implemented""" raise NotImplementedError def create(self): """Not yet implemented""" raise NotImplementedError def inspect(self): ...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,867
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/components/context.py
from python_on_whales.client_config import DockerCLICaller class ContextCLI(DockerCLICaller): def create(self): """Not yet implemented""" raise NotImplementedError def export(self): """Not yet implemented""" raise NotImplementedError def import_(self): ...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,868
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/test_utils.py
import random import string from contextlib import contextmanager from python_on_whales import client_config def random_name() -> str: return "".join(random.choices(string.ascii_lowercase + string.digits, k=20)) @contextmanager def set_cache_validity_period(x: float): old = client_config.CACHE_VALIDITY_PER...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,869
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/components/config.py
from python_on_whales.client_config import DockerCLICaller class ConfigCLI(DockerCLICaller): def create(self): """Not yet implemented""" raise NotImplementedError def inspect(self): """Not yet implemented""" raise NotImplementedError def list(self): "...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,870
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/components/trust.py
from python_on_whales.client_config import DockerCLICaller class TrustCLI(DockerCLICaller): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.key = None self.signer = None def inspect(self): """Not yet implemented""" raise NotImplem...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,871
arnegroskurth/python-on-whales
refs/heads/master
/tests/python_on_whales/components/test_compose.py
import os import pytest from python_on_whales import DockerClient pytestmark = pytest.mark.skipif( os.getenv("RUN_COMPOSE_TESTS", "0") == "0", reason="Do not run compose tests" ) docker = DockerClient(compose_files=["./dummy_compose.yml"]) def test_docker_compose_build(): docker.compose.buil...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,872
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/__init__.py
from .components.buildx import Builder from .components.container import Container from .components.image import Image from .components.network import Network from .components.node import Node from .components.service import Service from .components.stack import Stack from .components.volume import Volume from .docker_...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,873
arnegroskurth/python-on-whales
refs/heads/master
/tests/python_on_whales/components/test_node.py
import pytest from python_on_whales import docker @pytest.fixture def with_swarm(): docker.swarm.init() yield docker.swarm.leave(force=True) @pytest.mark.usefixtures("with_swarm") def test_list_nodes(): nodes = docker.node.list() assert len(nodes) == 1
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,874
arnegroskurth/python-on-whales
refs/heads/master
/tests/python_on_whales/components/test_network.py
import pytest from python_on_whales import DockerException, docker from python_on_whales.components.network import NetworkInspectResult from python_on_whales.test_utils import random_name def test_network_create_remove(): my_name = random_name() my_network = docker.network.create(my_name) assert my_netwo...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,875
arnegroskurth/python-on-whales
refs/heads/master
/python_on_whales/components/compose.py
from __future__ import annotations from typing import List from python_on_whales.client_config import DockerCLICaller from python_on_whales.utils import run class ComposeCLI(DockerCLICaller): def build(self, services: List[str] = []): """Build services declared in a yaml compose file. ...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,876
arnegroskurth/python-on-whales
refs/heads/master
/tests/python_on_whales/components/test_service.py
from python_on_whales.components.service import ServiceInspectResult def test_service_inspect_result_1(): json_inspect = """ { "ID": "m3m209zl7pxn513ufboctb3q2", "Version": { "Index": 102 }, "CreatedAt": "2020-11-14T15:12:39.4142383Z", "UpdatedAt": "2020-11-14T15:12:39.41696...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,877
arnegroskurth/python-on-whales
refs/heads/master
/docs/template/docker_objects/containers_demo.py
import sys from python_on_whales import docker def super_print(obj): print(f"type = {type(obj)}, value = {obj}") def write_code(i: int, attribute_access: str): value = eval(attribute_access) string = f"""In [{i}]: super_print({attribute_access}) type = {type(value)}, value = {value} """ ...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,878
arnegroskurth/python-on-whales
refs/heads/master
/tests/python_on_whales/components/test_system.py
from python_on_whales import docker def test_disk_free(): docker.pull("busybox") docker.pull("busybox:1") docker_items_summary = docker.system.disk_free() assert docker_items_summary.images.active > 1 assert docker_items_summary.images.size > 2000 def test_info(): docker.system.i...
{"/tests/python_on_whales/components/test_image.py": ["/python_on_whales/__init__.py", "/python_on_whales/test_utils.py"], "/python_on_whales/test_utils.py": ["/python_on_whales/__init__.py"], "/tests/python_on_whales/components/test_compose.py": ["/python_on_whales/__init__.py"], "/python_on_whales/__init__.py": ["/py...
49,880
thallesdomician/blog-django
refs/heads/main
/post/migrations/0004_auto_20210128_2037.py
# Generated by Django 2.2.17 on 2021-01-28 20:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('post', '0003_auto_20210128_0447'), ] operations = [ migrations.AlterField( model_name='post', name='header_image', ...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,881
thallesdomician/blog-django
refs/heads/main
/post/models.py
from django.db import models from django.contrib import admin from colorfield.fields import ColorField from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import slugify from tinymce.models import HTMLField class Category(models.Model): TEXT_COLOR = ( ('w', 'white')...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,882
thallesdomician/blog-django
refs/heads/main
/post/migrations/0006_auto_20210128_2323.py
# Generated by Django 2.2.17 on 2021-01-28 23:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('post', '0005_auto_20210128_2039'), ] operations = [ migrations.AlterField( model_name='post', name='header_image', ...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,883
thallesdomician/blog-django
refs/heads/main
/post/urls.py
from django.urls import path from .views import PostList, PostView, PostUpdate, PostDelete, PostCreate from django.contrib.auth.decorators import login_required urlpatterns = [ path('', PostList.as_view(), name='post_list'), path('new/', login_required(PostCreate.as_view()), name='post_create'), path('<sl...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,884
thallesdomician/blog-django
refs/heads/main
/post/forms.py
from django import forms from .models import Post from tinymce.widgets import TinyMCE from tinymce import models as tinymce_models class PostForm(forms.ModelForm): resume = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10})) content = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 30})...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,885
thallesdomician/blog-django
refs/heads/main
/post/views.py
from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.urls import reverse_lazy from django.views import View from django.views.generic import ListView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView, De...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,886
thallesdomician/blog-django
refs/heads/main
/post/migrations/0013_auto_20210208_2108.py
# Generated by Django 2.2.17 on 2021-02-08 21:08 from django.db import migrations, models import tinymce.models class Migration(migrations.Migration): dependencies = [ ('post', '0012_auto_20210208_2036'), ] operations = [ migrations.AlterField( model_name='post', ...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,887
thallesdomician/blog-django
refs/heads/main
/post/migrations/0001_initial.py
# Generated by Django 2.2.17 on 2021-01-28 04:35 import colorfield.fields from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,888
thallesdomician/blog-django
refs/heads/main
/post/admin.py
from django.contrib import admin # Register your models here. from django.utils.translation import ugettext_lazy as _ from .models import Post, PostAdmin, Category, CategoryAdmin admin.site.register(Post, PostAdmin) admin.site.register(Category, CategoryAdmin) admin.site.site_header = _('Marcos\' Blog') admin.site.in...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,889
thallesdomician/blog-django
refs/heads/main
/user/urls.py
from django.urls import path from .views import detail urlpatterns = [ path('', detail, name='detail'), ]
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,890
thallesdomician/blog-django
refs/heads/main
/post/migrations/0007_auto_20210129_0020.py
# Generated by Django 2.2.17 on 2021-01-29 00:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('post', '0006_auto_20210128_2323'), ] operations = [ migrations.AlterField( model_name='post', name='header_image', ...
{"/post/urls.py": ["/post/views.py"], "/post/forms.py": ["/post/models.py"], "/post/views.py": ["/post/models.py", "/post/forms.py"], "/post/admin.py": ["/post/models.py"]}
49,924
i0Ek3/biatch
refs/heads/master
/train.py
#!/usr/bin/env python # coding=utf-8 import numpy as np import tensorflow.compat.v1 as tf tf.disable_v2_behavior() def train(a): w = tf.Variable(0, dtype=tf.float32) x = tf.placeholder(tf.float32, [3,1]) cost = w ** 2 - 10 * w + 25 train = tf.train.GradientDescentOptimizer(a).minimize(cost) ...
{"/main.py": ["/train.py"]}
49,925
i0Ek3/biatch
refs/heads/master
/main.py
#!/usr/bin/env python # coding=utf-8 import train as t def main(): anwser = input('Am I biatch? ') if anwser: print('Yah, exactly you\'re biatch!') t.train(1 / len(anwser)) if __name__ == "__main__": main()
{"/main.py": ["/train.py"]}
49,926
frayer/docker-k8s-first-steps
refs/heads/master
/arguments/__init__.py
import argparse parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('--port', '-p', type=int, required=False, help="port number", default=5000) parser.add_argument('--host', type=str, required=False, help="port number", default='0.0.0.0') args = parser.parse_args()
{"/app.py": ["/arguments/__init__.py"]}
49,927
frayer/docker-k8s-first-steps
refs/heads/master
/app.py
from arguments import args from flask import Flask, Response, json import logging import os app = Flask(__name__) LISTEN_HOST = args.host LISTEN_PORT = args.port @app.route('/') def root(): data = json.dumps({ "appName": "python-flask-demo", "version": "1.0.0", "env": { "host"...
{"/app.py": ["/arguments/__init__.py"]}
49,939
djangobat/todo-app
refs/heads/master
/apps/todos/templatetags/todo_tags.py
from django import template from apps.todos.models import Topic register = template.Library() @register.filter def bg_color(topic): colors = [ 'badge-primary', 'badge-success', 'badge-danger', 'badge-warning', 'badge-info', 'badge-dark' ] index = topic.id % len(colors) return colors...
{"/apps/todos/templatetags/todo_tags.py": ["/apps/todos/models.py"], "/apps/todos/views.py": ["/apps/todos/models.py", "/apps/todos/filters.py"], "/apps/todos/filters.py": ["/apps/todos/models.py"], "/apps/todos/admin.py": ["/apps/todos/models.py"]}
49,940
djangobat/todo-app
refs/heads/master
/apps/todos/views.py
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from .models import Topic, Task from .forms import CreateTopicForm from .filters import TaskFilter @login_required def todo(request): topics = Topic.objects.filter(owner=request.user) query = Task.objects....
{"/apps/todos/templatetags/todo_tags.py": ["/apps/todos/models.py"], "/apps/todos/views.py": ["/apps/todos/models.py", "/apps/todos/filters.py"], "/apps/todos/filters.py": ["/apps/todos/models.py"], "/apps/todos/admin.py": ["/apps/todos/models.py"]}
49,941
djangobat/todo-app
refs/heads/master
/apps/todos/models.py
from django.db import models from django.conf import settings class Topic(models.Model): title = models.CharField(max_length=100) description = models.TextField(blank=True) owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='topics') def __str__(self): ...
{"/apps/todos/templatetags/todo_tags.py": ["/apps/todos/models.py"], "/apps/todos/views.py": ["/apps/todos/models.py", "/apps/todos/filters.py"], "/apps/todos/filters.py": ["/apps/todos/models.py"], "/apps/todos/admin.py": ["/apps/todos/models.py"]}
49,942
djangobat/todo-app
refs/heads/master
/apps/todos/filters.py
import django_filters from datetime import timedelta import calendar from django import forms from django.utils.timezone import localtime, now from .models import Topic, Task def filter_created(queryset, name, value): no = localtime(now()) middle_no = no.replace(hour=0, minute=0, second=0) if value == '...
{"/apps/todos/templatetags/todo_tags.py": ["/apps/todos/models.py"], "/apps/todos/views.py": ["/apps/todos/models.py", "/apps/todos/filters.py"], "/apps/todos/filters.py": ["/apps/todos/models.py"], "/apps/todos/admin.py": ["/apps/todos/models.py"]}
49,943
djangobat/todo-app
refs/heads/master
/apps/todos/admin.py
from django.contrib import admin from .models import Topic, Task admin.site.register(Topic) admin.site.register(Task)
{"/apps/todos/templatetags/todo_tags.py": ["/apps/todos/models.py"], "/apps/todos/views.py": ["/apps/todos/models.py", "/apps/todos/filters.py"], "/apps/todos/filters.py": ["/apps/todos/models.py"], "/apps/todos/admin.py": ["/apps/todos/models.py"]}
49,989
hmyit/pycodeinjector
refs/heads/master
/pycIndolor.py
#!/usr/bin/python import sys from pycodeinjection import * def banner() : print(""" |________|_____________________|_ | | | | | | | | | | | | | |________________ |________|_P_y_c_I_n_d_o_l_o_r_|_| | | | Simple PoC for pycodeinjection library ...
{"/pycIndolor.py": ["/pycodeinjection.py"]}
49,990
hmyit/pycodeinjector
refs/heads/master
/pycodeinjection.py
from ctypes import * from win32com.client import GetObject def getPID(processname): WMI = GetObject('winmgmts:') p = WMI.ExecQuery('select * from Win32_Process where Name="%s"' %(processname)) if len(p) == 0: return 0 return p[0].Properties_('ProcessId').Value def generateShellcode(cmdString): # W...
{"/pycIndolor.py": ["/pycodeinjection.py"]}
49,998
Straffern/strided-tenet
refs/heads/main
/data/datasets.py
import os import torch import torch.nn as nn import torch.nn.functional as F import torchvision from torchvision.utils import save_image import torchvision.transforms as transforms from torch.utils.data import TensorDataset, DataLoader, Dataset from kornia.color import RgbToGrayscale import pdb import numpy as np impor...
{"/train.py": ["/data/datasets.py"]}
49,999
Straffern/strided-tenet
refs/heads/main
/train.py
#!/usr/bin/env python3 import time import torch from models.mps import MPS from torchvision import transforms, datasets import pdb from data.datasets import * from utils.tools import * import argparse from carbontracker.tracker import CarbonTracker from sklearn.metrics import precision_recall_curve, average_precision_s...
{"/train.py": ["/data/datasets.py"]}
50,018
melqueawq/analytics
refs/heads/master
/view/views.py
#!/usr/bin/env python # -*- coding:utf-8 -*- from flask import request, render_template, send_file from ._app import (app, getLogger, conversion, campaign, config, uid_entry, db) from .models import LogTable import datetime import base64 import io import urllib.parse import time import sys @app.ro...
{"/view/views.py": ["/view/_app.py", "/view/models.py"], "/view/models.py": ["/view/_app.py"], "/view/_app.py": ["/view/models.py"]}
50,019
melqueawq/analytics
refs/heads/master
/view/models.py
#!/usr/bin/env python # -*- coding:utf-8 -*- from ._app import db from flask_sqlalchemy import SQLAlchemy from datetime import datetime class LogTable(db.Model): __tablename__ = 'LogTable' id = db.Column(db.Integer, primary_key=True) date = db.Column(db.DateTime, default=datetime.now(), nullable=False) ...
{"/view/views.py": ["/view/_app.py", "/view/models.py"], "/view/models.py": ["/view/_app.py"], "/view/_app.py": ["/view/models.py"]}
50,020
melqueawq/analytics
refs/heads/master
/view/_app.py
#!/usr/bin/env python # -*- coding:utf-8 -*- from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate import logging import json import datetime import urllib import os app = Flask(__name__, template_folder='../templates', static_folder="../static") app.config['SQL...
{"/view/views.py": ["/view/_app.py", "/view/models.py"], "/view/models.py": ["/view/_app.py"], "/view/_app.py": ["/view/models.py"]}
50,024
keephunger/django_blog
refs/heads/master
/blog/migrations/0001_initial.py
# Generated by Django 2.2.10 on 2020-02-28 18:36 from django.db import migrations, models import django.db.models.deletion import extra_apps.DjangoUeditor.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name...
{"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"]}
50,025
keephunger/django_blog
refs/heads/master
/blog/templatetags/extra_tags.py
# my_filter.py from django import template register = template.Library() @register.filter def link_str(value): # 定义过滤器 value = str(value).split('<')[1] return value.strip('p>')
{"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"]}
50,026
keephunger/django_blog
refs/heads/master
/blog/models.py
from django.db import models # Create your models here. from extra_apps.DjangoUeditor.models import UEditorField class BlogUser(models.Model): username = models.CharField(max_length=20, verbose_name='名字') password = models.CharField(max_length=45, verbose_name='密码') email = models.CharField(max_length=45...
{"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"]}
50,027
keephunger/django_blog
refs/heads/master
/blog/views.py
import jsonpickle as jsonpickle from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.http import HttpResponse, JsonResponse, HttpResponseRedirect from django.shortcuts import render # Create your views here. from django.urls import reverse from django.views import View from itsdangerous...
{"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"]}
50,028
keephunger/django_blog
refs/heads/master
/blog/admin.py
from django.contrib import admin # Register your models here. from blog.models import Article, BlogUser admin.site.register(Article) admin.site.register(BlogUser)
{"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"]}
50,029
keephunger/django_blog
refs/heads/master
/blog/urls.py
from django.contrib import admin from django.urls import path from blog import views app_name="blog" urlpatterns = [ path(r'',views.blog_index,name="blog_index"), path(r'login/',views.BlogLogin.as_view(),name="blog_login"),#登录 path(r'register/',views.Register.as_view(),name="blog_register"),#注册 path(...
{"/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"]}
50,042
pushy-site/flask-rabbitmq
refs/heads/master
/example/app/test/default.py
# encoding:utf-8 from example.app import rpc class DefaultExchange(object): def __init__(self): pass def callback(self, ch, method, props, body): print(body) def declare(self): rpc.declare_default_consuming('hello', self.callback) # rpc.send( # body='hello wor...
{"/example/app/test/default.py": ["/example/app/__init__.py"]}
50,043
pushy-site/flask-rabbitmq
refs/heads/master
/example/app/__init__.py
#encoding:utf-8 from flask import Flask from example import config from flask_rabbitmq import RabbitMQ from flask_rabbitmq import Queue app = Flask(__name__) app.config.from_object(config) queue = Queue() rpc = RabbitMQ(app, queue) from example.app import test
{"/example/app/test/default.py": ["/example/app/__init__.py"]}
50,047
andh-dtu/YADDUM
refs/heads/master
/yaddum/__init__.py
from .yaddum import Uncertainty
{"/yaddum/__init__.py": ["/yaddum/yaddum.py"], "/test/test.py": ["/yaddum/__init__.py"]}
50,048
andh-dtu/YADDUM
refs/heads/master
/test/test.py
import yaddum as yaddum import numpy as np import matplotlib.pyplot as plt import xarray as xr lidar_uncertainty = yaddum.Uncertainty() model_pars={'wind_speed':10, 'upward_air_velocity':0, 'wind_from_direction':0, 'reference_height':100, 'shear_exponent':0.2} lidar_unc...
{"/yaddum/__init__.py": ["/yaddum/yaddum.py"], "/test/test.py": ["/yaddum/__init__.py"]}
50,049
andh-dtu/YADDUM
refs/heads/master
/setup.py
# Always prefer setuptools over distutils from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() # Arguments marked as "Required" below must be included for upload to ...
{"/yaddum/__init__.py": ["/yaddum/yaddum.py"], "/test/test.py": ["/yaddum/__init__.py"]}
50,050
andh-dtu/YADDUM
refs/heads/master
/yaddum/yaddum.py
"""This is a Python package for dual-Doppler uncertainty assessment. It includes several class which are used to perform the assessment. """ from math import cos, sin, pi, radians import numpy as np import xarray as xr def wind_vector_to_los(u,v,w, azimuth, elevation, ignore_elevation = True): """Projects win...
{"/yaddum/__init__.py": ["/yaddum/yaddum.py"], "/test/test.py": ["/yaddum/__init__.py"]}
50,051
JarLoz/flipper2
refs/heads/master
/fliplib/deck.py
from .scryfall import getApi from .printer import printMessage from .card import createCard class Deck: def __init__(self, name): self.mainboard = [] self.sideboard = [] self.extra = [] self.api = getApi() self.name = name self.nextCardId = 100 def addCardTo...
{"/fliplib/deck.py": ["/fliplib/scryfall.py", "/fliplib/card.py"], "/flipper2.py": ["/fliplib/parser.py"], "/fliplib/parser.py": ["/fliplib/deck.py", "/fliplib/scryfall.py"], "/fliplib/card.py": ["/fliplib/scryfall.py"]}
50,052
JarLoz/flipper2
refs/heads/master
/flipper2.py
from fliplib.parser import readDecklist import os def initializeCaches(): os.makedirs('imageCache', exist_ok=True) os.makedirs('apiCache', exist_ok=True) initializeCaches() deck = readDecklist("decklist.txt") deck.printDecklist()
{"/fliplib/deck.py": ["/fliplib/scryfall.py", "/fliplib/card.py"], "/flipper2.py": ["/fliplib/parser.py"], "/fliplib/parser.py": ["/fliplib/deck.py", "/fliplib/scryfall.py"], "/fliplib/card.py": ["/fliplib/scryfall.py"]}
50,053
JarLoz/flipper2
refs/heads/master
/fliplib/parser.py
import re from .deck import Deck from .scryfall import ApiError from .printer import printMessage def readDecklist(filename): """ Reads a decklist from a file """ try: with open(filename,encoding="utf8") as decklistfile: decklist = decklistfile.readlines() return parseDeckli...
{"/fliplib/deck.py": ["/fliplib/scryfall.py", "/fliplib/card.py"], "/flipper2.py": ["/fliplib/parser.py"], "/fliplib/parser.py": ["/fliplib/deck.py", "/fliplib/scryfall.py"], "/fliplib/card.py": ["/fliplib/scryfall.py"]}
50,054
JarLoz/flipper2
refs/heads/master
/fliplib/card.py
import os from .scryfall import getApi class Card: def __init__(self, cardname): self.name = cardname self.selectedPrinting = None self.printings = None self.cardId = None def imageName(self, scryId = None): if (scryId == None): scryId = self.selectedPrinti...
{"/fliplib/deck.py": ["/fliplib/scryfall.py", "/fliplib/card.py"], "/flipper2.py": ["/fliplib/parser.py"], "/fliplib/parser.py": ["/fliplib/deck.py", "/fliplib/scryfall.py"], "/fliplib/card.py": ["/fliplib/scryfall.py"]}
50,055
JarLoz/flipper2
refs/heads/master
/fliplib/deckimage.py
class DeckImage: def __init__(self, index, url): self.index = index self.faceUrl = url self.backUrl = 'https://i.imgur.com/P7qYTcI.png' self.uniqueBack = False def getCustomDeckObject(self): return {'NumWidth':10,'NumHeight':7,'FaceUrl':self.faceUrl,'BackUrl':self.backUr...
{"/fliplib/deck.py": ["/fliplib/scryfall.py", "/fliplib/card.py"], "/flipper2.py": ["/fliplib/parser.py"], "/fliplib/parser.py": ["/fliplib/deck.py", "/fliplib/scryfall.py"], "/fliplib/card.py": ["/fliplib/scryfall.py"]}
50,056
JarLoz/flipper2
refs/heads/master
/fliplib/scryfall.py
import requests import shutil from time import sleep _api = None class Scryfall: def __init__(self): self.nameCache = {} self.printCache = {} self.apiUrl = "https://api.scryfall.com" self.namedEndpoint = self.apiUrl + '/cards/named' self.searchEndpoint = self.apiUrl + '/car...
{"/fliplib/deck.py": ["/fliplib/scryfall.py", "/fliplib/card.py"], "/flipper2.py": ["/fliplib/parser.py"], "/fliplib/parser.py": ["/fliplib/deck.py", "/fliplib/scryfall.py"], "/fliplib/card.py": ["/fliplib/scryfall.py"]}
50,057
hou-rong/ControlSpeed
refs/heads/master
/test.py
# coding:utf-8 import time import redis from controlspeed import ControlSpeed from controlspeed import ControlSpeedNetwork redis_conn = redis.StrictRedis() key = 'hourong' @ControlSpeedNetwork(redis_conn, key, max_calls=10, period=3.0) def do_something(args): print(args) time.sleep(0.1) for i in range(20):...
{"/test.py": ["/controlspeed/__init__.py"]}
50,058
hou-rong/ControlSpeed
refs/heads/master
/controlspeed/__init__.py
# conding:utf-8 import collections import functools import threading import time import pickle from controlspeed.local_mutex import LocalMutex, LockError class ControlSpeed(object): def __init__(self, multi=None, max_calls=0, period=1.0, callback=None): if period <= 0: raise ValueError('Speed ...
{"/test.py": ["/controlspeed/__init__.py"]}
50,059
corypaik/fancyflags
refs/heads/master
/fancyflags/_flags_test.py
# Copyright 2021 DeepMind Technologies Limited. # # 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 agre...
{"/fancyflags/_flags_test.py": ["/fancyflags/__init__.py"], "/fancyflags/examples/example_module.py": ["/fancyflags/__init__.py"], "/fancyflags/_auto.py": ["/fancyflags/__init__.py"], "/fancyflags/_define_auto_test.py": ["/fancyflags/__init__.py"], "/fancyflags/_define_auto.py": ["/fancyflags/__init__.py"], "/fancyflag...