text
stringlengths
0
1.05M
meta
dict
"""AppAssure 5 REST API""" from appassure.api import AppAssureAPI class IReplicationCommunication(AppAssureAPI): """Full documentation online at http://docs.appassure.com/display/AA50D/IReplicationCommunication """ def getConsumedSeedDrives(self, agentId): """Gets identifiers of seed drives c...
{ "repo_name": "rshipp/python-appassure", "path": "appassure/core/IReplicationCommunication.py", "copies": "1", "size": "16750", "license": "bsd-3-clause", "hash": 7876033462815340000, "line_mean": 43.0789473684, "line_max": 153, "alpha_frac": 0.6557014925, "autogenerated": false, "ratio": 4.51725...
"""AppAssure 5 REST API""" from appassure.api import AppAssureAPI class IVirtualDiskManagement(AppAssureAPI): """Full documentation online at http://docs.appassure.com/display/AA50D/IVirtualDiskManagement """ def baseFileName(self, id): """Gets VHD base file name.""" return self.sessi...
{ "repo_name": "rshipp/python-appassure", "path": "appassure/core/IVirtualDiskManagement.py", "copies": "1", "size": "3492", "license": "bsd-3-clause", "hash": -1445433631705768400, "line_mean": 35.7578947368, "line_max": 137, "alpha_frac": 0.5856242841, "autogenerated": false, "ratio": 3.90604026...
# app/auth/forms.py # coding: utf-8 from flask_wtf import FlaskForm from wtforms import PasswordField, StringField, SubmitField, ValidationError from wtforms.validators import DataRequired, Email, EqualTo from app.models import Usuario class RegistrationForm(FlaskForm): """ Formulario para regis...
{ "repo_name": "originaltebas/chmembers", "path": "app/auth/forms.py", "copies": "1", "size": "1605", "license": "mit", "hash": -7484420237145767000, "line_mean": 37.0731707317, "line_max": 77, "alpha_frac": 0.638576779, "autogenerated": false, "ratio": 4.025125628140704, "config_test": false, ...
# app/auth/views.py # coding: utf-8 from flask import flash, redirect, render_template, url_for from flask_login import login_required, login_user, logout_user from app.auth import auth from app.auth.forms import LoginForm, RegistrationForm from app import db from app.models import Usuario @auth.route('...
{ "repo_name": "originaltebas/chmembers", "path": "app/auth/views.py", "copies": "1", "size": "2643", "license": "mit", "hash": -8852431270395165000, "line_mean": 30.5925925926, "line_max": 79, "alpha_frac": 0.6109848485, "autogenerated": false, "ratio": 3.8095238095238093, "config_test": false,...
# app/blog/views.py #################### Imports #################### from flask import render_template, Blueprint, request, redirect, url_for, flash from app import app from app import db from app.models import Blog from .forms import AddArticleForm #################### Config #################### blog_blueprint...
{ "repo_name": "weldon0405/weldon-blog", "path": "app/blog/views.py", "copies": "1", "size": "1622", "license": "mit", "hash": -5773044661729584000, "line_mean": 29.0555555556, "line_max": 108, "alpha_frac": 0.5721331689, "autogenerated": false, "ratio": 4.004938271604939, "config_test": false, ...
# appclient.py # client code to hit the events app services. # Ryan Halbrook, 3/16/16 import requests class CommunityClient: # # host - protocol, host name, and port - i.e. http://localhost:8080 # def __init__(self, host, userid): self.host = host self.userid = userid def post_community(self, name, desc...
{ "repo_name": "ryhal/cs263", "path": "test-scripts/appclient.py", "copies": "1", "size": "1819", "license": "apache-2.0", "hash": 6106992769536030000, "line_mean": 24.6197183099, "line_max": 120, "alpha_frac": 0.6871907642, "autogenerated": false, "ratio": 3.259856630824373, "config_test": fals...
"""Appcommands-compatible command class with extra fixins.""" from __future__ import print_function import cmd import inspect import pdb import shlex import sys import traceback import types import six from google.apputils import app from google.apputils import appcommands import gflags as flags __all__ = [ 'Ne...
{ "repo_name": "wemanuel/smry", "path": "server-auth/ls/google-cloud-sdk/.install/.backup/lib/googlecloudapis/apitools/base/py/app2.py", "copies": "4", "size": "10638", "license": "apache-2.0", "hash": -3409668770886742000, "line_mean": 29.3076923077, "line_max": 77, "alpha_frac": 0.6186313217, "aut...
"""Appcommands-compatible command class with extra fixins.""" import cmd import inspect import pdb import shlex import sys import traceback import types from google.apputils import app from google.apputils import appcommands import gflags as flags __all__ = [ 'NewCmd', 'Repl', ] flags.DEFINE_boolean( 'd...
{ "repo_name": "Plantain/sms-mailinglist", "path": "lib/googlecloudapis/apitools/base/py/app2.py", "copies": "5", "size": "10484", "license": "apache-2.0", "hash": -5698443210297118000, "line_mean": 29.2132564841, "line_max": 80, "alpha_frac": 0.6198969859, "autogenerated": false, "ratio": 3.83187...
"""app/components/base Abstract base class for components #! candidate for moving into utils/components """ from typing import List, Dict, Union from abc import ABC from dash.development.base_component import ComponentMeta from dash_html_components import Div from penn_chime.model.parameters import Parameters fro...
{ "repo_name": "CodeForPhilly/chime", "path": "src/chime_dash/app/components/base.py", "copies": "1", "size": "4180", "license": "mit", "hash": -1858815484225374700, "line_mean": 31.65625, "line_max": 92, "alpha_frac": 0.5655502392, "autogenerated": false, "ratio": 4.7990815154994255, "config_te...
"""App config for questions app. Primarily used to register signal handlers pertaining to habits and questions with the appropriate signals. See: https://docs.djangoproject.com/en/1.7/ref/applications/ """ from django.apps import AppConfig from django.db.models.signals import pre_save, post_save from habits.models ...
{ "repo_name": "prathapsridharan/health_project", "path": "health_project/questions/apps.py", "copies": "1", "size": "4054", "license": "bsd-3-clause", "hash": 3896629979883255300, "line_mean": 35.8545454545, "line_max": 107, "alpha_frac": 0.6470152935, "autogenerated": false, "ratio": 3.939747327...
"""App constants""" import os STUDENT_ROLE = 'student' GRADER_ROLE = 'grader' STAFF_ROLE = 'staff' INSTRUCTOR_ROLE = 'instructor' LAB_ASSISTANT_ROLE = 'lab assistant' ROLE_DISPLAY_NAMES = { STUDENT_ROLE: 'Student', GRADER_ROLE: 'Reader', STAFF_ROLE: 'Teaching Assistant', INSTRUCTOR_ROLE: 'Instructor', ...
{ "repo_name": "Cal-CS-61A-Staff/ok", "path": "server/constants.py", "copies": "1", "size": "1939", "license": "apache-2.0", "hash": -4779185798135428000, "line_mean": 27.5147058824, "line_max": 89, "alpha_frac": 0.6518824136, "autogenerated": false, "ratio": 2.876854599406528, "config_test": fa...
#app = contacts_and_people from django.db import models from django.db.utils import DatabaseError from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.template.defaultfilters import slugify from django.utils.fu...
{ "repo_name": "bubenkoff/Arkestra", "path": "contacts_and_people/models.py", "copies": "2", "size": "35922", "license": "bsd-2-clause", "hash": 6359039068742092000, "line_mean": 32.3847583643, "line_max": 79, "alpha_frac": 0.5892210901, "autogenerated": false, "ratio": 4.122805004016986, "confi...
#!~\app\core\AlchemyEncoder.py # ''' class转JSON ''' # from flask import json import json import datetime import decimal from sqlalchemy.ext.declarative import DeclarativeMeta class AlchemyEncoder(json.JSONEncoder): '''用于把实体类换成JSON''' def default(self, obj): if isinstance(obj.__class__, DeclarativeMeta...
{ "repo_name": "wengzhilai/family", "path": "iSoft/core/AlchemyEncoder.py", "copies": "1", "size": "1842", "license": "bsd-3-clause", "hash": 8176588842107980000, "line_mean": 38.3695652174, "line_max": 150, "alpha_frac": 0.4767955801, "autogenerated": false, "ratio": 4.713541666666667, "config_...
# app/data.py from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() class CRUDMixin(object): __table_args__ = {'extend_existing': True} id = db.Column(db.Integer, primary_key=True) @classmethod def create(cls, commit=True, **kwargs): instance = cls(**kwargs) return instance...
{ "repo_name": "ChristopherGS/sensor_readings", "path": "app/data.py", "copies": "2", "size": "1496", "license": "bsd-3-clause", "hash": 7612089036492883000, "line_mean": 26.2, "line_max": 76, "alpha_frac": 0.6129679144, "autogenerated": false, "ratio": 3.6666666666666665, "config_test": false, ...
"""appdecodeweb URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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') Clas...
{ "repo_name": "amitt001/Analytics-App", "path": "appdecodeweb/loginapp/urls.py", "copies": "1", "size": "1397", "license": "mit", "hash": -2133708601018016000, "line_mean": 42.65625, "line_max": 164, "alpha_frac": 0.6986399427, "autogenerated": false, "ratio": 3.4925, "config_test": false, "h...
"""App Decorators Module.""" # standard library import inspect from typing import List, Union # third-party import wrapt # first-party from tcex.validators import ( ValidationError, equal_to, greater_than, greater_than_or_equal, in_range, less_than, less_than_or_equal, not_in, to_b...
{ "repo_name": "kstilwell/tcex", "path": "tcex/decorators/iterate_on_arg.py", "copies": "1", "size": "9362", "license": "apache-2.0", "hash": 380250635784333250, "line_mean": 40.0614035088, "line_max": 100, "alpha_frac": 0.5447553941, "autogenerated": false, "ratio": 4.4411764705882355, "config_...
"""App Decorators Module.""" # standard library import traceback # third-party import wrapt class OnException: """Set exit message on failed execution. This decorator will catch the generic "Exception" error, log the supplied error message, set the "exit_message", and exit the App with an exit code of 1...
{ "repo_name": "ThreatConnect-Inc/tcex", "path": "tcex/decorators/on_exception.py", "copies": "1", "size": "3495", "license": "apache-2.0", "hash": -2333689307785447000, "line_mean": 40.1176470588, "line_max": 98, "alpha_frac": 0.591702432, "autogenerated": false, "ratio": 4.6414342629482075, "c...
"""App Decorators Module.""" # third-party import wrapt class FailOnOutput: """Fail App if return value (output) value conditions are met. This decorator allows for the App to exit on conditions defined in the function parameters. .. code-block:: python :linenos: :lineno-start: 1 ...
{ "repo_name": "ThreatConnect-Inc/tcex", "path": "tcex/decorators/fail_on_output.py", "copies": "2", "size": "4436", "license": "apache-2.0", "hash": -950284157555992300, "line_mean": 40.0740740741, "line_max": 98, "alpha_frac": 0.5651487827, "autogenerated": false, "ratio": 4.654774396642183, "...
"""App Decorators Module.""" # third-party import wrapt class Output: """Store the method return value in self.<attribute>. This decorator will write, append, or extend the methods return value to the App attribute provided in the ``attribute`` input. The ``attribute`` must first be defined in the ``...
{ "repo_name": "kstilwell/tcex", "path": "tcex/decorators/output.py", "copies": "2", "size": "3482", "license": "apache-2.0", "hash": 7295546613414043000, "line_mean": 36.0425531915, "line_max": 94, "alpha_frac": 0.5784032165, "autogenerated": false, "ratio": 4.890449438202247, "config_test": fa...
"""App Decorators Module.""" # third-party import wrapt class WriteOutput: """Write the App output variables to Redis. This decorator will take the functions return value and write the data to Redis using the key and variable_type. An optional hard coded value can be passed, which will override the r...
{ "repo_name": "kstilwell/tcex", "path": "tcex/decorators/write_output.py", "copies": "2", "size": "3168", "license": "apache-2.0", "hash": 7618613519920011000, "line_mean": 39.1012658228, "line_max": 97, "alpha_frac": 0.6268939394, "autogenerated": false, "ratio": 4.785498489425982, "config_tes...
"""App demonstrating a flask API using flask-restful with swagger.""" import json from flask import Flask, request from flasgger import Swagger from flask_restful import Api, Resource from webargs import fields from webargs.flaskparser import use_kwargs, parser, abort app = Flask(__name__) api = Api(app) swagger = S...
{ "repo_name": "tiagoprn/experiments", "path": "flask/flask_restful_api_with_swagger/app.py", "copies": "1", "size": "1921", "license": "mit", "hash": 1226191357147621400, "line_mean": 21.0804597701, "line_max": 69, "alpha_frac": 0.5663716814, "autogenerated": false, "ratio": 4.395881006864989, ...
# app/draw.py import colorsys import itertools import logging from palettable import colorbrewer from radon.complexity import cc_rank from app import models from app.grid import ImageGrid from app.hilbert import int_to_Hilbert as get_xy from app.utils import make_step_iter COLOR_CC_UNKNOWN = 'gray' logger = loggi...
{ "repo_name": "johntellsall/shotglass", "path": "shotglass/app/draw.py", "copies": "1", "size": "5423", "license": "mit", "hash": 1775028560574150700, "line_mean": 28.3135135135, "line_max": 71, "alpha_frac": 0.6075972709, "autogenerated": false, "ratio": 3.4919510624597554, "config_test": fals...
# app.dynamic.py # # Dynamic content block rendering methods import logging from yacon.models.pages import Page, PageType from yacon.utils import SummarizedPage logger = logging.getLogger(__name__) # ============================================================================ NEWS_PAGE_TYPE = None # =============...
{ "repo_name": "cltrudeau/django-yacon", "path": "extras/sample_site/app/dynamic.py", "copies": "1", "size": "1028", "license": "mit", "hash": 7505094544898433000, "line_mean": 25.358974359, "line_max": 78, "alpha_frac": 0.5525291829, "autogenerated": false, "ratio": 3.8646616541353382, "config_...
"""Appearance helpers.""" THEME_SETTINGS = { "General": { "preview": """ <div style='background: var(--BACKGROUND-COLOR);'> <p>This is text on the page background.</p> <p>This is text on the page background.</p> </div> """, "variab...
{ "repo_name": "jscott1989/happening", "path": "src/happening/appearance.py", "copies": "2", "size": "7894", "license": "mit", "hash": -7470555497116486000, "line_mean": 35.3778801843, "line_max": 77, "alpha_frac": 0.3824423613, "autogenerated": false, "ratio": 4.961659333752357, "config_test": ...
# Appendix C10 - tables.py from sqlalchemy import Table, Column, Integer, String, Text from sqlalchemy import ForeignKey from sqlalchemy.orm import relationship, backref from .base import Base class Topic(Base): __tablename__ = 'topics' id = Column(Integer, primary_key=True) title = Column...
{ "repo_name": "jackscotti/klassify", "path": "src/tables.py", "copies": "1", "size": "3085", "license": "mit", "hash": 1970663791015250000, "line_mean": 29.5445544554, "line_max": 98, "alpha_frac": 0.6204213938, "autogenerated": false, "ratio": 3.780637254901961, "config_test": false, "has_no...
# Appendix C17 - test_measure_calculator.py from klassify.src.measure_calculator import MeasureCalculator from klassify.src.tables import Topic, Subtopic first_set = { "BernoulliNB": { "cross score": 3, "precision": 1, "cross variance": 1 }, "MultinomialNB": { "cross score": 2, "precision"...
{ "repo_name": "jackscotti/klassify", "path": "test/test_measure_calculator.py", "copies": "1", "size": "1321", "license": "mit", "hash": -1986737451705257500, "line_mean": 28.3555555556, "line_max": 97, "alpha_frac": 0.5647236942, "autogenerated": false, "ratio": 3.1908212560386473, "config_tes...
# Appendix C19 - test_topic_importer.py from klassify.src.topic_importer import TopicImporter from klassify.src.tables import Topic, Subtopic IMPORTER = TopicImporter() def test_make_topic(): topic_fixture = {'base_path': '/topic/working-sea', 'web_url': 'https://www.gov.uk/topic/working-sea', 'content_id': '077...
{ "repo_name": "jackscotti/klassify", "path": "test/test_topic_importer.py", "copies": "1", "size": "2661", "license": "mit", "hash": -2646005243701885400, "line_mean": 48.2777777778, "line_max": 377, "alpha_frac": 0.707628711, "autogenerated": false, "ratio": 3.330413016270338, "config_test": f...
# Appendix C2 - topic_importer.py import requests from .tables import Topic, Subtopic from .db_handler import DBHandler class TopicImporter: def __init__(self): self.session = DBHandler(echo=False).session self.API_URL = "https://www.gov.uk/api/content" def make_topic(self, topic_data): ...
{ "repo_name": "jackscotti/klassify", "path": "src/topic_importer.py", "copies": "1", "size": "1808", "license": "mit", "hash": 3105240429772660000, "line_mean": 38.3043478261, "line_max": 87, "alpha_frac": 0.6150442478, "autogenerated": false, "ratio": 3.7355371900826446, "config_test": false, ...
# Appendix C3 - doc_importer.py import math from .tables import Subtopic, Document from .db_handler import DBHandler import requests import sqlalchemy import time class DocumentImporter(object): def __init__(self, db_name="klassify"): self.ROOT_URL = "https://www.gov.uk/api/search.json?reject_specialist_s...
{ "repo_name": "jackscotti/klassify", "path": "src/document_importer.py", "copies": "1", "size": "3546", "license": "mit", "hash": 2298767884365788200, "line_mean": 34.1089108911, "line_max": 113, "alpha_frac": 0.5987027637, "autogenerated": false, "ratio": 4.075862068965518, "config_test": fals...
# Appendix C4 - content_importer.py from .db_handler import DBHandler from .tables import Document from bs4 import BeautifulSoup import requests import time # Future implementation: Tuning features by adding Documents' to their content. Maybe with a multiplier. class ContentImporter(object): def __init__(self, db...
{ "repo_name": "jackscotti/klassify", "path": "src/content_importer.py", "copies": "1", "size": "4002", "license": "mit", "hash": -4758150407819212000, "line_mean": 37.7961165049, "line_max": 110, "alpha_frac": 0.5713213213, "autogenerated": false, "ratio": 4.128099173553719, "config_test": fals...
# Appendix C5 - feature_extractor.py from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.stem import PorterStemmer import nltk class FeatureExtractor(): def __init__(self, documents, n_features=5000): self.documents = documents self.stemmer = PorterStemmer() ...
{ "repo_name": "jackscotti/klassify", "path": "src/feature_extractor.py", "copies": "1", "size": "2403", "license": "mit", "hash": 382910867796219500, "line_mean": 35.9692307692, "line_max": 317, "alpha_frac": 0.5771951727, "autogenerated": false, "ratio": 4.059121621621622, "config_test": false...
# Appendix C6 - doc_operator.py from .db_handler import DBHandler from .tables import Topic, Subtopic, Document from .feature_extractor import FeatureExtractor import random class DocumentOperator(): def __init__(self, db_name="klassify", n=3, min_docs=None, max_docs=None, n_features=None): self.DBH = DBH...
{ "repo_name": "jackscotti/klassify", "path": "src/doc_operator.py", "copies": "1", "size": "2699", "license": "mit", "hash": -3724789807349597700, "line_mean": 38.115942029, "line_max": 98, "alpha_frac": 0.6268988514, "autogenerated": false, "ratio": 3.7907303370786516, "config_test": false, ...
# Appendix C9 - measure_calculator.py class MeasureCalculator(): def __init__(self): self.measures = { "BernoulliNB": { "cross score": [], "cross variance": [], "precision": [], "recall": [], "f1": [] },...
{ "repo_name": "jackscotti/klassify", "path": "src/measure_calculator.py", "copies": "1", "size": "2142", "license": "mit", "hash": 5420634201356844000, "line_mean": 39.4150943396, "line_max": 98, "alpha_frac": 0.5401493931, "autogenerated": false, "ratio": 4.292585170340681, "config_test": fals...
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or...
{ "repo_name": "bob-white/UnityIronPythonConsole", "path": "Assets/IronPythonConsole/Plugins/Lib/site.py", "copies": "41", "size": "20474", "license": "mpl-2.0", "hash": -8330547354566737000, "line_mean": 32.0759289176, "line_max": 90, "alpha_frac": 0.6002246752, "autogenerated": false, "ratio": 4...
"""Append module search paths for third-party packages to sys.path. This is stripped down for use in py2app applications """ import sys, os def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) for m in sys.modules.values(): f = getattr(m, '__file__', None)...
{ "repo_name": "kamitchell/py2app", "path": "py2app/bundletemplate/lib/site.py", "copies": "2", "size": "3042", "license": "mit", "hash": -4905018189261406000, "line_mean": 25.9203539823, "line_max": 74, "alpha_frac": 0.6101249178, "autogenerated": false, "ratio": 3.433408577878104, "config_test...
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scri...
{ "repo_name": "ericlink/adms-server", "path": "playframework-dist/1.1-src/python/Lib/site.py", "copies": "2", "size": "14828", "license": "mit", "hash": 3030137560166605000, "line_mean": 32.9716981132, "line_max": 84, "alpha_frac": 0.5613029404, "autogenerated": false, "ratio": 4.220893822943354,...
"append more urls to the urlconf tuple for all the model filters in more_django_filters" from os.path import basename, dirname from django.db.models import get_app, get_models from django.conf.urls import url, patterns, include #from pug.db import more_django_filters from pug.nlp.util import listify def append_urls...
{ "repo_name": "hobson/pug-dj", "path": "pug/dj/more_django_filters_urls.py", "copies": "1", "size": "1417", "license": "mit", "hash": -2505073002687481300, "line_mean": 39.4857142857, "line_max": 120, "alpha_frac": 0.6450247001, "autogenerated": false, "ratio": 3.6240409207161126, "config_test"...
# append paper number to links below to get details # for eg : http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6196220 details_link = 'http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=' authors_link = 'http://ieeexplore.ieee.org/xpl/abstractAuthors.jsp?arnumber=' references_link = 'http://ieeexplor...
{ "repo_name": "SciBase-Project/internationality-journals", "path": "src/ieeexplore_citations.py", "copies": "3", "size": "3387", "license": "mit", "hash": 5290525828017560000, "line_mean": 24.4661654135, "line_max": 95, "alpha_frac": 0.5904930617, "autogenerated": false, "ratio": 3.36679920477137...
#Append path and import from linkedin import linkedin import urllib ######################### #Import secrets from secrets import secret #Info I don't want on Linkedin, but want on a submitted CV: from person_info import person_info ####################### #Load auth keys CONSUMER_KEY = secret['API_KEY'] CONSUMER_SE...
{ "repo_name": "osheadavid7/py-resume", "path": "fetch_linkedin.py", "copies": "1", "size": "1775", "license": "mit", "hash": 9078738610046150000, "line_mean": 31.8703703704, "line_max": 207, "alpha_frac": 0.6354929577, "autogenerated": false, "ratio": 3.69022869022869, "config_test": false, "...
"""Append result to shapefile """ '''import logging import shapefile def write_result_shapefile(lad_geometry_shp, out_shape, field_names, csv_results): """ Join result attributes to LAD geography with pyhape library Arguments --------- lad_geometry_shp : str Path to LAD shapefile o...
{ "repo_name": "nismod/energy_demand", "path": "energy_demand/geography/write_shp.py", "copies": "1", "size": "2730", "license": "mit", "hash": -4208327431675163600, "line_mean": 26.8571428571, "line_max": 87, "alpha_frac": 0.5875457875, "autogenerated": false, "ratio": 4.002932551319648, "confi...
# Appends attachments from one feature class into a new empty feature class. Assumes attachments related by GLOBALID. #START OF VARIABLES TO CHANGE GDB_location = r"path\to\file.gdb" source = "sourceFeatureClass" target = "emptyTargetFeatureClass" source_attachment = "sourceAttachments__ATTACH" #END OF VARIABLES TO...
{ "repo_name": "briantwatson/developer-support", "path": "python/arcpy-python/append-attachments/appendAttachments.py", "copies": "8", "size": "3633", "license": "apache-2.0", "hash": 1019858980843110400, "line_mean": 33.9326923077, "line_max": 117, "alpha_frac": 0.7145609689, "autogenerated": false...
# Appends episode names # Expects a file containing the list of episode names, one per line in chronological order # Has no validations, tread carefully # 25-March-2015 ############################################ # Imports ############################################ import os import re import sys import glob #####...
{ "repo_name": "adithyap/rename-utils", "path": "name_appender.py", "copies": "1", "size": "5129", "license": "mit", "hash": -609845716046894200, "line_mean": 25.7135416667, "line_max": 123, "alpha_frac": 0.6262429323, "autogenerated": false, "ratio": 3.6170662905500706, "config_test": false, ...
"""Appends XML elements specifying optional dependencies to a plugin XML file. """ import argparse from itertools import izip from xml.dom.minidom import parse parser = argparse.ArgumentParser() parser.add_argument( "--plugin_xml", help="The main plugin xml file", required=True) parser.add_argument("--output", h...
{ "repo_name": "brendandouglas/intellij", "path": "build_defs/append_optional_xml_elements.py", "copies": "1", "size": "1145", "license": "apache-2.0", "hash": -4176464733141390000, "line_mean": 23.8913043478, "line_max": 78, "alpha_frac": 0.6943231441, "autogenerated": false, "ratio": 3.623417721...
"""AppEngine Datastore models for the Chrome Experience Sampling backend. These classes define the data models for form and survey responses. """ from google.appengine.ext import ndb package = 'ChromeExperienceSampling' class ResponseModel(ndb.Model): question = ndb.TextProperty() answer = ndb.TextProperty() ...
{ "repo_name": "moduloprime/experience-sampling", "path": "backend/models.py", "copies": "4", "size": "1141", "license": "apache-2.0", "hash": 4492196681260452000, "line_mean": 32.5588235294, "line_max": 73, "alpha_frac": 0.6985100789, "autogenerated": false, "ratio": 4.305660377358491, "config_...
# AppEngine imports from google.appengine.ext import db # Django imports from django.contrib.sites.models import Site # Python #import logging import random import math import csv # Local imports import models # skip: il1o0, uppercase _rchars = "abcdefghjkmnpqrstuvwxyz23456789" # Return NaN in a ...
{ "repo_name": "avastjohn/maventy_new", "path": "healthdb/util.py", "copies": "1", "size": "4799", "license": "bsd-3-clause", "hash": -1376725913665096700, "line_mean": 27.0848484848, "line_max": 81, "alpha_frac": 0.6236715982, "autogenerated": false, "ratio": 3.2668481960517357, "config_test": ...
# AppEngine ndb Models for Users/Authentication, etc from google.appengine.ext import ndb class AuthUserEntity(ndb.Model): """ Persistance model representing a system user # TODO: Consider adding profile img """ username = ndb.StringProperty() email = ndb.StringProperty() first_name = n...
{ "repo_name": "digibodies/auth_core", "path": "auth_core/internal/entities.py", "copies": "1", "size": "1574", "license": "mit", "hash": 8380421622861622000, "line_mean": 26.6140350877, "line_max": 98, "alpha_frac": 0.6365946633, "autogenerated": false, "ratio": 3.935, "config_test": false, "...
APPENGINE_PATH = '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/' APPENGINE_LIB_PATH = APPENGINE_PATH + 'lib/' APPENGINE_LIBS = [ APPENGINE_PATH, APPENGINE_LIB_PATH + 'antlr3/', APPENGINE_LIB_PATH + 'cacerts/', APPENGINE_L...
{ "repo_name": "selkhateeb/tic", "path": "src/tic/development/appengine/server/__init__.py", "copies": "1", "size": "3235", "license": "apache-2.0", "hash": 5922542109299983000, "line_mean": 34.5494505495, "line_max": 147, "alpha_frac": 0.657496136, "autogenerated": false, "ratio": 3.6553672316384...
# App engine platform import appengine_config import json import logging import quopri import urllib import webapp2 from google.appengine.api import urlfetch from google.appengine.ext import blobstore from google.appengine.ext.webapp import template, blobstore_handlers # Sessions from gaesessions import get_current_s...
{ "repo_name": "rhefner1/ghidonations", "path": "mooha.py", "copies": "1", "size": "30531", "license": "apache-2.0", "hash": 8108650885693614000, "line_mean": 34.2551963048, "line_max": 120, "alpha_frac": 0.5611018309, "autogenerated": false, "ratio": 4.231014412416852, "config_test": false, "...
# App engine platform import appengine_config import json import logging import webapp2 from datetime import datetime, timedelta import DataModels as models import GlobalUtilities as tools from google.appengine.api import mail, taskqueue from google.appengine.ext import deferred from google.appengine.ext.webapp import...
{ "repo_name": "rhefner1/ghidonations", "path": "tasks.py", "copies": "1", "size": "9878", "license": "apache-2.0", "hash": 7980986925675388000, "line_mean": 31.7086092715, "line_max": 119, "alpha_frac": 0.5664102045, "autogenerated": false, "ratio": 3.944888178913738, "config_test": false, "h...
# App Engine platform import cStringIO import csv import gc import logging from google.appengine.api import memcache, taskqueue # Application files import GlobalUtilities as tools # Pipeline API import pipeline # Google Cloud Storage import cloudstorage as gcs my_default_retry_params = gcs.RetryParams(initial_delay...
{ "repo_name": "rhefner1/ghidonations", "path": "spreadsheet_pipelines.py", "copies": "1", "size": "6935", "license": "apache-2.0", "hash": 7837743230372926000, "line_mean": 31.2558139535, "line_max": 99, "alpha_frac": 0.5339581831, "autogenerated": false, "ratio": 3.960593946316391, "config_tes...
"""App Engine settings. Reads app keys and secrets into constants from these files: dropbox_app_key dropbox_app_secret facebook_app_id facebook_app_secret facebook_app_id_local facebook_app_secret_local google_client_id google_client_secret instagram_client_id instagram_client_secret instagram_client_id_local instagr...
{ "repo_name": "kylewm/oauth-dropins", "path": "appengine_config.py", "copies": "1", "size": "3185", "license": "unlicense", "hash": 4188830888068553000, "line_mean": 30.85, "line_max": 78, "alpha_frac": 0.7491365777, "autogenerated": false, "ratio": 3.053691275167785, "config_test": false, "h...
# APP_ENV should be switched to production APP_ENV = "production" # Disable DEBUG DEBUG = False # Hosts/domain names that are valid for this site; required if DEBUG is False # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts # Replace ci.vecnet.org with actual hostname ALLOWED_HOSTS = ["ci.vecnet....
{ "repo_name": "tph-thuering/vnetsource", "path": "VECNet/doc/deployment/settings_local_example.py", "copies": "3", "size": "1274", "license": "mpl-2.0", "hash": 8306415885730285000, "line_mean": 27.9545454545, "line_max": 77, "alpha_frac": 0.751177394, "autogenerated": false, "ratio": 3.153465346...
# app/extras/forms.py # coding: utf-8 from flask_wtf import FlaskForm from wtforms import StringField, SubmitField from wtforms.validators import DataRequired class EstadoCivilForm(FlaskForm): """ Form para agregar o modificar EstadoCivil """ nombre_ec = StringField(u'Nombre', validators=...
{ "repo_name": "originaltebas/chmembers", "path": "app/extras/forms.py", "copies": "1", "size": "1223", "license": "mit", "hash": 4443949621216292400, "line_mean": 27.0238095238, "line_max": 67, "alpha_frac": 0.6817063167, "autogenerated": false, "ratio": 3.2857142857142856, "config_test": false...
# app/extras/views.py # coding: utf-8 from flask import flash from flask import redirect, render_template, url_for from flask_login import current_user, login_required from app.extras import extras from app.extras.forms import EstadoCivilForm, TipoMiembroForm, RolFamiliarForm from app.extras.forms import Tip...
{ "repo_name": "originaltebas/chmembers", "path": "app/extras/views.py", "copies": "1", "size": "13995", "license": "mit", "hash": 5168303634307323000, "line_mean": 29.9429223744, "line_max": 79, "alpha_frac": 0.61189336, "autogenerated": false, "ratio": 3.1250837614473976, "config_test": false,...
# app/familias/forms.py # coding: utf-8 from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, HiddenField, SelectField from wtforms.validators import InputRequired, Length class FamiliasForm(FlaskForm): """ Formulario para familias """ id = HiddenField("id") ...
{ "repo_name": "originaltebas/chmembers", "path": "app/familias/forms.py", "copies": "1", "size": "2788", "license": "mit", "hash": -5743181648455708000, "line_mean": 35.0933333333, "line_max": 74, "alpha_frac": 0.502875629, "autogenerated": false, "ratio": 4.091176470588235, "config_test": fals...
# app/familias/views.py # coding: utf-8 from flask import flash, jsonify from flask import redirect, render_template, url_for, request from flask_login import current_user, login_required from sqlalchemy import func, or_ from app.familias import familias from app.familias.forms import FamiliasForm from app....
{ "repo_name": "originaltebas/chmembers", "path": "app/familias/views.py", "copies": "1", "size": "12305", "license": "mit", "hash": 6258288862185953000, "line_mean": 38.2026143791, "line_max": 79, "alpha_frac": 0.4800845391, "autogenerated": false, "ratio": 3.6171714201705383, "config_test": fa...
# App for browsing the server. import os import time from stat import * from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render_to_response from django.template import RequestConte...
{ "repo_name": "vitorio/ocropodium", "path": "ocradmin/filebrowser/views.py", "copies": "1", "size": "2187", "license": "apache-2.0", "hash": -2592366683541191700, "line_mean": 24.1379310345, "line_max": 67, "alpha_frac": 0.5939643347, "autogenerated": false, "ratio": 3.9193548387096775, "config...
# APPFS Ex8 # by Tam Tran '''This program will generate the steiner tree, which is the minimum subgraph of G spanning all the terminal nodes''' import sys import networkx as nx from sympy import sieve import time from resource import getrusage as resource_usage, RUSAGE_SELF import heapq def run(graphfile): '''re...
{ "repo_name": "appfs/appfs", "path": "Tam/exercise8/ex8documentation/ex8.py", "copies": "4", "size": "3423", "license": "mit", "hash": 2061045415334643500, "line_mean": 39.75, "line_max": 159, "alpha_frac": 0.6231375986, "autogenerated": false, "ratio": 3.1723818350324375, "config_test": false,...
# APPFS Exercise 2 # by Tam Tran # in Python3 # 2 goals: # 1) read XML to extract desired information and write it into an CSV # 2) validate the XML against its XSD schema # DEFINE FUNCTIONS HERE import sys, csv from bs4 import BeautifulSoup as Soup from lxml import etree #import pdb def read_XML(file_XML): '''...
{ "repo_name": "frodo4fingers/appfs", "path": "Tam/exercise2code.py", "copies": "3", "size": "3582", "license": "mit", "hash": -1873519125606626300, "line_mean": 29.1008403361, "line_max": 143, "alpha_frac": 0.598548297, "autogenerated": false, "ratio": 4.033783783783784, "config_test": false, ...
# APPFS Exercise 5 # by Tam Tran # in Python3 # 3 goals: # 1) read in graph as CSV and extract its edge information to distances between vertices # 2) update the distance between the vertices anytime a shorter distance is found (shortest path) # 3) return the longest shortest path import sys import pandas as pd impor...
{ "repo_name": "FirstSanny/appfs", "path": "Tam/ex5.py", "copies": "2", "size": "2851", "license": "mit", "hash": -3769262805365254700, "line_mean": 35.0886075949, "line_max": 112, "alpha_frac": 0.6373202385, "autogenerated": false, "ratio": 3.7612137203166225, "config_test": true, "has_no_key...
# app/ggcc/forms.py # coding: utf-8 from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, HiddenField from wtforms.validators import InputRequired, Length class GGCCForm(FlaskForm): """ Formulario para gruposcaseros """ id = HiddenField("id") id_direccion = Hi...
{ "repo_name": "originaltebas/chmembers", "path": "app/ggcc/forms.py", "copies": "1", "size": "2480", "license": "mit", "hash": -5265926113339010000, "line_mean": 34.9402985075, "line_max": 72, "alpha_frac": 0.5050505051, "autogenerated": false, "ratio": 4.118136439267887, "config_test": false, ...
# app/ggcc/views.py # coding: utf-8 from flask import flash, jsonify from flask import redirect, render_template, url_for, request from flask_login import current_user, login_required from sqlalchemy import func, or_ from app.ggcc import ggcc from app.ggcc.forms import GGCCForm, DireccionModalForm, Asignacio...
{ "repo_name": "originaltebas/chmembers", "path": "app/ggcc/views.py", "copies": "1", "size": "14704", "license": "mit", "hash": -6348897118569564000, "line_mean": 34.476426799, "line_max": 79, "alpha_frac": 0.5153741497, "autogenerated": false, "ratio": 3.4571966133584198, "config_test": false,...
# app/home/views.py from flask import Blueprint, render_template home = Blueprint( 'home', __name__, template_folder='templates', static_folder='static' ) @home.route('/') def index(): return render_template('home.html') @home.route('/developers') def developers(): developers = [ {...
{ "repo_name": "lusac/coders", "path": "coders/home/views.py", "copies": "1", "size": "1164", "license": "mit", "hash": 2523670560307702000, "line_mean": 23.7659574468, "line_max": 68, "alpha_frac": 0.5042955326, "autogenerated": false, "ratio": 3.5925925925925926, "config_test": false, "has_n...
# app/home/views.py # coding: utf-8 from flask_login import current_user, login_required, user_logged_in from flask import redirect, url_for, render_template from app.home import home from app import db from app.models import Miembro, Familia, GrupoCasero from sqlalchemy import and_, func @home.route(...
{ "repo_name": "originaltebas/chmembers", "path": "app/home/views.py", "copies": "1", "size": "4472", "license": "mit", "hash": -5548658753815193000, "line_mean": 29.7092198582, "line_max": 83, "alpha_frac": 0.5752628047, "autogenerated": false, "ratio": 3.3069526627218937, "config_test": false,...
# app imports from oweb.models import Supply1, Supply2, Supply3, Supply4, Supply12, Station14, Station15, Civil212, Research113, Research122 from oweb.libs.production import get_metal_production, get_crystal_production, get_deuterium_production, get_plasma_bonus, get_capacity, get_sat_production, get_energy_production ...
{ "repo_name": "Mischback/django-oweb", "path": "oweb/libs/queue.py", "copies": "1", "size": "13231", "license": "mit", "hash": 620875766741333600, "line_mean": 33.4557291667, "line_max": 178, "alpha_frac": 0.6086463608, "autogenerated": false, "ratio": 3.589527943570266, "config_test": false, ...
# app imports from oweb.models.planet import Moon from oweb.models.building import Building, Supply1, Supply2, Supply3, Supply4, Supply12 from oweb.models.defense import Defense from oweb.models.ship import Ship, Civil202, Civil203, Civil208, Civil210, Civil212 from oweb.models.research import Research from oweb.libs.s...
{ "repo_name": "Mischback/django-oweb", "path": "oweb/libs/points.py", "copies": "1", "size": "3265", "license": "mit", "hash": 1011170595512014300, "line_mean": 33.0104166667, "line_max": 119, "alpha_frac": 0.6732006126, "autogenerated": false, "ratio": 3.1124880838894184, "config_test": false,...
"""App Info handler.""" import logging import six from tornado.web import RequestHandler from tornado.httpclient import AsyncHTTPClient, HTTPError from tornado.escape import json_encode, json_decode from tornado import gen str = six.text_type log = logging.getLogger('tornadoappinfo.handlers') class InfoHandler(Re...
{ "repo_name": "adamkal/tornado-app-info", "path": "tornadoappinfo/handlers.py", "copies": "1", "size": "2129", "license": "mit", "hash": 9053286779728882000, "line_mean": 27.0131578947, "line_max": 75, "alpha_frac": 0.4899013621, "autogenerated": false, "ratio": 4.731111111111111, "config_test"...
# app/__init__.py from flask import Flask, render_template, jsonify from flask_nav import Nav, register_renderer from flask_nav.elements import * from flask_bootstrap.nav import BootstrapRenderer from flask_sqlalchemy import SQLAlchemy from sqlalchemy import MetaData from flask_login import LoginManager, current_user ...
{ "repo_name": "jacobsky/shopping-aggregator", "path": "shopping-aggregator/app/__init__.py", "copies": "1", "size": "3371", "license": "apache-2.0", "hash": -6227787028023402000, "line_mean": 31.4134615385, "line_max": 152, "alpha_frac": 0.7522990211, "autogenerated": false, "ratio": 3.4362895005...
# app/__init__.py ################# #### imports #### ################# import os from flask import Flask, render_template from flask_login import LoginManager from flask_bcrypt import Bcrypt from flask_debugtoolbar import DebugToolbarExtension from flask_bootstrap import Bootstrap bcrypt = Bcrypt() from models im...
{ "repo_name": "paris3200/flask-inventory", "path": "app/__init__.py", "copies": "2", "size": "1834", "license": "mit", "hash": 4404304111102660600, "line_mean": 19.606741573, "line_max": 62, "alpha_frac": 0.6275899673, "autogenerated": false, "ratio": 3.5611650485436894, "config_test": false, ...
"""App is defined here""" # pylint: disable=invalid-name import traceback from flask import jsonify from flask_cors import CORS import connexion from todo.config import DEBUG, HOST from todo.database import session, create_tables from todo.exceptions import NotFoundError, UnauthorizedError def handle_general_except...
{ "repo_name": "kokimoribe/todo-api", "path": "app.py", "copies": "1", "size": "1278", "license": "mit", "hash": 5678454548221348000, "line_mean": 25.0816326531, "line_max": 71, "alpha_frac": 0.7269170579, "autogenerated": false, "ratio": 3.736842105263158, "config_test": false, "has_no_keywor...
"""AppKit helpers. Exported functions: * runEventLoop - run NSApplicationMain in a safer way * runConsoleEventLoop - run NSRunLoop.run() in a stoppable manner * stopEventLoop - stops the event loop or terminates the application * endSheetMethod - set correct signature for NSSheet callbacks * callAfter - call a functio...
{ "repo_name": "ariabuckles/pyobjc-framework-Cocoa", "path": "Lib/PyObjCTools/AppHelper.py", "copies": "3", "size": "8256", "license": "mit", "hash": -6282494759951106000, "line_mean": 30.391634981, "line_max": 112, "alpha_frac": 0.6436531008, "autogenerated": false, "ratio": 4.055009823182711, ...
# apple/controllers.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from apple.models import AppleUser from voter.controllers import voter_merge_two_accounts_action from voter.models import VoterManager from wevote_functions.functions import positive_value_exists import wevote_functions.admin from .jwt...
{ "repo_name": "wevote/WeVoteServer", "path": "apple/controllers.py", "copies": "1", "size": "10509", "license": "mit", "hash": 1746876343021738500, "line_mean": 42.2469135802, "line_max": 117, "alpha_frac": 0.5897801884, "autogenerated": false, "ratio": 3.3564356435643563, "config_test": false,...
""" Apple homekit accessory for CO2meter (c) Vladimir Filimonov, 2018 E-mail: vladimir.a.filimonov@gmail.com """ import logging import signal from pyhap.accessory_driver import AccessoryDriver from pyhap.accessory import Accessory, Category import pyhap.loader as loader import co2meter as co2 ##############...
{ "repo_name": "vfilimonov/co2meter", "path": "co2meter/homekit.py", "copies": "1", "size": "6282", "license": "mit", "hash": 4428583365632395300, "line_mean": 40.6026490066, "line_max": 91, "alpha_frac": 0.5842088507, "autogenerated": false, "ratio": 4.253215978334461, "config_test": false, "...
"""Apple HomeKit encryption helper methods. The variables in this file follow the names given in the SRP paper: T. Wu, SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, Submission to the IEEE P1363 Working Group, Oct 2002. https://tools.ietf.org/html/rfc5054#ref-SRP-RFC https://tools.ietf.o...
{ "repo_name": "henridwyer/pyhomekit", "path": "pyhomekit/pairing.py", "copies": "1", "size": "18343", "license": "mit", "hash": 3388822687376194000, "line_mean": 35.7595190381, "line_max": 97, "alpha_frac": 0.6133129804, "autogenerated": false, "ratio": 3.3405572755417956, "config_test": false,...
# apple/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from datetime import date from django.db import models from wevote_functions.functions import positive_value_exists from exception.models import handle_exception, print_to_log import wevote_functions.admin logger = wevote_functions.admin....
{ "repo_name": "wevote/WeVoteServer", "path": "apple/models.py", "copies": "1", "size": "2495", "license": "mit", "hash": -5487473651152214000, "line_mean": 52.085106383, "line_max": 120, "alpha_frac": 0.7018036072, "autogenerated": false, "ratio": 3.626453488372093, "config_test": false, "has...
# ApplePy - an Apple ][ emulator in Python # James Tauber / http://jtauber.com/ # originally written 2001, updated 2011 import BaseHTTPServer import json import re import select import socket import struct import sys bus = None # socket for bus I/O def signed(x): if x > 0x7F: x = x - 0x100 return...
{ "repo_name": "jtauber/applepy", "path": "cpu6502.py", "copies": "1", "size": "43783", "license": "mit", "hash": 8670298023766364000, "line_mean": 34.6248982913, "line_max": 197, "alpha_frac": 0.5504191124, "autogenerated": false, "ratio": 2.993095433415368, "config_test": false, "has_no_keyw...
# ApplePy - an Apple ][ emulator in Python # James Tauber / http://jtauber.com/ # originally written 2001, updated 2011 import curses import socket import struct import subprocess import sys kbd = 0 def write_screen(win, address, value): base = address - 0x400 hi, lo = divmod(base, 0x80) row_group, co...
{ "repo_name": "jtauber/applepy", "path": "applepy_curses.py", "copies": "1", "size": "2837", "license": "mit", "hash": -5945539996763775000, "line_mean": 20.3308270677, "line_max": 80, "alpha_frac": 0.5160380684, "autogenerated": false, "ratio": 3.4057623049219687, "config_test": false, "has_...
""" applescript -- Easy-to-use Python wrapper for NSAppleScript """ import sys from Foundation import NSAppleScript, NSAppleEventDescriptor, NSURL, \ NSAppleScriptErrorMessage, NSAppleScriptErrorBriefMessage, \ NSAppleScriptErrorNumber, NSAppleScriptErrorAppName, NSAppleScriptErrorRange from .aecodecs import Cod...
{ "repo_name": "encima/NeuroSocket", "path": "libs/py-applescript-1.0.0/applescript/__init__.py", "copies": "1", "size": "5510", "license": "mit", "hash": -1070258348018598500, "line_mean": 33.012345679, "line_max": 205, "alpha_frac": 0.700907441, "autogenerated": false, "ratio": 3.582574772431729...
# applesingle - a module to decode AppleSingle files import struct import MacOS import sys Error="applesingle.Error" verbose=0 # File header format: magic, version, unused, number of entries AS_HEADER_FORMAT="ll16sh" AS_HEADER_LENGTH=26 # The flag words for AppleSingle AS_MAGIC=0x00051600 AS_VERSION=0x00020000 # En...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.3/Lib/plat-mac/applesingle.py", "copies": "1", "size": "3023", "license": "mit", "hash": 8450934487276164000, "line_mean": 29.24, "line_max": 83, "alpha_frac": 0.5616936818, "autogenerated": false, "ratio...
# Applesoft BASIC de-tokenizer # James Tauber / jtauber.com import sys def token(d): return { 0x80: "END", 0x81: "FOR", 0x82: "NEXT", 0x83: "DATA", 0x84: "INPUT", 0x85: "DEL", 0x86: "DIM", 0x87: "READ", 0x88: "GR", 0x89: "TEXT", ...
{ "repo_name": "jtauber/a2disk", "path": "applesoft.py", "copies": "1", "size": "3580", "license": "mit", "hash": -7841984743241998000, "line_mean": 20.696969697, "line_max": 61, "alpha_frac": 0.4008379888, "autogenerated": false, "ratio": 2.8940986257073567, "config_test": false, "has_no_keyw...
"""Applet for setting ip options: tcp windows, tcp quickack Usage: exec 202-ip-options [host] [initcwnd:[number]] [initrwnd:[number]] [quickack:[on|off]] [min-rto:[time]] Check Success: ip r s ss -i Examples: - exec-applet 202-ip-options alpha initcwnd:12 quickack:on - exec-applet 202-ip-options beta initrwnd:4 - e...
{ "repo_name": "hgn/net-applet-shuffler", "path": "applets/202-ip-options/applet.py", "copies": "2", "size": "4056", "license": "mit", "hash": 250550157202978000, "line_mean": 35.2142857143, "line_max": 78, "alpha_frac": 0.5613905325, "autogenerated": false, "ratio": 3.25, "config_test": false, ...
"""Applet for setting tcp sysctl window memory values Usage: exec 205-tcp-window-mem [host] [rmem-max:[byte]] [rmem-default:[byte]] [wmem-max:[byte]] [wmem-default:[byte]] [window-scaling:[on|off]] ...
{ "repo_name": "danielmgit/net-applet-shuffler", "path": "applets/205-tcp-window-mem/applet.py", "copies": "2", "size": "7466", "license": "mit", "hash": 4860971342705012000, "line_mean": 37.6839378238, "line_max": 76, "alpha_frac": 0.519957139, "autogenerated": false, "ratio": 3.3375055878408584,...
"""Applet for using ipproof for data connection and transfer. """ import os import time from threading import Thread CONTROLLER_NAME = "ipproof-controller.py" # fix for exec-applet CONTROLLER_STARTED = False LOCAL_PATH = os.path.dirname(os.path.realpath(__file__)) REMOTE_PATH = "/tmp/net-applet-shuffler" def prin...
{ "repo_name": "hgn/net-applet-shuffler", "path": "applets/104-ipproof/applet.py", "copies": "2", "size": "7348", "license": "mit", "hash": 600769702771504900, "line_mean": 37.4712041885, "line_max": 79, "alpha_frac": 0.5129286881, "autogenerated": false, "ratio": 3.5949119373776908, "config_tes...
"""Applet for using netperf for a connection. Unfortunately it is not possible to transfer a fixed amount of data via netperf. """ import os import time from threading import Thread LOCAL_NET_PATH = os.path.dirname(os.path.realpath(__file__)) REMOTE_NET_PATH = "/tmp/net-applet-shuffler" # fix for exec-applet CONTRO...
{ "repo_name": "hgn/net-applet-shuffler", "path": "applets/103-netperf/applet.py", "copies": "2", "size": "3913", "license": "mit", "hash": -6014018868024090000, "line_mean": 38.13, "line_max": 80, "alpha_frac": 0.553028367, "autogenerated": false, "ratio": 3.384948096885813, "config_test": fals...
"""AppleTV control via fireCore's AirControl protocol This if for jailbroken TV's running fireCore's protocol only. See their page for details: http://support.firecore.com/entries/21375902-3rd-Party-Control-API-AirControl-beta- This file contains library components used to talk to the tv. You may also be look...
{ "repo_name": "gdawg/papaltv", "path": "papaltv/tv.py", "copies": "1", "size": "4038", "license": "mit", "hash": 757704718788305900, "line_mean": 28.6911764706, "line_max": 87, "alpha_frac": 0.563645369, "autogenerated": false, "ratio": 3.7986829727187206, "config_test": false, "has_no_keywor...
"""Application and persistence management.""" # pylint: disable=no-member, import-error, no-init, too-few-public-methods # pylint: disable=cyclic-import, no-name-in-module, invalid-name from functools import lru_cache from ersa_reporting import configure, get_or_create from ersa_reporting import record_input, commit...
{ "repo_name": "eResearchSA/reporting-unified", "path": "ersa_reporting/keystone.py", "copies": "1", "size": "3576", "license": "apache-2.0", "hash": -8076970927227861000, "line_mean": 27.157480315, "line_max": 79, "alpha_frac": 0.5889261745, "autogenerated": false, "ratio": 4.768, "config_test"...
"""Application API. Use VAPIX® Application API to upload, control and manage applications and their license keys. """ from axis.api import APIItem, APIItems URL = "/axis-cgi/applications" URL_CONTROL = f"{URL}/control.cgi" URL_LICENSE = f"{URL}/license.cgi" URL_LIST = f"{URL}/list.cgi" URL_UPLOAD = f"{URL}/upload.cg...
{ "repo_name": "Kane610/axis", "path": "axis/applications/applications.py", "copies": "1", "size": "3771", "license": "mit", "hash": -611463505096164500, "line_mean": 26.9259259259, "line_max": 93, "alpha_frac": 0.5984084881, "autogenerated": false, "ratio": 4.363425925925926, "config_test": fal...
"""Application base class for displaying data about a single object. """ import abc import itertools import logging from .display import DisplayCommandBase LOG = logging.getLogger(__name__) class ShowOne(DisplayCommandBase): """Command base class for displaying data about a single object. """ __metacla...
{ "repo_name": "ralphwort/chef-repo", "path": "build/cliff/cliff/show.py", "copies": "5", "size": "1635", "license": "apache-2.0", "hash": -3313534424571257300, "line_mean": 28.7272727273, "line_max": 70, "alpha_frac": 0.5712538226, "autogenerated": false, "ratio": 4.644886363636363, "config_tes...
"""Application base class for displaying data about a single object. """ import abc import logging import six from .display import DisplayCommandBase LOG = logging.getLogger(__name__) @six.add_metaclass(abc.ABCMeta) class ShowOne(DisplayCommandBase): """Command base class for displaying data about a single ob...
{ "repo_name": "sjsucohort6/openstack", "path": "python/venv/lib/python2.7/site-packages/cliff/show.py", "copies": "3", "size": "1635", "license": "mit", "hash": -8892929071878354000, "line_mean": 28.1964285714, "line_max": 70, "alpha_frac": 0.573088685, "autogenerated": false, "ratio": 4.55431754...
"""Application base class for displaying data. """ import abc import logging import pkg_resources from .command import Command LOG = logging.getLogger(__name__) class DisplayCommandBase(Command): """Command base class for displaying data about a single object. """ __metaclass__ = abc.ABCMeta def ...
{ "repo_name": "neumerance/cloudloon2", "path": ".venv/lib/python2.7/site-packages/cliff/display.py", "copies": "2", "size": "2893", "license": "apache-2.0", "hash": 7279808326036778000, "line_mean": 32.6395348837, "line_max": 79, "alpha_frac": 0.6114759765, "autogenerated": false, "ratio": 4.6214...
"""Application base class for displaying data. """ import abc import logging import stevedore from .command import Command LOG = logging.getLogger(__name__) class DisplayCommandBase(Command): """Command base class for displaying data about a single object. """ __metaclass__ = abc.ABCMeta def __in...
{ "repo_name": "citrix-openstack-build/cliff", "path": "cliff/display.py", "copies": "3", "size": "2762", "license": "apache-2.0", "hash": -1770389552906677200, "line_mean": 32.6829268293, "line_max": 79, "alpha_frac": 0.6256335988, "autogenerated": false, "ratio": 4.6110183639399, "config_test"...
"""Application base class for displaying data. """ import abc try: from itertools import compress except ImportError: # for py26 compat from itertools import izip def compress(data, selectors): return (d for d, s in izip(data, selectors) if s) import logging import six import stevedore from...
{ "repo_name": "enzochiau/cliff", "path": "cliff/display.py", "copies": "3", "size": "3178", "license": "apache-2.0", "hash": -5468361583778555000, "line_mean": 31.4285714286, "line_max": 79, "alpha_frac": 0.6255506608, "autogenerated": false, "ratio": 4.553008595988539, "config_test": false, ...
"""Application base class for providing a list of data as output. """ import abc import logging import six from .display import DisplayCommandBase LOG = logging.getLogger(__name__) @six.add_metaclass(abc.ABCMeta) class Lister(DisplayCommandBase): """Command base class for providing a list of data as output. ...
{ "repo_name": "sjsucohort6/openstack", "path": "python/venv/lib/python2.7/site-packages/cliff/lister.py", "copies": "3", "size": "1947", "license": "mit", "hash": -349192001055920640, "line_mean": 32.5689655172, "line_max": 69, "alpha_frac": 0.5485362096, "autogenerated": false, "ratio": 4.843283...
"""Application base class for providing a list of data as output. """ import abc try: from itertools import compress except ImportError: # for py26 compat from itertools import izip def compress(data, selectors): return (d for d, s in izip(data, selectors) if s) import logging from .display ...
{ "repo_name": "ralphwort/chef-repo", "path": "build/cliff/cliff/lister.py", "copies": "5", "size": "2129", "license": "apache-2.0", "hash": -8988805463612809000, "line_mean": 31.2575757576, "line_max": 69, "alpha_frac": 0.5551902302, "autogenerated": false, "ratio": 4.805869074492099, "config_t...
"""Application base class. """ import argparse import codecs import inspect import locale import logging import logging.handlers import os import sys import operator from .complete import CompleteCommand from .help import HelpAction, HelpCommand from .utils import damerau_levenshtein, COST # Make sure the cliff libr...
{ "repo_name": "sjsucohort6/openstack", "path": "python/venv/lib/python2.7/site-packages/cliff/app.py", "copies": "3", "size": "14793", "license": "mit", "hash": 9151461036704339000, "line_mean": 36.2619647355, "line_max": 79, "alpha_frac": 0.5569526127, "autogenerated": false, "ratio": 4.63294707...
"""Application base class. """ import argparse import codecs import locale import logging import logging.handlers import os import sys from .complete import CompleteCommand from .help import HelpAction, HelpCommand from .interactive import InteractiveApp # Make sure the cliff library has a logging handler # in case ...
{ "repo_name": "ralphwort/chef-repo", "path": "build/cliff/cliff/app.py", "copies": "3", "size": "10728", "license": "apache-2.0", "hash": 5519229249934228000, "line_mean": 34.1737704918, "line_max": 77, "alpha_frac": 0.5658090977, "autogenerated": false, "ratio": 4.721830985915493, "config_test...
"""Application base class. """ import argparse import codecs import locale import logging import logging.handlers import os import sys from .help import HelpAction, HelpCommand from .interactive import InteractiveApp # Make sure the cliff library has a logging handler # in case the app developer doesn't set up loggi...
{ "repo_name": "neumerance/cloudloon2", "path": ".venv/lib/python2.7/site-packages/cliff/app.py", "copies": "2", "size": "10620", "license": "apache-2.0", "hash": 2754332525688904000, "line_mean": 34.0495049505, "line_max": 77, "alpha_frac": 0.563653484, "autogenerated": false, "ratio": 4.72209871...
"""Application base class. """ import itertools import logging import logging.handlers import shlex import sys import cmd2 LOG = logging.getLogger(__name__) class InteractiveApp(cmd2.Cmd): """Provides "interactive mode" features. Refer to the cmd2_ and cmd_ documentation for details about subclassing ...
{ "repo_name": "enzochiau/cliff", "path": "cliff/interactive.py", "copies": "3", "size": "5137", "license": "apache-2.0", "hash": -7876402000540219000, "line_mean": 35.9568345324, "line_max": 78, "alpha_frac": 0.604243722, "autogenerated": false, "ratio": 4.368197278911564, "config_test": false,...
"""Application base class. """ import itertools import logging import logging.handlers import shlex import cmd2 LOG = logging.getLogger(__name__) class InteractiveApp(cmd2.Cmd): """Provides "interactive mode" features. Refer to the cmd2_ and cmd_ documentation for details about subclassing and configu...
{ "repo_name": "neumerance/cloudloon2", "path": ".venv/lib/python2.7/site-packages/cliff/interactive.py", "copies": "3", "size": "4179", "license": "apache-2.0", "hash": -3568907046042083000, "line_mean": 35.3391304348, "line_max": 74, "alpha_frac": 0.5824359895, "autogenerated": false, "ratio": 4...
# /application/base.py from flask import Flask from os.path import abspath, join, split application = Flask("PowerPortfolio") application.secret_key = "SECRET_KEY" # TODO application.config["DATABASE"] = "sqlite:///portfolio.db" application.config.from_pyfile('settings.cfg') root_dir = split(split(abspath(__file__))[...
{ "repo_name": "TumblrCommunity/PowerPortfolio", "path": "portfolio/application/base.py", "copies": "1", "size": "1333", "license": "mit", "hash": -8132780515959871000, "line_mean": 30.7380952381, "line_max": 61, "alpha_frac": 0.647411853, "autogenerated": false, "ratio": 3.4533678756476682, "co...