text
stringlengths
0
1.05M
meta
dict
__author__ = "Rahul Chatterjee (rahul@cs.cornell.edu)" """ Assuming there is a hashing function that takes a password and userid and returns true or false. """ # Replace this follwoing funtion with the adequete def call_auth_server(uid, pw): """This is basically the hook to a authentication server, it calls ...
{ "repo_name": "rchatterjee/mistypography", "path": "pwlogging/pwlogging.py", "copies": "1", "size": "5560", "license": "mit", "hash": -6504205172323242000, "line_mean": 36.0666666667, "line_max": 100, "alpha_frac": 0.5973021583, "autogenerated": false, "ratio": 3.921015514809591, "config_test":...
__author__ = "Rahul Chatterjee (rahul@cs.cornell.edu)" """ Process the logfile generated by pwlogging.py """ import os, sys, json, re from checker import BUILT_IN_CHECKERS from collections import defaultdict """ INFO:__main__: Received from address=('127.0.0.1', 35727), data={u'isValid': 0, u'password': u'qqwerty', ...
{ "repo_name": "rchatterjee/mistypography", "path": "pwlogging/process_log.py", "copies": "1", "size": "1785", "license": "mit", "hash": -3864125335328328700, "line_mean": 36.9787234043, "line_max": 191, "alpha_frac": 0.6257703081, "autogenerated": false, "ratio": 3.251366120218579, "config_test...
__author__ = 'rahul' """ A TestRunner for use with the Python unit testing framework. It generates a HTML report to show the result at a glance. The simplest way to use this is to invoke its main method. E.g. import unittest import HTMLTestRunner ... define your tests ... if __name__ == '__main__': ...
{ "repo_name": "18701016443/mayi", "path": "mayi/data/HTMLRunner.py", "copies": "1", "size": "24240", "license": "mit", "hash": 7512429658588472000, "line_mean": 30.0371318822, "line_max": 109, "alpha_frac": 0.533539604, "autogenerated": false, "ratio": 3.82093316519546, "config_test": true, "...
__author__ = 'rainawu' import sys from PyQt5.QtCore import * from PyQt5.QtWidgets import * from PyQt5.QtGui import * import os import numpy as np nmarkers_per = 6 class ImageMarker(QMainWindow): def __init__(self, imageList, parent=None): super(ImageMarker, self).__init__(parent) self.imageWidge...
{ "repo_name": "autosquid/picker", "path": "src/marker.py", "copies": "1", "size": "4474", "license": "apache-2.0", "hash": 2575493218707243500, "line_mean": 34.792, "line_max": 96, "alpha_frac": 0.5840411265, "autogenerated": false, "ratio": 3.8337617823479007, "config_test": false, "has_no_k...
__author__ = 'rainierababao' class Neo4jORM(object): """Models an object-relational mapping for the Neo4J graph database. """ class Graph(object): """Models a directed graph. Edges can have weights. To model an undirected graph, add an edge from vertex A to vertex B and another edge from vertex B ...
{ "repo_name": "rainiera/text-graph", "path": "src/Graph.py", "copies": "1", "size": "1762", "license": "unlicense", "hash": -8740644867442042000, "line_mean": 26.9682539683, "line_max": 79, "alpha_frac": 0.5993189557, "autogenerated": false, "ratio": 3.838779956427015, "config_test": false, "...
__author__ = 'rainierababao' """Does stuff with texts from XML files made by the Go SMS Pro text backup tool. Complete Sample XML File: --- ~params~ <GoSms> root (required) <SMS> t...
{ "repo_name": "rainiera/text-graph", "path": "src/texts.py", "copies": "1", "size": "16924", "license": "unlicense", "hash": -711291400475918700, "line_mean": 36.5254988914, "line_max": 154, "alpha_frac": 0.5915859135, "autogenerated": false, "ratio": 3.5287739783152627, "config_test": false, ...
import sqlite3 def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d class DAL: DB_FILE = 'allmyspace.db' FILE_MAPPINGS_TABLE = 'file_mappings' def __init__(self): self.connection = sqlite3.connect(self.DB_FILE, is...
{ "repo_name": "allmyspace/allmyspace-client", "path": "DAL.py", "copies": "1", "size": "3379", "license": "mit", "hash": -6872564373143990000, "line_mean": 41.25, "line_max": 157, "alpha_frac": 0.5785735425, "autogenerated": false, "ratio": 3.8397727272727273, "config_test": false, "has_no_ke...
__author__ = 'rajatv' from migrations import Migrations class QdsApp(object): @classmethod def setup_parsers(cls, sub_parser): cls.generate_parser = sub_parser.add_parser("generate", help="Generate a new migration") cls.generate_parser.add_ar...
{ "repo_name": "vrajat/python-migrations", "path": "qds_app/qds_app.py", "copies": "2", "size": "3727", "license": "apache-2.0", "hash": 7728802300035644000, "line_mean": 41.3522727273, "line_max": 119, "alpha_frac": 0.6088006439, "autogenerated": false, "ratio": 3.9691160809371673, "config_test...
__author__ = "Rajeesh Nair" __version__ = "0.2" __copyright__ = "Copyright (c) 2011 Rajeesh" __license__ = "BSD" from django.dispatch import Signal from django.db.models import signals from django.db.models.loading import get_model from django_monitor.util import ( create_moderate_perms, add_fields, save_handler,...
{ "repo_name": "rajeeshnair/Django-monitor", "path": "django_monitor/__init__.py", "copies": "1", "size": "1958", "license": "bsd-3-clause", "hash": 7669880004913451000, "line_mean": 30.0793650794, "line_max": 75, "alpha_frac": 0.6435137896, "autogenerated": false, "ratio": 3.63265306122449, "co...
__author__ = "Rajiv Mayani" import logging import uuid from decimal import Decimal from enum import Enum from flask.json import JSONEncoder from sqlalchemy import inspect from Pegasus.service.base import ErrorResponse, OrderedDict, PagedResponse log = logging.getLogger(__name__) class PegasusJsonEncoder(JSONEncod...
{ "repo_name": "pegasus-isi/pegasus", "path": "packages/pegasus-python/src/Pegasus/service/_encoder.py", "copies": "1", "size": "1941", "license": "apache-2.0", "hash": 2266907610315491300, "line_mean": 25.2297297297, "line_max": 88, "alpha_frac": 0.5285935085, "autogenerated": false, "ratio": 4.2...
__author__ = 'rakesh.varma' from fabric.api import * class jenkins_install: mirror_site = 'https://fastdl.mongodb.org/linux' mongo_install_file = 'mongodb-linux-x86_64-3.0.11' def __init__(self, host_ip, host_user, host_key_file): env.host_string = host_ip env.user = host_user env....
{ "repo_name": "varmarakesh/devops-toolbox", "path": "devops-toolbox/jenkins/install.py", "copies": "1", "size": "2840", "license": "isc", "hash": 6904013645625925000, "line_mean": 36.8666666667, "line_max": 205, "alpha_frac": 0.5985915493, "autogenerated": false, "ratio": 3.2199546485260773, "c...
__author__ = 'rakesh.varma' from fabric.api import * class mongodb_install: mirror_site = 'https://fastdl.mongodb.org/linux' mongo_install_file = 'mongodb-linux-x86_64-3.0.11' def __init__(self, host_ip, host_user, host_key_file): env.host_string = host_ip env.user = host_user env....
{ "repo_name": "varmarakesh/devops-toolbox", "path": "devops-toolbox/mongodb/install.py", "copies": "1", "size": "1857", "license": "isc", "hash": -7762140431271003000, "line_mean": 35.4117647059, "line_max": 205, "alpha_frac": 0.6020463113, "autogenerated": false, "ratio": 3.1581632653061225, "...
__author__ = 'rakesh.varma' from fabric.api import * class salt_master: def __init__(self, host_ip, host_user, host_key_file): env.host_string = host_ip env.user = host_user env.key_filename = host_key_file def remote_command(self, cmd): output = sudo(cmd) return str(o...
{ "repo_name": "varmarakesh/devops-toolbox", "path": "devops-toolbox/salt/salt_operations.py", "copies": "1", "size": "1532", "license": "isc", "hash": -8086359022361188000, "line_mean": 28.4615384615, "line_max": 141, "alpha_frac": 0.5835509138, "autogenerated": false, "ratio": 3.3449781659388647...
"""AUTHOR : RAKSHIT KAPOOR INSTITUTION : NIT Jalandhar""" import os from flask import * from werkzeug import secure_filename import csv from py2neo import * import time from nltk.tokenize import word_tokenize from nltk.corpus import stopwords ALLOWED_EXTENSIONS = set(['csv']) app=Flask(__name__...
{ "repo_name": "kapoor-rakshit/py2neo", "path": "pyfile.py", "copies": "1", "size": "16622", "license": "mit", "hash": -2047593626537535200, "line_mean": 40.6205128205, "line_max": 314, "alpha_frac": 0.6641198412, "autogenerated": false, "ratio": 2.7786693413574057, "config_test": false, "has_...
__author__ = 'ralf' import urllib.request import json import xml.etree.ElementTree as ET import csv def raw_stats(name, month): url = "http://stats.grok.se/json/en/%s/%s" % (month, name) f = urllib.request.urlopen(url) data = json.loads(f.read().decode('utf-8')) return data def stats(name): tota...
{ "repo_name": "rkistner/mars", "path": "mars-lists/mars/wikipedia.py", "copies": "1", "size": "4383", "license": "mit", "hash": -7758394968903055000, "line_mean": 29.2275862069, "line_max": 241, "alpha_frac": 0.6002737851, "autogenerated": false, "ratio": 3.6525, "config_test": false, "has_no...
__author__ = 'Ralph' from ui.app import Application if __name__ == '__main__': from ui.app import Example import wx app = wx.App() Example(None, title='Example') app.MainLoop() # application = Application() # application.run() # node1 = ImportARFF() # node2 = SelectAttributes()...
{ "repo_name": "rbrecheisen/pyminer", "path": "pyminer/pyminer.py", "copies": "1", "size": "1957", "license": "apache-2.0", "hash": -5486414050012196000, "line_mean": 33.350877193, "line_max": 112, "alpha_frac": 0.5988758304, "autogenerated": false, "ratio": 3.2725752508361206, "config_test": tr...
__author__ = 'Ralph' import os import numpy as np import pandas as pd from sklearn.svm import SVC from sklearn.grid_search import GridSearchCV from sklearn.cross_validation import StratifiedKFold from sklearn.externals import joblib from sklearn.metrics import accuracy_score from sklearn.metrics import precision_sco...
{ "repo_name": "rbrecheisen/pyminer", "path": "pyminer/network/classifiers.py", "copies": "1", "size": "9893", "license": "apache-2.0", "hash": 7992280162155357000, "line_mean": 31.98, "line_max": 80, "alpha_frac": 0.560092995, "autogenerated": false, "ratio": 4.113513513513514, "config_test": t...
__author__ = 'Ralph' import pandas as pd from arff_utils import ARFF from base import Node from base import OutputPort class Importer(Node): def __init__(self, name): super(Importer, self).__init__(name) class ImportARFF(Importer): def __init__(self): super(ImportARFF, self).__init__(...
{ "repo_name": "rbrecheisen/pyminer", "path": "pyminer/network/importers.py", "copies": "1", "size": "1276", "license": "apache-2.0", "hash": 3153480320470007000, "line_mean": 21.8035714286, "line_max": 79, "alpha_frac": 0.6175548589, "autogenerated": false, "ratio": 3.5444444444444443, "config_...
__author__ = 'Ralph' import pandas as pd from base import Node from base import InputPort from base import OutputPort class Selector(Node): def __init__(self, name): super(Selector, self).__init__(name) self.add_input_port( InputPort(name='input', data_type=pd.DataFrame)) s...
{ "repo_name": "rbrecheisen/pyminer", "path": "pyminer/network/selectors.py", "copies": "1", "size": "3162", "license": "apache-2.0", "hash": 8417351623478921000, "line_mean": 32.2947368421, "line_max": 79, "alpha_frac": 0.5926628716, "autogenerated": false, "ratio": 4.307901907356948, "config_t...
__author__ = 'Ralph' import wx import network.base class Canvas(wx.Panel): def __init__(self, parent, widgets): super(Canvas, self).__init__(parent) self._widgets = widgets self._nodes = [] self._connections = [] self.Bind(wx.EVT_PAINT, self._render) self.Bind(w...
{ "repo_name": "rbrecheisen/pyminer", "path": "pyminer/ui/canvas.py", "copies": "1", "size": "11179", "license": "apache-2.0", "hash": -2818939045646596600, "line_mean": 27.2323232323, "line_max": 128, "alpha_frac": 0.5625726809, "autogenerated": false, "ratio": 3.9669978708303764, "config_test"...
__author__ = 'Ralph' import wx from canvas import Canvas from network.importers import ImportCSV from network.importers import ImportARFF from network.selectors import SelectAttributes from network.classifiers import SupportVectorMachine from widgets import ImportCSVWidget from widgets import ImportARFFWidget from ...
{ "repo_name": "rbrecheisen/pyminer", "path": "pyminer/ui/app.py", "copies": "1", "size": "2599", "license": "apache-2.0", "hash": -4919914787060418000, "line_mean": 25, "line_max": 78, "alpha_frac": 0.6225471335, "autogenerated": false, "ratio": 3.9259818731117826, "config_test": false, "has_...
__author__ = 'Ralph' import wx from network.importers import ImportCSV from network.importers import ImportARFF from network.selectors import SelectAttributes from network.classifiers import ApplyModel from network.classifiers import SupportVectorMachine class Widget(wx.Dialog): def __init__(self, node, name):...
{ "repo_name": "rbrecheisen/pyminer", "path": "pyminer/ui/widgets.py", "copies": "1", "size": "3343", "license": "apache-2.0", "hash": 4623848971005516000, "line_mean": 24.1428571429, "line_max": 86, "alpha_frac": 0.646724499, "autogenerated": false, "ratio": 4.052121212121212, "config_test": fa...
__author__ = 'Ramakrishna' # Libraries intialization import urllib import re from collections import Counter #Variable declarations pronoun = ['ich','du','er','wir','ihr','sie','Sie'] tense = ['present','perfect','past','pluperfect','future'] all_tenses = dict() base_word="kommen" list_div=3 j=0 #Ex...
{ "repo_name": "Nithanaroy/SemanticMachineTranslation", "path": "py-stemmer/newws.py", "copies": "1", "size": "1283", "license": "mit", "hash": 2291053272944875800, "line_mean": 24.7708333333, "line_max": 65, "alpha_frac": 0.6812159002, "autogenerated": false, "ratio": 2.9906759906759905, "confi...
__author__ = 'rama' from tokenizer.ptbtokenizer import PTBTokenizer from cider.cider import Cider from ciderD.ciderD import CiderD class CIDErEvalCap: def __init__(self, gts, res, df): print 'tokenization...' tokenizer = PTBTokenizer('gts') _gts = tokenizer.tokenize(gts) print 'tok...
{ "repo_name": "ramakrishnavedantam928/cider", "path": "pyciderevalcap/eval.py", "copies": "2", "size": "1306", "license": "bsd-2-clause", "hash": 5663912864316530000, "line_mean": 31.65, "line_max": 72, "alpha_frac": 0.4670750383, "autogenerated": false, "ratio": 4.146031746031746, "config_test...
__author__ = 'ramapriyasridharan' __author__ = 'ramapriyasridharan' import matplotlib.pyplot as plt import numpy as np import argparse import pandas as pd import scipy as sp import scipy.stats, math import sys import os import ConfigParser WARMUP_SECS = 0 COOLDOWN_SECS = 20 def mean_confidence_interval(data, con...
{ "repo_name": "GHrama/ameowsmeowl-2015", "path": "plotting scripts/plot_many_clients_resp.py", "copies": "1", "size": "2687", "license": "mit", "hash": -5950582858422779000, "line_mean": 26.9895833333, "line_max": 94, "alpha_frac": 0.5883885374, "autogenerated": false, "ratio": 2.914316702819957,...
__author__ = 'ramapriyasridharan' import matplotlib.pyplot as plt import numpy as np import argparse import pandas as pd import scipy as sp import scipy.stats, math import sys import os import ConfigParser WARMUP_SECS = 0 COOLDOWN_SECS = 20 def mean_confidence_interval(data, confidence=0.95): # a = 1.0*np.ar...
{ "repo_name": "GHrama/ameowsmeowl-2015", "path": "plotting scripts/plot_many_clients.py", "copies": "1", "size": "2647", "license": "mit", "hash": 2522793456097354000, "line_mean": 26.8631578947, "line_max": 109, "alpha_frac": 0.5802795618, "autogenerated": false, "ratio": 2.880304678998912, "c...
__author__ = 'ramapriyasridharan' import os, pprint import paramiko from fabric.api import * import time import argparse import ConfigParser def rsridhar_install_remote_stuff(user_name, hostname, path_to_key=None): env.user = user_name if path_to_key: env.key_filename = path_to_key print user_name print path_t...
{ "repo_name": "GHrama/ameowsmeowl-2015", "path": "SystemsLabFinal/DeployScriptsAndOtherRelevantFiles/general.py", "copies": "1", "size": "1783", "license": "mit", "hash": 1955422891048227600, "line_mean": 23.7777777778, "line_max": 95, "alpha_frac": 0.7100392597, "autogenerated": false, "ratio": ...
__author__ = 'ramapriyasridharan' import os, pprint import paramiko from fabric.api import * import time import argparse import ConfigParser #for ec2 and dryad def rsridhar_install_db_remote(user_name, db_port, hostname, sql_script_path, pg_hba_conf_path, rsridhar_conf_path, rsridhar_db_path, amazon_machine, p...
{ "repo_name": "GHrama/ameowsmeowl-2015", "path": "SystemsLabFinal/DeployScriptsAndOtherRelevantFiles/postgres_magic.py", "copies": "1", "size": "2308", "license": "mit", "hash": -5845722207177127000, "line_mean": 29.3684210526, "line_max": 115, "alpha_frac": 0.6850086655, "autogenerated": false, ...
__author__ = 'ramapriyasridharan' import matplotlib.pyplot as plt import numpy as np import argparse import pandas as pd import scipy as sp import scipy.stats, math import sys import os import ConfigParser import csv warm_up = 100 cool_down = 100 def refine(df): start_time = np.min(df['timestamp']) #print s...
{ "repo_name": "GHrama/ameowsmeowl-2015", "path": "plotting scripts/plot_middleware_throughput.py", "copies": "1", "size": "3361", "license": "mit", "hash": 1784956261968018400, "line_mean": 32.2871287129, "line_max": 164, "alpha_frac": 0.6054745611, "autogenerated": false, "ratio": 2.678087649402...
__author__ = 'ramapriyasridharan' import matplotlib.pyplot as plt import numpy as np import argparse import pandas as pd import scipy as sp import scipy.stats, math import sys import os import ConfigParser WARMUP_SECS = 20 COOLDOWN_SECS = 70 def mean_confidence_interval(data, confidence=0.95): # a = 1.0*np...
{ "repo_name": "GHrama/ameowsmeowl-2015", "path": "plotting scripts/many_throughput.py", "copies": "1", "size": "3250", "license": "mit", "hash": -2128466067888159700, "line_mean": 27.5175438596, "line_max": 105, "alpha_frac": 0.5584615385, "autogenerated": false, "ratio": 2.943840579710145, "co...
__author__ = 'Ramki Subramanian' DEBUG = False # Flag to set debug level. (print statements on/off) import re import json from bs4 import BeautifulSoup from lxml import html # unused from urllib2 import (URLError, HTTPError) import requests from requests.exceptions import SSLError import time from multiprocessing.poo...
{ "repo_name": "rsubra13/atlasproj", "path": "messageDecode.py", "copies": "1", "size": "5170", "license": "apache-2.0", "hash": 2091627387454009000, "line_mean": 40.7016129032, "line_max": 129, "alpha_frac": 0.53655706, "autogenerated": false, "ratio": 4.042220484753714, "config_test": false, ...
__author__ = 'ramr' import os import sys sys.path.append("/usr/lib/python2.7/dist-packages") sys.path.append("/home/ramr/Desktop/Googleappengine2/google_appengine/") sys.path.append("/home/ramr/Desktop/Googleappengine2/google_appengine/lib/") import sys print sys.path from google.appengine.ext import db import jinja2 ...
{ "repo_name": "rama-bornfree/ShoppingCartDemo", "path": "main.py", "copies": "1", "size": "3825", "license": "mit", "hash": 5002614810214029000, "line_mean": 33.1517857143, "line_max": 148, "alpha_frac": 0.7236601307, "autogenerated": false, "ratio": 3.775913129318855, "config_test": false, "...
__author__ = 'ramr' import os import sys #sys.path.append("/usr/lib/python2.7/dist-packages") #sys.path.append('/home/ramr/Desktop/google_appengine/lib/jinja2') #sys.path.append("/home/ramr/Desktop/google_appengine/lib/webapp2") import jinja2 import webapp2 from google.appengine.ext import db '''template_dir variable ...
{ "repo_name": "rama-bornfree/ShoppingCartDemo", "path": "main_3.py", "copies": "1", "size": "4345", "license": "mit", "hash": -7112000363207988000, "line_mean": 33.76, "line_max": 124, "alpha_frac": 0.7261219793, "autogenerated": false, "ratio": 3.7782608695652176, "config_test": false, "has_...
__author__ = 'ramr' import os import sys sys.path.append("/usr/lib/python2.7/dist-packages") sys.path.append("/home/ramr/Desktop/google_appengine/lib/webapp2") import jinja2 import webapp2 from google.appengine.ext import db '''template_dir variable is current dirname joined with folder name templates''' template_dir ...
{ "repo_name": "rama-bornfree/ShoppingCartDemo", "path": "main_2.py", "copies": "1", "size": "3180", "license": "mit", "hash": 8405522159001264000, "line_mean": 33.5652173913, "line_max": 148, "alpha_frac": 0.715408805, "autogenerated": false, "ratio": 3.7544273907910273, "config_test": false, ...
__author__ = 'ramr' import random from urllib import urlopen import sys WORD_URL = "http://learncodethehardway.org/words.txt" WORDS = [] PHRASES = { "class ###(###):": "Make a class named ###", "class ###(object):\n\tdef __init__(self, ***)" : "class ###", "class ###(object):\n\tdef ***(self, @@@)...
{ "repo_name": "rama-bornfree/ShoppingCartDemo", "path": "test1.py", "copies": "1", "size": "2133", "license": "mit", "hash": -4512186776809916400, "line_mean": 25.0243902439, "line_max": 72, "alpha_frac": 0.554617909, "autogenerated": false, "ratio": 3.5788590604026846, "config_test": false, ...
__author__ = 'ramr' import sys sys.path.append("/usr/lib/python2.7/dist-packages") import random import os import jinja2 import webapp2 from google.appengine.ext import db import logging template_dir = os.path.join(os.path.dirname(__file__), 'templates') '''template_dir variable is current dirname joined with folder...
{ "repo_name": "rama-bornfree/ShoppingCartDemo", "path": "main_5.py", "copies": "1", "size": "9696", "license": "mit", "hash": -8878520274679988000, "line_mean": 41.9026548673, "line_max": 117, "alpha_frac": 0.6018976898, "autogenerated": false, "ratio": 4.096324461343473, "config_test": false, ...
__author__ = 'RanadeepPolavarapu' import random import string import time import datetime import calendar import re import pytz class Utils: """ Created for personal use withn a few web projects. Created for use under Python 3+. """ # Follows ISO 3166-2, http://en.wikipedia.org/wiki/ISO_3166-2...
{ "repo_name": "RanadeepPolavarapu/PythonUtils", "path": "utils.py", "copies": "1", "size": "23668", "license": "mit", "hash": 2716660462156710000, "line_mean": 31.1044776119, "line_max": 120, "alpha_frac": 0.482481721, "autogenerated": false, "ratio": 3.308305369127517, "config_test": false, ...
__author__ = 'Ran Geva' import re,json from dateutil.parser import parse #try except for different urllib under python3 and python2 try: import urllib.request as urllib except ImportError: import urllib2 as urllib try: from bs4 import BeautifulSoup except ImportError: from BeautifulSoup import Beaut...
{ "repo_name": "Webhose/article-date-extractor", "path": "articleDateExtractor/__init__.py", "copies": "1", "size": "7542", "license": "mit", "hash": -5574440099524319000, "line_mean": 28.9325396825, "line_max": 176, "alpha_frac": 0.5893662159, "autogenerated": false, "ratio": 3.7226061204343535, ...
__author__ = 'ranveer' from django import forms from django.contrib.auth.models import User from authentication.models import UserProfile class UserForm(forms.ModelForm): username = forms.CharField( widget=forms.TextInput( attrs={ 'class': 'form-control', 'id': ...
{ "repo_name": "Sumith1896/talenge", "path": "talenge-project/authentication/forms.py", "copies": "2", "size": "2225", "license": "mit", "hash": 8258997560395620000, "line_mean": 22.4315789474, "line_max": 52, "alpha_frac": 0.4602247191, "autogenerated": false, "ratio": 4.597107438016529, "confi...
product_name = 'SCR200E' product_note = 'units that failed oven proofing because of large changes in grids' product_date = '01/11/2014' ################################################################################### ################################################################################### ##############...
{ "repo_name": "MrBurnt/Small-Tools", "path": "FailureScript.py", "copies": "1", "size": "10402", "license": "bsd-2-clause", "hash": -7080748043621587000, "line_mean": 36.15, "line_max": 590, "alpha_frac": 0.5569121323, "autogenerated": false, "ratio": 3.482423836625377, "config_test": false, ...
__author__ = 'rastko' import bs4 import json from bson import json_util class MovieBase(object): def __init__(self, html_soup): """Movie class which parses html BeautifulSoup object and extracts information about the movie""" self.data = {} assert isinstance(html_soup, bs4.BeautifulSoup)...
{ "repo_name": "skozilla/BoxOfficeMojo", "path": "boxofficemojoAPI/base.py", "copies": "1", "size": "1531", "license": "mit", "hash": 7007124100905116000, "line_mean": 31.5957446809, "line_max": 105, "alpha_frac": 0.5950359242, "autogenerated": false, "ratio": 3.645238095238095, "config_test": f...
__author__ = 'rastko' import bs4 import re import json from bson import json_util from . import utils from base import MovieBase class Movie(MovieBase): def __init__(self, html_soup): """Movie class which parses html BeautifulSoup object and extracts information about the movie""" MovieBase.__i...
{ "repo_name": "skozilla/BoxOfficeMojo", "path": "boxofficemojoAPI/movie.py", "copies": "1", "size": "6511", "license": "mit", "hash": -6595385571304133000, "line_mean": 38.9447852761, "line_max": 146, "alpha_frac": 0.504530794, "autogenerated": false, "ratio": 4.2723097112860895, "config_test":...
__author__ = 'rastko' import bs4 import re import requests import movie import utils class BoxOfficeMojo(object): """API client object for interacting with BoxOfficeMojo website""" BOMURL = "http://www.boxofficemojo.com/movies" def __init__(self): self.letters = ['NUM'] self.movie_urls ...
{ "repo_name": "skozilla/BoxOfficeMojo", "path": "boxofficemojoAPI/boxofficemojo.py", "copies": "1", "size": "4433", "license": "mit", "hash": -4010473367322856000, "line_mean": 35.0406504065, "line_max": 75, "alpha_frac": 0.5201894879, "autogenerated": false, "ratio": 3.782423208191126, "config...
__author__ = 'rastko' import decorator import requests.exceptions import time import re import inflection import bs4 from datetime import datetime @decorator.decorator def na_or_empty(func, *args): """Decorator for handling conversion of the Movie.Data member""" data = args[0] key = args[1] try: ...
{ "repo_name": "skozilla/BoxOfficeMojo", "path": "boxofficemojoAPI/utils.py", "copies": "1", "size": "3238", "license": "mit", "hash": 2687825459998269400, "line_mean": 26.218487395, "line_max": 98, "alpha_frac": 0.5602223595, "autogenerated": false, "ratio": 3.4594017094017095, "config_test": f...
__author__ = 'rast' from math import * def signFunction(x): if x == 0: return 0 return copysign(1,x) eps = 10**-6 class Pt(object): def __init__(self, x, y): self.x = float(x) self.y = float(y) def __lt__(self, other): return self.x < other.x - eps or abs(self.x-other....
{ "repo_name": "Rast1234/graphics", "path": "intersect.py", "copies": "1", "size": "3489", "license": "mit", "hash": 824988602850431400, "line_mean": 28.3193277311, "line_max": 106, "alpha_frac": 0.4465462883, "autogenerated": false, "ratio": 2.834281072298944, "config_test": false, "has_no_ke...
__author__ = 'rast' from PySide.QtGui import qRgb class Queue(object): """ Drawing queue """ def __init__(self): """ Initialize queue with segments """ self.data = [] self.pos = 0 self.force = False self.baseColor = qRgb(0, 0, 0) self.up...
{ "repo_name": "Rast1234/graphics", "path": "GlobalQueue.py", "copies": "1", "size": "1602", "license": "mit", "hash": 1082693503972944400, "line_mean": 26.6206896552, "line_max": 112, "alpha_frac": 0.4781523096, "autogenerated": false, "ratio": 3.063097514340344, "config_test": false, "has_no...
__author__ = 'rast' class Node(object): def __init__(self, data=None, prev=None, next=None): if (prev and not isinstance(prev, Node)) or \ (next and not isinstance(next, Node)): raise ValueError("Invalid parameters") self.data = data self.prev = prev sel...
{ "repo_name": "Rast1234/graphics", "path": "LinkedList.py", "copies": "1", "size": "3179", "license": "mit", "hash": -3596584196704900000, "line_mean": 27.9, "line_max": 109, "alpha_frac": 0.5401069519, "autogenerated": false, "ratio": 4.133940182054617, "config_test": false, "has_no_keywords...
__author__ = 'Ratchasak Ranron <ratchasak.ranron@gmail.com>' from google.appengine.ext import ndb from flask import Flask app = Flask(__name__) class RMS(ndb.Model): timestamp = ndb.IntegerProperty(required=True) pu1 = ndb.IntegerProperty(required=True) pu2 = ndb.IntegerProperty(required=True) pu3 = n...
{ "repo_name": "ictes6-siit/power-monitor-cloud", "path": "model.py", "copies": "1", "size": "3845", "license": "apache-2.0", "hash": 5376621928995118000, "line_mean": 31.593220339, "line_max": 60, "alpha_frac": 0.6863459038, "autogenerated": false, "ratio": 3.5018214936247722, "config_test": fa...
__author__ = 'Ratchasak Ranron <ratchasak.ranron@gmail.com>' from datetime import timedelta from flask import make_response, request, current_app from functools import update_wrapper def crossdomain(origin=None, methods=None, headers=None, max_age=21600, attach_to_all=True, automatic_...
{ "repo_name": "ictes6-siit/power-monitor-cloud", "path": "crossdomain.py", "copies": "1", "size": "1716", "license": "apache-2.0", "hash": -6439990425235656000, "line_mean": 35.5319148936, "line_max": 67, "alpha_frac": 0.6072261072, "autogenerated": false, "ratio": 4.154963680387409, "config_te...
__author__ = 'ratnesh.mishra' import aioredis as redis class RedisManager: def __init__(self, host, port): self.host = host self.port = port self.conn = None def _get_conn(self): # This creates single connection while we can go for a connection pool return (yield from...
{ "repo_name": "ratnesh-mishra/Mobmess", "path": "mobmess/redis_manager.py", "copies": "1", "size": "1162", "license": "mit", "hash": -7371698987454385000, "line_mean": 31.2777777778, "line_max": 89, "alpha_frac": 0.6024096386, "autogenerated": false, "ratio": 3.8223684210526314, "config_test": ...
__author__ = 'rauch' #Login page STR_LOGIN_GREETING = "Please log in below: " STR_LOGIN_SUCCESS = "You're successfully logged in!" STR_LOGIN_INACTIVE = "Your account is not active, please contact the site admin." STR_LOGIN_WRONG_CREDENTIAL = "Your name and/or password were incorrect." #Errors messages STR_SHELL_EXCE...
{ "repo_name": "rauch/PyPBS", "path": "pytorque/strings.py", "copies": "1", "size": "2272", "license": "mit", "hash": -931669083232425900, "line_mean": 36.8666666667, "line_max": 83, "alpha_frac": 0.7337147887, "autogenerated": false, "ratio": 2.59954233409611, "config_test": false, "has_no_ke...
__author__ = 'Raul Peralta-Lozada' __email__ = 'raulpl25@gmail.com' import argparse from qt_gui.plugin import Plugin from .map_widget import MapTopoWidget class MapTopo(Plugin): """ Subclass of Plugin to save semantic locations on a grid map. """ def __init__(self, context): super(MapTopo, s...
{ "repo_name": "RaulPL/rqt_map_topo", "path": "src/rqt_map_topo/map_topo.py", "copies": "1", "size": "1871", "license": "bsd-3-clause", "hash": -4269814593838316500, "line_mean": 31.8421052632, "line_max": 105, "alpha_frac": 0.6349545697, "autogenerated": false, "ratio": 4.041036717062635, "conf...
__author__ = 'Raul Peralta-Lozada' __email__ = 'raulpl25@gmail.com' """ This rqt_plugin was mostly based on the rqt_bag and rqt_nav_view plugins. """ import os import yaml import rospy import rospkg import numpy from math import radians, degrees, cos, sin from nav_msgs.msg import OccupancyGrid from tf.transformat...
{ "repo_name": "RaulPL/rqt_map_topo", "path": "src/rqt_map_topo/map_widget.py", "copies": "1", "size": "15653", "license": "bsd-3-clause", "hash": -6319907739220573000, "line_mean": 46.7225609756, "line_max": 113, "alpha_frac": 0.5682616751, "autogenerated": false, "ratio": 3.4730419347681383, "...
__author__ = 'ray' import re import sys import fileinput import operator label_index = {'unknown':'0', 'speech':'1', 'clapping':'2', 'stepping':'3', 'flipping':'4'} index_number = {'0':0, '1':1, '2':2, '3':3, '4':4} number_index = {0:'0', 1:'1', 2:'2', 3:'3', 4:'4'} def process_text_file(in_file_name, out_file_name)...
{ "repo_name": "raybrshen/pattern_recognition", "path": "noise_detection/tools/format_libsvm_data.py", "copies": "1", "size": "2955", "license": "apache-2.0", "hash": 2897063442105437000, "line_mean": 28.8484848485, "line_max": 121, "alpha_frac": 0.5824027073, "autogenerated": false, "ratio": 3.08...
__author__ = 'ray' import wave import random import os import numpy as np root_path = 'asr/' wav_scp_file = root_path+'wav.scp' text_file = root_path+'text' noise_types = ['clap', 'cough'] noise_tag_list = ['<NOISE>', '<SPOKEN_NOISE>'] def add_sound(in_file, sound_file, out_file, is_prefix): wav_in = wave.ope...
{ "repo_name": "raybrshen/pattern_recognition", "path": "noise_detection/tools/insert_noise.py", "copies": "1", "size": "4392", "license": "apache-2.0", "hash": -4148121689725298000, "line_mean": 35.2975206612, "line_max": 89, "alpha_frac": 0.5457650273, "autogenerated": false, "ratio": 3.38106235...
__author__ = 'ray' import matplotlib.pyplot as plt import numpy as np import wave import sys import os label_color = {0:'g', 1:'b', 2:'r', 3:'y',4:'c',5:'m'} audio_path = 'frame_based-clap_cough_speech_env/audios/test/clap_speech_04.wav' result_path = 'frame_based-clap_cough_speech_env/result_files/clap_speech_04.la...
{ "repo_name": "raybrshen/pattern_recognition", "path": "noise_detection/tools/plot_wave.py", "copies": "1", "size": "3836", "license": "apache-2.0", "hash": 9071282240428720000, "line_mean": 33.5585585586, "line_max": 142, "alpha_frac": 0.6024504692, "autogenerated": false, "ratio": 2.99921813917...
__author__ = 'ray' import re import sys import fileinput import operator label_index = {'env':'0', 'speech':'1', 'clap':'2', 'cough':'3', 'laugh':'4', 'sneeze':'5'} index_number = {'0':0, '1':1, '2':2, '3':3, '4':4, '5':5} number_index = {0:'0', 1:'1', 2:'2', 3:'3', 4:'4', 5:'5'} def label_sound(in_file_name, out_...
{ "repo_name": "raybrshen/pattern_recognition", "path": "noise_detection/tools/label_sound_features.py", "copies": "1", "size": "1470", "license": "apache-2.0", "hash": 6368207121702371000, "line_mean": 26.7358490566, "line_max": 91, "alpha_frac": 0.5680272109, "autogenerated": false, "ratio": 2.9...
__author__ = 'razi' from ftcl.classes import * n0 = Node("0") def nestn(n, st, pr): bl = Block() while True: if n.nexts() == 0: prn = pr + n.name print(prn) bl.add(Instruction(n)) break if n.nexts() == 1: prn = pr + n.name ...
{ "repo_name": "Razi91/ftcl", "path": "ftcl/parser.py", "copies": "1", "size": "1442", "license": "mit", "hash": 5517907108780663000, "line_mean": 19.2957746479, "line_max": 57, "alpha_frac": 0.3858431645, "autogenerated": false, "ratio": 3.4806763285024154, "config_test": false, "has_no_keywo...
__author__ = 'razi' class Node: def __init__(self, name): self.nin = [] self.nout = [] self.back = set() self.forward = set() self.name = name def nexts(self): return len(self.nout) def hasNext(self): return len(self.nout) > 0 def getNext(self...
{ "repo_name": "Razi91/ftcl", "path": "ftcl/classes.py", "copies": "1", "size": "3885", "license": "mit", "hash": -1397793469826720000, "line_mean": 20, "line_max": 61, "alpha_frac": 0.4831402831, "autogenerated": false, "ratio": 3.630841121495327, "config_test": false, "has_no_keywords": fals...
__author__ = 'rbshaffer' import os import re import csv import codecs import parser import _file_utils as utils class Tabulator: def __init__(self, working_directory): """ Wrapper class, which provides an easy interface to manage paths and outputs created by Segmenter. :param working_dir...
{ "repo_name": "rbshaffer/constitute_tools", "path": "constitute_tools/wrappers.py", "copies": "1", "size": "4138", "license": "mit", "hash": -2722290296052370000, "line_mean": 39.568627451, "line_max": 119, "alpha_frac": 0.610439826, "autogenerated": false, "ratio": 3.885446009389671, "config_t...
__author__ = "R B Wilkinson" __date__ = "29/02/12" __copyright__ = "(C) 2012 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = "$Id$" try: from setuptools import setup, find_packages except ImportError: ...
{ "repo_name": "cedadev/ndg_oauth", "path": "ndg_oauth_server/setup.py", "copies": "1", "size": "3032", "license": "bsd-3-clause", "hash": -4547218312509105000, "line_mean": 33.8505747126, "line_max": 80, "alpha_frac": 0.5451846966, "autogenerated": false, "ratio": 3.8331226295828067, "config_te...
__author__ = 'rcj1492' __created__ = '2015.07' __license__ = 'MIT' ''' PLEASE NOTE: ec2 package requires the boto3 module. (all platforms) pip3 install boto3 ''' try: import boto3 except: import sys print('ec2 package requires the boto3 module. try: pip3 install boto3') sys.exit(1) from labpack.a...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/platforms/aws/ec2.py", "copies": "1", "size": "78047", "license": "mit", "hash": -3343083206299357000, "line_mean": 35.7452919021, "line_max": 191, "alpha_frac": 0.5365100516, "autogenerated": false, "ratio": 4.335221907459868, "config_...
__author__ = 'rcj1492' __created__ = '2015.08' __license__ = 'MIT' ''' PLEASE NOTE: s3 package requires the boto3 module. (all platforms) pip3 install boto3 ''' try: import boto3 except: import sys print('s3 package requires the boto3 module. try: pip3 install boto3') sys.exit(1) # TODO: bucket a...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/storage/aws/s3.py", "copies": "1", "size": "87562", "license": "mit", "hash": 4255809912010330000, "line_mean": 40.5182550972, "line_max": 322, "alpha_frac": 0.537344967, "autogenerated": false, "ratio": 4.678706919583222, "config_test"...
__author__ = 'rcj1492' __created__ = '2015.10' ''' PLEASE NOTE: iam package requires the boto3 module. (all platforms) pip3 install boto3 ''' try: import boto3 except: import sys print('iam package requires the boto3 module. try: pip3 install boto3') sys.exit(1) class AWSConnectionError(Exception...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/authentication/aws/iam.py", "copies": "1", "size": "8913", "license": "mit", "hash": 3345727171006909000, "line_mean": 32.8897338403, "line_max": 94, "alpha_frac": 0.5871199372, "autogenerated": false, "ratio": 4.388478581979321, "confi...
__author__ = 'rcj1492' __created__ = '2016.03' __license__ = 'MIT' import pytest from jsonmodel import __module__ from jsonmodel.loader import jsonLoader class jsonLoaderTests(object): def __init__(self): pass def unitTests(self): # test invalid module exception with pytest.raises(Excep...
{ "repo_name": "collectiveacuity/jsonModel", "path": "tests/test_loader.py", "copies": "1", "size": "1117", "license": "mit", "hash": 7078142925951201000, "line_mean": 26.95, "line_max": 69, "alpha_frac": 0.6284691137, "autogenerated": false, "ratio": 4.231060606060606, "config_test": true, "h...
__author__ = 'rcj1492' __created__ = '2016.04' import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from server.config import * from server.resources import * from flask import request, jsonify, url_for, render_template @app.route('/') def dashboard_page(): request_dict = {'headers...
{ "repo_name": "rj919/fishBase", "path": "server/launch.py", "copies": "1", "size": "2279", "license": "mit", "hash": -7795576655403370000, "line_mean": 33.0149253731, "line_max": 73, "alpha_frac": 0.6713470821, "autogenerated": false, "ratio": 3.527863777089783, "config_test": false, "has_no_...
__author__ = 'rcj1492' __created__ = '2016.04' ''' a collection of constructors for resources available to interface ''' import json from jsonmodel.validators import jsonModel class requestModel(object): def __init__(self, json_model): if not isinstance(json_model, jsonModel): raise Type...
{ "repo_name": "rj919/fishBase", "path": "server/resources.py", "copies": "1", "size": "1720", "license": "mit", "hash": 5473017724925878000, "line_mean": 28.6551724138, "line_max": 78, "alpha_frac": 0.7023255814, "autogenerated": false, "ratio": 4.047058823529412, "config_test": false, "has_n...
__author__ = 'rcj1492' __created__ = '2017.03' __license__ = 'MIT' import csv import json data_model = {} file_path = '../data/insights/POS Table 1.csv' with open(file_path, 'rt') as csv_file: csv_reader = csv.DictReader(csv_file) for row in csv_reader: for header in csv_reader.fieldnames: ...
{ "repo_name": "saaqibz/inbev-hackathon", "path": "models/schematize.py", "copies": "1", "size": "1147", "license": "mit", "hash": 3440940486385677300, "line_mean": 24.5111111111, "line_max": 54, "alpha_frac": 0.5265911072, "autogenerated": false, "ratio": 3.4444444444444446, "config_test": fals...
__author__ = 'rcj1492' __created__ = '2017.05' __license__ = 'MIT' def load_ignore(vcs='git', type='service'): ''' a method to retrieve the module template vcs ignore text ''' # retrieve module path from os import path from pocketlab import __module__ from importlib.util import find_spec modu...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/methods/vcs.py", "copies": "1", "size": "4242", "license": "mit", "hash": -8275685364853200000, "line_mean": 35.8869565217, "line_max": 121, "alpha_frac": 0.5601131542, "autogenerated": false, "ratio": 3.669550173010381, "config_tes...
__author__ = 'rcj1492' __created__ = '2017.05' __license__ = 'MIT' ''' add .ignore file add docker-compose.yaml file add cred & data folders copy cred files from notes to cred add setup.py add docs folder add index.md to docs folder add <module> folder add __init__ to <module> folder add .lab folders add --heroku as a...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/commands/init.py", "copies": "1", "size": "40130", "license": "mit", "hash": 5676993726964546000, "line_mean": 41.0649895178, "line_max": 728, "alpha_frac": 0.5656117618, "autogenerated": false, "ratio": 4.0765948801300285, "config_...
__author__ = 'rcj1492' __created__ = '2017.05' __license__ = 'MIT' ''' REFERENCES https://docs.python.org/3.6/library/argparse.html#module-argparse https://docs.python.org/3.5/library/argparse.html?highlight=argparse#module-argparse ''' from pocketlab import __command__, __module__, __version__, __order__ from pocket...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/parser.py", "copies": "1", "size": "3953", "license": "mit", "hash": -4045641998937879600, "line_mean": 34.9363636364, "line_max": 140, "alpha_frac": 0.64963319, "autogenerated": false, "ratio": 4.273513513513514, "config_test": fal...
__author__ = 'rcj1492' __created__ = '2017.06' __licence__ = 'MIT' def get_ip(source='aws'): ''' a method to get current public ip address of machine ''' if source == 'aws': source_url = 'http://checkip.amazonaws.com/' else: raise Exception('get_ip currently only supports queries ...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/records/ip.py", "copies": "1", "size": "5565", "license": "mit", "hash": 2711684130539984000, "line_mean": 39.0431654676, "line_max": 184, "alpha_frac": 0.5778975741, "autogenerated": false, "ratio": 3.8970588235294117, "config_test": f...
__author__ = 'rcj1492' __created__ = '2017.06' __licence__ = 'MIT' ''' put file to ec2 instance TODO: put to other platforms (bluemix, azure, gcp) ''' _put_details = { 'title': 'put', 'description': 'Copies a local file or folder to user home on remote host. Put is currently only available for the Amazon ec2 ...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/commands/put.py", "copies": "1", "size": "3860", "license": "mit", "hash": -7344209190656821000, "line_mean": 36.8529411765, "line_max": 448, "alpha_frac": 0.660880829, "autogenerated": false, "ratio": 3.9427987742594484, "config_te...
__author__ = 'rcj1492' __created__ = '2017.06' __license__ = 'MIT' from pocketlab import __module__ def import_boto3(resource_name=''): if not resource_name: resource_name = __module__ try: import boto3 except: raise ImportError('Use of %s requires the boto3 module.\nTry: pip3 in...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/methods/dependencies.py", "copies": "1", "size": "1408", "license": "mit", "hash": 5817329666146655000, "line_mean": 26.0769230769, "line_max": 140, "alpha_frac": 0.5994318182, "autogenerated": false, "ratio": 3.8575342465753426, "c...
__author__ = 'rcj1492' __created__ = '2017.06' __license__ = 'MIT' def inject_init(init_path, readme_path, setup_kwargs): ''' a method to add arguments to setup.py from module init file :param init_path: string with path to module __init__ file :param readme_path: string with path to module READM...
{ "repo_name": "collectiveacuity/jsonModel", "path": "utils.py", "copies": "2", "size": "2492", "license": "mit", "hash": 113648815419289620, "line_mean": 30.5443037975, "line_max": 80, "alpha_frac": 0.5774478331, "autogenerated": false, "ratio": 3.724962630792227, "config_test": false, "has_n...
__author__ = 'rcj1492' __created__ = '2017.06' __license__ = 'MIT' def join_words(word_list, operator='and', quotes=False): text = '' for i in range(len(word_list)): if text: if i + 1 == len(word_list): if operator == 'disjunction': text += ' or ' ...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/parsing/grammar.py", "copies": "1", "size": "1644", "license": "mit", "hash": -8969017271985481000, "line_mean": 30.0377358491, "line_max": 82, "alpha_frac": 0.5091240876, "autogenerated": false, "ratio": 4.11, "config_test": false, "...
__author__ = 'rcj1492' __created__ = '2017.07' __license__ = 'MIT' from labpack.storage.dropbox import dropboxClient if __name__ == '__main__': # initialize client import pytest from pprint import pprint from labpack.records.settings import load_settings dropbox_tokens = load_settings('../../cred...
{ "repo_name": "collectiveacuity/labPack", "path": "tests/test_storage_dropbox.py", "copies": "1", "size": "2810", "license": "mit", "hash": -3678538761411577000, "line_mean": 35.0384615385, "line_max": 90, "alpha_frac": 0.6839857651, "autogenerated": false, "ratio": 3.357228195937873, "config_t...
__author__ = 'rcj1492' __created__ = '2017.07' __license__ = 'MIT' ''' PLEASE NOTE: drive package requires the google-api-python-client module. (all platforms) pip3 install google-api-python-client PLEASE NOTE: google drive is not designed to store files in the POSIX file hierarchy as a result,...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/storage/google/drive.py", "copies": "1", "size": "39851", "license": "mit", "hash": 3875891114524453400, "line_mean": 36.3486410497, "line_max": 134, "alpha_frac": 0.5294722843, "autogenerated": false, "ratio": 4.529552170947943, "confi...
__author__ = 'rcj1492' __created__ = '2017.07' __license__ = 'MIT' ''' PLEASE NOTE: sql package requires the SQLAlchemy module. (all platforms) pip3 install SQLAlchemy ''' try: from sqlalchemy import create_engine except: import sys print('sql package requires the SQLAlchemy module. try: pip3 install ...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/databases/sql.py", "copies": "1", "size": "98772", "license": "mit", "hash": -2054609352378677500, "line_mean": 41.6292619767, "line_max": 211, "alpha_frac": 0.520420767, "autogenerated": false, "ratio": 4.750709441585301, "config_test"...
__author__ = 'rcj1492' __created__ = '2017.10' __license__ = 'MIT' # TODO: WIP # TODO: generalize requests based response handler classes class depositsHandler(object): ''' handles responses from capital one deposits api and usage data ''' _class_fields = { 'schema': { 'rate_limits': [ ...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/banking/capitalone.py", "copies": "1", "size": "31725", "license": "mit", "hash": -8326252989442888000, "line_mean": 38.9559193955, "line_max": 712, "alpha_frac": 0.5541371158, "autogenerated": false, "ratio": 4.276759234294958, "config...
__author__ = 'rcj1492' __created__ = '2017.11' __license__ = '©2017 Collective Acuity' # http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Polly.html#constructor-property # http://boto3.readthedocs.io/en/latest/reference/services/polly.html ''' PLEASE NOTE: polly package requires the boto3 module. (all platf...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/speech/aws/polly.py", "copies": "1", "size": "6302", "license": "mit", "hash": 1423413653153429200, "line_mean": 35.2183908046, "line_max": 123, "alpha_frac": 0.6176797334, "autogenerated": false, "ratio": 3.930754834684966, "config_tes...
__author__ = 'rcj1492' __created__ = '2017.12' __license__ = 'MIT' def walk_data(input_data): ''' a generator function for retrieving data in a nested dictionary :param input_data: dictionary or list with nested data :return: string with dot_path, object with value of endpoint ''' def _walk_dict...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/mapping/data.py", "copies": "1", "size": "7082", "license": "mit", "hash": 6393978079616667000, "line_mean": 33.2173913043, "line_max": 97, "alpha_frac": 0.5446201638, "autogenerated": false, "ratio": 4.156103286384977, "config_test": f...
__author__ = 'rcj1492' __created__ = '2017.12' __license__ = 'MIT' ''' alternatives: https://developer.couchbase.com/documentation/server/4.5/sdk/python/start-using-sdk.html http://pythonhosted.org/couchbase/index.html curl http://localhost:4985 ''' from labpack import __module__ import requests class syncGatewayCli...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/databases/couchbase.py", "copies": "1", "size": "45998", "license": "mit", "hash": -6866382472449805000, "line_mean": 35.946184739, "line_max": 165, "alpha_frac": 0.5392190965, "autogenerated": false, "ratio": 4.357521788556271, "config...
__author__ = 'rcj1492' __created__ = '2018.02' __license__ = 'MIT' def compile_instances(service_list): instance_list = [] # import dependencies from pocketlab.methods.validation import validate_platform from pocketlab import __module__ from jsonmodel.loader import jsonLoader from jsonmod...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/methods/heroku.py", "copies": "1", "size": "3503", "license": "mit", "hash": -8332141728045116000, "line_mean": 38.8181818182, "line_max": 102, "alpha_frac": 0.5304025121, "autogenerated": false, "ratio": 4.0922897196261685, "config...
__author__ = 'rcj1492' __created__ = '2018.05' __license__ = 'MIT' def extract_domains(certbot_text): domain_list = [] import re from labpack.records.time import labDT cert_pattern = re.compile('(\s\sCertificate Name:\s)(.*?)(\n\s+Domains:\s)(.*?)(\n\s+Expiry Date:\s)(.*?)(\s\()', re.S) c...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/methods/certbot.py", "copies": "1", "size": "1398", "license": "mit", "hash": 8818015865933865000, "line_mean": 42.6875, "line_max": 365, "alpha_frac": 0.6316165951, "autogenerated": false, "ratio": 3.1700680272108843, "config_test"...
__author__ = 'rcj1492' __created__ = '2020.05' __license__ = '©2020 Collective Acuity' ''' PLEASE NOTE: datastore package requires the google cloud datastore module. (all platforms) pip3 install google-cloud-datastore ''' try: from google.cloud import datastore except: import sys print('datastore pac...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/databases/google/datastore.py", "copies": "1", "size": "37805", "license": "mit", "hash": -6642270832653031000, "line_mean": 38.0537190083, "line_max": 199, "alpha_frac": 0.5157390752, "autogenerated": false, "ratio": 4.791988845227532, ...
__author__ = 'rcj1492' __created__ = '2020.05' __license__ = '©2020 Collective Acuity' ''' PLEASE NOTE: rds package requires the boto3 module. (all platforms) pip3 install boto3 ''' try: import boto3 except: import sys print('rds package requires the boto3 module. try: pip3 install boto3') sys.exi...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/platforms/aws/rds.py", "copies": "1", "size": "7965", "license": "mit", "hash": 1525921631409261300, "line_mean": 34.8738738739, "line_max": 118, "alpha_frac": 0.5760924159, "autogenerated": false, "ratio": 4.067415730337078, "config_te...
__author__ = 'rcj1492' __created__ = '2020.06' __license__ = '©2020 Collective Acuity' import pytest from copy import deepcopy from labpack.databases.sql import SQLSession, SQLTable if __name__ == '__main__': record_schema = { 'schema': { 'id': 0, 'token_id': '', 'expi...
{ "repo_name": "collectiveacuity/labPack", "path": "tests/test_databases_sql_table.py", "copies": "1", "size": "5803", "license": "mit", "hash": -1941595243775246600, "line_mean": 35.26875, "line_max": 91, "alpha_frac": 0.5978972768, "autogenerated": false, "ratio": 3.774886141834743, "config_te...
__author__ = 'rcj1492' __created__ = '2021.03' __license__ = '©2021 Collective Acuity' from labpack.compilers.json import merge_json data_a = { "date": 20210101, "brands": { "new": [ "toothpaste", "floss" ], "old": [ "face cream", "skin cream" ] }, "campaigns": [ { ...
{ "repo_name": "collectiveacuity/labPack", "path": "tests/test_compilers_json.py", "copies": "1", "size": "1764", "license": "mit", "hash": 6384482900991423000, "line_mean": 16.8080808081, "line_max": 73, "alpha_frac": 0.4259784458, "autogenerated": false, "ratio": 3.223034734917733, "config_tes...
__author__ = 'rcj1492' __created__ = '2021.03' __license__ = '©2021 Collective Acuity' from labpack.compilers.yaml import merge_yaml, merge_yaml_strings str_a = """\ # comments at head of file date: 20210101 # comment on key-value pair division: marketing # missing from prune brands: # comment on key to map ...
{ "repo_name": "collectiveacuity/labPack", "path": "tests/test_compilers_yaml.py", "copies": "1", "size": "3088", "license": "mit", "hash": -6083974268549676000, "line_mean": 30.824742268, "line_max": 69, "alpha_frac": 0.6407515387, "autogenerated": false, "ratio": 3.648936170212766, "config_tes...
__author__ = 'rcj1492' __created__ = '2021.03' __license__ = '©2021 Collective Acuity' ''' PLEASE NOTE: git package requires the git command line tool. (all platforms) sudo apt-get install git ''' import re import subprocess from os import devnull try: subprocess.Popen(["git", "--version"], stdout=subproces...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/compilers/git.py", "copies": "1", "size": "4422", "license": "mit", "hash": -946567188605717800, "line_mean": 31.7555555556, "line_max": 92, "alpha_frac": 0.4609816784, "autogenerated": false, "ratio": 4.753763440860215, "config_test": ...
__author__ = 'rcj1492' __created__ = '2015.06' class meetupHandler(object): ''' handles responses from meetup api and usage data''' _class_fields = { 'schema': { 'rate_limits': [ {'requests': 30, 'period': 10} ] } } def __init__(...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/events/meetup.py", "copies": "1", "size": "75146", "license": "mit", "hash": -5739074263100766000, "line_mean": 33.0657956136, "line_max": 184, "alpha_frac": 0.46802225, "autogenerated": false, "ratio": 4.573428275820096, "config_test":...
__author__ = 'rcj1492' __created__ = '2015.07' __license__ = 'MIT' # https://docs.python.org/2/library/random.html from os import urandom from binascii import hexlify from random import SystemRandom, shuffle def random_object(): rand_data = urandom(32) rand_string = hexlify(rand_data).decode() ...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/randomization/randomlab.py", "copies": "1", "size": "1362", "license": "mit", "hash": -3770282332442607600, "line_mean": 25.8367346939, "line_max": 80, "alpha_frac": 0.6556534508, "autogenerated": false, "ratio": 3.4568527918781724, "co...
__author__ = 'rcj1492' __created__ = '2015.09' __license__ = 'MIT' # pip install pytz # pip install tzlocal import uuid import binascii import os import hashlib import base64 from datetime import datetime import pytz class labID(object): ''' a class of methods for uniquely identifying objects ...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/records/id.py", "copies": "1", "size": "2819", "license": "mit", "hash": 9215177090879654000, "line_mean": 32.3780487805, "line_max": 86, "alpha_frac": 0.5814118482, "autogenerated": false, "ratio": 3.6753585397653192, "config_test": fa...
__author__ = 'rcj1492' __created__ = '2015.12' __license__ = 'MIT' ''' PLEASE NOTE: mandrill requires domain verification to send messages SETUP: https://mandrill.zendesk.com/hc/en-us/articles/205582247 ''' # TODO: incorporate rate limiting logic class mandrillHandler(object): ''' handl...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/email/mandrill.py", "copies": "1", "size": "8933", "license": "mit", "hash": 4758741617936688000, "line_mean": 33.3083003953, "line_max": 185, "alpha_frac": 0.5506548752, "autogenerated": false, "ratio": 4.133734382230449, "config_test"...
__author__ = 'rcj1492' __created__ = '2016.03' __license__ = 'MIT' import json from gzip import compress, decompress try: from labpack.encryption import cryptolab except: print('\ndrep methods require the cryptography module. try: pip install cryptography') exit() def dump(json_input, secret...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/compilers/drep.py", "copies": "1", "size": "1389", "license": "mit", "hash": 3760343029562221600, "line_mean": 25.2352941176, "line_max": 90, "alpha_frac": 0.6580273578, "autogenerated": false, "ratio": 3.704, "config_test": false, "h...
__author__ = 'rcj1492' __created__ = '2016.03' __license__ = 'MIT' import os from jsonmodel.validators import jsonModel from labpack import __team__, __module__ from labpack.platforms.localhost import localhostClient class appdataClient(object): ''' a class of methods for managing file storage on loca...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/storage/appdata.py", "copies": "1", "size": "23801", "license": "mit", "hash": -6135242292006462000, "line_mean": 36.3301127214, "line_max": 134, "alpha_frac": 0.536027898, "autogenerated": false, "ratio": 4.431390802457643, "config_tes...
__author__ = 'rcj1492' __created__ = '2016.03' __license__ = 'MIT' import sys from pocketlab.parser import argument_parser from pocketlab import __module__ from importlib import import_module def cli(error=False, command=''): # handle optional error argument if error: argv = ['-h'] else...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/cli.py", "copies": "1", "size": "1857", "license": "mit", "hash": -5303974955611744000, "line_mean": 28.9833333333, "line_max": 85, "alpha_frac": 0.5826602046, "autogenerated": false, "ratio": 3.351985559566787, "config_test": false...
__author__ = 'rcj1492' __created__ = '2016.03' from pocketlab.init import fields_model _home_details = { 'title': 'home', 'description': 'Home adds the service name and working directory to the lab registry. On its first run, it also adds the alias \'home\' to bash config. As a result, on subsequent te...
{ "repo_name": "collectiveacuity/pocketLab", "path": "pocketlab/commands/home.py", "copies": "1", "size": "6840", "license": "mit", "hash": -5388856222665846000, "line_mean": 38.4733727811, "line_max": 385, "alpha_frac": 0.6057017544, "autogenerated": false, "ratio": 4.196319018404908, "config_t...
__author__ = 'rcj1492' __created__ = '2016.07' __license__ = 'MIT' import re from jsonmodel.validators import jsonModel from labpack.compilers.objects import _method_constructor def validate_extension(self, file_name, extension_map, method_title, argument_title): ''' a method to extract (and ...
{ "repo_name": "collectiveacuity/labPack", "path": "labpack/parsing/regex.py", "copies": "1", "size": "8247", "license": "mit", "hash": -5422286028398223000, "line_mean": 35.1486486486, "line_max": 115, "alpha_frac": 0.5041833394, "autogenerated": false, "ratio": 4.032762836185819, "config_test"...