text stringlengths 0 1.05M | meta dict |
|---|---|
#build list of available data
import os, sys
maf_sets = {}
try:
for line in open( "/cache/maf/maf_index.loc" ):
if line[0:1] == "#" : continue
fields = line.split('\t')
#read each line, if not enough fields, go to next line
try:
maf_desc = fields[0]
... | {
"repo_name": "jmchilton/galaxy-central",
"path": "tools/extract/interval2maf_code.py",
"copies": "1",
"size": "1590",
"license": "mit",
"hash": 6296307487961814000,
"line_mean": 34.976744186,
"line_max": 91,
"alpha_frac": 0.5566037736,
"autogenerated": false,
"ratio": 3.621867881548975,
"confi... |
#build list of available data
import os, sys
microbe_info= {}
try:
orgs = {}
for line in open( "/depot/data2/galaxy/microbes/microbial_data.loc" ):
if line[0:1] == "#" : continue
fields = line.split('\t')
#read each line, if not enough fields, go to next line
... | {
"repo_name": "jmchilton/galaxy-central",
"path": "tools/data_source/microbial_import_code.py",
"copies": "1",
"size": "8633",
"license": "mit",
"hash": 1676445665793598200,
"line_mean": 39.3062200957,
"line_max": 238,
"alpha_frac": 0.4958878721,
"autogenerated": false,
"ratio": 3.598582742809504... |
#build list of available data
import sys
builds= []
try:
#read db names from file, this file is also used in galaxy/util.py
for line in open("static/ucsc/builds.txt"):
if line[0:1] == "#": continue
try:
fields = line.replace("\r","").replace("\n","").split("\t")
... | {
"repo_name": "jmchilton/galaxy-central",
"path": "tools/filters/axt_to_lav_code.py",
"copies": "1",
"size": "1169",
"license": "mit",
"hash": -572813301676200640,
"line_mean": 33.4848484848,
"line_max": 91,
"alpha_frac": 0.5791274594,
"autogenerated": false,
"ratio": 3.6761006289308176,
"confi... |
import jinja2
import json
import logging
import os
import re
import time
import urllib
import urlparse
import webapp2
import zlib
from google.appengine.api import memcache
from google.appengine.api import urlfetch
from google.appengine.ext import ndb
import utils
VERSION_ID = os.environ['CURRENT_VERSION_ID']
jinj... | {
"repo_name": "nicko96/Chrome-Infra",
"path": "appengine/chromium_build/buildlogparse.py",
"copies": "1",
"size": "19968",
"license": "bsd-3-clause",
"hash": -4067066438462281700,
"line_mean": 35.8413284133,
"line_max": 80,
"alpha_frac": 0.5769731571,
"autogenerated": false,
"ratio": 3.4457290767... |
"""Build_manager test modules for views.py"""
import json
from unittest.mock import patch
from django.contrib.auth.models import User
from django.core.management import call_command
from django.shortcuts import reverse
from django.test import Client, TestCase
from build_manager.models import TravisInstance
from datas... | {
"repo_name": "MOOCworkbench/MOOCworkbench",
"path": "build_manager/tests/tests_views.py",
"copies": "1",
"size": "6793",
"license": "mit",
"hash": -5267879823248647000,
"line_mean": 51.6589147287,
"line_max": 119,
"alpha_frac": 0.6443397615,
"autogenerated": false,
"ratio": 4.026674570243035,
... |
# build MLlib ALS model
from pyspark.context import SparkContext
from pyspark.sql.context import SQLContext
from pyspark.mllib.recommendation import ALS, Rating
import spss.pyspark.runtime
import json
# get parameters for build
user_field = '%%user_field%%'
item_field = '%%item_field%%'
rating_field = '%%rating_field%... | {
"repo_name": "IBMPredictiveAnalytics/MLlib-CF",
"path": "Source code/script.py",
"copies": "2",
"size": "1463",
"license": "apache-2.0",
"hash": -3165735384929804300,
"line_mean": 33.8333333333,
"line_max": 106,
"alpha_frac": 0.7470950103,
"autogenerated": false,
"ratio": 3.2876404494382023,
"... |
"""Build models into intermediate representations which can be simply
converted into PACMAN problem specifications.
"""
import math
import numpy as np
import nengo.utils.builder
import connection
import ensemble
import pes
import probe
import utils
class Builder(object):
pre_rpn_transforms = list() # Network ... | {
"repo_name": "ctn-archive/nengo_spinnaker_2014",
"path": "nengo_spinnaker/builder.py",
"copies": "1",
"size": "4924",
"license": "mit",
"hash": -6593299932619213000,
"line_mean": 34.9416058394,
"line_max": 79,
"alpha_frac": 0.6441917141,
"autogenerated": false,
"ratio": 4.032760032760033,
"con... |
#Build Mood Vector for each
import pickle, time
from buildEmotionDatabase import getEmotionsVector
UrlDict = pickle.load(open("faceUrls.pkl", "rb"))
#testUrlDict = {"01/2016" : UrlDict["01/2016"],
#"02/2016" : UrlDict["02/2016"],
#"03/2016" : UrlDict["03/2016"]}
moodDict = {}
count = ... | {
"repo_name": "houcharlie/obamachart",
"path": "buildMoods.py",
"copies": "1",
"size": "1027",
"license": "mit",
"hash": 1227377473151472400,
"line_mean": 26.0263157895,
"line_max": 67,
"alpha_frac": 0.5501460565,
"autogenerated": false,
"ratio": 2.9941690962099123,
"config_test": false,
"has... |
## Build Motion Traces
## J Eisenmann
## ACCAD, The Ohio State University
## 2012-13
import maya.cmds as mc
import curveUtil as cu
from Vector import *
class CurveMotionTrace:
""" Given a moving object, this class will construct a
NURBS curve in 3D space that traces the motion over
time. Optionall... | {
"repo_name": "jeisenma/traceSelectionInMaya",
"path": "scripts/buildMotionTraces.py",
"copies": "1",
"size": "8257",
"license": "mit",
"hash": -7524910822444771000,
"line_mean": 44.6187845304,
"line_max": 138,
"alpha_frac": 0.5039360543,
"autogenerated": false,
"ratio": 3.7634457611668184,
"co... |
"""Build Multinet instance from csv file.
"""
import networkx as nx
import multinet as mn
import csv
import multinet.util as util
def multinet_from_csv(
file_name,
filter_func=util.default_filter,
weight_func=util.default_weight,
layer_func=util.default_layer,
ow='ORIGIN', dw=... | {
"repo_name": "wuhaochen/multinet",
"path": "multinet/builder.py",
"copies": "1",
"size": "2474",
"license": "mit",
"hash": 7367330385288359000,
"line_mean": 26.4888888889,
"line_max": 74,
"alpha_frac": 0.5808407437,
"autogenerated": false,
"ratio": 4.055737704918033,
"config_test": false,
"h... |
"""Build nix derivations."""
import json
import sys
from os.path import basename
import requests
from pynix.derivation import Derivation
from pynix.utils import is_path_in_store
def needed_to_build(deriv, outputs=None, needed=None, need_fetch=None,
existing=None, on_server=None):
"""Return der... | {
"repo_name": "NarrativeScience/pynix",
"path": "src/pynix/build.py",
"copies": "3",
"size": "5507",
"license": "mit",
"hash": -3366699332973772300,
"line_mean": 40.0970149254,
"line_max": 78,
"alpha_frac": 0.6063192301,
"autogenerated": false,
"ratio": 4.134384384384385,
"config_test": false,
... |
"""Build nng from source."""
import logging
import foreman
from g1 import scripts
import shipyard2.rules.bases
LOG = logging.getLogger(__name__)
shipyard2.rules.bases.define_git_repo(
'https://github.com/nanomsg/nng.git',
'v1.3.0',
)
shipyard2.rules.bases.define_distro_packages([
'cmake',
'gcc',
... | {
"repo_name": "clchiou/garage",
"path": "shipyard2/rules/third-party/nng/build.py",
"copies": "1",
"size": "1161",
"license": "mit",
"hash": -8020210513299801000,
"line_mean": 22.22,
"line_max": 68,
"alpha_frac": 0.5831180017,
"autogenerated": false,
"ratio": 3.2612359550561796,
"config_test": ... |
"""Build ops-onboard tool.
It is not a containerized app and so its build process is quite
different from other build files.
"""
from foreman import get_relpath, rule
from garage import scripts
from templates import common
# Because distro does not install these by default.
common.define_distro_packages([
'py... | {
"repo_name": "clchiou/garage",
"path": "shipyard/rules/ops/build.py",
"copies": "1",
"size": "1838",
"license": "mit",
"hash": -3171810987324178400,
"line_mean": 25.2571428571,
"line_max": 72,
"alpha_frac": 0.6147986942,
"autogenerated": false,
"ratio": 3.5346153846153845,
"config_test": false... |
"""Build options types.
This module defines types that represent various aspects of options in a
BDE-style repository.
"""
from bdebuild.common import blderror
from bdebuild.common import mixins
class OptionCommand(object):
"""This class enumerates over the types of option commands.
Enumerators:
A... | {
"repo_name": "bloomberg/bde-tools",
"path": "lib/python/bdebuild/meta/optiontypes.py",
"copies": "1",
"size": "9273",
"license": "apache-2.0",
"hash": 890984263337485600,
"line_mean": 30.8659793814,
"line_max": 79,
"alpha_frac": 0.5595815809,
"autogenerated": false,
"ratio": 3.8477178423236515,
... |
"""Build OSC bundles for client applications."""
from pythonosc import osc_bundle
from pythonosc import osc_message
from pythonosc.parsing import osc_types
# Shortcut to specify an immediate execution of messages in the bundle.
IMMEDIATELY = osc_types.IMMEDIATELY
class BuildError(Exception):
"""Error raised when... | {
"repo_name": "ragnarula/python-osc",
"path": "pythonosc/osc_bundle_builder.py",
"copies": "5",
"size": "1732",
"license": "unlicense",
"hash": 5738941090748354000,
"line_mean": 28.8620689655,
"line_max": 72,
"alpha_frac": 0.6553117783,
"autogenerated": false,
"ratio": 4.104265402843602,
"confi... |
"""Build OSC bundles for client applications."""
from pythonosc import osc_bundle
from pythonosc import osc_message
from pythonosc.parsing import osc_types
# Shortcut to specify an immediate execution of messages in the bundle.
IMMEDIATELY = osc_types.IMMEDIATELY
class BuildError(Exception):
"""Error raised whe... | {
"repo_name": "attwad/python-osc",
"path": "pythonosc/osc_bundle_builder.py",
"copies": "1",
"size": "1996",
"license": "unlicense",
"hash": 3821953444840523000,
"line_mean": 34.0175438596,
"line_max": 76,
"alpha_frac": 0.5921843687,
"autogenerated": false,
"ratio": 4.465324384787472,
"config_t... |
"""Build OSC messages for client applications."""
from pythonosc import osc_message
from pythonosc.parsing import osc_types
from typing import List, Tuple, Union, Any
class BuildError(Exception):
"""Error raised when an incomplete message is trying to be built."""
class OscMessageBuilder(object):
"""Builds... | {
"repo_name": "attwad/python-osc",
"path": "pythonosc/osc_message_builder.py",
"copies": "1",
"size": "6657",
"license": "unlicense",
"hash": 5440973838537325000,
"line_mean": 37.9298245614,
"line_max": 174,
"alpha_frac": 0.5502478594,
"autogenerated": false,
"ratio": 3.877111240535818,
"config... |
"""Build OSC messages for client applications."""
from pythonosc import osc_message
from pythonosc.parsing import osc_types
class BuildError(Exception):
"""Error raised when an incomplete message is trying to be built."""
class OscMessageBuilder(object):
"""Builds arbitrary OscMessage instances."""
ARG_TYPE... | {
"repo_name": "vnm-interactive/irobot",
"path": "pythonosc/osc_message_builder.py",
"copies": "1",
"size": "3759",
"license": "mit",
"hash": 2338979004134532000,
"line_mean": 30.8559322034,
"line_max": 98,
"alpha_frac": 0.6241021548,
"autogenerated": false,
"ratio": 3.667317073170732,
"config_t... |
"""Build OSC messages for client applications."""
try:
import builtins
except ImportError:
# for python 2.x
import __builtin__ as builtins
from pythonosc import osc_message
from pythonosc.parsing import osc_types
class BuildError(Exception):
"""Error raised when an incomplete message is trying to be b... | {
"repo_name": "ragnarula/python-osc",
"path": "pythonosc/osc_message_builder.py",
"copies": "3",
"size": "3836",
"license": "unlicense",
"hash": -5576101635425136000,
"line_mean": 30.4426229508,
"line_max": 98,
"alpha_frac": 0.6285192909,
"autogenerated": false,
"ratio": 3.6708133971291868,
"co... |
"""Build out Mheshimiwa api entry points and routes."""
import collections
from flask import url_for, request
from flask_restplus import Resource,reqparse
from .app import api, app
from . import utils
constituency_arguments = reqparse.RequestParser()
constituency_arguments.add_argument('county', type=str, required=Fal... | {
"repo_name": "avagut/mheshimiwa-api",
"path": "api_files/views.py",
"copies": "1",
"size": "5536",
"license": "mit",
"hash": 6967298961739684000,
"line_mean": 40.0074074074,
"line_max": 79,
"alpha_frac": 0.5514812139,
"autogenerated": false,
"ratio": 3.948644793152639,
"config_test": false,
... |
"""Build output from Latex using Python and Jinja2 templating
Purpose:
latexbuild is a low-footprint build engine that simplifies
collaboration on Latex-driven projects.
This Module:
Imports useful functions and classes from other
modules and provides user-friendly function interfaces for
building PDF and HTML files ... | {
"repo_name": "pappasam/latexbuild",
"path": "latexbuild/__init__.py",
"copies": "1",
"size": "3245",
"license": "mit",
"hash": -4339603410280533000,
"line_mean": 42.8513513514,
"line_max": 79,
"alpha_frac": 0.654853621,
"autogenerated": false,
"ratio": 4.655667144906743,
"config_test": false,
... |
"""Build packages to a wheel with a custom platform name"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import contextlib
import distutils.util
import os
import shutil
import sys
import tempfile
try: # pragma: no cover (pip>=19.... | {
"repo_name": "asottile/pip-custom-platform",
"path": "pip_custom_platform/_main.py",
"copies": "1",
"size": "3912",
"license": "mit",
"hash": -4922433138022619000,
"line_mean": 31.6,
"line_max": 77,
"alpha_frac": 0.5843558282,
"autogenerated": false,
"ratio": 4.24295010845987,
"config_test": f... |
"""Build packages to a wheel with a custom platform name"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import os
import shutil
from distlib.wheel import Wheel
from pip_custom_platform.util import mkdirp
from pip_custom_platform.util import tmp... | {
"repo_name": "chriskuehl/pip-custom-platform",
"path": "pip_custom_platform/wheel.py",
"copies": "1",
"size": "1215",
"license": "mit",
"hash": 1578294440430150400,
"line_mean": 31.8378378378,
"line_max": 74,
"alpha_frac": 0.6411522634,
"autogenerated": false,
"ratio": 4.090909090909091,
"conf... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
from datetime import timedelta
import os
import sys
from django.utils.translation import ugettext_lazy as _
import dj_database_url
testing = "test" in sys.argv
if os.getenv("DJANGO_ENV") == "prod":
# "prod" really just means deployed vs. runn... | {
"repo_name": "caktus/django-opendebates",
"path": "opendebates/settings.py",
"copies": "1",
"size": "11005",
"license": "apache-2.0",
"hash": -6395248254815985000,
"line_mean": 28.2686170213,
"line_max": 114,
"alpha_frac": 0.6106315311,
"autogenerated": false,
"ratio": 3.6585771276595747,
"con... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
from django.conf import global_settings as DEFAULT_SETTINGS
import os
import socket
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# openshift is our PAAS for now.
ON_PAAS = 'OPENSHIFT_REPO_DIR' in os.environ
if ON_PAAS:
SECRET_KEY = ... | {
"repo_name": "mephizzle/kage-no-inyo",
"path": "mysite/settings.py",
"copies": "2",
"size": "4750",
"license": "mit",
"hash": 2573838780419736000,
"line_mean": 29.2547770701,
"line_max": 93,
"alpha_frac": 0.6488421053,
"autogenerated": false,
"ratio": 3.3286615276804485,
"config_test": false,
... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import getpass, imp, os
from django.utils.crypto import get_random_string
from os.path import expanduser
from subprocess import check_output
from .additional_settings.cors import *
from .additional_settings.drf import *
from .additional_settings.s... | {
"repo_name": "FirstDraftGIS/firstdraft",
"path": "projfd/projfd/settings.py",
"copies": "1",
"size": "4720",
"license": "apache-2.0",
"hash": -2603227616041928700,
"line_mean": 25.374301676,
"line_max": 116,
"alpha_frac": 0.7055084746,
"autogenerated": false,
"ratio": 3.3738384560400285,
"conf... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import getpass, imp, os
from django.utils.crypto import get_random_string
from subprocess import check_output
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SETTINGS_DIR = os.path.dirname(__file__)
PROJECT_PATH = os.path.jo... | {
"repo_name": "DanielJDufour/firstdraft",
"path": "projfd/projfd/settings.py",
"copies": "1",
"size": "4139",
"license": "apache-2.0",
"hash": -8571192355161414000,
"line_mean": 25.8766233766,
"line_max": 103,
"alpha_frac": 0.7064508335,
"autogenerated": false,
"ratio": 3.423490488006617,
"conf... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import json
from django.core.exceptions import ImproperlyConfigured
from .base import *
from unipath import Path
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
INSTALLED_A... | {
"repo_name": "proyectosdeley/proyectos_de_ley",
"path": "proyectos_de_ley/proyectos_de_ley/settings/local.py",
"copies": "1",
"size": "1471",
"license": "mit",
"hash": -6165473076960404000,
"line_mean": 26.7547169811,
"line_max": 71,
"alpha_frac": 0.6859279402,
"autogenerated": false,
"ratio": 3... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(__file__)
import dj_database_url
from project_runpy import env
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = env.get('SECRET_KEY', 'Rotom')
# SECURITY WARNING: don't run wit... | {
"repo_name": "crccheck/tasteinsight",
"path": "tasteinsight/settings.py",
"copies": "1",
"size": "3307",
"license": "apache-2.0",
"hash": 2128502199653408000,
"line_mean": 24.2442748092,
"line_max": 84,
"alpha_frac": 0.609918355,
"autogenerated": false,
"ratio": 3.630076838638858,
"config_test... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = False
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, '..', 'templates')],
'APP_DIRS... | {
"repo_name": "Torrib/gradestats",
"path": "gradestats/settings/base.py",
"copies": "1",
"size": "2005",
"license": "apache-2.0",
"hash": -7356345352866184000,
"line_mean": 26.8472222222,
"line_max": 71,
"alpha_frac": 0.6458852868,
"autogenerated": false,
"ratio": 3.7476635514018692,
"config_te... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
import json
from django.core.exceptions import ImproperlyConfigured
# JSON-based secrets module
with open("secrets.json") as f:
secrets_file = json.loads(f.read())
def get_secre... | {
"repo_name": "cdDiaCo/myGarage",
"path": "myGarage/settings/base.py",
"copies": "1",
"size": "2553",
"license": "mit",
"hash": -8658393535996801000,
"line_mean": 28.0113636364,
"line_max": 90,
"alpha_frac": 0.7058362711,
"autogenerated": false,
"ratio": 3.5213793103448277,
"config_test": false... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'waw%j=vza!vc1^eyosw%#_!gg96%zb7sp*+!o... | {
"repo_name": "Sjord/django-oidc-provider",
"path": "example_project/provider_app/settings.py",
"copies": "2",
"size": "1690",
"license": "mit",
"hash": -2071862842700915000,
"line_mean": 20.6794871795,
"line_max": 71,
"alpha_frac": 0.7106508876,
"autogenerated": false,
"ratio": 3.346534653465346... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = 'c14d549c574e4d8cf162404ef0b04598'
DEBUG = True
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',... | {
"repo_name": "crossgovernmentservices/csdigital-prototype",
"path": "idp/settings.py",
"copies": "1",
"size": "2272",
"license": "mit",
"hash": -3668285810060655600,
"line_mean": 22.9157894737,
"line_max": 71,
"alpha_frac": 0.6580105634,
"autogenerated": false,
"ratio": 3.4953846153846153,
"co... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in... | {
"repo_name": "indexofire/cdc",
"path": "example/main/settings.py",
"copies": "1",
"size": "1704",
"license": "mit",
"hash": -1146886288696952400,
"line_mean": 25.2153846154,
"line_max": 71,
"alpha_frac": 0.7118544601,
"autogenerated": false,
"ratio": 3.2457142857142856,
"config_test": false,
... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SALESFORCE_CONSUMER_KEY = "<replace>"
SALESFORCE_CONSUMER_SECRET = "<replace>"
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/... | {
"repo_name": "TopOPPS/salesforce_user_group_April_3_2014",
"path": "generic_app/settings.py",
"copies": "1",
"size": "2132",
"license": "mit",
"hash": -2435207317116678700,
"line_mean": 24.380952381,
"line_max": 71,
"alpha_frac": 0.7148217636,
"autogenerated": false,
"ratio": 3.1538461538461537,... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = '_nc9_+ntllx!ptq5tzh96nn^$a#81#auhrdw#8t#+n0#4ig(lz'
TEMPLATE_LOADERS = (
'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = (
'django.mid... | {
"repo_name": "rowbot-dev/django-scheduler",
"path": "tests/test_settings.py",
"copies": "3",
"size": "1809",
"license": "bsd-3-clause",
"hash": 8439949292369572000,
"line_mean": 24.8428571429,
"line_max": 71,
"alpha_frac": 0.7042564953,
"autogenerated": false,
"ratio": 3.2535971223021583,
"con... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '%4r=s(t-9c##n0#))!jbtqweecq#+#&&ud!3e^)8g9b0mmwlf7'
# SECURITY WARNING: don't run with debug turned o... | {
"repo_name": "sidin/phishsense",
"path": "phishsense/phishsense/settings.py",
"copies": "1",
"size": "3074",
"license": "bsd-3-clause",
"hash": 8991861082148869000,
"line_mean": 28.2761904762,
"line_max": 86,
"alpha_frac": 0.6597267404,
"autogenerated": false,
"ratio": 3.566125290023202,
"conf... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
PROJECT_DIR = os.path.join(BASE_DIR, os.pardir)
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'c7c-f49=$amz)qhu2x)+u4zfppe(@llh@%mi=4r-wp89-gv=*!'
... | {
"repo_name": "psyonara/photo-order",
"path": "simple_order/settings.py",
"copies": "1",
"size": "1661",
"license": "mit",
"hash": -2094348187827211000,
"line_mean": 22.0694444444,
"line_max": 71,
"alpha_frac": 0.6833232992,
"autogenerated": false,
"ratio": 3.1577946768060836,
"config_test": fa... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
RUTA_PROYECTO = os.path.dirname(os.path.realpath(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment... | {
"repo_name": "mmaquera/platform",
"path": "emaus/settings.py",
"copies": "1",
"size": "2147",
"license": "apache-2.0",
"hash": -3436277076263792000,
"line_mean": 23.1235955056,
"line_max": 74,
"alpha_frac": 0.7107591989,
"autogenerated": false,
"ratio": 3.0936599423631126,
"config_test": false... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = '@ax1tb!(x0i488nds_8erw-y7+1!+xc96dqo3!ay3!ko6(=jlm'
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = (
'south',
'djcelery',
'django.co... | {
"repo_name": "clearcare/devops-challenge",
"path": "devops_challenge/settings.py",
"copies": "1",
"size": "1394",
"license": "apache-2.0",
"hash": 2150644275486460000,
"line_mean": 24.3454545455,
"line_max": 71,
"alpha_frac": 0.6707317073,
"autogenerated": false,
"ratio": 3.197247706422018,
"c... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = 'mnazx9ec_rf*7+7#(t&vle7$9jm#x3tzdj4q=0kj^exi9g_qp5'
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = (
'django.contrib.contenttypes',
'dj... | {
"repo_name": "punkrockpolly/ronquixote",
"path": "quotoxic/settings.py",
"copies": "1",
"size": "1254",
"license": "mit",
"hash": 839839558631599700,
"line_mean": 25.125,
"line_max": 71,
"alpha_frac": 0.701754386,
"autogenerated": false,
"ratio": 3.021686746987952,
"config_test": false,
"has... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'p#w6e(ta+v68t2wa9r-l8uk1jy6esh-vqpv_6^ah$#(4m9d!yb'
DEBUG = True
ALLOWED_HOSTS = []
DATABASES = {
'default': {
'ENGINE': 'django.db.backends... | {
"repo_name": "jarshwah/expressions_talk",
"path": "expressions/expressions/settings.py",
"copies": "1",
"size": "1815",
"license": "mit",
"hash": -8733474608430837000,
"line_mean": 27.8095238095,
"line_max": 71,
"alpha_frac": 0.6606060606,
"autogenerated": false,
"ratio": 3.5311284046692606,
"... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from config import *
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
# SECURITY WARNING: keep ... | {
"repo_name": "FalkorCloud/falkor",
"path": "hub/falkor_project/settings.py",
"copies": "1",
"size": "4045",
"license": "mit",
"hash": 4087707427185420300,
"line_mean": 26.1543624161,
"line_max": 75,
"alpha_frac": 0.6126081582,
"autogenerated": false,
"ratio": 3.5607394366197185,
"config_test":... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.contrib import messages
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_ROOT = os.path.dirname(BASE_DIR)
# Quick-start development settings - unsuitable for production
# See https://docs.django... | {
"repo_name": "andela-osule/photo-editing-application",
"path": "photo_editor/settings/base.py",
"copies": "1",
"size": "3867",
"license": "mit",
"hash": -1048773180164167400,
"line_mean": 21.7470588235,
"line_max": 72,
"alpha_frac": 0.6705456426,
"autogenerated": false,
"ratio": 3.29106382978723... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.core.exceptions import ImproperlyConfigured
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# Handling Key Import Errors
def get_env_variable(var_name):
""" Get the environment variable or return exception """
... | {
"repo_name": "tabdon/crmeasy-deploy-build",
"path": "crmapp/settings.py",
"copies": "1",
"size": "3434",
"license": "mit",
"hash": -4117925563051928600,
"line_mean": 26.0472440945,
"line_max": 91,
"alpha_frac": 0.6790914386,
"autogenerated": false,
"ratio": 3.6688034188034186,
"config_test": f... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.core.exceptions import ImproperlyConfigured
from unipath import Path
def get_env_variable(var_name):
"""Get evnironment variable or return exception."""
try:
return os.environ[var_name]
except KeyError:
... | {
"repo_name": "h00dy/rura",
"path": "rura/config/settings/base.py",
"copies": "1",
"size": "2734",
"license": "apache-2.0",
"hash": -4275051068434572000,
"line_mean": 25.0380952381,
"line_max": 78,
"alpha_frac": 0.6832479883,
"autogenerated": false,
"ratio": 3.684636118598383,
"config_test": fa... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.core.urlresolvers import reverse_lazy
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/d... | {
"repo_name": "csabatini/deploy-azurerm-django",
"path": "deployazurermdjango/settings.py",
"copies": "1",
"size": "2859",
"license": "bsd-3-clause",
"hash": -1226476527875939300,
"line_mean": 25.2293577982,
"line_max": 71,
"alpha_frac": 0.6942987058,
"autogenerated": false,
"ratio": 3.4239520958... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.utils.crypto import get_random_string
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist... | {
"repo_name": "vinta/sublimall-server",
"path": "sublimall/settings.py",
"copies": "1",
"size": "3345",
"license": "mit",
"hash": -6653067286221309000,
"line_mean": 29.4090909091,
"line_max": 81,
"alpha_frac": 0.711509716,
"autogenerated": false,
"ratio": 3.318452380952381,
"config_test": false... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.utils.crypto import get_random_string
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklis... | {
"repo_name": "socketubs/sublimall-server",
"path": "sublimall/settings.py",
"copies": "1",
"size": "3491",
"license": "mit",
"hash": -8964817847756179000,
"line_mean": 30.1607142857,
"line_max": 77,
"alpha_frac": 0.6785100287,
"autogenerated": false,
"ratio": 3.49,
"config_test": false,
"has... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.utils.translation import ugettext_lazy as _
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
FIXTURE_DIRS = [os.path.join(BASE_DIR, 'fixtures')]
SECRET_KEY = 'dg0pdghh4andk^v=rw^l-i81yz-h2co%mlj4)+p(cqz... | {
"repo_name": "boldprogressives/django-opendebates",
"path": "opendebates/opendebates/settings.py",
"copies": "1",
"size": "5134",
"license": "apache-2.0",
"hash": 3124739552220002300,
"line_mean": 24.5422885572,
"line_max": 84,
"alpha_frac": 0.6289442929,
"autogenerated": false,
"ratio": 3.48777... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from .local_settings import *
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNI... | {
"repo_name": "anilshanbhag/Your2048",
"path": "Your2048/settings.py",
"copies": "1",
"size": "2874",
"license": "mit",
"hash": -6687979568945462000,
"line_mean": 26.1132075472,
"line_max": 74,
"alpha_frac": 0.7254697286,
"autogenerated": false,
"ratio": 3.3341067285382833,
"config_test": false... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from pathlib import Path
from getenv import env
path = Path(__file__)
import pdb; pdb.set_trace()
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://do... | {
"repo_name": "sergei-maertens/xbbtx.be",
"path": "src/xbbtx/settings/base.py",
"copies": "1",
"size": "1743",
"license": "mit",
"hash": 4350522795761864700,
"line_mean": 21.0632911392,
"line_max": 71,
"alpha_frac": 0.7160068847,
"autogenerated": false,
"ratio": 3.345489443378119,
"config_test"... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import django.conf.global_settings as DEFAULT_SETTINGS
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
'django.core.context_processors.request',
)
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
... | {
"repo_name": "paulmouzas/blogodrone",
"path": "mysite/settings.py",
"copies": "1",
"size": "2551",
"license": "unlicense",
"hash": -6771553634075662000,
"line_mean": 27.032967033,
"line_max": 78,
"alpha_frac": 0.7357898863,
"autogenerated": false,
"ratio": 3.3044041450777204,
"config_test": fa... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import socket
from oscar import get_core_apps
from oscar.defaults import *
from oscar import OSCAR_MAIN_TEMPLATE_DIR
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
location = lambda x: os.path.join(
os.path.dirname(os.path.r... | {
"repo_name": "talhaobject90/HUNGRY-OBJECT90",
"path": "hungry/settings.py",
"copies": "1",
"size": "7914",
"license": "mit",
"hash": 3969647558315945000,
"line_mean": 26.384083045,
"line_max": 110,
"alpha_frac": 0.6767753348,
"autogenerated": false,
"ratio": 3.007981755986317,
"config_test": f... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import socket
import mongoengine
from skool.settings import *
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# openshift is our PAAS for now.
ON_PAAS = 'OPENSHIFT_REPO_DIR' in os.environ
if ON_PAAS:
SECRET_KEY = os.environ['... | {
"repo_name": "daeatel/skool_app",
"path": "mysite/settings.py",
"copies": "1",
"size": "4931",
"license": "mit",
"hash": -3478330080222293500,
"line_mean": 29.81875,
"line_max": 172,
"alpha_frac": 0.6532143581,
"autogenerated": false,
"ratio": 3.296122994652406,
"config_test": false,
"has_no... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import socket
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# openshift is our PAAS for now.
ON_PAAS = 'OPENSHIFT_REPO_DIR' in os.environ
if ON_PAAS:
SECRET_KEY = os.environ['OPENSHIFT_SECRET_TOKEN']
else:
# SECURITY WA... | {
"repo_name": "quidtech/quidte.ch",
"path": "quidtech/settings.py",
"copies": "1",
"size": "4035",
"license": "mit",
"hash": -3625420025110042000,
"line_mean": 30.0384615385,
"line_max": 93,
"alpha_frac": 0.6376703841,
"autogenerated": false,
"ratio": 3.402192242833052,
"config_test": false,
... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import socket
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# openshift is our PAAS for now.
ON_PAAS = 'OPENSHIFT_REPO_DIR' in os.environ
if ON_PAAS:
SECRET_KEY = os.environ['OPENSHIFT_SECRET_TOKEN']
else:
... | {
"repo_name": "dayatz/Django-on-OpenShift",
"path": "mysite/settings.py",
"copies": "1",
"size": "4378",
"license": "mit",
"hash": 6417839329129304000,
"line_mean": 29.4097222222,
"line_max": 93,
"alpha_frac": 0.639104614,
"autogenerated": false,
"ratio": 3.4884462151394424,
"config_test": fals... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import socket
#########
# PATHS #
#########
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Full filesystem path to the project.
PROJECT_APP_PATH = os.path.dirname(os.path.abspath(__file__))
PROJECT_APP = os.path... | {
"repo_name": "mush42/mushy-mezzanine-on-openshift",
"path": "mysite/settings.py",
"copies": "1",
"size": "7563",
"license": "mit",
"hash": 6525570561252077000,
"line_mean": 31.1829787234,
"line_max": 93,
"alpha_frac": 0.690070078,
"autogenerated": false,
"ratio": 3.3823792486583186,
"config_te... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
APPS_ROOT = os.path.join(BASE_DIR, 'src')
sys.path.insert(0, APPS_ROOT)
# Quick-start development settings - unsuitable for production
# See https://docs.d... | {
"repo_name": "Svjard/flightpath",
"path": "config/settings/common.py",
"copies": "1",
"size": "3476",
"license": "mit",
"hash": 5116466666078120000,
"line_mean": 24.7555555556,
"line_max": 79,
"alpha_frac": 0.7149021864,
"autogenerated": false,
"ratio": 3.3358925143953937,
"config_test": false... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys
from oscar import get_core_apps, OSCAR_MAIN_TEMPLATE_DIR
from oscar.defaults import *
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
PROJECT_DIR = os.path.dirname(__file__)
location = lambda x: os.path.join(
os.path... | {
"repo_name": "kisiel/django-oscar-przelewy24",
"path": "sandbox/settings.py",
"copies": "1",
"size": "6658",
"license": "bsd-3-clause",
"hash": -4196288121890915300,
"line_mean": 27.0928270042,
"line_max": 78,
"alpha_frac": 0.6811354761,
"autogenerated": false,
"ratio": 3.3986727922409394,
"co... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys
import dotenv
import logging
logger = logging.getLogger(__name__)
from os.path import expanduser
home = expanduser("~")
dotenv.read_dotenv(os.path.join('.','.env'))
DEPLOYMENT = os.environ.get('DEPLOYMENT','production')
SITE... | {
"repo_name": "paul-wolf/django-stack",
"path": "mysite/settings.py",
"copies": "1",
"size": "5639",
"license": "mit",
"hash": -3277039496290209300,
"line_mean": 26.7783251232,
"line_max": 87,
"alpha_frac": 0.6073771945,
"autogenerated": false,
"ratio": 3.617062219371392,
"config_test": false,
... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# PROJECT_ROOT = os.path.dirname(__file__)
# sys.path.insert(0, os.path.join(PROJECT_ROOT, 'apps'))
# Quick-start development settings - unsuitable for pr... | {
"repo_name": "ptonini/battuta-manager",
"path": "battuta/battuta/settings.py",
"copies": "1",
"size": "3367",
"license": "bsd-2-clause",
"hash": 8576078519178013000,
"line_mean": 25.5118110236,
"line_max": 91,
"alpha_frac": 0.6513216513,
"autogenerated": false,
"ratio": 3.3369672943508424,
"co... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys
# Add ../../ (with urls.py, wsgi.py and such) to python path
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Also add ../../apps to python path
sys.path.insert(0, os.path.join(BASE_DIR, 'apps'))
DEBU... | {
"repo_name": "dev-coop/brains",
"path": "src/settings/base.py",
"copies": "1",
"size": "5171",
"license": "mit",
"hash": -677027686147609100,
"line_mean": 26.9513513514,
"line_max": 90,
"alpha_frac": 0.5820924386,
"autogenerated": false,
"ratio": 3.31474358974359,
"config_test": false,
"has_... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(
os.path.dirname(
os.path.dirname(
os.path.abspath(__file__))))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployme... | {
"repo_name": "Mandelbrew/cookiecutter-django",
"path": "{{cookiecutter.project_slug}}/application/config/settings/docker_base.py",
"copies": "1",
"size": "4682",
"license": "mit",
"hash": 1898529548420149500,
"line_mean": 21.8390243902,
"line_max": 71,
"alpha_frac": 0.6781290047,
"autogenerated": ... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"APP_DIRS": True,
"OPTI... | {
"repo_name": "llazzaro/django-scheduler",
"path": "tests/settings.py",
"copies": "1",
"size": "2087",
"license": "bsd-3-clause",
"hash": -7053660331015437000,
"line_mean": 28.3943661972,
"line_max": 85,
"alpha_frac": 0.6727359847,
"autogenerated": false,
"ratio": 3.8505535055350553,
"config_te... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = '_nc9_+ntllx!ptq5tzh96nn^$a#81#auhrdw#8t#+n0#4ig(lz'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,... | {
"repo_name": "drodger/django-scheduler",
"path": "tests/settings.py",
"copies": "2",
"size": "2138",
"license": "bsd-3-clause",
"hash": -7191267760586399000,
"line_mean": 26.0632911392,
"line_max": 71,
"alpha_frac": 0.6580916745,
"autogenerated": false,
"ratio": 3.6114864864864864,
"config_tes... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SITE_ROOT = os.path.realpath(os.path.dirname('..'))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ['SECRET_KEY']
DEBUG = True
# SECURITY... | {
"repo_name": "ajoyoommen/weblog",
"path": "weblog/settings/base.py",
"copies": "1",
"size": "2607",
"license": "mit",
"hash": -673946784713565700,
"line_mean": 25.6020408163,
"line_max": 71,
"alpha_frac": 0.6689681626,
"autogenerated": false,
"ratio": 3.5761316872427984,
"config_test": false,
... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
ADMINS = (
("David Barra... | {
"repo_name": "Cinemair/cinemair-server",
"path": "settings/common.py",
"copies": "1",
"size": "3435",
"license": "mit",
"hash": -3325999534243606500,
"line_mean": 24.2426470588,
"line_max": 97,
"alpha_frac": 0.678997961,
"autogenerated": false,
"ratio": 3.112420670897552,
"config_test": false,... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'test secret key'
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
... | {
"repo_name": "mozilla/puente",
"path": "test_project_django_jinja/test_project/settings.py",
"copies": "1",
"size": "2698",
"license": "bsd-3-clause",
"hash": 822817194794604700,
"line_mean": 24.4528301887,
"line_max": 74,
"alpha_frac": 0.5833951075,
"autogenerated": false,
"ratio": 3.6117804551... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# SECURITY WARNING: keep the ... | {
"repo_name": "opportunitynetwork/devault",
"path": "devault/devault/settings.py",
"copies": "1",
"size": "2942",
"license": "bsd-3-clause",
"hash": 8922265218002121000,
"line_mean": 25.0353982301,
"line_max": 78,
"alpha_frac": 0.6781101292,
"autogenerated": false,
"ratio": 3.6365883807169346,
... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '4ff=0u*psph764c)!_2zti6+!6q=g&0o5!*i^qel^1&vhijemx'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []... | {
"repo_name": "demonshreder/pirate",
"path": "pirate/settings.py",
"copies": "1",
"size": "3480",
"license": "apache-2.0",
"hash": 7774874334258483000,
"line_mean": 28.243697479,
"line_max": 150,
"alpha_frac": 0.6413793103,
"autogenerated": false,
"ratio": 3.5365853658536586,
"config_test": fal... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '<%= secret_key %>'
# SECURITY WARNING: don't run with debug turned on in production... | {
"repo_name": "dfurtado/generator-djangospa",
"path": "generators/app/templates/root/appfiles/_settings.py",
"copies": "1",
"size": "3491",
"license": "mit",
"hash": 6868105321046179000,
"line_mean": 24.1151079137,
"line_max": 91,
"alpha_frac": 0.6659982813,
"autogenerated": false,
"ratio": 3.694... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# SECUR... | {
"repo_name": "web-masons/holocron-api",
"path": "holocron_api/holocron_api/settings/base.py",
"copies": "2",
"size": "2814",
"license": "apache-2.0",
"hash": 3080355288683724000,
"line_mean": 26.0576923077,
"line_max": 79,
"alpha_frac": 0.6883439943,
"autogenerated": false,
"ratio": 3.4869888475... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
DEBUG = False
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if 'croberts' in BASE_DIR:
DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'REPLACE_ME_BEFORE_PRODUC... | {
"repo_name": "crobertsbmw/deckofcards",
"path": "spades/settings.py",
"copies": "1",
"size": "2480",
"license": "mit",
"hash": -6242467399615885000,
"line_mean": 23.3137254902,
"line_max": 72,
"alpha_frac": 0.6685483871,
"autogenerated": false,
"ratio": 3.369565217391304,
"config_test": false,... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
DEBUG = True
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# SECURITY WAR... | {
"repo_name": "foxbenjaminfox/deckofcards",
"path": "spades/settings.py",
"copies": "2",
"size": "1928",
"license": "mit",
"hash": 6247650531385673000,
"line_mean": 22.8024691358,
"line_max": 71,
"alpha_frac": 0.7147302905,
"autogenerated": false,
"ratio": 3.3241379310344827,
"config_test": fal... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.contrib import admin
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'project',
'apps.juber',
'django.contrib.admin',
... | {
"repo_name": "tsotetsi/whereismyjojo",
"path": "src/project/settings.py",
"copies": "1",
"size": "2835",
"license": "mit",
"hash": 3252533418032785000,
"line_mean": 23.2307692308,
"line_max": 73,
"alpha_frac": 0.6737213404,
"autogenerated": false,
"ratio": 3.508663366336634,
"config_test": fal... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from django.utils.translation import ugettext_lazy as _
from .utils import get_env_variable
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Quick-start development settings - unsuitable for pr... | {
"repo_name": "EmadMokhtar/halaqat",
"path": "halaqat/settings/base_settings.py",
"copies": "1",
"size": "3249",
"license": "mit",
"hash": 7618358360520420000,
"line_mean": 25.4146341463,
"line_max": 87,
"alpha_frac": 0.6395814097,
"autogenerated": false,
"ratio": 3.6019955654101996,
"config_te... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
gettext = lambda s: s
BASE_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), '..')
from datetime import timedelta
import djcelery
djcelery.setup_loader()
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
CEL... | {
"repo_name": "rubiesonthesky/cms",
"path": "assembly/settings/base.py",
"copies": "3",
"size": "6614",
"license": "mit",
"hash": -3987233983621003300,
"line_mean": 28.2654867257,
"line_max": 120,
"alpha_frac": 0.6321439371,
"autogenerated": false,
"ratio": 3.497620306716023,
"config_test": fal... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import django.conf.global_settings as defaults
from lomakekala.default_settings import *
def mkpath(*parts):
return os.path.abspath(os.path.join(os.path.dirname(__file__), '..', *parts))
BASE_DIR = mkpath()
SECRET_KEY = '2ri=pv-n... | {
"repo_name": "japsu/lomakekala",
"path": "lomakekala_test_site/settings.py",
"copies": "1",
"size": "2131",
"license": "mit",
"hash": -4571347968249488400,
"line_mean": 23.2159090909,
"line_max": 81,
"alpha_frac": 0.7109338339,
"autogenerated": false,
"ratio": 3.1949025487256373,
"config_test"... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNING: keep th... | {
"repo_name": "roundtableng/yarep",
"path": "yarep/settings.py",
"copies": "1",
"size": "3402",
"license": "mit",
"hash": 9087717914398299000,
"line_mean": 24.2,
"line_max": 92,
"alpha_frac": 0.7175191064,
"autogenerated": false,
"ratio": 2.978984238178634,
"config_test": false,
"has_no_keywo... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..')
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# SECURITY WARNING: keep the secre... | {
"repo_name": "metalhelix/tracks",
"path": "tracks/settings/base.py",
"copies": "1",
"size": "2165",
"license": "mit",
"hash": -5984108333206608000,
"line_mean": 24.4705882353,
"line_max": 88,
"alpha_frac": 0.7099307159,
"autogenerated": false,
"ratio": 3.2361733931240657,
"config_test": false,... |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys
from django.contrib import messages
from dotenv import find_dotenv, load_dotenv
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(BASE_DIR, "../"))
PROJECT_ROOT = os.path.di... | {
"repo_name": "andela-osule/waitress",
"path": "waitress/settings/base.py",
"copies": "2",
"size": "3815",
"license": "mit",
"hash": -5341514239764595000,
"line_mean": 24.0986842105,
"line_max": 87,
"alpha_frac": 0.6733944954,
"autogenerated": false,
"ratio": 3.3850931677018634,
"config_test": ... |
""" Build pipeline dependency graph from requirements
"""
from collections import defaultdict
import logging
import six
import toposort
from .language import OUTPUT, REQUIRE, PIPE
logger = logging.getLogger(__name__)
def format_deps(d):
""" Return formatted list of dependencies from 'requires'/'provides'
... | {
"repo_name": "valpasq/yatsm",
"path": "yatsm/pipeline/_topology.py",
"copies": "1",
"size": "4509",
"license": "mit",
"hash": -2771424815441245700,
"line_mean": 29.2617449664,
"line_max": 78,
"alpha_frac": 0.5888223553,
"autogenerated": false,
"ratio": 4.182745825602969,
"config_test": true,
... |
""" Build prediction for every documents. """
import time
import os.path
from keras.models import model_from_json
from pymongo import MongoClient
from lib import VectGenerator
# Mongodb
client = MongoClient("mongodb://localhost:27017/")
db = client.invertedindex
# mongodb collections
char_index = db.char_index
doc_in... | {
"repo_name": "blues-lin/Char-level-CNN-for-Text-Classification-in-Keras",
"path": "runtime_model/build_prediction.py",
"copies": "1",
"size": "1834",
"license": "mit",
"hash": -5132024091795242000,
"line_mean": 27.59375,
"line_max": 78,
"alpha_frac": 0.6459016393,
"autogenerated": false,
"ratio"... |
''' build.py
Created by photofroggy (Henry Rapley)
Build slave for reflex. Automatically edits
appropriate source files, archives changes,
generates documentation and pushes changes to
github.
NB: Doesn't do this stuff yet.
'''
import os
import sys
import time
import json
import shuti... | {
"repo_name": "photofroggy/Reflex",
"path": "build_reflex.py",
"copies": "1",
"size": "14180",
"license": "isc",
"hash": -6922237264054636000,
"line_mean": 30.2334801762,
"line_max": 163,
"alpha_frac": 0.498448519,
"autogenerated": false,
"ratio": 4.181657328221763,
"config_test": false,
"has... |
# build.py
#
# This script combines the individual module folders into a single structure
# for Space Engineers to load (and a bunch of other useful deploy tasks)
import datetime, errno, logging, os.path, psutil, shutil, stat, subprocess, sys, time
from subprocess import Popen, PIPE
buildDir = os.getcwd()
scriptDir =... | {
"repo_name": "Rynchodon/Autopilot",
"path": ".build/build.py",
"copies": "2",
"size": "7719",
"license": "cc0-1.0",
"hash": 6416705905069288000,
"line_mean": 29.15234375,
"line_max": 147,
"alpha_frac": 0.6815649696,
"autogenerated": false,
"ratio": 2.883451624953306,
"config_test": false,
"h... |
# build.py
#
# This script combines the individual module folders into a single structure
# for Space Engineers to load (and a bunch of other useful deploy tasks)
#
# It will create two mods,
# "%AppData%\SpaceEngineers\Mods\ARMS" and
# "%AppData%\SpaceEngineers\Mods\ARMS Dev".
#
# The Dev version has logging enabl... | {
"repo_name": "deimosx6/Autopilot",
"path": ".build/build.py",
"copies": "1",
"size": "7929",
"license": "cc0-1.0",
"hash": 401416006471680640,
"line_mean": 27.9379562044,
"line_max": 136,
"alpha_frac": 0.6809181486,
"autogenerated": false,
"ratio": 2.9377547239718416,
"config_test": false,
"... |
"""build.py
Runs xacro on the files listed in the 'definitions' directory and builds the models
Usage:
build.py [--only=NAMES] [--symlink=MODEL_SYM_PATH] [--xacro=XACRO_CONVERTER]
Options:
-h --help Show this screen.
--only=NAMES Creates only the models listed (separated by comma)
--symlink=MODEL_S... | {
"repo_name": "team-diana/gazebo-models",
"path": "build.py",
"copies": "1",
"size": "4752",
"license": "mit",
"hash": -4996607045772678000,
"line_mean": 35,
"line_max": 139,
"alpha_frac": 0.5677609428,
"autogenerated": false,
"ratio": 3.706708268330733,
"config_test": false,
"has_no_keywords... |
# build.py
#!/usr/bin/env python3
import os
import jinja2
# Markdown to HTML library
# https://pypi.org/project/Markdown/
import markdown
from staticjinja import Site
markdowner = markdown.Markdown(output_format="html5")
def md_context(template):
with open(template.filename) as f:
markdown_content = f.re... | {
"repo_name": "Ceasar/staticjinja",
"path": "examples/markdown/build.py",
"copies": "1",
"size": "1262",
"license": "mit",
"hash": 6412333830547608000,
"line_mean": 29.0476190476,
"line_max": 74,
"alpha_frac": 0.6584786054,
"autogenerated": false,
"ratio": 3.4108108108108106,
"config_test": fal... |
# build pyproj using installed proj library and data files
# (instead of bundled source and data)
from distutils.core import setup, Extension
import os, glob, numpy, sys, subprocess
proj_dir = os.environ.get('PROJ_DIR')
if proj_dir is None: proj_dir='/usr/local'
proj_libdir = os.environ.get('PROJ_LIBDIR')
proj_incdir ... | {
"repo_name": "zippy1981/pyproj",
"path": "setup-proj.py",
"copies": "1",
"size": "2462",
"license": "isc",
"hash": -6219539116157837000,
"line_mean": 40.0333333333,
"line_max": 86,
"alpha_frac": 0.647034931,
"autogenerated": false,
"ratio": 3.5526695526695526,
"config_test": false,
"has_no_k... |
# Build requirements:
#
# Python 2.6-3.2: Visual C++ Express Edition 2008:
# http://go.microsoft.com/?linkid=7729279
#
# Python 3.3+: Visual C++ Express Edition 2010:
# http://go.microsoft.com/?linkid=9709949
#
# x64 builds: Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1:
# ... | {
"repo_name": "kumasento/mwparserfromhell",
"path": "scripts/win_build.py",
"copies": "1",
"size": "1715",
"license": "mit",
"hash": 5522460001688680000,
"line_mean": 28.5689655172,
"line_max": 81,
"alpha_frac": 0.6017492711,
"autogenerated": false,
"ratio": 3.118181818181818,
"config_test": fa... |
"""build return data from cursor"""
import podorstructure
def ships_and_items(cursor):
"""return data from cursor - ships and items"""
ships = {}
items = {}
ammos = {}
for killmail in cursor:
if killmail['ship']['type_id'] in ships:
ships[killmail['ship']['type_id']]['total_lost... | {
"repo_name": "namrak/fpapi",
"path": "parsecursor.py",
"copies": "1",
"size": "3974",
"license": "mit",
"hash": 5855721177001838000,
"line_mean": 49.3037974684,
"line_max": 93,
"alpha_frac": 0.4806240564,
"autogenerated": false,
"ratio": 4.04684317718941,
"config_test": false,
"has_no_keywor... |
# build RF extension
# run in RF
import os
from mojo.extensions import ExtensionBundle
from mojo.UI import createModifier
print("did you update the names?")
#modifier = createModifier(command=True, shift=True)
#print(f"({modifier}, ']')")
# get current folder
basePath = os.path.dirname(__file__)
# folder with pytho... | {
"repo_name": "LettError/glyphBrowser",
"path": "buildExtension.py",
"copies": "1",
"size": "2493",
"license": "bsd-3-clause",
"hash": -2991089345039720400,
"line_mean": 24.1818181818,
"line_max": 103,
"alpha_frac": 0.7280385078,
"autogenerated": false,
"ratio": 3.4338842975206614,
"config_test... |
# build RoboFab Docs as a RoboFont Extension
import os
import shutil
from mojo.extensions import ExtensionBundle
libPath = os.path.dirname(__file__)
extensionFile = "RoboFabDocs.roboFontExt"
extensionPath = os.path.join(libPath, extensionFile)
extensionHtml = os.path.join(libPath, "_build/html/")
print "building Rob... | {
"repo_name": "jamesgk/robofab",
"path": "Docs/build-extension.py",
"copies": "7",
"size": "2426",
"license": "bsd-3-clause",
"hash": -8665156727720557000,
"line_mean": 32.2328767123,
"line_max": 73,
"alpha_frac": 0.7073371805,
"autogenerated": false,
"ratio": 3.412095639943741,
"config_test": ... |
'''build RoboFont Extension'''
import os
from AppKit import NSCommandKeyMask, NSAlternateKeyMask, NSShiftKeyMask
from mojo.extensions import ExtensionBundle
# get current folder
basePath = os.path.dirname(__file__)
# source folder for all extension files
sourcePath = os.path.join(basePath, 'source')
# folder with p... | {
"repo_name": "roboDocs/rf-extension-boilerplate",
"path": "build.py",
"copies": "1",
"size": "2688",
"license": "mit",
"hash": 201573303864610700,
"line_mean": 25.0970873786,
"line_max": 103,
"alpha_frac": 0.732514881,
"autogenerated": false,
"ratio": 3.4111675126903553,
"config_test": false,
... |
""" buildroot_update.py: client script for running buildroot updates
This can be used in place of the opentrons app to do updates of buildroot
systems from update zips. Note that if you just want to do dev scale work
of modifying the api server, you can probably use the update-api-buildroot
makefile target in the api ... | {
"repo_name": "OpenTrons/opentrons_sdk",
"path": "update-server/buildroot_upload.py",
"copies": "3",
"size": "6387",
"license": "apache-2.0",
"hash": 1946303486561013500,
"line_mean": 35.2897727273,
"line_max": 79,
"alpha_frac": 0.5331141381,
"autogenerated": false,
"ratio": 4.188196721311475,
... |
"""Build rule helpers for pod data volumes.
Although strictly speaking volumes are a part of pods, their build
process is quite different from pod's; so we put it in this separate
module.
"""
__all__ = [
'apply_filespec_to_tarball',
]
import io
import tarfile
from pathlib import Path
from garage.assertions impo... | {
"repo_name": "clchiou/garage",
"path": "shipyard/templates/volumes.py",
"copies": "1",
"size": "3339",
"license": "mit",
"hash": -5358938209912954000,
"line_mean": 28.8125,
"line_max": 70,
"alpha_frac": 0.6151542378,
"autogenerated": false,
"ratio": 3.794318181818182,
"config_test": false,
"... |
"""Build rules for C/C++."""
__all__ = [
'init',
]
import itertools
import iga.filetype
from iga.core import ImmutableOrderedSet
from iga.core import group
from iga.core import traverse
from iga.fargparse import oneof
from iga.label import Label
from iga.ninja import NinjaBuildstmt
from iga.ninja import NinjaRul... | {
"repo_name": "clchiou/iga",
"path": "iga/rules/cc.py",
"copies": "1",
"size": "4848",
"license": "mit",
"hash": 3781396871528219000,
"line_mean": 26.0837988827,
"line_max": 77,
"alpha_frac": 0.6062293729,
"autogenerated": false,
"ratio": 3.364330326162387,
"config_test": false,
"has_no_keywo... |
"""Build rule template for and object model of images and pods."""
__all__ = [
# Pod object model.
'App',
'Image',
'Pod',
'Port',
'SystemdUnit',
'Volume',
# Volume object model.
'FileSpec',
'VolumeSpec',
# Build rule template as decorator.
'app_specifier',
'image_spe... | {
"repo_name": "clchiou/garage",
"path": "shipyard/templates/pods.py",
"copies": "1",
"size": "30097",
"license": "mit",
"hash": 1158145032076266000,
"line_mean": 29.401010101,
"line_max": 76,
"alpha_frac": 0.5442402897,
"autogenerated": false,
"ratio": 4.103203817314247,
"config_test": false,
... |
# Builds a Brightsign pool + current-sync.xml from a kiddie_pool directory
from __future__ import print_function
import shutil
import os
import xml.etree.cElementTree as ET
import argparse
import logging
import hashlib
from copyfile import copyFile
# FUNCTIONS
def sha1file(filepath):
with open(filepath, 'rb') a... | {
"repo_name": "riordan/brightsign-lifeguard",
"path": "brightsignlifeguard/lifeguardIn/lifeguardIn.py",
"copies": "1",
"size": "4821",
"license": "apache-2.0",
"hash": -982073652140624000,
"line_mean": 28.3963414634,
"line_max": 107,
"alpha_frac": 0.6110765401,
"autogenerated": false,
"ratio": 3.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.