index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
80,330
mpmcmaster/tracker
refs/heads/master
/tracker/tasks/migrations/0002_recipient_recipient_type.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-11 01:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tasks', '0001_initial'), ] operations = [ migrations.AddField( ...
{"/tracker/tasks/admin.py": ["/tracker/tasks/models.py"]}
80,331
mpmcmaster/tracker
refs/heads/master
/tracker/tasks/models.py
from django.db import models # Create your models here. class Recipient(models.Model): recipient_name = models.CharField(max_length=50) recipient_email = models.EmailField(max_length=254, default='') recipient_type = models.CharField(max_length=20) def __str__(self): return self.recipient_name class Task(model...
{"/tracker/tasks/admin.py": ["/tracker/tasks/models.py"]}
80,332
mpmcmaster/tracker
refs/heads/master
/tracker/tasks/migrations/0003_auto_20180130_0152.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-01-30 01:52 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tasks', '0002_recipient_recipient_type'), ] operations = [ migrations.Creat...
{"/tracker/tasks/admin.py": ["/tracker/tasks/models.py"]}
80,342
jamesncollins/pose_estimation
refs/heads/main
/pose_estimator.py
from cv2 import cv2 import numpy as np import sys import os import requests #Skeleton ALL_JOINTS = ['Head', 'Neck', 'RShoulder', 'RElbow', 'RWrist', 'LShoulder', 'LElbow', 'LWrist', 'RHip', 'RKnee', 'RAnkle', 'LHip', 'LKnee', 'LAnkle', 'Chest', 'Background'] EDGES = [[0, 1], [1, 2], [2, ...
{"/sketch_pose.py": ["/pose_estimator.py"], "/vectoriser.py": ["/pose_estimator.py"]}
80,343
jamesncollins/pose_estimation
refs/heads/main
/sketch_pose.py
import sys import os from cv2 import cv2 import pose_estimator if __name__ == "__main__": if len(sys.argv) > 1: FILE_NAME = sys.argv[1] else: FILE_NAME = input("Input the file name of the image to analyse: ") #Check that the specified image exists. file_path = 'content/' + FILE_NAME ...
{"/sketch_pose.py": ["/pose_estimator.py"], "/vectoriser.py": ["/pose_estimator.py"]}
80,344
jamesncollins/pose_estimation
refs/heads/main
/vectoriser.py
from cv2 import cv2 import sys import os import requests import pose_estimator from scipy import spatial if __name__ == "__main__": if len(sys.argv) > 1: FILE_NAME = sys.argv[1] else: FILE_NAME = input("Input the file name of the image to analyse: ") #Check that the specified image exist...
{"/sketch_pose.py": ["/pose_estimator.py"], "/vectoriser.py": ["/pose_estimator.py"]}
80,349
RahulRavindren/hasgeek-nlp
refs/heads/master
/commons/common.py
#-*- author:Rahul Ravindran #-*- coding:UTF-8 from nltk import FreqDist from sklearn.decomposition import PCA import matplotlib.pyplot as plt import numpy as np import collections class CommonFunctions(): """ CommonFunctions for the language module """ def freqDistribution(self,tokenizedWords): """ Calculate ...
{"/features/features.py": ["/commons/common.py"]}
80,350
RahulRavindren/hasgeek-nlp
refs/heads/master
/features/features.py
#-*- author: Rahul Ravindran #-*- coding:UTF-8 from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import SVC from commons.common import CommonFunctions import numpy as np class Fea...
{"/features/features.py": ["/commons/common.py"]}
80,351
RahulRavindren/hasgeek-nlp
refs/heads/master
/data/data.py
#-*- author:Rahul Ravindran #-*- coding:UTF-8 import nltk from nltk.tokenize.punkt import PunktSentenceTokenizer as st from nltk.corpus import stopwords import csv,pickle from bs4 import BeautifulSoup class StatPreProcessing(): """ Pre Processing applied on the data coming from a post. noise removed : html tags,sto...
{"/features/features.py": ["/commons/common.py"]}
80,352
dekuyper/prod_rev_spider
refs/heads/master
/prod_rev_spider/items.py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class WebPageItem(scrapy.Item): url = scrapy.Field() title = scrapy.Field() buy_button = scrapy.Field() last_updated = scrapy.Field() ...
{"/prod_rev_spider/spiders/emag.py": ["/prod_rev_spider/items.py"], "/prod_rev_spider/spiders/cel.py": ["/prod_rev_spider/items.py"], "/prod_rev_spider/spiders/price.py": ["/prod_rev_spider/items.py"]}
80,353
dekuyper/prod_rev_spider
refs/heads/master
/prod_rev_spider/spiders/emag.py
from datetime import datetime import scrapy from ..items import WebPageItem def get_clean_string(one_element: list): """ Expects a single element list Returns the stripped element in the list """ if one_element: one_element = one_element.pop() one_element = one_element.s...
{"/prod_rev_spider/spiders/emag.py": ["/prod_rev_spider/items.py"], "/prod_rev_spider/spiders/cel.py": ["/prod_rev_spider/items.py"], "/prod_rev_spider/spiders/price.py": ["/prod_rev_spider/items.py"]}
80,354
dekuyper/prod_rev_spider
refs/heads/master
/prod_rev_spider/spiders/cel.py
# -*- coding: utf-8 -*- from datetime import datetime import scrapy from ..items import WebPageItem def get_clean_string(one_element: list): """ Expects a single element list Returns the stripped element in the list """ if one_element: one_element = one_element.pop() one_...
{"/prod_rev_spider/spiders/emag.py": ["/prod_rev_spider/items.py"], "/prod_rev_spider/spiders/cel.py": ["/prod_rev_spider/items.py"], "/prod_rev_spider/spiders/price.py": ["/prod_rev_spider/items.py"]}
80,355
dekuyper/prod_rev_spider
refs/heads/master
/prod_rev_spider/spiders/price.py
# -*- coding: utf-8 -*- import datetime import logging import scrapy from ..items import WebPageItem class PriceSpider(scrapy.Spider): crawled = 0 name = "price" allowed_domains = ["www.price.ro"] start_urls = ( 'https://www.price.ro/', ) def parse(self, response): if respon...
{"/prod_rev_spider/spiders/emag.py": ["/prod_rev_spider/items.py"], "/prod_rev_spider/spiders/cel.py": ["/prod_rev_spider/items.py"], "/prod_rev_spider/spiders/price.py": ["/prod_rev_spider/items.py"]}
80,366
girardinsamuel/systemboard
refs/heads/master
/problems/__init__.py
import pathlib HOLDS_SETS = {'A','B','OS'} SETUPS = ['2016'] GRADES = ['6A', '6A+', '6B', '6B+', '6C', '6C+', '7A', '7A+', '7B', '7B+', '7C', '7C+', '8A', '8A+', '8B', '8B+' ] DB_PATH = pathlib.Path(__file__).parent.absolute().joinpath("moon_problems.db")
{"/server/server.py": ["/problems/__init__.py", "/led/drive_moonboard_LEDS.py"], "/run.py": ["/led/moonboard.py"], "/run_server.py": ["/problems/__init__.py", "/led/moonboard.py"]}
80,367
girardinsamuel/systemboard
refs/heads/master
/led/drive_moonboard_LEDS.py
# -*- coding: utf-8 -*- from bibliopixel import Strip from bibliopixel.drivers.SPI.WS2801 import WS2801 from bibliopixel.drivers.PiWS281X import PiWS281X from bibliopixel.drivers.dummy_driver import DriverDummy from bibliopixel.drivers.SimPixel import SimPixel from bibliopixel.colors.colors import COLORS import stri...
{"/server/server.py": ["/problems/__init__.py", "/led/drive_moonboard_LEDS.py"], "/run.py": ["/led/moonboard.py"], "/run_server.py": ["/problems/__init__.py", "/led/moonboard.py"]}
80,368
girardinsamuel/systemboard
refs/heads/master
/server/server.py
# WS server example that synchronizes state across clients import asyncio import json import websockets from functools import partial import problems.db_query as query #from problems.draw_problem import draw_Problem, colormap import aiosqlite import problems from led.drive_moonboard_LEDS import show_problem CLIENTS = ...
{"/server/server.py": ["/problems/__init__.py", "/led/drive_moonboard_LEDS.py"], "/run.py": ["/led/moonboard.py"], "/run_server.py": ["/problems/__init__.py", "/led/moonboard.py"]}
80,369
girardinsamuel/systemboard
refs/heads/master
/run.py
# -*- coding: utf-8 -*- import argparse from led.moonboard import MoonBoard,LED_LAYOUT from gi.repository import GLib import dbus from dbus.mainloop.glib import DBusGMainLoop from functools import partial import json def new_problem_cb(mb,holds_string): holds = json.loads(holds_string) mb.show_problem...
{"/server/server.py": ["/problems/__init__.py", "/led/drive_moonboard_LEDS.py"], "/run.py": ["/led/moonboard.py"], "/run_server.py": ["/problems/__init__.py", "/led/moonboard.py"]}
80,370
girardinsamuel/systemboard
refs/heads/master
/led/moonboard.py
# -*- coding: utf-8 -*- from bibliopixel.colors import COLORS from bibliopixel import Matrix from bibliopixel.drivers.PiWS281X import PiWS281X from bibliopixel.drivers.dummy_driver import DriverDummy from bibliopixel.drivers.SPI.WS2801 import WS2801 from bibliopixel.drivers.PiWS281X import PiWS281X from bibliopixel.d...
{"/server/server.py": ["/problems/__init__.py", "/led/drive_moonboard_LEDS.py"], "/run.py": ["/led/moonboard.py"], "/run_server.py": ["/problems/__init__.py", "/led/moonboard.py"]}
80,371
girardinsamuel/systemboard
refs/heads/master
/run_server.py
# -*- coding: utf-8 -*- import problems from server import main import argparse import asyncio from led.moonboard import MoonBoard,LED_LAYOUT ############### ############### # GLOBALS #paths if __name__ == "__main__": import logging import sys parser = argparse.ArgumentParser(description='Chair Service.'...
{"/server/server.py": ["/problems/__init__.py", "/led/drive_moonboard_LEDS.py"], "/run.py": ["/led/moonboard.py"], "/run_server.py": ["/problems/__init__.py", "/led/moonboard.py"]}
80,410
mehdidc/posegen
refs/heads/master
/iou_tracker.py
from scoreml.detection import Box, ThingOnFrame, BoxList from scoreml.detection.match import iou_all_pairs # https://github.com/bochinski/iou-tracker/blob/master/iou_tracker.py def iou_tracker(objs_frames, obj_confidence_threshold=0.0, track_confidence_threshold=0.5, iou_threshold=0.5, track_length_min=2): tracks_...
{"/cli.py": ["/iou_tracker.py"]}
80,411
mehdidc/posegen
refs/heads/master
/cli.py
import os from glob import glob import numpy as np from clize import run from openpifpaf import datasets, decoder, show, transforms from openpifpaf.network import nets import torch import torch.nn as nn from PIL import Image import skvideo.io import torchvision import json from collections import defaultdict from jobli...
{"/cli.py": ["/iou_tracker.py"]}
80,412
TheBicPen/bic-bot-py
refs/heads/master
/src/modules/generic_module/adapter.py
from . import commands as generic_module import helpers # the function docstrings get returned when the user uses the help function def isbot(message, settings=None): """ Responds "yes". """ return generic_module.isbot(message) def ping(message, settings=None): """ Responds with "pong!" ...
{"/runner.py": ["/src/bot.py"]}
80,413
TheBicPen/bic-bot-py
refs/heads/master
/runner.py
import src.bot src.bot.main()
{"/runner.py": ["/src/bot.py"]}
80,414
TheBicPen/bic-bot-py
refs/heads/master
/src/modules/generic_module/module.py
import module_class from . import adapter def module(): return module_class.BicBotModule(name="Base module", module_help_string="This is the base module. It contains commands for managing the bot, and demonstrating some of its functionality", ...
{"/runner.py": ["/src/bot.py"]}
80,415
TheBicPen/bic-bot-py
refs/heads/master
/src/message_parser.py
import os import aiohttp import asyncio import re import traceback import collections from importlib import import_module from module_class import BicBotModule from module_func import ModuleFunction from message_response import MessageResponse from discord.abc import Messageable import discord import helpers import co...
{"/runner.py": ["/src/bot.py"]}
80,416
TheBicPen/bic-bot-py
refs/heads/master
/src/module_class.py
# a class for new modules to make instances of default_help_string = "This is what a module sould look like. If you are seeing this, then the module info has not been set properly" class BicBotModule: name = "" help_string = "" # triggers for functions literal_matches = {} # message contains lite...
{"/runner.py": ["/src/bot.py"]}
80,417
TheBicPen/bic-bot-py
refs/heads/master
/test/test_tf.py
from image_classification import image_classify as ic tf_sess = None classifications = None def start_tf(): global tf_sess global classifications classifications = ic.get_classifications() if tf_sess is not None: print("TensorFlow session already exists") return "TensorFlow session al...
{"/runner.py": ["/src/bot.py"]}
80,418
TheBicPen/bic-bot-py
refs/heads/master
/src/modules/generic_module/commands.py
from helpers import * # no params, simple text def isbot(message, help=False): """ Responds "yes". """ if help: return return "yes" def ping(message, help=False): """ Responds with "pong!" """ return "pong!" # no params, other def version(help=False): """ Re...
{"/runner.py": ["/src/bot.py"]}
80,419
TheBicPen/bic-bot-py
refs/heads/master
/test/test_dict.py
import unittest from helpers_generic import read_dict_from_file class TestDictRead(unittest.TestCase): file = "dict_test" def test_normal_line(self): self.assertDictContainsSubset({"normal":"line"}, read_dict_from_file(file)) def test_semicolon_line(self): self.assertDictContainsSubs...
{"/runner.py": ["/src/bot.py"]}
80,420
TheBicPen/bic-bot-py
refs/heads/master
/src/modules/image_classification_v2/image_classify.py
# test.py #original code from https://github.com/MicrocontrollersAndMore/TensorFlow_Tut_2_Classification_Walk-through import os import tensorflow as tf import numpy as np import cv2 # module-level variables ############################################################################################## RETRAINED_LABELS...
{"/runner.py": ["/src/bot.py"]}
80,421
TheBicPen/bic-bot-py
refs/heads/master
/src/helpers.py
import os from datetime import datetime # helper functions # def strip1(text: str, strip_text: str): #useless wtf # """ # Returns a string with strip_text stripped from the beginning of text. # """ # return text.lstrip(strip_text) def strip2(text: str, strip_text: str): """ Returns a string w...
{"/runner.py": ["/src/bot.py"]}
80,422
TheBicPen/bic-bot-py
refs/heads/master
/src/message_response.py
import collections from discord.embeds import Embed class MessageResponse: message="" # messages longer than 2k chars may be split before being sent debug="" # may be printed to stdout, stderr, a log file, or posted to discord files=[] embed=None delete_after=None tts=False def __init__(sel...
{"/runner.py": ["/src/bot.py"]}
80,423
TheBicPen/bic-bot-py
refs/heads/master
/src/consts.py
# the current image classification source folder - useful for migrating between tensorflow v1 and v2 ML_lib = "image_classification_v2.image_classify_helpers" # the command to run to retrieve the current IP address IP_command = "wget -qO- https://ipecho.net/plain" # the default settings for the bot default_settings =...
{"/runner.py": ["/src/bot.py"]}
80,424
TheBicPen/bic-bot-py
refs/heads/master
/src/bot.py
# Work with Python 3.6 import discord import message_parser as parser import helpers import consts from message_response import MessageResponse from sys import argv #import log def main(): TOKEN = helpers.read_file("credentials/discord_token.txt") if len(TOKEN) > 0: TOKEN = TOKEN[0] else: h...
{"/runner.py": ["/src/bot.py"]}
80,425
TheBicPen/bic-bot-py
refs/heads/master
/src/modules/image_classification_v2/image_classify_helpers.py
from . import image_classify as ic tf_sess = None classifications = None def start_tf(): global tf_sess global classifications classifications = ic.get_classifications() if tf_sess is not None: print("TensorFlow session already exists") return "TensorFlow session already exists" ...
{"/runner.py": ["/src/bot.py"]}
80,426
TheBicPen/bic-bot-py
refs/heads/master
/src/module_func.py
class ModuleFunction: function = None module = "" help_string = "" def __init__(self, function, module_name, help_string = ""): if callable(function): self.function = function else: raise TypeError("Object passed in as function must be callable") self.m...
{"/runner.py": ["/src/bot.py"]}
80,427
TheBicPen/bic-bot-py
refs/heads/master
/test/import_template.py
from importlib import import_module class Foo: import_ex = False os = None def __init__(self, imp): if imp: self.import_ex = True self.os = import_module('os') def do_thing(self): print("doing thing") if self.import_ex...
{"/runner.py": ["/src/bot.py"]}
80,428
shalevy1/pydeck-in-flask
refs/heads/main
/map.py
import pydeck as pdk LONDON = [51.50, -0.12] def plot_3d_map(df): """ Plots a map with a dot at latitude `x` with longitude `y` and height `z` """ df["colour"] = df["chargeDeviceStatus"].map({"In service": [10, 200, 20], "Out of service": [200, 20, 20]}) print(df) geojson = pdk.Layer( ...
{"/app.py": ["/map.py"]}
80,429
shalevy1/pydeck-in-flask
refs/heads/main
/app.py
from flask import Flask, render_template from map import plot_3d_map import pandas as pd app = Flask(__name__) def read_data(path='data/national-charge-point-registry.csv'): df = pd.read_csv(path) return df @app.route('/') def map(): df = read_data() return render_template('map.html', map=plot_3d_ma...
{"/app.py": ["/map.py"]}
80,445
zhangsongdmk/Snorkel-Labeling
refs/heads/master
/fast_text/model.py
import fasttext from sklearn.model_selection import train_test_split from imblearn import metrics import time import re import os import multiprocessing WORK_PATH = os.getcwd() CPUs = multiprocessing.cpu_count() class FT: def __init__(self, train_test_split_rate=0.2, params=None): self.train_test_split_r...
{"/snorkel_flow/functions.py": ["/snorkel_flow/__init__.py", "/snorkel_flow/utils.py", "/fast_text/__init__.py"], "/demo.py": ["/snorkel_flow/utils.py", "/snorkel_flow/evaluations.py"], "/snorkel_flow/evaluations.py": ["/fast_text/model.py", "/snorkel_flow/functions.py", "/snorkel_flow/utils.py", "/snorkel_flow/__init_...
80,446
zhangsongdmk/Snorkel-Labeling
refs/heads/master
/snorkel_flow/functions.py
from . import SETTINGS, Polarity from snorkel_flow.utils import get_replacements from snorkel.preprocess import preprocessor from snorkel.labeling import labeling_function from snorkel.augmentation import transformation_function from snorkel.slicing import slicing_function import fast_text from xner.models import crf i...
{"/snorkel_flow/functions.py": ["/snorkel_flow/__init__.py", "/snorkel_flow/utils.py", "/fast_text/__init__.py"], "/demo.py": ["/snorkel_flow/utils.py", "/snorkel_flow/evaluations.py"], "/snorkel_flow/evaluations.py": ["/fast_text/model.py", "/snorkel_flow/functions.py", "/snorkel_flow/utils.py", "/snorkel_flow/__init_...
80,447
zhangsongdmk/Snorkel-Labeling
refs/heads/master
/demo.py
from snorkel_flow.utils import load_ind_dataset from snorkel_flow.evaluations import labeling_evaluation, augmentation_evaluation, slicing_evaluation df_train, df_test = load_ind_dataset() # labeling # A simple baseline: take the majority vote on a per-data point basis df_train_filtered, preds_train_filtered, analy...
{"/snorkel_flow/functions.py": ["/snorkel_flow/__init__.py", "/snorkel_flow/utils.py", "/fast_text/__init__.py"], "/demo.py": ["/snorkel_flow/utils.py", "/snorkel_flow/evaluations.py"], "/snorkel_flow/evaluations.py": ["/fast_text/model.py", "/snorkel_flow/functions.py", "/snorkel_flow/utils.py", "/snorkel_flow/__init_...
80,448
zhangsongdmk/Snorkel-Labeling
refs/heads/master
/snorkel_flow/__init__.py
from enum import Enum, unique @unique class Polarity(Enum): ABSTAIN = -1 COMPANY = 0 INDIVIDUAL = 1 SETTINGS = { "re_cmp": '公司|集团|有限|办事处|合作社', "keywords_indus": ['三方', '中介', '中心', '乐业', '五金', '交易', '交通', '交通运输', '产业', '产品', '产权', '产权交易', '人力', '人力资源', '仓储', '会议', '会议展览', '...
{"/snorkel_flow/functions.py": ["/snorkel_flow/__init__.py", "/snorkel_flow/utils.py", "/fast_text/__init__.py"], "/demo.py": ["/snorkel_flow/utils.py", "/snorkel_flow/evaluations.py"], "/snorkel_flow/evaluations.py": ["/fast_text/model.py", "/snorkel_flow/functions.py", "/snorkel_flow/utils.py", "/snorkel_flow/__init_...
80,449
zhangsongdmk/Snorkel-Labeling
refs/heads/master
/snorkel_flow/utils.py
import pandas as pd import random from xner.models import crf import torch import torch.nn as nn from sklearn.model_selection import train_test_split from snorkel.classification.data import DictDataset, DictDataLoader import os WORK_PATH = os.getcwd() def get_replacements( token_list, ner_data_path=f...
{"/snorkel_flow/functions.py": ["/snorkel_flow/__init__.py", "/snorkel_flow/utils.py", "/fast_text/__init__.py"], "/demo.py": ["/snorkel_flow/utils.py", "/snorkel_flow/evaluations.py"], "/snorkel_flow/evaluations.py": ["/fast_text/model.py", "/snorkel_flow/functions.py", "/snorkel_flow/utils.py", "/snorkel_flow/__init_...
80,450
zhangsongdmk/Snorkel-Labeling
refs/heads/master
/fast_text/utils.py
import re import jieba import json import os WORK_PATH = os.getcwd() __depends__ = { "label2index": f"{WORK_PATH}/fast_text/sources/label2index.json", "stop_words": f"{WORK_PATH}/fast_text/sources/stopwords-zh.txt" } def clean(text): return re.sub("[^\u4e00-\u9fa5\d\w\-·]", "", text) def tokenize(sent)...
{"/snorkel_flow/functions.py": ["/snorkel_flow/__init__.py", "/snorkel_flow/utils.py", "/fast_text/__init__.py"], "/demo.py": ["/snorkel_flow/utils.py", "/snorkel_flow/evaluations.py"], "/snorkel_flow/evaluations.py": ["/fast_text/model.py", "/snorkel_flow/functions.py", "/snorkel_flow/utils.py", "/snorkel_flow/__init_...
80,451
zhangsongdmk/Snorkel-Labeling
refs/heads/master
/snorkel_flow/evaluations.py
import numpy as np import jieba import os from fast_text.model import FT from sklearn.linear_model import LogisticRegression from sklearn.metrics import f1_score from snorkel.analysis import Scorer from snorkel.augmentation import RandomPolicy, MeanFieldPolicy, PandasTFApplier from snorkel.classification import Trainer...
{"/snorkel_flow/functions.py": ["/snorkel_flow/__init__.py", "/snorkel_flow/utils.py", "/fast_text/__init__.py"], "/demo.py": ["/snorkel_flow/utils.py", "/snorkel_flow/evaluations.py"], "/snorkel_flow/evaluations.py": ["/fast_text/model.py", "/snorkel_flow/functions.py", "/snorkel_flow/utils.py", "/snorkel_flow/__init_...
80,452
zhangsongdmk/Snorkel-Labeling
refs/heads/master
/fast_text/__init__.py
from .model import FT from .utils import load_train_data, load_test_data, tokenize, _transform, _merge_label def _get_feature(train_data_path, model_path): sentences, y = load_train_data(train_data_path) ft = FT.load(model_path) return [ft.get_sentence_vector(sent).tolist() for sent in sentences] def tr...
{"/snorkel_flow/functions.py": ["/snorkel_flow/__init__.py", "/snorkel_flow/utils.py", "/fast_text/__init__.py"], "/demo.py": ["/snorkel_flow/utils.py", "/snorkel_flow/evaluations.py"], "/snorkel_flow/evaluations.py": ["/fast_text/model.py", "/snorkel_flow/functions.py", "/snorkel_flow/utils.py", "/snorkel_flow/__init_...
80,473
sundarjhu/matching
refs/heads/master
/doall.py
from astropy.table import Table, join, vstack import numpy as np import pandas as pd import os, subprocess, time from astroquery.utils.tap.core import TapPlus import requests as r from os.path import isfile def doquery_from_table(t): table = t[0] #Execute a TAP+ query using information from a single row of an ...
{"/bestcoord.py": ["/write_IPAC_VOTable.py"], "/getWISE.py": ["/bestcoord.py"]}
80,474
sundarjhu/matching
refs/heads/master
/doall_Ab2015.py
from astropy.table import Table, join import numpy as np from astroquery.utils.tap.core import TapPlus import os import pandas as pd def doquery_from_table(table): #Execute a TAP+ query using information from a single row of an astropy table server = TapPlus(url = table['queryurl'], \ defa...
{"/bestcoord.py": ["/write_IPAC_VOTable.py"], "/getWISE.py": ["/bestcoord.py"]}
80,475
sundarjhu/matching
refs/heads/master
/cdsxmatch.py
import numpy as np import requests as r from astropy.table import Table from astropy.io.votable import parse, parse_single_table #, VOTableFile #from astroquery.xmatch import XMatch from astroquery.vizier import Vizier if __name__ == "__main__": repeat_query=False rereadvot=False if repeat_query: ...
{"/bestcoord.py": ["/write_IPAC_VOTable.py"], "/getWISE.py": ["/bestcoord.py"]}
80,476
sundarjhu/matching
refs/heads/master
/bestcoord.py
import numpy as np from astropy.table import Table from write_IPAC_VOTable import * def bestcoord_IRAS_AKARI(): """Given the IRAS/AKARI combined VOTable, store the best coordinate pair obtained hierarchically: AKARI IRC > AKARI FIS > IRAS PSC > IRAS FSC. The WISE and 2MASS data are currently ignored, as th...
{"/bestcoord.py": ["/write_IPAC_VOTable.py"], "/getWISE.py": ["/bestcoord.py"]}
80,477
sundarjhu/matching
refs/heads/master
/getWISE.py
from astropy.table import Table import pandas as pd from bestcoord import * #this imports write_IPAC_VOTable import os, subprocess, time def getWISE(): class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ...
{"/bestcoord.py": ["/write_IPAC_VOTable.py"], "/getWISE.py": ["/bestcoord.py"]}
80,478
sundarjhu/matching
refs/heads/master
/write_IPAC_VOTable.py
import os import numpy as np def write_IPAC_VOTable(t, outfile = 'out.vo'): #Given an astropy table t, write a VOTable in the IPAC preferred format. #This is a terrible kludge because it writes to a temporary file just to manipulate # the VOTable header. Find a better way. ncols = len(t.columns) ...
{"/bestcoord.py": ["/write_IPAC_VOTable.py"], "/getWISE.py": ["/bestcoord.py"]}
80,519
alairock/cron-weasley
refs/heads/master
/tests/test_jobs/test1.py
from cronweasley.cronweasley import run_at @run_at('* * * * *') async def a_job(pool=None, **kwargs): return 'job a' @run_at('* * * * *') async def b_job(**kwargs): return 33 async def do_stuff(): return True
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,520
alairock/cron-weasley
refs/heads/master
/examples/run_job/run.py
from cronweasley.cronweasley import run_jobs import asyncio async def run(): r = await run_jobs(files=[ 'tests.test_jobs.test1', 'tests.test_jobs.test2', 'tests.test_jobs.test3' ]) print(r) loop = asyncio.get_event_loop() loop.run_until_complete(run())
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,521
alairock/cron-weasley
refs/heads/master
/cronweasley/cronweasley.py
import asyncio import logging from collections import namedtuple from datetime import datetime import time from functools import wraps import pkgutil from importlib import import_module from timeit import default_timer as timer import os import inspect logging.getLogger(__name__).addHandler(logging.NullHandler()) LOG...
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,522
alairock/cron-weasley
refs/heads/master
/tests/unit/test_example.py
import asyncio from cronweasley.cronweasley import run_jobs, run as cron_run from tests import * class TestExample(unittest.TestCase): def test_run_jobs_from_files(self): loop = asyncio.get_event_loop() async def run(): r = await run_jobs(path='tests/test_jobs') assert r ...
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,523
alairock/cron-weasley
refs/heads/master
/examples/run_forever/run.py
from cronweasley.cronweasley import Cron app = Cron() app.run(files=[ 'tests.test_jobs.test1', # 'tests.test_jobs.test2', # 'tests.test_jobs.test3' ])
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,524
alairock/cron-weasley
refs/heads/master
/setup.py
from setuptools import setup, find_packages setup( name='cronweasley', version='1.4.10', description='Cronjobs for Wizards', url='http://github.com/alairock/cron-weasley', author='alairock', author_email='sblnog@gmail.com', classifiers=[ 'Development Status :: 4 - Beta', 'I...
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,525
alairock/cron-weasley
refs/heads/master
/tests/test_jobs/test3.py
async def d_job(): return 'job d'
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,526
alairock/cron-weasley
refs/heads/master
/tests/test_jobs/test4.py
from cronweasley.cronweasley import run_at @run_at('15/3 * * * *') async def fraction_job(): return 'job fraction' @run_at('52,54,56,58 * * * *') async def comma_job(): return 'job comma' @run_at('18-23 * * * *') async def dash_job(): return 'job dash' @run_at('11 */1 * * *') async def fraction2_job...
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,527
alairock/cron-weasley
refs/heads/master
/examples/run_forever/run_path.py
from cronweasley.cronweasley import Cron app = Cron() app.run(path='../../tests/test_jobs')
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,528
alairock/cron-weasley
refs/heads/master
/tests/test_jobs/test2.py
from cronweasley.cronweasley import run_at @run_at('* * * * *') async def c_job(): return 'job c'
{"/tests/test_jobs/test1.py": ["/cronweasley/cronweasley.py"], "/examples/run_job/run.py": ["/cronweasley/cronweasley.py"], "/tests/unit/test_example.py": ["/cronweasley/cronweasley.py"], "/examples/run_forever/run.py": ["/cronweasley/cronweasley.py"], "/tests/test_jobs/test4.py": ["/cronweasley/cronweasley.py"], "/exa...
80,532
typemaster007/postmedia
refs/heads/master
/app.py
import sys import re filename = sys.argv[-1] #Allow argument in standard input terminal def clean_words(words): return (' '.join(re.sub("[^a-zA-Z0-9]+"," ",words).split())) #Regex that removes wild and special characters def word_occurenc...
{"/tests.py": ["/app.py"]}
80,533
typemaster007/postmedia
refs/heads/master
/tests.py
import unittest from app import word_occurence import tempfile, os tmp = tempfile.NamedTemporaryFile() def tempfilesetup(testdata): t = tempfile.NamedTemporaryFile(mode='w',dir="./",delete=False) t.write(testdata) t.close() os.chmod(t.name, 0o777) return t.name class TestSum(unittest.TestCase): ...
{"/tests.py": ["/app.py"]}
80,535
WangZesen/DD2421-Lab2
refs/heads/master
/kernel.py
import math def linear(x, y): v = 0 for i in range(len(x)): v = v + x[i] * y[i]; return (v + 1) def poly(x, y, p): v = 0 for i in range(len(x)): v = v + x[i] * y[i] return (v + 1) ** p def radial(x, y, sig): v = 0 for i in range(len(x)): v = v + (x[i] - y[i]) ** 2 return math.e ** (- v / 2 / sig ** 2...
{"/slack.py": ["/kernel.py"]}
80,536
WangZesen/DD2421-Lab2
refs/heads/master
/slack.py
import kernel from cvxopt.solvers import qp from cvxopt.base import matrix import random, pylab, math, numpy usedKernel = kernel.poly dimen = 2 def buildP(data): length = len(data) p = [[0 for col in range(length)] for row in range(length)] for i in range(length): for j in range(length): p[i][j] = data[i][-1...
{"/slack.py": ["/kernel.py"]}
80,558
amitmakashir/Classifying-Image-Orientation
refs/heads/master
/adaboost.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 30 01:51:19 2018 @author: rohit """ #discussed implementation with Raj Thakkar and Srinithish Kandagadla import numpy as np import os import math import pandas as pd import operator import pickle import time os.chdir(os.getcwd()) def generate_comb...
{"/orient.py": ["/adaboost.py", "/knn.py", "/forest.py", "/machinelearning.py"], "/knn.py": ["/machinelearning.py"], "/forest.py": ["/machinelearning.py"]}
80,559
amitmakashir/Classifying-Image-Orientation
refs/heads/master
/machinelearning.py
#!/usr/bin/env python3 import numpy as np import os import sys def file_load(filename,transform_flag=True): with open(os.getcwd()+"/"+filename) as trainFile: lines = [line.split() for line in trainFile] lines = np.array(lines) result_data = lines[:,1].astype(int) train_data = np.array(...
{"/orient.py": ["/adaboost.py", "/knn.py", "/forest.py", "/machinelearning.py"], "/knn.py": ["/machinelearning.py"], "/forest.py": ["/machinelearning.py"]}
80,560
amitmakashir/Classifying-Image-Orientation
refs/heads/master
/orient.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 7 21:32:45 2018 @author: rohit amit akshay """ ''' We have implemented the three algorithms in three separate files namely: 1:adaboost.py 2:knn.py 3.forest.py For file reading,writing and transforming operations we have used machinelear...
{"/orient.py": ["/adaboost.py", "/knn.py", "/forest.py", "/machinelearning.py"], "/knn.py": ["/machinelearning.py"], "/forest.py": ["/machinelearning.py"]}
80,561
amitmakashir/Classifying-Image-Orientation
refs/heads/master
/knn.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 30 14:59:41 2018 @author: Rathi """ import numpy as np import operator import time import os os.chdir(os.getcwd()) #Knn reads input files from machinelearning.py from machinelearning import file_load #labels_train = Labels of 36976 training imag...
{"/orient.py": ["/adaboost.py", "/knn.py", "/forest.py", "/machinelearning.py"], "/knn.py": ["/machinelearning.py"], "/forest.py": ["/machinelearning.py"]}
80,562
amitmakashir/Classifying-Image-Orientation
refs/heads/master
/forest.py
#!/usr/bin/env python3 ''' https://machinelearningmastery.com/implement-random-forest-scratch-python/ https://github.com/random-forests/tutorials/blob/master/decision_tree.ipynb As the name suggests, a Random forest is a collection of Decision trees. It is bagging approach where multiple Decision trees are constructe...
{"/orient.py": ["/adaboost.py", "/knn.py", "/forest.py", "/machinelearning.py"], "/knn.py": ["/machinelearning.py"], "/forest.py": ["/machinelearning.py"]}
80,565
kochergakv21/Lab1
refs/heads/master
/unit_tests/test_plalistCreator.py
from unittest import TestCase from playlistcreator import PlaylistCreator __author__ = 'kn1m' class TestPlaylistCreator(TestCase): def test_get_urls_from_xml(self): s = PlaylistCreator('test.xml', 'res.xml', 0, 'Test') self.assertEqual(s.get_urls_from_xml(), ['http://itc.ua']) def test_get_t...
{"/unit_tests/test_plalistCreator.py": ["/playlistcreator.py"]}
80,566
kochergakv21/Lab1
refs/heads/master
/core.py
from playlistcreator import PlaylistCreator import time def main(): conf_file = open('run.conf', "r") param = conf_file.readline() depth = conf_file.readline() genre = conf_file.readline() print 'Program mode: ', param, 'Depth: ', depth, 'Genre: ', genre scrappy = PlaylistCreator(input_path...
{"/unit_tests/test_plalistCreator.py": ["/playlistcreator.py"]}
80,567
kochergakv21/Lab1
refs/heads/master
/playlistcreator.py
import xml.etree.ElementTree as ET from urllib2 import urlopen, URLError, HTTPError, Request from lxml import etree, html from xml.dom import minidom import re import gevent from mutagen.easyid3 import EasyID3 import os import unicodedata from gevent import monkey class PlaylistCreator(object): def __init__(sel...
{"/unit_tests/test_plalistCreator.py": ["/playlistcreator.py"]}
80,568
kochergakv21/Lab1
refs/heads/master
/unit_tests/__init__.py
__author__ = 'm3sc4'
{"/unit_tests/test_plalistCreator.py": ["/playlistcreator.py"]}
80,640
LekhanaPanchayatula/carnot
refs/heads/main
/carnottech/migrations/0001_initial.py
# Generated by Django 3.2 on 2021-05-23 03:45 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Books', fields=[ ('id', models.BigAutoField(a...
{"/carnottech/admin.py": ["/carnottech/models.py"], "/carnottech/views.py": ["/carnottech/models.py"]}
80,641
LekhanaPanchayatula/carnot
refs/heads/main
/carnottech/apps.py
from django.apps import AppConfig class CarnottechConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'carnottech'
{"/carnottech/admin.py": ["/carnottech/models.py"], "/carnottech/views.py": ["/carnottech/models.py"]}
80,642
LekhanaPanchayatula/carnot
refs/heads/main
/carnottech/admin.py
from django.contrib import admin from . models import Students, Books, Schools # Register your models here. admin.site.register(Students) admin.site.register(Books) admin.site.register(Schools)
{"/carnottech/admin.py": ["/carnottech/models.py"], "/carnottech/views.py": ["/carnottech/models.py"]}
80,643
LekhanaPanchayatula/carnot
refs/heads/main
/carnottech/urls.py
from django.conf.urls import url from carnottech import views from django.urls import path urlpatterns=[ url(r'^$',views.home, name='home'), url(r'^fetch',views.fetch, name='fetch') ]
{"/carnottech/admin.py": ["/carnottech/models.py"], "/carnottech/views.py": ["/carnottech/models.py"]}
80,644
LekhanaPanchayatula/carnot
refs/heads/main
/carnottech/models.py
from django.db import models # Create your models here. class Students(models.Model): First_name=models.CharField(max_length=25) Last_name=models.CharField(max_length=25) Email=models.EmailField(max_length=60) Gender=models.CharField(max_length=10) School = models.CharField(max_length=50) Books...
{"/carnottech/admin.py": ["/carnottech/models.py"], "/carnottech/views.py": ["/carnottech/models.py"]}
80,645
LekhanaPanchayatula/carnot
refs/heads/main
/carnottech/views.py
from django.shortcuts import render from . models import Students,Schools,Books # Create your views here. def home(request): return render(request,'home.html') def student_details(request): #id=int(input("Enter an id:")) obj=Students.objects.get(id=1) obj2=Schools.objects.get(id=2) contex...
{"/carnottech/admin.py": ["/carnottech/models.py"], "/carnottech/views.py": ["/carnottech/models.py"]}
80,666
wycliff/blood-donor-finder
refs/heads/master
/blooddonor/myrest/migrations/0003_donor.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-04-18 08:33 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('myrest', '0002_book'), ] operations = [ migrations.CreateModel( ...
{"/blooddonor/myrest/admin.py": ["/blooddonor/myrest/models.py"]}
80,667
wycliff/blood-donor-finder
refs/heads/master
/blooddonor/myrest/migrations/0004_auto_20180529_2003.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-05-29 20:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('myrest', '0003_donor'), ] operations = [ migrations.AddField( mod...
{"/blooddonor/myrest/admin.py": ["/blooddonor/myrest/models.py"]}
80,668
wycliff/blood-donor-finder
refs/heads/master
/blooddonor/myrest/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import Blog, book, donor # Register your models here. admin.site.register(Blog) admin.site.register(book) admin.site.register(donor)
{"/blooddonor/myrest/admin.py": ["/blooddonor/myrest/models.py"]}
80,669
wycliff/blood-donor-finder
refs/heads/master
/blooddonor/myrest/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import ( AbstractBaseUser ) # Create your models here. class Blog(models.Model): title = models.CharField(max_length = 200) body = models.TextField(max_length = 200) def __unicode__(...
{"/blooddonor/myrest/admin.py": ["/blooddonor/myrest/models.py"]}
80,670
Toastyw/GIT-PRUEBA
refs/heads/master
/settings.py
# game options/settings TITLE = "Jumpy!" WIDTH = 1280 HEIGHT = 720 FPS = 60 GRAVITY = 0.8 #Player propertie section PLAYER_ACC = 1 PLAYER_FRICTION = -0 # define colors WHITE = (255, 255, 255) BLACK = (0, 0, 0) RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) YELLOW = (255, 255, 0)
{"/main.py": ["/settings.py", "/level.py", "/sprites.py"], "/sprites.py": ["/settings.py", "/attacking.py"], "/attacking.py": ["/settings.py", "/sprites.py"], "/level.py": ["/settings.py", "/sprites.py"]}
80,671
Toastyw/GIT-PRUEBA
refs/heads/master
/main.py
import pygame as pg import random from settings import * from level import * from sprites import * from pygame.locals import * class Game: def __init__(self): # initialize game window, etc pg.init() pg.mixer.init() self.screen = pg.display.set_mode((WIDTH, HEIGHT),pg.RESIZABLE) ...
{"/main.py": ["/settings.py", "/level.py", "/sprites.py"], "/sprites.py": ["/settings.py", "/attacking.py"], "/attacking.py": ["/settings.py", "/sprites.py"], "/level.py": ["/settings.py", "/sprites.py"]}
80,672
Toastyw/GIT-PRUEBA
refs/heads/master
/sprites.py
import pygame as pg from settings import * from attacking import * vec = pg.math.Vector2 class Player(pg.sprite.Sprite): def __init__(self,game): pg.sprite.Sprite.__init__(self) self.game = game """ self.image = pg.Surface((30,30)) self.image.fill(YELLOW)""" self.sheet = pg.image.load("Sprites\zerox3.gi...
{"/main.py": ["/settings.py", "/level.py", "/sprites.py"], "/sprites.py": ["/settings.py", "/attacking.py"], "/attacking.py": ["/settings.py", "/sprites.py"], "/level.py": ["/settings.py", "/sprites.py"]}
80,673
Toastyw/GIT-PRUEBA
refs/heads/master
/ejercicio.py
import pygame as pg pg.init() ventana = pg.display.set_mode((800,600)) pg.display.set_caption("test") image = pg.image.load("Sprites\zerox3.gif") def wdd(): x = 5 y = 7 z = 3 return x,y,z def get_image(sheet, x, y, xf, yf): width = xf - x height = yf - y image = pg.Surface([wi...
{"/main.py": ["/settings.py", "/level.py", "/sprites.py"], "/sprites.py": ["/settings.py", "/attacking.py"], "/attacking.py": ["/settings.py", "/sprites.py"], "/level.py": ["/settings.py", "/sprites.py"]}
80,674
Toastyw/GIT-PRUEBA
refs/heads/master
/attacking.py
import pygame as pg from settings import * from sprites import * import math class SaberAttack(pg.sprite.Sprite): def __init__(self,player): pg.sprite.Sprite.__init__(self) self.cooldown = 200 self.player = player self.inicio = pg.time.get_ticks() self.final = pg.time.get_ticks() + self.cooldown self.imag...
{"/main.py": ["/settings.py", "/level.py", "/sprites.py"], "/sprites.py": ["/settings.py", "/attacking.py"], "/attacking.py": ["/settings.py", "/sprites.py"], "/level.py": ["/settings.py", "/sprites.py"]}
80,675
Toastyw/GIT-PRUEBA
refs/heads/master
/levelEditor.py
# KidsCanCode - Game Development with Pygame video series # Jumpy! (a platform game) - Part 1 # Video link: https://www.youtube.com/watch?v=uWvb3QzA48c # Project setup import pygame as pg from settings import * from sprites import * import random class LevelEditor: def __init__(self): # initialize game ...
{"/main.py": ["/settings.py", "/level.py", "/sprites.py"], "/sprites.py": ["/settings.py", "/attacking.py"], "/attacking.py": ["/settings.py", "/sprites.py"], "/level.py": ["/settings.py", "/sprites.py"]}
80,676
Toastyw/GIT-PRUEBA
refs/heads/master
/level.py
import pygame as pg from settings import * from sprites import * class Level(pg.sprite.Sprite): def __init__(self,game): pg.sprite.Sprite.__init__(self) self.map = [] self.game = game self.x = 0 self.y = 0 self.text = "none" def map_design_1(self): self.map = [ "WWWWWWWWWWWWWWWW", "W W W ...
{"/main.py": ["/settings.py", "/level.py", "/sprites.py"], "/sprites.py": ["/settings.py", "/attacking.py"], "/attacking.py": ["/settings.py", "/sprites.py"], "/level.py": ["/settings.py", "/sprites.py"]}
80,683
rsiemens/incentives-app
refs/heads/master
/functional_tests/base.py
import sys import unittest from selenium import webdriver class FunctionalTest(unittest.TestCase): # TODO: Setup a test database and destroy @classmethod def setUpClass(cls): for arg in sys.argv: if 'liveserver' in arg: cls.server_url = 'http://' + arg.split('=')[1] ...
{"/app/users/decorators.py": ["/app/users/models.py"], "/shell.py": ["/app/users/models.py"], "/app/users/view.py": ["/app/users/mail.py", "/app/users/models.py", "/app/users/forms.py", "/app/users/decorators.py"], "/tests.py": ["/app/users/models.py"]}
80,684
rsiemens/incentives-app
refs/heads/master
/app/users/decorators.py
from functools import wraps from flask import g, redirect, url_for, request from app.users.models import User, Incentive def requires_login(f): @wraps(f) def decorated_function(*args, **kwargs): if g.user is None: return redirect(url_for('users.login', next=request.path)) return f...
{"/app/users/decorators.py": ["/app/users/models.py"], "/shell.py": ["/app/users/models.py"], "/app/users/view.py": ["/app/users/mail.py", "/app/users/models.py", "/app/users/forms.py", "/app/users/decorators.py"], "/tests.py": ["/app/users/models.py"]}
80,685
rsiemens/incentives-app
refs/heads/master
/app/users/forms.py
from re import search from flask.ext.wtf import Form, RecaptchaField from wtforms import TextField, PasswordField, DateField, SelectField, RadioField from wtforms.validators import Required, EqualTo, Email, Length, ValidationError # Custom validation def add_dollar(form, field): if field.data[0] != '$': ...
{"/app/users/decorators.py": ["/app/users/models.py"], "/shell.py": ["/app/users/models.py"], "/app/users/view.py": ["/app/users/mail.py", "/app/users/models.py", "/app/users/forms.py", "/app/users/decorators.py"], "/tests.py": ["/app/users/models.py"]}
80,686
rsiemens/incentives-app
refs/heads/master
/shell.py
#!/usr/bin/env python import os from app import db from app.users.models import User, Incentive """ db.create_all() """ os.environ['PYTHONINSPECT'] = 'True'
{"/app/users/decorators.py": ["/app/users/models.py"], "/shell.py": ["/app/users/models.py"], "/app/users/view.py": ["/app/users/mail.py", "/app/users/models.py", "/app/users/forms.py", "/app/users/decorators.py"], "/tests.py": ["/app/users/models.py"]}
80,687
rsiemens/incentives-app
refs/heads/master
/app/users/view.py
from flask import Blueprint, request, render_template, flash, g, session, redirect, url_for from werkzeug import check_password_hash, generate_password_hash from app import db, mail from app.users.security import ts from app.users.mail import msgr, reset_msg from app.users.models import User, Incentive from app.users....
{"/app/users/decorators.py": ["/app/users/models.py"], "/shell.py": ["/app/users/models.py"], "/app/users/view.py": ["/app/users/mail.py", "/app/users/models.py", "/app/users/forms.py", "/app/users/decorators.py"], "/tests.py": ["/app/users/models.py"]}
80,688
rsiemens/incentives-app
refs/heads/master
/app/users/models.py
import datetime from app import db from app.users import constants as USER class User(db.Model): __tablename__ = 'user' id = db.Column(db.Integer, primary_key=True) timestamp = db.Column(db.DateTime, default=datetime.datetime.utcnow()) name = db.Column(db.String(50), unique=True) email = db.Colum...
{"/app/users/decorators.py": ["/app/users/models.py"], "/shell.py": ["/app/users/models.py"], "/app/users/view.py": ["/app/users/mail.py", "/app/users/models.py", "/app/users/forms.py", "/app/users/decorators.py"], "/tests.py": ["/app/users/models.py"]}
80,689
rsiemens/incentives-app
refs/heads/master
/app/users/mail.py
from flask_mail import Message RECIP = 'admin@gmail.com' ADDRESS = 'http://localhost:5000' def msgr(user, incentives, sub='New Incentive Request', recip=[RECIP]): """ Send a new incentive email """ msg = Message(subject=sub, recipients=recip, reply_to=user.email) msg.body = """New Incent...
{"/app/users/decorators.py": ["/app/users/models.py"], "/shell.py": ["/app/users/models.py"], "/app/users/view.py": ["/app/users/mail.py", "/app/users/models.py", "/app/users/forms.py", "/app/users/decorators.py"], "/tests.py": ["/app/users/models.py"]}