text
stringlengths
4
1.02M
meta
dict
import hashlib import os.path TEMPLATE_HTML = """ <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>{{title}}</title> <link rel="stylesheet" href="/static/css/github.css?v=css_version"> <script type="text/javascript" src="/static/js/jquery-3.2.1.min.js" ></script> </head> <body> <div cla...
{ "content_hash": "5d13dd40cf91e8f547047b04b6698be7", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 80, "avg_line_length": 24.25, "alnum_prop": 0.5707591377694471, "repo_name": "wecatch/turbo-markdown", "id": "d82a201d386794866152989480721a972ab9ba6b", "size": "2134", "...
from __future__ import division import vistrails.core.db.action from vistrails.core.db.locator import XMLFileLocator from vistrails.core.db.io import serialize, unserialize from vistrails.core import debug from vistrails.core.interpreter.default import get_default_interpreter from vistrails.core.log.group_exec import ...
{ "content_hash": "f0be219bd646351d608848a7c630fc45", "timestamp": "", "source": "github", "line_count": 511, "max_line_length": 98, "avg_line_length": 37.90998043052838, "alnum_prop": 0.561377245508982, "repo_name": "VisTrails/VisTrails", "id": "5866af7eeaa301882b9d5961722718f4ca732a6a", "size": "2...
"""JSON Encoding Rules (JER) codec. """ import time import json import binascii import math import datetime from ..parser import EXTENSION_MARKER from . import BaseType, format_bytes, ErrorWithLocation from . import EncodeError from . import DecodeError from . import compiler from . import format_or from . import ut...
{ "content_hash": "cca2ee465cde2aa094774e40f9fed346", "timestamp": "", "source": "github", "line_count": 649, "max_line_length": 79, "avg_line_length": 26.961479198767336, "alnum_prop": 0.5268602125957252, "repo_name": "eerimoq/asn1tools", "id": "9c51da8d90221ce1e35e21867a95ff9792a5947d", "size": "1...
""" SALTS XBMC Addon Copyright (C) 2014 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. T...
{ "content_hash": "b63f0693ffdad41981051529e63fb3ab", "timestamp": "", "source": "github", "line_count": 165, "max_line_length": 191, "avg_line_length": 46.945454545454545, "alnum_prop": 0.5806868060934676, "repo_name": "TheWardoctor/Wardoctors-repo", "id": "cd9976e8cabbd46d2dec8c07eea6f0e83d40da2f", ...
from alembic.operations import ops from alembic.util import Dispatcher from alembic.util import rev_id as new_rev_id from neutron._i18n import _ from neutron.db.migration import cli _ec_dispatcher = Dispatcher() def process_revision_directives(context, revision, directives): directives[:] = list(_assign_directi...
{ "content_hash": "ca34932a5f1f3ccbc608d437e8591220", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 77, "avg_line_length": 31.96039603960396, "alnum_prop": 0.6833952912019826, "repo_name": "openstack/neutron", "id": "f0e91ea36488bc29ad00cfd97f36fb191e1ec2e2", "size": "38...
import os import sys from sphinx.locale import _ import chemex sys.path.insert(0, os.path.abspath(".")) # -- Project information ----------------------------------------------------- project = "ChemEx" copyright = "2021, Guillaume Bouvignies" author = "Guillaume Bouvignies" # The full version, including alpha/be...
{ "content_hash": "a0bece1bcd572f70abaeef8787904a39", "timestamp": "", "source": "github", "line_count": 361, "max_line_length": 85, "avg_line_length": 29.789473684210527, "alnum_prop": 0.6540822019713595, "repo_name": "gbouvignies/chemex", "id": "ac232808792270cd1834c6af961e8da2a1c47cb5", "size": "...
import copy from django.db.models.base import Model, ModelBase from django.template.defaultfilters import slugify from django.contrib.auth.models import Permission as DjangoPermission from django.contrib.contenttypes.models import ContentType from authority.exceptions import NotAModel, UnsavedModelInstance from autho...
{ "content_hash": "783a95c727a39a535f6f54ca875cf48a", "timestamp": "", "source": "github", "line_count": 192, "max_line_length": 126, "avg_line_length": 40.182291666666664, "alnum_prop": 0.5528191834089436, "repo_name": "azizmb/django-authority", "id": "aa59557777988c707078ea60a650cc0358165d10", "si...
def main( array, value ): for i in range( array.size ): array[i] = array[i] + value return array
{ "content_hash": "3e7a387d5e11dd10867613ea0847b4f8", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 35, "avg_line_length": 28.25, "alnum_prop": 0.5752212389380531, "repo_name": "naohisas/KVS", "id": "c4f441d847e8a9930aec9b8ed8602fcd54e5aece", "size": "113", "binary": fal...
from __future__ import unicode_literals """ This module implements various transmuter classes. Transmuters are essentially classes that generate TransformedStructures from various data sources. They enable the high-throughput generation of new structures and input files. It also includes the helper function, batch_wr...
{ "content_hash": "909cc0c035de735f79112f9f35d75f6a", "timestamp": "", "source": "github", "line_count": 432, "max_line_length": 79, "avg_line_length": 38.780092592592595, "alnum_prop": 0.6049662746970692, "repo_name": "yanikou19/pymatgen", "id": "8862fead5fb40deb17cd9cd80e970015ad0ac190", "size": "...
import os, subprocess, sys, shutil, argparse sys.tracebacklimit = 3 ## Reimplementation of the standard which tool in unix systems # # @param program The program whose existence in the PATH is to be checked. # @return None, if the executable is available, the path and location of the executable if it is. def which(...
{ "content_hash": "b1e9a3ceed8248e188a5cbaee0332612", "timestamp": "", "source": "github", "line_count": 228, "max_line_length": 187, "avg_line_length": 39.6359649122807, "alnum_prop": 0.7292243000995906, "repo_name": "mikulcak/forsyde_psopc", "id": "d8627f29b4203f8db19fe23be9bdefde83b68dab", "size"...
import numpy as np from sklearn.base import BaseEstimator, ClassifierMixin def train_tfidf(comments, categories, class_weight=None): from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import SGDClassifier text_clf = Pipeline([('v...
{ "content_hash": "04ce003699cb0e34a60d794981f0418d", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 114, "avg_line_length": 39.01652892561984, "alnum_prop": 0.6390595212878627, "repo_name": "rafaharo/trolling_detection", "id": "69fb6ba1128fcbb5a071e157fb0a0ebe0bf53a79", ...
lambda a : 1 lambda : meta.lambda-function.python, source.python, storage.type.function.lambda.python : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python a : meta.function.lambda.parameters.python, meta.lambda-function.python, source.python, variable.p...
{ "content_hash": "0164e4a41c4d0d164bcd6b269a79fee9", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 143, "avg_line_length": 65.1, "alnum_prop": 0.7050691244239631, "repo_name": "MagicStack/MagicPython", "id": "710f5d5671a79368e231c6dec9e5dad199cfaec7", "size": "651", "b...
"""Utilities for connecting to jupyter kernels The :class:`ConnectionFileMixin` class in this module encapsulates the logic related to writing and reading connections files. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import absolute_impor...
{ "content_hash": "07efd9b7f17b8fd02a6503a69abc7123", "timestamp": "", "source": "github", "line_count": 535, "max_line_length": 100, "avg_line_length": 34.16448598130841, "alnum_prop": 0.5856220593062699, "repo_name": "unnikrishnankgs/va", "id": "042904f0e7483abf9f29fb8e94c947424b417cd3", "size": "...
import google_search.crawler as crawler if __name__ == '__main__': search_query = "united kingdom" result = crawler.search_web(search_query) # result = crawler.search_news(search_query) print(result) for item in result: print(item)
{ "content_hash": "197d85e6d89ee92ff875edbe41b96f01", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 48, "avg_line_length": 23.90909090909091, "alnum_prop": 0.6463878326996197, "repo_name": "xibowang/google-crawler", "id": "e67f9c24e6eaec77dd1588378a1659a727ee0b07", "size"...
''' OpenShiftCLI class that wraps the oc commands in a subprocess ''' # pylint: disable=too-many-lines from __future__ import print_function import atexit import copy import json import os import re import shutil import subprocess import tempfile # pylint: disable=import-error try: import ruamel.yaml as yaml ex...
{ "content_hash": "194477c2618d37a465d956ade9246e62", "timestamp": "", "source": "github", "line_count": 2144, "max_line_length": 118, "avg_line_length": 32.88106343283582, "alnum_prop": 0.5407747847426132, "repo_name": "ivanhorvath/openshift-tools", "id": "4c55827682d2b4921ea26b0827d6a344f8fb6c79", ...
"""Utility methods for customization args of interactions.""" from __future__ import annotations from core import schema_utils from core import utils def get_full_customization_args(customization_args, ca_specs): """Populates the given customization_args dict with default values if any of the expected custo...
{ "content_hash": "d6b307cecafa9dcb4be90db733ac714b", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 79, "avg_line_length": 44.990196078431374, "alnum_prop": 0.6391370668991065, "repo_name": "kevinlee12/oppia", "id": "7e4f739eaaa786b9cd050324d5bbe031964755f6", "size": "52...
import sys import os if len(sys.argv) < 5: print 'Usage: ipinyou.folder 25 train.log.txt test.log.txt' # python splitadvertisers.py ../ 25 ../all/train.log.txt ../all/test.log.txt exit(-1) ifolder = sys.argv[1] if not ifolder.endswith('/'): ifolder = ifolder + '/' adidx = int(sys.argv[2]) for i in r...
{ "content_hash": "4b134636bb184ffb1736b39531515089", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 85, "avg_line_length": 31.38235294117647, "alnum_prop": 0.5866916588566073, "repo_name": "orenov/make-ipinyou-data", "id": "43bf20a62b75bb7554510de17c8dba1d641253e8", "size...
from sqlalchemy import select, Column from sqlalchemy import MetaData, Integer, String, Table from migrate import ForeignKeyConstraint from nova import log as logging LOG = logging.getLogger(__name__) def upgrade(migrate_engine): meta = MetaData() meta.bind = migrate_engine instances = Table('instance...
{ "content_hash": "c86eb444273305707ef9dda0fd9a7501", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 62, "avg_line_length": 28.56578947368421, "alnum_prop": 0.5946568401658222, "repo_name": "josephsuh/extra-specs", "id": "ea8684f3df1ac4894ce2606aa430d6396e87c092", "size": ...
from __future__ import absolute_import, print_function, division import unittest from pony.orm.core import * from pony.orm.tests.testutils import * class TestOneToOne3(unittest.TestCase): def setUp(self): self.db = Database('sqlite', ':memory:') class Person(self.db.Entity): ...
{ "content_hash": "71db27c8f219980e0c3e970554fa1809", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 145, "avg_line_length": 32.02197802197802, "alnum_prop": 0.5816746739876458, "repo_name": "Ahmad31/Web_Flask_Cassandra", "id": "5e8c7582e6c75b49f3253b70044d4202b273f090", "...
"""Policy abstraction for TFModels.""" import abc import gin import numpy as np import six from tensor2robot.meta_learning import meta_tf_models from tensor2robot.policies import policies @six.add_metaclass(abc.ABCMeta) class MetaLearningPolicy(policies.Policy): """Abstract class for Tensorflow-based Meta-learning...
{ "content_hash": "ccd9110a10a7e213227192015b011af9", "timestamp": "", "source": "github", "line_count": 186, "max_line_length": 80, "avg_line_length": 32.93010752688172, "alnum_prop": 0.6435918367346939, "repo_name": "google-research/tensor2robot", "id": "60c75b9c4f12ba560962a00af54f25d85b952b34", ...
import httplib try: import simplejson as json except ImportError: import json import os import sys from urlparse import urljoin try: import requests except ImportError: raise ImportError('Missing dependency "requests". Do ``pip install requests``.') try: import yaml except ImportError: raise I...
{ "content_hash": "63394f3ee30605701f298ec174eeca8b", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 91, "avg_line_length": 29.259036144578314, "alnum_prop": 0.6001647107267861, "repo_name": "lmEshoo/st2contrib", "id": "a58753017f13e373805a049aa43b016262f98ef3", "size": "...
import logging from collections import defaultdict from dvc.repo import locked from dvc.repo.scm_context import scm_context from dvc.scm.base import RevError from .utils import ( exp_refs, exp_refs_by_baseline, remote_exp_refs, remote_exp_refs_by_baseline, ) logger = logging.getLogger(__name__) @lo...
{ "content_hash": "68dbec10f0a415f275ef0970943b4e06", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 74, "avg_line_length": 25.24, "alnum_prop": 0.5966719492868463, "repo_name": "dmpetrov/dataversioncontrol", "id": "812a39d6fc4a7bbac8dcf69d27681b16497df448", "size": "1262"...
from IPython.core.display import display_html from IPython import get_ipython comm = None listeners = {} def setListener(topic, callback): listeners[topic] = callback def dispatch(msg): # Note: because of the way comms are run, you can't print in these functions. # You can, however, hijack the comm_manag...
{ "content_hash": "53430701ea57455331837a0b6907bda5", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 84, "avg_line_length": 28.91176470588235, "alnum_prop": 0.6230925737538149, "repo_name": "sbirch/ipycomms", "id": "af4155d299e3741f6529eb85da5ed2716fc7b456", "size": "1966"...
"""Keras legacy SavedModel saving.""" import os import tensorflow.compat.v2 as tf from absl import logging from keras import backend from keras.protobuf import saved_metadata_pb2 from keras.protobuf import versions_pb2 from keras.saving.legacy import saving_utils from keras.saving.legacy import serialization from ke...
{ "content_hash": "16605bbff029c6286eb965dbb1756703", "timestamp": "", "source": "github", "line_count": 143, "max_line_length": 80, "avg_line_length": 39.32167832167832, "alnum_prop": 0.6343588831584563, "repo_name": "keras-team/keras", "id": "601f4c089ab4d51f4d81824c7020dd8501350efe", "size": "631...
To install a new module do this 1. Download the package and make sure its in downloads 2. Go into that file through terminal 3. put in ' pip3.4 install matplotlib ' where you replace matplotlib with the name of the package
{ "content_hash": "928851a333055a0908f8d93cef1d761a", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 58, "avg_line_length": 38.5, "alnum_prop": 0.7575757575757576, "repo_name": "mannion9/Intro-to-Python", "id": "b7f7421064071519f18ee496c8b72832f0777d53", "size": "231", "b...
"""Metadiscourse. --- layout: post source: Pinker's book on writing source_url: ??? title: metadiscourse date: 2014-06-10 12:31:19 categories: writing --- Points out metadiscourse. """ from proselint.tools import existence_check, memoize @memoize def check(text): """Suggest the preferred for...
{ "content_hash": "4e09142747b02947f1ba9b5660e79a3a", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 57, "avg_line_length": 21.28125, "alnum_prop": 0.6549192364170338, "repo_name": "amperser/proselint", "id": "477a5812ecc936b868c1477b762f55d679ef1815", "size": "681", "bi...
""" WSGI config for protocolle 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.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "protocolle.settings") from django....
{ "content_hash": "6bb3b91f86cc88d6944b23f7d8f2d127", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 78, "avg_line_length": 26.27777777777778, "alnum_prop": 0.7695560253699789, "repo_name": "klebercode/protocolle", "id": "9ef3f2e76d3edd0e494b707c135db599bc1e852c", "size": ...
import os import re import subprocess from django.utils.text import slugify from django.conf import settings from django.core.cache import cache # These options are passed to Fabric as: fab task --abort-on-prompts=True --user=root ... fabric_special_options = ['no_agent', 'forward-agent', 'config', 'disable-known-hos...
{ "content_hash": "2db4abb07538bee1c4c4ed830acb0a33", "timestamp": "", "source": "github", "line_count": 268, "max_line_length": 137, "avg_line_length": 34.8544776119403, "alnum_prop": 0.6065731720372551, "repo_name": "gvangool/fabric-bolt", "id": "aff975c0c9e94ffa3dcc8f2be0f26e2bca6b7f0c", "size": ...
from splinter.exceptions import ElementDoesNotExist class ElementList: """Collection of elements. Each member of the collection is by default an instance of :class:`ElementAPI <splinter.driver.ElementAPI>`. Beyond the traditional list methods, ``ElementList`` provides some other methods, listed ...
{ "content_hash": "95d8fba712d9e4a183259eabee89d4be", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 90, "avg_line_length": 28.978494623655912, "alnum_prop": 0.5573283858998145, "repo_name": "cobrateam/splinter", "id": "81d0f6c6a283e7b67520fdf2c0dded873091689d", "size": "2...
import os import six from tests import base from girder import events from girder.constants import ROOT_DIR from girder.utility.model_importer import ModelImporter from PIL import Image def setUpModule(): base.enabledPlugins.append('thumbnails') base.startServer() def tearDownModule(): base.stopServer(...
{ "content_hash": "9643fa936ed22edc640c01803550364d", "timestamp": "", "source": "github", "line_count": 227, "max_line_length": 81, "avg_line_length": 36.34361233480176, "alnum_prop": 0.5536969696969697, "repo_name": "chrismattmann/girder", "id": "ab904f1aa5a724b9b895217d212037007334547d", "size": ...
from . import nxadapter from . import community from . import centrality from _NetworKit import ParallelPartitionCoarsening # external imports import networkx def save(name, dir="."): """ Save a figure """ savefig(os.path.join(dir, "{0}.pdf".format(name)), bbox_inches="tight", transparent=True) def coloringToColo...
{ "content_hash": "a361f412883e6100572c1744972ed589", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 118, "avg_line_length": 31.51063829787234, "alnum_prop": 0.712356515867657, "repo_name": "fmaschler/networkit", "id": "b8766baf1055354eac5594f646bc2538a5efc51c", "size": "1...
from migen import * from migen.genlib.resetsync import AsyncResetSynchronizer from litex.gen import LiteXModule from litex_boards.platforms import xilinx_zcu106 from litex.soc.cores.clock import * from litex.soc.integration.soc_core import * from litex.soc.integration.builder import * from litex.soc.cores.led import...
{ "content_hash": "c8b8110702dea279c6773e4eae370e31", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 128, "avg_line_length": 40.39823008849557, "alnum_prop": 0.5051478641840088, "repo_name": "litex-hub/litex-boards", "id": "48f0c41720a2f9052ec45c439289af7046347b29", "size...
from silon import *
{ "content_hash": "91b61176290c8f7f1c03737f07093fc1", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 19, "avg_line_length": 19, "alnum_prop": 0.7894736842105263, "repo_name": "marxus85/silon", "id": "9653b7219f5242ce43ea72aba7e4752ac6b3e492", "size": "19", "binary": false...
from operator import add, mul, sub, truediv def arithmetic(a, b, operator): ops = {'add': add, 'subtract': sub, 'multiply': mul, 'divide': truediv} return ops[operator](a, b)
{ "content_hash": "00219fec357a3b46690aec009a89f492", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 75, "avg_line_length": 30.833333333333332, "alnum_prop": 0.6486486486486487, "repo_name": "the-zebulan/CodeWars", "id": "5d9e5b4d5c2a3de9d822a4cfc1d57cc9af8e1d06", "size": "...
""" Map Interface Module Copyright 2013 Rob "N3X15" Nelson <nexis@7chan.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, c...
{ "content_hash": "b0316160631c4266094bf946f3dcd860", "timestamp": "", "source": "github", "line_count": 1059, "max_line_length": 172, "avg_line_length": 35.346553352219075, "alnum_prop": 0.4773723017738833, "repo_name": "Boggart/ByondTools", "id": "19faf94f13d3effaa0eedd801a997f52aec41664", "size":...
class StagedObject: """ Use this class as a mixin to provide an interface for onStage/offStage objects. The idea here is that a DistributedObject could be present and active due to simple visibility, but we want to hide or otherwise disable it for some reason. """ UNKNOWN = -1 OFF = 0 ...
{ "content_hash": "43ac93dbbd5a6cc0959c6d375b17de11", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 83, "avg_line_length": 30.365079365079364, "alnum_prop": 0.6032409827496079, "repo_name": "chandler14362/panda3d", "id": "3127bd6e0651a7e8bc8ceca470600eca8782379d", "size":...
""" gallerize ~~~~~~~~~ :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ VERSION = '0.5-dev'
{ "content_hash": "b8142d69b85a308c01010f123867fdcc", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 42, "avg_line_length": 14.777777777777779, "alnum_prop": 0.6541353383458647, "repo_name": "homeworkprod/gallerize", "id": "9a638e22275cf69f2924d90b79be173abdab6e11", "size":...
from datetime import datetime, timedelta from difflib import unified_diff import os from mercurial import ui from mercurial.localrepo import localrepository as hg_repo from mercurial.util import matchdate, Abort from pyvcs.commit import Commit from pyvcs.exceptions import CommitDoesNotExist, FileDoesNotExist, FolderD...
{ "content_hash": "9457f8bc598eaa1ddcf2366d643ecc65", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 90, "avg_line_length": 34.04761904761905, "alnum_prop": 0.5804195804195804, "repo_name": "alex/pyvcs", "id": "4349f340c19eb03fd4f41c84f8356d13e3d05490", "size": "3575", ...
try: from numpy.distutils.fcompiler import FCompiler def runtime_library_dir_option(self, dir): return self.c_compiler.runtime_library_dir_option(dir) FCompiler.runtime_library_dir_option = \ runtime_library_dir_option except Exception: pass def configuration(parent_package='',top_path...
{ "content_hash": "01bbc552ba62b2c45ef6e5f8d29c0bc6", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 73, "avg_line_length": 36.833333333333336, "alnum_prop": 0.5555555555555556, "repo_name": "pcmagic/stokes_flow", "id": "525b33866dabc90550ae410264f92e07cb331cb0", "size": "...
"""Extension action implementations""" import itertools from eclcli.common import command from eclcli.common import utils class ListExtension(command.Lister): """List API extensions""" def get_parser(self, prog_name): parser = super(ListExtension, self).get_parser(prog_name) parser.add_argu...
{ "content_hash": "28250f062bb22e3801474f7e55ec3307", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 78, "avg_line_length": 34.5045871559633, "alnum_prop": 0.5315075777718692, "repo_name": "nttcom/eclcli", "id": "9b66a55ea7fbcb1dbe716dac14da0a2c253177e7", "size": "4374", ...
from os import environ from os.path import join import numpy as np from astropy.io import fits from astropy.convolution import convolve, Box1DKernel from scipy.linalg import solve from matplotlib import pyplot as plt import seaborn as sns plt.interactive(True) from redmonster.datamgr.io2 import read_ndArch from redmo...
{ "content_hash": "26b89432db1b982906d6f1f12caf98d2", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 81, "avg_line_length": 33.339285714285715, "alnum_prop": 0.6845206213176218, "repo_name": "timahutchinson/elg-templates", "id": "9172e2edd45a81c26acffdda1b55b2f3e70c7b2e", ...
""" This file demonstrates a bokeh applet, which can either be viewed directly on a bokeh-server, or embedded into a flask application. See the README.md file in this directory for instructions on running. """ import logging logging.basicConfig(level=logging.DEBUG) from os import listdir from os.path import dirname, ...
{ "content_hash": "a95ec7f2251bf99a56a99f331888dc52", "timestamp": "", "source": "github", "line_count": 237, "max_line_length": 86, "avg_line_length": 30.780590717299578, "alnum_prop": 0.5916381082933516, "repo_name": "jakevdp/bokeh", "id": "38bbc7063df49be8c56f52f3e6a14289f73fc6de", "size": "7295"...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("media_service", "0009_auto_20190204_1606"), ] operations = [ migrations.AlterField( model_name="collection", name="iiif_sour...
{ "content_hash": "04f687fdfa77f1c857e20042ff143517", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 87, "avg_line_length": 27.975, "alnum_prop": 0.4727435210008937, "repo_name": "Harvard-ATG/media_management_api", "id": "f53769af1dc724f7ed4f76548c4a29bca7205b7c", "size": ...
from . import compiled class Compiler: START_CHAR = "{" STMNT = "%" STMNT_END = "%}" EXPR = "{" EXPR_END = "}}" def __init__(self, file_in, file_out, indent=0, seq=0, loader=None): self.file_in = file_in self.file_out = file_out self.loader = loader self.seq =...
{ "content_hash": "38260a8b6a0cc432ebd752c7e50c4691", "timestamp": "", "source": "github", "line_count": 187, "max_line_length": 110, "avg_line_length": 32.294117647058826, "alnum_prop": 0.4583540321245239, "repo_name": "peterhinch/micropython-samples", "id": "a9948a16849c4a526ecd1583731146aa590f8cdb"...
from core.himesis import Himesis import uuid class HEEnum(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule EEnum. """ # Flag this instance as compiled now self.is_compiled = True super(HEEnum, self).__init...
{ "content_hash": "83192f638299a9fba559054ef972e687", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 195, "avg_line_length": 28.474358974358974, "alnum_prop": 0.4673570463755065, "repo_name": "levilucio/SyVOLT", "id": "eea0f90085e6f7e9a5f7179bf68ae7156155d6c9", "size": "22...
import sys import threading import random import time import voodoo.log as log import voodoo.gen.registry.server_registry as ServerRegistry import voodoo.gen.exceptions.registry.RegistryErrors as RegistryErrors import voodoo.gen.exceptions.locator.LocatorErrors as LocatorErrors import voodoo.gen.exceptions.coordinat...
{ "content_hash": "b67056ba0ce40e67d7e54293cce03943", "timestamp": "", "source": "github", "line_count": 496, "max_line_length": 143, "avg_line_length": 40.38709677419355, "alnum_prop": 0.533047124600639, "repo_name": "ganeshgore/myremolab", "id": "2699010d825d012335aa55b463c8bb8538c5199f", "size": ...
"""QuadOperator stores a sum of products of canonical quadrature operators.""" from openfermion.ops._symbolic_operator import SymbolicOperator class QuadOperator(SymbolicOperator): """QuadOperator stores a sum of products of canonical quadrature operators. They are defined in terms of the bosonic ladder ope...
{ "content_hash": "ac6b8aed8ddfbef40f2e8940c5281f87", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 79, "avg_line_length": 32.88461538461539, "alnum_prop": 0.6, "repo_name": "jarrodmcc/OpenFermion", "id": "29aa6bfebe535e5df99799a688851712be96f6d9", "size": "3983", "bin...
from common.serializers.serialization import domain_state_serializer from plenum.common.constants import ROLE, TXN_TYPE, NYM, TARGET_NYM, TXN_AUTHOR_AGREEMENT_TEXT, \ TXN_AUTHOR_AGREEMENT_VERSION, TXN_AUTHOR_AGREEMENT_RETIREMENT_TS, TXN_AUTHOR_AGREEMENT_DIGEST, \ TXN_AUTHOR_AGREEMENT_RATIFICATION_TS from plenum...
{ "content_hash": "b8a9a03aa266433bd8d352b2eb5c07fd", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 100, "avg_line_length": 45.294117647058826, "alnum_prop": 0.683982683982684, "repo_name": "evernym/zeno", "id": "46442edb45964f8cd0de7afa7fca100050a6be0e", "size": "2310", ...
def find_rule(major_info): """Find appropriate rule set for major_info Args: major_info: list containing {'type': x, 'field': y} Returns: rule set filename (excluding '.yml') """ # TODO: return major_info, 'sample_cse_2016'
{ "content_hash": "4ac9d40df429de4bf46a3cd1fb4265ec", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 59, "avg_line_length": 24.181818181818183, "alnum_prop": 0.5939849624060151, "repo_name": "dnsdhrj/graduate-adventure", "id": "235132518482bed92acc1d7250bc36fa8f8914bf", "s...
import pytest from f5.bigip.tm.asm.policy_templates import Policy_Template from f5.sdk_exception import UnsupportedOperation from requests.exceptions import HTTPError @pytest.fixture(scope='class') def return_template(mgmt_root): rc = mgmt_root.tm.asm.policy_templates_s.get_collection() return rc[0], rc[0].i...
{ "content_hash": "00485601bd16c967db9ec8d0f82a04c9", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 65, "avg_line_length": 36.63492063492063, "alnum_prop": 0.6590121317157712, "repo_name": "F5Networks/f5-common-python", "id": "e5d70768bde92a21d46533e28a106dcc9c753d53", "s...
__revision__ = "src/engine/SCons/Options/BoolOption.py 2009/09/04 16:33:07 david" __doc__ = """Place-holder for the old SCons.Options module hierarchy This is for backwards compatibility. The new equivalent is the Variables/ class hierarchy. These will have deprecation warnings added (some day), and will then be r...
{ "content_hash": "cef2b99698bdd3d794a640b503432aea", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 97, "avg_line_length": 31.14814814814815, "alnum_prop": 0.727705112960761, "repo_name": "cournape/numscons", "id": "bcecffcff97fd36a294d94801952bb484a01f5b8", "size": "1995...
import copy import io import os import shutil import sys import tempfile import textwrap import pytest import salt.config import salt.loader import salt.utils.files import salt.utils.versions from salt.state import HighState from salt.utils.pydsl import PyDslError from tests.support.helpers import with_tempdir from t...
{ "content_hash": "ee10cae4687814ba34ccb36d4a74f71a", "timestamp": "", "source": "github", "line_count": 517, "max_line_length": 114, "avg_line_length": 33.10058027079304, "alnum_prop": 0.47840822766318003, "repo_name": "saltstack/salt", "id": "33d131bca8b5728a45f643a0edc5f98ed0bcb95d", "size": "171...
""" Exploring correlations between two variables """ __author__ = 'Diego' import PyQt4.QtGui as QtGui import PyQt4.QtCore as QtCore import matplotlib from vcorr.qt_models import VarListModel matplotlib.use("Qt4Agg") from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas import matplotlib.p...
{ "content_hash": "72ef744f245c73b08b505766afa97bb8", "timestamp": "", "source": "github", "line_count": 272, "max_line_length": 121, "avg_line_length": 37.356617647058826, "alnum_prop": 0.5677590788308238, "repo_name": "diego0020/correlation_viewer", "id": "41e596a69c78cf7d992b22f61cfc3644bdb51c07", ...
import os import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) # -- General con...
{ "content_hash": "11c4d55071f8ae9729d686491f55fc82", "timestamp": "", "source": "github", "line_count": 232, "max_line_length": 80, "avg_line_length": 31.982758620689655, "alnum_prop": 0.692722371967655, "repo_name": "nikkomidoy/yfc-social-site", "id": "5ec0ccf2d5871383a4d504750ada8c7d1b2d73ec", "s...
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl import datetime import decimal from io import BytesIO import pytest from openpyxl.xml.functions import fromstring, tostring, xmlfile from openpyxl.reader.excel import load_workbook from openpyxl import Workbook from .. worksheet import write_...
{ "content_hash": "2a59bb23eeac0fc84041c9cf41d3be62", "timestamp": "", "source": "github", "line_count": 855, "max_line_length": 309, "avg_line_length": 32.94385964912281, "alnum_prop": 0.6174601484006107, "repo_name": "Darthkpo/xtt", "id": "6d17c1c30671e7bc552dfbd1bf1a842c3832edc1", "size": "28167"...
from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext as _ from horizon import exceptions from horizon import forms from akanda.horizon.api import neutron_extensions_client from akanda.horizon.tabs import firewall_tab_redirect from akanda.horizon.firewall.forms import ( C...
{ "content_hash": "3219363e7f0d2a7da54f09b408868741", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 78, "avg_line_length": 38.56923076923077, "alnum_prop": 0.6310331072995612, "repo_name": "dreamhost/akanda-horizon", "id": "4ffc2709c629b273ad294258f0cfcf2ae2a5f5c4", "size...
def can_build(env, platform): if not env["tools"]: return False # Depends on Embree library, which only supports x86_64 and aarch64. if env["arch"].startswith("rv") or env["arch"].startswith("ppc"): return False if platform == "android": return env["android_arch"] in ["arm64v8"...
{ "content_hash": "4201de3e30bb15167c3176624fb85171", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 72, "avg_line_length": 22.59090909090909, "alnum_prop": 0.5935613682092555, "repo_name": "ex/godot", "id": "3bad13f479a14bdab1783bbed9e1fcb5b7d79c60", "size": "497", "bin...
'''Example settings/local.py file. These settings override what's in website/settings/defaults.py NOTE: local.py will not be added to source control. ''' import inspect from . import defaults import os DB_PORT = 27017 DEV_MODE = True DEBUG_MODE = True # Sets app to debug mode, turns off template caching, etc. SECU...
{ "content_hash": "3862d9022d534e8c1426cdd1baa89901", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 81, "avg_line_length": 23.142857142857142, "alnum_prop": 0.7145061728395061, "repo_name": "abought/osf.io", "id": "356ece0af90ba810b47d3bda960bd543f7ad1f99", "size": "1320"...
import time import logging import asyncio import mocores.core.runtime.actor_base import mocores.core.util import mocores.core.actor_pool import mocores.core.worker_thread from mocores.core.util.message_queue import MessageQueue from mocores.core.runtime.membership_table import MembershipTable, MembershipTableEntry c...
{ "content_hash": "71cf23e9aa1f0eef9a99015774468018", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 125, "avg_line_length": 34.30769230769231, "alnum_prop": 0.6068759342301944, "repo_name": "toyteam/Mocores", "id": "02a681d61ca0d88c2cc3f1689bf4e08b3f727cfc", "size": "2676...
""" bace dataset loader. """ import os import deepchem as dc from deepchem.molnet.load_function.molnet_loader import TransformerGenerator, _MolnetLoader from deepchem.data import Dataset from typing import List, Optional, Tuple, Union from deepchem.molnet.load_function.bace_features import bace_user_specified_f...
{ "content_hash": "5f63d151e209c66f562c08fbe457f3e2", "timestamp": "", "source": "github", "line_count": 123, "max_line_length": 91, "avg_line_length": 42.577235772357724, "alnum_prop": 0.7055566163834256, "repo_name": "lilleswing/deepchem", "id": "e1afacce4fe66be99b537712bda4d445b1add5ad", "size": ...
"""Auto-generated file, do not edit by hand. ST metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_ST = PhoneMetadata(id='ST', country_code=239, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='(?:22|9\\d)\\d{5}', possible_length=(7,)...
{ "content_hash": "1e85671fb54ab2c03368854228fd36f5", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 143, "avg_line_length": 87, "alnum_prop": 0.6925287356321839, "repo_name": "daviddrysdale/python-phonenumbers", "id": "17279069203955ffe02fd286db973ce1dc299867", "size": "69...
from zoof.lib.yoton3 import Connection c1 = Connection() c2 = Connection() c1.bind('localhost:yoton3test') c2.connect('localhost:yoton3test')
{ "content_hash": "f9ed01ccfa1dd8e28af86cb57001087c", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 38, "avg_line_length": 18, "alnum_prop": 0.7638888888888888, "repo_name": "zoofIO/zoof", "id": "7c09bb3c023143982a6995f03c9fedb2ac72c29d", "size": "144", "binary": false, ...
clusters = [cluster, cluster, cluster] cluster = [{gene_id:1, phage_id:1, translation:"proteinString", start:0, end:227, locus_tag:"name",blastp:[hits],clustulo:[diffHits]}, {gene}, {gene}] hits = [{query_id:"same as above gene_id", subject_id:222, query_start:1, subject_start:4, e_value:float, percent_identity(ident...
{ "content_hash": "c2a9bf01ad1946e985c640401b4f042b", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 151, "avg_line_length": 43, "alnum_prop": 0.5784515749190462, "repo_name": "pjtatlow/geneysis", "id": "341f4d478b74893a81e5c0968a2acff01ff44d23", "size": "3397", "binary"...
from .version import __version__
{ "content_hash": "97e8ab60232d4cb924b59f1cd0e2a9fe", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 33, "avg_line_length": 34, "alnum_prop": 0.7058823529411765, "repo_name": "arokem/MRS-old", "id": "7f15ca08581a5ae8147af744e7f841260342dd38", "size": "34", "binary": false...
import datetime import logging try: import threading except ImportError: threading = None from django.template.loader import render_to_string from debug_toolbar.panels import DebugPanel class ThreadTrackingHandler(logging.Handler): def __init__(self): if threading is None: raise NotImpl...
{ "content_hash": "6017db3a8119b6d8892dc124308894c9", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 119, "avg_line_length": 31.685714285714287, "alnum_prop": 0.6167718665464382, "repo_name": "LongMan/django-debug-toolbar", "id": "cb881481c050b000970915be4c06dc5d023b3169", ...
from __future__ import absolute_import import json import time import inspect import solvebio from .version import VERSION from .errors import SolveError from .utils.validators import validate_api_host_url import platform import requests import textwrap import logging from requests import Session from requests imp...
{ "content_hash": "143ba6adfed3d3d08b3d94bd14b97243", "timestamp": "", "source": "github", "line_count": 286, "max_line_length": 100, "avg_line_length": 32.56643356643357, "alnum_prop": 0.5768735237277217, "repo_name": "solvebio/solvebio-python", "id": "a77b93b9ad9a9045234a37073ff48989f5ed50ad", "si...
import copy from tempest.lib.api_schema.response.compute.v2_1 import parameter_types from tempest.lib.api_schema.response.compute.v2_47 import servers as servers247 show_server_diagnostics = { 'status_code': [200], 'response_body': { 'type': 'object', 'properties': { 'state': { ...
{ "content_hash": "c955f068a23937257f6239fef5d886df", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 79, "avg_line_length": 46.208333333333336, "alnum_prop": 0.46348061316501354, "repo_name": "cisco-openstack/tempest", "id": "e2e45bc29e615fed06c6d84a771c74dda7d3524b", "si...
""" SPEED: Tests calculations for evapotranspiration calculations; those in the ET subclass in speedcalc.py GitHub repository: https://github.com/maplion/SPEED @author: Ryan Dammrose aka MapLion """ import unittest import speedcalc import test_logging __author__ = "Ryan Dammrose" __copyright__ = "Copyright 2015" __l...
{ "content_hash": "ada9c9a86663b23e1d46404017ea7ad2", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 103, "avg_line_length": 36.51470588235294, "alnum_prop": 0.5561820378574305, "repo_name": "maplion/SPEED", "id": "f565af091387f6b78896c4dfe8dec0e8b3481be1", "size": "2529",...
import requests import traceback import sys from bs4 import BeautifulSoup import csv ## getHTML def getHTML(): url = "http://en.wikipedia.org/wiki/Mobile_country_code" html = "" try : r = requests.get(url) html = r.text.encode("utf-8") except: traceback.print_exc() retu...
{ "content_hash": "b418c5dc60d808cb500c33c0d1a3b217", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 88, "avg_line_length": 28.6875, "alnum_prop": 0.5787944807552651, "repo_name": "ravikiranj/mcc-mnc-csv", "id": "a6c6e5bcfba459dc2088413f710a6068d46c4b19", "size": "2777", ...
""" Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ import serial import modbus_tk import modbus_tk.defines as cst from modbus_tk import modbus...
{ "content_hash": "fa29b299a2366912ae958a0016f30995", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 107, "avg_line_length": 31.776119402985074, "alnum_prop": 0.6256458431188351, "repo_name": "nodesense/nodesense-modbus-serial", "id": "42c168f6890efea0460eacd7266a7953193aa78...
import platform import six.moves.configparser from base64 import b64decode from typing import Optional, Set config_file = six.moves.configparser.RawConfigParser() # type: ignore # https://github.com/python/typeshed/pull/206 config_file.read("/etc/zulip/zulip.conf") # Whether we're running in a production environment...
{ "content_hash": "b8af7c0ac6fe8a9090d1887349f4b2b3", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 116, "avg_line_length": 38.022222222222226, "alnum_prop": 0.7101110461718293, "repo_name": "vabs22/zulip", "id": "b278562b39c7d7fe5917b8ff6cbd0a64b2249985", "size": "5560"...
__author__ = 'rolandh' from saml2.attribute_converter import d_to_local_name from saml2.attribute_converter import ac_factory from saml2.mongo_store import export_mdstore_to_mongo_db from saml2.mongo_store import MetadataMDB from saml2.mdstore import MetadataStore from saml2.mdstore import destinations from saml2.mdst...
{ "content_hash": "50c5c8e2aae6a01e9a49d59a7cc6ce11", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 79, "avg_line_length": 31.96842105263158, "alnum_prop": 0.6736911425749095, "repo_name": "arbn/pysaml2", "id": "077a3f4e619cd029313dd5420dfe62dfc07434e1", "size": "3062", ...
from django.db import models from django.utils.translation import gettext as _ class Product(models.Model): name = models.CharField(max_length=128) # The actual product's internal name, I am sure all products have one # This simplifies the database table function invocations product_code = models.Char...
{ "content_hash": "8c787f309d20e255a7488af3d9d77939", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 73, "avg_line_length": 29.13888888888889, "alnum_prop": 0.6901811248808389, "repo_name": "creativepsyco/django-analytics", "id": "d7e291827c07120197cd07a0d69a8b18b0b72af2", ...
fname = input('Enter the file name: ') fhand = open(fname) count = 0 for line in fhand: if line.startswith('Subject:') : count = count + 1 print('There were', count, 'subject lines in', fname)
{ "content_hash": "d0047f3738a4e9107b57ec3dc7ca863e", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 53, "avg_line_length": 29.428571428571427, "alnum_prop": 0.6407766990291263, "repo_name": "mkhuthir/learnPython", "id": "b8645d9f4a9588947fd0ff5ad548eb122d9f6502", "size": "...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('first_app', '0008_slotcharacter'), ] operations = [ migrations.AlterField( model_name='slotcharacter', ...
{ "content_hash": "b46f1e65ec470d6992486a175a8910c3", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 127, "avg_line_length": 25.789473684210527, "alnum_prop": 0.6469387755102041, "repo_name": "CONSOLNY/rglk", "id": "9e6d17d97ed645344ce3853d79bc791eb6a14679", "size": "562",...
from .configurable_waiting_times import * from .discard_info import * from .game_info import * from .game_message_option import * from .game_type_options import * from .lobby_options import * from .player_info import * from .seat_info import * from .table_params import * from .tuple_table import *
{ "content_hash": "317bfd201e1e3e50dd212b55d9d5f2e0", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 41, "avg_line_length": 29.8, "alnum_prop": 0.7583892617449665, "repo_name": "Ericmas001/BluffinMuffin.Protocol", "id": "c053ab0c1488aa9d2cb2ee2431b5427116f629fb", "size": "...
from django import template from groups.models import Group register = template.Library() @register.filter('get_total_members') def get_total_members(members_set_list): '''Returns the total of all members in the group''' return len(members_set_list.all())
{ "content_hash": "8907f59ffd87d29f67221496904b5b7d", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 55, "avg_line_length": 24.363636363636363, "alnum_prop": 0.7388059701492538, "repo_name": "pihentagyu/django_chms", "id": "f3773430624335569b06c489a2ae6f82565b6c13", "size"...
__name__ = 'test' import Queue import loggerfactory import multiprocessing import ConfigParser log = None def readConfigFile(configFile, section, options=None): logs = [('info', 'Reading config file [{0}]'.format(configFile))] config = ConfigParser.ConfigParser() if not config.read(configFile): logs.append(('...
{ "content_hash": "5f2071cb3e55ea07d46387f95cea6bb7", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 103, "avg_line_length": 25.96875, "alnum_prop": 0.6732851985559567, "repo_name": "unix-beard/newsbot", "id": "d15bfef1c065993b57f64dbbb969528d2091f460", "size": "1662", "...
""" Get data from sensors and post it to specified mqtt channel in json-format Requires: Ruuvitag sensor - pip3 install --user ruuvitag-sensor Paho MQTT - pip3 install --user paho-mqtt Example usage: ./post_to_mqtt.py --mac DE:AD:BE:EE:EE:FF -b mqtt.ikenet \ -t ruuvitag/sauna -i 60 -l saunassa See...
{ "content_hash": "19f8236d1d77465a39de1da19ab1dd07", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 84, "avg_line_length": 29.08108108108108, "alnum_prop": 0.6899008674101611, "repo_name": "ttu/ruuvitag-sensor", "id": "f93d8ae1a6f61d62aed942990cca783379d44646", "size": "...
""" Multiple loop script calling up simviz1.py. That is, the user can assign multiple values to any of the legal input parameters to simviz1.py and automatically get a loop over all combinations of the input parameter values. From each experiment we extract the maximum amplitude of the oscillations and store this in a...
{ "content_hash": "f1446b351c060123950eea9b336f8965", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 70, "avg_line_length": 33.84126984126984, "alnum_prop": 0.6819887429643527, "repo_name": "sniemi/SamPy", "id": "1ecb75df082704ec0286fd6d29471e4e1c9b66b3", "size": "2154", ...
import copy import sys import os import re import operator import shlex import warnings import heapq import bisect import random import socket from subprocess import Popen, PIPE from tempfile import NamedTemporaryFile from threading import Thread from collections import defaultdict from itertools import chain from func...
{ "content_hash": "1cc15a8e99dcb750a26c62e89a656b9d", "timestamp": "", "source": "github", "line_count": 2420, "max_line_length": 100, "avg_line_length": 38.38099173553719, "alnum_prop": 0.572662087379686, "repo_name": "TK-TarunW/ecosystem", "id": "5fb10f86f4692dcb16d6d235ed9011dedbd06713", "size": ...
""" Dummy conftest.py for pype. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ from __future__ import print_function, absolute_import, division import pytest
{ "content_hash": "f1f316c2c6b4bd1b11eccf2ffc03adb3", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 64, "avg_line_length": 26.4, "alnum_prop": 0.7045454545454546, "repo_name": "cs207-project/pype-package", "id": "10e62ec252d2d0b0e6f900415260fd8e5b464954", "size": "310", ...
import unittest import os, os.path import vsan_policy import vmdk_utils import volume_kv import vsan_info class TestVsanPolicy(unittest.TestCase): """ Test VSAN Policy code """ @unittest.skipIf(not vsan_info.get_vsan_datastore(), "VSAN is not found - skipping vsan_info tests") def s...
{ "content_hash": "e9a2f56abce403451d5087704206c171", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 78, "avg_line_length": 32.916666666666664, "alnum_prop": 0.6308860759493671, "repo_name": "BaluDontu/docker-volume-vsphere", "id": "53a1f33cd3846a7d2d3296e3058938e088591452",...
from ZSI import _copyright, _seqtypes, ParsedSoap, SoapWriter, TC, ZSI_SCHEMA_URI,\ EvaluateException, FaultFromFaultMessage, _child_elements, _attrs, _find_arraytype,\ _find_type, _get_idstr, _get_postvalue_from_absoluteURI, FaultException, WSActionException,\ UNICODE_ENCODING from ZSI.auth import AUTH fro...
{ "content_hash": "a49723c103c880d82a2708f527093a56", "timestamp": "", "source": "github", "line_count": 577, "max_line_length": 152, "avg_line_length": 38.39168110918544, "alnum_prop": 0.574349945828819, "repo_name": "acigna/pywez", "id": "2989acc9d9a02b49a310203e4d60b1f0924d741f", "size": "22248",...
"""Utilities to create TensorProtos.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import six from tensorflow.core.framework import tensor_pb2 from tensorflow.core.framework import tensor_shape_pb2 from tensorflow.python.framework im...
{ "content_hash": "ce311bb2577d12b4b88a76d43f7363e2", "timestamp": "", "source": "github", "line_count": 667, "max_line_length": 80, "avg_line_length": 36.56521739130435, "alnum_prop": 0.6860879904875149, "repo_name": "HaebinShin/tensorflow", "id": "098558fd3e3d1474794f9c7903ec8bb6e7d75745", "size":...
try: import usocket as socket, uselect as select, uerrno as errno except ImportError: try: import socket, select, errno select.poll # Raises AttributeError for CPython implementations without poll() except (ImportError, AttributeError): print("SKIP") raise SystemExit polle...
{ "content_hash": "149ff7107a2604da9a7660c440f86bbf", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 87, "avg_line_length": 24.73170731707317, "alnum_prop": 0.7159763313609467, "repo_name": "trezor/micropython", "id": "82a7195c03b2a215a787e74b87ad492329a9e2bb", "size": "10...
class Solution(object): def generateTrees(self, n): """ :type n: int :rtype: List[TreeNode] """
{ "content_hash": "bde7b626b11412ea086b536549f9396f", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 31, "avg_line_length": 20, "alnum_prop": 0.4642857142857143, "repo_name": "quake0day/oj", "id": "072ec53bf88deaf681f1c08c491d2cf82401528c", "size": "311", "binary": false,...
import sys import json import codecs import re import copy import getopt #for now contains dummy rules class ValidationRule: def __init__(self, type, param = None): if type == "USER_REGEX": type = ValidationType.USER_REGEX if type == "NOT_NULL": type = ValidationType.NOT_NU...
{ "content_hash": "452a2f54b84e70e08a9acdc6707af21c", "timestamp": "", "source": "github", "line_count": 455, "max_line_length": 239, "avg_line_length": 38.25934065934066, "alnum_prop": 0.5519875919117647, "repo_name": "usc-isi-i2/etk", "id": "6e999eae2b0df93aede2c470f8bec37f42d421f2", "size": "1740...
lista1 = [] lista2 = [] continuar = int(raw_input("¿Cuantas personas desea añadir?: ")) while int (continuar) != len (lista1): personas=str(raw_input("Nombre de la persona: ")) lista1.append(personas) edades=str(raw_input("Edad de la persona: ")) lista2.append(edades) print "" print "Ha ingresa...
{ "content_hash": "26b9659f7fe44eb69339a1bb75777fa1", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 63, "avg_line_length": 25.238095238095237, "alnum_prop": 0.5886792452830188, "repo_name": "Kings42/HelloWorld", "id": "2b4c40d369dd2c4ff2f90954727297b6e2fe228e", "size": "5...
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
{ "content_hash": "6b93e39877b1f1ec3b5f22af0bbdd0b9", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 114, "avg_line_length": 38.7557251908397, "alnum_prop": 0.6604293874335238, "repo_name": "alexryndin/ambari", "id": "d9bf76c3aa4e253c12c854d45f1ddf29636f7395", "size": "50...
""" Text Segmentation Metrics 1. Windowdiff Pevzner, L., and Hearst, M., A Critique and Improvement of an Evaluation Metric for Text Segmentation, Computational Linguistics 28, 19-36 2. Generalized Hamming Distance Bookstein A., Kulyukin V.A., Raita T. Generalized Hamming Distance Information Retrieval 5, 2002...
{ "content_hash": "eef8739cd14c1a96f0838bdd67a498ef", "timestamp": "", "source": "github", "line_count": 212, "max_line_length": 87, "avg_line_length": 31.55188679245283, "alnum_prop": 0.6065181641500972, "repo_name": "nltk/nltk", "id": "62e07892f9e054f5e17fe56745bb2f2e9561e0b8", "size": "6999", "...
""" (c) 2017 David Barroso <dbarrosop@dravetech.com> This file is part of Ansible Ansible is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
{ "content_hash": "2eec198e84f56a582f2a456a4a414e27", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 79, "avg_line_length": 26.96825396825397, "alnum_prop": 0.5950559152442614, "repo_name": "napalm-automation/napalm-ansible", "id": "8fdcb6ae1bea2ced7c08137948417a75b6a1aa98"...
'''PipelineGeneset.py - Tasks for processing gene sets ====================================================== Most of this tasks take a geneset (.gtf.gz) from ENSEMBL as input. As of ENSEMBL release 75 the gtf file contains both transcripts but also untranscribed features such as pseudo genes, for example:: 1 ...
{ "content_hash": "c68d78106f18b566bd58c05c33fce7d4", "timestamp": "", "source": "github", "line_count": 1647, "max_line_length": 179, "avg_line_length": 27.97571341833637, "alnum_prop": 0.5948650056428509, "repo_name": "CGATOxford/CGATPipelines", "id": "6bc8452c96db04b6be7d85a6bee37a4cac5f3346", "s...
import pytest from airflow.providers.google.cloud.example_dags.example_speech_to_text import BUCKET_NAME from tests.providers.google.cloud.utils.gcp_authenticator import GCP_GCS_KEY from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context @pytest.mark.backend("mysql", "...
{ "content_hash": "5aebc3a02b316cd534cdf3bb09c4453e", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 103, "avg_line_length": 37.30434782608695, "alnum_prop": 0.7354312354312355, "repo_name": "bolkedebruin/airflow", "id": "af4a4fd0a750fa35c270c2fdf222164986f3d099", "size": ...
""" :copyright: Alistair Muldal :license: Unknown, shared on StackOverflow and Pastebin Reference: P. Perona and J. Malik. Scale-space and edge detection using ansotropic diffusion. IEEE Transactions on Pattern Analysis and Machine Intelligence, 12(7):629-639, July 1990. <http://www.cs.berkeley.edu/~malik/papers/MP-an...
{ "content_hash": "3b8409c9d305a66f53227dc85d6ab939", "timestamp": "", "source": "github", "line_count": 207, "max_line_length": 81, "avg_line_length": 30.96135265700483, "alnum_prop": 0.6036823217350601, "repo_name": "agile-geoscience/agilegeo", "id": "e9ae9764ef9d72646c779372d3b268a4c54e8afb", "si...
import os import lxml.etree def constructURL(command, params=None): """ construct a URL for e-stat """ base = "http://api.e-stat.go.jp/rest/1.0/app" key = os.environ["PYESTAT_KEY"] commandList = { "getStatsList": ["surveyYears", "openYears", "statsField", "statsCode", ...
{ "content_hash": "1aed88a75d6bbaf6ba0417f1a5b2e10f", "timestamp": "", "source": "github", "line_count": 140, "max_line_length": 106, "avg_line_length": 34.042857142857144, "alnum_prop": 0.5558120016785565, "repo_name": "mzmttks/pyestat", "id": "fe7a695851b1a2d4c37863288ec84ac1d002531e", "size": "47...
""" Handlers to process the responses from the Humble Bundle API """ __author__ = "Joel Pedraza" __copyright__ = "Copyright 2014, Joel Pedraza" __license__ = "MIT" import itertools import requests from humblebundle.exceptions import * from humblebundle.models import * # Helper methods def parse_data(response): ...
{ "content_hash": "da99466bc422de1537514e15ffe4adc0", "timestamp": "", "source": "github", "line_count": 170, "max_line_length": 114, "avg_line_length": 33.14705882352941, "alnum_prop": 0.6858917480035492, "repo_name": "saik0/humblebundle-python", "id": "36fc6e1d6dec94cb42114e9b864b2b57c25dadc4", "s...
#include our libraries & settings import httplib import time import settings import motion import shutil import os import sys while True: try: #create a connection to the webcam print "Connectiong to", settings.host conn = httplib.HTTPConnection(settings.host) #req...
{ "content_hash": "dc4cca6373fe8a1926994d372b0a541f", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 187, "avg_line_length": 42.81818181818182, "alnum_prop": 0.485727765982543, "repo_name": "jared0x90/pyipcam", "id": "e121f485f6e0853bea1c0c5172a110d1c6799df2", "size": "537...
""" S-expression-based persistence of python objects. It does something very much like L{Pickle<pickle>}; however, pickle's main goal seems to be efficiency (both in space and time); jelly's main goals are security, human readability, and portability to other environments. This is how Jelly converts various objects t...
{ "content_hash": "4e4a5a879d3903f253dd9c5962aaa421", "timestamp": "", "source": "github", "line_count": 1125, "max_line_length": 83, "avg_line_length": 32.22577777777778, "alnum_prop": 0.5940861698019528, "repo_name": "EricMuller/mywebmarks-backend", "id": "c92c3898658d51820dc34eebebf8c29f69258fec", ...
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 'UserProfile' db.create_table(u'crowdataapp_userprofile', ( (u'id', self.gf('django.db.models.fields.Auto...
{ "content_hash": "7932469d44b2cbb9da3e2d2d9f6b2a16", "timestamp": "", "source": "github", "line_count": 151, "max_line_length": 400, "avg_line_length": 79.43046357615894, "alnum_prop": 0.5621143905285977, "repo_name": "the-engine-room/replication-sprint-02", "id": "6d7022c5645d4ad9ad6a5a6eb269a24c839...