text
stringlengths
4
1.02M
meta
dict
""" WSGI config for quantvc project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "quantvc.settings.product") from djang...
{ "content_hash": "5b74b3b12f64f4a3a353f838d691be21", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 78, "avg_line_length": 28.357142857142858, "alnum_prop": 0.7758186397984886, "repo_name": "quantvc/simple-django", "id": "9ba288df1ad85e06d64f7eddd7cd28702206ee4b", "size":...
""" WSGI config for sandbox project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
{ "content_hash": "3b122a5dd347a572876d38c4ad31b21b", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 78, "avg_line_length": 24.5, "alnum_prop": 0.7704081632653061, "repo_name": "nshafer/django-hashid-field", "id": "45f74d65bcdee343435c4d12880b12f52083273a", "size": "392", ...
from nova.openstack.common import log as logging from webob import Request, Response import json import copy from cimibase import Controller, Consts from cimibase import make_response_data from cimiutils import concat, match_up, remove_member from cimiutils import map_image_state LOG = logging.getLogger(__name__) c...
{ "content_hash": "af5f134c29708fb936563b6d8cc633b5", "timestamp": "", "source": "github", "line_count": 149, "max_line_length": 78, "avg_line_length": 38.718120805369125, "alnum_prop": 0.4924596983879355, "repo_name": "osaddon/cimi", "id": "d63ab3aa5e9eb7fa5becea3059f5dd305fba6505", "size": "6370",...
from datetime import datetime, timedelta import urllib from django.urls import reverse from django.test import TestCase from apps.push.models import PushSubscription, PushSubscriptionManager from apps.push.signals import pre_subscribe, verified, updated class MockResponse(object): def __init__(self, status, data...
{ "content_hash": "f1d4331bc5cd4c0a7bc1a3101211f249", "timestamp": "", "source": "github", "line_count": 442, "max_line_length": 97, "avg_line_length": 41.1764705882353, "alnum_prop": 0.5691758241758241, "repo_name": "samuelclay/NewsBlur", "id": "8aac0d88287a9579e90d9f6a079afb4e6ce8deeb", "size": "1...
formatter = "%r %r %r %r" # put each variable/string into the string defined as 'formatter' print formatter % (1,2,3,4) print formatter % ("one", "two", "three", "four") print formatter % (True, False, False, True) # line 8 will insert the 'formatter' string (exactly as it looks above) into each space in the 'formatte...
{ "content_hash": "fe61ae5c0c56375075716fa1af34ec70", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 153, "avg_line_length": 53.470588235294116, "alnum_prop": 0.7117711771177118, "repo_name": "madeleinel/Cheat-Sheets", "id": "7a5be85960671f2f071980a6b08cd5a0156ebd21", "siz...
import collections import os import eventlet from neutron_lib import constants from neutron_lib import exceptions from oslo_config import cfg from oslo_log import log as logging import oslo_messaging from oslo_service import loopingcall from oslo_utils import importutils from neutron._i18n import _, _LE, _LI, _LW fro...
{ "content_hash": "c34f5bfcf765b9010c56ae843557fa58", "timestamp": "", "source": "github", "line_count": 642, "max_line_length": 79, "avg_line_length": 42.42834890965732, "alnum_prop": 0.5797569661147619, "repo_name": "bigswitch/neutron", "id": "e7c8a517d96eb544953c717b4ddc9be69c27d485", "size": "27...
vid_stopwords=["introduction", "appendix", "contents", "topic", "concepts", "references", "future work", "what next", "basics", "questions", "application", "history", "thank you", "conclusion", "acknowledgement", "production team"]
{ "content_hash": "a83f40bb3d382142c5567431e6d1bab0", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 30, "avg_line_length": 14.5, "alnum_prop": 0.6939655172413793, "repo_name": "amudalab/concept-graphs", "id": "2e7dc0e85af66667d4b9ff42ac855a143255fb12", "size": "232", "b...
"""Imports for Python API. This file is MACHINE GENERATED! Do not edit. Generated by: tensorflow/tools/api/generator/create_python_api.py script. """ from tensorflow.python.keras._impl.keras.datasets.cifar10 import load_data
{ "content_hash": "a2e53eeb6e9258e19cdb4050ecefe706", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 74, "avg_line_length": 37.5, "alnum_prop": 0.7911111111111111, "repo_name": "ryfeus/lambda-packs", "id": "747559887c5c86b4f7f370ad2f70b35470b878a9", "size": "225", "binary...
from . import colorspace
{ "content_hash": "dedd0d45558bc4fb112768ca0e43e78a", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 24, "avg_line_length": 25, "alnum_prop": 0.8, "repo_name": "khdlr/augmax", "id": "4925dff8725c3f756f341aaacc06560e442e9ad4", "size": "25", "binary": false, "copies": "1"...
from nose.tools import raises from nose.plugins.attrib import attr from requests import HTTPError from rightscale import RightScale @raises(ValueError) def test_empty_api_endpoint(): rs = RightScale(refresh_token='not empty', api_endpoint='') rs.login() @raises(ValueError) def test_empty_refresh_token(): ...
{ "content_hash": "b41f50c543cfa3e39751df0a56991122", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 63, "avg_line_length": 22, "alnum_prop": 0.7178030303030303, "repo_name": "brantai/python-rightscale", "id": "50b3de0d46b750e33a374e6b1bceac75b349a4f9", "size": "528", "b...
import eventlet from eventlet import semaphore from unittest import mock from mistral.api.controllers.v2 import execution from mistral import context from mistral.db.v2 import api as db_api from mistral.services import workflows as wf_service from mistral.tests.unit.api import base from mistral.tests.unit import base ...
{ "content_hash": "6ae895d13ead3fc1b31cb60d104e802d", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 77, "avg_line_length": 31.058823529411764, "alnum_prop": 0.6237373737373737, "repo_name": "openstack/mistral", "id": "9e5da5601dea95b3b2992830078740d14a185a2d", "size": "3...
from fabkit import filer, sudo, env, Service from fablib.base import SimpleBase class Gluster(SimpleBase): def __init__(self): self.data_key = 'gluster' self.data = { } self.services = { 'CentOS Linux 7.*': [ 'glusterd', ] } ...
{ "content_hash": "0f4192a44f24627387e229a99c7a7145", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 87, "avg_line_length": 29.705128205128204, "alnum_prop": 0.4812257229175658, "repo_name": "fabrickit-fablib/gluster", "id": "bfb616ffdcd1291cbbb7ba06a6f877a09da778b7", "siz...
from PyQt4 import QtGui # Import the PyQt4 module we'll need from PyQt4.QtCore import QElapsedTimer from PyQt4.QtCore import QThread from PyQt4.QtCore import SIGNAL from PyQt4 import QtCore import sys import os import time import math import random #python -m pip install pyaudio #sudo apt-get install python-pyaudi...
{ "content_hash": "afd988d7cf9eda23382d432f816abb7d", "timestamp": "", "source": "github", "line_count": 705, "max_line_length": 371, "avg_line_length": 50.727659574468085, "alnum_prop": 0.6100998238402818, "repo_name": "mpatacchiola/naogui", "id": "db53747330efec2fb5192cbd399b1ee162a2dd9f", "size":...
from __future__ import with_statement import os import stat import sys import tempfile import unittest from filesystem import FileSystem class FileSystemTest(unittest.TestCase): def setUp(self): self._this_dir = os.path.dirname(os.path.abspath(__file__)) self._missing_file = os.path.join(self._t...
{ "content_hash": "5cebdec6a982b667d1895b98875ffd96", "timestamp": "", "source": "github", "line_count": 173, "max_line_length": 80, "avg_line_length": 32.895953757225435, "alnum_prop": 0.579687225443683, "repo_name": "mogoweb/webkit_for_android5.1", "id": "8d4f0cb638bddd41a8edfec99e8fd7801f8bc035", ...
from django.forms import ValidationError from cyder.cydns.domain.models import Domain from cyder.cydns.views import CydnsCreateView from cyder.cydns.views import CydnsDeleteView from cyder.cydns.views import CydnsDetailView from cyder.cydns.views import CydnsListView from cyder.cydns.views import CydnsUpdateView
{ "content_hash": "847f9f4391a08f9f71ae0e36c7a618b7", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 45, "avg_line_length": 39.375, "alnum_prop": 0.8634920634920635, "repo_name": "ngokevin/cyder", "id": "2fa9334b7b6a99df95b3a6b112a0dc7a5b25e97f", "size": "315", "binary": ...
from flexmock import flexmock, flexmock_teardown from orator.connections import Connection from orator.schema.grammars import MySQLSchemaGrammar from orator.schema.blueprint import Blueprint from orator.connectors import MySQLConnector from ... import OratorTestCase class MySQLSchemaGrammarTestCase(OratorTestCase): ...
{ "content_hash": "a5a5cc3dd67185f689a7d5d19615abe8", "timestamp": "", "source": "github", "line_count": 658, "max_line_length": 103, "avg_line_length": 35.10334346504559, "alnum_prop": 0.6007446532167288, "repo_name": "Hanaasagi/sorator", "id": "b4fe1667850e301b6c692542f38ce75569f08409", "size": "2...
import requests import logging class TgbotConnection: REQUEST_TIMEOUT = 30 def __init__(self, token): self.token = token def apiurl(self, method): return 'https://api.telegram.org/bot{}/{}'.format(self.token, method) def makeRequest(self, reqname, **params): retries = 0 ...
{ "content_hash": "8f5628c6bc2b6fc3f7eff041d1634fe8", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 137, "avg_line_length": 46.641304347826086, "alnum_prop": 0.5422978326730366, "repo_name": "sooda/askibot-tg", "id": "bcbc758dd2bc22b90a9eb889f865ad7dcf582af6", "size": "42...
"""CGI-savvy HTTP Server. This module builds on SimpleHTTPServer by implementing GET and POST requests to cgi-bin scripts. If the os.fork() function is not present (e.g. on Windows), os.popen2() is used as a fallback, with slightly altered semantics; if that function is not present either (e.g. on Macintosh), only Py...
{ "content_hash": "076b7cc790a98405661b876c472d3be4", "timestamp": "", "source": "github", "line_count": 377, "max_line_length": 79, "avg_line_length": 34.745358090185675, "alnum_prop": 0.5494312542942209, "repo_name": "shiblon/pytour", "id": "2acf913155098aeb0acfea77f033e289aa8ac0c9", "size": "1309...
import warnings warnings.warn( "The wagtail.wagtailcore.util module has been renamed. " "Use wagtail.wagtailcore.utils instead.", DeprecationWarning) from .utils import *
{ "content_hash": "569e000f1e2a16bd78bd31af2efe0220", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 65, "avg_line_length": 25.857142857142858, "alnum_prop": 0.7569060773480663, "repo_name": "lojack/wagtail", "id": "842fe24faeaf3d9370e2724c232774b297b77d79", "size": "181", ...
import unittest from unittest.mock import patch, call, Mock import numpy as np from pygwyfile._libgwyfile import ffi from pygwyfile.gwyfile import GwyfileErrorCMsg from pygwyfile.gwygraph import GwyGraphCurve, GwyGraphModel class GwyGraphModel_init(unittest.TestCase): """Test constructor of GwyGraphModel class ...
{ "content_hash": "4f2aec73340bec2707375dea7c563ce2", "timestamp": "", "source": "github", "line_count": 1324, "max_line_length": 78, "avg_line_length": 35.188066465256796, "alnum_prop": 0.5640387215866406, "repo_name": "dmitry-streltsov/gwy-postgresql", "id": "23212eab7706eeebf71a56c3786c24e6521abef1...
import json import traceback from typing import Dict, cast import ansible_runner import demistomock as demisto # noqa: F401 import ssh_agent_setup from CommonServerPython import * # noqa: F401 # Dict to Markdown Converter adapted from https://github.com/PolBaladas/torsimany/ def dict2md(json_block, depth=0): m...
{ "content_hash": "6e756619dc9350c9565eac1f225cd84e", "timestamp": "", "source": "github", "line_count": 423, "max_line_length": 109, "avg_line_length": 56.81323877068558, "alnum_prop": 0.6312832889480693, "repo_name": "demisto/content", "id": "c62ddfcde20e40bca5ab0c76df0f397bf947ced5", "size": "240...
from os.path import dirname, join from setuptools import setup, find_packages with open(join(dirname(__file__), 'scrapy/VERSION'), 'rb') as f: version = f.read().decode('ascii').strip() setup( name='Scrapy', version=version, url='http://scrapy.org', description='A high-level Web Crawling and Scr...
{ "content_hash": "226fd7674e13db205f0446c1fd1d91e8", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 79, "avg_line_length": 31.75, "alnum_prop": 0.5964566929133859, "repo_name": "ramiro/scrapy", "id": "d463bccd9abfd97223584dbd5c13112ec35c09bc", "size": "1524", "binary": ...
import logging import os import sys class ResultProcessorBase(object): """A result processor. Each defined result processor will be asked if it can process new results""" def __init__(self): """Init the result processor base """ self._log = logging.getLogger("ResultProc").getChild...
{ "content_hash": "a9b5114ecc2dde290f31fd69e26a422f", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 90, "avg_line_length": 33.3, "alnum_prop": 0.6696696696696697, "repo_name": "talus-framework/talus-master", "id": "6d819795d5146373e4b5417c67cbb0aa356f53d7", "size": "1041"...
"""Script to run feeder via command line Usage: yo-ci get <ci> <type> [--config=<path> -v] yo-ci get <ci> <type> <name> [--config=<path> -v] yo-ci --version Arguments: get Gets info for type Options: -h --help Show this screen. -c --config=<path> Pat...
{ "content_hash": "023d209fc94137ddf970555730524bd2", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 72, "avg_line_length": 25.285714285714285, "alnum_prop": 0.5440677966101695, "repo_name": "cloudify-cosmo/yo-ci", "id": "dc7539dc571011d487ddbb024c81ef761443e038", "size": ...
""" Utilities for converting to/from a tuple of ords (c) 2015 Matthew Cotton """ def ords(string): """Convert string to tuple of ints""" return tuple(ord(c) for c in string) def chars(tup): """Convert tuple of ints to string""" return ''.join(chr(o) for o in tup)
{ "content_hash": "28f35c6c3caf594f953ec07a98d5419d", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 48, "avg_line_length": 21.76923076923077, "alnum_prop": 0.6501766784452296, "repo_name": "MattCCS/PyGetch", "id": "ce1fc7bbcc5d3382a105912339e124093fb3fe06", "size": "283",...
def tags_as_list(tags) -> list: if tags is None: return [] if isinstance(tags, (list, tuple)): return list(tags) elif isinstance(tags, dict): return sorted([ ':'.join([str(k), str(v)]) if v else k for k, v in tags.items() ]) raise ValueError('unexp...
{ "content_hash": "ad05c70ec3189b5963fa231920389758", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 58, "avg_line_length": 26.266666666666666, "alnum_prop": 0.565989847715736, "repo_name": "managedbyq/mbq.metrics", "id": "a49ccf71ff399044de19e0681eded4f5d8af7339", "size":...
from django.core.checks import ( # pylint: disable=redefined-builtin Tags, Warning, register, ) from django.utils.module_loading import import_string from axes.backends import AxesBackend from axes.conf import settings class Messages: CACHE_INVALID = ( "You are using the django-axes cache ha...
{ "content_hash": "3d34305e22462be47d832fb8db90e8e5", "timestamp": "", "source": "github", "line_count": 141, "max_line_length": 123, "avg_line_length": 32.00709219858156, "alnum_prop": 0.6306226456902282, "repo_name": "django-pci/django-axes", "id": "fabc2c979cbcf0fb5847745c602e95eb8eb13070", "size...
f_in_trn = 'Data/images_train' f_in_tst = 'Data/images_test' f_in_sol = 'Data/train_solutions.csv' f_in_flat_trn = 'Data/train_.csv' f_in_flat_tst = 'Data/test_.csv' f_out_trn = 'Data/train_32_deskew.csv' f_out_tst = 'Data/test_32_deskew.csv' f_out_subm = 'Submissions/ls_32_deskew.csv' # Process images from readData...
{ "content_hash": "b976960fe61d5f811a04566873e073c5", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 77, "avg_line_length": 27.229885057471265, "alnum_prop": 0.6817222456732799, "repo_name": "mattdelhey/kaggle-galaxy", "id": "13ecfb059cf21bf30eb7d1cafb658a7830d7a739", "siz...
from __future__ import absolute_import, division, print_function, unicode_literals from botocore.exceptions import ClientError from concurrent.futures import as_completed from datetime import datetime from c7n.actions import BaseAction, ModifyVpcSecurityGroupsAction from c7n.filters.kms import KmsRelatedFilter from c...
{ "content_hash": "54dd29daa06a81681f25224a91d4f4e5", "timestamp": "", "source": "github", "line_count": 628, "max_line_length": 100, "avg_line_length": 32.68312101910828, "alnum_prop": 0.5811449451887941, "repo_name": "kapilt/cloud-custodian", "id": "bf3aa1437130c29473dccd0742680589c2b0d92c", "size...
from __future__ import unicode_literals import frappe @frappe.whitelist() def get_app_list(): out = {} installed = frappe.get_installed_apps() for app in frappe.get_all_apps(True): app_hooks = frappe.get_hooks(app_name=app) if app_hooks.get('hide_in_installer'): continue out[app] = {} for key in ("app_...
{ "content_hash": "83573bd376f69139dc069546a2054edd", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 69, "avg_line_length": 25.391304347826086, "alnum_prop": 0.636986301369863, "repo_name": "gangadhar-kadam/hrfrappe", "id": "ade393014cf10090f3c35b3602de69447b9dc761", "size...
from cursive import exception as cursive_exception from cursive import signature_utils import glance_store import mock from glance.common import exception import glance.location from glance.tests.unit import base as unit_test_base from glance.tests.unit import utils as unit_test_utils from glance.tests import utils ...
{ "content_hash": "204cf81917543a3c79b49056ac7062a8", "timestamp": "", "source": "github", "line_count": 901, "max_line_length": 79, "avg_line_length": 41.490566037735846, "alnum_prop": 0.6053553754380333, "repo_name": "rajalokan/glance", "id": "4fabf4817f04151bdb839643e203941987186ee3", "size": "38...
""" SARSA Agent This file builds upon the same functions as Q-learning agent (qlearning.py). Here's usage example: from sarsa import SarsaAgent agent = SarsaAgent( alpha=0.1,epsilon=0.25,discount=0.99, getLegalActions = lambda s: actions_from_that_state) action = agent.getAction(state) ...
{ "content_hash": "1d531253cca230d03781dcaf4639e0f9", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 91, "avg_line_length": 29.824074074074073, "alnum_prop": 0.6128531511952809, "repo_name": "Scitator/rl-course-experiments", "id": "ebfb9c137a749a880404525f377d24365f6237b1",...
"""Test template support in VTK-Python VTK-python decides which template specializations to wrap according to which ones are used in typedefs and which ones appear as superclasses of other classes. In addition, the wrappers are hard-coded to wrap the vtkDenseArray and vtkSparseArray classes over a broad range of types...
{ "content_hash": "48c9bdbd89b4b57eebd9b97f3b1ac758", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 72, "avg_line_length": 36.225, "alnum_prop": 0.5017253278122843, "repo_name": "biddisco/VTK", "id": "cdf349ce5dc3e72934052133b799be78cf9a67eb", "size": "4369", "binary":...
"""Train simple phi model.""" import collections import random from absl import app from absl import flags from absl import logging import numpy as np import sonnet as snt import tensorflow.compat.v1 as tf import tree from option_keyboard import scavenger from option_keyboard import smart_module FLAGS = flags.FLAG...
{ "content_hash": "5999f798b1f932fa573331f0cc741463", "timestamp": "", "source": "github", "line_count": 252, "max_line_length": 79, "avg_line_length": 32.36507936507937, "alnum_prop": 0.6402648357037763, "repo_name": "deepmind/deepmind-research", "id": "2b637deef563687b0d4efdb3aca9c3e12b7371b4", "s...
import jsonschema from mock import MagicMock from mock import Mock from mock import patch from testtools import TestCase from testtools.matchers import Is, Equals from trove.cluster import models from trove.cluster.models import Cluster from trove.cluster.service import ClusterController from trove.cluster import view...
{ "content_hash": "0837e749c1f0a066db4b9f3a938b7fa1", "timestamp": "", "source": "github", "line_count": 370, "max_line_length": 79, "avg_line_length": 35.78108108108108, "alnum_prop": 0.50079311126218, "repo_name": "changsimon/trove", "id": "4e29f5562d10f76d677860d7ba323f7903bc2810", "size": "13880...
"""Utilities to manipulate TensorProtos.""" import numpy as np from tensorboard.compat.proto import tensor_pb2 from tensorboard.compat.tensorflow_stub import dtypes, compat, tensor_shape def ExtractBitsFromFloat16(x): return np.asarray(x, dtype=np.float16).view(np.uint16).item() def SlowAppendFloat16ArrayToTe...
{ "content_hash": "09429acbbfa5a6bf855232669181d652", "timestamp": "", "source": "github", "line_count": 605, "max_line_length": 85, "avg_line_length": 34.897520661157024, "alnum_prop": 0.6292331738739165, "repo_name": "tensorflow/tensorboard", "id": "013b62909f8e212a868be9cbd40a74bb9c2d044d", "size...
from __future__ import unicode_literals from django.conf import settings from django.test import TestCase, override_settings from staticgen.exceptions import StaticgenError from staticgen.staticgen_crawler import StaticgenCrawler class TestStaticgenCrawler(TestCase): def setUp(self): self.crawler = Sta...
{ "content_hash": "2c80ef14e6558018b38c2e6bb23040f6", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 96, "avg_line_length": 38, "alnum_prop": 0.6429824561403509, "repo_name": "mishbahr/django-staticgen", "id": "c66d940363614f3812c9a8eb65e23c26c9794dd8", "size": "2305", "...
import textwrap def wrap(string, max_width): return textwrap.wrap(string, max_width) if __name__ == '__main__': string, max_width = input(), int(input()) print('\n'.join(wrap(string, max_width)))
{ "content_hash": "b2f6fbd1025e73652532e0517a938103", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 45, "avg_line_length": 26.125, "alnum_prop": 0.631578947368421, "repo_name": "neiesc/Problem-solving", "id": "9f172f3fc50fd3de25819d01538a1c607dff35b3", "size": "295", "bi...
from setuptools import setuptools VERSION = "0.1.0" setup( name='techblog', version=VERSION, description="Blog for Coders and Photographers", zip_safe=False, license="MIT", author="Will McGugan", author_email="willmcgugan@gmail.com", url="https://github.com/moyaproject/moya-techblog", ...
{ "content_hash": "8de9f6d31e21fb85ae62e96a2961c089", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 55, "avg_line_length": 19.40909090909091, "alnum_prop": 0.6206088992974239, "repo_name": "moyaproject/moya-techblog", "id": "1dafa036d3e90c0bcceec24674af2c2720c35ab2", "siz...
from bitcoin import * from txUtils import * from jsonConn import * from time import sleep # Ptx=makePtx(script, privtopub(rKeyClient), uKeyServer, 50000) # clientSig = multisign(Ptx, 0, script, rKeyClient) # conn.jsend(Ptx)# # conn.jsend(clientSig)# def paymentSpin(redeemScript, conn, privkeyC, pubkeyS, incre...
{ "content_hash": "471f5b784d926a8ae84a786f3478e0ec", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 120, "avg_line_length": 26.24, "alnum_prop": 0.7327235772357723, "repo_name": "samnet/bybit", "id": "07c61e2fae6b8b916605f1e32373205f22b3de87", "size": "1968", "binary": ...
from .models import User, get_todays_recent_offers from flask import Flask, request, session, redirect, url_for, render_template, flash app = Flask(__name__) @app.route('/') def index(): offers = get_todays_recent_offers() return render_template('welcome.html', offers=offers) @app.route('/register', methods=...
{ "content_hash": "6605262b58f4216aa4e2435c7ab7d97c", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 84, "avg_line_length": 29.546296296296298, "alnum_prop": 0.6120338451895957, "repo_name": "brennv/karma", "id": "b92e164d8f78f2bb574126b92e40682458bb5e8b", "size": "3191",...
from datetime import datetime from copy import copy from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.functional import curry from django_statemodel.signals import save_timestamp_cache, set_default_state OPTIONS_...
{ "content_hash": "b86cf9d990bae7664c8c231671f1369f", "timestamp": "", "source": "github", "line_count": 206, "max_line_length": 80, "avg_line_length": 42.33980582524272, "alnum_prop": 0.5575556065122679, "repo_name": "MerchantAtlas/django-statemodel", "id": "c118f53eb3d60ca4594eebed1168d955717f879b",...
""" Unit Tests for manila.share.rpcapi. """ import copy from oslo_config import cfg from oslo_serialization import jsonutils from manila.common import constants from manila import context from manila.share import rpcapi as share_rpcapi from manila import test from manila.tests import db_utils CONF = cfg.CONF clas...
{ "content_hash": "d6d4333d07416e7bf1cb7bc30f20ab72", "timestamp": "", "source": "github", "line_count": 237, "max_line_length": 78, "avg_line_length": 39.48101265822785, "alnum_prop": 0.5082825691995297, "repo_name": "scality/manila", "id": "6f24dac823a9ca86b46d33b150461a8ef93b6a0f", "size": "9960"...
import sys import os import argparse import itertools from fractions import Fraction as Frac try: # Python 3 from tkinter import * from tkinter import filedialog except ImportError: # Python 2 from Tkinter import * import tkFileDialog as filedialog from level import Level, Coord, Tiles class F...
{ "content_hash": "dcdf7e0c3701881ec7c32cfa332346de", "timestamp": "", "source": "github", "line_count": 177, "max_line_length": 114, "avg_line_length": 34.112994350282484, "alnum_prop": 0.5808214640609474, "repo_name": "liam-middlebrook/math-island", "id": "998ac72303ca069c68840dd8c9772b129a7dd83d", ...
import tests.periodicities.period_test as per per.buildModel((15 , 'S' , 1600));
{ "content_hash": "b9c5637ca01dac9f1eedc1d46b9c2212", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 45, "avg_line_length": 20.75, "alnum_prop": 0.7108433734939759, "repo_name": "antoinecarme/pyaf", "id": "619a26496d1006e99d105e750acd4b08d90a3c63", "size": "83", "binary":...
from sklearn2sql_heroku.tests.classification import generic as class_gen class_gen.test_model("SVC_rbf" , "BreastCancer" , "sqlite")
{ "content_hash": "cf5569bb9025cf20999236b7cec17706", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 72, "avg_line_length": 33.75, "alnum_prop": 0.7703703703703704, "repo_name": "antoinecarme/sklearn2sql_heroku", "id": "bda290b403ca0d1e51ae1e41a1f0fb98c25a5ff6", "size": "13...
"""beanmachine-specific conversion code.""" from .inference_data import InferenceData from .base import dict_to_dataset, requires class BMConverter: """Encapsulate Bean Machine specific logic.""" def __init__( self, *, sampler=None, coords=None, dims=None, ) -> No...
{ "content_hash": "868f2d05547435d0265a72ef73fe44d0", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 95, "avg_line_length": 33.74747474747475, "alnum_prop": 0.6315474408859623, "repo_name": "arviz-devs/arviz", "id": "5247b1e86997358d55040adc7cc4f10851f9d0f5", "size": "3341...
from .base import TestBase class TestStore(TestBase): async def test_store(self, imap_server): transport = self.new_transport(imap_server) transport.push_login() transport.push_select(b'INBOX') transport.push_readline( b'store1 STORE * +FLAGS (\\Seen)\r\n') tra...
{ "content_hash": "db38297312ab081eedf10320ea4738ff", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 62, "avg_line_length": 36.96551724137931, "alnum_prop": 0.5892412935323383, "repo_name": "icgood/pymap", "id": "d59975a87c731a461c7714c2fd02e9a7a6b7a38e", "size": "3217", ...
''' Created on Mar 28, 2015 Copyright 2015, Institute for Systems Biology. 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...
{ "content_hash": "c012c987e5d4d5be0654997b2f042867", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 137, "avg_line_length": 36.04, "alnum_prop": 0.6337402885682575, "repo_name": "isb-cgc/ISB-CGC-data-proc", "id": "0e91b2eee7c210b827a3f532e9b9eff12ce5f334", "size": "2703",...
"""Generates .rst files for .py files encountered in the SRC_DIR :author: Eric Vasquez :contact: eric.vasquez@calxeda.com :copyright: (c) 2012-2013, Calxeda Inc. """ import os import sys import glob # # # The actual NAME of your API, as if you were to import it. API_NAME = 'cxmanage_api' # # # SRC_DIR is one direc...
{ "content_hash": "9e30d3172c3ec029ec4a0dd9d3a17726", "timestamp": "", "source": "github", "line_count": 172, "max_line_length": 78, "avg_line_length": 34.122093023255815, "alnum_prop": 0.5091156926222525, "repo_name": "SilverLiningSystems/cxmanage-test", "id": "776dabe9bfbec2db0d6d96c685bc73816f17165...
from __future__ import absolute_import import os BROKER_TRANSPORT = "memory" #: Don't want log output when running suite. CELERYD_HIJACK_ROOT_LOGGER = False CELERY_RESULT_BACKEND = "cache" CELERY_CACHE_BACKEND = "memory" CELERY_RESULT_DBURI = "sqlite:///test.db" CELERY_SEND_TASK_ERROR_EMAILS = False CELERY_DEFAULT...
{ "content_hash": "679b7d23a8896695fba9ee02a3ff0f96", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 74, "avg_line_length": 36.20454545454545, "alnum_prop": 0.7206528562460766, "repo_name": "kumar303/rockit", "id": "db53989257df5b6290c1580abe39fb6b8c70089a", "size": "1593"...
from wtforms.validators import ValidationError class Unique(object): # Shout out to exploreflask.com for this approach def __init__(self, model, field, message=u'This element already exists.'): self.model = model self.field = field self.message = message def __call__(self, form, f...
{ "content_hash": "4f56d2d90df1b0b9cac3abcd6a7acb8a", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 78, "avg_line_length": 31.705882352941178, "alnum_prop": 0.601113172541744, "repo_name": "chriswilley/leash", "id": "eb157631ec166d6665a3828e395f95ab47697d59", "size": "539...
""" Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1beta1Ne...
{ "content_hash": "9b89cda81fc29d1a939dcd468310189f", "timestamp": "", "source": "github", "line_count": 140, "max_line_length": 590, "avg_line_length": 41.73571428571429, "alnum_prop": 0.6404244395002567, "repo_name": "skuda/client-python", "id": "cc4debca787a4718cc81519e149c8b79730309e3", "size": ...
"""Utility functions for writing Webathena-based APIs in Bottle""" import base64 import ccaches import json import moira import os import tempfile from bottle import request MOIRA_TIME_FORMAT = "%d-%b-%Y %H:%M:%S" def webathena(function): """ A decorator that loads a Kerberos ticket from the base64 encoded ...
{ "content_hash": "3823c2d04b39cd1e5b19d34508791251", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 80, "avg_line_length": 31.983606557377048, "alnum_prop": 0.6617119425935418, "repo_name": "btidor/mailto", "id": "25d22cbd4be6f794b5fb2224b66ff51036a66295", "size": "1951",...
from unittest import mock from neutron_lib.services.trunk import constants from neutron.services.trunk.seg_types import validators from neutron.tests import base class ValidatorsTestCase(base.BaseTestCase): def test_add_validator_raises_keyerror_on_redefinition(self): self.assertRaises(KeyError, ...
{ "content_hash": "d916570114286a984f901b60b4d49a5c", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 73, "avg_line_length": 34.96153846153846, "alnum_prop": 0.6831683168316832, "repo_name": "mahak/neutron", "id": "7dd8b3d79e8f0a304552b2551cd502f71af69832", "size": "1455", ...
from scrapy import Spider from scrapy.exceptions import DropItem from scrapy import settings from scrapy.conf import settings import json import csv import codecs from scrapy.xlib.pydispatch import dispatcher from scrapy import signals from scrapy.exporters import JsonLinesItemExporter from scrapy.exporters import Csv...
{ "content_hash": "7eab700e15eb2babc5754b2fccf2b575", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 135, "avg_line_length": 33.77777777777778, "alnum_prop": 0.6148325358851675, "repo_name": "Gachette/ProjetImmo", "id": "7d7c5dd0f965634add966bae2c3b91511bffe42a", "size": "...
"""This example gets all text ads for a given ad group. To add an ad, run add_text_ads.py. Tags: AdGroupAdService.get Api: AdWordsOnly """ __author__ = 'api.kwinter@gmail.com (Kevin Winter)' import os import sys sys.path.insert(0, os.path.join('..', '..', '..', '..', '..')) # Import appropriate classes from the cli...
{ "content_hash": "7ec4483675849429a775892e56004dbc", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 80, "avg_line_length": 27.055555555555557, "alnum_prop": 0.5487679671457906, "repo_name": "nearlyfreeapps/python-googleadwords", "id": "9338e0248591504927bc9192339aabd9e2ac44...
option_doctestglob = "README.txt"
{ "content_hash": "0d73ba7ec3671a38df3d7d7c83fac67a", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 33, "avg_line_length": 34, "alnum_prop": 0.7647058823529411, "repo_name": "RonnyPfannschmidt/iniconfig", "id": "f122ddde29a26a092d4cc3104d2d7137cdcb6789", "size": "34", "b...
import sys from collections import defaultdict # rasmus libs from rasmus import util # compbio libs from . import fasta, seqlib from seqlib import * #============================================================================= # Alignment functions def new_align(aln=None): """Makes a new alignment object ba...
{ "content_hash": "6498c65ea5ca8628c97ed56580b9b8d7", "timestamp": "", "source": "github", "line_count": 687, "max_line_length": 81, "avg_line_length": 25.922852983988356, "alnum_prop": 0.5104160817564153, "repo_name": "mdrasmus/argweaver", "id": "7a27b61a7a4bc50dc6d4d451249a1d4116ea106a", "size": "...
import urwid import re class SearchResultsLinesBuilder(object): def __init__(self): self.lines = [] self.current_filename = '' def add_line(self, text): if self.filter_out(text): return self.parse_text(text) line = self.format_line(text) self.decora...
{ "content_hash": "35bbc0db418b8c040f933e82990881d7", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 72, "avg_line_length": 29.962264150943398, "alnum_prop": 0.5793450881612091, "repo_name": "axs221/scout", "id": "c366b2700fe3ec40056456ec9f57be0fe6f755f2", "size": "1606", ...
from mhvdb2 import app app.run()
{ "content_hash": "9b94ca8c299e04412bc802b9b030dbb0", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 22, "avg_line_length": 16.5, "alnum_prop": 0.7575757575757576, "repo_name": "makehackvoid/mhvdb2", "id": "f74d32d1ef804916556b035fe66052485a4b75a8", "size": "33", "binary"...
""" Test breakpoint command with AT_comp_dir set to symbolic link. """ from __future__ import print_function import os import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil _EXE_NAME = 'CompDirSymLink' # Must match Makefile _SRC_FILE = 'relati...
{ "content_hash": "de55a3fafe0a6a7a71b2896be962160a", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 75, "avg_line_length": 33.848101265822784, "alnum_prop": 0.6278982797307404, "repo_name": "llvm-mirror/lldb", "id": "5b2c35fe5f76b19cfaa46f824a5bb75ae670798d", "size": "267...
""" Implement a cost-proportional method of setting variable-specific rho values for the progressive hedging algorithm only for first stage variables in a two stage stochastic problem formulation. Automatically retrieve cost parameters from the active objective function for those variables. See CP(*) strategy descr...
{ "content_hash": "3fe075dc5066b8614593baa8ef87e3db", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 110, "avg_line_length": 45.294736842105266, "alnum_prop": 0.7125261445503137, "repo_name": "OCM-Lab-PUC/switch-chile", "id": "82f1b276208b0680329f02b9620be7846e2d0b2d", "si...
from datetime import datetime import turtle def ensure_tuple(value): if not isinstance(value, tuple): value = (value, value) return value def grow(size, angle, depth, size_decrease = None, angle_decrease = None, worker = None): size = ensure_tuple(size) angle = ensure_tuple(angle) if angl...
{ "content_hash": "defdea79a0166ee0fc227ba7b127b7e6", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 89, "avg_line_length": 29.05325443786982, "alnum_prop": 0.5142566191446029, "repo_name": "sukhmel/linux.scripts", "id": "0d05a15dde9fb527b8e9239281c3e8ae4b9873f7", "size":...
import random import json import sqlite3 import string import os import re class database(object): def __init__(self,dbase,fpath): self.database = dbase self.filepath = fpath if not os.path.exists(self.database): self.con = sqlite3.connect(self.database) query = "create table bookmarks(id integer primar...
{ "content_hash": "3ff87c910af1a6e7f0024e40ba20f26f", "timestamp": "", "source": "github", "line_count": 146, "max_line_length": 132, "avg_line_length": 22.116438356164384, "alnum_prop": 0.6401362650975534, "repo_name": "alphawing/SmartBookmarks", "id": "b150e67f33a45067f092490dbcfc4650793ad732", "s...
{ 'name': 'Indian - Accounting', 'version': '1.0', 'description': """ Indian Accounting: Chart of Account. ==================================== Indian accounting chart and localization. OpenERP allows to manage Indian Accounting by providing Two Formats Of Chart of Accounts i.e Indian Chart Of Accounts - ...
{ "content_hash": "1f4a655ef4825d47e50caa63a0394364", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 172, "avg_line_length": 36.25714285714286, "alnum_prop": 0.6493301812450749, "repo_name": "diogocs1/comps", "id": "8dd815022dd18650e7cb9e3f3e37aae573a5139d", "size": "2248"...
from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('blog', '0003_remove_post_content'), ] operations = [ migrations.AddField( model_name='post', na...
{ "content_hash": "45de5ff5bc1505f82734538634077b61", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 70, "avg_line_length": 22.9, "alnum_prop": 0.6135371179039302, "repo_name": "takdeerkaur/takdeer.ca", "id": "189632a96af011d5ec59fe029d987bedcde271ea", "size": "531", "bi...
import itertools import operator import sys if sys.version_info[0] != 3: from functools import reduce from functools import wraps from peewee import * from playhouse.tests.base import compiler from playhouse.tests.base import database_initializer from playhouse.tests.base import log_console from playhouse.tests.ba...
{ "content_hash": "c6d96405f13835cb9fb3150cc0e2f83f", "timestamp": "", "source": "github", "line_count": 402, "max_line_length": 79, "avg_line_length": 38.014925373134325, "alnum_prop": 0.5297081533830651, "repo_name": "fuzeman/peewee", "id": "627e46e809afaf6e2c931eeac936c9d149d2a1cf", "size": "1528...
from tools.load import LoadMatrix from sg import sg lm=LoadMatrix() traindat=lm.load_numbers('../data/fm_train_real.dat') testdat=lm.load_numbers('../data/fm_test_real.dat') train_label=lm.load_labels('../data/label_train_twoclass.dat') parameter_list=[[traindat,testdat, train_label,10,2.1,1.2,1e-5,False], [trainda...
{ "content_hash": "e3d081fa388aca9f48099dbaef695215", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 70, "avg_line_length": 29.848484848484848, "alnum_prop": 0.6954314720812182, "repo_name": "Saurabh7/shogun", "id": "ead63a86d792c66ac51d4e551c244079adae755f", "size": "985"...
""" Orthogonal Distance Regression (:mod:`scipy.odr`) ================================================= Introduction ------------ Why Orthogonal Distance Regression (ODR)? Sometimes one has measurement errors in the explanatory (a.k.a., "independent") variable(s), not just the response (a.k.a., "dependent") variable...
{ "content_hash": "edb2d545cdc8f70e5c8895c666f36185", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 71, "avg_line_length": 34.56818181818182, "alnum_prop": 0.7350427350427351, "repo_name": "scipy/scipy-svn", "id": "e42eba0c3a51136cb5672f562337c88c7b1d89f7", "size": "3042"...
# Hive Netius System # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Netius System. # # Hive Netius System is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apache # Foundation, either version 2.0 of the License, o...
{ "content_hash": "bc271e91f775e36a5447588b60884c16", "timestamp": "", "source": "github", "line_count": 895, "max_line_length": 95, "avg_line_length": 38.67039106145251, "alnum_prop": 0.5964172204565155, "repo_name": "hivesolutions/netius", "id": "7a6e9e168d4057a4dad04bc110587d39e9207fdf", "size": ...
from setuptools import setup requires = [ 'bottle', 'bottle_mongo', 'pymongo' ] setup( name='kala', version='0.5.1', packages=[''], url='https://github.com/cloudbuy/kala', license='MIT', author='Paul Etherton', author_email='paul@pjetherton.co.uk', description='Simple read-...
{ "content_hash": "d241c7a8f802705d24a657e7cb593513", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 56, "avg_line_length": 19.833333333333332, "alnum_prop": 0.5798319327731093, "repo_name": "damoxc/kala", "id": "0c7ccaa00d984de9c740f1c50263faa9a5490f62", "size": "476", ...
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('comics', '0004_auto_20180314_2133'), ] operations = [ migrations.AlterField( model_name='issue', name='gallery', field=m...
{ "content_hash": "346dce83a6ec010b4a79f198d38d089f", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 129, "avg_line_length": 26.352941176470587, "alnum_prop": 0.6294642857142857, "repo_name": "evanepio/dotmanca", "id": "6219d59fd6964dd49fd79219b9ea216df2d3e756", "size": "4...
from ..servicecalls.validatelogin import ValidateLogin class ConsumerCredentialManager: userId = None result = None def __init__(self, username, password): self.logged_in = False self.username = username self.password = password self.userId = None self.result = Non...
{ "content_hash": "967211852dc76326b840f84f2f890509", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 73, "avg_line_length": 26.6, "alnum_prop": 0.5969924812030075, "repo_name": "vacoj/MINDBODY-Django", "id": "4d1ff100cc40936b300660a1c8e3b223201868f8", "size": "666", "bin...
import base64 from django import template from django.utils import translation from django.utils.encoding import force_unicode from django.conf import settings import assets register = template.Library() @register.simple_tag() def next_lang(): cur_language = translation.get_language() if cur_language == "f...
{ "content_hash": "687bfc1be5a3dec481d0f3f0c6774742", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 47, "avg_line_length": 19.29090909090909, "alnum_prop": 0.6343072573044298, "repo_name": "aert/assets", "id": "96522e9a818740f673b14e7c4f2d38989d1b4f0d", "size": "1061", ...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'YwotTransfer' db.create_table('marketing_ywottransfer', ( ('id', self.gf('uuidfield.fields.UUIDField')(u...
{ "content_hash": "3572d059664a4070d7500e9642eb684e", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 182, "avg_line_length": 73.6, "alnum_prop": 0.5687929061784897, "repo_name": "reverie/jotleaf.com", "id": "0e87605580d5d27fe9b2c75058387deb7a058dbf", "size": "7016", "bin...
__author__ = 'Ofner Mario' from datetime import datetime class Logger(): # -------------------------------------------------------------------------------- # - Initializations # -------------------------------------------------------------------------------- global_log_level = "DEBUG" log_micros...
{ "content_hash": "d3e4ca851bab8506742f3883641a1286", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 113, "avg_line_length": 28.925925925925927, "alnum_prop": 0.46094750320102434, "repo_name": "steelion/python-tools", "id": "9c12e1ef29c77b1594804b85cef1f2c65afe516d", "size...
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/shield_generator/shared_shd_sfs_imperial_deluxe_standard.iff" result.attribute_template_id = 8 result.stfName("space/space_item","shd_sfs_imperial_deluxe_standard_n") #### BEGIN MODIFICATION...
{ "content_hash": "396808aa50b33e1b6108930586f71978", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 113, "avg_line_length": 28.76923076923077, "alnum_prop": 0.7272727272727273, "repo_name": "anhstudios/swganh", "id": "43907cd5273f8a784f6e89581d913447f6fc6ae2", "size": "51...
bl_info = { "name": "POV-Ray 3.7", "author": "Campbell Barton, Silvio Falcinelli, Maurice Raybaud, Constantin Rahn, Bastien Montagne", "version": (0, 0, 9), "blender": (2, 5, 7), "location": "Render > Engine > POV-Ray 3.7", "description": "Basic POV-Ray 3.7 integration for blender", "warning...
{ "content_hash": "c12acddd2e938d0907bf04de4cafc966", "timestamp": "", "source": "github", "line_count": 511, "max_line_length": 118, "avg_line_length": 45.49706457925636, "alnum_prop": 0.5725837670437438, "repo_name": "kellpossible/VoxelEditor", "id": "1b7299ecd94a012bc14320d7c4c5b0e3de3e54a2", "si...
from .partials import * INSTALLED_APPS += [ "debug_toolbar", "django_extensions", ] MIDDLEWARE_CLASSES += [ 'debug_toolbar.middleware.DebugToolbarMiddleware', ]
{ "content_hash": "fc130650707a35d00642210c919f640a", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 54, "avg_line_length": 16, "alnum_prop": 0.6818181818181818, "repo_name": "jupiny/EnglishDiary", "id": "3cf75fba94ae787547e7bcf4d695874b5328193a", "size": "176", "binary"...
""" Drivers for san-stored volumes. The unique thing about a SAN is that we don't expect that we can run the volume controller on the SAN hardware. We expect to access it over SSH or some API. """ import base64 import httplib import os import paramiko import random import socket import string import uuid from lxml ...
{ "content_hash": "6aefe59f8f34785ee66d8b34cfe5aaf0", "timestamp": "", "source": "github", "line_count": 636, "max_line_length": 79, "avg_line_length": 36.43396226415094, "alnum_prop": 0.5772052477127568, "repo_name": "tylertian/Openstack", "id": "7c06d859fbcd03f98d0c1eff3d628250a2e8c928", "size": "...
import copy from biicode.common.exception import (BiiStoreException, NotInStoreException, AlreadyInStoreException) class MemStore(object): '''MemStore is the ABC for an in memory store, that could be used both for testing (instead of a real DB) or in production for effici...
{ "content_hash": "c47de677230ecd2c854e158e854d61e7", "timestamp": "", "source": "github", "line_count": 170, "max_line_length": 98, "avg_line_length": 38.8235294117647, "alnum_prop": 0.578030303030303, "repo_name": "biicode/common", "id": "5dbef60417c580544a7c39049515e66524708920", "size": "6600", ...
from __future__ import print_function, unicode_literals import os, sys, argparse, contextlib, subprocess, locale, re from . import my_shlex as shlex USING_PYTHON2 = True if sys.version_info < (3, 0) else False if not USING_PYTHON2: basestring = str sys_encoding = locale.getpreferredencoding() _DEBUG = '_ARC_D...
{ "content_hash": "39dabe0ca208e69d7a461e16ff8bfb8a", "timestamp": "", "source": "github", "line_count": 437, "max_line_length": 202, "avg_line_length": 48.25171624713959, "alnum_prop": 0.6036232571374371, "repo_name": "Plantain/sms-mailinglist", "id": "210e08fb56295156b4665e76e82e07cb521add8f", "si...
import hashlib import logging subprocess = None LOG = logging.getLogger(__name__) PKI_ANS1_PREFIX = 'MII' def _ensure_subprocess(): # NOTE(vish): late loading subprocess so we can # use the green version if we are in # eventlet. global subprocess if not subprocess: ...
{ "content_hash": "5fd6e8b4833429e80339fb51ec12928d", "timestamp": "", "source": "github", "line_count": 178, "max_line_length": 79, "avg_line_length": 34.6123595505618, "alnum_prop": 0.5888654439214414, "repo_name": "citrix-openstack-build/python-keystoneclient", "id": "8bc24f97d89e2cc042844af472157e...
from rdkit import Chem,Geometry from rdkit.Chem import AllChem from rdkit.Chem.Subshape import SubshapeObjects from rdkit.Chem.Subshape import BuilderUtils from rdkit.six.moves import cPickle import time #----------------------------------------------------------------------------- class SubshapeCombineOperations(obje...
{ "content_hash": "c0f3e10cbd40fece25074de0ece46892", "timestamp": "", "source": "github", "line_count": 117, "max_line_length": 95, "avg_line_length": 36.282051282051285, "alnum_prop": 0.6855123674911661, "repo_name": "soerendip42/rdkit", "id": "75a8a32fb7d753ffbfb4e9855ac575763b70dd31", "size": "4...
from utils import calculate_bytecode scenario_description = ( "Make a proposal to change the default proposal deposit, vote for it and " "then assure that the DAO's proposal deposit did indeed change" ) def run(ctx): ctx.assert_scenario_ran('fuel') bytecode = calculate_bytecode( 'changePropo...
{ "content_hash": "8a3815083fd4b89b652806352847a7b6", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 78, "avg_line_length": 29.903225806451612, "alnum_prop": 0.6299892125134844, "repo_name": "Spreadway/core", "id": "33683b16fa868e93f65ecfae97287a87073d3c7b", "size": "927",...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fieldsight', '0036_delete_timezone'), ] operations = [ migrations.CreateModel( name='Timezone', fields=[ ('i...
{ "content_hash": "0630c6a7be5f93c3253df665d435ffe6", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 114, "avg_line_length": 34.43478260869565, "alnum_prop": 0.5858585858585859, "repo_name": "awemulya/fieldsight-kobocat", "id": "85d0fa277a2bf080f5cb8671c2a3389d80f0e8b4", "...
""" Key manager implementation for Barbican """ import array import base64 import binascii from barbicanclient import client as barbican_client from barbicanclient.common import auth from keystoneclient.v2_0 import client as keystone_client from oslo.config import cfg from cinder import exception from cinder.keymgr ...
{ "content_hash": "0bc923a593614917d2b150cffb1ad826", "timestamp": "", "source": "github", "line_count": 266, "max_line_length": 79, "avg_line_length": 43.597744360902254, "alnum_prop": 0.5817883935500561, "repo_name": "e0ne/cinder", "id": "1ebcfd321d5395be19ccf521c1791c2845af9e22", "size": "12272",...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import capstone from capstone import * import pwndbg.memoize import pwndbg.symbol CS_OP_IMM debug = False groups = {v:k for k,v in globals().items...
{ "content_hash": "79bbe110a778356ce07ee2c5ac3f5991", "timestamp": "", "source": "github", "line_count": 264, "max_line_length": 94, "avg_line_length": 29.90909090909091, "alnum_prop": 0.5819402228976697, "repo_name": "zachriggle/pwndbg", "id": "1422cb6c7cdd0d34c40afab9263d0a200a4999a3", "size": "79...
"""Compute API that proxies via Cells Service.""" from nova import availability_zones from nova import block_device from nova.cells import rpcapi as cells_rpcapi from nova.cells import utils as cells_utils from nova.compute import api as compute_api from nova.compute import instance_types from nova.compute import rpca...
{ "content_hash": "5525eca08483b9babd499ce9a8727962", "timestamp": "", "source": "github", "line_count": 651, "max_line_length": 78, "avg_line_length": 42.61136712749616, "alnum_prop": 0.6045782263878875, "repo_name": "zestrada/nova-cs498cc", "id": "f5ded45ec018288c22834e900ab91fc60d7c4e52", "size":...
"""``iperf_cmd.py`` `iperf command parsing and building support` """ import itertools from collections import OrderedDict from argparse import ArgumentParser from testlib.linux.commands.cmd_helper import Command, CommandHelper, ArgumentBuilder from testlib.custom_exceptions import UnknownArguments, ArgumentsCollis...
{ "content_hash": "32eb7e483b408d2557047f7098285446", "timestamp": "", "source": "github", "line_count": 282, "max_line_length": 99, "avg_line_length": 33.698581560283685, "alnum_prop": 0.5167841734189204, "repo_name": "orestkreminskyi/taf", "id": "f7ded935aa02b80a392293b89a9d4c057e6ee61f", "size": ...
import os import sys import time import logging def application_id(): from google.appengine.api import app_identity try: result = app_identity.get_application_id() except AttributeError: result = None if not result: # Apparently we aren't running live, probably inside a manag...
{ "content_hash": "10c8ccc81316f9d605d6400011324af2", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 111, "avg_line_length": 29.994444444444444, "alnum_prop": 0.6169661048342285, "repo_name": "stucox/djangae", "id": "2291e94d0638b0ef7d25bf7488315bc44890c432", "size": "539...
""" Backend that defers to another server for access control """ from .base import IAccessBackend class RemoteAccessBackend(IAccessBackend): """ This backend allows you to defer all user auth and permissions to a remote server. It requires the ``requests`` package. """ def __init__(self, reques...
{ "content_hash": "aa6ce3a3d642e1e61f7f8ffc5aed9652", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 78, "avg_line_length": 37.114285714285714, "alnum_prop": 0.5783936361303567, "repo_name": "rubikloud/pypicloud", "id": "7eaa37d227568ceec8d4c84249ca4298e72c94b5", "size": ...
import sys import os import random import gzip import pickle import optparse import time from optparse import OptionParser def main(): options = parse_args() app = TestApplication(options) app.run() chars = 'abcdefghijklmnopqestuvwxyzABCDEFGHIJKLMNOPQESTUVWXYZ0123456789.,;:-' class TestApplication(obj...
{ "content_hash": "ad5977919975193725779aa8dbb02d4e", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 81, "avg_line_length": 20.625, "alnum_prop": 0.6074074074074074, "repo_name": "pombredanne/pyahocorasick", "id": "541d9a6bb92e82d7280c0f2188df5cdbf22f464b", "size": "1485",...
'''@file decode.py this file will use the model to decode a set of data''' import sys import os import cPickle as pickle sys.path.append(os.getcwd()) from six.moves import configparser import tensorflow as tf from nabu.neuralnetworks.recognizer import Recognizer from nabu.neuralnetworks.models.model import Model def ...
{ "content_hash": "06740f348cb3635e583f01368070b694", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 78, "avg_line_length": 29.184615384615384, "alnum_prop": 0.6309963099630996, "repo_name": "vrenkens/Nabu-asr", "id": "16d222ee012955671b279fa0b60deff85f5ef388", "size": "18...
from django.db import models from django.core.exceptions import ImproperlyConfigured from actstream.registry import register, registry from actstream.tests.base import ActivityBaseTestCase from actstream.runtests.testapp_nested.models import my_model try: from django.apps import apps except ImportError: pass...
{ "content_hash": "94795542b2fe5e084d6b1a94bb3c0dd3", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 76, "avg_line_length": 26.310344827586206, "alnum_prop": 0.7667103538663171, "repo_name": "jrsupplee/django-activity-stream", "id": "7c60f57f3638b1220feedcc1bcfbe9f4805294c5"...
from distutils.core import setup, Extension module1 = Extension( 'dummy', sources=['dummy.cpp', 'SerialUtils.cc', 'StringUtils.cc'], extra_compile_args=["-O3"] ) setup( name='Dummy', version='1.0', description='This is a dummy package', ext_modules=[module1] )
{ "content_hash": "d3bac6d7d0c5a24ace696d994f49012b", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 62, "avg_line_length": 20.785714285714285, "alnum_prop": 0.6426116838487973, "repo_name": "elzaggo/pydoop", "id": "f1986d1704d246abe49b828e7ed1ced24eff4680", "size": "900",...
from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/structure/dantooine/shared_dant_large_mudhut_no_flora_05m.iff" result.attribute_template_id = -1 result.stfName("obj_n","unknown_object") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return r...
{ "content_hash": "235f8972f2c8d0734ed16483e87786d5", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 96, "avg_line_length": 25, "alnum_prop": 0.7015384615384616, "repo_name": "obi-two/Rebelion", "id": "f46e704f55570ceb8577845e8572d94dbde367ab", "size": "470", "binary": f...
"""Train keras CNN on the CIFAR10 small images dataset. The model comes from: https://zhuanlan.zhihu.com/p/29214791, and it gets to about 87% validation accuracy in 100 epochs. Note that the script requires a machine with 4 GPUs. You can set {"gpu": 0} to use CPUs for training, although it is less efficient. """ fro...
{ "content_hash": "6ea664a311f32c5a2f77a0743675e778", "timestamp": "", "source": "github", "line_count": 214, "max_line_length": 79, "avg_line_length": 31.66822429906542, "alnum_prop": 0.5669175151246865, "repo_name": "atumanov/ray", "id": "c1a1765bc9f4fac4ea3d45dbff522f41f2d71549", "size": "6823", ...
# Copyright 2003 Dave Abrahams # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # This tests the core rule for enumerating the variable names in a module. import BoostBuild t = BoostBuild.Tester(pass_toolset=0) ...
{ "content_hash": "ef8b14b9406f57fc9323d749a821cfdf", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 81, "avg_line_length": 21.216216216216218, "alnum_prop": 0.621656050955414, "repo_name": "flingone/frameworks_base_cmds_remoted", "id": "a9b8d4b259ea0555654f788325028aa6789d7...