text stringlengths 4 1.02M | meta dict |
|---|---|
import contextlib
import json
import os
import textwrap
from cumulusci.tasks.salesforce import Deploy
from cumulusci.utils import temporary_dir
SETTINGS_XML = """<?xml version="1.0" encoding="UTF-8"?>
<{settingsName} xmlns="http://soap.sforce.com/2006/04/metadata">
{values}
</{settingsName}>"""
ORGPREF = """<prefere... | {
"content_hash": "b60e19da0cebe2a94e511780614e8700",
"timestamp": "",
"source": "github",
"line_count": 110,
"max_line_length": 87,
"avg_line_length": 34.21818181818182,
"alnum_prop": 0.5831562167906482,
"repo_name": "SalesforceFoundation/CumulusCI",
"id": "1f4176bb57bce06c28e68a77eb0e349b6e3db284",
... |
"""A collection of useful Python recipes."""
| {
"content_hash": "15dddce9d577d7c8df00926bcecacce6",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 44,
"avg_line_length": 46,
"alnum_prop": 0.6956521739130435,
"repo_name": "BastiTee/bastis-python-toolbox",
"id": "ef9e2bf0982245014096079577379d43f9b77f16",
"size": "46",
... |
"""
Copyright 2015 by Tobias Houska
This file is part of Statistical Parameter Estimation Tool (SPOTPY).
:author: Tobias Houska
This example implements the external hydrological model HYMOD into SPOTPY.
"""
import numpy as np
try:
import spotpy
except ImportError:
import sys
sys.path.append(".")
imp... | {
"content_hash": "6ce51c4004a8c33363aba2eda83a22ee",
"timestamp": "",
"source": "github",
"line_count": 109,
"max_line_length": 109,
"avg_line_length": 34.27522935779817,
"alnum_prop": 0.5789614561027837,
"repo_name": "thouska/spotpy",
"id": "e0a8ed0163e9c0822239822ce2952b6797d8fd8d",
"size": "3736... |
"""
fs.opener
=========
Open filesystems via a URI.
There are occasions when you want to specify a filesystem from the command line
or in a config file. This module enables that functionality, and can return an
FS object given a filesystem specification in a URI-like syntax (inspired by
the syntax of http://commons.a... | {
"content_hash": "776ee3c30de19d8a2dd69329f8bdf2f1",
"timestamp": "",
"source": "github",
"line_count": 907,
"max_line_length": 156,
"avg_line_length": 31.54685777287762,
"alnum_prop": 0.600076888127774,
"repo_name": "duedil-ltd/pyfilesystem",
"id": "fdaa424978d8e147772f2b9678e836e7dd535510",
"size... |
import datetime
from itertools import permutations
from os.path import abspath, exists, isfile, join, getmtime
import shutil
import unittest
from dependency_management.requirements.PipRequirement import PipRequirement
from freezegun import freeze_time
import requests
import requests_mock
from coalib.core.Bear impo... | {
"content_hash": "7b52e6c0862fec977523d8b09b3361bf",
"timestamp": "",
"source": "github",
"line_count": 256,
"max_line_length": 79,
"avg_line_length": 33.75,
"alnum_prop": 0.5900462962962963,
"repo_name": "IPMITMO/statan",
"id": "843c8f9d9209d349dc1877e94e3d2bfeb4a3e96f",
"size": "8640",
"binary"... |
"""Command to delete a project."""
import textwrap
from googlecloudsdk.api_lib.projects import util
from googlecloudsdk.calliope import base
from googlecloudsdk.core import log
from googlecloudsdk.core.console import console_io
@base.ReleaseTracks(base.ReleaseTrack.BETA, base.ReleaseTrack.GA)
class Delete(base.Comma... | {
"content_hash": "68a39f8bc0cd4905d3d81d34802ccdde",
"timestamp": "",
"source": "github",
"line_count": 52,
"max_line_length": 77,
"avg_line_length": 35.01923076923077,
"alnum_prop": 0.6479956068094453,
"repo_name": "flgiordano/netcash",
"id": "ac5508faafe33f43945c27572637571b58e50609",
"size": "24... |
import sys
import argparse
import baseline
from baseline.vectorizers import BPEVectorizer1D, WordpieceVectorizer1D
from mead.api_examples.preproc_utils import *
from eight_mile.utils import (
write_yaml, Timer
)
from typing import Optional
import numpy as np
import os
def get_subword_vec1d(type):
if type == '... | {
"content_hash": "9a15a493b3b0434b85646df7eee921e9",
"timestamp": "",
"source": "github",
"line_count": 175,
"max_line_length": 128,
"avg_line_length": 42.52,
"alnum_prop": 0.6140303722617928,
"repo_name": "dpressel/baseline",
"id": "c9f8289c1ca2b357c4735089dcfe4cee641f9012",
"size": "7441",
"bin... |
import random
import socket
import threading
class DNSSeeder(object):
def __init__(self, dns_seeds):
self._dns_seeds = dns_seeds
self._lock = threading.Lock()
self._found = []
self._start()
def __len__(self):
with self._lock:
return len(self._found)
de... | {
"content_hash": "609cbb016634d0e847fa575a8b626119",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 121,
"avg_line_length": 30.6,
"alnum_prop": 0.4823529411764706,
"repo_name": "ricmoo/pycoind",
"id": "a50fa16268798cf8ee84684cd0930668a526ff0b",
"size": "2650",
"binary":... |
import pytest
from datadog_checks.base import AgentCheck
from datadog_checks.mesos_slave import MesosSlave
from .common import not_windows_ci
pytestmark = not_windows_ci
@pytest.mark.integration
@pytest.mark.usefixtures("dd_environment")
def test_service_check(bad_instance, aggregator):
check = MesosSlave('mes... | {
"content_hash": "74cd4e6218eb2589a592a6824027c8de",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 99,
"avg_line_length": 27.473684210526315,
"alnum_prop": 0.7605363984674329,
"repo_name": "DataDog/integrations-core",
"id": "dc7b186058b88ed8bc8e4a1ccab7b34d8d1708c0",
"si... |
import flask
import os
import configparser
import mwoauth
from requests_oauthlib import OAuth1
import requests
CONFIG_FILENAME = "config.ini"
app = flask.Flask(__name__)
# Load configuration
curr_dir = os.path.dirname(__file__)
config = configparser.ConfigParser()
config.optionxform = str
config.read(os.path.join(cu... | {
"content_hash": "eecb10a91a4adfaa22da0d8aea472914",
"timestamp": "",
"source": "github",
"line_count": 120,
"max_line_length": 178,
"avg_line_length": 35.61666666666667,
"alnum_prop": 0.6881141787552644,
"repo_name": "APerson241/yabbr",
"id": "14ba589151045ac3bf678af2b984a1a9f466adb5",
"size": "42... |
import docker
from logging import debug
import sys
import subprocess
import os
docker_client = None
def exists(exe):
return any(os.access(os.path.join(path, exe), os.X_OK) for path in os.environ["PATH"].split(os.pathsep))
def is_linux():
return sys.platform == 'linux' or sys.platform == 'linux2'
def run(cm... | {
"content_hash": "ea960671a5654fe44e1deb525abdef3d",
"timestamp": "",
"source": "github",
"line_count": 95,
"max_line_length": 168,
"avg_line_length": 35.93684210526316,
"alnum_prop": 0.6687170474516696,
"repo_name": "kennethjiang/YANS",
"id": "46eb7672a9375cee40ba9dd134ed2a2a138acfbf",
"size": "34... |
from GeoHealthCheck.probe import Probe
class HttpGet(Probe):
"""
Do HTTP GET Request, to poll/ping any Resource bare url.
"""
NAME = 'HTTP GET Resource URL'
DESCRIPTION = 'Simple HTTP GET on Resource URL'
RESOURCE_TYPE = '*:*'
REQUEST_METHOD = 'GET'
CHECKS_AVAIL = {
'GeoHealt... | {
"content_hash": "633791056f81172f26bb222cd66e93dc",
"timestamp": "",
"source": "github",
"line_count": 91,
"max_line_length": 78,
"avg_line_length": 27.78021978021978,
"alnum_prop": 0.5652689873417721,
"repo_name": "tomkralidis/GeoHealthCheck",
"id": "774e10990382d940702b41ca10fa622ae71b3afc",
"si... |
from __future__ import with_statement
import base64
import copy
import os
import re
import shutil
import tempfile
import zipfile
from cStringIO import StringIO
from xml.dom import minidom
from distutils import dir_util
from selenium.webdriver.common.proxy import ProxyType
from selenium.common.exceptions import WebDriv... | {
"content_hash": "3c717a42673804abf58f49d9f9f2ff58",
"timestamp": "",
"source": "github",
"line_count": 358,
"max_line_length": 96,
"avg_line_length": 38.212290502793294,
"alnum_prop": 0.5902777777777778,
"repo_name": "leighpauls/k2cro4",
"id": "d36494e6a5f48cdb9af92c451cab4c5692628323",
"size": "1... |
'''
Created on Oct 18, 2016
@author: jaime
'''
from django.core import serializers
from django.http import HttpResponse
from decimal import Decimal
import json
class JSONBaseMixin(object):
def get_json_response(self, content, **httpresponse_kwargs):
"""
Construct an `HttpResponse` object with t... | {
"content_hash": "4dd23a5921d3d80a07ba05078ed77951",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 142,
"avg_line_length": 36.421052631578945,
"alnum_prop": 0.6392100192678227,
"repo_name": "jroeland/teapot",
"id": "189c9677dd793ba6fb5ff3b0b64d4f50b86b941e",
"size": "207... |
from flask import Flask
from flask import redirect
app = Flask(__name__)
@app.route("/post", methods=['POST'])
def post():
return redirect(url_for('index'))
| {
"content_hash": "0650310ac5bb70dc97c29ce681ce989d",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 37,
"avg_line_length": 18.22222222222222,
"alnum_prop": 0.6707317073170732,
"repo_name": "alfg/postpress",
"id": "2d837a9d7b3bad819b33ef781fa07dc9cffdb08e",
"size": "187",
... |
"""Callback functions that can be used to track various status during epoch."""
from __future__ import absolute_import
import logging
import math
import time
from .model import save_checkpoint
def module_checkpoint(mod, prefix, period=1, save_optimizer_states=False):
"""Callback to checkpoint Module to prefix eve... | {
"content_hash": "aa0722914170fabe58473322064f87ee",
"timestamp": "",
"source": "github",
"line_count": 218,
"max_line_length": 97,
"avg_line_length": 37.25688073394495,
"alnum_prop": 0.5602068456045309,
"repo_name": "mlperf/training_results_v0.6",
"id": "3e15ebfb8ec61b262499b8e50ca97c6e24c39b7c",
... |
import logging
from collections import defaultdict
from typing import Union, Optional, Sequence, Tuple, Any
import pyvex
from angr.knowledge_plugins import Function
from . import Analysis
from ..utils.library import get_cpp_function_name
from ..utils.formatting import ansi_color_enabled, ansi_color, add_edge_to_buff... | {
"content_hash": "71534efd08a345df6e4ace5e3b819ccb",
"timestamp": "",
"source": "github",
"line_count": 1145,
"max_line_length": 141,
"avg_line_length": 34.8943231441048,
"alnum_prop": 0.5286329278670471,
"repo_name": "angr/angr",
"id": "f7ef46f3d75904e12d9b3b733cbd64dfebb7ff6c",
"size": "39954",
... |
import logging
from twisted.internet.defer import Deferred, fail
from twisted.internet.protocol import Factory, connectionDone
from twisted.logger import Logger
from twisted.protocols.basic import Int32StringReceiver
"""
Twisted protocols that understand Kafka message framing
"""
log = logging.getLogger('afkak.proto... | {
"content_hash": "6e28a4f7ed7736b1eda64237ba840684",
"timestamp": "",
"source": "github",
"line_count": 119,
"max_line_length": 109,
"avg_line_length": 32.23529411764706,
"alnum_prop": 0.6459854014598541,
"repo_name": "ciena/afkak",
"id": "5ce11ddde02bc4a3cf59a650a5e7c0137474f8d5",
"size": "4470",
... |
import copy
import os
import time
from boto import dynamodb2
from boto.dynamodb2 import fields # AllIndex, GlobalAllIndex, HashKey, RangeKey
from boto.dynamodb2 import table
from boto.dynamodb2 import types
from boto.exception import JSONResponseError
from bunch import Bunch
import yaml
from .log import create_logge... | {
"content_hash": "5302fd30c24b78f28f630965a2de0861",
"timestamp": "",
"source": "github",
"line_count": 351,
"max_line_length": 131,
"avg_line_length": 39.17948717948718,
"alnum_prop": 0.6353984874927283,
"repo_name": "clearcare/cc_dynamodb",
"id": "25d6f67a8dc84477d3ea00f122435d398b92d8fa",
"size"... |
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'BackendAccess.backend_class'
db.add_column(u'post_office_backendaccess', 'backend... | {
"content_hash": "62ad1cb3c2cd14a74e5eadcec3da64ec",
"timestamp": "",
"source": "github",
"line_count": 85,
"max_line_length": 172,
"avg_line_length": 68.8,
"alnum_prop": 0.5545485636114911,
"repo_name": "carrerasrodrigo/django-post_office",
"id": "85cbb1cfca0c56e44ca33b65287235a4cb9a78c9",
"size":... |
import TASSELpy.javaObj
from TASSELpy.utils.OrderedSet import lruOrderedSet
from TASSELpy.utils.caching import LRUcache
from functools import wraps,update_wrapper,partial
import numpy as np
import javabridge
import re
if not javabridge.get_env():
from TASSELpy import TASSELbridge
TASSELbridge.start()
java_imp... | {
"content_hash": "4662d8ac2a7b6f222b3bdf74d1a49f70",
"timestamp": "",
"source": "github",
"line_count": 431,
"max_line_length": 106,
"avg_line_length": 48.09976798143852,
"alnum_prop": 0.5201389223867637,
"repo_name": "er432/TASSELpy",
"id": "8e32557d7aee34933b17408099526154b0142ec4",
"size": "2078... |
'''Module that runs extra process and thread workers
to offload cpu usage from main thread.
Also has a interface class and queues, methods, attributes
for handling the data, functions, callbacks
'''
from utils.compat_queue import Queue, Empty
from kivy.utils import platform
from kivy.logger import Logger
from time imp... | {
"content_hash": "10418d6eb1bf9c5e89ea1dbb18eb2c17",
"timestamp": "",
"source": "github",
"line_count": 116,
"max_line_length": 74,
"avg_line_length": 30.75862068965517,
"alnum_prop": 0.6109865470852018,
"repo_name": "Bakterija/mmplayer",
"id": "41d1352780789c0b086eb0f20296366ead4c8450",
"size": "3... |
from master.chromium_git_poller_bb8 import ChromiumGitPoller
def Update(config, active_master, c):
syzygy_poller = ChromiumGitPoller(
repourl='https://github.com/google/syzygy.git',
branch='master',
pollInterval=60)
c['change_source'].append(syzygy_poller)
| {
"content_hash": "a5481d33a7c39bdde1e704231df151f1",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 60,
"avg_line_length": 31.22222222222222,
"alnum_prop": 0.7224199288256228,
"repo_name": "eunchong/build",
"id": "b37f2c8f6aee924b36740ecfe3b5cc25e0a3af9c",
"size": "448",
... |
"""
This simple animation example shows how to move an item with the mouse, and
handle mouse clicks.
"""
import arcade
import random
# Set up the constants
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
RECT_WIDTH = 50
RECT_HEIGHT = 50
class Rectangle():
""" Class to represent a rectangle on the screen """
def __... | {
"content_hash": "9edec5927878086f2a0472a188aaa7d2",
"timestamp": "",
"source": "github",
"line_count": 97,
"max_line_length": 77,
"avg_line_length": 23.309278350515463,
"alnum_prop": 0.550641309155241,
"repo_name": "mwreuter/arcade",
"id": "07be2ba7b6e052925565d088397f687d67876af6",
"size": "2261"... |
import importlib
import pytest
from django.template import TemplateDoesNotExist
from django.template.loader import render_to_string
from django.test import SimpleTestCase
from django.test.utils import override_settings
from unittest import mock
from hamlpy.compiler import Compiler
from hamlpy.template import loaders
... | {
"content_hash": "4a84c8e58911a70783e192effc2e22e1",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 99,
"avg_line_length": 35.0735294117647,
"alnum_prop": 0.6452830188679245,
"repo_name": "Psycojoker/HamlPy",
"id": "da57d8647f488dd85b61c7c67fc3539d9b09a551",
"size": "2385... |
"""
Utility functions for training CLSTM neural networks.
"""
from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from builtins import str
import os
import click
import numpy as np
import bidi.... | {
"content_hash": "ac1744ece6d2a7b5d9718bdc2989c36f",
"timestamp": "",
"source": "github",
"line_count": 152,
"max_line_length": 110,
"avg_line_length": 33.578947368421055,
"alnum_prop": 0.585423197492163,
"repo_name": "QuLogic/ocropy",
"id": "540b827ab7df2f7f980b5c604d1fa74ddb27cf0f",
"size": "5712... |
from supriya.tools import osctools
from supriya.tools.requesttools.Request import Request
class BufferFreeRequest(Request):
r'''A /b_free request.
::
>>> from supriya.tools import requesttools
>>> request = requesttools.BufferFreeRequest(
... buffer_id=23,
... )
... | {
"content_hash": "949072b7ab26a3a0dcdcc1df07817e92",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 73,
"avg_line_length": 21.839506172839506,
"alnum_prop": 0.5579423403052572,
"repo_name": "andrewyoung1991/supriya",
"id": "56af992e51056db019036f2ec1618d69e1d26f89",
"size... |
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from .views import ToolkitActivityLogListView
urlpatterns = [
url(r'^browse/$', login_required(ToolkitActivityLogListView.as_view()), name='browse_activity_logs', ),
]
| {
"content_hash": "769316db1d5db251fcd27c0afe53df74",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 107,
"avg_line_length": 33.125,
"alnum_prop": 0.7773584905660378,
"repo_name": "cceit/cce-toolkit",
"id": "e59e6da614ab4521d8046b55031595e8a82eba6f",
"size": "265",
"binar... |
"""Module that pre-processes the notebook for export via Reveal."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from .base import Preprocessor
from traitlets import Unicode
class RevealHelpPreprocessor(Preprocessor):
url_prefix = Unicode('reveal.js', con... | {
"content_hash": "2bbd52d0cd6a068a52be8f9682bccb03",
"timestamp": "",
"source": "github",
"line_count": 70,
"max_line_length": 107,
"avg_line_length": 43.2,
"alnum_prop": 0.5552248677248677,
"repo_name": "bdh1011/wau",
"id": "c21fb07ced6bf3295f8259caa5c20bc7fcd02d46",
"size": "3024",
"binary": fa... |
from __future__ import print_function
import atexit
import errno
import os
import sys
import time
import signal
class Daemon(object):
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
"""
def __init__(self, pidfile, stdin=os.devnull,
stdo... | {
"content_hash": "a69ec81c34115581cf9dccef29a727d3",
"timestamp": "",
"source": "github",
"line_count": 229,
"max_line_length": 79,
"avg_line_length": 28.912663755458514,
"alnum_prop": 0.4979610330765745,
"repo_name": "360skyeye/kael",
"id": "16d160eeaacdaf856645e4de0ec53634355a9558",
"size": "6660... |
from nose.tools import assert_raises
from scalymongo import Document, OR, IS
from scalymongo.errors import ValidationError
from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
from tests.helpers import assert_raises_with_message
class DocumentWithListOfStrings(Document):
structure = {
'fi... | {
"content_hash": "9fca13cedc0b23718ff64d03e6a55c09",
"timestamp": "",
"source": "github",
"line_count": 105,
"max_line_length": 112,
"avg_line_length": 31.97142857142857,
"alnum_prop": 0.6821566875186178,
"repo_name": "allancaffee/scaly-mongo",
"id": "495aea13d5a535e877e1bf4a3deeab9e4e1d89ae",
"siz... |
#!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 us... | {
"content_hash": "82b5274072d74db883d9f136602aa910",
"timestamp": "",
"source": "github",
"line_count": 75,
"max_line_length": 96,
"avg_line_length": 31.653333333333332,
"alnum_prop": 0.6992417860151643,
"repo_name": "EmanueleCannizzaro/scons",
"id": "c8954c7e74d1e97887dd457343311ff211b7dbe5",
"siz... |
import logging
import re
import textwrap
import unittest
import mock
from flexmock import flexmock, flexmock_teardown
from hamcrest import assert_that, has_length, equal_to, contains_string, has_key, \
is_, instance_of
from ncclient.devices.junos import JunosDeviceHandler
from ncclient.operations import RPCError, ... | {
"content_hash": "dcbc877afdbfa2bf698530313dbfff80",
"timestamp": "",
"source": "github",
"line_count": 6612,
"max_line_length": 219,
"avg_line_length": 36.117816091954026,
"alnum_prop": 0.4347664052325898,
"repo_name": "idjaw/netman",
"id": "2011317c2d42a405fd95c8c1f635618c881d50d1",
"size": "2393... |
from pysmt.operators import new_node_type
LTL_X = new_node_type(node_str="LTL_X")
LTL_Y = new_node_type(node_str="LTL_Y")
LTL_Z = new_node_type(node_str="LTL_Z")
LTL_F = new_node_type(node_str="LTL_F")
LTL_G = new_node_type(node_str="LTL_G")
LTL_O = new_node_type(node_str="LTL_O")
LTL_H = new_node_type(node_str="LTL_H... | {
"content_hash": "c87e57dc6381c135f81667acb2580c7a",
"timestamp": "",
"source": "github",
"line_count": 170,
"max_line_length": 82,
"avg_line_length": 35.77647058823529,
"alnum_prop": 0.6857941466622821,
"repo_name": "pysmt/pysmt",
"id": "b3fbc75e27b7d2b3f10e4f31e42c92e2b3d2ebdc",
"size": "6387",
... |
from WebStudioLib import *
from WebStudioUtil import *
from WebStudioBase import *
sqlDataType = {}
sqlDataType['counter_view'] = {
'elems': [
{'name': 'name','type': 'text'},
{'name': 'author','type': 'text'},
{'name': 'description','type': 'text'},
{'name': 'counterList','type': '... | {
"content_hash": "e67b750fff47c2d583ca023e0e74a93c",
"timestamp": "",
"source": "github",
"line_count": 195,
"max_line_length": 188,
"avg_line_length": 36.92307692307692,
"alnum_prop": 0.58375,
"repo_name": "glglwty/rDSN",
"id": "dd88bc928f77ccb949e90663f8d9b1cbd875b87d",
"size": "7200",
"binary"... |
"""All piple creation subrutines tests"""
# =============================================================================
# IMPORTS
# =============================================================================
import tempfile
import shutil
import os
from corral import creator
from corral.exceptions import Validat... | {
"content_hash": "5bc5f6543e371a14cb52c4a408e23787",
"timestamp": "",
"source": "github",
"line_count": 82,
"max_line_length": 79,
"avg_line_length": 30.926829268292682,
"alnum_prop": 0.5772870662460567,
"repo_name": "toros-astro/corral",
"id": "010af6b4bbdc497c1d9c891970c87363c9a3ee6f",
"size": "4... |
from pymoku import Moku, MokuException, NoDataException
from pymoku.instruments import *
import time, logging, traceback
logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')
logging.getLogger('pymoku').setLevel(logging.INFO)
# Use Moku.get_by_serial() or get_by_name() if you don't know the IP... | {
"content_hash": "8f2459ea08161e5f380d5ece27e62d06",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 93,
"avg_line_length": 28,
"alnum_prop": 0.7184873949579832,
"repo_name": "benizl/pymoku",
"id": "bd48e4fcdc498b34f30295f6d66e5e2f3b758765",
"size": "952",
"binary": fals... |
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
replaces = [(b'wh_habitica', '0001_initial'), (b'wh_habitica', '0002_auto_20151226_1552')]
initial = True
dependenci... | {
"content_hash": "feff69eb5e215584500cc65274dccf78",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 147,
"avg_line_length": 43.3125,
"alnum_prop": 0.6284271284271284,
"repo_name": "passuf/WunderHabit",
"id": "86da73ec42034f5ee0a0cb11c80d39ffba4b8ec1",
"size": "1458",
"b... |
import copy
from oslo_log import log as logging
import six
from heat.common import exception
from heat.common.i18n import _
from heat.common.i18n import _LI
from heat.common.i18n import _LW
from heat.engine import attributes
from heat.engine.clients import progress
from heat.engine import constraints
from heat.engine... | {
"content_hash": "f0a7780c1c4e52411274a29babb69f8d",
"timestamp": "",
"source": "github",
"line_count": 897,
"max_line_length": 79,
"avg_line_length": 40.09141583054627,
"alnum_prop": 0.5172960347032979,
"repo_name": "dragorosson/heat",
"id": "0eef1d8cb27419184ce7247c4f0e45938a0f2cd1",
"size": "365... |
import time
import uuid
import fixtures
from lxml import etree
import six
from nova.compute import arch
from nova.virt.libvirt import config as vconfig
# Allow passing None to the various connect methods
# (i.e. allow the client to rely on default URLs)
allow_default_uri_connection = True
# Has libvirt connection b... | {
"content_hash": "2b03f8647a00913ca73fd761a5cc15e0",
"timestamp": "",
"source": "github",
"line_count": 1345,
"max_line_length": 79,
"avg_line_length": 30.136802973977694,
"alnum_prop": 0.5768737356293482,
"repo_name": "bigswitch/nova",
"id": "8761e69c1716e11c137f4d203ef729c1b1d25749",
"size": "411... |
import argparse
import runeclan.xp_tracker as tracker
import runescape.clan_stats as stats
import template.state as state
import progressbar
import os
def __parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--clan', action='append', help='The official name(s) of the clan', requir... | {
"content_hash": "0ad5150d85e4e20679e539471fc68186",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 153,
"avg_line_length": 43.5,
"alnum_prop": 0.6586206896551724,
"repo_name": "TotalF2PSkillers/f2p-state",
"id": "1587223ca6e5bec7765f902dab43fe22d21c67bc",
"size": "1740",... |
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Parcoords(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "parcoords"
_valid_props = {
"customdata",
"customdatasrc",
"dimensiondefaults... | {
"content_hash": "a9c0ba5b57d156bd0cdf962b913823af",
"timestamp": "",
"source": "github",
"line_count": 1137,
"max_line_length": 81,
"avg_line_length": 37.08795074758135,
"alnum_prop": 0.542436386919301,
"repo_name": "plotly/python-api",
"id": "ce614d190c0f2878e5d1dc542d1e6f2484f9e4e8",
"size": "42... |
from django.http import HttpResponse
from django.views.generic import TemplateView
class About(TemplateView):
template_name = 'about.html'
| {
"content_hash": "87136b97aefd451f24b1a388cb20ca6b",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 45,
"avg_line_length": 28.8,
"alnum_prop": 0.7986111111111112,
"repo_name": "fsxfreak/club-suite",
"id": "a931665aa6776922367ed287b5820871410b8804",
"size": "144",
"binary... |
try: # Python 2.7 compat
from collections.abc import Mapping, Iterable
except ImportError:
from collections import Mapping, Iterable
from itertools import chain
from functools import reduce
from .common import _raise
def empty(_ = None):
class __puredict(puredict_base):
__getitem__ = lambda _, __: ... | {
"content_hash": "0bd72c7a1c1e5e4bb97e0aa43fc89646",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 103,
"avg_line_length": 43.020833333333336,
"alnum_prop": 0.5941888619854722,
"repo_name": "maweki/more-collections",
"id": "904706fb72da3a81bb117ee90a7437b1a485d160",
"siz... |
from nmrmint.GUI.history import Subspectrum
def test_subspectrum_instantiated_inactive():
ss = Subspectrum()
assert not ss.active
def test_subspectrum_toggle_true():
ss = Subspectrum()
ss.toggle_active()
assert ss.active
def test_subspectrum_toggle_false():
ss = Subspectrum(activity=Tr... | {
"content_hash": "efc7119853abf5005669df402db2175a",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 45,
"avg_line_length": 20.68421052631579,
"alnum_prop": 0.6972010178117048,
"repo_name": "sametz/nmrmint",
"id": "90026b2cb66fc5aa6526f9ba972cfa2df69a7ad0",
"size": "393",
... |
from enum import Enum
from typing import NamedTuple, Optional
from pyrsistent import pmap, pvector
from pyrsistent.typing import PVector, PMap
from typeit import type_constructor
class AppConfig(NamedTuple):
name: str
url_prefix: str
setup: PVector[PMap] = pvector([])
class Session(NamedTuple):
co... | {
"content_hash": "f16584e4a5b616185adbc66d1f61e304",
"timestamp": "",
"source": "github",
"line_count": 72,
"max_line_length": 71,
"avg_line_length": 21.569444444444443,
"alnum_prop": 0.6555054732775274,
"repo_name": "avanov/solo",
"id": "b1add68d86613812567a0dbbe71df2bc9b189715",
"size": "1553",
... |
"""
pySpatialTools package.
"""
from version import *
from tests import test
# Release data
import release
__author__ = release.author
__license__ = release.license
__date__ = release.date
__version__ = release.version
'''
import Feature_engineering
import Geo_tools
import io
import Preprocess
import Recommender... | {
"content_hash": "203cd157be4d02f75ece87d6ec010aff",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 29,
"avg_line_length": 13.4375,
"alnum_prop": 0.7604651162790698,
"repo_name": "tgquintela/pySpatialTools",
"id": "a8281c9c8610e1675e08cb1d75a87c5a516ad919",
"size": "431",... |
"""Generates a .cc file that embeds the V8 snapshot.
This defines the following function
void shaka::SetupV8Snapshots();
"""
import argparse
import sys
import embed_utils
def _SetupStartupData(writer, var_name):
"""Writes the code to setup a StartupData variable."""
writer.Write(
'%s_startup_data.data =... | {
"content_hash": "87eb3adf3d627c3bca65f07f716959f1",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 79,
"avg_line_length": 27.098360655737704,
"alnum_prop": 0.6684815486993345,
"repo_name": "shaka-project/shaka-player-embedded",
"id": "1fbb479c87f5ecb69ab77cb002fdf8a2a139c1... |
from __future__ import unicode_literals
from rest_framework import viewsets
from rest_framework import permissions
from .models import Topic
from .serializers import TopicSerializer
from .views import get_all_topics
class TopicViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Topic.objects.all()
serializer... | {
"content_hash": "762ebb4c329475be2b0e2cae97e926f0",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 65,
"avg_line_length": 28.27777777777778,
"alnum_prop": 0.7662082514734774,
"repo_name": "JiaruZhang/Five",
"id": "935cc54a3e05e778b752bba90fce26e8cd032630",
"size": "533",... |
import serial
import pika
import json
import threading
import thread
import time
import logging
from cleaner.cleaner import KinematicsSolver
from functools import partial
import cleaner.constants as const
from random import uniform, randint, randrange
log = logging.getLogger("glove")
log.setLevel(logging.DEBUG)
fh = l... | {
"content_hash": "e855c68813edea8f7bf28bead834df59",
"timestamp": "",
"source": "github",
"line_count": 131,
"max_line_length": 143,
"avg_line_length": 36.17557251908397,
"alnum_prop": 0.5691074066258704,
"repo_name": "GEverding/touchVision",
"id": "ecedc10ed35a702a3b9ec38a1d87b0a7e958b51d",
"size"... |
import json
import logging
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from desktop.lib.django_util import JsonResponse
from desktop.models import Document2, Document
from spark.models import get_api, Notebook, QueryExpired
from... | {
"content_hash": "ff49b6bc089f5fa1e2712ea3f84568c0",
"timestamp": "",
"source": "github",
"line_count": 181,
"max_line_length": 145,
"avg_line_length": 27.933701657458563,
"alnum_prop": 0.685126582278481,
"repo_name": "erickt/hue",
"id": "15d39dec2852a52032c8900a4fe1a5c8660b1f23",
"size": "5848",
... |
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('content', '0002_auto_20160120_1345'),
]
operations = [
migrations.AlterModelOptions(
name='page',
options={'ordering': ['wei... | {
"content_hash": "6930d08f57a5cfda97d78e72b33bbd8c",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 129,
"avg_line_length": 26.045454545454547,
"alnum_prop": 0.5846422338568935,
"repo_name": "DesjardinsLab/event-kiosk",
"id": "207e0eb941452c7f95355884cf9854c835ef116b",
"s... |
"""Includes bioportalSearchWidgets class.
bioportalSearchWidgets uses ipywidgets to create search boxes for the purpose
of collecting metadata via searching the Bioportal ontology API.
"""
import ipywidgets as widgets
import requests
from IPython.display import display
from metadataCollector import MetadataCollector... | {
"content_hash": "d55c49c8cf68b05c4813643faefd4296",
"timestamp": "",
"source": "github",
"line_count": 89,
"max_line_length": 90,
"avg_line_length": 36.17977528089887,
"alnum_prop": 0.639751552795031,
"repo_name": "chapmanbe/pymitools",
"id": "c332f51846d37a22c470e2eaf744c7b129a32102",
"size": "32... |
from __future__ import unicode_literals
from flask import current_app as app
from flask import Blueprint, render_template, abort, redirect, request
from www.content import repository, exceptions
from www.decorators import html_minify, cache_headers
from www.main.serializers import serialize
views = Blueprint(
'... | {
"content_hash": "788e43e792980c70220283084a1c5335",
"timestamp": "",
"source": "github",
"line_count": 93,
"max_line_length": 75,
"avg_line_length": 27.70967741935484,
"alnum_prop": 0.6418315871168024,
"repo_name": "spryle/james.spry-leverton.com",
"id": "decbd51cb6897f6cd68f9f5299694fc4bfea4fbe",
... |
import unittest
import mock
from sync_settings import sync_version as version
class TestSyncVersion(unittest.TestCase):
@mock.patch('requests.get')
def test_get_remote_version_failed(self, get_mock):
response = mock.Mock()
response.status_code = 404
get_mock.return_value = response
... | {
"content_hash": "2a203f3b8d904b0a244dee6e474c5345",
"timestamp": "",
"source": "github",
"line_count": 105,
"max_line_length": 101,
"avg_line_length": 43.80952380952381,
"alnum_prop": 0.6573913043478261,
"repo_name": "mfuentesg/SyncSettings",
"id": "e518ce891398a2603acdf14cb7a49beaa68a5a6b",
"size... |
"""
Copyright (C), 2013, The Schilduil Team. All rights reserved.
"""
import logging
import inspect
import time
from collections import OrderedDict
from operator import add
from functools import wraps
__all__ = [
"logging",
"get_timings",
"init_timings",
"disable_timings",
"timings_report",
"l... | {
"content_hash": "d215e73bf4abc81cf4776c8b9206752e",
"timestamp": "",
"source": "github",
"line_count": 184,
"max_line_length": 83,
"avg_line_length": 32.20108695652174,
"alnum_prop": 0.530464135021097,
"repo_name": "schilduil/suapp",
"id": "5709a55817a8771fa4de6f0e109702446763a59b",
"size": "5949"... |
from . import google_translator_toolkit
from . import google_sheets
from grow.common import extensions
from grow.common import utils
_kinds_to_classes = {}
_builtins = (
google_translator_toolkit.GoogleTranslatorToolkitTranslator,
google_sheets.GoogleSheetsTranslator,
)
def install_translator(translator):
... | {
"content_hash": "a30a641908c8577b5784d46f2b492a1b",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 77,
"avg_line_length": 30.027027027027028,
"alnum_prop": 0.7083708370837084,
"repo_name": "grow/pygrow",
"id": "7a64cf75e3719a155ee6dc5ab6e0b02c1b2f15bc",
"size": "1111",
... |
from google.cloud import artifactregistry_v1
def sample_delete_repository():
# Create a client
client = artifactregistry_v1.ArtifactRegistryClient()
# Initialize request argument(s)
request = artifactregistry_v1.DeleteRepositoryRequest(
name="name_value",
)
# Make the request
ope... | {
"content_hash": "f91b09576da033e390d3a7be6f904d44",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 76,
"avg_line_length": 25.304347826086957,
"alnum_prop": 0.7250859106529209,
"repo_name": "googleapis/python-artifact-registry",
"id": "439a59642879ce463e2f578e3c041b9554414e... |
import cPickle
import errno
import itertools
import os
import sys
import tempfile
import traceback
from conary import files, trove, callbacks
from conary.deps import deps
from conary.lib import util, openpgpfile, sha1helper, openpgpkey
from conary.repository import changeset, errors, filecontents
from conary.repositor... | {
"content_hash": "52b198f1c34dd43f67f31162c6e3e936",
"timestamp": "",
"source": "github",
"line_count": 702,
"max_line_length": 94,
"avg_line_length": 41.851851851851855,
"alnum_prop": 0.531075561606535,
"repo_name": "fedora-conary/conary",
"id": "cf918dc3bb658aff0cd1fe1bd2467ef619f532d7",
"size": ... |
"""Tests for the Google Chrome extension activity database plugin."""
import unittest
from plaso.formatters import chrome_extension_activity # pylint: disable=unused-import
from plaso.lib import eventdata
from plaso.lib import timelib
from plaso.parsers import sqlite
from plaso.parsers.sqlite_plugins import chrome_e... | {
"content_hash": "a86aadae5d7090a44c69f2a3fe1f34c2",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 87,
"avg_line_length": 37.17857142857143,
"alnum_prop": 0.7512007684918348,
"repo_name": "dc3-plaso/plaso",
"id": "39bb79d57e54e585712e9cce2e984924493f0c57",
"size": "2124"... |
"""
Copyright 2022 Google LLC
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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... | {
"content_hash": "62af9a85a67c58a4f446a47aec9016bd",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 78,
"avg_line_length": 34.6,
"alnum_prop": 0.7010734929810074,
"repo_name": "GoogleCloudPlatform/composer-utilities",
"id": "b63e03c003bdfa8d337c2663505836895f6c5522",
"siz... |
"""
Convert h264 videos (in the current folder) to mp4 using MP4Box
"""
import os
import subprocess
files = [f for f in os.listdir(".") if f.endswith(".h264")]
for f in files:
print("Converting {}".format(f))
ok = subprocess.call(['MP4Box', '-add', f, f[:-4] + "mp4"])
| {
"content_hash": "1d8f3acd77a25aad5ba8509d9b118d9e",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 63,
"avg_line_length": 24.818181818181817,
"alnum_prop": 0.6410256410256411,
"repo_name": "sergionr2/RacingRobot",
"id": "ea68aa78644c38b824fdf84bcfb74d2064b9dd44",
"size":... |
import os
import sys
import shutil
import unittest
sys.path.append(os.path.join(os.path.dirname(__file__), "../"))
from PIL import Image
import numpy as np
from model.environment import Environment
from model.agent import Agent
from model.dqn_agent import DQNAgent, Q
class FormatAgent(Agent):
def __init__(self, ... | {
"content_hash": "99efacb608bb9e7f67ba997301a28398",
"timestamp": "",
"source": "github",
"line_count": 85,
"max_line_length": 84,
"avg_line_length": 30.776470588235295,
"alnum_prop": 0.5649847094801224,
"repo_name": "icoxfog417/chainer_pong",
"id": "9ca16cd78449a1625d680bbb95353ce2b069d2fa",
"size... |
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = r'''
---
module: ucs_query
short_description: Queries UCS Manager objects by... | {
"content_hash": "fda840661a861adbe87d139d3e4aa56f",
"timestamp": "",
"source": "github",
"line_count": 167,
"max_line_length": 83,
"avg_line_length": 26.74251497005988,
"alnum_prop": 0.6018808777429467,
"repo_name": "thaim/ansible",
"id": "de35b4a17ff03a21c16aa60e0a0c513bae5f88b5",
"size": "4603",... |
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | {
"content_hash": "8d0271cad221091fe47427a33db702d4",
"timestamp": "",
"source": "github",
"line_count": 389,
"max_line_length": 264,
"avg_line_length": 50.210796915167094,
"alnum_prop": 0.7489248412860946,
"repo_name": "arenadata/ambari",
"id": "8f388433644781d655c64875c8b68e05b3c2a80c",
"size": "1... |
import logging
import base64, io
from struct import unpack
from xml.dom.minidom import parseString
import zipfile
import olefile
from . import base
from .common import _parse_encryptionheader, _parse_encryptionverifier
from ..method.ecma376_agile import ECMA376Agile
from ..method.ecma376_standard import ECMA376Standa... | {
"content_hash": "c8da53bfc08034683a224066278d1e55",
"timestamp": "",
"source": "github",
"line_count": 196,
"max_line_length": 131,
"avg_line_length": 43.97959183673469,
"alnum_prop": 0.5926914153132251,
"repo_name": "nolze/ms-offcrypto-tool",
"id": "35d1593aa89cb2579f35ecbcf32eca0d853aaaf9",
"siz... |
from settings import *
INSTALLED_APPS += ('django_hudson', )
PROJECT_APPS = ('jamsession', )
HUDSON_TASKS = ('coverage', 'tests')
import logging
logging.basicConfig(level=logging.WARNING)
| {
"content_hash": "54453d7042ed3ec63a450f12bc843b3b",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 42,
"avg_line_length": 19.2,
"alnum_prop": 0.71875,
"repo_name": "cmheisel/django-jamsession",
"id": "5d057359f2f08ecec976396554c16bfdf518ea55",
"size": "192",
"binary": ... |
import sys
sys.path.append('/home/dopefactor2/webapps/flask/htdocs')
from ashflash import app as application
import views
# import sys
# def application(environ, start_response):
# output = 'Welcome to your mod_wsgi website! It uses:\n\nPython %s' % sys.version
# response_headers = [
# ('Content-Length',... | {
"content_hash": "f6e04348eb863d13c1aa7f44ba578278",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 85,
"avg_line_length": 27.058823529411764,
"alnum_prop": 0.6652173913043479,
"repo_name": "Acour83/ashflashtheorig",
"id": "8fcfa1c08fcd6dbcd8c3010a402507b5337d8b70",
"size... |
import csv
import datetime
from flask import g, jsonify, request
from server import app, sqldb
from server.auth import auth
from server.models import Account, DiningTransaction
@app.route("/dining/transactions", methods=["POST"])
@auth()
def save_dining_dollar_transactions():
account = g.account
if not acco... | {
"content_hash": "effdee20649c4c5121fa2deafa1da85a",
"timestamp": "",
"source": "github",
"line_count": 87,
"max_line_length": 80,
"avg_line_length": 30.310344827586206,
"alnum_prop": 0.5676905574516496,
"repo_name": "pennlabs/penn-mobile-server",
"id": "01a2c74c91fd2907d30478740773a95bd4c86c70",
"... |
"""
Filename: calc_global_metric.py
Author: Damien Irving, [email protected]
Description: Calculate global metric
"""
# Import general Python modules
import sys, os, pdb
import argparse
import numpy
import iris
import iris.analysis.cartography
from iris.experimental.equalise_cubes import equalise_at... | {
"content_hash": "221da1cb7b8e0cd617394b3dd3d9e7e9",
"timestamp": "",
"source": "github",
"line_count": 207,
"max_line_length": 111,
"avg_line_length": 31.333333333333332,
"alnum_prop": 0.6577243293246994,
"repo_name": "DamienIrving/ocean-analysis",
"id": "efd597015e8d15a7b96cd7425b32497573384307",
... |
import random
#ver 1.3 29.01.2016
#Rebecca Iversen
#generer en tilfeldig valør og farge
valor = [1,2,3,4,5,6,7,8,9,10,11,12,13]
farge = ["klover", "hjerter", "spar", "ruter"]
random.shuffle(valor, random=None)
random.shuffle(farge, random=None)
valor[10] = "Knekt"
valor[11] = "Dronning"
valor[12] = "Konge"
valor[0]... | {
"content_hash": "ba859ad2af60f95b17eb6f97f6b22ced",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 46,
"avg_line_length": 21.964285714285715,
"alnum_prop": 0.71869918699187,
"repo_name": "github4321/IS-105_2016_Gruppe92",
"id": "d8defca6563bcd95d6c7a8a03a4138e28bcfd319",
... |
from . import context
| {
"content_hash": "b19ec21675481e16553ca0c8f207944d",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 21,
"avg_line_length": 22,
"alnum_prop": 0.7727272727272727,
"repo_name": "brianjbuck/robie",
"id": "4d057a203df694ed726bdba5ef0950f88c1cf0ea",
"size": "22",
"binary": fal... |
from google.cloud.devtools import cloudbuild_v1
async def sample_update_build_trigger():
# Create a client
client = cloudbuild_v1.CloudBuildAsyncClient()
# Initialize request argument(s)
trigger = cloudbuild_v1.BuildTrigger()
trigger.autodetect = True
request = cloudbuild_v1.UpdateBuildTrigg... | {
"content_hash": "3713834b4a66d3bb91addd79dd865f41",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 67,
"avg_line_length": 26.916666666666668,
"alnum_prop": 0.7105263157894737,
"repo_name": "googleapis/python-cloudbuild",
"id": "e2a0b44151d8ad48c13dde51f1309c63dae4bf43",
... |
"""
Common distribution functions for plasmas, such as the Maxwellian or
Kappa distributions. Functionality is intended to include generation,
fitting and calculation.
"""
__all__ = [
"Maxwellian_1D",
"Maxwellian_velocity_2D",
"Maxwellian_velocity_3D",
"Maxwellian_speed_1D",
"Maxwellian_speed_2D",
... | {
"content_hash": "410cd6a7fccedf9e6a74c8ec00c567d9",
"timestamp": "",
"source": "github",
"line_count": 1080,
"max_line_length": 89,
"avg_line_length": 33.06018518518518,
"alnum_prop": 0.6158801288334967,
"repo_name": "StanczakDominik/PlasmaPy",
"id": "8bdce97e1c3d5a24a51d2eb0aa843a110963145d",
"si... |
from ducktape.mark import parametrize
from ducktape.mark.resource import cluster
from kafkatest.services.console_consumer import ConsoleConsumer
from kafkatest.services.kafka import KafkaService
from kafkatest.services.kafka import config_property
from kafkatest.services.verifiable_producer import VerifiableProducer
f... | {
"content_hash": "fea97089edbf695559809ae8d3687161",
"timestamp": "",
"source": "github",
"line_count": 100,
"max_line_length": 234,
"avg_line_length": 48.54,
"alnum_prop": 0.6761433868974042,
"repo_name": "noslowerdna/kafka",
"id": "0a7322d2f763af8c1c547cac02403946d3d6b8ff",
"size": "5635",
"bin... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import os
import shutil
import tempfile
import numpy as np
import tensorflow as tf
import tensorflowjs as tfjs
from tensorflow import keras
curr_dir = os.path.dirname(os.path.realpath(__file__))
... | {
"content_hash": "a2770f354f844c24fe4142ec164f50df",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 78,
"avg_line_length": 29.82051282051282,
"alnum_prop": 0.6496130696474635,
"repo_name": "tensorflow/tfjs",
"id": "d55caf6dab512ca9237c74a4e96b4432a6de5ac7",
"size": "2816"... |
"""
Semantic Machines\N{TRADE MARK SIGN} software.
Creates BeliefStateTrackerDatum from different sources TRADE processed dialogues.
"""
import argparse
import json
from typing import Any, Dict, Iterator, List
from dataflow.core.io_utils import save_jsonl_file
from dataflow.multiwoz.belief_state_tracker_datum import... | {
"content_hash": "c5aad39f037120358b04fa0b8699b8fc",
"timestamp": "",
"source": "github",
"line_count": 111,
"max_line_length": 88,
"avg_line_length": 36.11711711711712,
"alnum_prop": 0.6667498129209279,
"repo_name": "microsoft/task_oriented_dialogue_as_dataflow_synthesis",
"id": "da13d0af94deedca6d0... |
"""Module implementing RWA cells with customizable attention spans.
This module provides an implementation of a recurrent weighted average (RWA)
model (https://arxiv.org/abs/1703.01253). The RWACell extends the `RNNCell`
class to create a model that conforms with the recurrent neural network
framework in TensorFlow.
"... | {
"content_hash": "5b7c8ee8f06927af7c96158435b6b364",
"timestamp": "",
"source": "github",
"line_count": 117,
"max_line_length": 144,
"avg_line_length": 38.82051282051282,
"alnum_prop": 0.6897842360193748,
"repo_name": "jostmey/cas",
"id": "fff104fd7d691cb2e6b608df6bac3d8731cddf49",
"size": "4862",
... |
"""Support for Verizon FiOS Quantum Gateways."""
import logging
from quantum_gateway import QuantumGatewayScanner
from requests.exceptions import RequestException
import voluptuous as vol
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.con... | {
"content_hash": "81ff4315b7c8ab0925cb04dff820b088",
"timestamp": "",
"source": "github",
"line_count": 70,
"max_line_length": 84,
"avg_line_length": 32.114285714285714,
"alnum_prop": 0.6690391459074733,
"repo_name": "leppa/home-assistant",
"id": "97eb8eedfd3915c8bf147dd62ac89dc716345a71",
"size": ... |
"""
A simple file to test the mlb_standings
Could do a bunch more tests but really, this is an example.
Nothing more.
DTH
2015-11-18
"""
from mlb_standings import MLBStandings
import unittest
class MLBStandingsTest(unittest.TestCase):
def __init__(self, testname, startDate, endDate):
super(MLBStandings... | {
"content_hash": "6c75c4f4e1dfa47b665af9d73dc66975",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 78,
"avg_line_length": 29.324324324324323,
"alnum_prop": 0.6921658986175115,
"repo_name": "dtherrick/dataviz_baseball",
"id": "7a8ea503dda15e840aa2c1a42d1927ce2ba4ccfb",
"s... |
from __future__ import print_function
from __future__ import absolute_import
import functools
import inspect
import os
import sys
import time
import platform
def GetCatapultDir():
return os.path.normpath(
os.path.join(os.path.dirname(__file__), '..', '..', '..'))
def IsRunningOnCrosDevice():
"""Returns T... | {
"content_hash": "481d749cec7799f102a405352a016423",
"timestamp": "",
"source": "github",
"line_count": 149,
"max_line_length": 80,
"avg_line_length": 32.147651006711406,
"alnum_prop": 0.687473903966597,
"repo_name": "catapult-project/catapult",
"id": "b4c22a21627e30111171ee5adf0b1f418d840151",
"si... |
from time import strftime;
import os, sys, urllib;
import time, datetime;
import pytz;
def f(inputfile, outputfile):
with open (inputfile, "r") as myfile:
code=myfile.read().replace('\n', '');
myfile.close();
url= "http://hq.sinajs.cn/list=%s" % (code);
write_data = urllib.urlopen(ur... | {
"content_hash": "0f73c8bcf3777c65e6982a8e08ccdec0",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 81,
"avg_line_length": 35.375,
"alnum_prop": 0.5874558303886925,
"repo_name": "xiatian122/stockquote",
"id": "6d6270dd51bf307091e81207740b39cc2984463a",
"size": "1132",
"... |
"""Multivariate Gaussian contour classifier.
"""
import numpy as np
from scipy.stats import boxcox
from scipy.stats import multivariate_normal
from motif.core import ContourClassifier
EPS = 1.0
MAX_SCORE = 10000.0
class MvGaussian(ContourClassifier):
'''Multivariate Gaussian contour classifier.
Attributes
... | {
"content_hash": "6cf575c9e827c80e9746816f49c3fbe2",
"timestamp": "",
"source": "github",
"line_count": 168,
"max_line_length": 75,
"avg_line_length": 27.958333333333332,
"alnum_prop": 0.5439642324888226,
"repo_name": "rabitt/motif",
"id": "642814402d0170f644c1e7f222456d081ffb77de",
"size": "4697",... |
import unittest
from colander import Invalid
from jsonresume.schema.validators import is_valid_country_code
class TestCountryCodeValidation(unittest.TestCase):
def test_all(self):
for country_code, exc_class in [
('JP', None),
('FR', None),
('USA', Invalid),
... | {
"content_hash": "06ab29b724f2fd83367514c8f275105a",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 74,
"avg_line_length": 28.458333333333332,
"alnum_prop": 0.5285505124450952,
"repo_name": "kelvintaywl/jsonresume-validator",
"id": "2b3df2b01bb05a4aa180d8db8fe25bcbc5def377"... |
import unittest
from mockito import mock, unstub, when
from Selenium2Library.keywords import BrowserManagementKeywords
class KeywordArgumentsElementTest(unittest.TestCase):
def setUp(self):
ctx = mock()
ctx._browser = mock()
self.brorser = BrowserManagementKeywords(ctx)
def tearDow... | {
"content_hash": "a729d3fc140ebdab5ddbe98c195447b0",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 78,
"avg_line_length": 33.16129032258065,
"alnum_prop": 0.5885214007782101,
"repo_name": "SergiuTudos/Selenium2Library",
"id": "ce4586e958fc4b7a687b65ef7b20f912693fcd47",
"... |
from __future__ import unicode_literals
import os
import os.path as op
AUTHOR = u'Benjamin Laken'
AUTHOR_EMAIL = '[email protected]'
SITENAME = u'Benjamin Laken'
# SITEURL = 'https://benlaken.github.io/blogsite'
SITEURL = 'https://benlaken.com'
# SITEURL = 'http://localhost:8000'
TAGLINE = u'Earth science meanderings... | {
"content_hash": "472d82f0199a7951d53990361010f43a",
"timestamp": "",
"source": "github",
"line_count": 72,
"max_line_length": 86,
"avg_line_length": 30.416666666666668,
"alnum_prop": 0.6812785388127854,
"repo_name": "benlaken/blogsite",
"id": "eefabb26c8bcfd4b4fdab638fb8c72eb1a657f29",
"size": "22... |
from collections.abc import Iterable
import os
def normalize_lineseps(lines):
r"""Normalize and then return the given lines to all use '\n'."""
lines = lines.replace(os.linesep, '\n')
# This happens (even on Linux and macOS) when capturing I/O from an
# emulated tty.
lines = lines.replace('\r\n',... | {
"content_hash": "e0794f78a777ac5397908d177b5705c3",
"timestamp": "",
"source": "github",
"line_count": 124,
"max_line_length": 84,
"avg_line_length": 37.58870967741935,
"alnum_prop": 0.560394765071873,
"repo_name": "ros2/launch",
"id": "61fdd7a95a53ff551037a4c8a9a7d25fca3b6ccc",
"size": "5263",
... |
from .streamable_archive_tests import *
from .delivery_collection_tests import *
from .importutils import *
from .test_passed_in_previous_period import *
from .test_groups_groupedby_relatedstudent_and_assignment import GroupsGroupedByRelatedStudentAndAssignmentTest
| {
"content_hash": "53d7ab03444fb17b7e1623d7cc5a788d",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 111,
"avg_line_length": 53.2,
"alnum_prop": 0.8421052631578947,
"repo_name": "devilry/devilry-django",
"id": "1d7bf30417e3b328f207b1d46883218466cde875",
"size": "266",
"bi... |
import _plotly_utils.basevalidators
class ParcatsValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self, plotly_name="parcats", parent_name="layout.template.data", **kwargs
):
super(ParcatsValidator, self).__init__(
plotly_name=plotly_name,
p... | {
"content_hash": "9ff9fa7ee218c9b76a98c5032ed24844",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 81,
"avg_line_length": 30.333333333333332,
"alnum_prop": 0.5512820512820513,
"repo_name": "plotly/python-api",
"id": "b1aab66788669c33ab4d0aa29619412e153c4d6c",
"size": "54... |
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pp... | {
"content_hash": "a7696d54ba6ce30f43eba06add532e4e",
"timestamp": "",
"source": "github",
"line_count": 149,
"max_line_length": 140,
"avg_line_length": 28.053691275167786,
"alnum_prop": 0.5555023923444976,
"repo_name": "docusign/docusign-python-client",
"id": "de17cefa7d5cb7d9912eb037fa928aeb353370ee... |
"""
Model classes for AppDynamics REST API
.. moduleauthor:: Todd Radel <[email protected]>
"""
from . import JsonObject, JsonList
class Node(JsonObject):
FIELDS = {'id': '', 'name': '', 'type': '', 'machine_id': 'machineId', 'machine_name': 'machineName',
'tier_id': 'tierId', 'tier_name': '... | {
"content_hash": "5266b978a7bf100b9b70496f625f9696",
"timestamp": "",
"source": "github",
"line_count": 72,
"max_line_length": 117,
"avg_line_length": 42.236111111111114,
"alnum_prop": 0.6037487668530089,
"repo_name": "tradel/AppDynamicsREST",
"id": "ce995c875781fcb59a77d035f0a338ddc89c1cd6",
"size... |
"""Functions for collecting diagnostic information on Kubernetes cluster."""
import enum
from typing import List, Text
from kfp.deprecated.cli.diagnose_me import utility
class Commands(enum.Enum):
"""Enum for kubernetes commands."""
GET_CONFIGURED_CONTEXT = 1
GET_PODS = 2
GET_PVCS = 3
GET_PVS = 4... | {
"content_hash": "b595896bc629ca01b9cca096c51af04e",
"timestamp": "",
"source": "github",
"line_count": 110,
"max_line_length": 82,
"avg_line_length": 35.68181818181818,
"alnum_prop": 0.6853503184713375,
"repo_name": "kubeflow/pipelines",
"id": "43d44adfdbd83305ffe58a4c3adcfe828d291cbd",
"size": "4... |
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response
from nssrc.com.citrix.netscaler.nitro.service.options import options
from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_... | {
"content_hash": "04cdaf170d084c5e7844aba457923d73",
"timestamp": "",
"source": "github",
"line_count": 138,
"max_line_length": 129,
"avg_line_length": 29.869565217391305,
"alnum_prop": 0.7195536147501213,
"repo_name": "mahabs/nitro",
"id": "3a2102aa7ac9f053c0ba26c081e83aabd2ed6401",
"size": "4736"... |
"""
WSGI config for agent project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTIN... | {
"content_hash": "0d6c69a461a62faa0acbc59ef4c129f1",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 78,
"avg_line_length": 24.25,
"alnum_prop": 0.7680412371134021,
"repo_name": "kinnevo/kic_alone",
"id": "004b0b544ffddb09b5d32af4735baca9a208b11c",
"size": "388",
"binary... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
from caffe2.python import core
from caffe2.python.test_util import rand_array
import caffe2.python.hypothesis_test_util as hu
from hypothesis import giv... | {
"content_hash": "33aaf9aa2486e2fca77ae67e07fe6699",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 83,
"avg_line_length": 39.45679012345679,
"alnum_prop": 0.5472465581977471,
"repo_name": "xzturn/caffe2",
"id": "38dfdf3764ab29d74ad9004fdf341ba2cb068e9e",
"size": "3196",
... |
from django.contrib import admin
from models import Source, Feed, Entry, MetaData
class FeedAdmin(admin.ModelAdmin):
#prepopulated_fields = {"slug": ("title",)}
pass
class EntryAdmin(admin.ModelAdmin):
#date_hierarchy = 'date'
list_display = ('title', 'feed')
search_fields = ['title', 'description... | {
"content_hash": "1a98e49e7efb3af2e6c0508a9a85a02d",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 48,
"avg_line_length": 28.625,
"alnum_prop": 0.7248908296943232,
"repo_name": "florentin/django-niftyurls",
"id": "65b796f8f73d5b13df0492c7d09573b6d4a5395f",
"size": "458",... |
import asyncio
import time
def callback(n, loop):
print('callback {} invoked at {}'.format(n, loop.time()))
async def main(loop):
now = loop.time()
print('clock time: {}'.format(time.time()))
print('loop time: {}'.format(now))
print('registering callbacks')
loop.call_at(now + 0.2, callback... | {
"content_hash": "f0d011725689d826d1d4d156c1fb5b55",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 61,
"avg_line_length": 22.75,
"alnum_prop": 0.6436420722135008,
"repo_name": "scotthuang1989/Python-3-Module-of-the-Week",
"id": "72db460b7766e9087080f17dbaf5a71255454a89",
... |
"""Global constants and classes for LogicInference dataset generation.
"""
import dataclasses
from typing import Any, List
# Global variables:
NEXT_RENAME_INDEX = 1
PROPOSITION_NAMES = ["p", "q", "r", "s", "t", "u", "w"]
FUNCTOR_NAMES = ["P", "Q", "R", "S", "T", "U", "W"]
CONSTANT_NAMES = ["a", "b", "c", "d", "e", ... | {
"content_hash": "5bf662e61dd715a8abe877ebf5b6afa8",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 80,
"avg_line_length": 33.58024691358025,
"alnum_prop": 0.6970588235294117,
"repo_name": "google-research/google-research",
"id": "3452b6487b451352f5547415a6f6641c9c8b8f63",
... |
"Supporting objects and functions to convert Matplotlib objects into Bokeh."
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.t... | {
"content_hash": "36b748ee192776e1110f4c0fed90e179",
"timestamp": "",
"source": "github",
"line_count": 452,
"max_line_length": 107,
"avg_line_length": 41.04203539823009,
"alnum_prop": 0.5792679639911595,
"repo_name": "canavandl/bokeh",
"id": "a915d211f224709a07b5edcd247fe41518bc8dac",
"size": "185... |
from ._core import Insn
from .basic import *
from .control_flow import *
from .events import *
from .execute import *
from .func_prop import *
from .nbt import *
from .score import *
from .text import *
from .type_ctors import *
| {
"content_hash": "244a4bd0ca5a25053cc0682a621d745a",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 27,
"avg_line_length": 20.90909090909091,
"alnum_prop": 0.7217391304347827,
"repo_name": "simon816/Command-Block-Assembly",
"id": "47a6196b6655346c1f2070f84b68a5e46008c9c1",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.