text stringlengths 4 1.02M | meta dict |
|---|---|
from __future__ import absolute_import, division, print_function, unicode_literals
from botocore.exceptions import ClientError
from c7n.manager import resources
from c7n.query import QueryResourceManager
from c7n.utils import local_session
from c7n.filters.vpc import SecurityGroupFilter, SubnetFilter
from c7n.tags im... | {
"content_hash": "a5548c8344ab3a618569d9d95a2b9bf6",
"timestamp": "",
"source": "github",
"line_count": 127,
"max_line_length": 82,
"avg_line_length": 31.062992125984252,
"alnum_prop": 0.5855513307984791,
"repo_name": "JohnTheodore/cloud-custodian",
"id": "3d577884891d5a6e6dba0f22f831236ffa57976b",
... |
import matlab2cpp
def type_string(node):
"""
Determine string represnentation of type.
Outside scalars and armadillo, the datatype name and their declaration do not
match. This function converts simple datatype declaration and translate them to
equivalent C++ declarations.
+-----------------+--------------------... | {
"content_hash": "9d65af4f90d311babe6a7804d06d7d37",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 79,
"avg_line_length": 28.846153846153847,
"alnum_prop": 0.47244444444444444,
"repo_name": "jonathf/matlab2cpp",
"id": "1e6c5af5ced7fa76423f7aba1450b851d3cb045b",
"size": "... |
"""Methods for manipulating a time series.
A Kegbot core may report a time series (Drink.tick_time_series) for the meter
events that caused a drink.
"""
def from_string(s):
"""Converts a time series to a list of (int, int) tuples.
The string should be a sequence of zero or more <time>:<amount> pairs.
Wh... | {
"content_hash": "3eef91ed89362021b188997fc3983cc5",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 78,
"avg_line_length": 30.2,
"alnum_prop": 0.6335540838852097,
"repo_name": "Kegbot/kegbot-server",
"id": "bcb1e22362d83b0fbeb12dd1a20797e60c493b79",
"size": "906",
"bina... |
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the minimumNumber function below.
def minimumNumber(n, password):
# Return the minimum number of characters to make the password strong
isdigit_pass = False
islower_pass = False
isupper_pass = False
issplchar_pa... | {
"content_hash": "c76fed907d580b789223e6b3e22b022d",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 79,
"avg_line_length": 26.527272727272727,
"alnum_prop": 0.564770390678547,
"repo_name": "MithileshCParab/HackerRank-10DaysOfStatistics",
"id": "81ca956cd95b921a28765b9a7e4e1... |
import pytest
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
@pytest.fixture
def driver(request):
wd = webdriver.Chrome()
print(wd.capabilities)
request.addfinalizer(wd.quit)
return wd
def test... | {
"content_hash": "c56b3bd12e80397f546014ba8cf99c52",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 78,
"avg_line_length": 29.736842105263158,
"alnum_prop": 0.7398230088495575,
"repo_name": "IvankaK/Testing",
"id": "7947d7e87955580e6d48bd07c5feb64785c360ee",
"size": "571"... |
from heat.common import exception
from heat.common.i18n import _
from heat.engine import constraints
from heat.engine import properties
from heat.engine.resources.openstack.neutron import neutron
from heat.engine import support
class L7Rule(neutron.NeutronResource):
"""A resource for managing LBaaS v2 L7Rules.
... | {
"content_hash": "5c6f7cdee134677d29ec106bbe3ff984",
"timestamp": "",
"source": "github",
"line_count": 206,
"max_line_length": 76,
"avg_line_length": 32.092233009708735,
"alnum_prop": 0.5453032824081077,
"repo_name": "openstack/heat",
"id": "28d0052e3d84f05e1b30632c4495a349dc390ecb",
"size": "7186... |
"""
This is part of WebScout software
Docs EN: http://hack4sec.pro/wiki/index.php/WebScout_en
Docs RU: http://hack4sec.pro/wiki/index.php/WebScout
License: MIT
Copyright (c) Anton Kuzmin <http://anton-kuzmin.ru> (ru) <http://anton-kuzmin.pro> (en)
Tests of DafsMask module
"""
import sys
import os
import time
import py... | {
"content_hash": "2e930dd156679a54dde081800e8209cc",
"timestamp": "",
"source": "github",
"line_count": 342,
"max_line_length": 117,
"avg_line_length": 38.07017543859649,
"alnum_prop": 0.5236559139784946,
"repo_name": "hack4sec/ws-cli",
"id": "95881f15caeb54a1917a1a38724c01ba444ed325",
"size": "130... |
import os,re
from waflib import Utils,Task,Errors,Logs,Node
from waflib.TaskGen import feature,before_method
re_bibunit=re.compile(r'\\(?P<type>putbib)\[(?P<file>[^\[\]]*)\]',re.M)
def bibunitscan(self):
node=self.inputs[0]
nodes=[]
if not node:return nodes
code=node.read()
for match in re_bibunit.finditer(code):
... | {
"content_hash": "175f0314c936497b01e40a72ef6e1117",
"timestamp": "",
"source": "github",
"line_count": 313,
"max_line_length": 190,
"avg_line_length": 33.52076677316294,
"alnum_prop": 0.6629813191002669,
"repo_name": "softDi/clusim",
"id": "a91fd9119f79dee7be47a2f6fce197c34abdb0ef",
"size": "10613... |
import base64
import cStringIO
import wx
try:
b64decode = base64.b64decode
except AttributeError:
b64decode = base64.decodestring
class PyEmbeddedImage(object):
"""
PyEmbeddedImage is primarily intended to be used by code generated
by img2py as a means of embedding image data i... | {
"content_hash": "882c1f69009cc6c2f046cca6abfd86e1",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 70,
"avg_line_length": 30.725806451612904,
"alnum_prop": 0.6677165354330709,
"repo_name": "ktan2020/legacy-automation",
"id": "abf25b814866e3f1bfe9cad7138f64c656de9893",
"s... |
from django.conf import settings
from django.core.files.storage import get_storage_class
from filer.utils.loader import load_object
from filer.utils.recursive_dictionary import RecursiveDictionaryWithExcludes
import os
FILER_IMAGE_MODEL = getattr(settings, 'FILER_IMAGE_MODEL', False)
FILER_DEBUG = getattr(settings, 'F... | {
"content_hash": "48f854e30cca3501af8ae3713e048908",
"timestamp": "",
"source": "github",
"line_count": 218,
"max_line_length": 181,
"avg_line_length": 41.87614678899082,
"alnum_prop": 0.6155110088728228,
"repo_name": "Venturi/oldcms",
"id": "a5ea0cfdf020524bfb311e3641e65e3c83914478",
"size": "9154... |
import copy
import os
import uuid
from flask import current_app
from dsl_parser import constants, tasks
from dsl_parser import exceptions as parser_exceptions
from manager_rest import config
from manager_rest.constants import CURRENT_TENANT_CONFIG
from manager_rest import app_context, manager_exceptions
from manager... | {
"content_hash": "9dce18c77d2cb2a339efbf58c1a4c6a9",
"timestamp": "",
"source": "github",
"line_count": 514,
"max_line_length": 79,
"avg_line_length": 39.63035019455253,
"alnum_prop": 0.587825233186058,
"repo_name": "isaac-s/cloudify-manager",
"id": "0be56b526929138dabf7e59349a05b397d721c34",
"size... |
import sys
import time
import tb as traceback
from browser import console
def discover_brython_test_modules():
# TODO : Test discovery based on file system paths
return [
("Core language features", [
("test_suite.py", "basic test suite"),
("test_rmethods.py", "reflected methods"),
... | {
"content_hash": "01962144299c0ad27216c91afd44b581",
"timestamp": "",
"source": "github",
"line_count": 110,
"max_line_length": 67,
"avg_line_length": 34.19090909090909,
"alnum_prop": 0.5099707524594522,
"repo_name": "kikocorreoso/brython",
"id": "64dcf3669e23da32daf225816ca69f693a5bdc3f",
"size": ... |
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8000)
| {
"content_hash": "232aba3b95bf6ad8d3df7513cd572493",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 40,
"avg_line_length": 18.454545454545453,
"alnum_prop": 0.6059113300492611,
"repo_name": "vsilent/smarty-bot",
"id": "97acdbc5df3ddcdaed1a6456e521fde23ee69e46",
"size": "2... |
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_dressed_marooned_pirate_rod_f.iff"
result.attribute_template_id = 9
result.stfName("npc_name","rodian_base_female")
#### BEGIN MODIFICATIONS ####
#### END MODIFICATIONS ####
return result | {
"content_hash": "234933c85a4b36ca9dc7d0332253f046",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 75,
"avg_line_length": 24,
"alnum_prop": 0.6987179487179487,
"repo_name": "obi-two/Rebelion",
"id": "a075eae71764f79aead994cd7afb6c801a774487",
"size": "457",
"binary": f... |
"""Verify that WeMo device triggers work as expected."""
import pytest
from pywemo.subscribe import EVENT_TYPE_LONG_PRESS
from homeassistant.components.automation import DOMAIN as AUTOMATION_DOMAIN
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN
from homeassistant.components.wemo.const import DOMAIN,... | {
"content_hash": "afc3e318ea950a7ee78ad0470f2f436e",
"timestamp": "",
"source": "github",
"line_count": 98,
"max_line_length": 80,
"avg_line_length": 31.142857142857142,
"alnum_prop": 0.5923984272608126,
"repo_name": "lukas-hetzenecker/home-assistant",
"id": "76016469b727e3ddc0ebdc83816811e8765158c7"... |
"""Stub file to maintain backwards compatibility."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# pylint: disable=wildcard-import,unused-import
from tensorflow.python.tpu.error_handling import *
# pylint: enable=wildcard-import,unused-import
| {
"content_hash": "334590813a7da48a58f4e43d4d1988de",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 52,
"avg_line_length": 34.44444444444444,
"alnum_prop": 0.7806451612903226,
"repo_name": "jbedorf/tensorflow",
"id": "1b1328b4075d9a737e40693c13e33e0b7c1fbedf",
"size": "995... |
from __future__ import absolute_import, division, unicode_literals
import numpy as np
from ..stats import histogram
from ..utils.compat.funcsigs import signature
__all__ = ['hist']
def hist(x, bins=10, ax=None, **kwargs):
"""Enhanced histogram function
This is a histogram function that enables the use of m... | {
"content_hash": "5bc20394d10817dccd62fee6247602ea",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 79,
"avg_line_length": 30.360655737704917,
"alnum_prop": 0.6538876889848813,
"repo_name": "kelle/astropy",
"id": "3f5248588f6a29204d7eca3c64edb13a6c300688",
"size": "1917",... |
import sys
import logging
import warnings
from logging.config import dictConfig
from twisted.python.failure import Failure
from twisted.python import log as twisted_log
import scrapy
from scrapy.settings import overridden_settings, Settings
from scrapy.exceptions import ScrapyDeprecationWarning
logger = logging.getL... | {
"content_hash": "624d53c9b516c0d97a39c5fba7bc67ba",
"timestamp": "",
"source": "github",
"line_count": 201,
"max_line_length": 99,
"avg_line_length": 31.761194029850746,
"alnum_prop": 0.6666666666666666,
"repo_name": "shaform/scrapy",
"id": "6ceb61a824b3b4687ee1f6304a02e9b51bcbec2b",
"size": "6409... |
import io
import os
from queue import Queue
from aioworkers import utils
from aioworkers.core.config import Config
from aioworkers.core.context import Context
from aioworkers.queue import proxy
async def test_q(event_loop):
conf = Config()
conf.update({'q.cls': utils.import_uri(proxy.ProxyQueue)})
async... | {
"content_hash": "a9df50211e53743188bc190283a01634",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 62,
"avg_line_length": 26.026315789473685,
"alnum_prop": 0.6056622851365016,
"repo_name": "aioworkers/aioworkers",
"id": "a5471af8e3458301df05eb3b610f97ab178c5929",
"size":... |
from . import registration
from . import user
from . import test
from . import hype
from . import organize
from . import mentor
from . import judge
from .index import IndexPage
from .help import HelpPage
from .links.index import LinksPage
from .hacks.index import HacksPage
from django.shortcuts import render
def hand... | {
"content_hash": "ed0709e25f6016a240b344d632533e14",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 54,
"avg_line_length": 24,
"alnum_prop": 0.7534722222222222,
"repo_name": "andrewsosa/hackfsu_com",
"id": "663b02fc8d8017c92ee1cdb0161d14b277dbaeef",
"size": "576",
"bina... |
"""Git implementation of _version.py."""
import errno
import os
import re
import subprocess
import sys
def get_keywords():
"""Get the keywords needed to look up the version information."""
# these strings will be replaced by git during git-archive.
# setup.py/versioneer.py will grep for the variable name... | {
"content_hash": "1376c6d562e0731427752ed9568aaf31",
"timestamp": "",
"source": "github",
"line_count": 510,
"max_line_length": 79,
"avg_line_length": 35.24313725490196,
"alnum_prop": 0.5696561700233671,
"repo_name": "cdiener/micom",
"id": "1722947cc151adebe4fd3e4f7725dc4a05900397",
"size": "18449"... |
"""Event loop and event loop policy."""
__all__ = ['AbstractEventLoopPolicy',
'AbstractEventLoop', 'AbstractServer',
'Handle', 'TimerHandle',
'get_event_loop_policy', 'set_event_loop_policy',
'get_event_loop', 'set_event_loop', 'new_event_loop',
'get_child_watcher... | {
"content_hash": "77ee1101105fbad9858f887ddb3c6775",
"timestamp": "",
"source": "github",
"line_count": 485,
"max_line_length": 79,
"avg_line_length": 30.8,
"alnum_prop": 0.6180211541036283,
"repo_name": "leetreveil/tulip",
"id": "57af68afb641b243b104ccc038597b073012d33f",
"size": "14938",
"binar... |
from .base import DictType
import six
class Healthcheck(DictType):
"""
Defines a healthcheck configuration for a container or service.
Args:
test (:py:class:`list` or str): Test to perform to determine
container health. Possible values:
- Empty list: ... | {
"content_hash": "06eb8f988cc750d45d22060727866970",
"timestamp": "",
"source": "github",
"line_count": 88,
"max_line_length": 78,
"avg_line_length": 31.25,
"alnum_prop": 0.5698181818181818,
"repo_name": "vpetersson/docker-py",
"id": "61857c21ce13f237bd914d6b3e97059eaca081e5",
"size": "2750",
"bi... |
from __future__ import absolute_import
from __future__ import print_function
import os
import time
from threading import Thread
import six
import six.moves.cPickle as pickle
# ============= enthought library imports =======================
from traits.api import (
Str,
String,
on_trait_change,
Float,... | {
"content_hash": "f8fe019f0f880af89074fe33b1b6885c",
"timestamp": "",
"source": "github",
"line_count": 637,
"max_line_length": 88,
"avg_line_length": 30.040816326530614,
"alnum_prop": 0.5159908026755853,
"repo_name": "NMGRL/pychron",
"id": "8d5b821064dd9f9b00200992abab5b228b419ac9",
"size": "19938... |
import os
import json
import time
import calendar
import datetime
from ..common.geometry import Polygon, Polyline, Point, MultiPoint
from .._abstract.abstract import AbstractGeometry, BaseFilter
import arcpy
########################################################################
class LayerDefinitionFilter(BaseFilter)... | {
"content_hash": "afa8b5c187d9f47815654921e9bbaf7b",
"timestamp": "",
"source": "github",
"line_count": 160,
"max_line_length": 95,
"avg_line_length": 45.19375,
"alnum_prop": 0.48679297469229704,
"repo_name": "achapkowski/ArcREST",
"id": "9e048cc008117817308f8fbea5e38d342b06c34b",
"size": "7231",
... |
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('velkoja', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='notificationsent',
name='notification_no',
... | {
"content_hash": "56d81d0fa5cfdfe819dbb46dae833312",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 57,
"avg_line_length": 21.72222222222222,
"alnum_prop": 0.6086956521739131,
"repo_name": "rambo/asylum",
"id": "3ab22e8703c10adec75b71b31c9357607a5e367a",
"size": "415",
... |
from django.test import TestCase
import json
import logging
from readthedocs.projects.models import Project
from readthedocs.projects import tasks
log = logging.getLogger(__name__)
class GitLabWebHookTest(TestCase):
fixtures = ["eric", "test_data"]
def tearDown(self):
tasks.update_docs = self.old_b... | {
"content_hash": "f5ed3ee5ee689fc7f9de99527b7cf1eb",
"timestamp": "",
"source": "github",
"line_count": 216,
"max_line_length": 109,
"avg_line_length": 41.851851851851855,
"alnum_prop": 0.5388274336283185,
"repo_name": "stevepiercy/readthedocs.org",
"id": "0579ec337ad30affa92988a9080070511eacc48a",
... |
import json
import base64
import datetime
import io
import os
import glob
import pandas as pd
import numpy as np
import dash_table
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from app import app, indicator
from core import define
from core ... | {
"content_hash": "07fb96c1f424385e5bd2e3a6b9ca2110",
"timestamp": "",
"source": "github",
"line_count": 449,
"max_line_length": 98,
"avg_line_length": 36.97104677060133,
"alnum_prop": 0.47457831325301203,
"repo_name": "gusseppe/pymach",
"id": "988f51ccb1fbeb2fc4e452ac33958d8be29b433e",
"size": "166... |
import random
from oslo_log import log as logging
from designate import exceptions
from designate import utils
from designate.backend import base
LOG = logging.getLogger(__name__)
DEFAULT_MASTER_PORT = 5354
class Bind9Backend(base.Backend):
__plugin_name__ = 'bind9'
def __init__(self, target):
su... | {
"content_hash": "5dd6b32ec0dbfad07f50a79b63651051",
"timestamp": "",
"source": "github",
"line_count": 89,
"max_line_length": 76,
"avg_line_length": 29.8876404494382,
"alnum_prop": 0.5409774436090226,
"repo_name": "cneill/designate",
"id": "ea256180c9a69cdbc3ee3d15f33f8dcbf1e0335e",
"size": "3278"... |
"""
"""
import os, sys, posixpath
import py
# Moved from local.py.
iswin32 = sys.platform == "win32" or (getattr(os, '_name', False) == 'nt')
class Checkers:
_depend_on_existence = 'exists', 'link', 'dir', 'file'
def __init__(self, path):
self.path = path
def dir(self):
raise NotImplemen... | {
"content_hash": "02bb1d7a4a7672399c0e359c756709e9",
"timestamp": "",
"source": "github",
"line_count": 405,
"max_line_length": 82,
"avg_line_length": 32.306172839506175,
"alnum_prop": 0.5330174258636503,
"repo_name": "brandonium21/snowflake",
"id": "880ee79ab6b17055b35835b23f42df344bef86f5",
"size... |
"""Generate Python documentation in HTML or text for interactive use.
In the Python interpreter, do "from pydoc import help" to provide online
help. Calling help(thing) on a Python object documents the object.
Or, at the shell command line outside of Python:
Run "pydoc <name>" to show documentation on someth... | {
"content_hash": "450090b4923653b46ccf7cd000e4176c",
"timestamp": "",
"source": "github",
"line_count": 2408,
"max_line_length": 95,
"avg_line_length": 40.683970099667775,
"alnum_prop": 0.5232578317188441,
"repo_name": "kubaszostak/gdal-dragndrop",
"id": "b62971908a6d6edd5886ec36af7b6540893da364",
... |
from __future__ import unicode_literals
from model_utils import Choices
__author__ = "pmeier82"
AccessChoices = Choices("private", "public")
if __name__ == "__main__":
pass
| {
"content_hash": "d76020f0a2bc75ec6f0f6f115936b423",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 44,
"avg_line_length": 20,
"alnum_prop": 0.6611111111111111,
"repo_name": "pmeier82/django-spikeval",
"id": "103e22aa87a1ccfa3fb5a4e2eb4136ffdd7ef3bc",
"size": "205",
"bin... |
"""Enumerates the BoringSSL source in src/ and generates two gypi files:
boringssl.gypi and boringssl_tests.gypi."""
import os
import subprocess
import sys
# OS_ARCH_COMBOS maps from OS and platform to the OpenSSL assembly "style" for
# that platform and the extension used by asm files.
OS_ARCH_COMBOS = [
('li... | {
"content_hash": "2122af20a0bf4df284648801b324b7ff",
"timestamp": "",
"source": "github",
"line_count": 253,
"max_line_length": 80,
"avg_line_length": 30.537549407114625,
"alnum_prop": 0.6242557597721978,
"repo_name": "chinmaygarde/mojo",
"id": "18356958fa39b57bdeac15b57c99a55a68b9710e",
"size": "7... |
#!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
... | {
"content_hash": "e180670c48e808cf23ae487789b5b021",
"timestamp": "",
"source": "github",
"line_count": 85,
"max_line_length": 73,
"avg_line_length": 31.68235294117647,
"alnum_prop": 0.6910508726327516,
"repo_name": "datalogics-robb/scons",
"id": "8ee57670b40fb0229c821bb2209c2b56270fdc4b",
"size": ... |
import collections
import warnings
from math import ceil
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _
class UnorderedObjectListWarning(RuntimeWarning):
pass
class InvalidPage(Exception):
pass
class PageNotAnInteger(InvalidPage):
pass
cla... | {
"content_hash": "8097b128907f6f141200217efd740e51",
"timestamp": "",
"source": "github",
"line_count": 185,
"max_line_length": 91,
"avg_line_length": 31.805405405405406,
"alnum_prop": 0.592794017675051,
"repo_name": "elky/django",
"id": "b07be513d39def3c7132aed0de241192caaf1f83",
"size": "5884",
... |
"""
Testing utilities for ``flocker.node``.
"""
import os
import pwd
import socket
from unittest import skipIf
from contextlib import closing
from uuid import uuid4
from zope.interface import implementer
from characteristic import attributes
from twisted.trial.unittest import TestCase
from twisted.internet.defer im... | {
"content_hash": "8f0a516bc3587ce609e62266f273a097",
"timestamp": "",
"source": "github",
"line_count": 266,
"max_line_length": 79,
"avg_line_length": 32.19548872180451,
"alnum_prop": 0.6387202241943017,
"repo_name": "1d4Nf6/flocker",
"id": "7158690e9aedd5430b05d4ba38dd170b5938da59",
"size": "8626"... |
# ***** BEGIN LICENSE BLOCK *****
# This file is part of Shelter Database.
# Copyright (c) 2016
# All rights reserved.
#
#
#
# ***** END LICENSE BLOCK *****
from bootstrap import app, manager
from web import models
from web import processors
# 'User' Web service
blueprint_user = manager.create_api... | {
"content_hash": "dd59b4ac63ef5a2923bb6090eb935f01",
"timestamp": "",
"source": "github",
"line_count": 96,
"max_line_length": 83,
"avg_line_length": 37.791666666666664,
"alnum_prop": 0.5275633958103638,
"repo_name": "toggle-corp/shelter-database",
"id": "f06f0e9489e8faa9c175fabe55d2245ed5c3da68",
... |
"""
A collection is a container for several (optionally indexed) objects having
the same vertex structure (vtype) and same uniforms type (utype). A collection
allows to manipulate objects individually and each object can have its own set
of uniforms provided they are a combination of floats.
"""
import math
import nump... | {
"content_hash": "b95b21aba4eb917f6d6ae7a845811e2f",
"timestamp": "",
"source": "github",
"line_count": 490,
"max_line_length": 94,
"avg_line_length": 33.487755102040815,
"alnum_prop": 0.5448839051739899,
"repo_name": "ghisvail/vispy",
"id": "8f7381d8a6f23248fb4594516e0b55e7d3138591",
"size": "1670... |
import serial
import time
lcd = serial.Serial("/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0", 9600,
serial.EIGHTBITS,
serial.PARITY_NONE,
serial.STOPBITS_ONE,
timeout=5,
rtscts = Fa... | {
"content_hash": "682b390e3163a418c76ae209170c5d5a",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 116,
"avg_line_length": 30.73913043478261,
"alnum_prop": 0.5827439886845828,
"repo_name": "oskarer/pi-boombox",
"id": "b94a3655518645f4d0608f98891b029e74c1be62",
"size": "1... |
from django.test import TestCase
from django.urls import reverse
from django.contrib.auth.models import User
from netdevice.tests import create_router
from static.models import ipv6_static, ipv4_static
def create_v4_static(test_router, network):
v4_route = ipv4_static.objects.create(router=test_router,
... | {
"content_hash": "ab8557aa22d7f96252102cb492ae7d64",
"timestamp": "",
"source": "github",
"line_count": 136,
"max_line_length": 124,
"avg_line_length": 43.80882352941177,
"alnum_prop": 0.5845921450151057,
"repo_name": "lkmhaqer/gtools-python",
"id": "e2d8501e296b6e9647fbef07307cd592d333ad9e",
"size... |
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('ideascale', '0007_auto_20150429_1503'),
]
operations = [
migrations.AlterField(
model_name='comment',
name='comments',
... | {
"content_hash": "c6066bce6c18cd933aec37e558ba1290",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 57,
"avg_line_length": 28.162790697674417,
"alnum_prop": 0.5565648224607762,
"repo_name": "joausaga/social-ideation",
"id": "86d768d6545c98710c4e534dd5543b0148e584c8",
"siz... |
import functools
import json
import urlparse
from django import http
from django.conf import settings
from django.contrib import auth
from django.db import transaction
from django.shortcuts import get_object_or_404
from django.template.response import TemplateResponse
from django.utils.http import is_safe_url
from dja... | {
"content_hash": "272fd5582ec1d0935f4a5f935c9aebde",
"timestamp": "",
"source": "github",
"line_count": 292,
"max_line_length": 81,
"avg_line_length": 32.98287671232877,
"alnum_prop": 0.628179835946423,
"repo_name": "ngokevin/zamboni",
"id": "7b495f1f0346727eb2b729ab238104357654b16f",
"size": "9631... |
from ...scheme import Scheme
from ..schemeinfo import SchemeInfoDialog
from ...gui import test
class TestSchemeInfo(test.QAppTestCase):
def test_scheme_info(self):
scheme = Scheme(title="A Scheme", description="A String\n")
dialog = SchemeInfoDialog()
dialog.setScheme(scheme)
stat... | {
"content_hash": "92f98d8804d0721bcedc377a0bf1762d",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 73,
"avg_line_length": 35.78947368421053,
"alnum_prop": 0.5720588235294117,
"repo_name": "cheral/orange3",
"id": "8ae117fe2469d9b2443414456b18d7246c9688f9",
"size": "680",
... |
"""
kombu.utils
===========
Internal utilities.
"""
from __future__ import absolute_import, print_function
import importlib
import numbers
import random
import sys
from contextlib import contextmanager
from itertools import count, repeat
from functools import wraps
from time import sleep
from uuid import UUID, uuid... | {
"content_hash": "6436a0489ecaaec3b27ea77448a163c3",
"timestamp": "",
"source": "github",
"line_count": 450,
"max_line_length": 79,
"avg_line_length": 28.286666666666665,
"alnum_prop": 0.5640663052871396,
"repo_name": "johankaito/fufuka",
"id": "0745ddfef7bf4e5f8fb4c96be88df0839c7bac08",
"size": "1... |
"""Goes through all usernames and collects their information"""
import sys
import arrow
from selenium.common.exceptions import NoSuchElementException
from util.account import login
from util.chromedriver import SetupBrowserEnvironment
from util.extractor import extract_information
from util.extractor_posts import Ins... | {
"content_hash": "a292a31ebf1923f9a6a7579fe4e627b1",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 74,
"avg_line_length": 35.544117647058826,
"alnum_prop": 0.5771617707902358,
"repo_name": "timgrossmann/instagram-profilecrawl",
"id": "405c3cfea34a52afa79bff9852b8046c70ce94... |
from swf.actors.core import Actor # NOQA
from swf.actors.worker import ActivityWorker # NOQA
from swf.actors.decider import Decider # NOQA
| {
"content_hash": "dee69147105a7cdb2af9aeb3227ae3bb",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 52,
"avg_line_length": 47.333333333333336,
"alnum_prop": 0.7887323943661971,
"repo_name": "botify-labs/simpleflow",
"id": "3b06f79cac45b62433faf83fea118029254f12b3",
"size":... |
"""
"""
import vtk
def main():
colors = vtk.vtkNamedColors()
fileName = get_program_parameters()
polyData = ReadPolyData(fileName)
# A renderer.
renderer = vtk.vtkRenderer()
renderer.SetBackground(colors.GetColor3d("White"))
# Create background colors for each viewport.
background... | {
"content_hash": "12608c626187afc32d261238087232c4",
"timestamp": "",
"source": "github",
"line_count": 158,
"max_line_length": 102,
"avg_line_length": 29.949367088607595,
"alnum_prop": 0.635883347421809,
"repo_name": "lorensen/VTKExamples",
"id": "5d722bc3e513765a1644a81c937b0f8800da02a1",
"size":... |
"""mike URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | {
"content_hash": "f5fb496d5ef7241079309a4d05233746",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 79,
"avg_line_length": 36.23809523809524,
"alnum_prop": 0.6990801576872536,
"repo_name": "N0stack/mike",
"id": "92f541de9823b8aab15a6845f5f31729818bac16",
"size": "761",
... |
from __future__ import absolute_import
import sys
from google.api_core.protobuf_helpers import get_messages
from google.api import http_pb2
from google.cloud.trace_v1.proto import trace_pb2
from google.protobuf import descriptor_pb2
from google.protobuf import empty_pb2
from google.protobuf import timestamp_pb2
_sha... | {
"content_hash": "01410947bad1dccf6b86ecb5aa9c97db",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 70,
"avg_line_length": 30.5,
"alnum_prop": 0.7142857142857143,
"repo_name": "dhermes/gcloud-python",
"id": "bb7c6a2415566149645d785a0aa835d67216e6c8",
"size": "1456",
"bi... |
import os,sys,random,time,pickle,string
#import pyaudio
#import wave
class dialogue_manager:
def __init__(self, pta, path_to_experiment, path_to_spf, given_words, log_filename, run_offline, alog_filename=None, poll_filename=None, push_filename=None, core_filename=None, session_id=None):
#input types
self.voca... | {
"content_hash": "1d9bfeb0c6793b265ccccf8a97a78cff",
"timestamp": "",
"source": "github",
"line_count": 993,
"max_line_length": 333,
"avg_line_length": 53.066465256797585,
"alnum_prop": 0.7088338552044786,
"repo_name": "pato/bwi_experimental",
"id": "be4d8b3b8c4d7036fed725782f3fad72be9368c9",
"size... |
"""
@package mi.instrument.harvard.massp.mcu.test.test_driver
@file marine-integrations/mi/instrument/harvard/massp/mcu/driver.py
@author Peter Cable
@brief Test cases for mcu driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/test_driver
$ bin/test_driver -u [-t testname]
... | {
"content_hash": "1d0091ec168597051a34e20f61854853",
"timestamp": "",
"source": "github",
"line_count": 743,
"max_line_length": 119,
"avg_line_length": 48.799461641991925,
"alnum_prop": 0.6083622924595952,
"repo_name": "petercable/mi-instrument",
"id": "cc55daa93d2142f9969ff69b0d743f1f1e27ae33",
"s... |
"""Drawing with alpha values."""
####
import pygame
import os
####
def load_pic(name, path="data"):
pic = pygame.image.load(os.path.join(path, name))
if pic.get_alpha():
return pic.convert_alpha()
else:
return pic.convert()
####
def check(x, minval=0, maxval=255):
return min(maxv... | {
"content_hash": "a2d5941bbf3d06463cc9ac0c5f4b793c",
"timestamp": "",
"source": "github",
"line_count": 144,
"max_line_length": 90,
"avg_line_length": 29.375,
"alnum_prop": 0.5295508274231678,
"repo_name": "yipyip/Pygame-Examples",
"id": "de8971f17fadf454091967f8fab9a75e671e287b",
"size": "4255",
... |
import os
import pytest
from VCF.VCFfilter.MLclassifier import MLclassifier
def test_train_snps(datadir):
"""
Train the model for SNPs
"""
ML_obj = MLclassifier()
outfile = ML_obj.train(outprefix="{0}/outdir/fitted_logreg_snps".format(datadir),
tp_annotations="{0}/TP_an... | {
"content_hash": "92ac744baf13c95ef63c531656c7b2e6",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 106,
"avg_line_length": 36.3728813559322,
"alnum_prop": 0.6346691519105312,
"repo_name": "igsr/igsr_analysis",
"id": "b9ed400a9cde0dad246b4468319eb8db4bd9a471",
"size": "21... |
"""
get_keyword.py
Usage: get_keyword "keyword"
search for movies tagged with the given keyword and print the results.
"""
import sys
# Import the IMDbPY package.
try:
import imdb
except ImportError:
print 'You bad boy! You need to install the IMDbPY package!'
sys.exit(1)
if len(sys.argv) != 2:
p... | {
"content_hash": "d2ec0ba0a2696f44011b29902d2e4d43",
"timestamp": "",
"source": "github",
"line_count": 52,
"max_line_length": 78,
"avg_line_length": 24.903846153846153,
"alnum_prop": 0.633976833976834,
"repo_name": "andurilhuang/Movie_Income_Prediction",
"id": "becbf03e44d8776148dbfed15366e9dc32eef8... |
"""Services for exploration-related statistics."""
from core.domain import exp_domain
from core.domain import exp_services
from core.domain import stats_domain
from core.domain import stats_jobs_continuous
from core.platform import models
(stats_models,) = models.Registry.import_models([models.NAMES.statistics])
IMP... | {
"content_hash": "f5e2afbd4ac5874e36532bd6daa9e53a",
"timestamp": "",
"source": "github",
"line_count": 272,
"max_line_length": 80,
"avg_line_length": 38.220588235294116,
"alnum_prop": 0.6168718737976144,
"repo_name": "jestapinski/oppia",
"id": "e893919214081d2d31f9e443990c2e4d73edc4fb",
"size": "1... |
all__ = ['pnexpose']
from pnexpose import *
| {
"content_hash": "7e56b6e6a128d2045265c8ad85b5f1ad",
"timestamp": "",
"source": "github",
"line_count": 2,
"max_line_length": 22,
"avg_line_length": 22,
"alnum_prop": 0.6590909090909091,
"repo_name": "divious1/pnexpose",
"id": "18ba0de1f4a25ef2ad16c19190bd0cb8902a4e7c",
"size": "44",
"binary": fa... |
"""Quark Redis Security Groups CLI tool.
Usage: redis_sg_tool [-h] [--config-file=PATH] [--retries=<retries>]
[--retry-delay=<delay>] <command> [--yarly]
Options:
-h --help Show this screen.
--version Show version.
--config-file=PATH Use a different config file path
--retries=<... | {
"content_hash": "f52e4ffacef82701c983e9a810db3ec6",
"timestamp": "",
"source": "github",
"line_count": 250,
"max_line_length": 79,
"avg_line_length": 35.1,
"alnum_prop": 0.5264957264957265,
"repo_name": "roaet/quark",
"id": "f32fb1e70ee6ebdbfb623b234f1501f399113a01",
"size": "9431",
"binary": fa... |
import os
from setuptools import setup
_branch_path = os.path.abspath(os.path.dirname(__file__))
_readme = open(os.path.join(_branch_path, 'README.txt')).read()
_version = open(os.path.join(_branch_path, 'VERSION.txt')).readline().rstrip()
setup(
name='recaptcha',
version=_version,
description='Pythoni... | {
"content_hash": "fb4ec677e4ca51b912739629274f2696",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 80,
"avg_line_length": 34.578947368421055,
"alnum_prop": 0.639269406392694,
"repo_name": "2degrees/python-recaptcha",
"id": "9bbaa4e369286bf58aa946e06682959be8515c1e",
"siz... |
import argparse
import json
import os
from keras.layers import LSTM, BatchNormalization, Dense, Dropout, Input, TimeDistributed
from keras.models import Model
from progressbar import ProgressBar
import h5py
def extract_predicted_outputs(experiment_id,
input_dataset,
... | {
"content_hash": "29d77530c0b6947363400a91f929d262",
"timestamp": "",
"source": "github",
"line_count": 154,
"max_line_length": 114,
"avg_line_length": 31.928571428571427,
"alnum_prop": 0.5745373195037624,
"repo_name": "imatge-upc/activitynet-2016-cvprw",
"id": "1928bf10d5199176e7f44d0fcf37606fb34093... |
import datetime
import pickle
import base64
import httplib2
from utils import log as logging
from oauth2client.client import OAuth2WebServerFlow, FlowExchangeError
from bson.errors import InvalidStringData
import uuid
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
# from django... | {
"content_hash": "f5b15aedbe974bddbf8387d4626a4ac4",
"timestamp": "",
"source": "github",
"line_count": 284,
"max_line_length": 163,
"avg_line_length": 42.45422535211268,
"alnum_prop": 0.638550219789334,
"repo_name": "petecummings/NewsBlur",
"id": "054439e1b1729dd59b2812eb76f5493dd5bc522f",
"size":... |
import unittest
from pyramid import testing
class ViewTests(unittest.TestCase):
def setUp(self):
self.config = testing.setUp()
def tearDown(self):
testing.tearDown()
def test_my_view(self):
from .views import my_view
request = testing.DummyRequest()
info = my_vie... | {
"content_hash": "21132545466ee52c6eb88107493cfeec",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 64,
"avg_line_length": 23.294117647058822,
"alnum_prop": 0.6439393939393939,
"repo_name": "yqian1991/angular-tictactoe",
"id": "12eee7afab9712bfaf6ed8708cd0511381aa0c54",
"... |
from django.shortcuts import render, redirect
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.contrib import messages
from django.utils import timezone
from... | {
"content_hash": "cde4c249ab4ce8b8be19a7773d9cf8e5",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 135,
"avg_line_length": 49.03030303030303,
"alnum_prop": 0.715698393077874,
"repo_name": "s-gv/bheemboy",
"id": "803d0d53a0dbfd24918a99f869ebaa30d74af413",
"size": "1618",
... |
"""Urls for the Zinnia categories"""
from django.conf.urls import url
from django.conf.urls import patterns
from zinnia.urls import _
from zinnia.views.categories import CategoryList
from zinnia.views.categories import CategoryDetail
urlpatterns = patterns(
'',
url(r'^$',
CategoryList.as_view(),
... | {
"content_hash": "22e0775b7a84e2d7db17497c15fc5176",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 55,
"avg_line_length": 27.761904761904763,
"alnum_prop": 0.6260720411663808,
"repo_name": "ZuluPro/django-blog-zinnia",
"id": "c4624577e23b222f034be2166ef8f4bab3a1c3e0",
"s... |
"""tor_scraper contains simple tools for scraping websites via the Tor network.
"""
# Set default module logging handler to avoid 'No handler found' warnings
import logging
logging.getLogger(__name__).addHandler(logging.NullHandler())
from .tor_scraper import TorScraper
| {
"content_hash": "73f5f15d5181d23d73127aaad30a4353",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 79,
"avg_line_length": 30.444444444444443,
"alnum_prop": 0.781021897810219,
"repo_name": "peterbrandt84/tor_scraper",
"id": "d0580f2d2f9bfe2f8fdd5e085926da2fe012ec6c",
"size... |
from __future__ import division, print_function
| {
"content_hash": "dee0929a7125821ced3e9eec238a91b3",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 47,
"avg_line_length": 48,
"alnum_prop": 0.7708333333333334,
"repo_name": "Erotemic/hotspotter",
"id": "f4319b817d9fa7df772ea493934cbb7bd71c0faa",
"size": "48",
"binary": ... |
from django.conf.urls import url
from api.osf_groups import views
app_name = 'osf'
urlpatterns = [
url(r'^$', views.GroupList.as_view(), name=views.GroupList.view_name),
url(r'^(?P<group_id>\w+)/$', views.GroupDetail.as_view(), name=views.GroupDetail.view_name),
url(r'^(?P<group_id>\w+)/members/$', views... | {
"content_hash": "e01b1c0ec042e041fe9c6b61cebb33ea",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 133,
"avg_line_length": 43.75,
"alnum_prop": 0.6819047619047619,
"repo_name": "Johnetordoff/osf.io",
"id": "d877198eb1052902d3386ac6708a2b3b777068aa",
"size": "525",
"bin... |
__author__ = 'vlovets'
from model.contact import Contact
import re
from selenium.webdriver.support.ui import Select
class ContactHelper:
def __init__(self, app):
self.app = app
def open_contact_page(self):
wd = self.app.wd
if not (wd.current_url.endswith('edit.php') and (len(wd.find_... | {
"content_hash": "34cac67d6cf6fd8f57f85a15ce94bd88",
"timestamp": "",
"source": "github",
"line_count": 194,
"max_line_length": 158,
"avg_line_length": 41.597938144329895,
"alnum_prop": 0.5985130111524164,
"repo_name": "VLovets/python_01",
"id": "d2f0e6b2f51bfbfaa513e83360afbf28c226b9a9",
"size": "... |
import os
import platform
import re
import subprocess
import sys
from distutils.version import LooseVersion
from setuptools import Extension, setup, setuptools
from setuptools.command.build_ext import build_ext
class CMakeExtension(Extension):
def __init__(self, name, sourcedir=""):
Extension.__init__(se... | {
"content_hash": "4a9aa13a39f2ec8f65615b9428927287",
"timestamp": "",
"source": "github",
"line_count": 218,
"max_line_length": 86,
"avg_line_length": 31.81651376146789,
"alnum_prop": 0.5537773933102653,
"repo_name": "Darknet-Crypto/Darknet",
"id": "1b0d7b2b13b591cc7ce31134473b5615af91ba5c",
"size"... |
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedSmoothNode
from toontown.toonbase import ToontownGlobals
from otp.otpbase import OTPGlobals
from direct.fsm import FSM
from direct.task import Task
... | {
"content_hash": "ee5ee67158265ff30371fe7a365f3b82",
"timestamp": "",
"source": "github",
"line_count": 322,
"max_line_length": 168,
"avg_line_length": 34.08385093167702,
"alnum_prop": 0.6152164009111617,
"repo_name": "linktlh/Toontown-journey",
"id": "9928e8211ddca13c4e9263f475b2cc77d6ef48e3",
"si... |
import sys
import os
# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# Get the proje... | {
"content_hash": "845870bad6c484216bccf61bb2a5ee8d",
"timestamp": "",
"source": "github",
"line_count": 260,
"max_line_length": 76,
"avg_line_length": 31.034615384615385,
"alnum_prop": 0.7055397199157268,
"repo_name": "sivakumar105/Python-DemoPackaging",
"id": "3f1a41f3f7e38a684d26b998e8570a3ffb9c4bb... |
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('profiles', '0004_profile_job'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='location',
f... | {
"content_hash": "b4a0e5f19e8dd728c2119eacd0ddfca9",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 88,
"avg_line_length": 22.944444444444443,
"alnum_prop": 0.6053268765133172,
"repo_name": "suzp1984/django-tutorial",
"id": "a61f0eddbc5443716ef7b7f73ae2827b214ef843",
"siz... |
"""An example functional test
The module-level docstring should include a high-level description of
what the test is doing. It's the first thing people see when they open
the file and should give the reader information about *what* the test
is testing and *how* it's being tested
"""
# Imports should be in PEP8 orderin... | {
"content_hash": "a4d1619c607f43541e2f6e895b2eaba4",
"timestamp": "",
"source": "github",
"line_count": 219,
"max_line_length": 118,
"avg_line_length": 39.96803652968037,
"alnum_prop": 0.6568033816977037,
"repo_name": "Exgibichi/statusquo",
"id": "2e8a07462ea097481ec61537811a8207ff5ba8da",
"size": ... |
from thrift.Thrift import *
import hadoop.api.common.HadoopServiceBase
from ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
from thrift.protocol import fastbinary
except:
fastbinary = None
class Iface(hadoop.a... | {
"content_hash": "a55c2860d01c40f05890245b054f2736",
"timestamp": "",
"source": "github",
"line_count": 5052,
"max_line_length": 188,
"avg_line_length": 30.759303246239114,
"alnum_prop": 0.6337357460938505,
"repo_name": "hortonworks/hortonworks-sandbox",
"id": "a0857587d263dfef53eafdc2ef0e7d17868bd31... |
from tempfile import gettempdir, mkstemp
from json import dump, load
class ParseSyncConfig():
CONFIG_PATH = '%s/parsesync.config' % gettempdir()
def __init__(self):
try:
with open(self.CONFIG_PATH, 'r') as f:
self.config = load(f)
except Exception, e:
s... | {
"content_hash": "62bf6ba568c8139acccd436d2019473c",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 60,
"avg_line_length": 30.785714285714285,
"alnum_prop": 0.5835266821345708,
"repo_name": "cereigido/django-parse-sync",
"id": "754c518040567cc3bc4770eab490f81bfecad9ef",
"... |
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('crm', '0002_auto_20161126_0030'),
]
operations = [
migrations.AlterField(
model_name='employee',
name='company',
... | {
"content_hash": "3fa05873e0c7a2c22da15390c21dc100",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 97,
"avg_line_length": 27.17391304347826,
"alnum_prop": 0.5904,
"repo_name": "rg3915/orcamentos",
"id": "9f14ca6585186335a6ae1ef43eb3f085844b50bb",
"size": "697",
"binary... |
import os
from flask import Flask, url_for, render_template, request
app = Flask(__name__)
@app.route('/')
def renderMain():
return render_template('home.html')
@app.route('/page1')
def renderPage1():
return render_template('page1.html')
@app.route('/page2')
def renderPage2():
return render_template('pa... | {
"content_hash": "b958905b51954da5ca1edcd9b79b676c",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 78,
"avg_line_length": 22.857142857142858,
"alnum_prop": 0.6479166666666667,
"repo_name": "pconrad/flask-practice-web-app",
"id": "d15d3ce8c2cef8b091cf29c7556867f4eba6dec0",
... |
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Person',
fields=[
('id', models.AutoField(auto_crea... | {
"content_hash": "7b38be4e775894ce00ae70629e5f5290",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 114,
"avg_line_length": 27.304347826086957,
"alnum_prop": 0.5493630573248408,
"repo_name": "PyLadiesPoznanAdvanced/django-introduction-bmi",
"id": "e3d114a090e8043390800bad37... |
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import unittest2 as unittest
from pants.goal.task_registrar import TaskRegistrar
from pants.goal.goal import Goal
class EngineTestBase(unittest.TestCase):
@class... | {
"content_hash": "d943e6a36116f1485fd127dc4e3045a8",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 95,
"avg_line_length": 35.97872340425532,
"alnum_prop": 0.6924896510940272,
"repo_name": "square/pants",
"id": "c53101ef6a0c5d2b0559e21861796ad6de7330dd",
"size": "1838",
... |
"""piddleQt
This module implements the PIDDLE/Sping API for a Qt canvas
Bits have been shamelessly cobbled from piddleSVG.py
Greg Landrum ([email protected]) 29 Octover, 2002
"""
"""
Functionality implemented:
x drawLine
x drawPolygon
x drawString
x drawImage
Known problems:
"""
from rdkit... | {
"content_hash": "1d73501af30dd1b1b0240948817ef182",
"timestamp": "",
"source": "github",
"line_count": 383,
"max_line_length": 99,
"avg_line_length": 27.407310704960835,
"alnum_prop": 0.6217014385062398,
"repo_name": "bp-kelley/rdkit",
"id": "c781bd82d0e119d2934839dadae747d31716a3d6",
"size": "112... |
from iris_sdk.models.maps.base_map import BaseMap
class AvailableNpaNxxListMap(BaseMap):
available_npa_nxx = None | {
"content_hash": "82b9d1acdf2cb4b80b38a7ed1a4d103a",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 49,
"avg_line_length": 23.8,
"alnum_prop": 0.7899159663865546,
"repo_name": "scottbarstow/iris-python",
"id": "9e11eb16e434945c0b1e6b763e12351d421ac0a5",
"size": "142",
"b... |
"""Generate parms pages."""
import os
import mkdocs_gen_files
repo_base = os.path.abspath(
os.path.join(
os.path.abspath(__file__), os.path.pardir, os.path.pardir, os.path.pardir
)
)
params_source = os.path.join(repo_base, "python", "federatedml", "param")
params_doc_target = os.path.join(repo_base, "d... | {
"content_hash": "eb8156283df2a72070d4a1c103e9233a",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 97,
"avg_line_length": 34.53125,
"alnum_prop": 0.6271493212669683,
"repo_name": "FederatedAI/FATE",
"id": "355a255c6bdf288252086aa9407dcccbc098c2dd",
"size": "1105",
"bin... |
from .logindialog import login
from .exitdialog import exit
from .msgdialog import MessageDialog
from .msgdialog import msg
from .ipaddressdialog import ipaddressinput
from .urlinputdialog import urlinput
from .numinputdialog import numinput
from .confirmdialog import confirm
from .confirmdialog import ConfirmDialog
fr... | {
"content_hash": "512d5269856438f1e67b6d640220bfbb",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 142,
"avg_line_length": 36.388888888888886,
"alnum_prop": 0.7877862595419848,
"repo_name": "dragondjf/CloudSetuper",
"id": "38628ea5a171ebaa31ca7ca9daa15f84eea9c583",
"size... |
'''
====================================================================================
Copyright 2013, 2014 Windy Darian (大地无敌), Studio "Sekai no Kagami"
(世界之镜制作组) of Seven Ocean Game Arts (七海游戏文化社
, 北京航空航天大学学生七海游戏文化社) @ http://sogarts.com
Licensed under the Apache License, Version 2.0 (the "Lic... | {
"content_hash": "e438fd12d5a577a6dcaed57c662c3bd1",
"timestamp": "",
"source": "github",
"line_count": 330,
"max_line_length": 84,
"avg_line_length": 30.79090909090909,
"alnum_prop": 0.515205196338943,
"repo_name": "WindyDarian/Sogal",
"id": "b815e0bfa9c749d86a2a510116fd26a5091d267c",
"size": "102... |
import pycb
import unittest
import requests
import json
import time
def bucket_list():
bucketList = []
r = requests.get("http://localhost:8091/pools/default/buckets")
for bucket in r.json():
bucketList.append(bucket['name'])
return bucketList
class TestPycb(unittest.TestCase):
@classmet... | {
"content_hash": "4a4836725c03000e57aff1d2dbfeebcd",
"timestamp": "",
"source": "github",
"line_count": 217,
"max_line_length": 77,
"avg_line_length": 36.89861751152074,
"alnum_prop": 0.5640064943174722,
"repo_name": "yamingd/pycb",
"id": "fe2bc1e309f4fc363abcd3a1794e7a33069b82da",
"size": "8007",
... |
import urllib
import sqlalchemy
import healthcareai.common.database_library_validators as hcai_db_library
try:
# Note we don't want to force pyodbc as a requirement
import pyodbc
pyodbc_is_loaded = True
except ImportError:
pyodbc_is_loaded = False
try:
# Note we don't want to force sqlite3 as a ... | {
"content_hash": "2f9b406b18cedcce83245e7fda6005c0",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 123,
"avg_line_length": 29.453125,
"alnum_prop": 0.7023872679045093,
"repo_name": "mxlei01/healthcareai-py",
"id": "433165b122e9a720d9a393aced1811a298241fc8",
"size": "1885... |
"""
Highlight.
A library for managing code highlighting.
All Changes Copyright 2014-2017 Isaac Muse.
---
CodeHilite Extension for Python-Markdown
========================================
Adds code/syntax highlighting to standard Python-Markdown code blocks.
See <https://pythonhosted.org/Markdown/extensions/code_h... | {
"content_hash": "fe19dc6c486d388ac2ff01f8d130d50a",
"timestamp": "",
"source": "github",
"line_count": 310,
"max_line_length": 109,
"avg_line_length": 31.729032258064517,
"alnum_prop": 0.5595770638470923,
"repo_name": "brunobergher/dotfiles",
"id": "280d3228c2334d8d8f232a0a298a28835ac78c60",
"size... |
from __future__ import unicode_literals
from django.db import models
from django.db.migrations.operations.base import Operation
from django.db.migrations.state import ModelState
from django.db.models.options import normalize_together
from django.utils import six
from django.utils.functional import cached_property
fro... | {
"content_hash": "5ded0cbb515fd72e2f852090fc7f92f3",
"timestamp": "",
"source": "github",
"line_count": 845,
"max_line_length": 119,
"avg_line_length": 38.51715976331361,
"alnum_prop": 0.5705287737733125,
"repo_name": "darkryder/django",
"id": "a0e81f5e836297f2256979d68177902d536f6d2c",
"size": "32... |
<<<<<<< HEAD
<<<<<<< HEAD
import unittest, sys
from ctypes.test import need_symbol
class SimpleTypesTestCase(unittest.TestCase):
def setUp(self):
import ctypes
try:
from _ctypes import set_conversion_mode
except ImportError:
pass
else:
self.prev_... | {
"content_hash": "6f49d1ecc890f094723b88be2bd6cbc6",
"timestamp": "",
"source": "github",
"line_count": 534,
"max_line_length": 88,
"avg_line_length": 35.07116104868914,
"alnum_prop": 0.5972340879965826,
"repo_name": "ArcherSys/ArcherSys",
"id": "58a97998afb1ddca42eb181461ff50e43e5c7a39",
"size": "... |
import sphinx_rtd_theme
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext... | {
"content_hash": "978774d31cd4dae6e8a11afba43ab9e9",
"timestamp": "",
"source": "github",
"line_count": 133,
"max_line_length": 78,
"avg_line_length": 32.38345864661654,
"alnum_prop": 0.6665892732760622,
"repo_name": "pauleveritt/arcade_tutorial",
"id": "6212adb741646b5093cf7057a8beeeb18393cf39",
"... |
"""
The ``ui.ScrollPanel`` class implements a panel that scrolls its contents.
If you want the scroll bars to be always visible, call
``setAlwaysShowScrollBars(True)``. You can also change the current scrolling
position programmatically by calling ``setScrollPosition(vPos)`` and
``setScrollHorizontalPosition(hPos)`` ... | {
"content_hash": "7dbe4596045db8e009cdd4a32fa9b596",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 77,
"avg_line_length": 39.87096774193548,
"alnum_prop": 0.633495145631068,
"repo_name": "certik/pyjamas",
"id": "59cbda85b0e68f2f2641823d2b584e6d661b3c0c",
"size": "1236",
... |
"""
Classes that deal with stretching, i.e. mapping a range of [0:1] values onto
another set of [0:1] values with a transformation
"""
import numpy as np
from .transform import BaseTransform
from .transform import CompositeTransform
__all__ = ["BaseStretch", "LinearStretch", "SqrtStretch", "PowerStretch",
... | {
"content_hash": "44db8c1070dd5316b3a6a42f4b9a1289",
"timestamp": "",
"source": "github",
"line_count": 713,
"max_line_length": 78,
"avg_line_length": 29.65638148667602,
"alnum_prop": 0.5745093402695672,
"repo_name": "dhomeier/astropy",
"id": "419868c759262e623017be19037dc8efaf94685a",
"size": "212... |
"""empty message
Revision ID: 4249ec1222e4
Revises: 481d4a3fef63
Create Date: 2014-08-14 22:02:40.703605
"""
# revision identifiers, used by Alembic.
revision = '4249ec1222e4'
down_revision = '481d4a3fef63'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | {
"content_hash": "72779a8a2fe80c2ee5cf34bf071d58fc",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 64,
"avg_line_length": 27.03030303030303,
"alnum_prop": 0.6782511210762332,
"repo_name": "kho0810/flaskr",
"id": "32f6d108e214afbc0e24845ceb2162279ec4dd1e",
"size": "892",
... |
from django import http
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import login as auth_login
from django.contrib.auth import logout as auth_logout
from django.contrib.auth import update_session_auth_hash
from django.contrib.sites.shortcuts import get_current_site
from... | {
"content_hash": "35fee8afa86f3422efa03a4de5bd5a7e",
"timestamp": "",
"source": "github",
"line_count": 718,
"max_line_length": 79,
"avg_line_length": 36.28272980501393,
"alnum_prop": 0.6202449042263253,
"repo_name": "john-parton/django-oscar",
"id": "042dc37e390cb2276571bd79e1129c17f1cab840",
"siz... |
"""
sphinx.ext.napoleon.iterators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A collection of helpful iterators.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import collections
class peek_iter(object):
"""An iterator object that supports p... | {
"content_hash": "e5a063f13f411865ee16eaab5252ba00",
"timestamp": "",
"source": "github",
"line_count": 238,
"max_line_length": 78,
"avg_line_length": 31.42436974789916,
"alnum_prop": 0.557694878994518,
"repo_name": "neerajvashistha/pa-dude",
"id": "f66d67f2ce518148a56bd64774c1fbe7e45c4725",
"size"... |
from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-MS16032',
'Author': ['@FuzzySec', '@leoloobeek'],
'Description': ('Spawns a new Listener as SYSTEM by'
' leveraging the MS1... | {
"content_hash": "918e51290294d71926b382d726562f0c",
"timestamp": "",
"source": "github",
"line_count": 106,
"max_line_length": 131,
"avg_line_length": 38.22641509433962,
"alnum_prop": 0.5125863770977295,
"repo_name": "ThePirateWhoSmellsOfSunflowers/Empire",
"id": "a78fb840253a96b66ad706b9e03fd5a2e7a... |
from django.core.management import execute_from_command_line
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"ray.tune.automlboard.settings")
execute_from_command_line(sys.argv)
| {
"content_hash": "5b1a03edb344d5e262271972ef756775",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 60,
"avg_line_length": 32.625,
"alnum_prop": 0.6628352490421456,
"repo_name": "pcmoritz/ray-1",
"id": "e3c599cde2325e8dc47f3d7e11fde349608ec5fb",
"size": "283",
"binary": ... |
"""
Simple Counter
~~~~~~~~~~~~~~
Instrumentation example that gathers method invocation counts
and dumps the numbers when the program exists, in JSON format.
:copyright: (c) 2014 by Romain Gaucher (@rgaucher)
:license: Apache 2, see LICENSE for more details.
"""
import sys
from equip import Program, \
... | {
"content_hash": "1576591f693aea34c6c54a1cf886a0f1",
"timestamp": "",
"source": "github",
"line_count": 95,
"max_line_length": 86,
"avg_line_length": 29.305263157894736,
"alnum_prop": 0.6871408045977011,
"repo_name": "neuroo/equip",
"id": "350da5278ed33f4e5b4fef23b62b9621ad7d533d",
"size": "2808",
... |
import logging
from ironic.openstack.common import notifier
from oslo.config import cfg
class PublishErrorsHandler(logging.Handler):
def emit(self, record):
if ('ironic.openstack.common.notifier.log_notifier' in
cfg.CONF.notification_driver):
return
notifier.api.notif... | {
"content_hash": "d5b5c541f654b7f57d4ed140e406c58a",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 62,
"avg_line_length": 31.0625,
"alnum_prop": 0.5875251509054326,
"repo_name": "citrix-openstack-build/ironic",
"id": "fb2848581f8581fe7ebb1eb4691e2a4a8908cdd4",
"size": "1... |
import sark
from DIE.Lib import DIEDb
db = DIEDb.get_db() # A global DIE database instance
def does_return_string(function):
"""
Check if a function returns a string.
@param function: db_DataTypes.dbFunction object
@return: True if the function return value contains a string
"""
for ctx in f... | {
"content_hash": "d1f8186224ef113da39a6250bfba2010",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 93,
"avg_line_length": 33.666666666666664,
"alnum_prop": 0.674000733406674,
"repo_name": "AlexWMF/DIE",
"id": "e09b292449066616f2c90b387271ad38a6c92978",
"size": "3134",
... |
from datetime import date, timedelta
from django.conf import settings
from django.contrib.auth.models import User, AnonymousUser
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.test import TestCase
class TokenGeneratorTest(TestCase):
def test_make_token(self):
"""
... | {
"content_hash": "565dcc151189c1ae68a2a2f06d22768e",
"timestamp": "",
"source": "github",
"line_count": 74,
"max_line_length": 98,
"avg_line_length": 39.67567567567568,
"alnum_prop": 0.6103542234332425,
"repo_name": "brunogamacatao/portalsaladeaula",
"id": "623e5da66af5119a82c6b4c29481139562902c67",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.