text
stringlengths
4
1.02M
meta
dict
import tensorrt as trt import os import pycuda.driver as cuda import pycuda.autoinit #import cv2 import numpy as np from collections import namedtuple # For reading size information from batches import struct from PIL import Image _ModelData = namedtuple('_ModelData', ['MODEL_PATH', 'INPUT_SHAPE', 'DTYPE']) ModelDa...
{ "content_hash": "690084dc8f49dafe0e0abd4d178d7a90", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 102, "avg_line_length": 37.38562091503268, "alnum_prop": 0.6166083916083916, "repo_name": "mlperf/inference_results_v0.7", "id": "b0d9e6b733d26b2921dbd63f8054c5108e5cf432", ...
""" The abstract :py:class:`Task` class. It is a central concept of Luigi and represents the state of the workflow. See :doc:`/tasks` for an overview. """ try: from itertools import imap as map except ImportError: pass import logging import traceback import warnings import json import hashlib import re from l...
{ "content_hash": "c31f7730798a128f4a38bb8c0ab9b333", "timestamp": "", "source": "github", "line_count": 597, "max_line_length": 151, "avg_line_length": 33.81909547738694, "alnum_prop": 0.6207033184744923, "repo_name": "bmaggard/luigi", "id": "c48360df43c37f9008e1302f0dbbd6f7ec620193", "size": "2079...
from cms.api import add_plugin from django.template import RequestContext from djangocms_helper.base_test import BaseTestCase class PluginTest(BaseTestCase): _pages_data = ( {'en': {'title': 'Page title', 'template': 'page.html', 'publish': True}, 'fr': {'title': 'Titre', 'publish': True}, ...
{ "content_hash": "d4819bf49fa38c1326adbd9c99291e93", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 91, "avg_line_length": 40.14705882352941, "alnum_prop": 0.6227106227106227, "repo_name": "nephila/djangocms-markitup", "id": "df6f75d821be548bf21dae763824722471136fdf", "si...
from django.db.models import Q from django.conf import settings from requests.exceptions import MissingSchema from requests.exceptions import InvalidSchema from requests.exceptions import InvalidURL from django.utils.module_loading import import_string from doh.models import Hook from .mixins import DelivererMixin impo...
{ "content_hash": "c79411c1c09ad89c753a493143f0724a", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 82, "avg_line_length": 35.09411764705882, "alnum_prop": 0.6265504525645323, "repo_name": "laginha/django-object-hooks", "id": "d21199f17e253aad55f89d43ae8f593fddf8dc4e", "s...
import time from typing import Optional, Union from urllib.parse import urlparse import requests class FreenomSession(requests.Session): last_request_time: float previous_url: Optional[str] = None request_cooldown = 3.0 retry = 3 def __init__(self): super().__init__() self.last_r...
{ "content_hash": "a075fc44acaa250c8b7d7c94559fa953", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 87, "avg_line_length": 34.13636363636363, "alnum_prop": 0.5752330226364847, "repo_name": "maxisoft/Freenom-dns-updater", "id": "f115ee24601bb2652d5e8659e1b2cbaa87801c14", "...
class PlumbcaConfigNotFound(Exception): "Raised when the plumbca program not found the configure file." class MessageFormatError(Exception): """hello world."""
{ "content_hash": "2f9b03614875a5bddf5ffe53d4ba0695", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 67, "avg_line_length": 28.333333333333332, "alnum_prop": 0.7529411764705882, "repo_name": "JasonLai256/plumbca", "id": "b283d3b97a499078158763059f825da2f8c75dba", "size": "2...
import os from setuptools import setup, find_packages version = '0.1a' here = os.path.dirname(__file__) with open(os.path.join(here, 'README.rst')) as fp: longdesc = fp.read() with open(os.path.join(here, 'CHANGELOG.rst')) as fp: longdesc += "\n\n" + fp.read() setup( name='jobcontrol', version=ver...
{ "content_hash": "7babeb9efd0f41cf802232613e8ef6c2", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 66, "avg_line_length": 32.96774193548387, "alnum_prop": 0.601761252446184, "repo_name": "rshk/jobcontrol", "id": "c952e2ecd87e504ed025792f86b4fe65a42135c7", "size": "2044",...
import os, pdb, platform, time, warnings import ctypes as ct import numpy as np MAX_ONES = 1024*256 if platform.system() == 'Windows': _cudamat = ct.cdll.LoadLibrary('libcudamat.dll') else: _cudamat = ct.cdll.LoadLibrary('libcudamat.so') _cudamat.get_last_cuda_error.restype = ct.c_char_p _cudamat.cublas_init...
{ "content_hash": "8a8c2c88f2eefe4f8c539024fdbed45c", "timestamp": "", "source": "github", "line_count": 1111, "max_line_length": 169, "avg_line_length": 29.353735373537354, "alnum_prop": 0.5927572672635839, "repo_name": "nitishsrivastava/cudamat", "id": "b6a96684c8f9438615385d2c771a5fcaf89f81f3", "...
from boto.swf.exceptions import SWFResponseError from freezegun import freeze_time import sure # noqa from moto import mock_swf_deprecated from moto.swf import swf_backend from ..utils import setup_workflow # PollForDecisionTask endpoint @mock_swf_deprecated def test_poll_for_decision_task_when_one(): conn = s...
{ "content_hash": "5007894309a569fb538a85e83f3bd4be", "timestamp": "", "source": "github", "line_count": 342, "max_line_length": 93, "avg_line_length": 33.16959064327485, "alnum_prop": 0.6631699576868829, "repo_name": "whummer/moto", "id": "972b1053b77d49dae6794b898b2d3b6c0660fcbe", "size": "11344",...
def get_language(tokens, stopwords): """ Extract the language from an array of tokens, it is based on stop words It takes two args: tokens -> list of words to check the language stopwords -> dict of set: {lang : set(language,specific,stop,words)} It sets a score to a language by inte...
{ "content_hash": "d1858a9c921f41aa10b1600eb7222d5c", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 76, "avg_line_length": 36.69230769230769, "alnum_prop": 0.6907756813417191, "repo_name": "Nedgang/adt_project", "id": "21784fb3965db0a803add07907b8c27dd4e0df8c", "size": "1...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['MovingAverage'] , ['BestCycle'] , ['MLP'] );
{ "content_hash": "b0256233f6443df46122af56525188ff", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 84, "avg_line_length": 39.25, "alnum_prop": 0.7133757961783439, "repo_name": "antoinecarme/pyaf", "id": "550a7f9d7048689f4f7ee388e31399bc2bc60b51", "size": "157", "binary"...
""" Implement a hash table with arrays. """ class Dictionary: """ A hash table is an array of arrays. The outer array's index refers to the "hashed" index generated from a given key. Two different keys could potentially hash to the same index. To handle this collision, the inner array is used. As l...
{ "content_hash": "c911bd1f370159a8f1a26fd5bff4691c", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 118, "avg_line_length": 37.54, "alnum_prop": 0.5817794352690463, "repo_name": "JDFagan/InterviewInPython", "id": "12bf02e3632e0839e56d0a052f90916c05c6e41e", "size": "1877",...
from openstack.load_balancer import load_balancer_service as lb_service from openstack import resource2 as resource class LoadBalancer(resource.Resource): resource_key = 'loadbalancer' resources_key = 'loadbalancers' base_path = '/v2.0/lbaas/loadbalancers' service = lb_service.LoadBalancerService() ...
{ "content_hash": "61680966e3b2427f51b34805e82581b3", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 72, "avg_line_length": 39.228070175438596, "alnum_prop": 0.6829159212880143, "repo_name": "briancurtin/python-openstacksdk", "id": "1e2afa733cea96f33d8226dbb0d1849ee64a8f4b",...
""" Django settings for project_card project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build...
{ "content_hash": "15c68d22b5b8bda9e9569136fa0a77ed", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 71, "avg_line_length": 25.798076923076923, "alnum_prop": 0.6891539321654864, "repo_name": "PugliaSOS/card-project", "id": "db1781b1da6615455393c8d223b5f814135da8f8", "size...
from distutils.core import setup setup( name='fileconversions', version='0.1.0.0', packages=['fileconversions', 'fileconversions.conversions'], url='', license='MIT', author='Wilberto Morales', author_email='wilbertomorales777@gmail.com', description='Various file format conversions.' )...
{ "content_hash": "ce2289a66b8773e686dadd2a32d08c4d", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 64, "avg_line_length": 26.75, "alnum_prop": 0.6915887850467289, "repo_name": "wilbertom/fileconversions", "id": "2ac7a81d46d7b357279a33d01297710a694f6b11", "size": "321", ...
import json import os import urllib2 import httplib2 import cv2 import matplotlib.pyplot as plt from color_histogram.io_util.image import loadRGB, saveRGB from color_histogram.datasets.datasets import dataDir, dataFiles # # Simple image loaders via Google image API. class GoogleImageLoader: # # Constructor ...
{ "content_hash": "3de0f1e8d403bfa0ed1082c38766657d", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 120, "avg_line_length": 32.266666666666666, "alnum_prop": 0.5630165289256198, "repo_name": "tody411/ColorHistogram", "id": "262ea9aa151847ec3f2ac9bc0a96f1bf104a8643", "siz...
from __future__ import with_statement import sys from contextlib import contextmanager from robot.errors import (INFO_PRINTED, DATA_ERROR, STOPPED_BY_USER, FRAMEWORK_ERROR, Information, DataError) from .argumentparser import ArgumentParser from .encoding import encode_output from ...
{ "content_hash": "e5882000980a9740e7e121959a28c1d3", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 77, "avg_line_length": 31.261682242990656, "alnum_prop": 0.5584454409566517, "repo_name": "Senseg/robotframework", "id": "f45fa170ee438057d44428e15a19be0d56da554d", "size"...
import sys from multiprocessing import Process from joblib import Parallel, delayed import logging logging.basicConfig(format='%(levelname)s : %(asctime)s : %(message)s', level=logging.INFO) x_seperator = '\nXXXXXXX\n' # define document separator (7 Xs). This separator is used when all the docs are in one file (a corp...
{ "content_hash": "9765eb2bd2b1365a5f2addf010e438b1", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 191, "avg_line_length": 35.84722222222222, "alnum_prop": 0.6671832623014335, "repo_name": "motazsaad/comparable-text-miner", "id": "56e18fec227c5af371445f82e0c615e60eab06e2",...
from jumpgate.common.openstack import setup_responder def setup_routes(app, disp): return setup_responder(app, disp, 'identity')
{ "content_hash": "411fddf5de42c58dcc8be92f44f303eb", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 53, "avg_line_length": 27, "alnum_prop": 0.762962962962963, "repo_name": "BillArnold/barnoldjg", "id": "ef559bdd4f750b682382d33aee02c0eeb91167f2", "size": "135", "binary":...
import os, datetime; class ProcessLockException(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class ProcessLock(): def __init__(self,lockKey): self.lockKey = lockKey+'.lock'; def aquire(self): ...
{ "content_hash": "4d96fc99fb477b20a22c7a09da4bae74", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 86, "avg_line_length": 29.291666666666668, "alnum_prop": 0.5604551920341394, "repo_name": "softwarespartan/AGT", "id": "2b79cc0cb9ef91810d7c06d7bb53a360b4494f66", "size": "...
from __future__ import absolute_import # Copyright (c) 2010-2019 openpyxl from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Alias, Typed, String, Integer, Bool, NoneSet, Set, Sequence, ) from openpyxl.descriptors.excel import ExtensionList, Re...
{ "content_hash": "15b155f372808dc8a5fab47f390dae76", "timestamp": "", "source": "github", "line_count": 205, "max_line_length": 118, "avg_line_length": 34.453658536585365, "alnum_prop": 0.6434942658926802, "repo_name": "cloudera/hue", "id": "ab3a80aae9193329253e82b752994ea9a659c0cb", "size": "7063"...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('quotation', '0006_orderingcompany'), ] operations = [ migrations.AlterField( model_name='quotation', name='quota_number', ...
{ "content_hash": "bbcc962e7d2790d27b3141f38a0478db", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 74, "avg_line_length": 22.77777777777778, "alnum_prop": 0.6097560975609756, "repo_name": "lowitty/eeep", "id": "db470df225766296ab8ba87990a77106150d57ad", "size": "434", ...
import asyncio import getpass import time from spade.agent import Agent from spade.behaviour import CyclicBehaviour class DummyAgent(Agent): class MyBehav(CyclicBehaviour): async def on_start(self): print("Starting behaviour . . .") self.counter = 0 async def run(self): ...
{ "content_hash": "16ed0f9e5599a25b2b8713bc826b2ead", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 81, "avg_line_length": 26.955555555555556, "alnum_prop": 0.5853256389117889, "repo_name": "javipalanca/spade", "id": "00f6f5ded3c498135833461d19b861e2cff9fcd4", "size": "12...
from pkgversion import list_requirements, pep440_version, write_setup_py from setuptools import find_packages write_setup_py( name='timeexecution', version=pep440_version(), description="Python project", long_description=open('README.rst').read(), author="Niels Lensink", author_email='niels@ele...
{ "content_hash": "4999012c843077e8aeafe804e0a3764f", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 77, "avg_line_length": 39.193548387096776, "alnum_prop": 0.6477366255144033, "repo_name": "snelis/timeexecution", "id": "fd7789aa110f4723eec3b0b9f117d09fd305aba4", "size": ...
import sys, pymongo, os, glob, re, bson.json_util, json, time, datetime, math, subprocess, base64 from bson.objectid import ObjectId from pymongo import MongoClient from bson.dbref import DBRef from bson.json_util import dumps from bson.code import Code import string, tangelo import csv def run(filename=None,filecon...
{ "content_hash": "46634cb5d3b61f2b62fe274017b0b5c9", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 97, "avg_line_length": 32.86666666666667, "alnum_prop": 0.6693711967545639, "repo_name": "curtislisle/nanomaterial-dashboard", "id": "d94120e316a638a22c5a6cd328d6d8e46c340a0c...
from curator import curator from mock import patch, Mock from . import CuratorTestCase class TestCloseIndex(CuratorTestCase): def test_positive(self): self.create_index('test_index') self.client.indices.close('test_index') self.assertTrue(curator.index_closed(self.client, 'test_index')) ...
{ "content_hash": "1a6781701cd2047e76db5c4ffaa876ef", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 105, "avg_line_length": 42.68, "alnum_prop": 0.6637769447047798, "repo_name": "waja/elasticsearch-curator", "id": "6534b8a8924eba225fb72f88df7b072d69db5459", "size": "4268...
import os from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from electrum_mona.util import base_units from electrum_mona.storage import StorageReadWriteError from ...i18n import _ from .label_dialog import LabelDialog Builder.load_stri...
{ "content_hash": "75e79c40d9612419b2991bf15b5129ee", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 103, "avg_line_length": 29.333333333333332, "alnum_prop": 0.5364583333333334, "repo_name": "wakiyamap/electrum-mona", "id": "b85898d60904a367020a01c2c17396b67b9fbfec", "siz...
""" The workbench interface. """ # Enthought library imports. from traits.api import Event, Instance, Interface, List, Str from traits.api import provides, VetoableEvent # Local imports. from user_perspective_manager import UserPerspectiveManager from window_event import WindowEvent, VetoableWindowEvent from workben...
{ "content_hash": "8918e4c13a3beecc1de50c2fa8a17209", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 79, "avg_line_length": 30.8, "alnum_prop": 0.6230674087816945, "repo_name": "brett-patterson/pyface", "id": "2534d6830329cb253030a6f355f6306fdae7a217", "size": "3234", "...
from aldryn_search.utils import get_index_base from .models import Service class ServiceIndex(get_index_base()): haystack_use_for_indexing = True index_title = True @staticmethod def get_title(obj): return obj.name @staticmethod def get_index_queryset(language): # For this l...
{ "content_hash": "ab73b550e2f248f9ec350fee724df30f", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 80, "avg_line_length": 28.405405405405407, "alnum_prop": 0.6079923882017126, "repo_name": "theirc/ServiceInfo", "id": "0dd0a642db5a7bd05ae46ee109016fbf6c6904e8", "size": "1...
from os.path import dirname, join import json import re import sys import urllib2 # ======================================== def unicode_and_strip (_str): return unicode(_str).strip() def remove_empty_string_and_nbsp_in_list (_list): return [ unicode_and_strip(x).replace(u'\xa0', u' ') for x in _list if unicode_an...
{ "content_hash": "c5b8fdfcd484bb307b1f164902472e15", "timestamp": "", "source": "github", "line_count": 158, "max_line_length": 108, "avg_line_length": 26.22151898734177, "alnum_prop": 0.6068066618392469, "repo_name": "altbdoor/utar-accommodation-list", "id": "375bde0dc0fa973716a746d577344018408ee8c8...
__author__ = "mozman <mozman@gmx.at>" import unittest from dxfwrite.base import * from dxfwrite.sections import create_section class TestSection(unittest.TestCase): def test_empty_header_section(self): dxf = dxfstr(create_section('HEADER')) self.assertTrue(dxf.startswith(" 0\nSECTION\n 2\nHEAD...
{ "content_hash": "737733d68fc8073b78a3880a65d66955", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 81, "avg_line_length": 35.847457627118644, "alnum_prop": 0.6184397163120567, "repo_name": "sbarton272/AcousticBarcodes-Explorations", "id": "19aee4d5d7740c899048d84b876a0a162...
import re import inspect import pydoc import gtk from cStringIO import StringIO # # For most objects, we simply call their repr() function, but we handle # tuples, lists, and dicts specially. We handle them in one of two ways: # # - As a list of items, one per line. # # Dictionaries are always formatted this way. ...
{ "content_hash": "4a25bcc99d3de6caf5c8f320e0f7aafa", "timestamp": "", "source": "github", "line_count": 333, "max_line_length": 98, "avg_line_length": 30.033033033033032, "alnum_prop": 0.5357464253574643, "repo_name": "lamby/pkg-reinteract", "id": "4d5b1263e334a1b4911823d0e3dce34de18ce005", "size":...
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "discover_road_runner.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
{ "content_hash": "5cabb1a3955c02a1294515794667dbe5", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 64, "avg_line_length": 26.7, "alnum_prop": 0.6479400749063671, "repo_name": "pzrq/discover-road-runner", "id": "acff17fc38a4a35d2a427bcda1d7147b1e1eb231", "size": "289", ...
""" Atomic Positions Parser ############################### """ #import re #import pandas as pd #from exa import Parser #from exa.typed import Typed #from exatomic.core.atom import Atom # # #class AtomicPositions(Parser): # """Parser for the 'ATOMIC_POSITIONS' section of an output.""" # _start = re.compile(r"^\s*...
{ "content_hash": "aad08cf383e483a1c2501668fdb60214", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 74, "avg_line_length": 31.075, "alnum_prop": 0.5406275140788415, "repo_name": "exa-analytics/atomic", "id": "de468038206c5bf4e37561feefc545a05d6dcab6", "size": "1381", "b...
import unittest import os from programy.config.file.json import JSONConfigurationFile from programy.config.client.client import ClientConfiguration class JsonConfigurationFileTests(unittest.TestCase): def test_load_from_file(self): client_config = ClientConfiguration() json = JSONConfigurationFi...
{ "content_hash": "faff8a52057b31c8ec66194355c65dd3", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 77, "avg_line_length": 32.989583333333336, "alnum_prop": 0.5342595516261446, "repo_name": "JustArchi/program-y", "id": "70d57123abd5f966d9d98baf4e166671a3616eb0", "size": "...
from __future__ import division import rospy from std_msgs.msg import Float64 from math import sin def talker(): front_left_pub = rospy.Publisher('/calf/front_left_pod_joint_controller/command', Float64) front_right_pub = rospy.Publisher('/calf/front_right_pod_joint_controller/command', Float64) back_left_...
{ "content_hash": "17d26667551f524b6f807f8cb65d694b", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 96, "avg_line_length": 36.21212121212121, "alnum_prop": 0.6644351464435146, "repo_name": "OAkyildiz/walrus", "id": "51710dc71ed5f4780ba341d1c9d7b66c45f4ab7f", "size": "1247...
from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^restart_workers$', views.restart_workers, name='system.restart_workers'), url(r'^test/(?P<test_run_id>[0-9]+)/result$', views.test_result, name='system.test_result'), url(r'^start_tests/?$', views....
{ "content_hash": "08cd94c9033fb86a2e4cc096c628676e", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 76, "avg_line_length": 44.15625, "alnum_prop": 0.6220806794055201, "repo_name": "kumar303/jstestnet", "id": "362b78aeafca096696a7dcf59f1d347d856679e8", "size": "1413", "b...
from twisted.trial import unittest from buildbot.steps.package.rpm import mock from buildbot.status.results import SUCCESS from buildbot.test.util import steps from buildbot.test.fake.remotecommand import ExpectShell, Expect from buildbot import config class TestMock(steps.BuildStepMixin, unittest.TestCase): def ...
{ "content_hash": "9cb74fa17a25e173fc46f09ab422f3a9", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 83, "avg_line_length": 40.7787610619469, "alnum_prop": 0.5067274305555556, "repo_name": "denny820909/builder", "id": "df0e937b31aaa6215712f3de14d3240ac1cfb9ef", "size": "5...
import random from matplotlib import pyplot as plt from learntools.python.ex5 import play_slot_machine seed = 50 random.seed(seed) balances = [] balance = 200 n = 10**3 // 2 for _ in range(n): if balance < 1: break balance = balance - 1 + play_slot_machine() balances.append(balance) del seed, bal...
{ "content_hash": "c43c90147b263b1b6045c795ba9ab586", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 51, "avg_line_length": 19.444444444444443, "alnum_prop": 0.5961904761904762, "repo_name": "Kaggle/learntools", "id": "646555c2b9a6a9c319155ab8d8d68554718c7b75", "size": "52...
""" Swaggy Jenkins Jenkins API clients generated from Swagger / Open API specification # noqa: E501 The version of the OpenAPI document: 1.5.1-pre.0 Contact: blah@cliffano.com Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except ImportError: fr...
{ "content_hash": "7eecc367edf4a5cde748e03124ad9080", "timestamp": "", "source": "github", "line_count": 156, "max_line_length": 93, "avg_line_length": 27.05128205128205, "alnum_prop": 0.5450236966824644, "repo_name": "cliffano/swaggy-jenkins", "id": "f8075eabd3c2accdb444b3bcdceaeefe7ed77184", "size...
from oslo_log import log as logging from act.engine import operations LOG = logging.getLogger(__name__) class Action(object): weight = 0.1 depends_on = None limit = None def __init__(self): super(Action, self).__init__() def get_weight(self): return self.weight def get_de...
{ "content_hash": "2101f8d5454a17a592c58bd61daf11ad", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 73, "avg_line_length": 21.03669724770642, "alnum_prop": 0.6092455298735281, "repo_name": "shakhat/act", "id": "e0e05291b326d79ebb2ca89b9818e10771e7fb90", "size": "2838", ...
"""Fixtures specific for Lino Care. """ from lino_xl.lib.tickets import * from lino.api import _ # class Plugin(Plugin): # verbose_name = _("Pleas") # extends_models = ['Ticket']
{ "content_hash": "44ab5e6576f8fbf2c4a8a2fbb1905381", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 35, "avg_line_length": 17.363636363636363, "alnum_prop": 0.6387434554973822, "repo_name": "lino-framework/book", "id": "da22c9612ca672c6ed6682af3a836b19495288a9", "size": "...
airlines_hex = h2o.import_file(path = _locate("smalldata/airlines/allyears2k_headers.zip")) # Generate random numbers and create training, validation, testing splits r = airlines_hex.runif() # Random UNIForm numbers, one per row air_train_hex = airlines_hex[r < 0.6] air_valid_hex = airlines_hex[(r >= 0.6) & (r < 0....
{ "content_hash": "4891dbf66cc2039bdb364c8835c7f06e", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 181, "avg_line_length": 50.75, "alnum_prop": 0.7011494252873564, "repo_name": "pchmieli/h2o-3", "id": "6f20715b879a588c78997475cea7583e6f36ad18", "size": "650", "binary":...
from sys import argv from queue import Queue from math import inf #Graph class class Graph: def __init__(self,is_directed=False): self.vertex = set() self.edges = list() self.distances = {} self.is_directed = is_directed #Create a new vertex in the graph def add_vertex(self,value): self.vertex.add(value)...
{ "content_hash": "7cb6f3998a406b9591e702a83e31ca73", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 144, "avg_line_length": 24.646464646464647, "alnum_prop": 0.6704918032786885, "repo_name": "manikTharaka/al-go-rithms", "id": "556f26a054aeb999e8f243d41676d82132449806", "s...
"""Enums for DAG serialization.""" from enum import Enum, unique # Fields of an encoded object in serialization. @unique class Encoding(str, Enum): """Enum of encoding constants.""" TYPE = '__type' VAR = '__var' # Supported types for encoding. primitives and list are not encoded. @unique class DagAttr...
{ "content_hash": "a981cde7c20b99fd4ff228a5e69c5645", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 68, "avg_line_length": 21.96969696969697, "alnum_prop": 0.6317241379310344, "repo_name": "Acehaidrey/incubator-airflow", "id": "f4227a6f7aed2b266e65012a2f2eaf19fdccd1b3", "...
from django.conf.urls import patterns, include, url from django.contrib import admin from mysite.views import hello from mysite.views import current_datetime from mysite.views import hours_ahead from mysite.views import display_request_info from mysite.views import display_request_info_tpl from mysite.views import sea...
{ "content_hash": "9d45ebd2b2969cf6032435776779e403", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 53, "avg_line_length": 30.608695652173914, "alnum_prop": 0.7627840909090909, "repo_name": "ericlin-ICT/mysite", "id": "4e8db68d13965417f80a63c115c6caded198658c", "size": "7...
from django.apps import AppConfig class LfsCachingAppConfig(AppConfig): name = 'lfs.caching' def ready(self): from . import listeners # NOQA
{ "content_hash": "edd6b81b55dd785809586f9b833284b3", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 39, "avg_line_length": 20.125, "alnum_prop": 0.6894409937888198, "repo_name": "diefenbach/django-lfs", "id": "5561704da302ce02fe26e57906d785d9a65c41bc", "size": "161", "bi...
import tensorflow as tf FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string("train_data_path", "./tfrecord", "training data dir") tf.app.flags.DEFINE_string("log_dir", "./log", " the log dir") tf.app.flags.DEFINE_integer("TRAINING_SET_SIZE", 2512, "total image number of training set") tf.app.flags.DEFINE_integer("...
{ "content_hash": "1fb28c44ba033cbd2ec3fbab778d4460", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 92, "avg_line_length": 46.666666666666664, "alnum_prop": 0.7333333333333333, "repo_name": "yeephycho/densenet-tensorflow", "id": "5622d0f78c0d73a36bc09fc0edcde4ee8f70dcde", ...
from django.views.generic import ListView, DetailView, CreateView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from .models import Directory class DirectoryListView(ListView): model = Directory c...
{ "content_hash": "a933b99ec7815276d93f710b54fc3b4a", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 82, "avg_line_length": 29.93103448275862, "alnum_prop": 0.7419354838709677, "repo_name": "SuziTech/transtech-directory", "id": "a1bcc7cd5ed330ab1ef0d79365aa4df627e7c6dd", "...
from urlparse import urljoin from HTMLParser import HTMLParser import requests from editor.models import Format class LinksParser(HTMLParser): """ Collects all links from given url. """ def __init__(self, url, *args, **kwargs): self.links = [] self.in_a = False self.url = url ...
{ "content_hash": "65e7aa8d1439f5999d7381788c696591", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 98, "avg_line_length": 26.473214285714285, "alnum_prop": 0.572681281618887, "repo_name": "CivicKnowledge/metaeditor", "id": "9fe551cd2154bb371297f1263ee27cdbd5dc20c6", "si...
version = "1.0" requirements = [ 'future', 'sh', 'docopt', 'pyaml', 'simplejson', 'nose', 'python-hostlist', 'prettytable', 'pytimeparse', ] from setuptools import setup, find_packages from setuptools.command.install import install import glob import os package_name = "cloudm...
{ "content_hash": "2f82ad790cf815b101bcf48c49b7c4bf", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 101, "avg_line_length": 28.3, "alnum_prop": 0.6469375736160189, "repo_name": "futuresystems/465-rebecca-appelbaum", "id": "60d0e0b6d376e2e5124a3b78042fbdb591e6a2e0", "size...
import sys import os.path """Adds some paths that need to be searched when running""" sys.path.insert(1, os.path.join(".","probedb","probedata2")) sys.path.insert(1, os.path.join(".","probedb")) sys.path.insert(1, os.path.join(".","tlslite")) sys.path.insert(1, os.path.join(".","tlscommon"))
{ "content_hash": "8ca45cbfff1f5df6769a14ee9f0ddf9e", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 60, "avg_line_length": 32.77777777777778, "alnum_prop": 0.6813559322033899, "repo_name": "operasoftware/tlsprober", "id": "b5e918c8acac1ed5638c70c115721f0d14ba4373", "size":...
""" A minimal bot player. Loads the level and params and lets the bot act. """ from interface import (get_max_time, get_num_of_actions, get_num_of_features, finish, load_level) from numpy import get_include, load from pyximport import install install(setup_args={'include_dirs': get_include()}, ...
{ "content_hash": "b9120115c32973a9cdb46d756d0e7aaa", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 77, "avg_line_length": 29.47826086956522, "alnum_prop": 0.6342182890855457, "repo_name": "wrwrwr/blackbox", "id": "81cc89a31d1a103b18caff5e6e286c4da6f1c599", "size": "702",...
from clld.db.models import common from clld.db.meta import DBSession from clld.web.util.helpers import get_referents, map_marker_img, get_adapter from clld.web.util.htmllib import HTML, literal from clld.interfaces import IRepresentation from clld.web import app from ewave import models def source_detail_html(conte...
{ "content_hash": "2173057fddf2758719fc6c300b9939a3", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 82, "avg_line_length": 37.04347826086956, "alnum_prop": 0.6684272300469484, "repo_name": "clld/ewave", "id": "06f0a728cb48389233c94ebf70863c4e6192c4c1", "size": "1704", "...
import sys import time from osc_lib import exceptions from osc_lib import utils as osc_utils from oslo_serialization import jsonutils as json from oslo_utils import timeutils from oslo_utils import uuidutils from saharaclient.api import base def get_resource(manager, name_or_id, **kwargs): if uuidutils.is_uuid_...
{ "content_hash": "e78757ad7b57c2f2cd0ed0c0619420ad", "timestamp": "", "source": "github", "line_count": 608, "max_line_length": 79, "avg_line_length": 36.46217105263158, "alnum_prop": 0.5786458568271009, "repo_name": "openstack/python-saharaclient", "id": "ff72bbb30457dbcb51310f69823e99c31055b531", ...
#Imports the regular expression package. import re #Asks the user for a string to tokenize and defines it under the variable #"string".) string=raw_input("Please enter your sentence to tokenize:\n") #Pulls out all the individual words in the string provided by the user and #defines it to the variable matches. ...
{ "content_hash": "7d06d10524724b4becc963b3f0282dfb", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 74, "avg_line_length": 38.833333333333336, "alnum_prop": 0.7339055793991416, "repo_name": "momi7495/CU-Boulder", "id": "89942fd6753e537c8eed3906ec00a1bf64267667", "size": "...
from gluon import * from s3 import * from s3layouts import * try: from .layouts import * except ImportError: pass import s3menus as default class S3MainMenu(default.S3MainMenu): """ Custom Application Main Menu: The main menu consists of several sub-menus, each of which can be cust...
{ "content_hash": "3d5825dc65a80b9be4e4a8cf5bf5a536", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 79, "avg_line_length": 36.34782608695652, "alnum_prop": 0.5376794258373205, "repo_name": "sammyshj/gci", "id": "b984f919c46a246e2634bf2a12ea1faf91ad272b", "size": "3369", ...
import os import subprocess def which(program): try: devnull = open(os.devnull) subprocess.Popen( [program], stdout=devnull, stderr=devnull).communicate() except OSError as e: if e.errno == os.errno.ENOENT: return False return True ...
{ "content_hash": "b729e55c5287d79cbda679d6449391fc", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 76, "avg_line_length": 24.12962962962963, "alnum_prop": 0.6193399846508059, "repo_name": "ryankanno/cookiecutter-flask-api", "id": "65fd009019b3eeaa2cdd9de532365d80e959e026",...
from distutils.core import setup from qrangeslider import __version__ setup(name='qrangeslider', version=__version__, description='The QRangeSlider class implements a horizontal PyQt range slider widget.', author='Ryan Galloway', author_email='ryan@rsgalloway.com', url='http://github.com/r...
{ "content_hash": "17d105705b7f682c158641c0fd8e966f", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 93, "avg_line_length": 38.7, "alnum_prop": 0.6976744186046512, "repo_name": "rsgalloway/QRangeSlider", "id": "76fd96a6274e1b39ae0bcd207f0d4dac5ca4d190", "size": "602", "b...
from __future__ import division, absolute_import from math import floor class Snapshot(object): """ A statistical snapshot of a set of values. """ MEDIAN_Q = 0.5 P75_Q = 0.75 P95_Q = 0.95 P98_Q = .98 P99_Q = .99 P999_Q = .999 def __init__(self, values): """ Cr...
{ "content_hash": "c78f173e0f23d67cb6b410df585acacf", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 75, "avg_line_length": 25.682539682539684, "alnum_prop": 0.5491347342398022, "repo_name": "dreid/yunomi", "id": "dd8afdf523a32ef4a510636f725c54c69395b68f", "size": "3236",...
import mock from rally.plugins.openstack.scenarios.quotas import quotas from tests.unit import test class QuotasTestCase(test.ClientsTestCase): def setUp(self): super(QuotasTestCase, self).setUp() self.context = { "user": {"tenant_id": "fake"}, "tenant": {"id": "fake"} ...
{ "content_hash": "989a45b86be052793039fcf24778d12d", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 79, "avg_line_length": 40.76923076923077, "alnum_prop": 0.6254716981132076, "repo_name": "vponomaryov/rally", "id": "31e91a3d3a091e5dcd8434b60c9a87e12d70ac45", "size": "274...
oneTypo = "It is <warning descr="BEEN_PART_AGREEMENT">friend</warning> of human" oneSpellcheckTypo = "It is <TYPO descr="Typo: In word 'frend'">frend</TYPO> of human" fewTypos = "It <warning descr="IT_VBZ">are</warning> working for <warning descr="MUCH_COUNTABLE">much</warning> warnings" ignoreTemplate = "It is {} frie...
{ "content_hash": "7dd1abf0cade5162fed62ef880c386ed", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 121, "avg_line_length": 73.70588235294117, "alnum_prop": 0.7198723064644852, "repo_name": "siosio/intellij-community", "id": "4e572f9eb452241981f2c1ca8a45378f2239527d", "si...
import dill def serialize(obj): return dill.dumps(obj) def deserialize(data): return dill.loads(data)
{ "content_hash": "3d9786c39e8e1fed666078ed40b87dcb", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 24, "avg_line_length": 15.142857142857142, "alnum_prop": 0.7547169811320755, "repo_name": "medo/Pandas-Farm", "id": "8ff85be6c1c1ba2fdc1f832d782d9ab3f59694fc", "size": "106"...
""" Copyright 2012 Ali Ok (aliokATapacheDOTorg) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
{ "content_hash": "ce98d6114a495839df797e870b8e6a59", "timestamp": "", "source": "github", "line_count": 681, "max_line_length": 133, "avg_line_length": 57.65932452276065, "alnum_prop": 0.6732542148423573, "repo_name": "aliok/trnltk", "id": "cd5a3085697f135c1e943a164a15cf1b64a32229", "size": "39424"...
from .is_json_where import is_json_where from .is_fixed import is_fixed is_json = is_json_where(is_fixed(True, 'json', 'data is json'))
{ "content_hash": "86facc66ca883dea15bb9a84a261a3b5", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 63, "avg_line_length": 27.6, "alnum_prop": 0.7101449275362319, "repo_name": "Daanvdk/is_valid", "id": "625480879c235cead70c07ef33f38e7ed365c9ac", "size": "138", "binary": ...
from django.db import models # Create your models here. class Publisher(models.Model): name = models.CharField(max_length=30) address = models.CharField(max_length=50) city = models.CharField(max_length=60) state_province = models.CharField(max_length=30) country = models.CharField(max_length=50) ...
{ "content_hash": "eb2a4982975796decbe5f8e3964168e8", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 64, "avg_line_length": 31, "alnum_prop": 0.6645161290322581, "repo_name": "hr4e/QuestionnaireQx", "id": "63e214cf71e3edae380ef9f5efc43c268286d587", "size": "1085", "binar...
import time import atexit import logging import threading import traceback logger = logging.Logger(__name__) import synapse.common as s_common import synapse.lib.task as s_task import synapse.lib.threads as s_threads from synapse.eventbus import EventBus class Sched(EventBus): def __init__(self, pool=None): ...
{ "content_hash": "7f1d23ac2357fa321dce8753f16db508", "timestamp": "", "source": "github", "line_count": 239, "max_line_length": 95, "avg_line_length": 25.573221757322177, "alnum_prop": 0.493782722513089, "repo_name": "vivisect/synapse", "id": "b94d2c46186e5f601bb74c1277a09d72171720cc", "size": "611...
try: from setuptools import setup except ImportError: from distutils.core import setup import pkg_resources import sys version = open('TileStache/VERSION', 'r').read().strip() def is_installed(name): try: pkg_resources.get_distribution(name) return True except: return False ...
{ "content_hash": "c76561bd5cd5809fbd5f94e32477bf2d", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 203, "avg_line_length": 32.325, "alnum_prop": 0.6465583913379737, "repo_name": "TileStache/TileStache", "id": "385984fe0c4049a84a2755101cfd677f60aabc56", "size": "1316", ...
""" Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import random import string from lib.core.enums import PRIORITY __priority__ = PRIORITY.LOW def tamper(payload, **kwargs): """ Replaces space character (' ') with a dash comment ('--') fo...
{ "content_hash": "88c422575a13e317c7a703e949439cc4", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 138, "avg_line_length": 26.933333333333334, "alnum_prop": 0.5734323432343235, "repo_name": "V11/volcano", "id": "cdd828d5693f512e12441cf9a99a11274b900af7", "size": "1235", ...
from mathbind.compilers.compiler import Compiler from mathbind.compilers.gcc import GccCompiler
{ "content_hash": "9a11e5634fc775c8edac3d301a749e2f", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 48, "avg_line_length": 47.5, "alnum_prop": 0.8842105263157894, "repo_name": "diogenes1oliveira/mathbind", "id": "4689b1d518da3a2b1426dbcabf345cb115432a37", "size": "95", "...
"""Operators that integrat with Google Cloud Build service.""" import re from copy import deepcopy from typing import Any, Dict, Iterable, Optional from urllib.parse import unquote, urlparse from airflow import AirflowException from airflow.gcp.hooks.cloud_build import CloudBuildHook from airflow.models import BaseOpe...
{ "content_hash": "9040a67b295bba3c737dd9b19a073edb", "timestamp": "", "source": "github", "line_count": 183, "max_line_length": 109, "avg_line_length": 33.25136612021858, "alnum_prop": 0.6218570254724733, "repo_name": "Fokko/incubator-airflow", "id": "e1a9d0256c925ef3530f3a966c75ad5966a48ac7", "siz...
import sys import telepot from telepot.delegate import per_inline_from_id, create_open, pave_event_space """ $ python3.5 inline.py <token> It demonstrates answering inline query and getting chosen inline results. """ class InlineHandler(telepot.helper.InlineUserHandler, telepot.helper.AnswererMixin): def __init__...
{ "content_hash": "475ee0943d8210471eddee8395c20142", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 95, "avg_line_length": 35.64102564102564, "alnum_prop": 0.6510791366906474, "repo_name": "TEJESH/gandhi", "id": "e7011df23d4807d3f423c6b92ac073fe4b80c1bb", "size": "1390", ...
""" Support for thr Free Mobile SMS platform. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.free_mobile/ """ import logging import voluptuous as vol from homeassistant.components.notify import ( PLATFORM_SCHEMA, BaseNotificationService) fro...
{ "content_hash": "a919545c22b7c4065fe71429109e4cf2", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 75, "avg_line_length": 34.03846153846154, "alnum_prop": 0.6830508474576271, "repo_name": "hexxter/home-assistant", "id": "e5209e06582067958138f6e01cf23be83ef37e5c", "size":...
import _plotly_utils.basevalidators class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scattergl", **kwargs): super(LegendwidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
{ "content_hash": "5e2dd9697ea755d28d59977d1ef3a077", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 85, "avg_line_length": 37.5, "alnum_prop": 0.6177777777777778, "repo_name": "plotly/plotly.py", "id": "013254c07f23aafde14c93bfd05e0ce6a2966f36", "size": "450", "binary":...
""" Django settings for heroku_blog project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ impor...
{ "content_hash": "0d3875de32e13c7c8842e979e5ed1007", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 150, "avg_line_length": 27.637037037037036, "alnum_prop": 0.704100777271509, "repo_name": "barbossa/django-heroku-blog", "id": "b97d7df5b5aa5f40bb278d42ffaa641412f0d5cc", ...
""" __graph_MT_post__ComponentPrototype.py___________________________________________________________ Automatically generated graphical appearance ---> MODIFY DIRECTLY WITH CAUTION ________________________________________________________________________________________ """ import tkFont from graphEntity import * ...
{ "content_hash": "55061f42b84486aa47bc242a342adbe3", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 221, "avg_line_length": 42.38095238095238, "alnum_prop": 0.5805243445692884, "repo_name": "levilucio/SyVOLT", "id": "a466a67bde7f1e081fdcfa23ef491e6454938c33", "size": "267...
"""Unit tests for Superset""" from datetime import datetime import imp import json from contextlib import contextmanager from typing import Any, Dict, Union, List, Optional from unittest.mock import Mock, patch, MagicMock import pandas as pd from flask import Response from flask_appbuilder.security.sqla import models ...
{ "content_hash": "f2790a64078e6932de9c7c435b62daf9", "timestamp": "", "source": "github", "line_count": 506, "max_line_length": 88, "avg_line_length": 33.4604743083004, "alnum_prop": 0.5981336010867639, "repo_name": "airbnb/caravel", "id": "20e324559363fc370ea145342722540e48aeaca5", "size": "17734"...
from panda3d.direct import ShowInterval from panda3d.core import Camera, Point3, Vec3, headsUp from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * import random import BattleParticles from BattleProps import * from BattleSounds import * import MovieCamera import Movi...
{ "content_hash": "5499657054e4cf7f83c73edf55260f6d", "timestamp": "", "source": "github", "line_count": 280, "max_line_length": 536, "avg_line_length": 41.785714285714285, "alnum_prop": 0.645042735042735, "repo_name": "DedMemez/ODS-August-2017", "id": "edebe22660e9db838492800eb1545fb934c1fc2a", "si...
beatbox.You.create_original_Universe() # Number of noise realizations to make numreal=1000 #Make the mock Universe beatbox.You.initiate_simulated_universe(printout=0) beatbox.You.all_simulated_universes[0].show_CMB_T_map(from_perspective_of="observer") MockUniverse = np.array([]) MockUniverse = np.append(MockUnivers...
{ "content_hash": "a2cdfd13153a6fde715097a5381ccae2", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 395, "avg_line_length": 38.833333333333336, "alnum_prop": 0.7001839362354384, "repo_name": "rogerblandford/Music", "id": "9e24322b69013fe6f8e56e367f919a69365fa6f3", "size"...
from authorize import BankAccount from authorize import Customer from authorize import AuthorizeResponseError from nose.plugins.attrib import attr from unittest import TestCase BANK_ACCOUNT = { 'routing_number': '322271627', 'account_number': '00987467838473', 'name_on_account': 'Rob Otron', } FULL_BANK...
{ "content_hash": "9f6ad855315e9ba8713712baf023774b", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 94, "avg_line_length": 30.878048780487806, "alnum_prop": 0.6330963665086888, "repo_name": "vcatalano/py-authorize", "id": "cbc01dc1d0cbf849e2043b24db33194e00042a16", "size"...
from .node import * from ..types import * from .description import * from .config import * from .standard import *
{ "content_hash": "2e9a5bb50675205fd8097252a676ba45", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 26, "avg_line_length": 22.8, "alnum_prop": 0.7368421052631579, "repo_name": "JonatanAntoni/CMSIS_5", "id": "85792451e3b63cddd3fa55720b5212a1fbe2882a", "size": "114", "bina...
TARGETS = [ 'MapSimple.py', 'ControlDisableUI.py', 'ControlOptions.py', 'ControlSimple.py', 'DirectionsSimple.py', 'EventArguments.py', 'EventClosure.py', 'EventProperties.py', 'EventSimple.py', 'GeocodingSimple.py', ] PACKAGE = { 'title': 'Google Maps Example', 'desc':...
{ "content_hash": "749802eb6cd85aeb850c2aec0b676092", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 77, "avg_line_length": 21.70689655172414, "alnum_prop": 0.6092136616362193, "repo_name": "pyjs/pyjs", "id": "a697b12ecb83a8c6c7c45b738db10e257f20cdf8", "size": "1307", "b...
from typing import List, Tuple from asn1crypto.cms import CMSAttribute from cryptography.exceptions import InvalidSignature from flask import request, g, current_app, abort from functools import wraps from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primit...
{ "content_hash": "54ef761fc66b8cfed112397fab335712", "timestamp": "", "source": "github", "line_count": 138, "max_line_length": 113, "avg_line_length": 38.369565217391305, "alnum_prop": 0.6536355051935788, "repo_name": "mosen/commandment", "id": "f7bdac7170b174de17fc4982b4b2e9789d84c4c0", "size": "...
"""Illustrates the use of Struct classes, and their differences from normal classes and namedtuples. """ from collections import namedtuple from simplestruct import Struct, Field ############################################################################### # Definition ...
{ "content_hash": "1357dc1a35d496423575b9cd09f0de53", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 79, "avg_line_length": 37.373831775700936, "alnum_prop": 0.5136284071017755, "repo_name": "brandjon/simplestruct", "id": "d54aeebf21f7e36482a32d6d4d891a3de91e0336", "size"...
from django.db import models from django.utils.translation import ugettext_lazy as _ from lino.api import dd, rt from lino import mixins #~ from lino.models import SiteConfig #~ from lino_xl.lib.contacts import models as contacts #~ from lino_xl.lib.cal import models as cal contacts = dd.resolve_app('contacts') #~ ...
{ "content_hash": "80993dc5d883c687f1cdfe5b3142e361", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 76, "avg_line_length": 28.22012578616352, "alnum_prop": 0.5932694450635169, "repo_name": "khchine5/book", "id": "3a05ab716f1a90a322e1b91098613f3c8bceddba", "size": "4567",...
''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default=True) TEMPLATES[1]['OPT...
{ "content_hash": "6bbfb36710d8fe39949b6e6bfa2a4ad5", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 110, "avg_line_length": 30.345454545454544, "alnum_prop": 0.4865188735769922, "repo_name": "HelsinkiHacklab/asylum", "id": "0d89e0e7145d00e0dbc7779198e003b42ae79e06", "size...
from JumpScale import j import JumpScale.grid.osis import JumpScale.baselib.redis import JumpScale.lib.rogerthat import JumpScale.portal try: import ujson as json except ImportError: import json import time import sys import os import inspect import gevent class Handler(object): ORDER = 50 def __init...
{ "content_hash": "85b9185b6f01489fa5027c6487d5d7b1", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 110, "avg_line_length": 36.100628930817614, "alnum_prop": 0.5874564459930314, "repo_name": "Jumpscale/jumpscale6_core", "id": "08701b11bedcde69eede561ab012948dcbfb805e", "...
r"""Train and export a simple Softmax Regression TensorFlow model. The model is from the TensorFlow "MNIST For ML Beginner" tutorial. This program simply follows all its training instructions, and uses TensorFlow SavedModel to export the trained model with proper signatures that can be loaded by standard tensorflow_mo...
{ "content_hash": "a71dbd925c9b994be59c2d384231ffc6", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 80, "avg_line_length": 38.396946564885496, "alnum_prop": 0.6789264413518886, "repo_name": "penguin138/serving", "id": "579410e14c1d0c7d40c42185d08ef958429cefc8", "size": "...
import json import os from uuid import uuid4 import multiprocessing import requests import time import sys from data_connection import DataConnection class Configurator(object): """ Manages a config for the Local Computer """ def __init__(self, **kwargs): if "filename" in kwargs: ...
{ "content_hash": "5c9922aa65cdb031d523407663a50c0b", "timestamp": "", "source": "github", "line_count": 196, "max_line_length": 105, "avg_line_length": 32.64795918367347, "alnum_prop": 0.5902484763244257, "repo_name": "BARCproject/barc", "id": "dc6d5c27d6c34e83f0c46c25a952900f25cb9063", "size": "63...
"""ACME Identifier Validation Challenges.""" import abc import functools import hashlib import logging import socket from cryptography.hazmat.primitives import hashes import OpenSSL import requests from acme import errors from acme import crypto_util from acme import fields from acme import jose from acme import othe...
{ "content_hash": "74c20a6cd3d197bf22017a0d36633a87", "timestamp": "", "source": "github", "line_count": 645, "max_line_length": 80, "avg_line_length": 31.27596899224806, "alnum_prop": 0.6321320577008873, "repo_name": "kuba/letsencrypt", "id": "68bf3fce4f5c7c115ab2502d0f0d15d09185a813", "size": "201...
XXXXXXXXX XXXXX XXXXXX XXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXX X XXXXXXX XXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXX...
{ "content_hash": "ef1fca411745ff5c932fed55dad8b727", "timestamp": "", "source": "github", "line_count": 816, "max_line_length": 167, "avg_line_length": 27.040441176470587, "alnum_prop": 0.7451167006571493, "repo_name": "dnaextrim/django_adminlte_x", "id": "555f187e352ef0018230bdf0d34a58df0ff76b8a", ...
from .vkapi import * from typing import Dict, List, Optional, Callable, Tuple, Union import dataclasses from dataclasses import dataclass @dataclass class HandleCreateCommand: """Information about a handle-creation command Args: command: handle creation command (e.g. vkCreateImage) parent_param: paramete...
{ "content_hash": "fb998ff6f914fa4e59c587d539373cc2", "timestamp": "", "source": "github", "line_count": 440, "max_line_length": 96, "avg_line_length": 34.986363636363635, "alnum_prop": 0.6681174483565026, "repo_name": "googlestadia/vkspecgen", "id": "44cffd224d6034b6297d31803745b51e9a6a7ad2", "size...
import tkinter from time import strftime class Relogio(tkinter.Label): def __init__(self): tkinter.Label.__init__(self) self.pack() self['text'] = strftime('%H:%M:%S') self['font'] = 'Helvetica 120 bold' self.tictac() def tictac(self): agora = strftime('%H:%M:...
{ "content_hash": "74bd840a9992188ba6f0241f6f3507b8", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 43, "avg_line_length": 21.952380952380953, "alnum_prop": 0.544468546637744, "repo_name": "pythonprobr/oopy", "id": "e1ac857c5d9bb0971f1143ca7b94707af7fd8cd8", "size": "461"...
import _plotly_utils.basevalidators class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): super(OrientationValidator, self).__init__( ...
{ "content_hash": "ff000592a6a63617414f6a8b9a245122", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 77, "avg_line_length": 31.058823529411764, "alnum_prop": 0.5814393939393939, "repo_name": "plotly/plotly.py", "id": "31206068114b584c73ff7c900f47be5ba3da5020", "size": "528...
from akanda.rug.openstack.common.gettextutils import _ from akanda.rug.openstack.common import log as logging from akanda.rug.openstack.common.notifier import rpc_notifier LOG = logging.getLogger(__name__) def notify(context, message): """Deprecated in Grizzly. Please use rpc_notifier instead.""" LOG.deprec...
{ "content_hash": "b8123d6db678ca42ee9bac3005f4bed6", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 65, "avg_line_length": 36.07692307692308, "alnum_prop": 0.7249466950959488, "repo_name": "dreamhost/akanda-rug", "id": "2718971db287f4908a88de3a40f457e5ecc6be7a", "size": "...
import pytest from xpaw.spider import Spider from xpaw import events from .crawler import Crawler class FooSpider(Spider): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.data = self.config['data'] def open(self): super().open() self.data['open'] ...
{ "content_hash": "659187f735aef4778f432de798ff01ca", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 57, "avg_line_length": 25.029411764705884, "alnum_prop": 0.6415981198589894, "repo_name": "jadbin/xpaw", "id": "5cf0cfb5ecc23fae00721131418e8865264d504b", "size": "867", ...
"""empty message Revision ID: 1f9c61031fa Revises: 1f872d11bbf Create Date: 2016-01-24 17:46:54.879784 """ # revision identifiers, used by Alembic. revision = '1f9c61031fa' down_revision = '1f872d11bbf' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - plea...
{ "content_hash": "5311c699fea0924189c0e76e68e34ea6", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 75, "avg_line_length": 27.176470588235293, "alnum_prop": 0.658008658008658, "repo_name": "Encrylize/flask-blogger", "id": "758784e458a4c71a4f0a971a3f0d56da34059173", "size"...
import webob from nova.api.openstack.compute.contrib import server_groups from nova.api.openstack.compute.plugins.v3 import server_groups as sg_v3 from nova.api.openstack import extensions from nova import context import nova.db from nova import exception from nova import objects from nova.openstack.common import uuid...
{ "content_hash": "bed16061068b677941038a050524c07b", "timestamp": "", "source": "github", "line_count": 337, "max_line_length": 79, "avg_line_length": 40.0919881305638, "alnum_prop": 0.581896232699282, "repo_name": "orbitfp7/nova", "id": "69642119106271f93f18f753d4e03a49096ccfdf", "size": "14150", ...
from django.shortcuts import render from django.shortcuts import HttpResponseRedirect from . import NEO from . import get_online_data # Create your views here. from .NEO import Get_UserData def index(request): return render(request,'index.html',{'title':'Welcome To Train Prediction'}) def handle_query(request): ...
{ "content_hash": "b99595e596c40a0975945390df101786", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 86, "avg_line_length": 26.35135135135135, "alnum_prop": 0.602051282051282, "repo_name": "abhi98khandelwal/HINT", "id": "c380dee774a31ea073544513ca26d792a56ffbb3", "size": "...
import pytest from tests.support.asserts import assert_error, assert_success from tests.support.image import png_dimensions from . import element_dimensions def take_element_screenshot(session, element_id): return session.transport.send( "GET", "session/{session_id}/element/{element_id}/screensho...
{ "content_hash": "2cd711e4d9756dcfdf9ae2dbcbc1bb0a", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 89, "avg_line_length": 32.8125, "alnum_prop": 0.7092063492063492, "repo_name": "nwjs/chromium.src", "id": "79ffa15b7461ac6e2ae7087090fafc0ae91cd4fe", "size": "1575", "bin...