text
stringlengths
4
1.02M
meta
dict
import re import sys from collections import defaultdict from datetime import datetime from json import loads from urllib.request import urlopen from django.conf import settings from django.core.management.base import BaseCommand from django.core.validators import URLValidator, ValidationError from django.core.except...
{ "content_hash": "a72c361be6891317954dfe0e99a8a676", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 92, "avg_line_length": 33.459119496855344, "alnum_prop": 0.5951127819548873, "repo_name": "WebCampZg/conference-web", "id": "2f4a80e276b7afa9af0f027fe708780386502128", "si...
""" lib.enthought.logger.agent """
{ "content_hash": "c36e20d10c25be49fc8a3164b6c569fc", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 26, "avg_line_length": 11.666666666666666, "alnum_prop": 0.6571428571428571, "repo_name": "enthought/etsproxy", "id": "985b4f53b0da3419885c71410f3a31e12ea565e3", "size": "35...
import unittest class Test_get_metadata(unittest.TestCase): def _callFUT(self, path, metadata_version=None): from pkginfo.utils import get_metadata if metadata_version is not None: return get_metadata(path, metadata_version) return get_metadata(path) def _checkMyPackage(se...
{ "content_hash": "27a74c5b4ad504c2d48f5110c0c669da", "timestamp": "", "source": "github", "line_count": 176, "max_line_length": 71, "avg_line_length": 38.83522727272727, "alnum_prop": 0.6027798098024872, "repo_name": "tnkteja/myhelp", "id": "bd6f74aa55b526b4e2421609df55d4c0987e373b", "size": "6835"...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alter_user_username_max_length'), ] operations = [ migrations.CreateModel( name='Profile', ...
{ "content_hash": "30543fdb76b6ed1b0a6169b60c16a396", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 266, "avg_line_length": 53.65, "alnum_prop": 0.603448275862069, "repo_name": "martinstastny/django-simplestore", "id": "d6fcedcddc4fc3d0607375b06160b3149aba802d", "size": "...
from com.ericsson.xn.x.fm.FmCommons.NotifFunc import check_notify_accuracy from com.ericsson.xn.commons.caseutils import pre_test_case,post_test_case import os root_dir = os.path.normpath(os.path.dirname(os.path.abspath(__file__))).split('com' + os.sep + 'ericsson' + os.sep + 'xn' + os.sep + 'x' + os.sep + 'fm' +...
{ "content_hash": "fd9f868b72a0de2d8b432171f4920192", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 179, "avg_line_length": 61.285714285714285, "alnum_prop": 0.6538461538461539, "repo_name": "lowitty/selenium", "id": "e620a2dffd60faac3519a2a5f767fcf56bf6c1fb", "size": "85...
""" Includes the help page of the program having information about the different flags and options. Most importantly includes examples of how the different flags are going to be used. This page is going to be implemented iteratively i.e when a new feature is implemented this page is updated to include info about it. "...
{ "content_hash": "6f141721232bf50facb2cffa1ed6d992", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 126, "avg_line_length": 76.75454545454545, "alnum_prop": 0.4939002724150184, "repo_name": "jkatsioloudes/Who-Dis", "id": "945731fd1895d4e4839b15d3c17a0d168235fed1", "size"...
from django import VERSION if VERSION[0:2]>(1,3): from django.conf.urls import patterns, url else: from django.conf.urls.defaults import patterns, url from views import UploadFile,ImageManager,RemoteCatchImage,SearchMovie,scrawlUp urlpatterns = patterns('', url(r'^ImageUp/(?P<uploadpath>.*)',Uplo...
{ "content_hash": "624e6ce3ff4359877432b378f2595054", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 79, "avg_line_length": 40.625, "alnum_prop": 0.68, "repo_name": "cbingos/hongmafund", "id": "66ac7d587f4508f5f5b3a3e234d5c8f9930e4914", "size": "665", "binary": false, ...
import time import json import pprint import hashlib import struct import re import base64 import httplib import sys from multiprocessing import Process ERR_SLEEP = 15 MAX_NONCE = 1000000L settings = {} pp = pprint.PrettyPrinter(indent=4) class sherlockholmescoinRPC: OBJID = 1 def __init__(self, host, port, usern...
{ "content_hash": "682b27aea06ec790a326f506831882d9", "timestamp": "", "source": "github", "line_count": 245, "max_line_length": 84, "avg_line_length": 25.50204081632653, "alnum_prop": 0.6464468629961587, "repo_name": "brishtiteveja/sherlockholmescoin", "id": "e8bc3050f0d05d0aed6e87c24eaea2cbdf45231c"...
import unittest from testbin import TestBin class TestBinDc(TestBin, unittest.TestCase): def setUp(self): self.bin = 'testdc' def tearDown(self): pass
{ "content_hash": "7f8a69dc71a163f61c6f91919238829d", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 44, "avg_line_length": 17.8, "alnum_prop": 0.6685393258426966, "repo_name": "ow2-compatibleone/accords-platform", "id": "e048426c1712761e42a1fe194c89632526344410", "size": ...
class Destination: """ The Destination class can be seen as a simple structure which holds a IP or Domain address and port. Address and port combinations are often delivered in as tulpe or array, but a Destination object is are clearer way to represent de address/port combination. The Destin...
{ "content_hash": "589a2a06742b28be4fb34cb862d69594", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 110, "avg_line_length": 30.609756097560975, "alnum_prop": 0.5784860557768924, "repo_name": "Valentijn1995/Kn0ckKn0ck", "id": "7b0762a1c52c536f1d4c2d5d5483d863b869e3ba", "si...
import scout import sys scout.ScoutCore.load_all_modules() def suppress_keyboard_interrupt_message(): old_excepthook = sys.excepthook def new_hook(type, value, traceback): if type != KeyboardInterrupt: old_excepthook(type, value, traceback) else: pass sys.excepth...
{ "content_hash": "45acff04be7a339bb8d2e330b84d7f1b", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 50, "avg_line_length": 18.766666666666666, "alnum_prop": 0.6252220248667851, "repo_name": "openSUSE/scout", "id": "5b669f273d329a35d536d0218240d4938d71b30d", "size": "673",...
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.simulation_parameters import ZoneAirHeatBalanceAlgorithm log = logging.getLogger(__name__) class TestZoneAirHeatBalanceAlgorithm(unittest.TestCase): def setUp(self): ...
{ "content_hash": "76ef0628134b8f1fb535e46f3dfb29b9", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 87, "avg_line_length": 26.210526315789473, "alnum_prop": 0.6807228915662651, "repo_name": "rbuffat/pyidf", "id": "7acebe539bbcb1a770266204e70d8834f88bfe6b", "size": "996", ...
""" Tests for L{twisted.internet.protocol}. """ from __future__ import division, absolute_import from zope.interface.verify import verifyObject from zope.interface import implementer from twisted.python.failure import Failure from twisted.internet.interfaces import (IProtocol, ILoggingContext, ...
{ "content_hash": "7b91961e3136f0901ca975c9c51fbba1", "timestamp": "", "source": "github", "line_count": 454, "max_line_length": 96, "avg_line_length": 35.62114537444934, "alnum_prop": 0.6406134058867178, "repo_name": "biddisco/VTK", "id": "8d7108b16cfa1bf23996375fc66252f7226af555", "size": "16245",...
import datetime import json import re from six.moves import urllib import httmock import requests import six from girder.constants import SettingKey from girder.exceptions import ValidationException from girder.models.setting import Setting from girder.models.token import Token from girder.models.user import User fro...
{ "content_hash": "d96014cd3ad9a52592cc65a842b8c39e", "timestamp": "", "source": "github", "line_count": 1473, "max_line_length": 99, "avg_line_length": 41.372708757637476, "alnum_prop": 0.4655410062026189, "repo_name": "kotfic/girder", "id": "2942561151d5ac883cbb8f8e3f2e0b0f69a3be9f", "size": "6173...
"""Tests for the engine utils module """ from builtins import range import os from copy import deepcopy from tempfile import mkdtemp from shutil import rmtree from ....testing import (assert_equal, assert_true, assert_false) from ... import engine as pe from ....interfaces import base as nib from ....interfaces impor...
{ "content_hash": "e171c7845e05211eee097d4d93bf751c", "timestamp": "", "source": "github", "line_count": 343, "max_line_length": 129, "avg_line_length": 39.816326530612244, "alnum_prop": 0.47719118400820093, "repo_name": "FCP-INDI/nipype", "id": "8420f587c2e7b42184de2a776df07d8802fc1350", "size": "1...
import os from app import create_app, db from app.models import User, Follow, Role, Permission, Post, Comment, Category from flask_script import Manager, Shell from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, db) ...
{ "content_hash": "a0b26a8c99789fb7e10b47741ef6d099", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 85, "avg_line_length": 31.80851063829787, "alnum_prop": 0.6963210702341137, "repo_name": "ACLeiChen/personalBlog", "id": "54a6fb54afb7551397607887d4b4649eafd895e4", "size":...
import unittest import scores_messages class ScoresMessagesTest(unittest.TestCase): def testSanityMessages(self): """Just verify there are no syntax errors in the protocol definitions.""" scores_messages.GamesRequest() scores_messages.GamesResponse() scores_messages.GameInfoRequest() scores_mes...
{ "content_hash": "cbe4e8c9d24771835fcd550f363da150", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 77, "avg_line_length": 28.75, "alnum_prop": 0.7710144927536232, "repo_name": "martincochran/score-minion", "id": "ea6aa32e114eadf4fe8c5f226769c686d676eab5", "size": "948", ...
from holoviews.element import RGB, Tiles, Points, Bounds from holoviews.element.tiles import StamenTerrain, _ATTRIBUTIONS from .test_plot import TestPlotlyPlot, plotly_renderer import numpy as np class TestMapboxTilesPlot(TestPlotlyPlot): def setUp(self): super().setUp() # Precompute coordinates ...
{ "content_hash": "311e984c898991d7ba62becb339a8793", "timestamp": "", "source": "github", "line_count": 213, "max_line_length": 102, "avg_line_length": 38.91079812206573, "alnum_prop": 0.5936293436293436, "repo_name": "ioam/holoviews", "id": "bcd294cd0c33de4c2f3a33db8c136a7a3f76a532", "size": "8288...
from pprint import pprint import articlequality from revscoring import Model scorer_model = Model.load(open('../revscoring_models/enwiki.nettrom_wp10.gradient_boosting.model', 'rb')) # Classifies a revision of an article based on wikitext alone text = "An '''anachronism''' {{cite }}(from the [[Ancient Greek|Greek]] ...
{ "content_hash": "5c83eb305612822163387a8373f42adb", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 105, "avg_line_length": 40.92857142857143, "alnum_prop": 0.7609075043630017, "repo_name": "halfak/wikiclass", "id": "fb9088cbb9cc31ff9ea46fb8e192b34f3cd772d4", "size": "573...
""" This is a bunch of classes to manage cyber record channel extractor. """ import os import struct import sys import cv2 import numpy as np from pypcd import pypcd from modules.tools.sensor_calibration.data_file_object import TimestampFileObject, OdometryFileObject from modules.drivers.proto import conti_radar_pb...
{ "content_hash": "25521693f206332d17f3f8841e8fb035", "timestamp": "", "source": "github", "line_count": 379, "max_line_length": 101, "avg_line_length": 37.0844327176781, "alnum_prop": 0.583920313055852, "repo_name": "ApolloAuto/apollo", "id": "946923533f880d8fccb1a136ba63ef70d12a492c", "size": "148...
import unittest import IECore import Gaffer import GafferScene import GafferSceneTest class FilterQueryTest( GafferSceneTest.SceneTestCase ) : def test( self ) : # /group # /grid # /gridLines # /centerLines # /borderLines # /plane # /sphere grid = GafferScen...
{ "content_hash": "d1f5a15495f3e0a1126d0b1b0e3c63b4", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 118, "avg_line_length": 31.59259259259259, "alnum_prop": 0.6698710433763189, "repo_name": "johnhaddon/gaffer", "id": "d3238b84af2a63baea6571aec6734cda96365a6b", "size": "6...
from parsers import TParsersBundle from ling_utils import TTokenMatch from ling_utils import CASE_UPPER, CASE_TITLE, CASE_LOWER from ling_utils import span_tokenize_windows1251, unify_word from segments_index import TSegmentIndexReader from crawler import * from collections import namedtuple import pickle import os i...
{ "content_hash": "0f94edca50a193717691813a579389b0", "timestamp": "", "source": "github", "line_count": 283, "max_line_length": 150, "avg_line_length": 38.34628975265018, "alnum_prop": 0.5342793955031331, "repo_name": "mavlyutovrus/light_search", "id": "07c7423fa0d48391c7cbc99bf0d665de4f34a66b", "s...
import gameoflife if __name__ == "__main__": app = gameoflife.App() app.mainloop()
{ "content_hash": "15f0e8d98a7ce613fc1ea49d5ddcd215", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 26, "avg_line_length": 15.333333333333334, "alnum_prop": 0.5760869565217391, "repo_name": "deaz/game-of-life", "id": "efe61071028163fdd0b9480ee17b8a98ac50a1d1", "size": "116...
from datetime import datetime from unittest import TestCase from poll.models import Poll, Response from django.contrib.auth.models import User from rapidsms.models import Contact, Backend, Connection from rapidsms_httprouter.router import get_router from dateutil.relativedelta import relativedelta class TestPolls(Test...
{ "content_hash": "d79e240ef74f2c842d5b4ce5396f48d4", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 152, "avg_line_length": 42.204819277108435, "alnum_prop": 0.6834142163859549, "repo_name": "unicefuganda/edtrac", "id": "3e4f302fa00dfa838c93cbdaa3ac3aeb709648a9", "size": ...
import sys sys.stdout.write("qwert\nyuiop...")
{ "content_hash": "b27bbabddabc241cb4a266457d704e2e", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 35, "avg_line_length": 12.25, "alnum_prop": 0.6938775510204082, "repo_name": "val-labs/xed", "id": "4a9fa648ee905fcc7011efb5d813bb88f38d8b88", "size": "49", "binary": fals...
import abc from functools import wraps from oslo_config import cfg from oslo_log import log as logging import oslo_messaging as messaging from oslo_messaging.exceptions import MessagingTimeout from oslo_messaging.rpc import client from stevedore import driver from mistral import exceptions as exc LOG = logging.getL...
{ "content_hash": "0e36f8fce231124c6f841b2a774d5d3d", "timestamp": "", "source": "github", "line_count": 186, "max_line_length": 79, "avg_line_length": 28.951612903225808, "alnum_prop": 0.6380687093779016, "repo_name": "openstack/mistral", "id": "828a49d7c4b4700c44cf1adec7add6e37cc47b39", "size": "6...
import unittest from streamlink.plugins.lrt import LRT class TestPluginLRT(unittest.TestCase): def test_can_handle_url(self): should_match = [ "https://www.lrt.lt/mediateka/tiesiogiai/lrt-televizija", "https://www.lrt.lt/mediateka/tiesiogiai/lrt-kultura", "https://www....
{ "content_hash": "7c3ba8dc5b4c3ac63836a54f036db850", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 162, "avg_line_length": 36.291666666666664, "alnum_prop": 0.6394948335246843, "repo_name": "back-to/streamlink", "id": "c7d4476c6e81de868f255ed71ae1c008ccebceea", "size": "...
import unittest from amara.lib import testsupport from amara.bindery import parse from amara import tree from xml.dom import Node import os import tempfile MONTY_XML = """<monty> <python spam="eggs">What do you mean "bleh"</python> <python ministry="abuse">But I was looking for argument</python> </monty>""" SILLY...
{ "content_hash": "e81dd6749b3cd757c940a1dad682e9b2", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 78, "avg_line_length": 32.550561797752806, "alnum_prop": 0.5999309630652399, "repo_name": "zepheira/amara", "id": "e49fdf90cd2675a99fe26c420d4c70454586dc47", "size": "2923"...
"""Audit model.""" from ggrc import db from ggrc.models.deferred import deferred from ggrc.models.mixins import ( Timeboxed, Noted, Described, Hyperlinked, WithContact, Titled, Slugged, CustomAttributable ) from ggrc.models.mixins import clonable from ggrc.models.relationship import Relatable from ggrc.models...
{ "content_hash": "79fcece37be12082ccdf57472d313354", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 78, "avg_line_length": 30.984924623115578, "alnum_prop": 0.6490431397988972, "repo_name": "josthkko/ggrc-core", "id": "8eab0015b20d187d9ba54d26a6b840a6be26e590", "size": "...
"""The AirNow integration.""" import datetime import logging from aiohttp.client_exceptions import ClientConnectorError from pyairnow import WebServiceAPI from pyairnow.conv import aqi_to_concentration from pyairnow.errors import AirNowError from homeassistant.config_entries import ConfigEntry from homeassistant.cons...
{ "content_hash": "63cc4092b6f077afb8ac1f614f4cf257", "timestamp": "", "source": "github", "line_count": 149, "max_line_length": 88, "avg_line_length": 32.4496644295302, "alnum_prop": 0.647569803516029, "repo_name": "nkgilley/home-assistant", "id": "7c26cded4deaf87d2f306b4df285e7a67fcc76d9", "size":...
from datetime import datetime, timedelta from django.core.management.base import BaseCommand from wagtailstreamforms.models import FormSubmission class Command(BaseCommand): help = "Deletes form submissions older than the provided number of days" def add_arguments(self, parser): parser.add_argument...
{ "content_hash": "95078f770c0c63b2e6e143e946af8ae9", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 76, "avg_line_length": 29, "alnum_prop": 0.6518353726362626, "repo_name": "AccentDesign/wagtailstreamforms", "id": "3d778c995900fdfe386f6819c7554874769cabc1", "size": "899"...
import sys import traceback try: from django.conf import settings from pymysql import install_as_MySQLdb install_as_MySQLdb() settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", ...
{ "content_hash": "9759907db22cb4db6556065632769c66", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 93, "avg_line_length": 22.105263157894736, "alnum_prop": 0.5507936507936508, "repo_name": "ulope/django-watchman", "id": "f9143a809f3790dd3959e1e102bb79193cad31ec", "size":...
./rpm_server.py --port 1234 --output-dir /tmp --create-repo ls
{ "content_hash": "c9725c70bd02f3701e3ad47ef2a0699c", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 62, "avg_line_length": 63, "alnum_prop": 0.6825396825396826, "repo_name": "Guavus/rpm-uploader", "id": "272863d2380259aff20995734ba8e791093cc3f0", "size": "73", "binary": ...
from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse from common.templates import render_template def list(request): # TODO: implement pass def register(request): if 'username' in request.POST: User.objects.cr...
{ "content_hash": "e3f60ac095d5722bd8ddcba52827072c", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 81, "avg_line_length": 33.6078431372549, "alnum_prop": 0.6067677946324388, "repo_name": "ProgVal/ProgVal.42", "id": "6875867aa81b3eeb595b48534c2214f9c111ef88", "size": "171...
from django.utils.translation import ugettext_lazy as _ from livesettings import * from tax.config import TAX_MODULE TAX_MODULE.add_choice(('tax.modules.percent', _('Percent Tax'))) TAX_GROUP = config_get_group('TAX') config_register( DecimalValue(TAX_GROUP, 'PERCENT', description=_("Percent tax")...
{ "content_hash": "be1724376b5667e7882102d1aced1bc1", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 64, "avg_line_length": 26.5, "alnum_prop": 0.6540880503144654, "repo_name": "jordotech/satchmofork", "id": "2ba93d53162f8ad3e4ed90914b9e236d51c44ae5", "size": "636", "bin...
import os import commands def pilot_killer(): user=os.getenv('USER') sandbox = os.listdir('/home/%s/radical.pilot.sandbox/'%user) for folder in sandbox: if folder.startswith('rp.'): bootstrapper3_file=open('/home/%s/radical.pilot.sandbox/%s/agent_0.bootstrap_3.log'%(user,folder),'r') ...
{ "content_hash": "1cf9e91d390c12b8dc238888664a0eb7", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 114, "avg_line_length": 28.217391304347824, "alnum_prop": 0.5947611710323575, "repo_name": "radical-cybertools/supercomputing2015-tutorial", "id": "0124c1c6a3a4490ded099e8e51...
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from shop.models import order class Order(order.BaseOrder): """Default materialized model for Order""" shipping_address_text = models.TextField(_("Shipping address"), blank=True, null=T...
{ "content_hash": "65127baa6f6bfcc49cecc2c34c1d2764", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 90, "avg_line_length": 42.80952380952381, "alnum_prop": 0.699666295884316, "repo_name": "schacki/django-shop", "id": "23be23a758a6427219fe141d9d2f7b9ad4a06648", "size": "92...
import math import os import string import sys from pysqlite2 import dbapi2 as sqlite from scipy.ndimage import gaussian_filter # My own modules import main import fits import gildas import astrolyze.functions.constants as const class MiriadMap(main.Map): def __init__(self, map_name): r""" Ca...
{ "content_hash": "9241a95aece59db5b41fbfc3bfb51a73", "timestamp": "", "source": "github", "line_count": 379, "max_line_length": 79, "avg_line_length": 36.54089709762533, "alnum_prop": 0.47671312008087224, "repo_name": "buchbend/astrolyze", "id": "cea5c090f8231467e40c0bee23f2c433cd844aa1", "size": "...
import numpy as np from netcdf import netcdf as nc import logging from models.core import cuda, SourceModule from cpu import CPUStrategy import itertools import math with open('models/kernel.cu') as f: mod_sourcecode = SourceModule(f.read()) def gpu_exec(func_name, results, *matrixs): func = mod_sourcecode....
{ "content_hash": "32c45db9c0c1bff9e6835d2a73a2a240", "timestamp": "", "source": "github", "line_count": 141, "max_line_length": 82, "avg_line_length": 38.04255319148936, "alnum_prop": 0.5326249067859806, "repo_name": "ahMarrone/solar_radiation_model", "id": "61881e333bcd48d078e4f5400e82e7cea4e72d7f",...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Fisher'] , ['ConstantTrend'] , ['Seasonal_MonthOfYear'] , ['MLP'] );
{ "content_hash": "d4ee9a97473f99d1a42ece78de6b7048", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 91, "avg_line_length": 41, "alnum_prop": 0.7195121951219512, "repo_name": "antoinecarme/pyaf", "id": "b0034c6f214349217d3bfbaf591a1faca8f75e55", "size": "164", "binary": f...
from precog import * from pytest import config from base64 import urlsafe_b64encode import sys def setup_module(m): ROOTKEY = config.getvalue('apiKey') HOST = config.getvalue('host') PORT = config.getvalue('port') m.TestEverything.root = Precog(ROOTKEY, None, None, host=HOST, port=PORT) accountid...
{ "content_hash": "d6630dce3ef5898d7633152b7b9e2c99", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 105, "avg_line_length": 34.91489361702128, "alnum_prop": 0.5865326020719074, "repo_name": "precog/precog_python_client", "id": "e87fa2bb0a056bd5c4f3a3ef73f2e1d95933a0fb", "...
import pandas as pa class Benchmark: def __init__(self, name, unit, less_is_better, values, stats=None): self.name = name self.unit = unit self.less_is_better = less_is_better self.values = pa.Series(values) self.statistics = self.values.describe() @property def va...
{ "content_hash": "7b216f1848e6135b117b1aa3432818c9", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 71, "avg_line_length": 26.75862068965517, "alnum_prop": 0.6082474226804123, "repo_name": "majetideepak/arrow", "id": "83bc2735dd91841686398815d1a42e6885a34432", "size": "15...
import os import sys settings_module = os.environ.get('SDCURSES_SETTINGS') if settings_module: import importlib settings = importlib.import_module(settings_module) else: from . import defaults as settings this_module = sys.modules[__name__] for (key, value) in settings.__dict__.iteritems(): setattr(t...
{ "content_hash": "704ef86764b246fb74172079a9e139f4", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 55, "avg_line_length": 25.523809523809526, "alnum_prop": 0.707089552238806, "repo_name": "glassresistor/sdcurses", "id": "729ba6ed506fc0ee4a5270ba9790a6e2c688850a", "size":...
from gitlabform.gitlab.core import NotFoundException, InvalidParametersException from gitlabform.gitlab.groups import GitLabGroups class GitLabGroupLDAPLinks(GitLabGroups): def get_ldap_group_links(self, group): group_id = self.get_group_id_case_insensitive(group) return self._make_requests_to_api...
{ "content_hash": "57a5a0701ae2d305591680fd5a387a9c", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 99, "avg_line_length": 36.09090909090909, "alnum_prop": 0.5869017632241813, "repo_name": "egnyte/gitlabform", "id": "aec0f824fd0a9a72598317db03a03deb81d15dae", "size": "158...
import optparse import os import sys from telemetry.core import util from telemetry.results import buildbot_output_formatter from telemetry.results import chart_json_output_formatter from telemetry.results import csv_output_formatter from telemetry.results import csv_pivot_table_output_formatter from telemetry.results...
{ "content_hash": "86d10c9a10360814f3b66c5ba05506a8", "timestamp": "", "source": "github", "line_count": 167, "max_line_length": 80, "avg_line_length": 44.293413173652695, "alnum_prop": 0.6736514803298634, "repo_name": "sgraham/nope", "id": "5b70ad726667ac0d69c17c83400a7fc67d9ea36b", "size": "7560",...
import os import webapp2 as webapp from google.appengine.api import users from google.appengine.api import images from google.appengine.api import memcache from google.appengine.ext import blobstore import datetime import json import handlers import model.blog import model.doc import ctrl.blog class AdminPage(handl...
{ "content_hash": "30d6434500db0c1079d756d730c81f53", "timestamp": "", "source": "github", "line_count": 137, "max_line_length": 100, "avg_line_length": 29.43065693430657, "alnum_prop": 0.6264880952380952, "repo_name": "jife94/wwmmo", "id": "eeca573042387326b73261fdba7f47f790aab8e8", "size": "4033",...
import time import collections import grpc from . import fl_logging as logging class LocalServicerContext(grpc.ServicerContext): def invocation_metadata(self): return () def peer(self): return "local" def peer_identities(self): return None def peer_identity_key(self): ...
{ "content_hash": "ed44905b94e2e4e0bde801ad44032c44", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 79, "avg_line_length": 33.203821656050955, "alnum_prop": 0.6249760214847496, "repo_name": "bytedance/fedlearner", "id": "c32d511d76a75f337edd7a6b11f184a4a91c604f", "size":...
from Tkinter import * import Pmw class YasaraControl(Frame): """A yasara controller for comparison use""" def __init__(self, parent, yasara): Frame.__init__(self, parent, height=200,width=160) self.yasara = yasara c=Button(self,text='Align', command=self.align) ...
{ "content_hash": "d954fb106a6fd7fd46ba88a477049169", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 66, "avg_line_length": 32, "alnum_prop": 0.50390625, "repo_name": "dmnfarrell/peat", "id": "327eacc11ed91ba1b97427f18fc672b9966c6ebd", "size": "1231", "binary": false, ...
from __future__ import print_function import aaf import aaf.mob import aaf.define import aaf.iterator import aaf.dictionary import aaf.storage import aaf.component import unittest import os cur_dir = os.path.dirname(os.path.abspath(__file__)) sandbox = os.path.join(cur_dir,'sandbox') if not os.path.exists(sandbox): ...
{ "content_hash": "a3690eb81b54247dd15f88e9190f29f7", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 80, "avg_line_length": 27.6, "alnum_prop": 0.6751207729468599, "repo_name": "markreidvfx/pyaaf", "id": "6a9d87caba4a349602cafb977cd1939288a0f977", "size": "828", "binary"...
import time import telnetlib import logging from threading import Lock from .defines import * __version__ = "0.1" __license__ = "BSD 3-Clause" __copyright__ = "Copyright 2011, Andrew Williams" __author__ = "Andrew Williams, Krzysztof Jagiello" class ConnectionError(Exception): def __init__(self, ip, port): ...
{ "content_hash": "b97cc749bd80d8386214c46fa0b0fb68", "timestamp": "", "source": "github", "line_count": 383, "max_line_length": 119, "avg_line_length": 28.245430809399476, "alnum_prop": 0.533092993159549, "repo_name": "DownGoat/ts3_watcher", "id": "e1df9d067d35adf713b8d87e54daabe63c8b6f53", "size":...
""" quilt nose tests project : quilt version : 0.1.1 status : development modifydate : 2015-05-13 07:09:00 -0700 createdate : 2015-04-28 07:23:00 -0700 website : https://github.com/tmthydvnprt/quilt author : tmthydvnprt email : tmthydvnprt@users.noreply.github.com maintainer : tmthydvnprt license...
{ "content_hash": "203779652a902ec4f09938c81ec6cb3d", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 49, "avg_line_length": 21.210526315789473, "alnum_prop": 0.674937965260546, "repo_name": "tmthydvnprt/quilt", "id": "f08cf46ed2f97aba38bc740e501cbfee9583865d", "size": "403...
"""The main engine of every compiler engine pipeline, called MainEngine.""" import atexit import sys import traceback import weakref from projectq.backends import Simulator from projectq.ops import Command, FlushGate from projectq.types import WeakQubitRef from ._basicmapper import BasicMapperEngine from ._basics im...
{ "content_hash": "024831e2055f31f212f5bd1bea29a344", "timestamp": "", "source": "github", "line_count": 312, "max_line_length": 118, "avg_line_length": 40.20192307692308, "alnum_prop": 0.5951526747986925, "repo_name": "ProjectQ-Framework/ProjectQ", "id": "87ec1b3d3eab2a710e9679e3b8b77c8dba58b3f5", ...
__doc__='' __version__=''' $Id$ ''' #REPORTLAB_TEST_SCRIPT import sys from reportlab.platypus import * from reportlab.lib.styles import getSampleStyleSheet from reportlab.rl_config import defaultPageSize PAGE_HEIGHT=defaultPageSize[1] styles = getSampleStyleSheet() Title = "Integrating Diverse Data Sources with Gadf...
{ "content_hash": "ade2e0abe63b1911e0d6c91904df53ac", "timestamp": "", "source": "github", "line_count": 900, "max_line_length": 95, "avg_line_length": 36, "alnum_prop": 0.7303703703703703, "repo_name": "makinacorpus/reportlab-ecomobile", "id": "836ed5475f796e2ea75aed2dbe5d7f42db2204c3", "size": "32...
''' Common namespaces Copyright 2012-2020 Codinuum Software Lab <https://codinuum.com> 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 ...
{ "content_hash": "f8fe1024acf108bdd6bcd904c594b136", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 83, "avg_line_length": 33.55833333333333, "alnum_prop": 0.6550782220014899, "repo_name": "codinuum/cca", "id": "7e44d5a650ffc4cd16f5edc8ed6aa670e59bd248", "size": "4051", ...
import os import errno import urlparse import itertools from django.conf import settings from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.core.files import locks, File from django.core.files.move import file_move_safe from django.utils.encoding import force_unicode from django.u...
{ "content_hash": "b07edf451fe5fc95ae6581696c939514", "timestamp": "", "source": "github", "line_count": 244, "max_line_length": 110, "avg_line_length": 36.59016393442623, "alnum_prop": 0.6057347670250897, "repo_name": "350dotorg/Django", "id": "17e694745020ece3144e962cf924e8c3c7003ae1", "size": "89...
import sys def do_start(logger,csp_soap_client,cucm_variable_axl,cspconfigfile): # *------------------------------------------------------------------ # * function do(logger,csp_soap_client,cucm_variable_axl) # * # * Copyright (C) 2016 Carlos Sanz <carlos.sanzpenas@gmail.com> # * # * This prog...
{ "content_hash": "58119bdee3f295b91199f576310f57b2", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 88, "avg_line_length": 46.25, "alnum_prop": 0.609009009009009, "repo_name": "sanzcarlos/CiscoCollab", "id": "a626d0b43db19a652247a76deb07a94c4958e729", "size": "4386", "b...
import datetime as dt import enum import sqlalchemy as sa from . import app, db meta = sa.MetaData() Category = sa.Table( 'category', meta, sa.Column('id', sa.Integer, primary_key=True), sa.Column('name', sa.String(255), nullable=False), ) class Statuses(enum.Enum): available = 'available' pend...
{ "content_hash": "1bbae5ad84cf2cfb75dce3972b99d404", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 75, "avg_line_length": 23.97142857142857, "alnum_prop": 0.66626936829559, "repo_name": "klen/muffin-rest", "id": "4551d50a9ba74adb2651de86c75033abcb53765a", "size": "839", ...
from solpy import irradiation from caelum import eere # import eree import datetime def yearly_total_irr(place, az, tr): #, interval=30, ccd=None """Function which estimates the total irradiation. Input: location (lat, lon), az (azimuth in degrees, south is at 180 degrees), tr (tilt of the roof in degr...
{ "content_hash": "b1685bc2a75fdc94f1501b1c46d42719", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 144, "avg_line_length": 43.532467532467535, "alnum_prop": 0.5492243436754176, "repo_name": "gijs/Solar3Dcity", "id": "eda44a9ab7eb9ba88ed80dd18beeca6cc4ecffc8", "size": "46...
from tempest.api.compute import base from tempest import test class ServerPasswordTestJSON(base.BaseV2ComputeTest): @classmethod def setUpClass(cls): super(ServerPasswordTestJSON, cls).setUpClass() cls.client = cls.servers_client resp, cls.server = cls.create_test_server(wait_until="A...
{ "content_hash": "e5f9d3a8736af9c5269c76f58bd18123", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 70, "avg_line_length": 30.64, "alnum_prop": 0.6932114882506527, "repo_name": "Mirantis/tempest", "id": "50c881a26dd5de5c2a8b957a2de5113e6060f962", "size": "1398", "binary...
import sys import pycurl class Test: def __init__(self): self.contents = '' def body_callback(self, buf): self.contents = self.contents + buf sys.stderr.write("Testing %s\n" % pycurl.version) t = Test() c = pycurl.Curl() c.setopt(c.URL, 'http://curl.haxx.se/dev/') c.setopt(c.WRITEFUNCTION, t...
{ "content_hash": "e5e52c912fa7541bcd5450a59378db1e", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 49, "avg_line_length": 18.85, "alnum_prop": 0.6472148541114059, "repo_name": "cloudaice/simple-data", "id": "44060af9de0bd98900a6b184a66a346d139ff6ed", "size": "450", "bi...
import hashlib import json import os import unicodedata import uuid from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.dispatch import receiver from django.template.defaultfilters import slugify from django.utils.encoding import smart_str import comm...
{ "content_hash": "783d17ab35de19ddd7a74fe2e96037bc", "timestamp": "", "source": "github", "line_count": 346, "max_line_length": 79, "avg_line_length": 35.005780346820806, "alnum_prop": 0.6115422721268163, "repo_name": "washort/zamboni", "id": "e88941458b5da8a631188951f71759b24a93689e", "size": "121...
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "bluclobber", version = "0.0.1", author = "James Hetherington", author_email = "j.hetherington@ucl.ac.uk", description = ("Harness for cluster map/reduce ana...
{ "content_hash": "e3fde5d774372b509be833184c711826", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 83, "avg_line_length": 31.482758620689655, "alnum_prop": 0.6111719605695509, "repo_name": "UCL-dataspring/cluster-code", "id": "9bb86454e0b1c81435c9f8d91443ab63b1a2345c", "...
courses = { 'feb2012': { 'cs101': {'name': 'Building a Search Engine', 'teacher': 'Dave', 'assistant': 'Peter C.'}, 'cs373': {'name': 'Programming a Robotic Car', 'teacher': 'Sebastian', 'ass...
{ "content_hash": "f2e617805068150be0838d048df5823e", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 84, "avg_line_length": 39.98412698412698, "alnum_prop": 0.48352520841603813, "repo_name": "xala3pa/Computer-Science-cs101", "id": "7a297d4ab2b9ff21f63062ec50935409e2e61e9c", ...
import pickle from autobahn.websocket.protocol import WebSocketProtocol class Case: FAILED = "FAILED" OK = "OK" NON_STRICT = "NON-STRICT" WRONG_CODE = "WRONG CODE" UNCLEAN = "UNCLEAN" FAILED_BY_CLIENT = "FAILED BY CLIENT" INFORMATIONAL = "INFORMATIONAL" UNIMPLEMENTED = "UNIMP...
{ "content_hash": "e505033d54ddf5589a1aac24e33de5e5", "timestamp": "", "source": "github", "line_count": 123, "max_line_length": 161, "avg_line_length": 36.80487804878049, "alnum_prop": 0.643914292025624, "repo_name": "tavendo/AutobahnTestSuite", "id": "9bebae0b4c941a6cb6ea0c1ca31ca8cdd85d111e", "si...
"""Tests for rpi_power config flow.""" from unittest.mock import MagicMock from homeassistant.components.rpi_power.const import DOMAIN from homeassistant.config_entries import SOURCE_USER from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResultType from tests.common import pat...
{ "content_hash": "dc2b9275d5e4ef0118d05fba4bcd480d", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 86, "avg_line_length": 35.8, "alnum_prop": 0.681098696461825, "repo_name": "nkgilley/home-assistant", "id": "5c474fc0821e0b64a83a9c99dcde5daf388b650c", "size": "2148", "b...
import json import argparse import logging import glob # Logging Information logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) formatter = logging.Formatter('%(levelname)s: %(message)s') fh = logging.FileHandler('test_hashes.log') fh.setLevel(logging.DEBUG) fh.setFormatter(formatter) logger.addHand...
{ "content_hash": "852043f70ac1cf1b06dbee298e52e334", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 100, "avg_line_length": 32.81818181818182, "alnum_prop": 0.7022160664819944, "repo_name": "seymour1/label-virusshare", "id": "7c297e239bcacdbda21309c331f3663fdf4cf595", "si...
import os from datetime import datetime from fabric.api import task, local, sudo, put from fabric.contrib import files from jinja2 import Environment, FileSystemLoader from .constants import * __all__ = ['deploy', 'undeploy', 'backup', 'tail', 'reset_log'] @task def tail(grep=""): sudo("tail -F -n +1 {} | gre...
{ "content_hash": "e299717b0c14c9f18adf585649466486", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 92, "avg_line_length": 31.644628099173552, "alnum_prop": 0.5682945938887438, "repo_name": "johnwheeler/flask-live-starter", "id": "752d1ec75d51d20fc12a0a4c17696365b6877e1a",...
""" Second-Hand-Shop Project @author: Malte Gerth @copyright: Copyright (C) 2015 Malte Gerth @license: MIT @maintainer: Malte Gerth @email: mail@malte-gerth.de """ from django.db import models from django.utils.lru_cache import lru_cache from django.utils.translation import ugettext_lazy as _ from secon...
{ "content_hash": "6e572fb9b2f9b8c8edeb1ba9b1b7a405", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 81, "avg_line_length": 28.545454545454547, "alnum_prop": 0.6745222929936305, "repo_name": "JanMalte/secondhandshop_server", "id": "da974278d6f303714bb59cf3ccfae490d7cc71e8", ...
import sys import os import shutil import subprocess import getopt import crypt import pwd from tld import get_tld ######### CONFIGURATION ############ BASE_ROOT='/home' START_USER_NUM=5001 BASE_USER_NAME='web' PHP_FPM_TEMPLATE='/etc/php/7.0/fpm/pool.d/www.conf' USER_PASSWORD='qwertyuioplkjhgfdsazxcvbnm' ############...
{ "content_hash": "7d7e3bb24ab0803413de6f3efb8dc68e", "timestamp": "", "source": "github", "line_count": 612, "max_line_length": 137, "avg_line_length": 40.1062091503268, "alnum_prop": 0.5849256467712365, "repo_name": "matteomattei/servermaintenance", "id": "e8d5c7372342281cf873b6f603544a2589d902b0", ...
""" Linear Discriminant Analysis and Quadratic Discriminant Analysis """ # Authors: Clemens Brunner # Martin Billinger # Matthieu Perrot # Mathieu Blondel # License: BSD 3-Clause import warnings import numpy as np from scipy import linalg from scipy.special import expit from .base import ...
{ "content_hash": "06f8719d6d9e74d344f40e67a3e3748a", "timestamp": "", "source": "github", "line_count": 928, "max_line_length": 79, "avg_line_length": 37.44396551724138, "alnum_prop": 0.5856164383561644, "repo_name": "kevin-intel/scikit-learn", "id": "3cb6cc1712f29af71e9d4daf5eb71959620be5da", "siz...
from penguincomputing import *
{ "content_hash": "7ea7d977c1dec6e604f94116c1f8eb71", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 30, "avg_line_length": 31, "alnum_prop": 0.8387096774193549, "repo_name": "motivator/clusto", "id": "6eeee7bf64adce27b0dfd9e56873cf5dbf890348", "size": "31", "binary": fal...
import sphinx_rtd_theme # -- Project information ----------------------------------------------------- project = 'galgebra' copyright = '2014-2019, Alan Bromborsky and GAlgebra team' author = 'Alan Bromborsky' # -- General configuration --------------------------------------------------- # If your documentation nee...
{ "content_hash": "81604f25c5fd1c0353d6c39f7d8d1853", "timestamp": "", "source": "github", "line_count": 223, "max_line_length": 92, "avg_line_length": 30.408071748878925, "alnum_prop": 0.649166789559062, "repo_name": "arsenovic/galgebra", "id": "b122a89542b1397b4c7ccc71e8caf6eeea6a1287", "size": "7...
class Var(object): def __init__(self, name): super(Var, self).__init__() self.name = name
{ "content_hash": "09d378db9f7f737076503b070cf20e1e", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 35, "avg_line_length": 27.5, "alnum_prop": 0.5181818181818182, "repo_name": "JohnVinyard/featureflow", "id": "a04ac9a866699c9db4065ceee3e2218ff1274326", "size": "111", "bi...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from logins.models import UserProfile class UserForm(forms.ModelForm): """ A form that creates a user, with no privileges, from the given username and password. """ error_m...
{ "content_hash": "78b6ca4e0a8d371e1d8f39fa4607a96e", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 79, "avg_line_length": 35.52173913043478, "alnum_prop": 0.6054671562627499, "repo_name": "adamwen/qdulab", "id": "62a1dcc27363f3c4304c8411899433170430331e", "size": "2451",...
import pandas as pd import pyarrow as pa import vaex df = pd.DataFrame({'col1': range(5)}) table = pa.Table.from_pandas(df) def test_arrow_write_table(tmpdir): path = str(tmpdir.join('test.arrow')) with pa.OSFile(path, 'wb') as sink: with pa.RecordBatchFileWriter(sink, table.schema) as writer: ...
{ "content_hash": "6f861400f7408124ca57bfa9ca86ac0b", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 70, "avg_line_length": 28.96969696969697, "alnum_prop": 0.6537656903765691, "repo_name": "maartenbreddels/vaex", "id": "79279fba895a3b4053ba7b9eb12d3b8dbf234d09", "size": "...
import _plotly_utils.basevalidators class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="histogram", **kwargs ): super(HovertemplatesrcValidator, self).__init__( plotly_name=plotly_name, ...
{ "content_hash": "dd1459129ff3e119477d76a7c3fbb048", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 79, "avg_line_length": 33.61538461538461, "alnum_prop": 0.6247139588100686, "repo_name": "plotly/plotly.py", "id": "1d9b17b812e0b14bb78d34859cd581315dbf96f7", "size": "437"...
""" Django settings for {{ project_name }} project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ Quick-start development settings - unsuitable for production, see h...
{ "content_hash": "bf17bad589c5811cbe9682a6f9ead6b3", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 97, "avg_line_length": 30.324137931034482, "alnum_prop": 0.7143506936547646, "repo_name": "dullaran/django-project-template", "id": "e705bcee0e83447fcb7776ceac8071f1e547fef7...
"""Test autoreject.""" # Author: Mainak Jas <mainak.jas@telecom-paristech.fr> # Denis A. Engemann <denis.engemann@gmail.com> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # # License: BSD-3-Clause import os.path as op import pickle import platform import numpy as np from numpy.testing import asser...
{ "content_hash": "2e02836a93fb92ee4cb51d5ee080f3bb", "timestamp": "", "source": "github", "line_count": 399, "max_line_length": 79, "avg_line_length": 40.38095238095238, "alnum_prop": 0.6263033763654419, "repo_name": "autoreject/autoreject", "id": "adb095e15a472d281f00197e90232ac8550efaaf", "size":...
#!/usr/bin/env python def find_regex_list(regex,filelist): import re,os dig3tlist = [] try: for f in filelist: found = re.findall(regex, f) if found: dig3tlist.append(f) dig3tlist = sorted(dig3tlist) else: ...
{ "content_hash": "49f1cafcafeb25bd66ff6849ba17ce87", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 72, "avg_line_length": 26.328125, "alnum_prop": 0.5940652818991098, "repo_name": "relic7/prodimages", "id": "eb0792eb6770a0a737ad619a9f04f7c7ce99cf9b", "size": "1685", "b...
""" @author: moloch Copyright 2013 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 agre...
{ "content_hash": "4652600ca0140b445a78aaab1d30cbe3", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 85, "avg_line_length": 32.56818181818182, "alnum_prop": 0.6608513607815771, "repo_name": "moloch--/RootTheBox", "id": "099eae2d4f4f799665cb9294246a7610ad4805b4", "size": "1...
import os import shutil import tempfile import threading import time from unittest import TestCase from vsqs import queue class QueueTest(TestCase): def setUp(self): self.q = queue.Queue(tempfile.mkdtemp()) def tearDown(self): self.q.close() shutil.rmtree(self.q.path) # reset ...
{ "content_hash": "56c01c9836ffac7f64fea3ab6e9b2b94", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 76, "avg_line_length": 33.144067796610166, "alnum_prop": 0.5724878547686014, "repo_name": "erikvanzijst/vsqs", "id": "e9a9bfca62c2e9fca60ea09edc0d772910ca475c", "size": "3...
""" Tools for memoization of function results. """ from functools import wraps from six import iteritems from weakref import WeakKeyDictionary class lazyval(object): """ Decorator that marks that an attribute should not be computed until needed, and that the value should be memoized. Example ----...
{ "content_hash": "fa88c1f9d9b041d1f0ddf2bfab0087c8", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 79, "avg_line_length": 25.14851485148515, "alnum_prop": 0.5547244094488188, "repo_name": "sketchytechky/zipline", "id": "354649bf3850e6b6a61ffae6c027b0425ec2b8de", "size":...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('report_ia', '0014_kern_gevaar_potentieel_risico'), ] operations = [ migrations.RunSQL([ "insert into report_ia_kern_gevaar (naam) values ('onzor...
{ "content_hash": "039925b8111828f1bbac8697a29b16f8", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 109, "avg_line_length": 47.074074074074076, "alnum_prop": 0.6435877261998426, "repo_name": "jefke-glider/gliding", "id": "f9310e2d1d2d74c4bf16b8823cea305f21d424b3", "size":...
from rflint.common import ResourceRule class Issue30(ResourceRule): def configure(self, value): self.value = value def apply(self,resource): message = "the configured value is %s" % self.value self.report(resource, message, 0, 0)
{ "content_hash": "a8118887d461a3c9763f4979b83eef10", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 59, "avg_line_length": 29.333333333333332, "alnum_prop": 0.6704545454545454, "repo_name": "boakley/robotframework-lint", "id": "2e86552ac6805a9b8c017f7cdd58a8f6189fa53f", "s...
config = { # The hostname of your server. "host": "tf.example.com", # The user for the app to login as. "user": "srcds", # The FTP password. "ftp_pass": "password", # The method to login as. # SSH is more secure and more powerful. # FTP is supported on nearly all hosts. "connecti...
{ "content_hash": "e2fd06d7aa49ad2b1ff81592c87036d8", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 43, "avg_line_length": 30.071428571428573, "alnum_prop": 0.6080760095011877, "repo_name": "SunDwarf/smadmintools", "id": "52b824a81cdf056a53c7f248fc51dbe21a5809d4", "size":...
from __future__ import unicode_literals import re from setuptools import find_packages, setup def get_version(filename): content = open(filename).read() metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content)) return metadata['version'] setup( name='Mopidy-Headspring-Web', version=get_...
{ "content_hash": "c5c51064ff795bf604bac5254c3a2541", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 71, "avg_line_length": 30.46511627906977, "alnum_prop": 0.6213740458015267, "repo_name": "HeadspringLabs/Mopidy-Headspring-Web", "id": "c2e65a0853fdba4d5e66d6ec9df858b2507b3e...
__author__ = 'pfCao' import subprocess import os def run_adb_cmd(cmd): try: args = ["adb"] args.extend(cmd) process = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) ret = process.communicate() except Exception, ex: print ex ...
{ "content_hash": "1efefdd065689bdfe67c842c99ee2dc9", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 87, "avg_line_length": 25.4, "alnum_prop": 0.5714285714285714, "repo_name": "ManyFace/AndroidInjection", "id": "1462808d8b68d3d363f0c87bcfd017c5ee9e222f", "size": "930", ...
import sys import operator import time from itertools import chain from datetime import datetime if sys.version < "3": from itertools import imap as map, ifilter as filter from py4j.protocol import Py4JJavaError from pyspark import RDD from pyspark.storagelevel import StorageLevel from pyspark.str...
{ "content_hash": "c4b97fcb59a3c1207498705ece533039", "timestamp": "", "source": "github", "line_count": 629, "max_line_length": 100, "avg_line_length": 43.969793322734496, "alnum_prop": 0.6023068300972629, "repo_name": "wangyixiaohuihui/spark2-annotation", "id": "1e6dfde031d5819ad5fa849b3f752bc89c1df...
import copy import math import os import unittest from telemetry import decorators from telemetry.core import util from telemetry.internal.util import external_modules try: np = external_modules.ImportRequiredModule('numpy') cv2 = external_modules.ImportRequiredModule('cv2') except (ImportError, NotImplementedErr...
{ "content_hash": "6a6e229a924cd3a246a2235930b679f5", "timestamp": "", "source": "github", "line_count": 368, "max_line_length": 80, "avg_line_length": 43.06521739130435, "alnum_prop": 0.6096037354871278, "repo_name": "catapult-project/catapult-csm", "id": "d8c294fbcf66c79abde858b868f5c45d949dbeb5", ...
""" .. module: security_monkey.tests.auditors.gcp.gcs.test_bucket :platform: Unix .. version:: $$VERSION$$ .. moduleauthor:: Tom Melendez <supertom@google.com> @supertom """ from security_monkey.tests import SecurityMonkeyTestCase ACL_LIST = [ {'role': 'OWNER', 'entity': 'project-editors-2094195755359'}, ...
{ "content_hash": "06422c6830e4452221f9ed153d884c9c", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 76, "avg_line_length": 36.69387755102041, "alnum_prop": 0.6657397107897665, "repo_name": "Netflix/security_monkey", "id": "5dc02be173ff3202afb2c730aafe29f5cefbbf5e", "size"...
import mock from cinderclient.v1 import client as cinder_client from oslotest import mockpatch from cloudferrylib.os.storage import cinder_storage from cloudferrylib.utils import utils from tests import test FAKE_CONFIG = utils.ext_dict( cloud=utils.ext_dict({'user': 'fake_user', 'pass...
{ "content_hash": "043616f21ad4456b0ad55adb58db5ddf", "timestamp": "", "source": "github", "line_count": 224, "max_line_length": 93, "avg_line_length": 42.857142857142854, "alnum_prop": 0.56375, "repo_name": "Settis/CloudFerry", "id": "399eb5c145b466f326146626fde5074df56558a7", "size": "10230", "b...
""" Bitbake "Fetch" implementation for osc (Opensuse build service client). Based on the svn "Fetch" implementation. """ import os import sys import bb from bb import data from bb.fetch import Fetch from bb.fetch import FetchError from bb.fetch import MissingParameterError from bb.fetch import...
{ "content_hash": "c59d6998dd63009b2346a2ddc561f8ae", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 132, "avg_line_length": 33.47712418300654, "alnum_prop": 0.5384615384615384, "repo_name": "nlebedenco/mini2440", "id": "2c34caf6c9a61651d2ad5a414ac63f12e99e167f", "size": ...
from myhdl import Signal, intbv def _input_serdes(serial_in_p, serial_in_n, data): mod_insts = [] return mod_insts def _output_serdes(data, serial_out_p, serial_out_n): mod_insts = [] return mod_insts def io_serdes(serial_in_p, serial_in_n, serial_out_p, serial_out_n): """ Vendo...
{ "content_hash": "b9c27563a9a305cbebb36d864406a456", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 53, "avg_line_length": 17.043478260869566, "alnum_prop": 0.6071428571428571, "repo_name": "cfelton/parallella_elink", "id": "7b57c9c78c2e51076c2900b729d934e6740090d5", "siz...
from django.core.urlresolvers import NoReverseMatch # noqa from django.core.urlresolvers import reverse from django.http import HttpResponse # noqa from django.template import defaultfilters as filters from django.utils import html from django.utils.http import urlencode from django.utils import safestring from djang...
{ "content_hash": "a4bf1184c76508d8065c1baaee4b8451", "timestamp": "", "source": "github", "line_count": 491, "max_line_length": 79, "avg_line_length": 35.87983706720978, "alnum_prop": 0.5944258386785491, "repo_name": "orbitfp7/horizon", "id": "7efc3f02020819051c49cfbeebc1edad881ea352", "size": "182...
import numpy as np import mnist import sys import mlayers_minibatch as ml import NeuralNetwork as nn if(len(sys.argv) < 5): print("Not enough arguments provided. Try \"python ConvolutionalNeuralNetworkMiniBatch.py \'epochs\' \'minibatch size\' \'filter learn rate\' \'fully connected learn rate\'\"") exit() E...
{ "content_hash": "044f9e990c3f460c2ab712c0aede90bd", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 339, "avg_line_length": 49.60526315789474, "alnum_prop": 0.7575596816976128, "repo_name": "fastslash8/modular-layers", "id": "fa5c4c605a567837a32f56b448bb6b03ca6dbb8b", "si...
class Calculator: def power(self, n, p): if n < 0 or p < 0: raise Exception("n and p should be non-negative") else: return n**p myCalculator=Calculator() T=int(input()) for i in range(T): n,p = map(int, input().split()) try: ans=myCalculator.power...
{ "content_hash": "49471e5785c0d1d014e0c70d0dbc55f6", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 61, "avg_line_length": 24.5, "alnum_prop": 0.5229591836734694, "repo_name": "rho2/30DaysOfCode", "id": "f5bea282a9aefbf8519bd586d89269249d583ae0", "size": "392", "binary"...
import pytest import base64 import random from vcx.error import ErrorCode, VcxError from vcx.state import State from vcx.api.connection import Connection source_id = '123' connection_options = '{"connection_type":"SMS","phone":"8019119191","use_public_did":true}' details = '{"connReqId":"njjmmdg","senderAgencyDetail"...
{ "content_hash": "cb1c9224036dae98cd8c2d857a3df38e", "timestamp": "", "source": "github", "line_count": 175, "max_line_length": 643, "avg_line_length": 38.10285714285714, "alnum_prop": 0.7422015596880623, "repo_name": "anastasia-tarasova/indy-sdk", "id": "459a0e30626ec60a988576ca49662e4cd1cb8230", ...
class Reducer(object): def __init__(self): pass def word_counter(self, word_list, origin_list): for word, count in origin_list.items(): if word in word_list: word_list[word] += count else: word_list[word] = count def do_reduce(self, dat...
{ "content_hash": "b3b94581d92d29486054d5fe91026a3f", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 79, "avg_line_length": 35.5, "alnum_prop": 0.5084507042253521, "repo_name": "SkyZH/ddcm-word-count", "id": "054722bf0ed64857bae08e96325e7e2eef6a662a", "size": "710", "bin...
"""Grow theme management.""" import io import logging import zipfile import requests THEME_ARCHIVE_URL = 'https://github.com/growthemes/{}/archive/master.zip' class GrowTheme(object): """Grow theme.""" def __init__(self, theme_name): self.theme_name = theme_name self.archive_url = THEME_ARC...
{ "content_hash": "c4f9de3540508e5cb3467236dbc05baf", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 91, "avg_line_length": 35.8, "alnum_prop": 0.553580497714576, "repo_name": "grow/pygrow", "id": "c7db4abc962fc9c5430e1fea78b3695e14e0414e", "size": "1969", "binary": fals...
import math from pandac.PandaModules import Point3 from toontown.toonbase import ToontownGlobals InputTimeout = 15 TireMovieTimeout = 120 MinWall = (-20.0, -15.0) MaxWall = (20.0, 15.0) TireRadius = 1.5 WallMargin = 1 + TireRadius StartingPositions = (Point3(MinWall[0] + WallMargin, MinWall[1] + WallMargin, TireRadius)...
{ "content_hash": "1e29e55862aecc74931699551c484a27", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 137, "avg_line_length": 39.220338983050844, "alnum_prop": 0.672428694900605, "repo_name": "ToonTownInfiniteRepo/ToontownInfinite", "id": "572d099a9e5cae6ea9b534662ba67b05a1cc...