text
stringlengths
4
1.02M
meta
dict
""" .. _example-movement-comp: ============================================== Maxwell filter data with movement compensation ============================================== Demonstrate movement compensation on simulated data. The simulated data contains bilateral activation of auditory cortices, repeated over 14 diffe...
{ "content_hash": "f89538b2113018c62f1084227b97f753", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 79, "avg_line_length": 41.98823529411764, "alnum_prop": 0.5844774446623704, "repo_name": "kambysese/mne-python", "id": "9a37f9e2ef358e5bb607b1bcff3821e14c37b1a9", "size": "...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.example, name='index'), url(r'^example$', views.example, name='example'), url(r'^wholepgmd$', views.whole_page_is_markdown, name='whole_page_is_markdown'), url(r'^pgwithmd$', views.page_including_markdown, name='page_...
{ "content_hash": "3373331d9d3180a65f58729b3c789ec1", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 86, "avg_line_length": 28.916666666666668, "alnum_prop": 0.6772334293948127, "repo_name": "oditorium/mdown", "id": "5eda601065469680494ccc37b22c9c0e931d8e04", "size": "347"...
import pytest import responses from flask import Flask from urlobject import URLObject from flask_dance.consumer import OAuth2ConsumerBlueprint from flask_dance.consumer.storage import MemoryStorage from flask_dance.contrib.strava import make_strava_blueprint, strava @pytest.fixture def make_app(): "A callable t...
{ "content_hash": "92e4486f4332f45e0b38d288e417f924", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 86, "avg_line_length": 32.174418604651166, "alnum_prop": 0.6559450668594146, "repo_name": "singingwolfboy/flask-dance", "id": "25cec90e0d20b5fc736854accd872fd7c44a7f68", "s...
"""Test harness for diff_match_patch.py Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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/license...
{ "content_hash": "91bf216f3234330e7303859a42c24eb1", "timestamp": "", "source": "github", "line_count": 870, "max_line_length": 408, "avg_line_length": 47.9367816091954, "alnum_prop": 0.645366263038005, "repo_name": "zapier/diff-match-patch-cython", "id": "b670c153567115429699617adbc3d2451d22f0a8", ...
import json from .stage01_isotopomer_spectrumAccuracy_query import stage01_isotopomer_spectrumAccuracy_query from SBaaS_base.sbaas_template_io import sbaas_template_io # Resources from io_utilities.base_importData import base_importData from io_utilities.base_exportData import base_exportData class stage01_isotopomer_...
{ "content_hash": "4be134e9cccfcc186f2a0c5b469caa04", "timestamp": "", "source": "github", "line_count": 143, "max_line_length": 193, "avg_line_length": 67.1118881118881, "alnum_prop": 0.5951859956236324, "repo_name": "dmccloskey/SBaaS_isotopomer", "id": "fa8c29e531f1c70ce625c1cfd088001f1dfe697f", "...
from collections import defaultdict import xml.etree.ElementTree as ET import six from leather.data_types import Text from leather.series import CategorySeries from leather.shapes.base import Shape from leather import theme from leather.utils import DummySeries, X, Y class Dots(Shape): """ Render a series o...
{ "content_hash": "df056448878e9066041329136f7ad77f", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 87, "avg_line_length": 30.15909090909091, "alnum_prop": 0.5715900527505652, "repo_name": "onyxfish/leather", "id": "0a5ebfab738c750b2bc9940cb989f294cb356cd8", "size": "2677...
from rpy2 import robjects as ro import numpy as np import os ro.r('library(survival)') import re ##This call will only work if you are running python from the command line. ##If you are not running from the command line manually type in your paths. BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.di...
{ "content_hash": "0f4d2ac37f0a810be5d29501988855b7", "timestamp": "", "source": "github", "line_count": 413, "max_line_length": 142, "avg_line_length": 33.70944309927361, "alnum_prop": 0.634822582962218, "repo_name": "OmnesRes/onco_lnc", "id": "87e8cbe0decd6b953b7b3459d31c65261f926c31", "size": "14...
import gtk # Linux DBus Service import dbus import dbus.service from dbus.mainloop.glib import DBusGMainLoop from time import strftime # use for clock simulation - shows time! from time import sleep # use for delay in loops - wait for n sec.! from threading import Thread # use to create a single thre...
{ "content_hash": "b5154532b6bba412b1e5f0cf04d23c87", "timestamp": "", "source": "github", "line_count": 174, "max_line_length": 106, "avg_line_length": 38.132183908045974, "alnum_prop": 0.6088922381311228, "repo_name": "DeathPoison/roomControll", "id": "d5acd6a6215e25a6539dddb305beaeab1285b89e", "s...
import click import fiona from shapely.geometry import shape import networkx as nx import matplotlib.pyplot as plt import surficial as srf @click.command() @click.argument('alignment', nargs=1, type=click.Path(exists=True)) @click.pass_context def network(ctx, alignment): """Plots the network graph \b E...
{ "content_hash": "93b24bb7d50919b6883b3ef669650314", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 67, "avg_line_length": 21.451612903225808, "alnum_prop": 0.6827067669172933, "repo_name": "mrahnis/surficial", "id": "373f860c38cc575e243ff10b55f6238a6357dde4", "size": "66...
import matplotlib.pyplot as pylab import numpy as np def load_data(): with open('julyTemps.txt', 'r') as f: raw_data = f.readlines()[6:] high = [] low = [] for line in raw_data: fixed_line = line.strip().split() high.append(int(fixed_line[1])) l...
{ "content_hash": "03a633cc9d26ee2a87d7176089398701", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 74, "avg_line_length": 23.79310344827586, "alnum_prop": 0.5942028985507246, "repo_name": "NicholasAsimov/courses", "id": "fb682b30b860574966cab4e138b3266e5e4765c7", "size":...
import os, subprocess, time, signal import gym from gym import error, spaces from gym import utils from gym.utils import seeding try: import hfo_py except ImportError as e: raise error.DependencyNotInstalled("{}. (HINT: you can install HFO dependencies with 'pip install gym[soccer].)'".format(e)) import loggi...
{ "content_hash": "aca6fc5e918272870736288fc609b5f7", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 128, "avg_line_length": 42.57232704402516, "alnum_prop": 0.5664056729206678, "repo_name": "machinaut/gym", "id": "9c58c245a115973919e19709c3672fb816b33e94", "size": "6769"...
import functools import itertools import time import eventlet import greenlet from oslo.config import cfg from ceilometer.openstack.common import excutils from ceilometer.openstack.common.gettextutils import _ # noqa from ceilometer.openstack.common import importutils from ceilometer.openstack.common import jsonutil...
{ "content_hash": "d1c285943b6b6e56adc6d3f10a92d92e", "timestamp": "", "source": "github", "line_count": 805, "max_line_length": 79, "avg_line_length": 36.03229813664596, "alnum_prop": 0.5628835413362753, "repo_name": "JioCloud/ceilometer", "id": "a0caabd3bd5efbcfff294872dad7116fa14cd245", "size": "...
import os import re from django.conf import settings from django.core import mail from django.test import TestCase from django.contrib.auth.models import User import pinax from emailconfirmation.models import EmailAddress, EmailConfirmation class PasswordResetTest(TestCase): # tests based on dj...
{ "content_hash": "ea5b213cb8623de882517c490ea7214d", "timestamp": "", "source": "github", "line_count": 193, "max_line_length": 88, "avg_line_length": 36.984455958549226, "alnum_prop": 0.5776127766881479, "repo_name": "caseywstark/colab", "id": "2cf10ebe293fb32d671a73cdcc8d8b198c82fdf8", "size": "7...
"""Helper library for visualizations. TODO(googleuser): Find a more reliable way to serve stuff from IPython notebooks (e.g. determining where the root notebook directory is). """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import gzip import os import ...
{ "content_hash": "cc4929ea719e4151be670bd15b93369c", "timestamp": "", "source": "github", "line_count": 217, "max_line_length": 80, "avg_line_length": 32.21658986175115, "alnum_prop": 0.683021027034759, "repo_name": "hang-qi/models", "id": "51be1b5725c336c69200b747b9c964a35c9b271d", "size": "6991",...
"""Inspectors allow you to visually browse through the members of various python objects. To open an inspector, import this module, and execute inspector.inspect(anObject) I start IDLE with this command line: idle.py -c "from inspector import inspect" so that I can just type: inspect(anObject) any time.""" __all__ =...
{ "content_hash": "d6fc17845d52ee2231631db13519c127", "timestamp": "", "source": "github", "line_count": 444, "max_line_length": 516, "avg_line_length": 34.39414414414414, "alnum_prop": 0.6165280597210399, "repo_name": "hj3938/panda3d", "id": "2ffa1a5249750ad484f30b594f3eb92ed189d34a", "size": "1527...
"""Certbot main entry point.""" # pylint: disable=too-many-lines from contextlib import contextmanager import functools import logging.handlers import sys from typing import cast from typing import Generator from typing import IO from typing import Iterable from typing import List from typing import Optional from typi...
{ "content_hash": "c2b9a5a6e8bce99f95c63a43077d7247", "timestamp": "", "source": "github", "line_count": 1744, "max_line_length": 100, "avg_line_length": 38.778669724770644, "alnum_prop": 0.6625609936418749, "repo_name": "letsencrypt/letsencrypt", "id": "098ce32431c7be827546030fffe08cd47c5c13e6", "s...
import sqlite3 import pandas as pd db_location = "../database.sqlite" conn = sqlite3.connect(db_location) df = pd.read_sql(sql="SELECT * FROM country", con=conn) print(df) conn.close()
{ "content_hash": "d28e707519b4e203980658504c2e224c", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 55, "avg_line_length": 12.8, "alnum_prop": 0.703125, "repo_name": "ShawnHouCHN/Introduction-to-Machine-Learning-and-Data-Mining-E17", "id": "078b9edbb9f2009678160d4a721787225...
from analysis import astcollector import collections import config from language.python import ast from translator import intrinsics from util.io.report import * import os.path from util.io.filesystem import ensureDirectoryExists remap = {'Shader':'material', 'SkyBox':'skybox', 'SSAO':'ssao', 'DirectionalBilate...
{ "content_hash": "2572325e64cabd74b351be2c7798106d", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 93, "avg_line_length": 23.946153846153845, "alnum_prop": 0.6925795053003534, "repo_name": "ncbray/pystream", "id": "80e59d9c519bd3ed74f9a5648243b9537f8b8c4d", "size": "369...
import sys from oslo_config import cfg from oslo_log import log from oslo_policy import opts as policy_opts from monasca_log_api import conf from monasca_log_api import version CONF = conf.CONF LOG = log.getLogger(__name__) _CONF_LOADED = False _GUNICORN_MARKER = 'gunicorn' def _is_running_under_gunicorn(): "...
{ "content_hash": "d5d5ee99dd25d9dd349d9a76c7206a75", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 80, "avg_line_length": 29.89855072463768, "alnum_prop": 0.6175472612699952, "repo_name": "stackforge/monasca-log-api", "id": "441a6baedb3ca3a9e961a1c1d66361b6d592cfee", "si...
from sqlalchemy import * from migrate import * from sqlalchemy.dialects.sqlite import \ BLOB, BOOLEAN, CHAR, DATE, DATETIME, DECIMAL, FLOAT, \ INTEGER, NUMERIC, SMALLINT, TEXT, TIME, TIMESTAMP, VARCHAR meta = MetaData() tasks = Table('tasks', meta, Column('project', INTEGER), ...
{ "content_hash": "b7931cbd743e0d59f846ba1d0197e85d", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 70, "avg_line_length": 26.75, "alnum_prop": 0.650200267022697, "repo_name": "macterra/galton", "id": "301c259a5f9b1f5dba546bf0301a9051b6015a06", "size": "749", "binary": ...
import L500analysis.utils.constants as constants from L500analysis.utils.utils import * import cosmolopy.perturbation as cp import cosmolopy.density as cdens import cosmolopy.distance as cdist def _get_cosmology(omega_M_0=constants.omega_m, omega_lambda_0=constants.omega_l, omega_b_0=constants.omega_...
{ "content_hash": "1100a5240502d5820f14b6ad8c2d27ef", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 143, "avg_line_length": 37.1875, "alnum_prop": 0.6661064425770308, "repo_name": "cavestruz/L500analysis", "id": "d9391671166b7851348f754c656cbd259f98b4ae", "size": "1785", ...
import glob import os from configparser import NoSectionError, MissingSectionHeaderError, NoOptionError, ParsingError from typing import Set from rlbot.parsing.bot_config_bundle import BotConfigBundle, ScriptConfigBundle, get_bot_config_bundle, get_script_config_bundle def scan_directory_for_bot_configs(root_dir) ->...
{ "content_hash": "8c14ad5497272ceadb1f8f2014766c33", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 129, "avg_line_length": 35, "alnum_prop": 0.6970099667774087, "repo_name": "drssoccer55/RLBot", "id": "8ad1a2e2d3a84201bd621f2395735583001debaa", "size": "1505", "binary"...
"""Find modules used by a script, using introspection.""" import dis import importlib._bootstrap import importlib.machinery import marshal import os import sys import types import struct import warnings with warnings.catch_warnings(): warnings.simplefilter('ignore', PendingDeprecationWarning) import imp # XXX...
{ "content_hash": "fb9f67ff8f70e3fa2d055e0578585f4f", "timestamp": "", "source": "github", "line_count": 641, "max_line_length": 88, "avg_line_length": 36.425897035881434, "alnum_prop": 0.5109854811769241, "repo_name": "ArcherCraftStore/ArcherVMPeridot", "id": "cc5b8cc691137b84e7abddb7187a45fb915261bf...
import copy import sys from oslo_config import cfg from oslo_log import log as logging from oslo_policy import opts as policy_opts from oslo_policy import policy from oslo_utils import excutils from cloudkitty.common import policies LOG = logging.getLogger(__name__) CONF = cfg.CONF # TODO(gmann): Remove setting the ...
{ "content_hash": "e62e0077cc10e5af278872d4b370fae6", "timestamp": "", "source": "github", "line_count": 150, "max_line_length": 112, "avg_line_length": 32.32666666666667, "alnum_prop": 0.6537430398020211, "repo_name": "openstack/cloudkitty", "id": "9d55e1f81a01a0b1770b77b35f3162d5972f6c68", "size":...
from django.db import migrations """ We have data inside the MineralType model that sits in unnecessary fields: 1) fracture1 and fracture2 2) cleavage1 and cleavage2 3) lustre1 and lustre2 We want to combine the values of these fields into a new field, that accepts several values as its input! """ def c...
{ "content_hash": "4a7547cccf3cd5297092d809652df532", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 83, "avg_line_length": 24.471698113207548, "alnum_prop": 0.6491904394757132, "repo_name": "GeoMatDigital/django-geomat", "id": "4136627caecca6e7712e1b001c78f377ac1cb4a7", "...
import numpy as np import Gridworld ######################## # Deterministic Policy # ######################## # hyperparameters GAMMA = 0.9 # discount rate NUM_EPISODES = 10 # number of episodes FIRST_VISIT = False # True: first-visit; False: every-visit def play_one_episode(gridworld, policy): # randomly select o...
{ "content_hash": "3f4c5e98631510a827f195d73fcf770d", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 65, "avg_line_length": 25.102409638554217, "alnum_prop": 0.5987520998320134, "repo_name": "GitYiheng/reinforcement_learning_test", "id": "40425033553c30e14216be51aa5ee83e9e3...
from django.urls import RegexURLPattern, RegexURLResolver, include from django.views import defaults __all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include', 'url'] handler400 = defaults.bad_request handler403 = defaults.permission_denied handler404 = defaults.page_not_found handler500 = defaults...
{ "content_hash": "25cdd6ad4be1a22e652e5db7e3c73725", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 102, "avg_line_length": 40.05, "alnum_prop": 0.7153558052434457, "repo_name": "elky/django", "id": "b7ad15612281e045e4bd80072a5ce38c35ac3193", "size": "801", "binary": fa...
import os # import numpy import pylab pylab.ion() from scipy.spatial.distance import pdist from scipy.cluster.hierarchy import linkage, dendrogram # import crosscat.utils.general_utils as gu import crosscat.utils.file_utils as fu def save_current_figure(filename, dir='./', close=True, format=None): if filename is...
{ "content_hash": "6b3a292dff9848f360e199b12a7a4d30", "timestamp": "", "source": "github", "line_count": 300, "max_line_length": 133, "avg_line_length": 40.14666666666667, "alnum_prop": 0.6152441049485221, "repo_name": "mit-probabilistic-computing-project/crosscat", "id": "c2fc6f5fd2bc84f9e743f43a60df...
from test_server import Response from tests.util import BaseGrabTestCase from tests.util import build_grab class ExtensionPyqueryTestCase(BaseGrabTestCase): def setUp(self): self.server.reset() def test_pyquery_handler(self): self.server.add_response( Response(data=b"<body><h1>He...
{ "content_hash": "07a828d505a2ff70b422ddac96b9d90c", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 80, "avg_line_length": 32.166666666666664, "alnum_prop": 0.6103626943005181, "repo_name": "lorien/grab", "id": "3f3976eeef1ce3d2ee5a1fe688014f9ce8510ba1", "size": "972", ...
from common_funcs import * from time import gmtime, strftime from os import system thetime = strftime("%a-%d-%b-%Y-%H_%M", gmtime()) resultsdir = "results/debug-explicit/"+thetime system("mkdir -p "+resultsdir) system("git log -1 --format=\"%%h;%%ad\" > %s/git-revision.txt" % (resultsdir)) #blow away old configs, et...
{ "content_hash": "ec4990b24de6efd58a2e4eb68ccdc025", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 119, "avg_line_length": 32.88095238095238, "alnum_prop": 0.6944243301955105, "repo_name": "pbailis/bolton-sigmod2013-code", "id": "e086940a9b6fdefa1e9214aebae1668c0d16ba54", ...
states = { 'Oregon': 'OR', 'Florida': 'FL', 'California': 'CA', 'New York': 'NY', 'Michigan': 'MI' } cities = { 'CA': 'San Francisco', 'MI': 'Detroit', 'FL': 'Jacksonville' } cities['NY'] = 'New York' cities['OR'] = 'Portland' print '-' * 10 print "NY State has: ", cities['NY'] print ...
{ "content_hash": "85a59febfd44b811a46db8cd8a6ca5db", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 58, "avg_line_length": 22.6, "alnum_prop": 0.5991150442477876, "repo_name": "chrisortman/CIS-121", "id": "19ed4aba45989d5be4d1c411fbdc38a42f643490", "size": "1130", "bina...
import logging # Skip bson in requirements , pymongo provides # noinspection PyPackageRequirements from bson.timestamp import Timestamp from copy_reg import pickle from multiprocessing import Pool, TimeoutError from types import MethodType from ResolverThread import ResolverThread from mongodb_consistent_backup.Commo...
{ "content_hash": "1a5ec99617bc1cec154bc87e4fb72625", "timestamp": "", "source": "github", "line_count": 170, "max_line_length": 139, "avg_line_length": 43.205882352941174, "alnum_prop": 0.5473110959836623, "repo_name": "Percona-Lab/mongodb_consistent_backup", "id": "3a69f94214c1167f5aca5f161d73684e51...
"""Generic Node base class for all workers that run on hosts.""" import errno import logging import os import random import signal import sys import time try: # Importing just the symbol here because the io module does not # exist in Python 2.6. from io import UnsupportedOperation # noqa except ImportErr...
{ "content_hash": "f2c5b64c6f3187ffc24316501bfc041f", "timestamp": "", "source": "github", "line_count": 486, "max_line_length": 79, "avg_line_length": 29.703703703703702, "alnum_prop": 0.5866583541147132, "repo_name": "yanheven/ceilometer", "id": "abdab60fbcfba71fcf3f5e46ff19feff8aac8974", "size": ...
from flask import Flask, send_file, url_for, render_template from datetime import datetime app = Flask(__name__) dogs = ['Doberman', 'Golden Retriever', 'Snoop', 'Beagle', 'Bull Terrier',\ 'Akita', 'Siberian Husky', 'Pit Bull', 'Pug', 'Black Lab'] @app.route('/') def index(): """ Returns """ ...
{ "content_hash": "561fd39b770443f85131d1e98e8f237d", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 75, "avg_line_length": 28.38095238095238, "alnum_prop": 0.5713087248322147, "repo_name": "DevOpsBootcamp/tinsy-flask-app", "id": "d52cfeb648a30475bd88258684ff101af895c9eb", ...
from __future__ import unicode_literals from django.db import models, migrations import django.core.validators from django.conf import settings import lepus.models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ] ...
{ "content_hash": "6edb09f040903f750d21f2d50a0f6922", "timestamp": "", "source": "github", "line_count": 247, "max_line_length": 432, "avg_line_length": 51.473684210526315, "alnum_prop": 0.5604845052697813, "repo_name": "lepus-ctf/lepus-api", "id": "3928c0c905670dfa5f77846bce1f138e37a324d6", "size":...
import json from api.test import BaseTestCase class TestUpdateItem(BaseTestCase): def test_update_bucket_list_item(self): bucket_list_one = { "description": "Movies i have to watch by the end of the week", "status": "Pending", "title": "Entertainment", "us...
{ "content_hash": "0bff329a4b8a308d23c676bb5e456893", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 75, "avg_line_length": 39.06818181818182, "alnum_prop": 0.44502617801047123, "repo_name": "EdwinKato/bucket-list", "id": "5dafde7cc044bee052837d9aa8595df939dae79c", "size":...
''' Covenant Add-on Copyright (C) 2017 homik 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. This ...
{ "content_hash": "ea489ebf388ebcd22d5f8c4ef0383978", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 146, "avg_line_length": 37.73076923076923, "alnum_prop": 0.52217125382263, "repo_name": "TheWardoctor/Wardoctors-repo", "id": "2e9350bb93f35b5545f6126de1757f48b9893248", "...
from collections import defaultdict import argparse parser = argparse.ArgumentParser(description=''' MITE This tool finds mutually recursive acronyms, or recursonyms. Uses the english dictionary in /usr/share/dict/words by default. ''') parser.add_argument('length', default=4, type=int, nargs='?', help='The number of...
{ "content_hash": "78ec904bf93824e844446753d56410a1", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 109, "avg_line_length": 32.22, "alnum_prop": 0.6927374301675978, "repo_name": "nathanfdunn/MITE", "id": "51d8077bdd59f32302c5fd5ed2ef608b66d79bf5", "size": "1611", "binar...
""" :author: Thomas Calmant :copyright: Copyright 2015, isandlaTech :license: Apache License 2.0 :version: 0.0.1 :status: Alpha .. Copyright 2015 isandlaTech 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...
{ "content_hash": "5ff53ee41d1b72cc2303caddd026dfbe", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 80, "avg_line_length": 30.78125, "alnum_prop": 0.6568527918781726, "repo_name": "gattazr/cohorte-herald", "id": "8c63d44fae91587e957f0fed110028ad99e42675", "size": "1035", ...
"""Create a static WebGL library and run it in the browser.""" from __future__ import absolute_import, print_function import os, shutil, SimpleHTTPServer, SocketServer import tvm from tvm.contrib import emscripten, util import numpy as np def try_static_webgl_library(): curr_path = os.path.dirname(os.path.abspat...
{ "content_hash": "24e03d5b6393b84d00cbbab4be2f8808", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 80, "avg_line_length": 34.795918367346935, "alnum_prop": 0.6304985337243402, "repo_name": "phisiart/tvm", "id": "262416c42506116e177754fce66fbe97dd91b6cd", "size": "1705", ...
import Adafruit_BBIO.PWM as PWM class Servo(object): '''Object representing a servo motor utilizing the Adafruit_BBIO library. This class defines an object to manipulate a servo motor on a BeagleBone Black (BBB). The class utilizes the PWM module of the Adafruit_BBIO library for pulse width manipulat...
{ "content_hash": "427dd32b03d120f03b542fd1e35d11c9", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 79, "avg_line_length": 37.84615384615385, "alnum_prop": 0.6205962059620597, "repo_name": "SpinStabilized/bbb-primer", "id": "3f59d2fdd2dd2bd955622b50af90e895daad6ef6", "siz...
"""URL endpoint to add new graph data to the datastore.""" from __future__ import print_function from __future__ import division from __future__ import absolute_import import json import logging import six from google.appengine.api import datastore_errors from google.appengine.ext import ndb from dashboard import ad...
{ "content_hash": "48bc4be3cba9a4defcfbb885e88ccbc1", "timestamp": "", "source": "github", "line_count": 420, "max_line_length": 81, "avg_line_length": 35.67142857142857, "alnum_prop": 0.6883593645708184, "repo_name": "catapult-project/catapult", "id": "6be578a5f11ababcb088e225ad9d4b11d6a60240", "si...
"""Presubmit tests for /tools/android/infobar_deprecation. Runs Python unit tests in /tools/android/infobar_deprecation on upload. """ USE_PYTHON3 = True def CheckChangeOnUpload(input_api, output_api): result = [] result.extend( input_api.canned_checks.RunUnitTests(input_api, ...
{ "content_hash": "828b30a643ab46445d5ffeab62e5e850", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 77, "avg_line_length": 31.625, "alnum_prop": 0.5513833992094862, "repo_name": "chromium/chromium", "id": "4b77833e12099ca3539e66694dce975c207c3d97", "size": "646", "binar...
"""A small wrapper around nosetests. Avoids disruptive messages when viewing error messages. """ import sys import nose if __name__ == "__main__": import logging logging.basicConfig(level=logging.DEBUG) # Suppress sigma-clipping debug log: logging.getLogger('tkp.sourcefinder.image.sigmaclip').setLevel(...
{ "content_hash": "ab2221c3d7cc7bf83581870ead4ad354", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 81, "avg_line_length": 27.6, "alnum_prop": 0.7270531400966184, "repo_name": "transientskp/tkp", "id": "a3425fe41710fce6ac508138745c26e8d8e9a290", "size": "436", "binary":...
""" In charge of OpenFlow 1.0 switches. NOTE: This module is loaded automatically on startup unless POX is run with --no-openflow . """ from pox.core import core import pox import pox.lib.util from pox.lib.addresses import EthAddr from pox.lib.revent.revent import EventMixin import datetime import time from pox....
{ "content_hash": "cd7d524c92bf86d61a2452445ec3c75f", "timestamp": "", "source": "github", "line_count": 953, "max_line_length": 76, "avg_line_length": 28.388247639034628, "alnum_prop": 0.6140681599763436, "repo_name": "kulawczukmarcin/mypox", "id": "88db0648dbf73199c391a03b71af1609eba35b5c", "size"...
""" WARNING! this module is incomplete and may have rough edges. Use only if necessary """ import py from struct import unpack from rpython.rlib.rstruct.formatiterator import FormatIterator from rpython.rlib.rstruct.error import StructError from rpython.rlib.objectmodel import specialize from rpython.rlib.buffer impor...
{ "content_hash": "d6d01826ef82a9401687fe19120e3608", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 79, "avg_line_length": 31.701612903225808, "alnum_prop": 0.5937420503688629, "repo_name": "oblique-labs/pyVM", "id": "0da9705bc245f2215dca079728388f4498076a39", "size": "3...
"""Config flow for UPNP.""" from __future__ import annotations import asyncio from collections.abc import Mapping from datetime import timedelta from typing import Any, cast import voluptuous as vol from homeassistant import config_entries from homeassistant.components import ssdp from homeassistant.components.ssdp ...
{ "content_hash": "67ad942ef8fdcda46016df94d18530ae", "timestamp": "", "source": "github", "line_count": 320, "max_line_length": 91, "avg_line_length": 34.81875, "alnum_prop": 0.6118291150601328, "repo_name": "GenericStudent/home-assistant", "id": "e339c69d5d8b8a06eff6de3094186fad7b0bdeee", "size": ...
"""Magnum common internal object model""" from oslo_versionedobjects import base as ovoo_base from oslo_versionedobjects import fields as ovoo_fields remotable_classmethod = ovoo_base.remotable_classmethod remotable = ovoo_base.remotable class MagnumObjectRegistry(ovoo_base.VersionedObjectRegistry): pass cla...
{ "content_hash": "789e0df2ab85555e8e490e57f7634e78", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 79, "avg_line_length": 34.070422535211264, "alnum_prop": 0.6725919801570897, "repo_name": "openstack/magnum", "id": "995c6d235c025ad7211aee005aab8cfa5c67de66", "size": "302...
""" Pygments IRC formatter tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import re import unittest from pygments.util import StringIO from pygments.lexers import ...
{ "content_hash": "c118b736234fa56cb89ea510a0ed23d7", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 85, "avg_line_length": 25.03448275862069, "alnum_prop": 0.6928374655647382, "repo_name": "sol/pygments", "id": "3b34f0bc829589208edd56a11d586a9925169a96", "size": "750", ...
from contextlib import contextmanager from functools import partial import os import os.path as op import numpy as np from traitlets import observe, HasTraits, Unicode, Bool, Float from ..io.constants import FIFF from ..defaults import DEFAULTS from ..io import read_info, read_fiducials, read_raw from ..io.pick impor...
{ "content_hash": "5661091fa70fc18273ec55002a6b55fc", "timestamp": "", "source": "github", "line_count": 1010, "max_line_length": 79, "avg_line_length": 38.43960396039604, "alnum_prop": 0.5515660416237379, "repo_name": "bloyl/mne-python", "id": "7f882b314a91fa403d705e64be7e8bc700922e98", "size": "38...
import numpy as np from PyQt5 import QtCore, QtGui class FitParametersModel(QtCore.QAbstractItemModel): """A model storing fit parameters. Columns: (X) name | (X) lower bound | (X) upper bound | value | uncertainty | uncertainty percent (X) : has a tick/checker. The checker before the first col...
{ "content_hash": "78b7399b12e3429acf0337f70b028574", "timestamp": "", "source": "github", "line_count": 258, "max_line_length": 129, "avg_line_length": 47.65503875968992, "alnum_prop": 0.5367222448149654, "repo_name": "awacha/saxsfittool", "id": "d9e25ccff6ad981d8df9610d38d49edea61db943", "size": "...
from .VecHelp import (IMAGE, LINE, CIRCLE, BEZIER, ELLIPSE_BEZIER, POLYGON, PATH, TEXT) from .VecHelp import Pen, Brush, Font from ginga.canvas import render class RenderContext(render.RenderContextBase): def __init__(self, renderer, viewer, surface): render.RenderContextBase.__ini...
{ "content_hash": "4f31de673804b0970f8e0e4ea0fbc902", "timestamp": "", "source": "github", "line_count": 177, "max_line_length": 83, "avg_line_length": 36.26553672316384, "alnum_prop": 0.5136314067611778, "repo_name": "pllim/ginga", "id": "e5051e3b7e34999d0268e85c4651716242bf392d", "size": "6606", ...
"""Views for REST APIs for reporting posts and comments""" from rest_framework import status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from open_discussions.permissions import IsStaffOrModeratorPermission from channels....
{ "content_hash": "9723c24f298c39ca9ae2d4e275c6cf14", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 84, "avg_line_length": 34.40909090909091, "alnum_prop": 0.6525759577278731, "repo_name": "mitodl/open-discussions", "id": "95b215abea605b7bc44603eb59896d44ed2d97e8", "size"...
class ParameterGroup(dict): def __init__(self, connection=None): dict.__init__(self) self.connection = connection self.name = None self.description = None self.engine = None self._current_param = None def __repr__(self): return 'ParameterGroup:%s' % self...
{ "content_hash": "abe7f3a0a3e5536d6d7a0982e27f96a1", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 86, "avg_line_length": 33.34444444444444, "alnum_prop": 0.5461512829056981, "repo_name": "donny/mako-mori", "id": "e52890cf737fb49a7d37f67f81bcf65d1ba8a2ea", "size": "7106...
UserFile='./UserList.txt'
{ "content_hash": "56f264fec30f9ff79766d7d947b5c2df", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 25, "avg_line_length": 26, "alnum_prop": 0.7307692307692307, "repo_name": "51reboot/actual_09_homework", "id": "87ccc078652492cc4354c412494d50bfc28daee6", "size": "26", "b...
import re from .._compat import to_unicode, to_native from .basic import Validator from .consist import isEmail from .helpers import translate, options_sorter # TODO port this class isStrong(object): """ enforces complexity requirements on a field """ lowerset = frozenset(u'abcdefghijklmnopqrstuvwxyz'...
{ "content_hash": "b6eefc332d12eeb29c0edb811c292643", "timestamp": "", "source": "github", "line_count": 443, "max_line_length": 79, "avg_line_length": 36.89164785553047, "alnum_prop": 0.522486691549899, "repo_name": "daxslab/web2py-model-class-declaration", "id": "3f0f39bac6f421313acb946528a94ac06ece...
import unittest import time from tools import tob import sys import os import signal import socket from subprocess import Popen, PIPE import tools from bottle import server_names try: from urllib.request import urlopen except: from urllib2 import urlopen serverscript = os.path.join(os.path.dirname(__file__), ...
{ "content_hash": "307d6dacd985a74499ff87557e7bc699", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 87, "avg_line_length": 32.97115384615385, "alnum_prop": 0.568387284922718, "repo_name": "Inndy/bottle", "id": "610006c04d12ec7460a399e58cd31e86b5b5ce65", "size": "3453", ...
import os import re import subprocess import sys from infra import git from infra import go _TOOLS_DIR = os.path.dirname(os.path.abspath(__file__)) _REPO_ROOT = os.path.realpath(os.path.join(_TOOLS_DIR, os.pardir)) _INFRA_BOTS = os.path.join(_REPO_ROOT, 'infra', 'bots') sys.path.insert(0, _INFRA_BOTS) import git_util...
{ "content_hash": "02e6400a8ae447d16308f08e5331ecc3", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 80, "avg_line_length": 35.38383838383838, "alnum_prop": 0.6208963745361119, "repo_name": "endlessm/chromium-browser", "id": "7ebf4bc42e73714ea4b66ae76bc375aaf6965a5b", "siz...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('django_todos', '0003_auto_20150708_1043'), ] operations = [ migrations.RemoveField( model_name='task', name='meteor_id', ...
{ "content_hash": "821717d2b2a62628f6b018faeb5e625c", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 52, "avg_line_length": 19.647058823529413, "alnum_prop": 0.5898203592814372, "repo_name": "cxhandley/django-ddp-meteor-todo", "id": "14be2f441bfc5d6a06e758910e06c2bc4e8ba9b3"...
import json import os import time from gym import error from gym.utils import atomic_write class StatsRecorder(object): def __init__(self, directory, file_prefix): self.initial_reset_timestamp = None self.directory = directory self.file_prefix = file_prefix self.episode_lengths = [...
{ "content_hash": "763d0b973c4f94a6b6ee2342bdcc647e", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 211, "avg_line_length": 32.013888888888886, "alnum_prop": 0.6073752711496746, "repo_name": "machinaut/gym", "id": "9aaabd126c60090a30edd335ac7d8ebd4851ba52", "size": "2305"...
import horizon from horizon.dashboards.nova import dashboard class InstancesAndVolumes(horizon.Panel): name = "Instances & Volumes" slug = 'instances_and_volumes' dashboard.Nova.register(InstancesAndVolumes)
{ "content_hash": "c4c35aa720e87d92cd69ed965ea6f96d", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 45, "avg_line_length": 22, "alnum_prop": 0.7818181818181819, "repo_name": "andrewsmedina/horizon", "id": "d826f78e95481b6a412adf8146ef51b349cb7cd1", "size": "870", "binar...
from datetime import datetime from opendc.models.authorization import Authorization from opendc.models.datacenter import Datacenter from opendc.models.path import Path from opendc.models.section import Section from opendc.models.simulation import Simulation from opendc.models.user import User from opendc.util import d...
{ "content_hash": "e9692bb429192d152985137412a149e8", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 87, "avg_line_length": 25.03448275862069, "alnum_prop": 0.6689623507805326, "repo_name": "atlarge-research/opendc-web-server", "id": "a86377284a46a6c24466fb8cffb7a90428c8aaac...
"""Console script for sheets.""" import click import os import threading default_data_path = os.path.normpath(os.path.join(os.path.abspath(__file__), "../../data")) @click.command() @click.argument("path", default=default_data_path) def main(path): """Console script for sheets.""" from . import http path...
{ "content_hash": "e1fb98cd315c2261531bab42817601a0", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 91, "avg_line_length": 26.75, "alnum_prop": 0.6635514018691588, "repo_name": "ianb/sheets", "id": "552846ebf6a381605f9699f96a52bbd9430ddbb3", "size": "988", "binary": fal...
import collections import copy import json import logging import re from test_result_util import ResultCollection, TestResult, TestStatus LOGGER = logging.getLogger(__name__) # These labels should match the ones output by gtest's JSON. TEST_UNKNOWN_LABEL = 'UNKNOWN' TEST_SUCCESS_LABEL = 'SUCCESS' TEST_FAILURE_LABEL...
{ "content_hash": "76b53191b8f187c03c42ef21f0061073", "timestamp": "", "source": "github", "line_count": 615, "max_line_length": 80, "avg_line_length": 36.31056910569106, "alnum_prop": 0.63427522278447, "repo_name": "ric2b/Vivaldi-browser", "id": "c96ac7ee8d9cf171530d25e1cb3219df6ea0ff1d", "size": "...
import re import sys import types ######## Global Variables # Stacks dictionary = [] # Stack containing any/all dictionaries, with one created at initial runtime. execution = [] # Stack containing current location in SPS code operand = [] # Stack containing any/all operands # Sept 21, 2011 -- fixed the handling of }{...
{ "content_hash": "4a7b387ec020ac48f6994befc29e8d31", "timestamp": "", "source": "github", "line_count": 500, "max_line_length": 107, "avg_line_length": 26.644, "alnum_prop": 0.5397087524395736, "repo_name": "vonderborch/CS355", "id": "fd47d6e24adbb595c153cdfc6d0fb2cc2d1fd74e", "size": "13440", "b...
"""Credentials logic for JSON CloudApi implementation.""" # This module duplicates some logic in third_party gcs_oauth2_boto_plugin # because apitools credentials lib has its own mechanisms for file-locking # and credential storage. As such, it doesn't require most of the # gcs_oauth2_boto_plugin logic. import json...
{ "content_hash": "66a031f9fd11239b0dc576f81c39e0cb", "timestamp": "", "source": "github", "line_count": 241, "max_line_length": 79, "avg_line_length": 38.54356846473029, "alnum_prop": 0.7042738723221014, "repo_name": "Sorsly/subtle", "id": "6a7d51b57739246f985993eb9d306f59e95edf52", "size": "9909",...
import os from copy import deepcopy import pytest from dvc.parsing import DEFAULT_PARAMS_FILE, DataResolver, ResolveError from dvc.parsing.context import Context from dvc.utils.serialize import dumps_yaml from . import CONTEXT_DATA, RESOLVED_DVC_YAML_DATA, TEMPLATED_DVC_YAML_DATA DATA = {"models": {"bar": "bar", "f...
{ "content_hash": "e8ac1f81b5d7d97e3ced57abdda460d1", "timestamp": "", "source": "github", "line_count": 191, "max_line_length": 79, "avg_line_length": 32.10471204188482, "alnum_prop": 0.6232876712328768, "repo_name": "dmpetrov/dataversioncontrol", "id": "a2ac0c42b84e3dcaf427e2127d4932b01fad4d47", "...
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class AdvancedFilter(Choreography): def __init__(self, temboo_session): """ Create ...
{ "content_hash": "cb438c5bc1d2cf2d21e92f6767e0dee8", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 253, "avg_line_length": 50.02197802197802, "alnum_prop": 0.6904657293497364, "repo_name": "jordanemedlock/psychtruths", "id": "c97304472a717f5e6734bfeab92a7c5e7a72607c", "s...
"""TFLite SavedModel conversion test cases. - Tests converting simple SavedModel graph to TFLite FlatBuffer. - Tests converting simple SavedModel graph to frozen graph. - Tests converting MNIST SavedModel to TFLite FlatBuffer. """ from __future__ import absolute_import from __future__ import division from __fut...
{ "content_hash": "bbbb2b99438199a6357c105339d65664", "timestamp": "", "source": "github", "line_count": 292, "max_line_length": 80, "avg_line_length": 43.167808219178085, "alnum_prop": 0.6739389131297104, "repo_name": "brchiu/tensorflow", "id": "dff582f1a16d2f228df5253652437e4b5266e502", "size": "1...
import requests import json import sys sys.path.append('../conn/') import conn #vol_name = raw_input('Input volume name:') url = conn.url + 'storage/disk/' auth = conn.auth headers = conn.headers payload = { "disk_togglesmart": "true" } def replication_get(): r = requests.get(url, auth = auth) result = ...
{ "content_hash": "e6ee6dbb3b71c741171440f6704085e6", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 86, "avg_line_length": 23.22222222222222, "alnum_prop": 0.631578947368421, "repo_name": "PatriQ7/freenas-test-api", "id": "0b73d34221475d504f70be7bba4ca0ff65dd77fd", "size"...
__author__ = 'ruthlesshelp'
{ "content_hash": "d180ac58349ff2d2d2197787595bc433", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 27, "avg_line_length": 28, "alnum_prop": 0.6428571428571429, "repo_name": "excellaco/pycabara", "id": "d12b4182c1686ed621ddd1c63e3792ae43757834", "size": "28", "binary": f...
from __future__ import print_function, unicode_literals from sympy import Eq, symbols, solve # Symbols release_group, resolution, format, video_codec, audio_codec = symbols('release_group resolution format video_codec audio_codec') imdb_id, hash, title, series, tvdb_id, season, episode = symbols('imdb_id hash title s...
{ "content_hash": "93f301f189bf9d13bc290b85c8f9454e", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 139, "avg_line_length": 43.29545454545455, "alnum_prop": 0.6648293963254593, "repo_name": "caronc/subliminal", "id": "f9dcaedee5880fa8f4f7713c6505c0fc47fc3e50", "size": "38...
"""\ Karatsuba multiplication of polynomials christoph dürr - jill-jênn vie - 2022 """ # snip{ def eval_poly(P, x): """evaluate a polynomial in x. :param P: an array representing the polynomial :returns: the value of P(x) :complexity: linear in the size of P. """ # use Horner's rule retva...
{ "content_hash": "5af43a3475d7c7d0b492ae00352e1f51", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 84, "avg_line_length": 29.723684210526315, "alnum_prop": 0.5559982293050022, "repo_name": "jilljenn/tryalgo", "id": "9c3678d930d1419cb7655ba882d6ba41bb39444f", "size": "230...
import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, map_error, ) from azure.core.pipeline import Pipeline...
{ "content_hash": "8754fa068469499633f647373e4ab0cd", "timestamp": "", "source": "github", "line_count": 344, "max_line_length": 221, "avg_line_length": 47.63662790697674, "alnum_prop": 0.6704704949044975, "repo_name": "Azure/azure-sdk-for-python", "id": "2c325ca3644b107caabdbfdf903e4a197fe22138", "...
''' Created on Mar 2, 2013 @author: Adam Speakman @contact: http://github.com/adamsp @contact: http://speakman.net.nz @license: http://www.apache.org/licenses/LICENSE-2.0.html ''' import json import logging from google.appengine.api import urlfetch class DataRetriever: def __init__(self, processors): sel...
{ "content_hash": "c3fcd5222ce3f768fdb6fc33ecac89af", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 92, "avg_line_length": 37.741379310344826, "alnum_prop": 0.5609867519415258, "repo_name": "adamsp/adnwc", "id": "f44d0102c22c9d5b223cbe4a8df06d5cd217d89a", "size": "2189", ...
from msrest.service_client import ServiceClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.database_accounts_operations import DatabaseAccountsOperations from . import models class DocumentDBConfiguration(AzureConfiguration): ...
{ "content_hash": "69705694f6d59f12b5485fd7a4a40e10", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 91, "avg_line_length": 38.875, "alnum_prop": 0.7063236870310825, "repo_name": "AutorestCI/azure-sdk-for-python", "id": "5eda44ab3e32b6ffe2af30ee5f14e705ec7ac69b", "size": "...
"""PFIF 1.1, 1.2, and 1.3 parsing and serialization (see http://zesty.ca/pfif/). This module converts between PFIF XML documents (PFIF 1.1, 1.2, or 1.3) and plain Python dictionaries that have PFIF 1.3 field names as keys (always 1.3) and Unicode strings as values. Some useful constants are also defined here accordin...
{ "content_hash": "4d9faacb28c29cfb5279974d9f1d1d34", "timestamp": "", "source": "github", "line_count": 400, "max_line_length": 80, "avg_line_length": 33.065, "alnum_prop": 0.5514894903977015, "repo_name": "pet-finder/pet-finder", "id": "e63088cb9a774e71558de509a1302820cd1d5c9e", "size": "13824", ...
from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('dojo', '0085_add_publish_date_cvssv3_score'), ] operations = [ migrations.RenameField( model_name='jira_insta...
{ "content_hash": "784fb773986e64738e05bc69c808cbf5", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 132, "avg_line_length": 40.348837209302324, "alnum_prop": 0.5850144092219021, "repo_name": "rackerlabs/django-DefectDojo", "id": "476317178b1e8f0adf72bd24f70ec4dcf16775ea", ...
from django.apps import AppConfig class MaintenanceConfig(AppConfig): name = 'maintenance'
{ "content_hash": "505fddd430fe7dbc1c2bbc842ee53fa3", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 35, "avg_line_length": 19.4, "alnum_prop": 0.7731958762886598, "repo_name": "edisondotme/motoPi", "id": "36cf6806cccd7dd3314479dd8b54cae63a274872", "size": "97", "binary":...
"""Handles ConsoleProxy API requests.""" from nova.compute import rpcapi as compute_rpcapi from nova.console import rpcapi as console_rpcapi from nova.db import base from nova.openstack.common import cfg from nova.openstack.common import rpc from nova.openstack.common import uuidutils CONF = cfg.CONF CONF.import_opt(...
{ "content_hash": "3c64e20c08e9cd471c5fb34643ed7a0c", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 75, "avg_line_length": 41.8448275862069, "alnum_prop": 0.6571899464359291, "repo_name": "fajoy/nova", "id": "57c5cb0e3e8db114bd1fb2debd6a60cf6085d4ea", "size": "3107", "b...
"""Defines utility functions.""" from typing import Iterable, Union, Optional, Any from jax.tree_util import register_pytree_node from jax.lib import xla_bridge import jax.numpy as jnp from jax import jit from functools import partial import numpy as onp Array = jnp.ndarray PyTree = Any i16 = jnp.int16 i32 = jnp....
{ "content_hash": "f4993e5a29251abed756f6975d46b45f", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 77, "avg_line_length": 24.06382978723404, "alnum_prop": 0.6741821396993811, "repo_name": "google/jax-md", "id": "57f901cc5b731746ff8e3f69127af33041d565e9", "size": "2838", ...
class PaleBaseResponse(object): def __init__(self, *args): super(PaleBaseResponse, self).__init__(*args) if args: self.message = args[0] else: self.message = "i am a teapot" @property def response(self): http_status = getattr(self, 'http_status_code',...
{ "content_hash": "70683ba053b8fc2d552bf756cec3fb30", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 78, "avg_line_length": 29.193548387096776, "alnum_prop": 0.6143646408839779, "repo_name": "Loudr/pale", "id": "8b586635e0c0ed69a320f0aae754ee3d0858dacf", "size": "905", "...
""" Climate on Zigbee Home Automation networks. For more details on this platform, please refer to the documentation at https://home-assistant.io/components/zha.climate/ """ from datetime import datetime, timedelta import enum import functools import logging from random import randint from typing import List, Optional...
{ "content_hash": "9cca7bc68f6312bd06569f6be3f3ee58", "timestamp": "", "source": "github", "line_count": 599, "max_line_length": 85, "avg_line_length": 34.36560934891486, "alnum_prop": 0.6202574690308477, "repo_name": "tchellomello/home-assistant", "id": "7ffb727bacce4e71f29458ede12526850a3e5cfb", "...
from __future__ import annotations from cctbx import uctbx from scitbx.array_family import flex def quasi_normalisation(intensities): """Quasi-normalisation of the input intensities. Args: intensities (cctbx.miller.array): The intensities to be normalised. Returns: cctbx.miller.array: T...
{ "content_hash": "f71dc2abd55c8b9a2f13eaff7191759b", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 77, "avg_line_length": 33.70454545454545, "alnum_prop": 0.6365475387727579, "repo_name": "dials/dials", "id": "238caba4d1c85f94f5ba4fd50ff6d52c91507976", "size": "1483", ...
import re import operator debug = False test = False def is_number(s): try: float(s) if '.' in s else int(s) return True except ValueError: return False def load_stop_words(stop_word_file): """ Utility function to load stop words from a file and return as a list of words ...
{ "content_hash": "01700f4f4fb7ee6dddd7ac0732baca83", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 580, "avg_line_length": 39.21604938271605, "alnum_prop": 0.6713363765150323, "repo_name": "njordsir/Movie-Script-Analysis", "id": "550161cba59c82d5f2263ff71bd75e51c4734f79",...
if not has_pobj_str('on'): if(has_dobj()): subject = get_dobj() else: subject = get_object(get_dobj_str()) else: if(has_pobj('on')): origin = get_pobj('on') else: origin = get_object(get_pobj_str('on')) subjects = get_dobj_str().split(' ', 1) if(len(subjects)...
{ "content_hash": "59dd5d95d7d7a73b380b12465c0777a9", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 68, "avg_line_length": 28.4375, "alnum_prop": 0.554945054945055, "repo_name": "philchristensen/antioch", "id": "9ec873db3f7159f1b6e29b244c1c5ff623a64cda", "size": "921", ...
__author__ = 'nikolojedison' from wpilib.command import CommandGroup #Woo, commands from commands.setpoint_commands.close_claw import CloseClaw from commands.semiauto_commands.drive_straight import DriveStraight from commands.setpoint_commands.lift_go_to_level import LiftGoToLevel from commands.manual_commands.mecanu...
{ "content_hash": "017d4e30f970663df668dce303447a60", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 89, "avg_line_length": 41.58730158730159, "alnum_prop": 0.6076335877862595, "repo_name": "DenfeldRobotics4009/2015_Lopez_Jr", "id": "5e3b4e96ab44c44e7020ce8f8f3e3567d707f798"...
"""Copyright 2011 The University of Michigan Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writi...
{ "content_hash": "8a4e6c169570ee9743851f32ded36eff", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 72, "avg_line_length": 33.12903225806452, "alnum_prop": 0.6689386562804285, "repo_name": "jieyu/maple", "id": "28a6ae495ba2b3b1770deb58e8d7133109bdcd3c", "size": "2054", ...
""" Django settings for taxi project. Generated by 'django-admin startproject' using Django 1.8.6. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths i...
{ "content_hash": "3fc20abf6a3a1bd6f4a62070ee635b59", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 71, "avg_line_length": 24.584745762711865, "alnum_prop": 0.6963116166839021, "repo_name": "rombr/agile-fusion-test-task", "id": "77aacfe6ecc96cf384866a64fab0a7784e2fb53b", ...
from scraper import GoogleAnalyticsScraper
{ "content_hash": "220a284859ab522cc6569619522b5d17", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 42, "avg_line_length": 43, "alnum_prop": 0.9069767441860465, "repo_name": "nprapps/graeae", "id": "2bdb45001c34d1e3b1c9eab112b4a30201908715", "size": "43", "binary": false...
""" WSGI config for tsace 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", "project.settings.development") from dja...
{ "content_hash": "5b2acdf7f9a040ae0eb863c6aff73c0a", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 79, "avg_line_length": 28.5, "alnum_prop": 0.7769423558897243, "repo_name": "c17r/tsace", "id": "02e43172e1f48f106920c97c21af45ee2196e3b5", "size": "399", "binary": false...
"""Command-line flag library. Emulates gflags by wrapping cfg.ConfigOpts. The idea is to move fully to cfg eventually, and this wrapper is a stepping stone. """ import os import socket import sys from cinder.openstack.common import cfg FLAGS = cfg.CONF def parse_args(argv, default_config_files=None): FLAGS...
{ "content_hash": "cb1b7a3b44c7c62023db8b9f208e0ccc", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 79, "avg_line_length": 39.41379310344828, "alnum_prop": 0.5725534308211474, "repo_name": "freedomhui/cinder", "id": "87103c83a3dbee65b07eda06b442014b5fef8a47", "size": "88...
"""Parses the generic policy files and return a policy object for acl rendering. """ __author__ = ['pmoody@google.com', 'watson@google.com'] import datetime import os import sys from lib import nacaddr from lib import naming from ply import lex from ply import yacc import logging DEFINITIONS = None ...
{ "content_hash": "0362dfdabf4dc2732fc5c41d8f9e7276", "timestamp": "", "source": "github", "line_count": 2189, "max_line_length": 131, "avg_line_length": 30.97898583828232, "alnum_prop": 0.6057245660861487, "repo_name": "pettai/capirca", "id": "6a8f46fab958ceb687ceea188a1dcf6d8d4de2a9", "size": "684...
"""## Loss operations for use in neural networks. The loss ops measure error for use in neural networks. These losses can be used for measuring accuracy of a network in a regression task or for regularization purposes (e.g., weight decay). These loss ops are, by design, minimal, enabling flexibility in how their outp...
{ "content_hash": "2ec0080952d6a8e204be4a65e0b05d1a", "timestamp": "", "source": "github", "line_count": 332, "max_line_length": 79, "avg_line_length": 33.90060240963855, "alnum_prop": 0.6923145268769436, "repo_name": "moonboots/tensorflow", "id": "ae3d6203fe57bd0e505db225e8e321291a478006", "size": ...
""" // The DoTurn function is where your code goes. The PlanetWars object contains // the state of the game, including information about all planets and fleets // that currently exist. Inside this function, you issue orders using the // pw.IssueOrder() function. For example, to send 10 ships from planet 3 to // planet ...
{ "content_hash": "388a762043b54e5b6eda00e80bae0386", "timestamp": "", "source": "github", "line_count": 115, "max_line_length": 126, "avg_line_length": 33.43478260869565, "alnum_prop": 0.552925877763329, "repo_name": "Dremalka/arbitr", "id": "ef33487b7f31b4eacb89257ca45b1a4887e239c3", "size": "3869...
from sqlalchemy import ( Column, Index, Integer, Text, ) from .meta import Base class MyModel(Base): __tablename__ = 'models' id = Column(Integer, primary_key=True) name = Column(Text) value = Column(Integer) Index('my_index', MyModel.name, unique=True, mysql_length=255)
{ "content_hash": "04d669afb488bacbcfc49d0b2f186e07", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 62, "avg_line_length": 17.166666666666668, "alnum_prop": 0.6440129449838188, "repo_name": "shortaj/pyramid-learning-journal", "id": "d65a01a42231273ddc84880183a142c734690b21"...
''' Created on Oct 29, 2015 @author: Kagiu ''' import sys from PySide import QtGui, QtCore from signin import TimeLogger def boxToWidget(layout): widget = QtGui.QWidget() widget.setLayout(layout) return widget class SignGUI(QtGui.QMainWindow): def __init__(self): super(SignGUI, self).__init_...
{ "content_hash": "a0fa2095f0b35fb27e7f97de8898fe20", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 122, "avg_line_length": 35.47286821705426, "alnum_prop": 0.5935314685314685, "repo_name": "frc3324/Timekeeper", "id": "9e6a03e05eb505ffccb762d1f49c699624e51dc7", "size": "...
import sys, subprocess, os from subprocess import call from tempfile import NamedTemporaryFile def formdamage(sent): rectify = [] for ch in sent: try: rectify.append(ch.encode('utf-8')) except: pass return ''.join(rectify) def cabocha(sent): if os.path.exists('/home_lab_local/s...
{ "content_hash": "bcbbad38239f3cc32d0f4803a0bc17d8", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 112, "avg_line_length": 28.2972972972973, "alnum_prop": 0.6542502387774594, "repo_name": "kevincobain2000/jProcessing", "id": "14ea14310bea38c12862de2fd25e46357bace509", "s...
""" Module to test RO manager minim access functions See: http://www.wf4ever-project.org/wiki/display/docs/RO+management+tool """ __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2011-2013, University of Oxford" __license__ = "MIT (http://opensource.org/licenses/MIT)" import os, os.path...
{ "content_hash": "335243353b10840bf5cdb16f913b3cd4", "timestamp": "", "source": "github", "line_count": 550, "max_line_length": 129, "avg_line_length": 46.49636363636364, "alnum_prop": 0.5863215109685997, "repo_name": "wf4ever/ro-manager", "id": "4e671787b75d40806b39ee269873b0e26663eec9", "size": "...
"""Admin dashboard page smoke tests""" # pylint: disable=no-self-use # pylint: disable=invalid-name # pylint: disable=too-few-public-methods import re import pytest # pylint: disable=import-error from lib import base from lib import constants from lib.page import dashboard class TestAdminDashboardPage(base.Test):...
{ "content_hash": "e8fdc423488b8b4b1828cf811181c9af", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 74, "avg_line_length": 39.86666666666667, "alnum_prop": 0.7079152731326644, "repo_name": "josthkko/ggrc-core", "id": "db5124b41f2b5ba9f5391f225d7b95ca4ac8b86d", "size": "19...