text stringlengths 4 1.02M | meta dict |
|---|---|
from oozappa.config import OozappaSetting
_ = OozappaSetting
settings = _(
domain = 'tsuyukimakoto.com',
instance_type = 'c3.large',
)
| {
"content_hash": "0cbf0d22f737f9c744f09e7d89456a14",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 41,
"avg_line_length": 20.571428571428573,
"alnum_prop": 0.6944444444444444,
"repo_name": "frkwy/oozappa",
"id": "b87b6518ba8fedbe5748a0c1728fd64f3ae0594d",
"size": "166",
... |
from pyston.serializer import Serializable, SerializableObj
from .models import User
class CountIssuesPerUserTable(Serializable):
def serialize(self, serialization_format, **kwargs):
return [
{
'email': user.email,
'created_issues_count': user.created_issues.c... | {
"content_hash": "e637be111030df0c8202a9aaaacc00ee",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 68,
"avg_line_length": 25.923076923076923,
"alnum_prop": 0.6097922848664689,
"repo_name": "druids/django-pyston",
"id": "4c9755689c0ca62349af109410d93acf6ca99b6a",
"size": ... |
import os
from subprocess import Popen, STDOUT, PIPE, call
import filecmp
import glob
from optparse import OptionParser
parser = OptionParser()
parser.add_option('--mpi_exec', dest='mpi_exec', default='')
parser.add_option('--mpi_np', dest='mpi_np', default='3')
parser.add_option('--exe', dest='exe')
(opts, args) = pa... | {
"content_hash": "a380bebf82b4e05b3334aab1cd8bc0df",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 87,
"avg_line_length": 32.527272727272724,
"alnum_prop": 0.6411403018446059,
"repo_name": "bhermanmit/cdash",
"id": "1e61af4a2b734fbee1cc5fc6f3e87f25065099ee",
"size": "181... |
__author__ = 'Douglas'
'''
A função cifraCesar(<mensagem>,<ndesloc>) retorna criptografada a mensagem passada como
parâmetro de entrada com deslocamento passado como segundo parâmetro.
Ex.: 'Aula de matemática: Capítulo nove'
Ret.: 'DXOD*GH*PDWHPÄWLFD=*FDSÐWXOR*QRYH'
'''
def cifraCesar(mensagem, ndesloc):
textoCifra ... | {
"content_hash": "3c917b2bb0097f0fcb9d1ca4826d537b",
"timestamp": "",
"source": "github",
"line_count": 80,
"max_line_length": 93,
"avg_line_length": 21.0625,
"alnum_prop": 0.7222551928783383,
"repo_name": "douglasbolis/prog_2",
"id": "ff7d5d534fba1573b035ba4951fa41d13488fc77",
"size": "1701",
"b... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from scipy import stats
import tensorflow as tf
class DirichletTest(tf.test.TestCase):
def testSimpleShapes(self):
with self.test_session():
alpha = np.random.rand(3)
dis... | {
"content_hash": "e666ea4baf56c7bfd413bccbd5879142",
"timestamp": "",
"source": "github",
"line_count": 182,
"max_line_length": 75,
"avg_line_length": 37.26923076923077,
"alnum_prop": 0.6240601503759399,
"repo_name": "tongwang01/tensorflow",
"id": "59a6216baaccc7e2155114bd55c445c2a1fe568d",
"size":... |
'''
## License
The MIT License (MIT)
Jetduino for the Jetson TK1/TX1: an open source platform for connecting
Grove Sensors to the Jetson embedded supercomputers.
Copyright (C) 2016 NeuroRobotic Technologies
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated... | {
"content_hash": "544ad0f9c91c0dafdc9ece593e86ea86",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 89,
"avg_line_length": 33.97435897435897,
"alnum_prop": 0.7362264150943396,
"repo_name": "NeuroRoboticTech/Jetduino",
"id": "24d066e1b5b424b32d4925dd7306709db108d67d",
"siz... |
import pytest
import sys
import cPickle as pickle
from test_base_class import TestBaseClass
import os
import shutil
import time
aerospike = pytest.importorskip("aerospike")
try:
from aerospike.exception import *
except:
print "Please install aerospike python client."
sys.exit(1)
from aerospike import pred... | {
"content_hash": "ee4627579ec047cdfb7fd34c26768e30",
"timestamp": "",
"source": "github",
"line_count": 517,
"max_line_length": 92,
"avg_line_length": 31.448742746615086,
"alnum_prop": 0.5456055107940218,
"repo_name": "trupty/aerospike-client-python",
"id": "cb64a90f751ada01564e17e0f1650727767f086a",... |
"""
Abstraction for an SSH2 channel.
"""
import binascii
import sys
import time
import threading
import socket
import os
from paramiko.common import *
from paramiko import util
from paramiko.message import Message
from paramiko.ssh_exception import SSHException
from paramiko.file import BufferedFile
from paramiko.buf... | {
"content_hash": "e3628d2c3d7c30eeb243e8e8b9659df3",
"timestamp": "",
"source": "github",
"line_count": 1261,
"max_line_length": 96,
"avg_line_length": 36.45915939730373,
"alnum_prop": 0.5794453507340946,
"repo_name": "midma101/AndIWasJustGoingToBed",
"id": "d1e6333c99bde4f7085b3bdbb5f018077ffbd559",... |
print("Loading tensorflow...")
import tensorflow as tf
from libs import utils, gif
# dja
import numpy as np
import matplotlib.pyplot as plt
import os
plt.style.use('bmh')
import datetime
#np.set_printoptions(threshold=np.inf) # display FULL array (infinite)
plt.ion()
plt.figure(figsize=(5, 5))
TID=datetime.date.toda... | {
"content_hash": "5a16d499dec12e403c86c1cefb1c838a",
"timestamp": "",
"source": "github",
"line_count": 277,
"max_line_length": 116,
"avg_line_length": 25.902527075812273,
"alnum_prop": 0.6076655052264809,
"repo_name": "dariox2/CADL",
"id": "8c2ee684b8b6485d45f2156f4174c57b7ca24656",
"size": "7217"... |
"""This module contains a client for interacting with the CloudSQL API.
"""
from datetime import datetime
from datetime import timedelta
import httplib2
import json
import logging
import os
import pprint
import time
from google.appengine.api import rdbms
class CloudSQLClient(object):
"""CloudSQL client.
"""... | {
"content_hash": "09f1756d076f0a6c11191a108b92a785",
"timestamp": "",
"source": "github",
"line_count": 101,
"max_line_length": 78,
"avg_line_length": 31.405940594059405,
"alnum_prop": 0.5595838587641866,
"repo_name": "dcurley/mlab-metrics-api-server",
"id": "fa8d66da5f5254f916ecdf708dafac8324d003e3"... |
from flask import current_app
from flask_login import login_required
from whyis.blueprint.nanopub.nanopub_utils import get_nanopub_uri
from .nanopub_blueprint import nanopub_blueprint
#@nanopub_blueprint.route('/pub/<ident>', methods=['DELETE'])
#@login_required
def delete_nanopub(ident):
#print(request.method, ... | {
"content_hash": "0196cd78500e11a9e617c42430538a95",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 65,
"avg_line_length": 32.94117647058823,
"alnum_prop": 0.7107142857142857,
"repo_name": "tetherless-world/graphene",
"id": "13a7b4c6c2d1f877bed522ff4579b8e43de1d8b4",
"siz... |
import socket
import gobject
class TrivialStream:
def __init__(self, socket_address=None):
self.socket_address = socket_address
def read_socket(self, s):
try:
data = s.recv(1024)
if len(data) > 0:
print "received:", data
except socket.error, e:
... | {
"content_hash": "371eccbe52b79a78648c56ded0b66495",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 72,
"avg_line_length": 27.19672131147541,
"alnum_prop": 0.5786618444846293,
"repo_name": "opendreambox/python-coherence",
"id": "01bd93a1a92aa9bb766de07fc32942153834a6c7",
... |
"""
MoinMoin - lists of translateable strings
MoinMoin uses some translateable strings that do not appear at other
places in the source code (and thus, are not found by gettext when
extracting translateable strings).
Also, some strings need to be organized somehow.
TODO i18n.strings / general:... | {
"content_hash": "f43684c8ab4e7027525b0d92542d8a85",
"timestamp": "",
"source": "github",
"line_count": 302,
"max_line_length": 101,
"avg_line_length": 28.12251655629139,
"alnum_prop": 0.6480631107971271,
"repo_name": "RealTimeWeb/wikisite",
"id": "9fab71d2beb6c03f9b9fab6ab7f6ac3c3041e87f",
"size":... |
"Define basic subroutines useful for all AI players"
from ..board import black, white, empty, Board, InvalidMoveError
import numpy as np
import unittest
class Playerlibrary(object):
"""
A library class that holds basic subroutines that are useful for all
kinds of artificial-intelligence-type (AI-type) pla... | {
"content_hash": "2b5a0e786bf01bbd60f4f789519183a3",
"timestamp": "",
"source": "github",
"line_count": 433,
"max_line_length": 119,
"avg_line_length": 41.98845265588915,
"alnum_prop": 0.49496727352730874,
"repo_name": "jPhy/Gomoku",
"id": "9ec75a0650b669b94b46825bef70073ed36db893",
"size": "18181"... |
"""
Classes allowing "generic" relations through ContentType and object-id fields.
"""
from __future__ import unicode_literals
from collections import defaultdict
from functools import partial
from django.core.exceptions import ObjectDoesNotExist
from django.db import connection
from django.db import models, router, ... | {
"content_hash": "27a1544657a000cd11d49cc9dfacaaf7",
"timestamp": "",
"source": "github",
"line_count": 552,
"max_line_length": 116,
"avg_line_length": 41.77355072463768,
"alnum_prop": 0.6037122164881391,
"repo_name": "Beeblio/django",
"id": "1ec5475f5b3b9ef994a0a296c043892f1bb74401",
"size": "2305... |
from django.conf.urls import url
from .views import index
from .views import mypage
from .views import login_view
from .views import signup
from .views import new_server_group
from .views import add_player
from .views import server_group_detail
from .views import player_detail
from .views import start_server
from .vie... | {
"content_hash": "e15f261a20dfe23a8bd4020d94c812b7",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 92,
"avg_line_length": 38.57692307692308,
"alnum_prop": 0.6630109670987039,
"repo_name": "uehara1414/serverctl-prototype",
"id": "b8bef0da994d1a298ffc5c9d854aff517270cd0b",
... |
"""Example of streaming a file and printing status updates.
python stream.py 10.0.0.4 file.mp3
"""
import asyncio
import sys
import pyatv
from pyatv.interface import Playing, PushListener
LOOP = asyncio.get_event_loop()
class PushUpdatePrinter(PushListener):
"""Print push updates to console."""
def plays... | {
"content_hash": "49ea5d186f06b7d2fe0e4b5c344b95ae",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 85,
"avg_line_length": 26.803571428571427,
"alnum_prop": 0.6568954030646236,
"repo_name": "postlund/pyatv",
"id": "a6a0a465764b64edd1d806b6266630e091cdc001",
"size": "1501"... |
from urllib import parse
from oslo_log import log as logging
from oslo_serialization import jsonutils
import requests
LOG = logging.getLogger(__name__)
class APIResponse(object):
"""Decoded API Response
This provides a decoded version of the Requests response which
include a json decoded body, far mor... | {
"content_hash": "3bfc4cfdd6fff369fc2dd9f6e38b71ca",
"timestamp": "",
"source": "github",
"line_count": 545,
"max_line_length": 79,
"avg_line_length": 38.02201834862385,
"alnum_prop": 0.5848373709101438,
"repo_name": "klmitch/nova",
"id": "21028d56017be05136d323e9602840ac0d302523",
"size": "21342",... |
r"""
QSeq format (:mod:`skbio.io.qseq`)
==================================
.. currentmodule:: skbio.io.qseq
The QSeq format (`qseq`) is a record-based, plain text output format produced
by some DNA sequencers for storing biological sequence data, quality scores,
per-sequence filtering information, and run-specific me... | {
"content_hash": "8dd6f5f0b843bb998597e8cd7fe5be03",
"timestamp": "",
"source": "github",
"line_count": 255,
"max_line_length": 79,
"avg_line_length": 39.34901960784314,
"alnum_prop": 0.5262108829978075,
"repo_name": "Achuth17/scikit-bio",
"id": "8609a528af6237478b6ac6708c8ef0bfd67030e7",
"size": "... |
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import range
from future import standard_library
standard_library.install_aliases()
import sys
PYTHON_VERSION = sys.version_info[:3]
PY2 = (PYTHON_VERSION[0... | {
"content_hash": "ca07be0f406b6265ef491211397e7ea5",
"timestamp": "",
"source": "github",
"line_count": 96,
"max_line_length": 105,
"avg_line_length": 29.15625,
"alnum_prop": 0.5973561986423723,
"repo_name": "andreadean5/python-hpOneView",
"id": "0b293d3441590df9b630f5483af1e4d1b5e6cb2b",
"size": "... |
extensions = [
'reno.sphinxext',
'openstackdocstheme',
]
# openstackdocsthem options
openstackdocs_repo_name = 'openstack/manila-ui'
openstackdocs_auto_name = False
openstackdocs_bug_project = 'manila-ui'
openstackdocs_bug_tag = 'release notes'
# Add any paths that contain templates here, relative to this dir... | {
"content_hash": "a1e08d1457db9b3af27bbe56ccb2b684",
"timestamp": "",
"source": "github",
"line_count": 237,
"max_line_length": 79,
"avg_line_length": 31.143459915611814,
"alnum_prop": 0.6988212979271101,
"repo_name": "openstack/manila-ui",
"id": "ed96703c024bc02cf9e9f605f78a32f99e798307",
"size": ... |
"""Define metadata constants."""
LABEL_COLUMN = 'labelArray'
KEY_COLUMN = 'fullVisitorId'
# columns to omit from model features
NON_FEATURE_COLUMNS = [LABEL_COLUMN, KEY_COLUMN]
NUM_INTERVALS = 4 # number of bounded churn duration intervals
SEED = 123
| {
"content_hash": "2f68f54676a06cdda0ff5a61d67be608",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 63,
"avg_line_length": 25.5,
"alnum_prop": 0.7450980392156863,
"repo_name": "GoogleCloudPlatform/professional-services",
"id": "085a6aba2415fd3765bb263e82edf75b0706f9b2",
"... |
from __future__ import print_function, division, absolute_import
from marvin.web.controllers.galaxy import make_nsa_dict
from marvin.web.controllers.galaxy import getWebMap
from marvin.tools.cube import Cube
from marvin.tests.conftest import set_the_config
import pytest
@pytest.fixture()
def cube(galaxy, mode):
s... | {
"content_hash": "ceb30b847fcb56831ebde52e2b1d916a",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 102,
"avg_line_length": 36.95061728395062,
"alnum_prop": 0.6475108586702305,
"repo_name": "albireox/marvin",
"id": "d4a1ca019eeaabf5beec85b165fccea9059d1e0b",
"size": "3224... |
from ginga.misc import Bunch
__all__ = ['PluginError', 'GlobalPlugin', 'LocalPlugin']
class PluginError(Exception):
"""Plugin related error."""
pass
class BasePlugin(object):
"""Base class for all plugins."""
def __init__(self, fv):
super(BasePlugin, self).__init__()
self.fv = fv
... | {
"content_hash": "3ceeb87fbe5574b5003ca704aed30268",
"timestamp": "",
"source": "github",
"line_count": 129,
"max_line_length": 86,
"avg_line_length": 28.286821705426355,
"alnum_prop": 0.5787887092354069,
"repo_name": "pllim/ginga",
"id": "c90fc41d0cfcac5a75e23334633bf8cb932e55d2",
"size": "3834",
... |
from unipath import Path
from lino.api import dd, rt
from lino_xl.lib.mailbox.models import get_new_mail
def objects():
Mailbox = rt.models.django_mailbox.Mailbox
mp = rt.settings.SITE.cache_dir.child("media", "mailbox")
rt.settings.SITE.makedirs_if_missing(mp)
dd.logger.info("Mailbox path is %s", mp)
... | {
"content_hash": "01214c3394b9cfe0d162de26bace11be",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 73,
"avg_line_length": 33.391304347826086,
"alnum_prop": 0.6393229166666666,
"repo_name": "khchine5/xl",
"id": "d3bd0d489f49913475597808f2c23b6f6ea073f1",
"size": "768",
... |
"""
multicast.py
Created by Thomas Morin on 2014-06-23.
Copyright (c) 2014-2015 Orange. All rights reserved.
"""
from exabgp.protocol.ip import IP
from exabgp.bgp.message.update.nlri.qualifier import RouteDistinguisher
from exabgp.bgp.message.update.nlri.qualifier import EthernetTag
from exabgp.bgp.message.update.nl... | {
"content_hash": "251aa952f702b1bd5e3cacace7d2552e",
"timestamp": "",
"source": "github",
"line_count": 91,
"max_line_length": 86,
"avg_line_length": 26.65934065934066,
"alnum_prop": 0.5412201154163232,
"repo_name": "benagricola/exabgp",
"id": "c180ea920bcdc06d60ccb01a4196c4f48e9aa7d4",
"size": "24... |
"""
.. _opt-conv-tensorcore:
How to optimize convolution using TensorCores
=============================================
**Author**: `Siyuan Feng <https://github.com/Hzfengsy>`_
In this tutorial, we will demonstrate how to write a high performance convolution
schedule using TensorCores in TVM. In this example, we ass... | {
"content_hash": "abac70906d2fd0b421e09c205dca3b50",
"timestamp": "",
"source": "github",
"line_count": 395,
"max_line_length": 107,
"avg_line_length": 35.10632911392405,
"alnum_prop": 0.5901781207182519,
"repo_name": "sxjscience/tvm",
"id": "0cbcf7e0334265083b661841399f67d43bd92277",
"size": "1465... |
from __future__ import absolute_import, unicode_literals
from sphinx_celery import conf
globals().update(conf.build_config(
'kombu', __file__,
project='Kombu',
version_dev='4.4',
version_stable='4.3',
canonical_url='https://kombu.readthedocs.io/',
webdomain='kombu.readthedocs.io',
github_p... | {
"content_hash": "fe0452097eb72cfbe34bb8edb539167c",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 56,
"avg_line_length": 30.7,
"alnum_prop": 0.6471226927252985,
"repo_name": "kawamon/hue",
"id": "3c25ea0c3b90e83a644fae76f01c78a032fbddc1",
"size": "945",
"binary": fals... |
"""Support for Meteo-France weather data."""
from datetime import timedelta
import logging
from meteofrance_api.client import MeteoFranceClient
from meteofrance_api.helpers import is_valid_warning_department
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistan... | {
"content_hash": "be666cd37fb1c02c681a320c1ad778db",
"timestamp": "",
"source": "github",
"line_count": 191,
"max_line_length": 128,
"avg_line_length": 32.54973821989529,
"alnum_prop": 0.653048093935982,
"repo_name": "home-assistant/home-assistant",
"id": "2f47aee9c02fc63c3d0ee2aba27f7032a5b85127",
... |
"""This directory is setup with configurations to run the main functional test.
It exercises a full analysis pipeline on a smaller subset of data.
"""
import os
import subprocess
import unittest
import shutil
import contextlib
import collections
import functools
from nose import SkipTest
from nose.plugins.attrib impo... | {
"content_hash": "4d9b03966642c23c100db035069c3888",
"timestamp": "",
"source": "github",
"line_count": 437,
"max_line_length": 106,
"avg_line_length": 40.224256292906176,
"alnum_prop": 0.5759472067356923,
"repo_name": "lpantano/bcbio-nextgen",
"id": "c5a80654e3b91de92593d340e66c22a9e9a9581f",
"siz... |
"""Deploy the database.
This module contains the logic to deploy the database
to the staging server
"""
import os, subprocess
def deploy_database(settings, dbconn, database=None):
"""Deploy the database
Args:
database: An open connection to the Drupal database.
Deploy the database tables in... | {
"content_hash": "bc1b3af658bae42f0b04439700bc3e93",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 71,
"avg_line_length": 27.166666666666668,
"alnum_prop": 0.5531697341513292,
"repo_name": "anthonylv/pyD2W",
"id": "ac371bc5394027f96c33f0d030d23396f8d54053",
"size": "1020... |
import os
import socket
import struct
try:
import mmap
except ImportError:
mmap = None
__all__ = ['IPv4Database', 'find']
_unpack_V = lambda b: struct.unpack("<L", b)[0]
_unpack_N = lambda b: struct.unpack(">L", b)[0]
def _unpack_C(b):
if isinstance(b, int):
return b
return struct.unpack("B"... | {
"content_hash": "da4ebbdc312e7813c9fb85fbce2fa698",
"timestamp": "",
"source": "github",
"line_count": 121,
"max_line_length": 71,
"avg_line_length": 24.892561983471076,
"alnum_prop": 0.48871181938911024,
"repo_name": "phyng/phyip",
"id": "61652d6bfb98b6f33008a983602f6b5429a01c22",
"size": "3108",... |
from pyflink.common import *
from pyflink.dataset import *
from pyflink.datastream import *
from pyflink.table import *
from pyflink.table.catalog import *
from pyflink.table.descriptors import *
from pyflink.table.window import *
import pyflink
from py4j.java_gateway import java_import
intp = gateway.entry_point
p... | {
"content_hash": "ef423a60798ab14c02a18a58cd217b67",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 80,
"avg_line_length": 31.5,
"alnum_prop": 0.7793650793650794,
"repo_name": "zetaris/zeppelin",
"id": "86e1a50d7a6b41e87c9cc1597ba7f13bd6048812",
"size": "2045",
"binary"... |
"""Gradient tape utilites."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import threading
from autograd import container_types
from autograd import core as ag_core
from tensorflow.python.framework import dtypes
from tensorflow.python.util import nest... | {
"content_hash": "35a97aecc3db73d3e53c3ce53bf24b34",
"timestamp": "",
"source": "github",
"line_count": 226,
"max_line_length": 76,
"avg_line_length": 26.18141592920354,
"alnum_prop": 0.6880175764745649,
"repo_name": "xuleiboy1234/autoTitle",
"id": "1cab4346b0c7b6bfdb9c456bd915a71c517a483d",
"size"... |
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('UserManagement', '0026_auto_20170315_1915'),
]
operations = [
migrations.RemoveField(
model_name='studentprofile',
name='team',
... | {
"content_hash": "81635e9e4a6f28a2c1a3994317683d79",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 54,
"avg_line_length": 19.58823529411765,
"alnum_prop": 0.6006006006006006,
"repo_name": "SkillSmart/ConferenceManagementSystem",
"id": "9223fa2e5fa5cd1dcead2fc01a460fbbfd3c5... |
"""SCons.Tool.sgicc
Tool-specific initialization for MIPSPro cc on SGI.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, fr... | {
"content_hash": "ccd0f62300e9122310bba2594628f57a",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 76,
"avg_line_length": 34.320754716981135,
"alnum_prop": 0.742715777899945,
"repo_name": "engineer0x47/SCONS",
"id": "f50d06f9fda0d1b136e33ac04e08e7e143403ead",
"size": "18... |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("djasana", "0022_alter_attachment_url_length"),
]
operations = [
migrations.AlterField(
model_name="attachment",
name="download_url",
field=models.URLFiel... | {
"content_hash": "74d670bd4c4e425786bffd2317390ae2",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 56,
"avg_line_length": 22.3125,
"alnum_prop": 0.5882352941176471,
"repo_name": "sbywater/django-asana",
"id": "27889e6650d0add3654137941d58788b15f94fee",
"size": "407",
"... |
"""
.. _plot_source_alignment:
Source alignment and coordinate frames
======================================
This tutorial shows how to visually assess the spatial alignment of MEG sensor
locations, digitized scalp landmark and sensor locations, and MRI volumes. This
alignment process is crucial for computing the for... | {
"content_hash": "2f1b10e02a535ed6461b1bc23a0b460f",
"timestamp": "",
"source": "github",
"line_count": 359,
"max_line_length": 154,
"avg_line_length": 47.729805013927574,
"alnum_prop": 0.6583017216224103,
"repo_name": "mne-tools/mne-tools.github.io",
"id": "9739eb83d6e67696d36d504f5484f927be6f4bcb",... |
from celery import task
from openpds.core.models import IPReferral, Profile, Emoji, Notification, Device, QuestionInstance, QuestionType
from bson import ObjectId
from pymongo import Connection
from django.conf import settings
import time
from datetime import date, timedelta, datetime
import json
import pdb
from gcm im... | {
"content_hash": "f5b1f7c9bfa97f5b726c3da04626bdce",
"timestamp": "",
"source": "github",
"line_count": 517,
"max_line_length": 261,
"avg_line_length": 41.97872340425532,
"alnum_prop": 0.6307422936921163,
"repo_name": "eschloss/FluFuture",
"id": "868f35603f3d40631d3ddf342e4f90ca9213669e",
"size": "... |
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
... | {
"content_hash": "cb11f09d7fa5b6c998b9e24ef11386de",
"timestamp": "",
"source": "github",
"line_count": 677,
"max_line_length": 203,
"avg_line_length": 44.65435745937962,
"alnum_prop": 0.6373259237206841,
"repo_name": "Azure/azure-sdk-for-python",
"id": "cc071bfa7710fea2ca5b691beb29c646d9920031",
"... |
"""
Simple echo server, using nonblocking I/O
"""
from OpenSSL import SSL
import sys, os, select, socket
def verify_cb(conn, cert, errnum, depth, ok):
# This obviously has to be updated
print 'Got certificate: %s' % cert.get_subject()
return ok
if len(sys.argv) < 2:
print 'Usage: python[2] server.py... | {
"content_hash": "d32702bdcb234200ac6bbad20edbbfdf",
"timestamp": "",
"source": "github",
"line_count": 94,
"max_line_length": 97,
"avg_line_length": 27.361702127659573,
"alnum_prop": 0.5824261275272161,
"repo_name": "EnerNOC/pyopenssl",
"id": "d508c4c1c92d7c5d989a99f8b182d4073fdebeed",
"size": "26... |
import concurrent.futures
import ssl
import pytest
import socket
import logging
from six.moves import queue
from gremlin_python.driver.client import Client
from gremlin_python.driver.connection import Connection
from gremlin_python.driver import serializer
from gremlin_python.driver.driver_remote_connection import (
... | {
"content_hash": "720de80d67c4a50ce7768c7cee2b98a9",
"timestamp": "",
"source": "github",
"line_count": 190,
"max_line_length": 119,
"avg_line_length": 37.27368421052632,
"alnum_prop": 0.6304716181869529,
"repo_name": "apache/incubator-tinkerpop",
"id": "fc3ef8bd9bf8a027d6d06a0d0132ed2e66c15852",
"... |
from .geom import geom
import matplotlib.patches as patches
class geom_polygon(geom):
"""
Polygon specified by (x, y) coordinates
Parameters
----------
x:
x values for (x, y) coordinates
y:
y values for (x, y) coordinates
color:
color of outer line
alpha:
... | {
"content_hash": "eafdf5af72e5ba70f3505d44cdb91e9d",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 79,
"avg_line_length": 26.88679245283019,
"alnum_prop": 0.5164912280701754,
"repo_name": "yhat/ggplot",
"id": "8158b1fe16ea80139e54170871806729caa37f59",
"size": "1425",
... |
"""
werkzeug.debug.repr
~~~~~~~~~~~~~~~~~~~
This module implements object representations for debugging purposes.
Unlike the default repr these reprs expose a lot more information and
produce HTML instead of ASCII.
Together with the CSS and JavaScript files of the debugger this gives
a col... | {
"content_hash": "585d8857ec9011b3ce68cf29d302251d",
"timestamp": "",
"source": "github",
"line_count": 296,
"max_line_length": 88,
"avg_line_length": 32.4222972972973,
"alnum_prop": 0.5338126497863915,
"repo_name": "turbomanage/training-data-analyst",
"id": "d7a7285ca95dfbc64d765d1a949580d07f2f7a44"... |
from __future__ import absolute_import
from __future__ import print_function
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.optimi... | {
"content_hash": "ae6cb5f8192045bfae02e521bdc1b88f",
"timestamp": "",
"source": "github",
"line_count": 233,
"max_line_length": 200,
"avg_line_length": 38.02145922746781,
"alnum_prop": 0.6561688678180382,
"repo_name": "AKAMobi/goods-counter",
"id": "e3bcd83d7a8c5ae98a9d9a38fda55ba1ab2d9784",
"size"... |
import threading
from helpers import CountingHandler
import osmium as o
def test_threaded_processing():
""" Process a file in a different thread and make sure that processing
completes.
"""
function_complete = threading.Event()
c = CountingHandler()
def import_data():
c.apply_buff... | {
"content_hash": "8bb89b9e6664a7117352464e7fd565c4",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 74,
"avg_line_length": 26.045454545454547,
"alnum_prop": 0.6579406631762653,
"repo_name": "osmcode/pyosmium",
"id": "6517d5ebca6e7388e4d363c01699943231a19ce1",
"size": "678... |
import logging
import chryso.errors
import flask
import flask_login
import dominus.platform
LOGGER = logging.getLogger(__name__)
blueprint = flask.Blueprint('auth', __name__)
@blueprint.route('/login/', methods=['GET'])
def get_login():
return flask.render_template('login.html')
@blueprint.route('/login/', me... | {
"content_hash": "7093c74056c45e12146eeb1bd5fe3f1a",
"timestamp": "",
"source": "github",
"line_count": 73,
"max_line_length": 81,
"avg_line_length": 30.972602739726028,
"alnum_prop": 0.6727111897390535,
"repo_name": "EliRibble/dominus",
"id": "0cf337110c986de4980c7f06c7eedd298fe61539",
"size": "22... |
'''
Problem 5
@author: Kevin Ji
'''
def get_factor_repetitions( number ):
# Data of form
# factor => repetitions
factor_repetitions = {}
# Start with 2
cur_factor = 2
while number % cur_factor == 0:
factor_repetitions[ cur_factor ] = factor_repetitions.get( cur_factor, 0 ) +... | {
"content_hash": "479a151fa4c36faf40dc6734fd677a3e",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 90,
"avg_line_length": 26.29824561403509,
"alnum_prop": 0.5770513675783856,
"repo_name": "mc10/project-euler",
"id": "3a4ee6b8d9a76e3d4c63ca77d079e462a4f1b83c",
"size": "15... |
from flask import Flask, render_template,session
app = Flask(__name__)
app.secret_key= "ThisIsSecret"
@app.route('/')
def myfirstfunction():
if not 'title' in session:
session['title'] = 'hello world'
return render_template('index.html', name="Mike")
if __name__ == '__main__':
app.run(debug = True)
| {
"content_hash": "6e73b1d9b01303d4a32b1d1abb5e62e3",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 53,
"avg_line_length": 26.666666666666668,
"alnum_prop": 0.64375,
"repo_name": "dallaspythondojo/python",
"id": "53d71da9031190736f76915e72654522527965d3",
"size": "320",
... |
"""
This module stores session-level commands.
"""
from evennia.commands.cmdset import CmdSet
from evennia.commands.default import account
class SessionCmdSet(CmdSet):
"""
Sets up the unlogged cmdset.
"""
key = "DefaultSession"
priority = -20
def at_cmdset_creation(self):
"Populate t... | {
"content_hash": "ffefb76e5baf01dd94e1e7fb2cb4e8ba",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 44,
"avg_line_length": 20.61111111111111,
"alnum_prop": 0.6765498652291105,
"repo_name": "jamesbeebop/evennia",
"id": "f81e8b9636ba38a51ef104164b7a3794cdecfd11",
"size": "3... |
"""'logging sinks delete' command."""
from apitools.base.py import exceptions as apitools_exceptions
from googlecloudsdk.api_lib.logging import util
from googlecloudsdk.api_lib.util import exceptions
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import exceptions as calliope_exceptions
from go... | {
"content_hash": "59d533eea54a91a8f3e11a52f878f50a",
"timestamp": "",
"source": "github",
"line_count": 100,
"max_line_length": 80,
"avg_line_length": 37.39,
"alnum_prop": 0.6793260230008024,
"repo_name": "KaranToor/MA450",
"id": "80e8d727b2155d696422d04fa048c9a4af49a586",
"size": "4335",
"binary... |
"""
Installation of Windows Updates using the Windows Update Agent
.. versionadded:: 2017.7.0
Salt can manage Windows updates via the "wua" state module. Updates can be
installed and removed. Update management declarations are as follows:
For installation:
.. code-block:: yaml
# Install a single update using t... | {
"content_hash": "82a5dfd9316fabecbc2a680d24370ec4",
"timestamp": "",
"source": "github",
"line_count": 564,
"max_line_length": 122,
"avg_line_length": 29.54609929078014,
"alnum_prop": 0.5927148343734998,
"repo_name": "saltstack/salt",
"id": "0c00d5808963354f8f7bff2b3ea57242400f6d59",
"size": "1666... |
from boole.core.goals import *
from nose.tools import *
def test_create():
| {
"content_hash": "affb486e656eb1bc554df058278c20dd",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 30,
"avg_line_length": 13.666666666666666,
"alnum_prop": 0.6829268292682927,
"repo_name": "avigad/boole",
"id": "cd4ae48d4fe7211505a195faa32e345eb17aba77",
"size": "230",
... |
import re
from streamlink.plugin import Plugin
from streamlink.plugins.brightcove import BrightcovePlayer
from streamlink.stream import RTMPStream
class AlJazeeraEnglish(Plugin):
url_re = re.compile(r"https?://(?:\w+\.)?aljazeera\.com")
account_id = 665003303001
render_re = re.compile(r'''RenderPagesVide... | {
"content_hash": "37bdceaebbb4d285eb828ac50c428cbb",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 89,
"avg_line_length": 34.48717948717949,
"alnum_prop": 0.6289962825278811,
"repo_name": "back-to/streamlink",
"id": "9d8431f683cddb2382449a1bf7cae786988f27ca",
"size": "13... |
import urllib.request
import re
from bs4 import BeautifulSoup
url = 'http://bj.fangjia.com/ershoufang/'
response = urllib.request.urlopen(url)
html_doc = response.read()
soup = BeautifulSoup(html_doc, "html.parser")
house_list = soup.select('.xq_list')[0].find_all('li')
house_img = ''
house_name = ''
house_address = '... | {
"content_hash": "3822b380fc98e4b7ba4518579188869c",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 91,
"avg_line_length": 38.32432432432432,
"alnum_prop": 0.5895627644569816,
"repo_name": "cxyxc/webgis-house",
"id": "11c0d70c7e795b562c1cefe24b7b583ee89ea818",
"size": "14... |
""":mod:`rawkit.options` --- High level options for processing raw files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import ctypes
from collections import namedtuple
class option(object):
"""
The :class:`option` decorator is an internal decorator which allows you to
def... | {
"content_hash": "65be5dadc0b1a08fa54c905fb5c71fdf",
"timestamp": "",
"source": "github",
"line_count": 794,
"max_line_length": 79,
"avg_line_length": 31.234256926952142,
"alnum_prop": 0.5710887096774193,
"repo_name": "photoshell/rawkit",
"id": "678ad96432c533206e0aa89248c4100f218b9033",
"size": "2... |
import os
import sys
from threading import Thread
from pyelectro import analysis
import numpy
import math
import pprint
pp = pprint.PrettyPrinter(indent=4)
def alpha_normalised_cost_function(value, target, base=10):
"""Fitness of a value-target pair from 0 to 1
.. WARNING:
I've found that this cost... | {
"content_hash": "5360ade3f8be67903f9459747cbeb3e9",
"timestamp": "",
"source": "github",
"line_count": 878,
"max_line_length": 242,
"avg_line_length": 34.29726651480638,
"alnum_prop": 0.5579317902566998,
"repo_name": "NeuralEnsemble/neurotune",
"id": "2f8a01d699b25fc6740fe19cdcd7eb60af9d26ff",
"si... |
import os
from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy import get_include
from scipy._build_utils import numpy_nodepr_api
def configuration(parent_package='', top_path=None):
config = Configuration('ndimage', parent_package, top_path)
include_dirs = ... | {
"content_hash": "ad7921d5df21d51cd5d62e818f77bd3e",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 81,
"avg_line_length": 32.01754385964912,
"alnum_prop": 0.5210958904109589,
"repo_name": "person142/scipy",
"id": "d59462951e163b6f6bf18fbbc65b804561e9632e",
"size": "1825"... |
__author__ = 'Tara Crittenden'
# Displays the state of the game in a simple text format.
import Observer
from Message import *
class Display(Observer.Observer):
#Determine which method to display
def notify(self, msg):
if msg.msgtype == 1:
#start of a tournament
self.display... | {
"content_hash": "b17daa61a6021472938964e2311577f2",
"timestamp": "",
"source": "github",
"line_count": 164,
"max_line_length": 85,
"avg_line_length": 27.51219512195122,
"alnum_prop": 0.5152925531914894,
"repo_name": "PaulieC/RPSPlayer",
"id": "e35db8f9e3bd499f88bc4b5d8af2081ef0fb6613",
"size": "45... |
"""
wandb integration tensorboard module.
"""
from .log import _log, log, reset_state, tf_summary_to_dict # noqa: F401
from .monkeypatch import patch, unpatch
__all__ = [
"patch",
"unpatch",
"log",
]
| {
"content_hash": "cf8248438d1905e257e4b85d334bf497",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 73,
"avg_line_length": 17.916666666666668,
"alnum_prop": 0.6325581395348837,
"repo_name": "wandb/client",
"id": "265a6e3bb55543f6170fcdad236367a3b3b2002f",
"size": "215",
... |
import functools
import logging
from django import forms
from django.conf import settings
from django.utils.translation import ugettext as _
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
f... | {
"content_hash": "5c35cb1e3855a70213f511e852865391",
"timestamp": "",
"source": "github",
"line_count": 243,
"max_line_length": 78,
"avg_line_length": 39.732510288065846,
"alnum_prop": 0.5813568099430347,
"repo_name": "mstriemer/addons-server",
"id": "3299829133a36ec61af515fa2ba90b72f3e155fb",
"siz... |
import sys, random
from PyQt5.QtWidgets import QWidget, QApplication
from PyQt5.QtGui import QPainter, QColor, QPen
from PyQt5.QtCore import Qt
class Example (QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.setGeometry(300, 300, 280, 170)
s... | {
"content_hash": "bf7173c047ef8bc1bd2abc57671fca39",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 51,
"avg_line_length": 26.375,
"alnum_prop": 0.5675355450236966,
"repo_name": "potato16/pythonl",
"id": "c29506f372bb111830c70d1cea7eac523c891987",
"size": "844",
"binary... |
class BaseKVMComponent:
def __init__(self, controller):
self.controller = controller
@property
def is_created(self):
return True
@property
def is_started(self):
return True
def create(self):
return NotImplementedError()
def start(self):
return Not... | {
"content_hash": "d39ae47af0483b29c05fe5c6da0cb6d0",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 43,
"avg_line_length": 20.228571428571428,
"alnum_prop": 0.6271186440677966,
"repo_name": "Jumpscale/jumpscale_core8",
"id": "00b060ca90f6f51568bc7fdce50bb80cd4c8cce1",
"si... |
from __future__ import division, print_function, absolute_import
import functools
import operator
import numpy as np
from scipy.linalg import (get_lapack_funcs, LinAlgError,
cholesky_banded, cho_solve_banded)
from . import _bspl
from . import _fitpack_impl
from . import _fitpack as _dierckx
... | {
"content_hash": "e77b0c5ece7574d6ef549d883fc39983",
"timestamp": "",
"source": "github",
"line_count": 892,
"max_line_length": 90,
"avg_line_length": 33.06502242152467,
"alnum_prop": 0.5445853393910626,
"repo_name": "apbard/scipy",
"id": "f3690474428272157ccdc3b72c7443a4b2082cc9",
"size": "29494",... |
from temboo.core.choreography import Choreography
from temboo.core.choreography import InputSet
from temboo.core.choreography import ResultSet
from temboo.core.choreography import ChoreographyExecution
import json
class FindPlacesByName(Choreography):
def __init__(self, temboo_session):
"""
Creat... | {
"content_hash": "ea46b5bdf118337101b388c2db487c71",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 150,
"avg_line_length": 39.878787878787875,
"alnum_prop": 0.7006079027355623,
"repo_name": "lupyuen/RaspberryPiImage",
"id": "4a8cda081561937908babf4ce0842faa56f52e9a",
"si... |
import pyspark
spark = (
pyspark.sql.SparkSession.builder.appName("FromDatabase")
.config("spark.driver.extraClassPath", "<driver_location>/postgresql-42.2.18.jar")
.getOrCreate()
)
# Read table from db using Spark JDBC
def extract_movies_to_df():
movies_df = (
spark.read.format("jdbc")
... | {
"content_hash": "0e72ca62fc5580f253e8aabd2b988950",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 86,
"avg_line_length": 28.515151515151516,
"alnum_prop": 0.6179596174282678,
"repo_name": "searchs/bigdatabox",
"id": "b23df1b773c5176b3d7340bf15cd6bdf4f368660",
"size": "1... |
import sys, 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('../..'))
# -- General configu... | {
"content_hash": "d36375a3be6bf83a6c21fc5374fdda73",
"timestamp": "",
"source": "github",
"line_count": 181,
"max_line_length": 121,
"avg_line_length": 32.93370165745856,
"alnum_prop": 0.7087736956886428,
"repo_name": "easies/xmpp2",
"id": "e5a81c91ff3a5c1cbcc26f2d5fb90150c0167abd",
"size": "6377",... |
from traitsui.wx.file_editor import *
| {
"content_hash": "ab121e20c8bbfc07a56a240df82f534b",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 37,
"avg_line_length": 38,
"alnum_prop": 0.7894736842105263,
"repo_name": "enthought/etsproxy",
"id": "eaf2ee268fbb86043b7b26293e4e2c1c6fead116",
"size": "53",
"binary": f... |
import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Anscombe'] , ['ConstantTrend'] , ['Seasonal_MonthOfYear'] , ['LSTM'] ); | {
"content_hash": "a31be3545d1057bcf243dba0cdb34875",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 94,
"avg_line_length": 41.75,
"alnum_prop": 0.7245508982035929,
"repo_name": "antoinecarme/pyaf",
"id": "105405fac004860a80ccdea01b3a036c96305714",
"size": "167",
"binary"... |
from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer
from hazelcast.protocol.builtin import StringCodec
from hazelcast.protocol.builtin import DataCodec
# hex: 0x013E00
_REQUEST_MESSAGE_TYPE = 81408
# hex: 0x013E01
_RESPONSE_MESSAGE_TYPE = 81409
_REQUEST_INITIAL_FR... | {
"content_hash": "2b2ea74099d971ef59ebdc18abda4df4",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 105,
"avg_line_length": 34.705882352941174,
"alnum_prop": 0.7864406779661017,
"repo_name": "hazelcast/hazelcast-python-client",
"id": "2df01d2b074ccefe7ee8b89da40526ad11f8f7b... |
"""
Volume manager manages creating, attaching, detaching, and persistent storage.
Persistent storage volumes keep their state independent of instances. You can
attach to an instance, terminate the instance, spawn a new instance (even
one from a different image) and re-attach the volume with the same data
intact.
**... | {
"content_hash": "953429799b719d4cfc9addfef8ba2f33",
"timestamp": "",
"source": "github",
"line_count": 4182,
"max_line_length": 79,
"avg_line_length": 44.43519846963176,
"alnum_prop": 0.5185009794003057,
"repo_name": "Hybrid-Cloud/cinder",
"id": "ef6f560945f801b13ba207a3cc7e00f9c1c82751",
"size": ... |
'''
As of Dec 2014 this sucessfully scrapes
http://www.olympic.it/english/game/id_W2014
for the winter olympics results for all years.
The website might get changed.
This can all be tested in a Scrapy shell, that's how
I first built it.
Created on 23 Oct 2014
@author: chris
'''
import scrapy
from country_medals_c... | {
"content_hash": "befa843990943743d2a81511ef40c3eb",
"timestamp": "",
"source": "github",
"line_count": 127,
"max_line_length": 197,
"avg_line_length": 32.14173228346457,
"alnum_prop": 0.5269475747182754,
"repo_name": "chrisjdavie/Olympics_redo",
"id": "9bd1ff0fd886ce3e25da603e06e6857627901aa9",
"s... |
"""Development settings and globals."""
from __future__ import absolute_import
from os.path import join, normpath
from .base import *
########## DEBUG CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-deb... | {
"content_hash": "211e44c000f36211a1113d9d53fd8fec",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 105,
"avg_line_length": 27.01818181818182,
"alnum_prop": 0.6938088829071333,
"repo_name": "DeppSRL/odl_datasets_survey",
"id": "d1e583024ee676a4a633c316ae0f6135732f86b1",
"... |
from pipeline.util import config
from pipeline.lab import Experiment
from pipeline.lab.util import group_by
ex = Experiment(config['logger'])
ex.get(_id=['5744d47f6fdf1e2f69f0716a'])
ex.get(key='im super cool')
ex.records
model = ex.records[0]
model['key'] = 'new value2'
new_model = ex.record()
new_model['key'] = 'i... | {
"content_hash": "296db6f3610a0d1b9d35a705cc9cb789",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 40,
"avg_line_length": 20.88888888888889,
"alnum_prop": 0.7207446808510638,
"repo_name": "edublancas/pipeline",
"id": "3f83c35d9b049ff39bf0df21cf6afcacd112586f",
"size": "3... |
from os import environ
bind = 'unix:/tmp/nginx.socket'
workers = int(environ.get('WORKERS', '4'))
def post_fork(server, worker):
with open('/tmp/app-initialized', 'w'):
pass
| {
"content_hash": "745b4d828a911eaccee54ed9c0adc509",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 43,
"avg_line_length": 21,
"alnum_prop": 0.6455026455026455,
"repo_name": "appropriatetech/icat-symposion",
"id": "4b44b2719242c8bd1b39503fd80d2e6b7a5ecae4",
"size": "189",
... |
'''
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | {
"content_hash": "e724b31a2bb6190276998e36ca30f9ce",
"timestamp": "",
"source": "github",
"line_count": 87,
"max_line_length": 97,
"avg_line_length": 38.89655172413793,
"alnum_prop": 0.6793735224586288,
"repo_name": "martin-neuhaeusser/benchexec",
"id": "480bb427738c7431ab680e04afa59a08871e83c3",
"... |
from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from future.moves.urllib.parse import urlencode
import logging
import re
from flexget import plugin
from flexget.event import event
from flexget.plugin import PluginError
... | {
"content_hash": "d5c904014f191049dee83e46c39f7f0b",
"timestamp": "",
"source": "github",
"line_count": 91,
"max_line_length": 118,
"avg_line_length": 35.16483516483517,
"alnum_prop": 0.6271875,
"repo_name": "jawilson/Flexget",
"id": "04deda49bfe2f1c286d1125398488640b7d4ff41",
"size": "3200",
"bi... |
META_FILENAME = '{}_metadata.json'
MEASUREMENT_FILENAME = '{}_measurement_{}.png'
ALIGNMENT_FILENAME = '{}_alignment_guide.png'
LUT_JSON_FILENAME = '{}.json'
LUT_CUBE_FILENAME = '{}.cube'
LUT_PNG_FILENAME = '{}.png'
| {
"content_hash": "e3ad6769c5ab31ce85c1522db820806d",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 46,
"avg_line_length": 36,
"alnum_prop": 0.6759259259259259,
"repo_name": "faymontage/lut-maker",
"id": "73b0042e8f6acfc3650b946a02b9976095056a68",
"size": "216",
"binary"... |
import os
import time
from datetime import date, datetime, timedelta
from django.conf import settings
from django.core.files.storage import default_storage as storage
from django.core.management import call_command
import mock
from nose.tools import eq_
import amo
import amo.tests
import mkt
from mkt.api.models impo... | {
"content_hash": "6af06994c3dc00abd571a3ff53c5a839",
"timestamp": "",
"source": "github",
"line_count": 368,
"max_line_length": 78,
"avg_line_length": 34.80163043478261,
"alnum_prop": 0.5878816272351058,
"repo_name": "andymckay/zamboni",
"id": "6223f8a5b5bad078b9b6272ed063ca1ded3bf0f8",
"size": "12... |
""" Implementation of webservices API 0.9 """
import tornado.httpserver
import tornado.ioloop
import tornado.web
class WebService(tornado.web.Application):
""" A implementation of web services for tornado web server.
import tornado.httpserver
import tornado.ioloop
from tornadows import webservices
from torn... | {
"content_hash": "3c5139ad23e3b4b62a8e8c23227d05cb",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 86,
"avg_line_length": 31.818181818181817,
"alnum_prop": 0.6914285714285714,
"repo_name": "leonevo/euao",
"id": "594fbc09c70d695202472728d7902a4237fcfd01",
"size": "2359",
... |
RECORD_TYPES = ['A', 'AAAA', 'TXT', 'CNAME', 'MX', 'PTR', 'SRV', 'SPF']
from boto.resultset import ResultSet
class ResourceRecordSets(ResultSet):
"""
A list of resource records.
:ivar hosted_zone_id: The ID of the hosted zone.
:ivar comment: A comment that will be stored with the change.
:ivar cha... | {
"content_hash": "516d11df7657ee66f61eaffc7d1101ae",
"timestamp": "",
"source": "github",
"line_count": 346,
"max_line_length": 133,
"avg_line_length": 37.627167630057805,
"alnum_prop": 0.5833013288270988,
"repo_name": "ychen820/microblog",
"id": "664739b8552c00fed1a27849401e59f44a689875",
"size": ... |
import os
import io
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
from scipy.io import savemat, loadmat
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
MATLAB_FILENAME = "pipeline_out.mat"
def load_MAT(var_name):
loaded = loadmat(file_name=MATLAB_FILENAME, vari... | {
"content_hash": "9c6cbca044a22fc9f532ade5b07bcfcb",
"timestamp": "",
"source": "github",
"line_count": 302,
"max_line_length": 109,
"avg_line_length": 35.56953642384106,
"alnum_prop": 0.5989573636194377,
"repo_name": "abyrne55/osvr-review",
"id": "1e85037f6a7a46d76b8eb1ae74e5f3f51f06d1b0",
"size":... |
'''
Covenant Add-on
Copyright (C) 2017 homik
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This ... | {
"content_hash": "8bd3aa227860457d829460d9b9822383",
"timestamp": "",
"source": "github",
"line_count": 111,
"max_line_length": 147,
"avg_line_length": 38.909909909909906,
"alnum_prop": 0.5489696689048391,
"repo_name": "TheWardoctor/Wardoctors-repo",
"id": "62b69af0bfebcd91c73df67a319706d921295661",
... |
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/intangible/pet/shared_r2.iff"
result.attribute_template_id = -1
result.stfName("","")
#### BEGIN MODIFICATIONS ####
#### END MODIFICATIONS ####
return result | {
"content_hash": "15f19906463adc0920ef7ffba92c4f65",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 56,
"avg_line_length": 20.76923076923077,
"alnum_prop": 0.6703703703703704,
"repo_name": "anhstudios/swganh",
"id": "6312809966b2124ae71b3a3bf13901d1bc8e279f",
"size": "415... |
import gym
from gym import spaces
import numpy as np
# from os import path
import snakeoil_gym as snakeoil
import numpy as np
import copy
import collections as col
import os
import time
class TorcsEnv:
terminal_judge_start = 100 # If after 100 timestep still no progress, terminated
termination_limit_progress... | {
"content_hash": "c51e7ca99555b9ca9683f4413db1e298",
"timestamp": "",
"source": "github",
"line_count": 253,
"max_line_length": 105,
"avg_line_length": 38.07905138339921,
"alnum_prop": 0.506746937928171,
"repo_name": "YunzhuLi/InfoGAIL",
"id": "b0641ccb6a0883465a8e8535206f719d0d618b46",
"size": "96... |
from __future__ import print_function, absolute_import, unicode_literals
__all__ = ["corner", "hist2d"]
__version__ = "0.2.0"
__author__ = "Dan Foreman-Mackey (danfm@nyu.edu)"
__copyright__ = "Copyright 2013 Daniel Foreman-Mackey"
__contributors__ = [
# Alphabetical by first name.
"Adrian Price-Whelan @adrn",
... | {
"content_hash": "745b79c35fbe0942b2d091b081e371a3",
"timestamp": "",
"source": "github",
"line_count": 505,
"max_line_length": 79,
"avg_line_length": 36.21980198019802,
"alnum_prop": 0.549559892843475,
"repo_name": "PBGraff/SwiftGRB_PEanalysis",
"id": "02ed13d4f537e719ae07cfc173a95a5b16be13e3",
"s... |
import logging
import uuid
import ldap
import six
# Django
from django.dispatch import receiver
from django.contrib.auth.models import User
from django.conf import settings as django_settings
from django.core.signals import setting_changed
# django-auth-ldap
from django_auth_ldap.backend import LDAPSettings as BaseL... | {
"content_hash": "615bc113ce96ae9a00016335de095a91",
"timestamp": "",
"source": "github",
"line_count": 400,
"max_line_length": 121,
"avg_line_length": 38.6,
"alnum_prop": 0.6397668393782383,
"repo_name": "wwitzel3/awx",
"id": "7b4bcfbafc903f398fe749127fe2a5c006ecfed2",
"size": "15508",
"binary":... |
# the fact that the old ID was still used in the Terms od, on reloading we now fail
# __setter__ validation on value for non generated values needs to happen
# deal with how to initiailize a header (ie remove the of dependence?) maybe deferred relationshiph resolution could solve this?
# pass tvpairstores to tvpair... | {
"content_hash": "ed85e585f4abe9ba83d75066a64418e0",
"timestamp": "",
"source": "github",
"line_count": 1077,
"max_line_length": 156,
"avg_line_length": 32.54131847725162,
"alnum_prop": 0.5150226838245784,
"repo_name": "tgbugs/methodsOntology",
"id": "d4c92a3c66af9bbd38a2e8a561e0561f28ec4b36",
"siz... |
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('granted', '0005_resource'),
]
operations = [
migrations.CreateModel(
name='UserResourceAccessRoleMappin... | {
"content_hash": "46c4001408c2bf2b32c734bf786c656b",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 121,
"avg_line_length": 41.11764705882353,
"alnum_prop": 0.600143061516452,
"repo_name": "mahithmukundan/Granted",
"id": "48700419b7a90b76614ed259b5abea3d2954a581",
"size":... |
import pytz
import pytest
from datetime import timedelta, datetime
from distutils.version import LooseVersion
from numpy import nan
import numpy as np
import pandas as pd
from pandas import (Series, DataFrame, isna, date_range,
MultiIndex, Index, Timestamp, NaT, IntervalIndex,
... | {
"content_hash": "da08f04c8e86fa7c94b8d016428fec79",
"timestamp": "",
"source": "github",
"line_count": 1324,
"max_line_length": 79,
"avg_line_length": 39.222809667673715,
"alnum_prop": 0.5369817642641197,
"repo_name": "cython-testbed/pandas",
"id": "dcc4845f274ba8465a5ecc52a04b947016518d76",
"size... |
"""Quotas for DB instances and resources."""
from trove.openstack.common import log as logging
from trove.openstack.common.gettextutils import _
from oslo.config import cfg
from trove.common import exception
from trove.openstack.common import importutils
from trove.quota.models import Quota
from trove.quota.models imp... | {
"content_hash": "293a6e322bb5c4a373307c9365cf6e9d",
"timestamp": "",
"source": "github",
"line_count": 317,
"max_line_length": 79,
"avg_line_length": 35.53312302839117,
"alnum_prop": 0.5886008522727273,
"repo_name": "citrix-openstack-build/trove",
"id": "27c995aebf443236a1997d9c8c73de284a0de5a6",
... |
from untwisted.server import create_server
from untwisted.event import ACCEPT, LOAD
from untwisted import core
class EchoServer:
def __init__(self, server):
server.add_map(ACCEPT, lambda server, con:
con.add_map(LOAD, lambda con, data: con.dump(data)))
if __name__ == '__main__':
... | {
"content_hash": "5d46b16700e85a2b2f22512bde2b8536",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 73,
"avg_line_length": 24.6875,
"alnum_prop": 0.640506329113924,
"repo_name": "iogf/untwisted",
"id": "cd5f398d1a338ade63ef002dd3706525f745dd48",
"size": "395",
"binary":... |
from __future__ import print_function, absolute_import, division
import screed
import docopt
CLI = """
USAGE:
fasplit <fasta> <prefix>
"""
opts = docopt.docopt(CLI)
prefix = opts['<prefix>']
with screed.open(opts['<fasta>']) as fh:
for record in fh:
fname = "{}{}.fasta".format(prefix, record.name)
... | {
"content_hash": "7f5fb89018ba89f0199d39b782b468ed",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 64,
"avg_line_length": 24,
"alnum_prop": 0.6096491228070176,
"repo_name": "kdmurray91/kwip-experiments",
"id": "19c7f91e6b67eef97aa131619fe3df8c5bce5937",
"size": "478",
... |
"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.emr`."""
import warnings
from airflow.providers.amazon.aws.sensors.emr import EmrJobFlowSensor, EmrStepSensor # noqa
warnings.warn(
"This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.emr`.",
Depreca... | {
"content_hash": "0e8f5591d2389b87b016e6e85b66d33f",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 92,
"avg_line_length": 32.09090909090909,
"alnum_prop": 0.7592067988668555,
"repo_name": "bolkedebruin/airflow",
"id": "aca71619089e7436487a0897489bb81d2d82495b",
"size": "... |
"""
Cross Site Flashing semi passive plugin: Tries to retrieve the crossdomain.xml
file and display it for review
"""
from framework.dependency_management.dependency_resolver import ServiceLocator
DESCRIPTION = "Normal requests for XSF analysis"
def run(PluginInfo):
url_list = []
for File in ["crossdomain.... | {
"content_hash": "8846f1bb8cda8f67d4f9c3a5479b8e81",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 106,
"avg_line_length": 45.52173913043478,
"alnum_prop": 0.7373447946513849,
"repo_name": "DarKnight--/owtf",
"id": "6b9c1cfed2db6c8f499577ae800eb54567a60206",
"size": "104... |
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
# Examples:
# url(r'^$', 'meliscore.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^$', 'front.views.home', name='home'),
url(r'^score/(?P<itemid>[\S]+)$', 'front.views.score', name... | {
"content_hash": "28540ce1e9e104730d0728be79fba7ba",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 85,
"avg_line_length": 38.125,
"alnum_prop": 0.6049180327868853,
"repo_name": "jairot/meliscore",
"id": "f699f78a98b8cbce837082dbb0c381c82d0b6306",
"size": "610",
"binary... |
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | {
"content_hash": "0c3152750673b97102e3976489cd53c5",
"timestamp": "",
"source": "github",
"line_count": 262,
"max_line_length": 113,
"avg_line_length": 26.053435114503817,
"alnum_prop": 0.5665104014063873,
"repo_name": "jlongever/redfish-client-python",
"id": "2a062e2283534a7f3a68bef8cb4c11a16b36f628... |
from __future__ import print_function
import pyeapi
pyeapi.load_config('nodes.conf')
node = pyeapi.connect_to('veos01')
output = node.enable('show version')
print(('My System MAC address is', output[0]['result']['systemMacAddress']))
| {
"content_hash": "2d8746a95d86a98e912b5820b350175c",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 76,
"avg_line_length": 26.333333333333332,
"alnum_prop": 0.7257383966244726,
"repo_name": "mzbenami/pyeapi",
"id": "af1cb3e764348ab0c9267f72258dda105c68db0c",
"size": "259",... |
from __future__ import absolute_import
import sys
from thrift.util.Recursive import fix_spec
from thrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef
from thrift.protocol.TProtocol import TPro... | {
"content_hash": "5cb26e527060379ef166235f6e0f5aad",
"timestamp": "",
"source": "github",
"line_count": 2329,
"max_line_length": 339,
"avg_line_length": 37.21983683984543,
"alnum_prop": 0.6691123031666378,
"repo_name": "facebook/fbthrift",
"id": "dd13c85d8a194eeb3aa5ff98514d4ca8b2e4022c",
"size": "... |
from temboo.core.choreography import Choreography
from temboo.core.choreography import InputSet
from temboo.core.choreography import ResultSet
from temboo.core.choreography import ChoreographyExecution
import json
class UpdateApplication(Choreography):
def __init__(self, temboo_session):
"""
Crea... | {
"content_hash": "d84a1bbfd8f6aba8eaf82ca0ac3a3a70",
"timestamp": "",
"source": "github",
"line_count": 146,
"max_line_length": 254,
"avg_line_length": 56.18493150684932,
"alnum_prop": 0.6986468365232232,
"repo_name": "lupyuen/RaspberryPiImage",
"id": "b821f66a7e6cf962afae1f90e2306b63b9e1feeb",
"si... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.