text
stringlengths
4
1.02M
meta
dict
""" Boxy Theme Changelog """ import sublime import sublime_plugin import webbrowser STYLES = ''' .mdpopups { {{'.background'|css}} } .boxy-changelog a { text-decoration: none; } .boxy-changelog h1, .boxy-changelog h2, .boxy-changelog h3, .boxy-changelog h4, .boxy-changelog h5, .boxy-changelog h6 { margin...
{ "content_hash": "ab6639a4d99d38416a151a53a97c3c91", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 78, "avg_line_length": 24.383333333333333, "alnum_prop": 0.5686944634313056, "repo_name": "oivva/boxy", "id": "64ebd323d6151451bd47654d17e2845163f60acd", "size": "1488", ...
from .aws import Action as BaseAction from .aws import BaseARN service_name = "AWS Step Functions" prefix = "states" class Action(BaseAction): def __init__(self, action: str = None) -> None: super().__init__(prefix, action) class ARN(BaseARN): def __init__(self, resource: str = "", region: str = ""...
{ "content_hash": "377d70af5dd7827723c0ac1c0456e734", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 88, "avg_line_length": 36.904761904761905, "alnum_prop": 0.7638709677419355, "repo_name": "cloudtools/awacs", "id": "1e6b30f5bfaf37b8ccc2bf31fa87f194a54cad24", "size": "166...
""" fabcloudkit Functions for managing supervisor. This module provides functions that check for installation, install, and manage an installation of, supervisor. If an installation already exists (e.g., as part of an AMI), the files directories used by that installation are (for now) assumed to c...
{ "content_hash": "7fdfab1f4fa6168eead75deaedefa272", "timestamp": "", "source": "github", "line_count": 539, "max_line_length": 106, "avg_line_length": 34.534322820037104, "alnum_prop": 0.624529923713334, "repo_name": "waxkinetic/fabcloudkit", "id": "aa422619cdd6b508fbf5bd8a20723be7d0bd0c7c", "size...
import operator import six from nova.openstack.common import jsonutils from paxes_nova.scheduler import filters class JsonFilter(filters.BaseHostFilter): """Host Filter to allow simple JSON-based grammar for selecting hosts. """ def _op_compare(self, args, op): """Returns True if the specifie...
{ "content_hash": "0bd3c01400871c119cb1be65652a60da", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 73, "avg_line_length": 31.32330827067669, "alnum_prop": 0.5544887181949112, "repo_name": "windskyer/k_nova", "id": "1be8eeb17ce76816e0631bc67a4fb8744bda2c9e", "size": "480...
from setuptools import setup, find_packages setup(name='cbtests', version='0.2', description='Simple tests for json api testing', url='https://github.com/codebolab/cbtests', author='code.bo', author_email='contact@josezambrana.com', license='MIT', packages=find_packages(), ...
{ "content_hash": "a1fc3637aff97d06d50363c18f0a187a", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 54, "avg_line_length": 32.69230769230769, "alnum_prop": 0.6423529411764706, "repo_name": "codebolab/cbtests", "id": "3bfdf8cb1fa28a880cd548a8cb8792efc6905c1c", "size": "425...
from __future__ import unicode_literals from django.core import validators from django.db import models, migrations from django.utils import timezone class Migration(migrations.Migration): dependencies = [ ('contenttypes', '__first__'), ] operations = [ migrations.CreateModel( ...
{ "content_hash": "d13325ab342d4d59446c37f4b4a516ac", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 277, "avg_line_length": 57.13846153846154, "alnum_prop": 0.5893914916532041, "repo_name": "dhoffman34/django", "id": "de38c960fbf60a21896b07bdf0ca978d1a717ba8", "size": "37...
import pytest from team.person import Person def test_init_from_args(): person = Person(name="Theodore Burton Fox Ruoff", github="nobody") assert person.name == "Theodore Burton Fox Ruoff" assert person.github == "nobody" def test_init_from_dict(): d = { "name": "Theodore Burton Fox Ruoff", "github": ...
{ "content_hash": "9c8116e60a7aac04faa7b89fd5d67577", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 70, "avg_line_length": 34.23076923076923, "alnum_prop": 0.6786516853932584, "repo_name": "LandRegistry/team-dashboard", "id": "6ef10af94f2b4cfb67012a61fb7d9779c6f0c84e", "s...
from setuptools import setup def readme(): with open('README.md') as f: return f.read() setup(name='zaphodIFU', version='0.1', description='Fake IFU generator for MaNGA spectral fitting diagnosis', url='http://github.com/zpace/zaphod', author='Zach Pace', author_email='zpace...
{ "content_hash": "87bdb41d55f577de61b9f4926f5ebcff", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 76, "avg_line_length": 26.857142857142858, "alnum_prop": 0.6081560283687943, "repo_name": "zpace/zaphod", "id": "546cb58fff380448b5089323a2ebc42012cb549e", "size": "564", ...
from fusion.openstack.common import gettextutils gettextutils.install('fusion')
{ "content_hash": "295c2bf408405cd9c131bbf2d797e9c9", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 48, "avg_line_length": 27, "alnum_prop": 0.8395061728395061, "repo_name": "vineethtw/fusion", "id": "9bd52036b66bb799b3aef0c4ee122ebdea8c448e", "size": "751", "binary": fa...
{ 'name' : 'United Backend Theme for Odoo 9c', 'version' : '0.3', 'author' : 'Openworx', 'category' : 'Website', 'summary': 'Give Odoo 9 community version a cleaner backend theme', 'website' : 'http://www.openworx.nl', 'description': """ Give Odoo 9 community version a cleaner theme, based o...
{ "content_hash": "34176faa4549ab75e86936116ce06168", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 152, "avg_line_length": 30.210526315789473, "alnum_prop": 0.5905923344947736, "repo_name": "vileopratama/vitech", "id": "05b488608cf0b9f7cae5388415009c5d66b4d928", "size": ...
from __future__ import print_function import argparse import json import sys from cgi import escape from collections import defaultdict import types def html_escape(item, escape_quote=False): if isinstance(item, types.StringTypes): rv = escape(item) if escape_quote: rv = rv.replace('...
{ "content_hash": "5e43ec0e3424d35b80a52e16f18ad156", "timestamp": "", "source": "github", "line_count": 307, "max_line_length": 101, "avg_line_length": 31.172638436482085, "alnum_prop": 0.5344827586206896, "repo_name": "youtube/cobalt", "id": "6ef9fbd20e3f1c6c10beb7fa11e005e5659c8d7e", "size": "957...
from selenium.webdriver.common import by from openstack_dashboard.test.integration_tests.pages import basepage from openstack_dashboard.test.integration_tests.pages.settings import \ changepasswordpage from openstack_dashboard.test.integration_tests.regions import forms class UsersettingsPage(basepage.BaseNaviga...
{ "content_hash": "9806775887ef99ffb26cf54d3de182f4", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 76, "avg_line_length": 34.32394366197183, "alnum_prop": 0.6680344686089454, "repo_name": "ChameleonCloud/horizon", "id": "e8412fb9a54e7195f6ffb6dacd125361fc6bb643", "size":...
from django import http from django.contrib import messages from django.core.urlresolvers import reverse from mox import IsA from novaclient import exceptions as novaclient_exceptions from horizon import api from horizon import test class AccessAndSecurityTests(test.BaseViewTests): def setUp(self): super...
{ "content_hash": "38b618de7e4278eb8a6399c98ed9eda1", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 79, "avg_line_length": 36.43333333333333, "alnum_prop": 0.6171088746569076, "repo_name": "citrix-openstack/horizon", "id": "3caf353f1fb00d01ba8e8e0df0b75af5565340a4", "size...
"""Test suite for XenAPI.""" import ast import base64 import contextlib import copy import functools import os import re import uuid import mock from mox3 import mox from oslo_concurrency import lockutils from oslo_config import cfg from oslo_config import fixture as config_fixture from oslo_log import log as logging...
{ "content_hash": "ddcaadeb60ab5ff195a2e2507da9a944", "timestamp": "", "source": "github", "line_count": 4164, "max_line_length": 79, "avg_line_length": 42.50504322766571, "alnum_prop": 0.5620455277386985, "repo_name": "apporc/nova", "id": "284fd7df30b73a56b4666c5315b5d87b7cf0c914", "size": "177611"...
import json import logging import ochopod import os import tempfile import threading import time import shutil from argparse import ArgumentParser from copy import deepcopy from ochopod.api import Binding, LifeCycle, Model, Tool from ochopod.core.core import Coordinator from ochopod.core.fsm import diagnostic, shutdow...
{ "content_hash": "2f038af5895e4a4191a8b7dd962f8c9c", "timestamp": "", "source": "github", "line_count": 499, "max_line_length": 118, "avg_line_length": 42.00400801603207, "alnum_prop": 0.5025286259541984, "repo_name": "autodesk-cloud/ochopod", "id": "9a005e990abdb52914eecebb9b5944a77acb8266", "size...
from scorpion.sharedobj import * from scorpion.sql import * from scorpion.sqlparser import * from scorpion.db import * parsed = parse_sql("select hr, avg(temp) from readings group by hr") parsed.where.append("sensor in %s") params = [('1', '2', '18')] db = connect("intel") obj = SharedObj(db, parsed=parsed, params...
{ "content_hash": "f7008c238265b47453af4a95624814bd", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 68, "avg_line_length": 24.625, "alnum_prop": 0.6979695431472082, "repo_name": "sirrice/scorpion", "id": "c92c983f106a41b11d0a0ddf6d509d88618ef7a1", "size": "394", "binary...
from automationclient import base from automationclient import utils class ListExtResource(base.Resource): @property def summary(self): descr = self.description.strip() if not descr: return '??' lines = descr.split("\n") if len(lines) == 1: return lines[...
{ "content_hash": "a2dc1e593ed3d34669405feadc96a771", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 54, "avg_line_length": 25.59375, "alnum_prop": 0.6214896214896215, "repo_name": "StackOps/python-automationclient", "id": "a694cfe9f3a08b0d1b20c3b2fee1f9f91620feed", "size"...
import os import platform import unittest from textwrap import dedent from nose.plugins.attrib import attr from parameterized.parameterized import parameterized from conans.client.build.cmake import CMake from conans.model.version import Version from conans.test.utils.deprecation import catch_deprecation_warning from...
{ "content_hash": "94cb10ec752b6d409a860ac6b6991ca1", "timestamp": "", "source": "github", "line_count": 482, "max_line_length": 101, "avg_line_length": 40.892116182572614, "alnum_prop": 0.5909690512430238, "repo_name": "memsharded/conan", "id": "eb2b43a0858554e580865612b90a87e1c354f4f3", "size": "1...
""" CLASS: ContactHandler.py FOR: This Class is responsible for handling Contact Us Page. CREATED: 21 December 2013 MODIFIED: 21 December 2013 LOGS: """ # Import Statements from BaseHandler import * import Cookies import EmailHandler # Terms Class class ContactHandler(BaseHandler): ...
{ "content_hash": "a14ce9409ec31d23570f7230572d7d9a", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 111, "avg_line_length": 32.04, "alnum_prop": 0.5973782771535581, "repo_name": "mathee92/unirentalz", "id": "7421be61d07b676aa59e46fe2a5958a09c8d94be", "size": "1602", "bi...
""" The `~certbot_dns_route53.dns_route53` plugin automates the process of completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and subsequently removing, TXT records using the Amazon Web Services Route 53 API. .. note:: The plugin is not installed by default. It can be installed by heading to ...
{ "content_hash": "aa8da92b7791ba9dfddf8efcd40b361e", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 95, "avg_line_length": 34.91129032258065, "alnum_prop": 0.6225456225456225, "repo_name": "letsencrypt/letsencrypt", "id": "1b59f5620a2175fdd6f71e1806edefc93da72a73", "size...
""" Created on Fri Aug 4 11:52:11 2017 @author: lracuna """ from vision.camera import * from vision.plane import Plane import vision.error_functions as ef import gdescent.hpoints_gradient5 as gd5 from ippe import homo2d ## CREATE A SIMULATED CAMERA cam = Camera() cam.set_K(fx = 800,fy = 800,cx = 640,cy = 480) cam.s...
{ "content_hash": "4c73d654e5efaa9308132e8176826a0c", "timestamp": "", "source": "github", "line_count": 171, "max_line_length": 110, "avg_line_length": 29.403508771929825, "alnum_prop": 0.6883452665075577, "repo_name": "raultron/ivs_sim", "id": "59c82ffc235d65384b2448cbd1328439d2362060", "size": "5...
print "server initializing..." import SimpleHTTPServer import SocketServer print "packages imported..." PORT = 8000 Handler = SimpleHTTPServer.SimpleHTTPRequestHandler httpd = SocketServer.TCPServer(("", PORT), Handler) print "serving at port", PORT httpd.serve_forever()
{ "content_hash": "84144e8f6ccda7abe877b9e414a9b5d8", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 51, "avg_line_length": 19.714285714285715, "alnum_prop": 0.7789855072463768, "repo_name": "tomshen/draft-table", "id": "4a8e1e23248447ae2e6147ae23cfdc5a69718037", "size": "...
""" Basic SparseCFProjection with associated sparse CFs and output, response, and learning function. If sparse component cannot be imported, SparseCFProjection will fall back to a basic dense CFProjection. CFSOF and CFSLF Plugin function allow any single CF output function to be applied to the sparse CFs, but may suff...
{ "content_hash": "796e3cb7d9052b5c2590c68492b00cca", "timestamp": "", "source": "github", "line_count": 886, "max_line_length": 170, "avg_line_length": 38.85665914221219, "alnum_prop": 0.6299706625613617, "repo_name": "mjabri/topographica", "id": "a1af9cea6b392c34c7982eca727e09c044abd54c", "size": ...
print("Hello World!") print("Hello Again") print("I like typing this") print("This is fun") print("Yay! Printing") print("I'd much rather you not") print('I "said" do not touch this.')
{ "content_hash": "6a80e1ec246348bd120ebb22f6af19ee", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 36, "avg_line_length": 26.571428571428573, "alnum_prop": 0.6827956989247311, "repo_name": "petervdb/eLearning", "id": "acc44b3ce7e8dad79c46f659dc79b51faa3421ce", "size": "24...
""" **Timeprocessing Profils temporels (journalier, hebdomadaire, annuel) Exemple d'utilisation profil_hebdo(df, func='mean') profil_journalier(df, func='max') profil_annuel(df, func=numpy.std) """ import numpy as np import calendar as cal def _get_funky(func): """Renvoie une fonction numpy correspondant au n...
{ "content_hash": "490ce8b03b886ee087eee41601880a08", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 176, "avg_line_length": 31.66949152542373, "alnum_prop": 0.6711265721166711, "repo_name": "airpaca/pyair", "id": "d7f1ddc326fb6db7a3f737fc05b398274c5c0cb9", "size": "3801"...
""" Classes and interfaces for producing tree structures that represent the internal organziation of a text. This task is known as X{parsing} the text, and the resulting tree structures are called the text's X{parses}. Typically, the text is a single sentence, and the tree structure represents the syntactic structure...
{ "content_hash": "f23b3c001091ef08ebbb6863a66afb47", "timestamp": "", "source": "github", "line_count": 1330, "max_line_length": 87, "avg_line_length": 39.36766917293233, "alnum_prop": 0.5941480929735098, "repo_name": "ronaldahmed/SLAM-for-ugv", "id": "4bfbdb2dfa3a4fca2589df3c1787c191f09044eb", "si...
from twisted.internet import protocol from twisted.protocols.basic import LineReceiver from twisted.python import log from signing.processor import NoSuchCommand, WrongNumberOfArguments class InvalidSignature(Exception): pass class SignedProtocol(LineReceiver): """ Simple line receiver that receives a pu...
{ "content_hash": "a1fdc185b775feb9e7146aa8842365f6", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 88, "avg_line_length": 33.47142857142857, "alnum_prop": 0.6598378147673922, "repo_name": "nkrowlan/signing-server", "id": "460c93eac207c40e3076848daac8464c22132ce3", "size"...
from datetime import datetime from .virtualtimescheduler import VirtualTimeScheduler class HistoricalScheduler(VirtualTimeScheduler): """Provides a virtual time scheduler that uses datetime for absolute time and timedelta for relative time.""" def __init__(self, initial_clock=None, comparer=None): ...
{ "content_hash": "86878cb82581f7fa28dfcf68b14cd0d8", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 80, "avg_line_length": 32.67796610169491, "alnum_prop": 0.6633817427385892, "repo_name": "dbrattli/RxPY", "id": "861cb9b1fdacfbdfa3d1405e5beab63f43755ecb", "size": "1928", ...
""" This package contains functions for reading and writing HDF5 tables that are not meant to be used directly, but instead are available as readers/writers in `astropy.table`. See :ref:`table_io` for more details. """ import os import warnings import numpy as np # NOTE: Do not import anything from astropy.table her...
{ "content_hash": "9d5bf9759b9cb7bccc266acdeb452b07", "timestamp": "", "source": "github", "line_count": 385, "max_line_length": 99, "avg_line_length": 37.99220779220779, "alnum_prop": 0.6021740616667806, "repo_name": "stargaser/astropy", "id": "0312fdbd236e522631a1e689205cee9391e6d6d6", "size": "14...
import curses class helper: def __init__(self, screen): self.screen = screen def get_character(self): return self.screen.getch() def write_string( self, x, y, string ): self.screen.addstr(y,x,string) def clear( self ): self.screen.clear() def refresh( self ): ...
{ "content_hash": "6f97466b072c4ef19242503dd81c9b1f", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 47, "avg_line_length": 19.743589743589745, "alnum_prop": 0.5584415584415584, "repo_name": "Verdex/TNH-Level-Editor", "id": "89ceafa05c5c28663b3f303c9ff12cf9bdf2f8b0", "size...
from openerp import models, fields, api, _ from openerp.tools.safe_eval import safe_eval as eval from openerp.exceptions import UserError class AccountInvoiceRefund(models.TransientModel): """Refunds invoice""" _name = "account.invoice.refund" _description = "Invoice Refund" @api.model def _get_...
{ "content_hash": "dda6daad491e0ae1a4c85623a4f00320", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 205, "avg_line_length": 52.023622047244096, "alnum_prop": 0.5199031330407144, "repo_name": "vileopratama/vitech", "id": "33cba1f0984b0be3d2c61380d376b23c2684fe96", "size":...
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Snapshot.identifier' db.add_column(u'backup_snapshot', 'identifier', ...
{ "content_hash": "589ef8f84056979b45f428ab4921ef85", "timestamp": "", "source": "github", "line_count": 241, "max_line_length": 227, "avg_line_length": 92.58921161825727, "alnum_prop": 0.5614860625616205, "repo_name": "globocom/database-as-a-service", "id": "7a195b542ec250118e5c7fab8e5fc78bcc73da75",...
import datetime import json import logging import logging.config import boto3 import watchtower import etl.monitor from etl.config import get_config_value from etl.logs.formatter import JsonFormatter logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) def add_cloudwatch_logging(prefix: st...
{ "content_hash": "a7ca11fe9d35f21ad183ec348be96768", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 99, "avg_line_length": 38.27777777777778, "alnum_prop": 0.6748911465892597, "repo_name": "harrystech/arthur-redshift-etl", "id": "647cd96f077dfd9bda402d30d3564ebfc762c9c0", ...
from openre.agent.decorators import action import logging @action(namespace='server') def ping(event): return 'pong' @action(namespace='server') def exception(event): raise Exception('Test exception') @action(namespace='server') def check_args(event, *args, **kwargs): return {'args': args, 'kwargs': kwar...
{ "content_hash": "5e05bbeb2b8d1e0446a295176fa8d1a0", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 50, "avg_line_length": 23.653846153846153, "alnum_prop": 0.7040650406504065, "repo_name": "openre/openre", "id": "8e142c763fdb8d924ffaccc126ec69589aa927d1", "size": "640", ...
import os import urllib from google.appengine.api import users from google.appengine.ext import ndb import jinja2 import webapp2 import models # JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), extensions=['jinja2.ext.autoescape'], autoescape=True) # Una costan...
{ "content_hash": "34c3f7f1c8494b811c92ac4683f09195", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 86, "avg_line_length": 34.065934065934066, "alnum_prop": 0.7303225806451613, "repo_name": "luillyfe/GAE", "id": "6255b04d5e87fbf665e88e5ebc6071a9d2ef76b5", "size": "3130", ...
""" set up for wire scan for HF mode """ import bluesky.plans as bp from bluesky.callbacks import LiveRaster import matplotlib import matplotlib.pyplot as plt import matplotlib.colors as mcolors import time import epics import os import numpy #matplotlib.pyplot.ticklabel_format(style='plain') def get_stock_md(): ...
{ "content_hash": "e3c8356b70061db5f33aafcc4e1de557", "timestamp": "", "source": "github", "line_count": 354, "max_line_length": 164, "avg_line_length": 42.443502824858754, "alnum_prop": 0.5510815307820299, "repo_name": "NSLS-II-SRX/ipython_ophyd", "id": "db0e669c924d065985943a05e75838da3cfcaa2e", "...
from django.apps import AppConfig class VisitorConfig(AppConfig): name = 'visitor'
{ "content_hash": "147dc1dbdc1d9aea7419b29d65e66507", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 33, "avg_line_length": 17.8, "alnum_prop": 0.7528089887640449, "repo_name": "narupo/visitor", "id": "c3c678d1b25b86adb3369bcfa0bc3af532dfcf91", "size": "89", "binary": fal...
import pandas as pd import numpy as np import matplotlib from matplotlib.dates import num2date, date2num from matplotlib import pyplot import scipy.stats from dcs.analyze import textAnalysis import traceback import base64 import dateutil.parser from StringIO import StringIO # USE for production # from io import StringI...
{ "content_hash": "ac0a6f246081920cacde4a2e2e1b1421", "timestamp": "", "source": "github", "line_count": 384, "max_line_length": 185, "avg_line_length": 41.348958333333336, "alnum_prop": 0.6964353193097368, "repo_name": "SeldonIO/seldon-ucl", "id": "c50a7bbd473c826f061e5be7d7144d76a6da4747", "size":...
''' Contains PidSchedstat() class Typical contents of file /proc/<pid>/schedstat:: 765507966 715563 2922 ''' from ast import literal_eval from logging import getLogger from os import path as ospath from .readfile import ReadFile LOGGER = getLogger(__name__) class PidSchedStat(ReadFile): ''' PidSched...
{ "content_hash": "7b1b996dfd17afd0a534e8b805abe850", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 74, "avg_line_length": 20.783783783783782, "alnum_prop": 0.6085825747724317, "repo_name": "eccles/lnxproc", "id": "7a8ed9b53f9de1769f843576c2647ce6b09743ce", "size": "769",...
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8' # The master toctree document. master...
{ "content_hash": "43fe8d8cc4cfaafcc523b0b94f7dbfbf", "timestamp": "", "source": "github", "line_count": 165, "max_line_length": 79, "avg_line_length": 31.24848484848485, "alnum_prop": 0.7119860356865787, "repo_name": "a25kk/aha", "id": "2beb388cb0febe222a96e463cf6076f313d342a5", "size": "5991", "...
import random from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.mail import send_mail from django.shortcuts import redirect from django.shortcuts import get_object_or_404 from django.shortcuts import render from djang...
{ "content_hash": "08a9a1fbd7286690aa039a3c84957317", "timestamp": "", "source": "github", "line_count": 420, "max_line_length": 139, "avg_line_length": 36.48095238095238, "alnum_prop": 0.5893486490014358, "repo_name": "haystack/eyebrowse-server", "id": "a527d545d6d0b32b7c98eb7f213894a8116e0974", "s...
"""REST API permissions""" from rest_framework.permissions import BasePermission from .models import Member class GuildPermissions(BasePermission): def has_permission(self, request, view): return (request.user.is_superuser or (request.user.is_staff and view.action == 'list') or ...
{ "content_hash": "14308f773dbb11331ea2effbae6164e5", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 83, "avg_line_length": 39.013698630136986, "alnum_prop": 0.636938202247191, "repo_name": "Dwarf-Community/Dwarf", "id": "546c78587729c20876c2fd7db2ff0a23f1b1e8a8", "size": ...
""" Node-related objects and collections """ import itertools import operator import traceback from datetime import datetime from netaddr import IPAddress from netaddr import IPNetwork from sqlalchemy.orm import joinedload from sqlalchemy.orm import subqueryload_all from nailgun import consts from nailgun.objects.s...
{ "content_hash": "5991911f528d5a07ce30aab06dc37524", "timestamp": "", "source": "github", "line_count": 854, "max_line_length": 79, "avg_line_length": 35.058548009367684, "alnum_prop": 0.5729458917835671, "repo_name": "nebril/fuel-web", "id": "fe13a0cd1fb743f6e2d37fe3f81b5a121e6435a1", "size": "305...
try: from setuptools import setup except ImportError: from distutils.core import setup import re from codecs import open version = "" with open("koordinates/__init__.py", "r") as fd: version = re.search( r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE ).group(1) with open("...
{ "content_hash": "9692ac9f08076425124b2f52db8b8e44", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 79, "avg_line_length": 29.310344827586206, "alnum_prop": 0.5841176470588235, "repo_name": "koordinates/python-client", "id": "167b9d54f191aacac3b039e57d98b6492388b782", "si...
from imaplib import IMAP4 import time import re import json import daemon # change these variable values DEBUG = False HOSTNAME = 'mail.server.dom' USERNAME = 'account@server.dom' PASSWORD = 'passsword' MAILBOX = 'Inbox' DATAFILE='/tmp/led.db' NEWMAIL_OFFSET = 1 # my unread messages never goes to zero, yours might M...
{ "content_hash": "9cb7c218083d89e282a22e6f5ea7da76", "timestamp": "", "source": "github", "line_count": 64, "max_line_length": 73, "avg_line_length": 23.375, "alnum_prop": 0.6524064171122995, "repo_name": "guspri/walang", "id": "34eaa14c896da2c6d26146b70fa832eddeb5fa5a", "size": "1519", "binary":...
from flask import current_app def make_json(jsonstring, status_code=200, headers={}): """like jsonify, except accepts string, so we can do our own custom json serialization. should move this to continuumweb later """ return current_app.response_class(response=jsonstring, ...
{ "content_hash": "efbd2fdd2accf64f490203f318876081", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 71, "avg_line_length": 42.81818181818182, "alnum_prop": 0.5668789808917197, "repo_name": "sahat/bokeh", "id": "719439b53ae60670eb625091c71120be95c6f0ce", "size": "471", "...
from __future__ import unicode_literals import os import ujson from django.conf import settings from django.db import migrations, models from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def populate_new_fields(apps, schema_editor): # ...
{ "content_hash": "3e9693d75db1e3377676cf3ed2af0e7a", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 197, "avg_line_length": 41.05882352941177, "alnum_prop": 0.6446991404011462, "repo_name": "vaidap/zulip", "id": "ec8774170824300975461437b54cf7312777a402", "size": "2167", ...
""" Class for reading the configuration file Uses the ConfigParser lib to return the values present in the config file """ __authors__ = "Claudio Marques, David Palma, Luis Cordeiro" __copyright__ = "Copyright (c) 2014 OneSource Consultoria Informatica, Lda" __license__ = "Apache 2" __contact__ = "www.onesource.pt" _...
{ "content_hash": "95a235363bc4618430cfb1ac46f0e28c", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 75, "avg_line_length": 22.263157894736842, "alnum_prop": 0.6158392434988179, "repo_name": "hocchudong/ZabbixCeilometer-Proxy", "id": "acd5192bcdd89df3db1a139ba81535744d65ef74...
""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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...
{ "content_hash": "1814465ebf75f3b71133f816ee4b8373", "timestamp": "", "source": "github", "line_count": 222, "max_line_length": 113, "avg_line_length": 37.711711711711715, "alnum_prop": 0.7411610129001434, "repo_name": "Telefonica/toolium", "id": "4383d7283969cafad7d048e0759cce1aafba6efd", "size": ...
import unittest import datetime from voodoo.gen import CoordAddress from weblab.core.new_server import simplify_response class SimplifyResponseTestCase(unittest.TestCase): def test_simplify_response_str(self): self._check("hello","hello") def test_simplify_response_unicode(self): ...
{ "content_hash": "8b01c058ac8dd4f7ed82961c7ff9859c", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 83, "avg_line_length": 28.927272727272726, "alnum_prop": 0.5040854808296669, "repo_name": "zstars/weblabdeusto", "id": "f5699a3d2f71e01f4c609483a9b48aae4da01e68", "size": ...
from django.utils.datastructures import SortedDict from django.utils.translation import ugettext_lazy as _ SORT_OPTIONS = SortedDict(( ('priority', _('Priority')), ('date', _('Last Seen')), ('new', _('First Seen')), ('freq', _('Frequency')), ('tottime', _('Total Time Spent')), ('avgtime', _('Av...
{ "content_hash": "09dc8031f355763e0c7809a18a858191", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 99, "avg_line_length": 38.44444444444444, "alnum_prop": 0.6495664739884393, "repo_name": "alex/sentry", "id": "a4ccc382674a16a1076fea9461cf7e3cbf09a5a0", "size": "1384", ...
from __future__ import print_function from distutils.version import LooseVersion import warnings import numpy as np import pandas as pd def _flatten_multi_geoms(geoms, colors=None): """ Returns Series like geoms and colors, except that any Multi geometries are split into their components and colors are re...
{ "content_hash": "a43093b148bfc22fe126c556beb59489", "timestamp": "", "source": "github", "line_count": 550, "max_line_length": 79, "avg_line_length": 36.06, "alnum_prop": 0.6131699692431806, "repo_name": "ozak/geopandas", "id": "02763e67f5bc58e219feb5e72b6730c9ff0bfa97", "size": "19833", "binary...
""" csv.py - read/write/investigate CSV files """ import re from functools import reduce from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONN...
{ "content_hash": "9ea3b181179f39614607c4d0a3f233c5", "timestamp": "", "source": "github", "line_count": 450, "max_line_length": 131, "avg_line_length": 36.315555555555555, "alnum_prop": 0.5206217109288949, "repo_name": "xxd3vin/spp-sdk", "id": "1df506230fd029aaa8f6415bfb2ab2fb84119de7", "size": "16...
import argparse import json import os import netaddr PART = 'RPC' PREFIX_NAME = 'RPC' SNAT_POOL = ( '### CREATE SNATPOOL ###\n' 'create ltm snatpool /' + PART + '/' + PREFIX_NAME + '_SNATPOOL { members replace-all-with {' ' %(snat_pool_addresses)s } }' ) #Persistance Profile: PERSISTANCE = [ r'create...
{ "content_hash": "f0466a73191264d6fd590204ac51bf42", "timestamp": "", "source": "github", "line_count": 805, "max_line_length": 222, "avg_line_length": 37.017391304347825, "alnum_prop": 0.526259270445317, "repo_name": "busterswt/rpc-openstack", "id": "5436ac18d4ed7651f709d7ae94a03c159f79966c", "siz...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Integration'] , ['Lag1Trend'] , ['Seasonal_WeekOfYear'] , ['NoAR'] );
{ "content_hash": "c44657f9fb22a6c7a74e2038c3b5e38a", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 92, "avg_line_length": 41.25, "alnum_prop": 0.7212121212121212, "repo_name": "antoinecarme/pyaf", "id": "9219a2df0197e4b8f4a0c24b0c6da774ea8f7f06", "size": "165", "binary"...
import os # Set the number of the group to scrape here group_number = 1 # Set your Chrome local storage directory here if in a non-standard # location chrome_local_storage_db = os.environ['HOME'] + '/.config/google-chrome/Default/Local Storage/https_www.facebook.com_0.localstorage'
{ "content_hash": "9da805fbf741221c06373f1fa9ecdcca", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 131, "avg_line_length": 35.625, "alnum_prop": 0.7649122807017544, "repo_name": "amdunn/intern_map", "id": "819c68e66cb9cd10fb517cf3df813d4c36c3934a", "size": "285", "binar...
from xml.dom.minidom import parse import xml.dom.minidom import os import json import codecs ## This scirpt parses every .tei.xml file ## TEI annotations data file outputfile_path = "/home/jaydeep/599hw2/tei_json" list_of_authors = "/home/jaydeep/599hw2/list_of_authors" tei_file_dir = "/media/jaydeep/mySpace/sprin...
{ "content_hash": "7b6d2d8c1493d11420b4939c5136cdbf", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 100, "avg_line_length": 31.681159420289855, "alnum_prop": 0.6788655077767612, "repo_name": "jdramani/599-2", "id": "8e57c30a0c965995c21f6a8380214b2cba6bf356", "size": "2186...
from typing import List from datetime import datetime from github.Issue import Issue from common import Common _PYTHON_OWNER = {'msyyc', 'Wzb123456789'} _PYTHON_REPO = 'Azure/azure-sdk-for-python' _FILE_OUT_NAME_PYTHON = 'sdk_issue_python.md' class Python(Common): def collect_open_issues(self) -> List[Issue]: ...
{ "content_hash": "06db22a295966e3457e4e1f38f140085", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 116, "avg_line_length": 36.6875, "alnum_prop": 0.6669505962521295, "repo_name": "Azure/azure-sdk-for-python", "id": "779d5859cd66bb7a6666d2abf92f8ff27d62863b", "size": "117...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pants.backend.jvm.tasks.jvm_tool_task_mixin import JvmToolTaskMixin from pants.base.exceptions import TaskError from pants.init.subprocess import Subpr...
{ "content_hash": "f813bf571a26acc25a927cf95dd6ff53", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 98, "avg_line_length": 40.76271186440678, "alnum_prop": 0.620997920997921, "repo_name": "15Dkatz/pants", "id": "8160b8489fc6b16df1607ba9e5cf87fb43d51036", "size": "4957", ...
"""Sweep module.""" def get_experiment(exp_name, c, h): """Returns the parameter exploration for `exp_name`.""" del exp_name, c return h.product( [ h.sweep("GANManager.seed", [0]), ], name="_gin")
{ "content_hash": "1f69896cb8be0dcfff4cf9cc0394b156", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 57, "avg_line_length": 21.181818181818183, "alnum_prop": 0.5536480686695279, "repo_name": "google-research/se3ds", "id": "7bde4072fb7ad56036ebca6033d161daa5600b8a", "size":...
import signal import socket import sys import time from zktraffic import __version__ from zktraffic.endpoints.stats_server import StatsServer from zktraffic.base.process import ProcessOptions from twitter.common import app, log from twitter.common.http import HttpServer from twitter.common.http.diagnostics import Dia...
{ "content_hash": "7b3556265dd061848d18e801bcd6df20", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 83, "avg_line_length": 30.134453781512605, "alnum_prop": 0.534021193530396, "repo_name": "fengshao0907/zktraffic", "id": "46e10255813ee96e1740d7603af5745f5dab6c8b", "size"...
from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union, cast from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline im...
{ "content_hash": "8b04db5402c0ee1b88538f2812ba7598", "timestamp": "", "source": "github", "line_count": 2564, "max_line_length": 209, "avg_line_length": 43.26443057722309, "alnum_prop": 0.6213107365004958, "repo_name": "Azure/azure-sdk-for-python", "id": "10e01824c7a3d466f64b2bf9c0793a1d2b0b21fb", ...
from django.db import transaction from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.forms.models import modelform_factory from functools import lru_cache from restless.dj import DjangoResource from .forms import DjangoFormMixin from .permissions import ModelAuthorizationMixin from ...
{ "content_hash": "addde163a8c8f9b918b09266419a88e7", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 108, "avg_line_length": 31.858490566037737, "alnum_prop": 0.6431744151613858, "repo_name": "zbyte64/python-restmore", "id": "1be479ccac3619d8e20b9fc55a3e2de12fb13b5f", "si...
import re import sys templFilename = "pyCombBLAS.i.templ" outFilename = "pyCombBLAS.i" def writeFile(filename, outfile): print("Including from file " + filename) input = open(filename, 'r') shouldPrint = False; line = input.readline() while (len(line) > 0): m = re.match(".*INTERFACE_INCLUDE_([A-Z]*).*", lin...
{ "content_hash": "593c8481d304d1096eaf315097b81d1d", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 267, "avg_line_length": 24.6, "alnum_prop": 0.6585365853658537, "repo_name": "harperj/KDTSpecializer", "id": "8e2dd0269f32851782a362c7247f718336189dcd", "size": "1248", "...
import copy import time from unittest import mock import uuid import ddt from lxml import etree from oslo_utils import units import paramiko import six from cinder import exception from cinder import ssh_utils from cinder.tests.unit import test from cinder.tests.unit.volume.drivers.netapp.dataontap.client import ( ...
{ "content_hash": "4f1f38afc58e6f0eb97721b4bd0942ac", "timestamp": "", "source": "github", "line_count": 4523, "max_line_length": 80, "avg_line_length": 39.30665487508291, "alnum_prop": 0.5576373576924808, "repo_name": "mahak/cinder", "id": "e5ed24de6fbfafd663d22f08b19737d0077ff3e1", "size": "178585...
from faint import * #start # A custom function that changes tool settings def example_function(): tool_line() set_linewidth(10.0) set_fg(0,0,255) # Connecting the function to a key bind(example_function) ##[press key]
{ "content_hash": "9c12202c7f9d5fcad22701b0c81902df", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 46, "avg_line_length": 22, "alnum_prop": 0.6735537190082644, "repo_name": "lukas-ke/faint-graphics-editor", "id": "c190fd99c399c9612f759664d62a505b6b2bc117", "size": "242",...
import pytest from pysparkling.context import H2OContext from tests.integration.external_only.external_backend_test_utils import * def testSSL(spark): conf = createH2OConf() conf.setInternalSecureConnectionsEnabled() context = H2OContext.getOrCreate(conf) path = context.downloadH2OLogs("build", "LOG...
{ "content_hash": "44f4313f0dfcf6009954d2118e01ad19", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 108, "avg_line_length": 29.574468085106382, "alnum_prop": 0.6827338129496403, "repo_name": "h2oai/sparkling-water", "id": "e154593ff5f5d1faddef58c12e1721b0b4633f14", "size"...
import sys import os import re import MySQLdb import cgi import urllib import cgitb; cgitb.enable(); sys.stderr = sys.stdout import json import operator def main(): fs = cgi.FieldStorage() enzymeName=fs['enzymeName'].value taxId=fs['taxId'].value query="http://www.uniprot.org/uniprot/?query="+str(enzy...
{ "content_hash": "fc2357907f4d1e962e21b5740294f399", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 172, "avg_line_length": 29.020833333333332, "alnum_prop": 0.6812634601579325, "repo_name": "acanada/tebacten", "id": "e3e0f32951e800885bd97f8075ba6e7c285d4a2a", "size": "14...
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'Consul', 'author': 'Ben Belchak', 'url': 'https://github.com/bbelchak/python-consul', 'author_email': 'ben@belchak.com', 'version': '0.1', 'install_requires': ['nose', 'requ...
{ "content_hash": "c8f2a277c2756378bdcc1f3dd9d1416a", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 59, "avg_line_length": 24.22222222222222, "alnum_prop": 0.6123853211009175, "repo_name": "bbelchak/python-consul", "id": "94a9cf131e30b5d1d40fdf54beb9ddd09f83f07e", "size":...
import pytest from supriya.tools import servertools @pytest.fixture(scope='function') def server(request): def server_teardown(): server.quit() server = servertools.Server().boot() request.addfinalizer(server_teardown) return server def test_BufferGroup_allocate_01(server): buffer_group...
{ "content_hash": "8528bb5d74158634aded406c5c39c42b", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 66, "avg_line_length": 34.371134020618555, "alnum_prop": 0.6781643671265747, "repo_name": "andrewyoung1991/supriya", "id": "c27319b1b4307c02e2178a081f607308a5a40703", "size...
from zeit.cms.i18n import MessageFactory as _ import StringIO import grokcore.component as grok import hashlib import lxml.objectify import persistent import urlparse import z3c.traverser.interfaces import zeit.cms.content.dav import zeit.cms.content.interfaces import zeit.cms.interfaces import zeit.cms.repository.repo...
{ "content_hash": "60174fcc27c6bb94b2e520ec6457b524", "timestamp": "", "source": "github", "line_count": 422, "max_line_length": 79, "avg_line_length": 34.57582938388626, "alnum_prop": 0.641971078061819, "repo_name": "cutoffthetop/zeit.content.image", "id": "aa0193dbfc165d93aa0baadb451947fe10ce174c", ...
from copy import copy, deepcopy from warnings import catch_warnings, simplefilter import pytest import numpy as np import pandas as pd from pandas.core.dtypes.common import is_scalar from pandas import (Series, DataFrame, Panel, date_range, MultiIndex) import pandas.io.formats.printing as printin...
{ "content_hash": "4b0c42a190b6733dd2be32972313d716", "timestamp": "", "source": "github", "line_count": 1030, "max_line_length": 79, "avg_line_length": 35.074757281553396, "alnum_prop": 0.5199158524095552, "repo_name": "harisbal/pandas", "id": "46bb6303d8908a04b61bbc887ca548602d346f5f", "size": "36...
""" Directives for table elements. """ __docformat__ = 'reStructuredText' import sys import os.path import csv from docutils import io, nodes, statemachine, utils from docutils.utils.error_reporting import SafeString from docutils.utils import SystemMessagePropagation from docutils.parsers.rst import Directive from...
{ "content_hash": "6368824dbc76ca9dd3b40a10fa29b0d4", "timestamp": "", "source": "github", "line_count": 496, "max_line_length": 87, "avg_line_length": 44.72782258064516, "alnum_prop": 0.5449177372098265, "repo_name": "LEXmono/q", "id": "5457c1622fa71e3408270f48b062e7cf53160156", "size": "22360", ...
STRICT_MODE = True
{ "content_hash": "4dd67357429abeef32fe0a05f3eb5cfc", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 18, "avg_line_length": 19, "alnum_prop": 0.7368421052631579, "repo_name": "Typecraft/typecraft_python", "id": "2ba1bd8f4015ff464d7afc3db6db5d8ad9c330cf", "size": "20", "bi...
import sys import os includeos_src = os.environ.get('INCLUDEOS_SRC', os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0]) sys.path.insert(0,includeos_src) from vmrunner import vmrunner vmrunner.vms[0].cmake().boot(40).clean()
{ "content_hash": "b58e42426ca3233fc8674f1809cf016a", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 120, "avg_line_length": 32.888888888888886, "alnum_prop": 0.6486486486486487, "repo_name": "ingve/IncludeOS", "id": "083ea025ae756d35dd00c859692fcff21b7d3b15", "size": "319"...
from .base import FunctionalTest class CreateValidTutorialTest(FunctionalTest): def test_creating_a_valid_tutorial(self): # Goes to the home page of the website self.browser.get(self.live_server_url) self.browser.find_element_by_id("go_to_home").click() self.assertIn("Tutorials", ...
{ "content_hash": "1278bf81bdddbe5fb579b5e4c98ac36d", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 79, "avg_line_length": 39.309859154929576, "alnum_prop": 0.6442135435327839, "repo_name": "d0ntreadthis/tutorials_site", "id": "20f16bf5621b0c0e25082efa481b5dae87ed54a4", "...
import numpy as np from sklearn.datasets import make_sparse_coded_signal from sklearn.linear_model import (orthogonal_mp, orthogonal_mp_gram, OrthogonalMatchingPursuit, OrthogonalMatchingPursuitCV, LinearRegression) fr...
{ "content_hash": "ebe52752729cf9f04eb3d96c33a87836", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 77, "avg_line_length": 38.01477832512315, "alnum_prop": 0.6265388104185564, "repo_name": "DailyActie/Surrogate-Model", "id": "d5e86d4d1928cb150f83993fcd96989fb6bca678", "s...
"""Test Konnected setup process.""" import pytest from homeassistant.components import konnected from homeassistant.components.konnected import config_flow from homeassistant.config import async_process_ha_core_config from homeassistant.const import HTTP_NOT_FOUND from homeassistant.setup import async_setup_component ...
{ "content_hash": "a9d2973a93024271fdcb780afe8c870a", "timestamp": "", "source": "github", "line_count": 865, "max_line_length": 91, "avg_line_length": 34.52832369942197, "alnum_prop": 0.46697023470720195, "repo_name": "mKeRix/home-assistant", "id": "74e3b931f61070c1f0af598509ba99f2f434e137", "size"...
from django.db import models from pygments.lexers import get_all_lexers from pygments.styles import get_all_styles LEXERS = [item for item in get_all_lexers() if item[1]] LANGUAGE_CHOICES = sorted([item[1][0], item[0]] for item in LEXERS) STYLE_CHOICES = sorted((item, item) for item in get_all_styles()) class Crawl(...
{ "content_hash": "05120689fc686812af14208f8b54a196", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 91, "avg_line_length": 39.94444444444444, "alnum_prop": 0.7016689847009736, "repo_name": "ethan-lau/mars", "id": "bd5c728bc2fff1a0cc34d49ad97b16d7ae344a51", "size": "1531",...
import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFo...
{ "content_hash": "f7bef22f2e0e6d3a7e3fa8bb36c85c6a", "timestamp": "", "source": "github", "line_count": 401, "max_line_length": 130, "avg_line_length": 44.35910224438903, "alnum_prop": 0.6435237238587812, "repo_name": "Azure/azure-sdk-for-python", "id": "1761db658ea4911b38cf690b5a3fc04242d42277", "...
import pathlib import re _docs_path = pathlib.Path(__file__).parent _version_path = _docs_path / '../aiomonitor/__init__.py' with _version_path.open() as fp: try: _version_info = re.search(r"^__version__ = '" r"(?P<major>\d+)" r"\.(?P<mi...
{ "content_hash": "eea72c905eb00207c686917426d00954", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 78, "avg_line_length": 31.59119496855346, "alnum_prop": 0.6386621540911805, "repo_name": "aio-libs/aiomonitor", "id": "c54c997456642bb2b348a44cc9fb8d77c8a94a90", "size": "...
"""starts a long-running process that whatches the file system and automatically execute tasks when file dependencies change""" import os import time import sys from multiprocessing import Process from .cmdparse import CmdParse from .filewatch import FileModifyWatcher from .cmd_base import tasks_and_deps_iter from .c...
{ "content_hash": "e2f2366281f5be654849dd9605df25ab", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 75, "avg_line_length": 33.06542056074766, "alnum_prop": 0.5955342001130582, "repo_name": "lelit/doit", "id": "b18eaad8f1d45306d1e4b90f9189857f6cd5202b", "size": "3538", ...
from datetime import timedelta, datetime # Base Event type class Event(object): """ Base class for all meeting events. Times and dates are in the meeting locale. """ def __init__(self,settings,startDateTime,endDateTime,summary,location,inIMAT,group): self.sessionDateTime = ...
{ "content_hash": "9fb2efeb2fbac0ab5b51b9a878860525", "timestamp": "", "source": "github", "line_count": 270, "max_line_length": 132, "avg_line_length": 34.8962962962963, "alnum_prop": 0.547866694969221, "repo_name": "adrian-stephens/schedule", "id": "7940335539e067bab6066f686a64ed8e547342ce", "size...
from sofi.ui import BasicBlock def test_basic(): assert(str(BasicBlock()) == "<pre></pre>") def test_text(): assert(str(BasicBlock("text")) == "<pre>text</pre>") def test_custom_class_ident_style_and_attrs(): assert(str(BasicBlock("text", cl='abclass', ident='123', style="font-size:0.9em;", attrs={"data-...
{ "content_hash": "192084752098c3d32a19f723f89b000f", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 115, "avg_line_length": 40.27272727272727, "alnum_prop": 0.6117381489841986, "repo_name": "jigarmistry/sofi", "id": "0f1955ace4c68e2113687f9acb2d770f833d4e83", "size": "443...
"""A Topology can be defined as an arrangement of fundamental nodes, in various levels. Each topology has a default level "all" which has each node represented as a group. For example: level groups "system" [[0, 1, 2, 3, 4]] Only one group that has all the nodes "cluster" [[0, 1], [2, 3, 4]...
{ "content_hash": "5dfb98798c22d403a53fca392026022a", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 60, "avg_line_length": 27.63917525773196, "alnum_prop": 0.5550167847817978, "repo_name": "derkling/trappy", "id": "5b046e6b7170f0d05c2836d196ee4ea5de2b4b35", "size": "3267"...
""" Cart-pole balancing with continuous / Kernelized iFDD """ from rlpy.Domains.FiniteTrackCartPole import FiniteCartPoleBalanceOriginal, FiniteCartPoleBalanceModern from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment imp...
{ "content_hash": "ded3c3af8ba9c339b9cb2f88ff2ab42e", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 103, "avg_line_length": 37.97014925373134, "alnum_prop": 0.622248427672956, "repo_name": "MDPvis/rlpy", "id": "31c8979f9f2aa6bbbbfeb7f039cf83a67063a2d8", "size": "2544", ...
__author__ = 'api.roman.public@gmail.com (Roman Nurik)' import logging import os from google.appengine.ext import webapp from google.appengine.api import users register = webapp.template.create_template_register() # Keys for each instance of this app. JSAPI_KEYS = { 'gongo-dev.appspot.com:80': 'ABQIAAAAsc0UQXoo2B...
{ "content_hash": "8906c2586018a742606d44c36f2a3e4e", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 119, "avg_line_length": 32.9, "alnum_prop": 0.7196048632218845, "repo_name": "mhfrantz/alertfeed", "id": "0ad535d207e0d9943eeba95244d9ba1054a2a9f0", "size": "1915", "bina...
# Copyright (c) 2013-2014, Clemson University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditio...
{ "content_hash": "f8800d00d3e20a422b2cbbb86ee4dfad", "timestamp": "", "source": "github", "line_count": 819, "max_line_length": 86, "avg_line_length": 35.66178266178266, "alnum_prop": 0.5213818605128907, "repo_name": "ScottDuckworth/python-anyvcs", "id": "86991dd66337698664cf3398d9e080f1280671d1", ...
from django.conf import settings WYSIHTML5_EDITOR = { # Give the editor a name, the name will also be set as class # name on the iframe and on the iframe's body 'name': 'null', # Whether the editor should look like the textarea (by adopting styles) 'style': 'true', # Id of the toolbar element,...
{ "content_hash": "098f4923b7f910d119b6165fcee5fb07", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 76, "avg_line_length": 37.457364341085274, "alnum_prop": 0.6218956953642384, "repo_name": "danirus/django-wysihtml5", "id": "3957f752a49e9fed33ab81dcc197e7f08498b9c3", "si...
from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_param_EtherDevice', [dirname(__file__)]) except ImportError: import _...
{ "content_hash": "439ab92d5d9fb3b5062ea9755378db9b", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 200, "avg_line_length": 35.53333333333333, "alnum_prop": 0.666309300455642, "repo_name": "silkyar/570_Big_Little", "id": "7940f2277ace3bbedafe77c16c351a7918859a65", "size"...
from nanpy.arduinotree import ArduinoTree from nanpy.i2c import I2C_Master from nanpy.serialmanager import SerialManager import logging log = logging.getLogger(__name__) def main(): connection = SerialManager(sleep_after_connect=2) connection.open() print (connection.device) a = ArduinoTree(connection...
{ "content_hash": "aedaaa2ad8a25b2dc47b3d7ba76f67ca", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 53, "avg_line_length": 25.27777777777778, "alnum_prop": 0.6967032967032967, "repo_name": "joppi/nanpy", "id": "3d2f2365fbd772b9a2bb4fc55be4ae4a3fd426ed", "size": "494", "...
from __future__ import absolute_import, division, print_function, unicode_literals import os import sys import time from contextlib import contextmanager from traceback import format_exc import logging import argparse import smokesignal from gpiozero import Button as Button from twisted.internet import reactor, task ...
{ "content_hash": "4780c93676065c58b71f2172dd02cd16", "timestamp": "", "source": "github", "line_count": 167, "max_line_length": 104, "avg_line_length": 33.09580838323353, "alnum_prop": 0.6059345033472047, "repo_name": "Spooner/pixel-table", "id": "cf4a4aa81a3abdca3cab3a31787f933327568606", "size": ...
import sys # For OS Platform Determination import os # For Implementation of System Clear Terminal Screen Command, # Command Line Argument Processing and Exit To OS Prompt Function # ================================ # ==> Constant Initializations <== # ================================ dashln = '-' * 78 h...
{ "content_hash": "33ac0d050629d773eb39ebdc1041edbc", "timestamp": "", "source": "github", "line_count": 160, "max_line_length": 100, "avg_line_length": 38.425, "alnum_prop": 0.5213077423552375, "repo_name": "ActiveState/code", "id": "5e9c18ea1739f03e35fab4b0b5c46a3f7296aa65", "size": "9834", "bin...
""" Helper functions for visualizing """ import ee def stretch_std(image, region, bands=None, std=1, scale=None): """ Get mins and maxs values for stretching a visualization using standard deviation """ if not bands: names = image.bandNames() bands = ee.List(ee.Algorithms.If( n...
{ "content_hash": "395c9eb4df497af17690fccb0ab5af68", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 81, "avg_line_length": 33.2, "alnum_prop": 0.6059532246633593, "repo_name": "gee-community/gee_tools", "id": "c0b8ea355d3d9dfe7220e8a01ddd79744b34501d", "size": "2837", "...
import simuvex from simuvex.s_type import SimTypeInt ###################################### # getchar ###################################### class getchar(simuvex.SimProcedure): def run(self): self.return_type = SimTypeInt(32, True) data = self.inline_call( simuvex.SimProcedures['lib...
{ "content_hash": "e6d85b1210ab3d3f3860321a5c980d90", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 80, "avg_line_length": 25.533333333333335, "alnum_prop": 0.5143603133159269, "repo_name": "chubbymaggie/simuvex", "id": "afa760d06cb2bb5571d314fc466ffe4cdf32d4b7", "size": ...
import os, re, string, sys, commands import logging import urllib,urllib2 import warnings import json import boto3 import MySQLdb import ConfigParser from binascii import hexlify, unhexlify from simplecrypt import encrypt, decrypt from boto3.s3.transfer import S3Transfer from botocore.client import Config from sys impo...
{ "content_hash": "17007d23d801f657527fe8a6c19f937d", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 96, "avg_line_length": 31.650602409638555, "alnum_prop": 0.6113437381043015, "repo_name": "nephantes/dolphin-tools", "id": "5453dd8b431635324ae12d331e3af1a0129021ab", "size...
import luigi import os import sys import itertools from ratatosk import backend from ratatosk.log import setup_logging from ratatosk.config import setup_config from ratatosk.handler import setup_global_handlers import ratatosk.lib.align.bwa import ratatosk.lib.tools.gatk import ratatosk.lib.tools.samtools import ratato...
{ "content_hash": "5d90fe30daebc1af1398ca732703f663", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 80, "avg_line_length": 33.74074074074074, "alnum_prop": 0.6531284302963776, "repo_name": "percyfal/ratatosk", "id": "a5f743b0ed3ae31bf5ff7b336229e1970bdb3736", "size": "182...
from setuptools import setup requirements = [ 'click>=3.2', 'icalendar', 'urwid', 'pyxdg', 'pytz', 'vdirsyncer', 'pkginfo', 'python-dateutil', 'configobj', 'tzlocal>=1.0', ] extra_requirements = { 'proctitle': ['setproctitle'], } setup( name='khal', description='A ...
{ "content_hash": "a595b726a1b6afbd07dc6846f9ad8146", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 68, "avg_line_length": 26, "alnum_prop": 0.5732946298984035, "repo_name": "sheeprine/khal", "id": "80ecba29fb39827325c46e7e486847008443a05b", "size": "1459", "binary": fa...
""" @brief test log(time=21s) """ import unittest from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import get_temp_folder, add_missing_development_version import ensae_teaching_cs class TestNotebook123CoverageClustering(unittest.TestCase): def setUp(self): add_missing_development_v...
{ "content_hash": "52478e59fbc26e1f9e1975257af303bf", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 120, "avg_line_length": 36.74418604651163, "alnum_prop": 0.6012658227848101, "repo_name": "sdpython/ensae_teaching_cs", "id": "ca4e83eba8acfdfd118fd88d2a0a6fe88c77578c", "s...
""" MoinMoin - CAS authentication Jasig CAS (see http://www.jasig.org/cas) authentication module. @copyright: 2009 MoinMoin:RichardLiao @license: GNU GPL, see COPYING for details. """ import time, re import urlparse import urllib, urllib2 from MoinMoin import log logging = log.getLogge...
{ "content_hash": "cae824c67ddfc64566bd6902c9ba715e", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 134, "avg_line_length": 35.166666666666664, "alnum_prop": 0.578436018957346, "repo_name": "Glottotopia/aagd", "id": "68a3e768e9f2417ee1a5fb227ca24b21397a6647", "size": "42...