text
stringlengths
0
1.05M
meta
dict
__author__ = 'cody' from webfront import failed_ip_login_attempt_counts, app def increment_failed_logins(ip): if ip not in failed_ip_login_attempt_counts: failed_ip_login_attempt_counts[ip] = 1 else: failed_ip_login_attempt_counts[ip] += 1 app.logger.warning("{} failed login count increased...
{ "repo_name": "codyharrington/todolist", "path": "webfront/controllers/__init__.py", "copies": "1", "size": "1296", "license": "mit", "hash": -5554895346370120000, "line_mean": 37.1176470588, "line_max": 110, "alpha_frac": 0.7021604938, "autogenerated": false, "ratio": 3.3402061855670104, "conf...
__author__ = 'cody' from webfront.models import LocalBase from utils.rest_api_utils import * class LocalUser(LocalBase): enabled = True def is_authenticated(self): # If a user isn't authenticated, we get None instead # so there is no point in implementing this return True def is_a...
{ "repo_name": "codyharrington/todolist", "path": "webfront/models/user.py", "copies": "1", "size": "2012", "license": "mit", "hash": -2502430996655593500, "line_mean": 29.9538461538, "line_max": 114, "alpha_frac": 0.62972167, "autogenerated": false, "ratio": 4.1570247933884295, "config_test": f...
__author__ = 'cody' import requests from ujson import dumps, loads from flask import Response, jsonify from utils.messages import * from utils.exceptions import * class HTTPStatusCodes(): OK = 200 CREATED = 201 # Used after a DELETE request NO_CONTENT = 204 BAD_REQUEST = 400 UNAUTHORISED = 401...
{ "repo_name": "codyharrington/todolist", "path": "utils/rest_api_utils.py", "copies": "1", "size": "3925", "license": "mit", "hash": -7917103601658134000, "line_mean": 36.7403846154, "line_max": 119, "alpha_frac": 0.6410191083, "autogenerated": false, "ratio": 3.9928789420142423, "config_test":...
__author__ = 'cody' class Config(): """Base configuration class. Any variable set here is loaded in all apps""" DEBUG = True SECRET_KEY = "1234" LOG_DIRECTORY = "/tmp" LOG_FORMAT_STRING = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" MAX_LOG_BYTES = 10000 class Webfront(Config): D...
{ "repo_name": "codyharrington/todolist", "path": "config.py", "copies": "1", "size": "1050", "license": "mit", "hash": 6090491391147341000, "line_mean": 27.3783783784, "line_max": 81, "alpha_frac": 0.6447619048, "autogenerated": false, "ratio": 3.2710280373831777, "config_test": false, "has_n...
__author__ = 'cody' from sqlalchemy.ext.declarative import declarative_base as real_declarative_base from sqlalchemy.orm import relationship from sqlalchemy import Column, Integer, String, DateTime, ForeignKey, Boolean from dbapi import app_bcrypt from bcrypt import gensalt from datetime import datetime # The below ...
{ "repo_name": "codyharrington/todolist", "path": "dbapi/models.py", "copies": "1", "size": "4037", "license": "mit", "hash": -4722335074975288000, "line_mean": 31.8211382114, "line_max": 96, "alpha_frac": 0.6239782016, "autogenerated": false, "ratio": 3.7764265668849393, "config_test": false, ...
__author__ = 'cody' from utils.exceptions import * from utils.rest_api_utils import * from utils.error_utils import * from dbapi import app from sqlalchemy.exc import SQLAlchemyError import traceback @app.errorhandler(ExpectedJSONObjectException) def not_json_object(e): app.logger.error("{}\n{}".format(EXPECTED_J...
{ "repo_name": "codyharrington/todolist", "path": "dbapi/controllers/error.py", "copies": "1", "size": "2699", "license": "mit", "hash": -6459529981478929000, "line_mean": 41.171875, "line_max": 103, "alpha_frac": 0.7469433123, "autogenerated": false, "ratio": 3.523498694516971, "config_test": f...
__author__ = 'cody' from webfront import app, login_manager, task_manager from flask import render_template, redirect, flash from flask_login import current_user, login_required from webfront.models.task import * from webfront.models.user import * from utils.request_utils import * @app.route("/task/add", methods=["GE...
{ "repo_name": "codyharrington/todolist", "path": "webfront/controllers/task.py", "copies": "1", "size": "2487", "license": "mit", "hash": -8481802618578898000, "line_mean": 29.7160493827, "line_max": 125, "alpha_frac": 0.6485725774, "autogenerated": false, "ratio": 3.49789029535865, "config_tes...
__author__ = 'cody' from webfront import app, user_manager from flask_login import login_required, current_user,logout_user from flask import render_template, redirect, flash from utils.request_utils import form_data from utils.messages import * @app.route("/user/delete", methods=["GET"]) @login_required def display_...
{ "repo_name": "codyharrington/todolist", "path": "webfront/controllers/user.py", "copies": "1", "size": "1846", "license": "mit", "hash": -8732467764394627000, "line_mean": 32.5636363636, "line_max": 81, "alpha_frac": 0.6684723727, "autogenerated": false, "ratio": 3.9528907922912206, "config_te...
__author__ = 'cody' from webfront.models import LocalBase from utils.rest_api_utils import * from datetime import datetime, timedelta class LocalTask(LocalBase): pass class TaskManager(RestClient): def __init__(self, api_url): super().__init__(api_url) def get_task(self, task_id): respo...
{ "repo_name": "codyharrington/todolist", "path": "webfront/models/task.py", "copies": "1", "size": "1719", "license": "mit", "hash": -6123239057925421000, "line_mean": 30.8333333333, "line_max": 109, "alpha_frac": 0.6212914485, "autogenerated": false, "ratio": 3.8542600896860986, "config_test":...
__author__ = 'cody' import flask from dbapi import app from flask import request from dbapi.models import * from utils.rest_api_utils import * from utils.exceptions import * @app.route("/user", methods=["GET"]) def get_all_users(): all_users = [user.todict() for user in flask.g.db_session.query(User).all()] r...
{ "repo_name": "codyharrington/todolist", "path": "dbapi/controllers/user.py", "copies": "1", "size": "2556", "license": "mit", "hash": 7565915119992506000, "line_mean": 37.1492537313, "line_max": 92, "alpha_frac": 0.6846635368, "autogenerated": false, "ratio": 3.574825174825175, "config_test": ...
__author__ = 'cody' import flask from flask import request from dbapi import app from dbapi.models import * from utils.rest_api_utils import * @app.route("/task/<id>", methods=["GET"]) def get_task(id): task = flask.g.db_session.query(Task).filter(Task.id == id).scalar() if task is None: raise NotFoun...
{ "repo_name": "codyharrington/todolist", "path": "dbapi/controllers/task.py", "copies": "1", "size": "2173", "license": "mit", "hash": 2448021208737021000, "line_mean": 32.953125, "line_max": 88, "alpha_frac": 0.6589967786, "autogenerated": false, "ratio": 3.317557251908397, "config_test": fals...
__author__ = 'coen' from multiprocessing import Pipe from logmultiprocessing import * from stoppablemultiprocessing import StoppableProcess def setuplogging(logfile, loglevel): assert(isinstance(logfile, str)) assert(isinstance(loglevel, int)) logqueue = Queue() message_conn, to_main = Pipe() lo...
{ "repo_name": "Bierkaai/python-mp-preprocessor-old", "path": "enhancedmp/enhancedprocessors.py", "copies": "1", "size": "1904", "license": "mit", "hash": 2023541924853280500, "line_mean": 30.75, "line_max": 68, "alpha_frac": 0.6491596639, "autogenerated": false, "ratio": 4.077087794432548, "con...
__author__ = 'coen' import mpfileprocessor from multiprocessing import JoinableQueue def info(m): print m mpfileprocessor.get_logger().info(m) def duplicate(line): return line + "COPY: " + line if __name__ == "__main__": mplogger = mpfileprocessor.configure_logger() mplogger.debug('TEST') ...
{ "repo_name": "Bierkaai/mp-preprocessor", "path": "test.py", "copies": "1", "size": "1524", "license": "mit", "hash": -3423242196821495000, "line_mean": 24.8305084746, "line_max": 73, "alpha_frac": 0.6725721785, "autogenerated": false, "ratio": 3.858227848101266, "config_test": false, "has_no...
__author__ = 'coen' import sys import time import random from enhancedprocessors import * from multiprocessing import Pipe from stoppablemultiprocessing import Message, STOP class RandomLogger(StoppableLoggingProcess): def __init__(self, logqueue, message_conn, name): super(RandomLogger, self).__init_...
{ "repo_name": "Bierkaai/python-mp-preprocessor-old", "path": "enhancedmp/toytest.py", "copies": "1", "size": "1249", "license": "mit", "hash": 1033512161229273700, "line_mean": 19.8166666667, "line_max": 80, "alpha_frac": 0.6293034428, "autogenerated": false, "ratio": 3.5282485875706215, "confi...
__author__ = 'coen' import time import datetime import sys from multiprocessing import Process, Queue from Queue import Empty, Full # TODO: more configuration options! FULLDEBUG = 5 DEBUG = 10 MOREINFO = 20 INFO = 30 WARNING = 40 ERROR = 50 CRITICAL = 60 DEFAULTLOGLEVEL = INFO LEVELDESCRIPTION = { 5: "FULLDEB...
{ "repo_name": "Bierkaai/python-mp-preprocessor-old", "path": "enhancedmp/logmultiprocessing.py", "copies": "1", "size": "6314", "license": "mit", "hash": 6059313738473167000, "line_mean": 26.5720524017, "line_max": 86, "alpha_frac": 0.5815647767, "autogenerated": false, "ratio": 4.140327868852459...
__author__ = 'cogbot' class GestureDoesNotExistError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class FacialExpressionDoesNotExistError(Exception): def __init__(self, value): self.value = value def __str__(self): ...
{ "repo_name": "jdddog/hri", "path": "hri_api/src/hri_api/util/errors.py", "copies": "1", "size": "2779", "license": "bsd-3-clause", "hash": 9134163381993687000, "line_mean": 35.5657894737, "line_max": 150, "alpha_frac": 0.635120547, "autogenerated": false, "ratio": 4.033381712626996, "config_te...
""" Author: Cole Howard Build additional training vectors, which are rotations, skews, and pans, of the orginal MNIST dataset """ import csv import numpy as np from random import randrange from skimage.transform import rotate # from matplotlib import pyplot as plt # from matplotlib import cm def spin_o_rama(vect...
{ "repo_name": "uglyboxer/finnegan", "path": "mnist_build.py", "copies": "1", "size": "1414", "license": "mit", "hash": 7763643622065803000, "line_mean": 22.1967213115, "line_max": 73, "alpha_frac": 0.6004243281, "autogenerated": false, "ratio": 3.1352549889135255, "config_test": false, "has_n...
"""Author: Cole Howard Email: uglyboxer@gmail.com neuron.py is a basic linear neuron, that can be used in a perceptron Information on that can be found at: https://en.wikipedia.org/wiki/Perceptron It was written as a class specifically for network () Usage: From any python script: from neuron import Neuron ...
{ "repo_name": "uglyboxer/linear_neuron", "path": "mini_net/neuron.py", "copies": "1", "size": "5088", "license": "mit", "hash": 9062364177142762000, "line_mean": 26.8032786885, "line_max": 79, "alpha_frac": 0.5636792453, "autogenerated": false, "ratio": 4.676470588235294, "config_test": false, ...
""" Author: Cole Howard Title: Finnegan An extinsible neural net designed to explore Convolutional Neural Networks and Recurrent Neural Networks via extensive visualizations. """ import numpy as np from sklearn.preprocessing import normalize from layer import Layer # from matplotlib import cm # from matplotlib impo...
{ "repo_name": "uglyboxer/finnegan", "path": "finnegan/network.py", "copies": "1", "size": "7625", "license": "mit", "hash": 1441958661014855000, "line_mean": 31.0378151261, "line_max": 93, "alpha_frac": 0.5596065574, "autogenerated": false, "ratio": 4.342255125284738, "config_test": false, "h...
__author__ = 'colinc' import itertools from collections import defaultdict import pylev from django.db import transaction from django.db.models import get_models, Model from django.contrib.contenttypes.generic import GenericForeignKey from django.core.management.base import BaseCommand from teams.models import Team ...
{ "repo_name": "ColCarroll/bugbug", "path": "libs/management/commands/duplicates.py", "copies": "1", "size": "8707", "license": "mit", "hash": -762908043209372800, "line_mean": 32.2328244275, "line_max": 93, "alpha_frac": 0.6296083611, "autogenerated": false, "ratio": 3.803844473569244, "config_...
__version__ = 1.0 import smtplib, os from email.MIMEMultipart import MIMEMultipart from email.mime.application import MIMEApplication from email.MIMEText import MIMEText from email.Utils import COMMASPACE, formatdate from email import Encoders import time import config def send_mail(send_from, send_to, subject, text...
{ "repo_name": "cmgerber/Email_SMS", "path": "Email_SMS.py", "copies": "1", "size": "1781", "license": "mit", "hash": -1108613985671754900, "line_mean": 27.7258064516, "line_max": 97, "alpha_frac": 0.6580572712, "autogenerated": false, "ratio": 3.25, "config_test": false, "has_no_keywords": fa...
__author__ = 'colinwren' livingdoc_base = """ <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Living Documentation for {{ metadata.name }}</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/b...
{ "repo_name": "Gimpneek/behave", "path": "behave/reporter/livingdoc_templates.py", "copies": "1", "size": "32480", "license": "bsd-2-clause", "hash": -5952637886665612000, "line_mean": 49.125, "line_max": 425, "alpha_frac": 0.3308189655, "autogenerated": false, "ratio": 5.139240506329114, "conf...
"""Author, Colin Zeidler""" import copy from A2.Player import Human, Computer, h_diff_vs_opponent, h_max_my_stacks, h_minimize_opponent class Game(object): def __init__(self, p1=None, p2=None): # self.p1 = Human(self, "R") if p1 is None: self.p1 = Computer(self, "R", h_minimize_opponen...
{ "repo_name": "ColinZeidler/PythonAI", "path": "A2/Game.py", "copies": "1", "size": "10953", "license": "mit", "hash": -6990341026296672000, "line_mean": 33.5520504732, "line_max": 101, "alpha_frac": 0.4996804528, "autogenerated": false, "ratio": 3.658316633266533, "config_test": false, "has_...
"""Author, Colin Zeidler""" MAX_DEPTH = 3 class Player(object): def __init__(self, game, id): self.game = game self.id = id def get_move(self): """:returns: (source, dest) source and dest are tuples as (x, y, count) count is the number of pieces to move and is the same...
{ "repo_name": "ColinZeidler/PythonAI", "path": "A2/Player.py", "copies": "1", "size": "4932", "license": "mit", "hash": 3271216167426208000, "line_mean": 28.3571428571, "line_max": 86, "alpha_frac": 0.5231143552, "autogenerated": false, "ratio": 3.8865248226950353, "config_test": false, "has_...
__author__ = 'Collaboration' import numpy as np import os.path def calc_vel_update(positions, mass, dt): r_ik3 = np.power(np.sum((positions[0] - positions[1])**2), 1.5) updates = mass * (positions[1] - positions[0]) / r_ik3 return updates def simulate_step(bodies, dt, dt_output=None):...
{ "repo_name": "kostassabulis/nbody-workshop-2015", "path": "nbody/euler.py", "copies": "1", "size": "1081", "license": "mit", "hash": -5049375713432014000, "line_mean": 25.7692307692, "line_max": 96, "alpha_frac": 0.4708603145, "autogenerated": false, "ratio": 3.3261538461538462, "config_test":...
__author__ = 'College Persistence Team' from abstractpandasfeature import * class AbstractBoundedPandasFeature(AbstractPandasFeature): ''' This represents a feature that takes in an optional start value and end value on one of its index columns A temporal feature where you need to bound on a start time an...
{ "repo_name": "dssg/education-college-public", "path": "code/modeling/featurepipeline/abstractboundedpandasfeature.py", "copies": "1", "size": "1967", "license": "mit", "hash": 8031369162557921000, "line_mean": 35.4259259259, "line_max": 150, "alpha_frac": 0.6085409253, "autogenerated": false, "r...
__author__ = 'College Persistence Team' from abstractfeature import * class AbstractBoundedFeature(AbstractFeature): ''' This represents a feature that takes in an optional start value and end value on one of its index columns A temporal feature where you need to bound on a start time and an end ti...
{ "repo_name": "dssg/education-college-public", "path": "code/modeling/featurepipeline/abstractboundedfeature.py", "copies": "1", "size": "1997", "license": "mit", "hash": -6362277662006396000, "line_mean": 34.9814814815, "line_max": 150, "alpha_frac": 0.5873810716, "autogenerated": false, "ratio"...
__author__ = 'College Persistence Team' from abstractpipeline import * import pandas as pd import postprocessors as pp class AbstractFeature(AbstractPipelineConfig): ''' Abstract representation of an feature. Should be extended by classes representing individual features, not instantiated. '...
{ "repo_name": "dssg/education-college-public", "path": "code/modeling/featurepipeline/abstractfeature.py", "copies": "1", "size": "3111", "license": "mit", "hash": 8248977813223213000, "line_mean": 31.4731182796, "line_max": 101, "alpha_frac": 0.62487946, "autogenerated": false, "ratio": 4.425320...
__author__ = 'Collin Day and Joe Kvedaras' import random # Example of how to implement an RPS player within the framework import Player import Message class CDJKPlayer(Player.Player): def __init__(self): # Call super class constructor Player.Player.__init__(self) self.reset() def pla...
{ "repo_name": "geebzter/game-framework", "path": "CDJKPlayer.py", "copies": "1", "size": "3670", "license": "apache-2.0", "hash": -6869283307057275000, "line_mean": 33.6226415094, "line_max": 119, "alpha_frac": 0.5950953678, "autogenerated": false, "ratio": 3.8389121338912133, "config_test": fa...
__author__ = "Collin Petty" __copyright__ = "Carnegie Mellon University" __license__ = "MIT" __maintainer__ = ["Collin Petty", "Peter Chapman"] __credits__ = ["David Brumely", "Collin Petty", "Peter Chapman"] __email__ = ["collin@cmu.edu", "peter@cmu.edu"] __status__ = "Production" import os from random import randint ...
{ "repo_name": "SabunMacTavish/CTF-Platform", "path": "api/autogenerators/xmlol.py", "copies": "2", "size": "1336", "license": "mit", "hash": 5807237390205766000, "line_mean": 34.1842105263, "line_max": 109, "alpha_frac": 0.6669161677, "autogenerated": false, "ratio": 3.452196382428941, "config_...
__author__ = 'Collin Petty' import os from random import randint from operator import add import tempfile template_file = "xmlol.xml" templates = "autogenerators/templates/" def validate_dependencies(): print "DEPENDENCY CHECK - xmnlol.py (autogen)" if not os.path.exists(_template_path()): print "ERR...
{ "repo_name": "picoCTF/2013-Problems", "path": "XMLOL/autogenerators/xmlol.py", "copies": "1", "size": "1081", "license": "mit", "hash": 535991577442048450, "line_mean": 32.8125, "line_max": 109, "alpha_frac": 0.6743755782, "autogenerated": false, "ratio": 3.7275862068965515, "config_test": fal...
__author__ = 'Collin Petty' import os import random import hashlib dict_file = "/usr/share/dict/words" def validate_dependencies(): print "DEPENDENCY CHECK - trythemall.py (autogen)" if not os.path.exists(dict_file): #utilities.send_email_to_list(common.admin_emails, "Autogenerator Validation Error",...
{ "repo_name": "picoCTF/2013-Problems", "path": "Try Them All/autogenerators/trythemall.py", "copies": "1", "size": "1702", "license": "mit", "hash": 8956535190071611000, "line_mean": 41.575, "line_max": 118, "alpha_frac": 0.651586369, "autogenerated": false, "ratio": 3.765486725663717, "config_...
__author__ = 'Collin Petty' import tempfile import os import random import string template_file = "readthemanual.txt" templates = "autogenerators/templates/" def validate_dependencies(): print "DEPENDENCY CHECK - readthemanual.py (autogen)" if not os.path.exists(_template_path()): print "ERROR - Read...
{ "repo_name": "picoCTF/2013-Problems", "path": "Read the Manual/autogenerators/readthemanual.py", "copies": "1", "size": "1706", "license": "mit", "hash": 1919156609305995300, "line_mean": 33.8367346939, "line_max": 119, "alpha_frac": 0.6078546307, "autogenerated": false, "ratio": 3.3916500994035...
__author__ = 'Collin Petty' import tempfile import os def validate_dependencies(): """Validate external dependencies. This function does NOT have to exist. If it does exist the runtime will call and execute it during api initialization. The purpose of this function is to verify that external dependencies...
{ "repo_name": "picoCTF/picoCTF-Platform-1", "path": "api/autogenerators/TEMPLATE.py", "copies": "2", "size": "3811", "license": "mit", "hash": 8468881763839642000, "line_mean": 63.593220339, "line_max": 118, "alpha_frac": 0.7360272894, "autogenerated": false, "ratio": 4.531510107015458, "config...
__author__ = 'Collin Petty' import os import random import string import tempfile import zipfile from subprocess import call javac_path = "/usr/bin/javac" template_file = "bytecode.Authenticator.java" templates = "autogenerators/templates/" def validate_dependencies(): print "DEPENDENCY CHECK - bytecode.py (aut...
{ "repo_name": "picoCTF/2013-Problems", "path": "Byte Code/autogenerators/bytecode.py", "copies": "1", "size": "2289", "license": "mit", "hash": -8037058322768403000, "line_mean": 39.1754385965, "line_max": 119, "alpha_frac": 0.6697247706, "autogenerated": false, "ratio": 3.5215384615384617, "co...
__author__ = ["Collin Petty", "Peter Chapman"] __copyright__ = "Carnegie Mellon University" __license__ = "MIT" __maintainer__ = ["Collin Petty", "Peter Chapman"] __credits__ = ["David Brumely", "Collin Petty", "Peter Chapman", "Tyler Nighswander", "Garrett Barboza"] __email__ = ["collin@cmu.edu", "peter@cmu.edu"] __st...
{ "repo_name": "SabunMacTavish/CTF-Platform", "path": "api/auth.py", "copies": "2", "size": "3581", "license": "mit", "hash": -8293207273355245000, "line_mean": 42.6829268293, "line_max": 118, "alpha_frac": 0.6392069254, "autogenerated": false, "ratio": 3.650356778797146, "config_test": false, ...
import csv import plotly.plotly as py from plotly.graph_objs import * from collections import defaultdict #Contains Tweet Data, accesed by (...).value class Tweet: def __init__(self, data): self.time, self.tweetid, self.text, self.rt, \ self.geo, self.placetag, self.favs, self.usr, \ self....
{ "repo_name": "mecolmg/OscarTweets", "path": "files/Tweeter.py", "copies": "1", "size": "5427", "license": "apache-2.0", "hash": 4287709996741110300, "line_mean": 31.497005988, "line_max": 149, "alpha_frac": 0.5621890547, "autogenerated": false, "ratio": 3.273220747889023, "config_test": false,...
__author__ = 'col-n' import timeit, random ''' A python implementation of RSA (https://en.wikipedia.org/wiki/RSA_%28cryptosystem%29). Finds random prime numbers of specified length (up to 32 bits). Demonstrates why larger numbers are better by factoring the resulting private key from the computed public key, using a ve...
{ "repo_name": "col-n/col-n", "path": "rsa_python_col-n.py", "copies": "1", "size": "14974", "license": "apache-2.0", "hash": 6973465575216016000, "line_mean": 35.1690821256, "line_max": 149, "alpha_frac": 0.6270869507, "autogenerated": false, "ratio": 2.6825510569688285, "config_test": true, ...
# import required dependencies from bs4 import BeautifulSoup import requests import docx from datetime import date from operator import itemgetter, attrgetter, methodcaller from Review import Review import sys reviewNum = input("How many reviews would you like?\nEnter a number from 0 to 25: \n") # Open up TrustRadiu...
{ "repo_name": "pizdetz/trustradiusCrawler", "path": "index.py", "copies": "1", "size": "5293", "license": "mit", "hash": 5816659876774853000, "line_mean": 34.5234899329, "line_max": 150, "alpha_frac": 0.6894010958, "autogenerated": false, "ratio": 3.716994382022472, "config_test": false, "has...
__author__ = 'commissar' import json import time from alimq.http import util import logging import traceback import requests import arrow log = logging.getLogger("alimq") log.setLevel(logging.INFO) """ 消费者 """ class HttpConsumer(object): def __init__(self,topic, consumer,access_key, access_secret,url='http://p...
{ "repo_name": "commissar/aliyun_mq", "path": "alimq/http/consumer.py", "copies": "1", "size": "4873", "license": "mit", "hash": -5048887400564776000, "line_mean": 24.6538461538, "line_max": 140, "alpha_frac": 0.5127436282, "autogenerated": false, "ratio": 3.4432153392330385, "config_test": fals...
import MySQLdb from database.DBHelper import DBHelper from database.DBConnectManager import DBConnectManager from resourcefactories.AnalysisInitDefaultValue import AnalysisInitDefaultValue db_helper = DBHelper() class DataUtils: def __init__(self): print "init DataUtils" def get_ActivitiesFromDB(se...
{ "repo_name": "congthuc/androguard-2.0-custom", "path": "database/DataUtils.py", "copies": "1", "size": "4034", "license": "apache-2.0", "hash": 5702623493998318000, "line_mean": 38.1747572816, "line_max": 176, "alpha_frac": 0.5654437283, "autogenerated": false, "ratio": 4.589306029579067, "con...
import MySQLdb from database.DBHelper import DBHelper from database.DBConnectManager import DBConnectManager from database.DataUtils import DataUtils from resourcefactories.AnalysisInitDefaultValue import AnalysisInitDefaultValue db_helper = DBHelper() dataUtils = DataUtils() class FileUltils: def __init__(self)...
{ "repo_name": "congthuc/androguard-2.0-custom", "path": "fileUtils/FileUtils.py", "copies": "1", "size": "4383", "license": "apache-2.0", "hash": -3464572991835412000, "line_mean": 53.1234567901, "line_max": 133, "alpha_frac": 0.5660506502, "autogenerated": false, "ratio": 3.752568493150685, "c...
__author__ = 'congthuc' class TablesFactory(object): ''' Define Tables for saving app analysis result data ''' def __init__(self): self.tables = dict() self.tables['01.APP_INFO'] = ( "CREATE TABLE IF NOT EXISTS `APP_INFO` (" " `id` int(11) NOT NULL AUTO_INCR...
{ "repo_name": "congthuc/androguard-2.0-custom", "path": "resourcefactories/TablesFactory.py", "copies": "1", "size": "6588", "license": "apache-2.0", "hash": 4257293397041635000, "line_mean": 39.6666666667, "line_max": 85, "alpha_frac": 0.4998482089, "autogenerated": false, "ratio": 3.5136, "co...
__author__ = 'connor' # first of all import the socket library import socket from protos import deck_pb2, hero_pb2, card_pb2, player_model_pb2, weapon_pb2, minion_pb2, update_pb2, board_model_pb2 # next create a socket object s = socket.socket() print "Socket successfully created" # reserve a port on your computer in ...
{ "repo_name": "cmm863/HearthAttack", "path": "server.py", "copies": "1", "size": "1150", "license": "mit", "hash": 5590933145123294000, "line_mean": 27.775, "line_max": 118, "alpha_frac": 0.7234782609, "autogenerated": false, "ratio": 3.44311377245509, "config_test": false, "has_no_keywords":...
__author__ = 'connor' from protos import deck_pb2, hero_pb2, card_pb2, player_model_pb2, weapon_pb2, minion_pb2, update_pb2, board_model_pb2 import json from helpers import * import socket expansion_sets = [ "Basic", "Blackrock Mountain", "Classic", "Curse of Naxxramas", "Goblins vs Gnomes", "T...
{ "repo_name": "cmm863/HearthAttack", "path": "handler.py", "copies": "1", "size": "18229", "license": "mit", "hash": 2709114361891275000, "line_mean": 37.0584551148, "line_max": 118, "alpha_frac": 0.4487903889, "autogenerated": false, "ratio": 3.610417904535552, "config_test": false, "has_no_...
__author__ = 'connor' from subprocess import call import os import gnupg import hashlib import pickle from identity.Identity import * from node.Node import OBNode ## # If program does not exist as a callable on the OS, return None # def which(program): def is_exe(fpath): return os.path.isfile(fpath) and os...
{ "repo_name": "cgsheeh/SFWR3XA3_Redevelopment", "path": "src/InitializationMod.py", "copies": "1", "size": "2744", "license": "mit", "hash": 7444027856174805000, "line_mean": 29.4888888889, "line_max": 125, "alpha_frac": 0.5754373178, "autogenerated": false, "ratio": 3.7384196185286105, "config...
__author__ = 'Connor' __author__ = 'Alex' import webbrowser import subprocess from tkinter import * #Importing Tkinter package class spiderGUI: def __init__(self, master): url = "http://localhost:5000" #WebUI Local Host Address url2 = "http://pyspider.readthedocs.org/en/master/tutorial...
{ "repo_name": "ConnorDFlynn/Group1PySpider", "path": "spiderGUI.py", "copies": "1", "size": "1979", "license": "apache-2.0", "hash": -1685443280024740000, "line_mean": 40.1489361702, "line_max": 138, "alpha_frac": 0.6250631632, "autogenerated": false, "ratio": 4.228632478632479, "config_test": ...
import os import subprocess import random import time def main(): while True: set_background_to_random_picture("/Users/cokelly/Google_Drive/Google Photos/Sorted Photos") time.sleep(2) def set_background_to_random_picture(searchDirectroy): # Get a directory of mainly photos pictureDirec...
{ "repo_name": "c-okelly/small_jobs", "path": "background_changer.py", "copies": "1", "size": "3598", "license": "mit", "hash": 8009602477727489000, "line_mean": 29.2352941176, "line_max": 167, "alpha_frac": 0.689827682, "autogenerated": false, "ratio": 3.74012474012474, "config_test": false, ...
import os class DirectoryWalker: def fileList(self,target,extension=""): directores = [] files = [] otherFiles = [] currentDirectoryContents = os.listdir(target) for item in currentDirectoryContents: if (item[0]== "."): pass el...
{ "repo_name": "c-okelly/small_jobs", "path": "directory_lister.py", "copies": "1", "size": "1191", "license": "mit", "hash": -7051181514750045000, "line_mean": 23.306122449, "line_max": 78, "alpha_frac": 0.5465994962, "autogenerated": false, "ratio": 4.299638989169675, "config_test": false, "...
""" This file will contain all the functions that are required to fetch the extra data stored on external websites. """ import json import re import urllib.request as request from info_requests.meta_critic_web_scraper import retieve_person_score # Will also have all data required from rotton tomamtoes # The imdb d...
{ "repo_name": "c-okelly/movie_script_analytics", "path": "info_requests/information_apis.py", "copies": "1", "size": "5789", "license": "mit", "hash": -935794344571036000, "line_mean": 34.2987804878, "line_max": 140, "alpha_frac": 0.5030229746, "autogenerated": false, "ratio": 4.014563106796117, ...
""" This file will contain the script object. It will take the input of a string object and the name of the script. Each object will the run functions of the script to generate data from it. This results can then be called by attributes to be put into a csv document """ from text_objects import Speech,Scene_change,Di...
{ "repo_name": "c-okelly/movie_script_analytics", "path": "objects/script_object.py", "copies": "1", "size": "42380", "license": "mit", "hash": 6595503693308392000, "line_mean": 41.0854021847, "line_max": 185, "alpha_frac": 0.5920245399, "autogenerated": false, "ratio": 3.953358208955224, "confi...
""" This package will attempted to take the name of a director from the IMDB api. This will the return the average career score of that director. """ from bs4 import BeautifulSoup import urllib.request as request import urllib import re import unicodedata class MetaCriticRequestFailed(Exception): def __init__(s...
{ "repo_name": "c-okelly/movie_script_analytics", "path": "info_requests/meta_critic_web_scraper.py", "copies": "1", "size": "2250", "license": "mit", "hash": -3513287055765272600, "line_mean": 28.2207792208, "line_max": 143, "alpha_frac": 0.6322810138, "autogenerated": false, "ratio": 3.680851063...
""" This package will create have a main function that takes the argument of an imdb code and a character dict It will match the character in the movie to an actor using imdb. Then add gender and meta critic rating of actor This will then read in a csv file containing data for characters There are two main varialbes...
{ "repo_name": "c-okelly/movie_script_analytics", "path": "info_requests/extra_character_info_for_movie_dict.py", "copies": "1", "size": "12268", "license": "mit", "hash": -664205220848119900, "line_mean": 41.0136986301, "line_max": 506, "alpha_frac": 0.6226768829, "autogenerated": false, "ratio":...
from bs4 import BeautifulSoup import os import sys def clean_html_and_save_to_file(file_directory,file_name,save_directory): try: #File location file_path = file_directory + file_name # Open file and turn into beautiful soup object with open(file_path, "r",encoding="utf-8",errors="...
{ "repo_name": "c-okelly/movie_script_analytics", "path": "Data_phraser.py", "copies": "1", "size": "2398", "license": "mit", "hash": -2816304925529633000, "line_mean": 34.8059701493, "line_max": 98, "alpha_frac": 0.6267723103, "autogenerated": false, "ratio": 3.6779141104294477, "config_test": ...
__author__="cooke" __date__ ="$02-Feb-2012 15:26:23$" import logging import os from subprocess import Popen import tempfile from experimentcontrol.core.InertiaTechnologySocketDriver import InertiaTechnologySocketDriver from sofiehdfformat.core.SofieFileUtils import importdata NETKEY = '\xB9\xA5\x21\xFB\xBD\x72\xC3\x45'...
{ "repo_name": "agcooke/ExperimentControl", "path": "experimentcontrol/core/InertiaTechnologyListener.py", "copies": "1", "size": "1962", "license": "bsd-3-clause", "hash": 7588407092035645000, "line_mean": 31.1803278689, "line_max": 103, "alpha_frac": 0.6345565749, "autogenerated": false, "ratio"...
__author__="cooke" __date__ ="$02-Feb-2012 15:26:23$" """ Initialize a basic broadcast slave channel for listening to an ANT+ Bicycle cadence and speed senser, using raw messages and event handlers. """ import logging import time from time import sleep from ant.core import driver from ant.core import event from ant....
{ "repo_name": "agcooke/ExperimentControl", "path": "experimentcontrol/core/AntPlusListener.py", "copies": "1", "size": "4660", "license": "bsd-3-clause", "hash": -1018453320749772500, "line_mean": 33.7835820896, "line_max": 83, "alpha_frac": 0.6030042918, "autogenerated": false, "ratio": 3.626459...
__author__ = 'cook' from sensor import * import RPIO as GPIO # sensor is a string with the file name for the sensor from modprobe # zones_dict has sensor as a key, the value is a list with a zone desciption string and the GPIO pin the zone is # connected to. class Zone: def __init__(self, sensor, zones_dict): ...
{ "repo_name": "darwyncook/thermostat", "path": "zones.py", "copies": "1", "size": "2234", "license": "mit", "hash": 765768136045542300, "line_mean": 33.3846153846, "line_max": 112, "alpha_frac": 0.5447627574, "autogenerated": false, "ratio": 3.6622950819672133, "config_test": false, "has_no_k...
__author__ = 'cook' import os import datetime class TemperatureReadError(ValueError): sensor = None class Temperature: def __init__(self, temp_sensor): # start_time should be the time in seconds os.system('modprobe w1-gpio') os.system('modprobe w1-therm') self.celcius = -90 ...
{ "repo_name": "darwyncook/thermostat", "path": "sensor.py", "copies": "1", "size": "2114", "license": "mit", "hash": -723725678291327000, "line_mean": 38.9056603774, "line_max": 100, "alpha_frac": 0.5520340587, "autogenerated": false, "ratio": 4.096899224806202, "config_test": false, "has_no_...
__author__ = 'coolspeed' # 3999 / 3999 test cases passed. # Status: Accepted # Runtime: 108 ms class Solution: # @param {integer} num # @return {string} def intToRoman(self, num): ret = "" dic = { 1: ('I', 'V'), 10: ('X', 'L'), 100: ('C', 'D'), ...
{ "repo_name": "coolspeed/leetcode", "path": "src/12_interger_to_roman.py", "copies": "1", "size": "1115", "license": "cc0-1.0", "hash": 9150950993990674000, "line_mean": 23.2391304348, "line_max": 48, "alpha_frac": 0.4322869955, "autogenerated": false, "ratio": 3.8054607508532423, "config_test"...
__author__ = 'coolspeed' # 3999 / 3999 test cases passed. # Status: Accepted # Runtime: 168 ms char_to_digit = { 'I': 1, 'V': 5, 'X': 1, 'L': 5, 'C': 1, 'D': 5, 'M': 1 } char_to_weight = { 'I': 1, 'V': 1, 'X': 10, 'L': 10, 'C': 100, 'D': 100, 'M': 1000 } dic ...
{ "repo_name": "coolspeed/leetcode", "path": "src/13_roman_to_integer.py", "copies": "1", "size": "1231", "license": "cc0-1.0", "hash": -6746029730335679000, "line_mean": 17.9384615385, "line_max": 72, "alpha_frac": 0.4346060114, "autogenerated": false, "ratio": 2.987864077669903, "config_test":...
__author__ = 'coolspeed' import bisect class Solution: recursion_depth = 0 # @param {integer[]} nums1 # @param {integer[]} nums2 # @return {float} def findMedianSortedArrays(self, nums1, nums2): print "recursion_depth =", self.recursion_depth print "nums1 =", str(nums1), "nums2 =...
{ "repo_name": "coolspeed/leetcode", "path": "src/04_median_of_two_sorted_arrays_myown.py", "copies": "1", "size": "2858", "license": "cc0-1.0", "hash": -1902099702517600800, "line_mean": 25.2201834862, "line_max": 86, "alpha_frac": 0.5150454864, "autogenerated": false, "ratio": 3.2737686139747995...
__author__ = 'corbinq27' from twython import Twython import json from main import CreateData from product_extractor import ProductExtractor from pyshorteners import Shortener import time import requests from s3_file_download import FileDownload from s3_file_upload import FileUpload tweeter_keys = {} def lambda_handl...
{ "repo_name": "corbinq27/priceTweeter", "path": "tweeter.py", "copies": "1", "size": "3188", "license": "mit", "hash": 4678440448300259000, "line_mean": 39.3544303797, "line_max": 120, "alpha_frac": 0.5526976161, "autogenerated": false, "ratio": 3.975062344139651, "config_test": false, "has_n...
__author__ = 'corbinq27' import json from time import gmtime, strftime from scrapely import Scraper class CreateData(): def __init__(self): pass def create_data(self): training_url = "http://www.wholesalegaming.biz/startrek/trekalphastarterbox/" data_training = {"product": "Star Tre...
{ "repo_name": "corbinq27/priceTweeter", "path": "main.py", "copies": "1", "size": "5940", "license": "mit", "hash": -345329366784635300, "line_mean": 42.0434782609, "line_max": 133, "alpha_frac": 0.497979798, "autogenerated": false, "ratio": 4.233784746970777, "config_test": false, "has_no_ke...
__author__ = 'corey' # -*- coding:utf-8 -*- import urllib import urllib2 import re,json from bs4 import BeautifulSoup import requests import MySQLdb def changekey(key): return key.strip().replace("'",'"') def hangkey(key): return key.replace("\n", "!") def get(url): try: request = urllib2.Request(u...
{ "repo_name": "liucode/liucode.github.io", "path": "bgtool/ques.py", "copies": "1", "size": "10989", "license": "mit", "hash": -2176716842617156000, "line_mean": 33.4482758621, "line_max": 370, "alpha_frac": 0.4875784876, "autogenerated": false, "ratio": 3.3009912886752777, "config_test": false...
__author__ = 'corey' # -*- coding:utf-8 -*- import urllib import urllib2 import re,json from bs4 import BeautifulSoup import requests import MySQLdb def get(url): try: request = urllib2.Request(url) request.add_header('Pragma', 'no-cache') response = urllib2.urlopen(request,timeout=20) ...
{ "repo_name": "liucode/liucode.github.io", "path": "bgtool/main1.0.py", "copies": "1", "size": "6422", "license": "mit", "hash": -2526746466690457000, "line_mean": 30.9502487562, "line_max": 172, "alpha_frac": 0.4962628465, "autogenerated": false, "ratio": 3.154223968565815, "config_test": fals...
__author__ = 'Corrosion X' __name__ = 'TimePlayed' __version__ = '0.2' import clr import sys clr.AddReferenceByPartialName("Pluton", "UnityEngine") import UnityEngine import Pluton from System import String import datetime class TimePlayed: def On_PluginInit(self): Commands.Register("timeonline")\ ...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "TimePlayed.py", "copies": "1", "size": "1516", "license": "mit", "hash": 1188755501984198700, "line_mean": 35.119047619, "line_max": 94, "alpha_frac": 0.6517150396, "autogenerated": false, "ratio": 3.877237851662404, "config_test": false, ...
__author__ = 'Corrosion X' __version__ = '0.1' __name__ = 'Item Modifier' import clr clr.AddReferenceByPartialName("Pluton") clr.AddReferenceByPartialName("Assembly-CSharp") import ItemDefinition import ItemManager import Pluton itemkey = ItemManager.FindItemDefinition class ItemModifier: global itemkey def...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "ItemModifier.py", "copies": "1", "size": "2232", "license": "mit", "hash": 2039769553417375700, "line_mean": 43.66, "line_max": 90, "alpha_frac": 0.6008064516, "autogenerated": false, "ratio": 3.8885017421602788, "config_test": false, "has...
__author__ = 'Corrosion X' __version__ = '0.1' __name__ = 'RollTheDice' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton import re from UnityEngine import Random class RollTheDice: def On_PluginInit(self): Commands...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "RollTheDice.py", "copies": "1", "size": "1570", "license": "mit", "hash": -5056107709594197000, "line_mean": 27.0535714286, "line_max": 80, "alpha_frac": 0.5681528662, "autogenerated": false, "ratio": 3.8199513381995134, "config_test": false...
__author__ = 'Corrosion X' __version__ = '0.5' __name__ = 'Permissions' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton class Permissions: def On_PluginInit(self): ##create perm. file if doesnt exist or load it if ...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "Permissions.py", "copies": "1", "size": "2771", "license": "mit", "hash": -5106910100603256000, "line_mean": 41, "line_max": 112, "alpha_frac": 0.5914832191, "autogenerated": false, "ratio": 4.350078492935636, "config_test": false, "has_no...
__author__ = 'Corrosion X' __version__ = '0.7' __name__ = 'NPCDifficulty' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton import re from UnityEngine import Random path = Util.GetPublicFolder() sys.path.append(path + "\\Plugins\\...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "NPCDifficulty.py", "copies": "1", "size": "3213", "license": "mit", "hash": 7906515700075293000, "line_mean": 34.3186813187, "line_max": 81, "alpha_frac": 0.6181139122, "autogenerated": false, "ratio": 3.651136363636364, "config_test": false...
__author__ = 'Corrosion X' __version__ = '0.9.1' __name__ = 'EasyEntitySpawner' # Special thanks to balu92, xEnt, and DreTaX import clr import sys clr.AddReferenceByPartialName("Pluton", "UnityEngine") import UnityEngine import Pluton from System import String class EasyEntitySpawner: teamrocket = ("bear", "wolf...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "EasyEntitySpawner.py", "copies": "1", "size": "4260", "license": "mit", "hash": -1342016915626115600, "line_mean": 35.1101694915, "line_max": 116, "alpha_frac": 0.5551643192, "autogenerated": false, "ratio": 4.15609756097561, "config_test": ...
__author__ = 'Corrosion X' __version__ = "1.0.3" # With major help from balu92 import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton class EasyRemove: def On_PluginInit(self): DataStore.Flush("Remove") def On_Buil...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "EasyRemove.py", "copies": "1", "size": "1589", "license": "mit", "hash": -2328133578984030000, "line_mean": 34.3333333333, "line_max": 87, "alpha_frac": 0.6224040277, "autogenerated": false, "ratio": 3.6953488372093024, "config_test": false,...
__author__ = 'Corrosion X' __version__ = '1.0' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton class EasySuicide: def On_PlayerConnected(self, p): p.MessageFrom("[EasySuicide]", "Use /die to suicide easily") de...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "EasySuicide.py", "copies": "1", "size": "1977", "license": "mit", "hash": 6184534686428939000, "line_mean": 42.9555555556, "line_max": 88, "alpha_frac": 0.5472938796, "autogenerated": false, "ratio": 3.899408284023669, "config_test": false, ...
__author__ = 'Corrosion X' __version__ = '1.0' __name__ = 'AdminDoor' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton class AdminDoor: def On_PluginInit(self): Commands.Register("admindoor")\ .setCallb...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "AdminDoor.py", "copies": "1", "size": "1196", "license": "mit", "hash": -6018196890046913000, "line_mean": 32.25, "line_max": 93, "alpha_frac": 0.6421404682, "autogenerated": false, "ratio": 3.369014084507042, "config_test": false, "has_no...
__author__ = 'Corrosion X' __version__ = '1.0' __name__ = 'AdminGive' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton import System from System import * class AdminGive: def On_PluginInit(self): Commands.Register("...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "AdminGive.py", "copies": "1", "size": "2567", "license": "mit", "hash": -468554558887883970, "line_mean": 32.3506493506, "line_max": 119, "alpha_frac": 0.5181145306, "autogenerated": false, "ratio": 4.147011308562197, "config_test": false, ...
__author__ = "Corrosion X" __version__ = '1.0' __name__ = 'EasyAttachEntities' # Massive thanks to DreTaX for getting custom function imported from c# working import clr clr.AddReferenceByPartialName("Pluton") clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Assembly-CSharp") import Pluton im...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "EasyAttachEntities.py", "copies": "1", "size": "4690", "license": "mit", "hash": 8528051863747175000, "line_mean": 39.7913043478, "line_max": 118, "alpha_frac": 0.6298507463, "autogenerated": false, "ratio": 3.7580128205128207, "config_test"...
__author__ = 'Corrosion X' __version__ = '1.0' __name__ = 'ReservedSlots' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton class ReservedSlots: def On_PluginInit(self): if not Plugin.IniExists("ReservedSlots"): ...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "ReservedSlots.py", "copies": "1", "size": "2165", "license": "mit", "hash": -3381094093480730000, "line_mean": 35.1, "line_max": 104, "alpha_frac": 0.5769053118, "autogenerated": false, "ratio": 3.9507299270072993, "config_test": false, "h...
__author__ = 'Corrosion X' __version__ = '1.0' __name__ = 'UsefulCommands' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton from UnityEngine import * class UsefulCommands: def On_PluginInit(self): DataStore.Flush("m...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "UsefulCommands.py", "copies": "1", "size": "1759", "license": "mit", "hash": 23550568992791870, "line_mean": 38.1111111111, "line_max": 80, "alpha_frac": 0.5679363275, "autogenerated": false, "ratio": 3.703157894736842, "config_test": false,...
__author__ = 'CorrosionX' __version__ = '1.3' __name__ = 'EasyAirdrops' import clr import sys clr.AddReferenceByPartialName("UnityEngine") clr.AddReferenceByPartialName("Pluton") import UnityEngine import Pluton from UnityEngine import Random class EasyAirdrops: def On_PluginInit(self): if not Plugin.IniE...
{ "repo_name": "stopspazzing/Pluton-Plugins", "path": "EasyAirdrops.py", "copies": "1", "size": "3875", "license": "mit", "hash": 6528173985921354000, "line_mean": 41.5934065934, "line_max": 106, "alpha_frac": 0.5772903226, "autogenerated": false, "ratio": 3.8177339901477834, "config_test": fals...
__author__ = "Cory J. Engdahl" __license__ = "MIT" __version__ = "1.0.0" __email__ = "cjengdahl@gmail.com" from enigma import enigma_machine from enigma import enigma_exception import configparser import click import os # instantiate config parser config = configparser.ConfigParser(interpolation=configparser. ...
{ "repo_name": "cjengdahl/Enigma", "path": "enigma_driver.py", "copies": "1", "size": "25252", "license": "mit", "hash": 6854467553003949000, "line_mean": 34.6666666667, "line_max": 152, "alpha_frac": 0.5922699192, "autogenerated": false, "ratio": 4.031933578157433, "config_test": true, "has_n...
import os import shutil import subprocess # The following env variables are expected: SLIDESHOW_PATH, FETCH_SLIDES_PATH, SLIDESHOW_WEB_PATH FETCH_SLIDES_PATH = os.environ['FETCH_SLIDES_PATH'] if 'FETCH_SLIDES_PATH' in os.environ.keys() else '/signpi-server/signage/bin/fetch_slides' SLIDESHOW_CONF_PATH = os.environ['S...
{ "repo_name": "canance/signpi-server", "path": "frontend/slideshow.py", "copies": "1", "size": "3199", "license": "apache-2.0", "hash": -6315238065761715000, "line_mean": 30.362745098, "line_max": 142, "alpha_frac": 0.6614567052, "autogenerated": false, "ratio": 3.0938104448742747, "config_test...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^cast/', views.cast, name='cast'), url(r'^change/', views.change, name='change'), url(r'^create_device/', views.create_device, name="create_device"), url(r'^create_device_group', view...
{ "repo_name": "canance/signpi-server", "path": "frontend/urls.py", "copies": "1", "size": "2134", "license": "apache-2.0", "hash": -1148038581439403400, "line_mean": 49.8095238095, "line_max": 97, "alpha_frac": 0.6841611996, "autogenerated": false, "ratio": 3.365930599369085, "config_test": fal...
from django.db import models class Stream(models.Model): name = models.CharField(max_length=255, blank=False) desc = models.TextField(blank=True) url = models.CharField(max_length=255, blank=False) def __str__(self): return self.name class Device(models.Model): name = models.CharField(...
{ "repo_name": "canance/signpi-server", "path": "backend/models.py", "copies": "1", "size": "1564", "license": "apache-2.0", "hash": 394157013646892500, "line_mean": 30.28, "line_max": 74, "alpha_frac": 0.6943734015, "autogenerated": false, "ratio": 3.8146341463414632, "config_test": false, "h...
from .models import Device, Stream from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse from django.core.urlresolvers import reverse import frontend.slideshow import json def configuration(request): if 'dev' not in request.GET: return HttpResponse('Invalid request!'...
{ "repo_name": "canance/signpi-server", "path": "backend/views.py", "copies": "1", "size": "2071", "license": "apache-2.0", "hash": 7745620872089226000, "line_mean": 32.4032258065, "line_max": 119, "alpha_frac": 0.6605504587, "autogenerated": false, "ratio": 4.23517382413088, "config_test": true...
""" Django settings for signpi project. Generated by 'django-admin startproject' using Django 1.9.1. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os #...
{ "repo_name": "canance/signpi-server", "path": "signpi/settings.py", "copies": "1", "size": "4015", "license": "apache-2.0", "hash": 5781065320943522000, "line_mean": 26.6896551724, "line_max": 91, "alpha_frac": 0.700871731, "autogenerated": false, "ratio": 3.5468197879858656, "config_test": fa...
"""signpi URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
{ "repo_name": "canance/signpi-server", "path": "signpi/urls.py", "copies": "1", "size": "1794", "license": "apache-2.0", "hash": 6164567334205483000, "line_mean": 38.8666666667, "line_max": 79, "alpha_frac": 0.7196209588, "autogenerated": false, "ratio": 3.683778234086242, "config_test": false,...
from django import forms from django.forms import ModelForm, Form from backend.models import Group, Device, Stream class GroupForm(ModelForm): class Meta: model = Group fields = '__all__' class DeviceForm(ModelForm): class Meta: model = Device fields = '__all__' excl...
{ "repo_name": "canance/signpi-server", "path": "frontend/forms.py", "copies": "1", "size": "1316", "license": "apache-2.0", "hash": -9091174682424937000, "line_mean": 28.2444444444, "line_max": 74, "alpha_frac": 0.7036474164, "autogenerated": false, "ratio": 3.97583081570997, "config_test": fal...
__author__ = 'cosmin' def solveCase2(l): if l == [0]: return [0] # do a count sort fr = [0 for i in range(0, 10)] for x in l: fr[x] += 1 for x in range(1, 10): if fr[x] != 0: first = x break fr[first] -= 1 ret = [] ret.append(first) for x in range(0, 10): for y in range (0, fr[x]): ret.app...
{ "repo_name": "rusucosmin/courses", "path": "ubb/fop/lab01/ex9-homework.py", "copies": "1", "size": "1598", "license": "mit", "hash": 502985565465434750, "line_mean": 19.4871794872, "line_max": 110, "alpha_frac": 0.6414267835, "autogenerated": false, "ratio": 2.823321554770318, "config_test": f...
__author__ = 'cosmin' from commands import * def displayStartMenu(): ''' Function to display the START MENU ''' print("Hello. Please insert a command. Type 'help' to show menu.") def clearWindow(): ''' Function to clear the terminal in Ubuntu ''' def displayCommands(): ''' Functi...
{ "repo_name": "rusucosmin/courses", "path": "ubb/fop/lab02-04/Bank Account Management/ui.py", "copies": "1", "size": "6814", "license": "mit", "hash": -4818161135754897000, "line_mean": 43.5424836601, "line_max": 288, "alpha_frac": 0.6306134429, "autogenerated": false, "ratio": 4.058368076235855,...
__author__ = 'cosmin' from exceptions import InvalidParameters, CommandError import datetime def representsInt(s): ''' Function to return True if the :param s can be converted to int :param s: the string that the user has given :rtype : boolean :return: True if string s is an integer ...
{ "repo_name": "rusucosmin/courses", "path": "ubb/fop/lab02-04/Bank Account Management/commands.py", "copies": "1", "size": "26488", "license": "mit", "hash": 4035444176271778300, "line_mean": 43.3701842546, "line_max": 176, "alpha_frac": 0.6668680157, "autogenerated": false, "ratio": 4.4205607476...
__author__ = 'cosmin' class Book: ''' Represents an entity Book, with the properties: -id - a uniquely determined id, random using uuid4() function -title - the title of the book -description - the description of the book -author - the name of the book's author ''' def ...
{ "repo_name": "rusucosmin/courses", "path": "ubb/fop/lab05-07/model/book.py", "copies": "1", "size": "2480", "license": "mit", "hash": -5645236747875453000, "line_mean": 26.2527472527, "line_max": 127, "alpha_frac": 0.5447580645, "autogenerated": false, "ratio": 4.389380530973451, "config_test"...
__author__ = 'cosmin' class Client: ''' Represents an entity for the clients who can rent books, which has the following properties: -cnp - an uniquely determined id -name - the name of the person (client) ''' def __init__(self, cnp, name): self._cnp = cnp self._name = ...
{ "repo_name": "rusucosmin/courses", "path": "ubb/fop/lab05-07/model/client.py", "copies": "1", "size": "1161", "license": "mit", "hash": -3302409646560259600, "line_mean": 23.1875, "line_max": 96, "alpha_frac": 0.5133505599, "autogenerated": false, "ratio": 3.962457337883959, "config_test": fal...
__author__ = 'cosmin' class Loan: ''' Entity to represent a loan, which is basically a pair of Client, Book. Every book can have only one Client at a given moment. Also, every Client can have one or more books rented. So the Loan has: - Renter (Client) - Rented Book ''' def __i...
{ "repo_name": "rusucosmin/courses", "path": "ubb/fop/lab05-07/model/loan.py", "copies": "1", "size": "1090", "license": "mit", "hash": -3060270501999997000, "line_mean": 27.7105263158, "line_max": 132, "alpha_frac": 0.5577981651, "autogenerated": false, "ratio": 4.128787878787879, "config_test"...
__author__ = 'cosmin' ''' Module to test all the functions from the module commands.py. The name of the test functions are according to the function they test. That is, if a function is called myFunction(), then the test function will be named testMyFunction() It also checks for raise Exception, edge cases and so on....
{ "repo_name": "rusucosmin/courses", "path": "ubb/fop/lab02-04/Bank Account Management/tests.py", "copies": "1", "size": "9969", "license": "mit", "hash": 5844026848824243000, "line_mean": 31.4755700326, "line_max": 240, "alpha_frac": 0.5886247367, "autogenerated": false, "ratio": 3.97488038277512...
__author__ = 'coty' from api_helper import parse_params import json from pymortgage.server.amortization_schedule import AmortizationSchedule class RESTServer: exposed = True # if you were to request /foo/bar?woo=hoo, vpath[0] would be bar, and params would be {'woo': 'hoo'}. def GET(self, *vpath, **para...
{ "repo_name": "csutherl/pymortgage", "path": "pymortgage/server/REST_Api.py", "copies": "1", "size": "2719", "license": "apache-2.0", "hash": 4034212091830186500, "line_mean": 40.8307692308, "line_max": 105, "alpha_frac": 0.478484737, "autogenerated": false, "ratio": 4.302215189873418, "config_...
__author__ = 'coty' from pymortgage.server.amortization_schedule import AmortizationSchedule from api_helper import parse_params from pymortgage.server.D3_schedule import D3Schedule import json class D3Server: exposed = True # if you were to request /foo/bar?woo=hoo, vpath[0] would be bar, and params would...
{ "repo_name": "csutherl/pymortgage", "path": "pymortgage/server/d3_api.py", "copies": "1", "size": "1411", "license": "apache-2.0", "hash": -7190046277351813000, "line_mean": 41.7575757576, "line_max": 118, "alpha_frac": 0.5506732814, "autogenerated": false, "ratio": 3.416464891041162, "config_...
__author__ = 'coty' # from pymortgage.server.amortization_schedule import AmortizationSchedule def parse_params(params): ''' Params: 'r' = rate 'P' = principal 'n' = term 't' = taxes 'i' = insurance 'af' = adjustment frequency (in years) 'ac' = adju...
{ "repo_name": "csutherl/pymortgage", "path": "pymortgage/server/api_helper.py", "copies": "1", "size": "2515", "license": "apache-2.0", "hash": 6605138625473885000, "line_mean": 30.45, "line_max": 119, "alpha_frac": 0.5638170974, "autogenerated": false, "ratio": 3.736998514115899, "config_test"...
__author__ = 'coty' from setuptools import setup, find_packages import pymortgage from setuptools.command.test import test as TestCommand import sys class Tox(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run...
{ "repo_name": "csutherl/pymortgage", "path": "setup.py", "copies": "1", "size": "1118", "license": "apache-2.0", "hash": 4719369140009643000, "line_mean": 26.95, "line_max": 69, "alpha_frac": 0.626118068, "autogenerated": false, "ratio": 3.461300309597523, "config_test": true, "has_no_keyword...
import os import os.path import subprocess import sys import shlex import socket import fnmatch import platform import errno import shutil import urllib.request import urllib.parse import urllib.error import json from functools import reduce import time base_direct_port = 12000 base_api_port = 9000 base_couch_port = 9...
{ "repo_name": "couchbase/ns_server", "path": "pylib/cluster_run_lib.py", "copies": "1", "size": "24900", "license": "apache-2.0", "hash": -526849018817724700, "line_mean": 36.1641791045, "line_max": 82, "alpha_frac": 0.5736144578, "autogenerated": false, "ratio": 3.4175130387043646, "config_tes...
__author__ = 'coxious' from constants import * global LandingPoint LandingPoint = [] def Strategy1(pos_vec,binary_map): pos = pos_vec[0] global LandingPoint if len(LandingPoint)== 0 : LandingPoint = GetLandingPoint(pos_vec,binary_map) print "Landing point" , LandingPoint #accelorator...
{ "repo_name": "Coxious/SpaceLanding", "path": "Strategy.py", "copies": "1", "size": "1237", "license": "apache-2.0", "hash": 1740916233421066500, "line_mean": 30.7179487179, "line_max": 77, "alpha_frac": 0.5731608731, "autogenerated": false, "ratio": 3.031862745098039, "config_test": false, "...