text
stringlengths
4
1.02M
meta
dict
with open("input.txt", "r") as f: puzzle_input = f.read().replace("\n", "") # Coordinates: (x, y) class Santa: def __init__(self): self.x = 0 self.y = 0 def move(self, direction): if direction == "^": self.y += 1 elif direction == ">": self.x += 1 ...
{ "content_hash": "eae60158cf1b34d3e50308b3c3a77a43", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 50, "avg_line_length": 21.308641975308642, "alnum_prop": 0.5283893395133256, "repo_name": "foxscotch/advent-of-code", "id": "325c48dcbf68d3dc5b932280cfdad56acf831087", "siz...
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.expected_conditions import * from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import TimeoutException class Page(object):...
{ "content_hash": "0460e07c27e0a0746ca5d0c025951182", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 69, "avg_line_length": 36.333333333333336, "alnum_prop": 0.6829765545361876, "repo_name": "mkpythonanywhereblog/selenium-python-gmail", "id": "2836a912751f720e82ae93a50e6e6ff...
import os import pytest from headlessvim.process import Process @pytest.fixture def default_args(request): return '-N -i NONE -n -u NONE' @pytest.fixture def env(request): return dict(os.environ, LANG='C') @pytest.fixture def unterminated_process(request, default_args, env): return Process('vim', de...
{ "content_hash": "23d79ca4322bfab9a71a5f1abb05904a", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 53, "avg_line_length": 19.70689655172414, "alnum_prop": 0.7200349956255468, "repo_name": "manicmaniac/headlessvim", "id": "6522f09a44f3bb1ca6257b2b10ddc00ec8d1d449", "size"...
from nose.tools import * # flake8: noqa from api.base.settings.defaults import API_BASE from tests.base import ApiWikiTestCase, ApiTestCase from tests.factories import AuthUserFactory, ProjectFactory, NodeWikiFactory, RegistrationFactory class TestNodeWikiList(ApiWikiTestCase): def _set_up_public_project_with...
{ "content_hash": "e05b27786f9b8cd9e28ec6838ac2e9d0", "timestamp": "", "source": "github", "line_count": 198, "max_line_length": 131, "avg_line_length": 55.96969696969697, "alnum_prop": 0.6681104493773687, "repo_name": "rdhyee/osf.io", "id": "91dd7c27e3a03d087f4d29867c5b4e1e04bb22d2", "size": "11106...
from django import template register = template.Library() @register.filter def reportdict(input, property): if property in input: if input[property]: return input[property] return 0
{ "content_hash": "1bb21d11b68949d38384079a09800340", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 34, "avg_line_length": 17.833333333333332, "alnum_prop": 0.677570093457944, "repo_name": "unicefuganda/edtrac", "id": "dec2746a479e023c7089c4ff81854598f0654585", "size": "2...
import tornado.websocket from tornado import gen import json import config @gen.coroutine def test_ws(): client = yield tornado.websocket.websocket_connect(config.WebSocket.url) msg = "" while True: msg = input("-> ") if msg: tweet = { "user": { "scree...
{ "content_hash": "6ab9cec0b98062abfa45efc0f962bd26", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 76, "avg_line_length": 27.03125, "alnum_prop": 0.4936416184971098, "repo_name": "r3ek0/infowall", "id": "4f760608b58b30cc40e2f8ca36d0af7e542a5f46", "size": "888", "binary...
from decimal import Decimal import requests import logging from ... import utils import config def receive_btc(): """generates a Bitcoin receiving address""" # generate new blockchain.info wallet addr r = requests.get("https://blockchain.info/merchant/%s/new_address?password=%s&second_password=%s" % (con...
{ "content_hash": "4c5765492027553baec8cb051892eb07", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 128, "avg_line_length": 33.411764705882355, "alnum_prop": 0.6945422535211268, "repo_name": "ahdinosaur/localbitcoins", "id": "4ef5ce845b675e7db782c767a3fa36fe2f04bfaf", "si...
"""add sample and identifier history Revision ID: b4f6eb55d503 Revises: 4aa79d5ac86e Create Date: 2018-08-31 13:26:22.482944 """ import model.utils import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "b4f6eb55d503" down_revision = "4aa79d5ac86e" branch_labels = None dep...
{ "content_hash": "2eb65ac438c79b6c836b2a742b320847", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 90, "avg_line_length": 33.91428571428571, "alnum_prop": 0.6575400168491997, "repo_name": "all-of-us/raw-data-repository", "id": "39a54e5eff9703ed770e731017c0dbd54e9f4b54", ...
import datetime import operator import sickbeard from sickbeard import db from sickbeard import helpers, logger, show_name_helpers from sickbeard import providers from sickbeard import search from sickbeard import history from sickbeard.common import DOWNLOADED, SNATCHED, SNATCHED_PROPER, Quality fro...
{ "content_hash": "815a1cce9d6bc234857b8eaf6ef97698", "timestamp": "", "source": "github", "line_count": 225, "max_line_length": 188, "avg_line_length": 43.937777777777775, "alnum_prop": 0.5762694719805787, "repo_name": "Branlala/docker-sickbeardfr", "id": "05e147212d841b34571422af8bdf6fb2dd3be2b9", ...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['deprecated'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: vmware_target_canonical_facts deprecated: removed_in: '2.13' why: Deprecated in ...
{ "content_hash": "3a11ab463b8e8d9ff92941c6d91dc053", "timestamp": "", "source": "github", "line_count": 183, "max_line_length": 110, "avg_line_length": 33.85245901639344, "alnum_prop": 0.6358353510895883, "repo_name": "thaim/ansible", "id": "629c8e82eead49be2ae784e9a568b06e9b678a52", "size": "6428"...
import os import World, Globals import RoomInit, MobInit, Objects import cInteractions # checks for a previous set of server data, and if it is present, load it. def clientDataLoad(client, CLIENT_LIST, CLIENT_DATA, TIMERS, kind): """ Loads the information in the client file to CLIENT_DATA """ clientDataID = str...
{ "content_hash": "4112495c905a588a2d83feff9509450a", "timestamp": "", "source": "github", "line_count": 943, "max_line_length": 227, "avg_line_length": 36.6882290562036, "alnum_prop": 0.6545943289880626, "repo_name": "buckets1337/MotherMUD", "id": "d3883d57659b400d2da12c5014a351971f1c1560", "size":...
""" Exponentiate quickly, using the binary exponentiation algorithm. Also known as exponentiation by squaring, or square-and-multiply. Author: Christos Nitsas (nitsas) (chrisnitsas) Language: Python 3(.4) Date: October, 2014 """ __all__ = ['binary_exponentiation', 'power'] def binary_exponentiation(nu...
{ "content_hash": "e1d28c550d528e22f82514ab6b4e5b02", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 77, "avg_line_length": 24.70769230769231, "alnum_prop": 0.6419676214196762, "repo_name": "nitsas/py3algs", "id": "f868e454d49f6ded77bbbb5752d3bd6f21d8c6ea", "size": "1606",...
import re from nova import exception # Define the minimum and maximum version of the API across all of the # REST API. The format of the version is: # X.Y where: # # - X will only be changed if a significant backwards incompatible API # change is made which affects the API as whole. That is, something # that is only ...
{ "content_hash": "8a2f33d8f98a5d83f014618e94649041", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 79, "avg_line_length": 37.95161290322581, "alnum_prop": 0.6638334041648959, "repo_name": "zaina/nova", "id": "ccbaa185f6a819799292c0658c5c8824bab9b2f7", "size": "5308", ...
""" cpsdirector.user ================ ConPaaS director: users and authentication handling :copyright: (C) 2013 by Contrail Consortium. """ from flask import Blueprint from flask import jsonify, helpers, request, make_response, g import os import hashlib import zipfile import simplejson from datetime...
{ "content_hash": "1c203d0bec06b34a62ac47fdaf336f8f", "timestamp": "", "source": "github", "line_count": 430, "max_line_length": 110, "avg_line_length": 34.42325581395349, "alnum_prop": 0.6010674233211728, "repo_name": "ConPaaS-team/conpaas", "id": "3b59dce0b13ea0e1081836597667b15fb4396917", "size":...
""" owtf.models.error ~~~~~~~~~~~~~~~~~ """ from owtf.lib.exceptions import InvalidErrorReference from sqlalchemy import Boolean, Column, Integer, String from owtf.db.model_base import Model from owtf.db.session import flush_transaction class Error(Model): __tablename__ = "errors" id = Column(Integer, prim...
{ "content_hash": "58b90e8bf0f2e0a1776f3634d80ead70", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 81, "avg_line_length": 30.434782608695652, "alnum_prop": 0.6195238095238095, "repo_name": "owtf/owtf", "id": "b2f3f966f57f1aa8c5cd90ffa5700c32280bd02a", "size": "2100", "...
try: from urllib.parse import urljoin from urllib.parse import urlencode import urllib.request as urlrequest except ImportError: from urlparse import urljoin from urllib import urlencode import urllib2 as urlrequest import json API_URL_DEFAULT = 'https://api.hipchat.com/v1/' FORMAT_DEFAULT = '...
{ "content_hash": "3af07d2f2f3a2a412d07380871b1bde1", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 115, "avg_line_length": 32.23913043478261, "alnum_prop": 0.5967633175994606, "repo_name": "idooo/pancake-hipchat-bot", "id": "5078e9249eb1bed12572492c3049873acbc06165", "si...
""" ============================================================== Restricted Boltzmann Machine features for digit classification ============================================================== For greyscale image data where pixel values can be interpreted as degrees of blackness on a white background, like handwritten...
{ "content_hash": "437e845eba1142906b90b59170e98fa5", "timestamp": "", "source": "github", "line_count": 152, "max_line_length": 121, "avg_line_length": 37.44078947368421, "alnum_prop": 0.5824986821296785, "repo_name": "jordansilva/lorien", "id": "76fbc0c793887fbcae324b282375857e5ed05de0", "size": "...
import sys from django.core.management.base import BaseCommand from elections.constraints import check_constraints, ViolatedConstraint from elections.models import Election class Command(BaseCommand): def handle(self, *args, **kwargs): elections = Election.private_objects.all() exitcode = 0 ...
{ "content_hash": "4df2ccef6d284b325a77d73fe7ffd872", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 71, "avg_line_length": 32.470588235294116, "alnum_prop": 0.6503623188405797, "repo_name": "DemocracyClub/EveryElection", "id": "a20eb760da38595a1b2e51e34cd6a16c444f8b3b", "...
try: from django.utils.crypto import salted_hmac except ImportError: raise ImportError("This module depends on django.") def get_hmac(key_salt, value): return salted_hmac(key_salt, value).hexdigest()
{ "content_hash": "5329142e822b978c8a2042c78dda8256", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 55, "avg_line_length": 26.75, "alnum_prop": 0.7336448598130841, "repo_name": "polyaxon/polyaxon", "id": "85e7e334bc7f5c1c796cc2a613f178eecb1449a9", "size": "819", "binary"...
from __future__ import print_function import argparse import errno import json import logging import os import platform import shutil import subprocess import sys import tempfile import traceback from instack import runner LOG = logging.getLogger() def load_args(argv): parser = argparse.ArgumentParser( ...
{ "content_hash": "3d41ef0c2fd3c629f1cf84c4099ac3cc", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 78, "avg_line_length": 33.208333333333336, "alnum_prop": 0.5929378024735615, "repo_name": "rdo-management/instack", "id": "89fe63a02acc5420fa7e853d2d93670bd0d19bda", "size...
'''Program ''' import re from fabric.api import run, hosts, cd, local, prefix __author__ = 'noahsark' def get_name(string): pat = re.compile("http://dbpedia.org/resource/(.*)") match = pat.match(string) if match is not None: return match.group(1).replace('_', ' ') def clear_data(core): loc...
{ "content_hash": "fa94106b6cd9427082b42bb6e976b8dd", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 123, "avg_line_length": 27.72, "alnum_prop": 0.6219336219336219, "repo_name": "jimmylai/knowledge", "id": "ae63864e7206e5ffd4675af4b3813147b30c7499", "size": "740", "bina...
from __future__ import unicode_literals from datetime import datetime, date from caspy import models, time def test_fixture(): currency_objs = _load(models.Currency, currency_data) accounttype_objs = _load(models.AccountType, accounttype_data) book_objs = [models.Book.objects.create(**d) for d in book_dat...
{ "content_hash": "bb859024f8782145bfb4a0d0058e9c0b", "timestamp": "", "source": "github", "line_count": 160, "max_line_length": 79, "avg_line_length": 29.94375, "alnum_prop": 0.45794197453558755, "repo_name": "altaurog/django-caspy", "id": "2ca896540c059c6836b3601976fafb45cc4754b7", "size": "4818",...
from django.test import RequestFactory, TransactionTestCase from html5_appcache.cache import (get_cached_manifest, set_cached_manifest, clear_cache_manifest, get_cache_version, reset_cache_manifest, set_cached_value) from html5_appcache.views import M...
{ "content_hash": "690b293818e341bcfafb08c916b4c53e", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 75, "avg_line_length": 37.06666666666667, "alnum_prop": 0.6393884892086331, "repo_name": "nephila/django-html5-appcache", "id": "eaaa335896580063bc321d9eeeadff16164d7778", ...
'''This module provides helper functions for Gnome/GLib related functionality such as gobject-introspection and gresources.''' from .. import build import os import sys import copy import subprocess from . import ModuleReturnValue from ..mesonlib import MesonException, OrderedSet, Popen_safe from ..dependencies import...
{ "content_hash": "90db1a3f3f2eaba6431ed3fb84dd98d4", "timestamp": "", "source": "github", "line_count": 1170, "max_line_length": 133, "avg_line_length": 47.12051282051282, "alnum_prop": 0.5462625383178248, "repo_name": "fmuellner/meson", "id": "685a86befa89365aae6d3c47c186dca59df2e97c", "size": "55...
''' Handles all Login/Sign Up logic - calling on database module where needed ''' import os import ast import hashlib from passman.functions import getUserInput, quit from passman.database import checkUserCredentials, addUser, \ setDBUsername, pullDatabase, checkConnection from passman.JSON import setOfflineUse...
{ "content_hash": "c7792e3a5931f9d8ec7db63c24252892", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 83, "avg_line_length": 30.22758620689655, "alnum_prop": 0.6103125712981976, "repo_name": "regexpressyourself/passman", "id": "022891304bbc089124b263a4d2597f7e10d62dbf", "s...
from __future__ import absolute_import, print_function, unicode_literals __author__ = 'Iacopo Spalletti' __email__ = '[email protected]' __version__ = '1.0.0.dev1' default_app_config = 'djangocms_blog.apps.BlogAppConfig'
{ "content_hash": "8120307c25b919cc048e3beef457d996", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 72, "avg_line_length": 32.57142857142857, "alnum_prop": 0.7149122807017544, "repo_name": "skirsdeda/djangocms-blog", "id": "a909fc3950b8280ebd7e20df086d3fb756e3bee0", "size"...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('aquifers', '0017_auto_20190326_0240'), ] operations = [ migrations.AlterModelOptions( name='aquifermaterial', options={'ordering': ['code'], 'verbose_name_plural': '...
{ "content_hash": "05cc457cf83b3d1d52d6b6175ce0c1b8", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 112, "avg_line_length": 31.103448275862068, "alnum_prop": 0.5898004434589801, "repo_name": "bcgov/gwells", "id": "4924c0be839dd3aade59d9e67d3a4a642eb404ef", "size": "951", ...
"""Test out a model. For Jetson devices, you must specify a .pb model: python3 examples/benchmark_demo.py --model=data/traffic_model_tftrt.pb For Coral devices, you must specify a tflite or _edgetpu.tflite model: python3 examples/benchmark_demo.py --model=data/traffic_model_edgetpu.tflite """ import argparse imp...
{ "content_hash": "18c646c70232f33c310a6dda8efb4893", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 78, "avg_line_length": 30.903846153846153, "alnum_prop": 0.7000622277535781, "repo_name": "google/automl-video-ondevice", "id": "525c1f28d76504d75e61ecaf56728cbfd1d5bb1b", ...
from jingo import register from django.template import Context from django.template.loader import get_template @register.function def bootstrapform(form): template = get_template("bootstrapform/form.html") context = Context({'form': form}) return template.render(context) @register.function def invalid_f...
{ "content_hash": "9f78f369a57100533aff47853b49192e", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 54, "avg_line_length": 27.1875, "alnum_prop": 0.7448275862068966, "repo_name": "peterbe/airmozilla", "id": "dbb49d7e2d5b9c6cce5a6a3583a0c52e8c56c3ca", "size": "435", "bin...
import os from django.conf import settings from django.core.urlresolvers import clear_url_caches from django.db import models from django.db.models.signals import pre_delete, post_delete from django.utils.encoding import smart_str from django.utils.translation import get_language, get_language_info, ugettext_lazy, uge...
{ "content_hash": "8d91056ac2425a10e88528dea5aec20f", "timestamp": "", "source": "github", "line_count": 211, "max_line_length": 120, "avg_line_length": 37.39336492890995, "alnum_prop": 0.6467680608365018, "repo_name": "egemsoft/esef-yawd-translation", "id": "ec25a86a7e29db76de4afa9a5f67d1a9f36b07f7",...
""" Low-level objects providing an abstraction for the objects involved in the calculation. """ import abc import collections from enum import Enum from pprint import pformat import numpy as np from monty.collections import AttrDict from monty.design_patterns import singleton from monty.json import MontyDecoder, Mont...
{ "content_hash": "8b2e436bc1120082d0d5beaf4cae52fc", "timestamp": "", "source": "github", "line_count": 1719, "max_line_length": 119, "avg_line_length": 31.641070389761488, "alnum_prop": 0.5658105201228144, "repo_name": "gmatteo/pymatgen", "id": "7c5bf9c70e0381d82d62ede3354794dd74e1c45a", "size": "...
from bmbb_fish import BmBB my_fish = BmBB() my_fish.shut_down_fish()
{ "content_hash": "3dbe7dbd3b046e620cf3412dbbf9ef30", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 26, "avg_line_length": 14.2, "alnum_prop": 0.704225352112676, "repo_name": "mnr/rubberfish", "id": "ed8c09aca2c62757c5818a897c98b903279d9a6d", "size": "123", "binary": fal...
import re # The original password puzzle_input = ['v', 'z', 'b', 'x', 'k', 'g', 'h', 'b'] # Checks for a row of 3 letters in the password def three_straight_letters(): global puzzle_input for i in range(len(puzzle_input) - 3): for j in range(2): if not ord(puzzle_input[i + j]) + 1 == ord(puzzle_input[i + j + 1...
{ "content_hash": "b59dc414e877e74e462c2898988724a4", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 79, "avg_line_length": 29.52173913043478, "alnum_prop": 0.6745213549337261, "repo_name": "joseph-roque/advent-of-code", "id": "691062d516ceafa64b19c60b78b97c71d01832c9", "s...
from a2billing_spyne.model import SipBuddy, Extensions from contextlib import closing from sqlalchemy import create_engine from sqlalchemy.orm import Session with closing(open("sip.conf")) as file: table = file.readlines() sip = SipBuddy._type_info db = create_engine('postgres://postgres:@localhost:5432/radius'...
{ "content_hash": "501f9bf8549d99a097e1f35d942680f1", "timestamp": "", "source": "github", "line_count": 117, "max_line_length": 77, "avg_line_length": 26.00854700854701, "alnum_prop": 0.4972067039106145, "repo_name": "plq/a2billing-spyne", "id": "5b26d56661feec8cb7228750cb37dccb5d49ecae", "size": "...
from inspect import isclass from .target import Target, ValueTarget from .flex import FlexSetter, FlexParameter from .modview import ModPower, ModView from .snap import SnapshotButton, SnapshotSelector from .parameter import Parameter from .switchview import SwitchView from .pageflip import PageFlip from .bpm import...
{ "content_hash": "0c760d6a8fb728b4bf2671359cda023b", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 63, "avg_line_length": 25.94736842105263, "alnum_prop": 0.7403651115618661, "repo_name": "echolox/smartbcr2k", "id": "be609009f13c71d946e309e3fcf434bb3be9bf09", "size": "49...
from scanForSections import parseOrigin from scanForSections import parseCategories from scanForProducts import parseProductPages from scanForItems import parseItemPages from scanForItems import checkAvailability from scanForItems import itemList def main(): scanEntireSite() def scanEntireSite(): """This function i...
{ "content_hash": "e554900e88781e172488f504ecc681bc", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 72, "avg_line_length": 28.903225806451612, "alnum_prop": 0.7349330357142857, "repo_name": "cmrust/boomscraper", "id": "fd8365a8cfab3334414da862e72fab8d031e8b83", "size": "1...
"""The tests for the hassio component.""" import asyncio import aiohttp @asyncio.coroutine def test_api_ping(hassio_handler, aioclient_mock): """Test setup with API ping.""" aioclient_mock.get( "http://127.0.0.1/supervisor/ping", json={'result': 'ok'}) assert (yield from hassio_handler.is_connec...
{ "content_hash": "7ea1f97290661ff4590bb8dc986e5ef0", "timestamp": "", "source": "github", "line_count": 90, "max_line_length": 72, "avg_line_length": 32.666666666666664, "alnum_prop": 0.6751700680272109, "repo_name": "persandstrom/home-assistant", "id": "78745489a788282dd442fb31346ad85f894ab1e8", "...
"""Hinted Support Vector Machine This module contains a class that implements Hinted Support Vector Machine, an active learning algorithm. Standalone hintsvm can be retrieved from https://github.com/yangarbiter/hintsvm """ import numpy as np from libact.base.interfaces import QueryStrategy from libact.query_strategi...
{ "content_hash": "0e7cfb866dfaf98b36b1197d79db6f2c", "timestamp": "", "source": "github", "line_count": 160, "max_line_length": 87, "avg_line_length": 35.56875, "alnum_prop": 0.6099103848181339, "repo_name": "ntucllab/libact", "id": "f6252cc729c60be01c1348f917e4a7376eaf76e0", "size": "5691", "bin...
""" pycompilation is a package for meta programming. It aims to support multiple compilers: GNU, Intel, PGI. """ from ._release import __version__ from .compilation import ( compile_sources, link_py_so, src2obj, compile_link_import_py_ext, compile_link_import_strings ) from .util import ( missing_or_othe...
{ "content_hash": "48c149a6f4b6c2e1405632fa7a3ec935", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 67, "avg_line_length": 25.5625, "alnum_prop": 0.7310513447432763, "repo_name": "bjodah/pycompilation", "id": "f393872241df083f178cd3eb102379d981f22acc", "size": "409", "b...
from bs4 import BeautifulSoup import re def getCities(): with open("sites.htm") as sites: fh = sites.read() soup = BeautifulSoup(fh, "html.parser") placesDict = {} for columnDiv in soup.h1.next_sibling.next_sibling: for state in columnDiv: for city in state: m = (re.search('<li><a href="(.+)">(....
{ "content_hash": "93e86b3683dc8460006bf456f8a42193", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 62, "avg_line_length": 22.05263157894737, "alnum_prop": 0.6229116945107399, "repo_name": "MuSystemsAnalysis/craigslist_area_search", "id": "fec922ddaec07a638062872503e9bcf797...
__version__=''' $Id: _fontdata.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__="""Database of font related things - standardFonts - tuple of the 14 standard string font names - standardEncodings - tuple of the known standard font names - encodings - a mapping object from standard encoding names (and minor...
{ "content_hash": "63d036f973501112d47d4830d2f94a91", "timestamp": "", "source": "github", "line_count": 246, "max_line_length": 226, "avg_line_length": 39.53252032520325, "alnum_prop": 0.6419537275064268, "repo_name": "nakagami/reportlab", "id": "ddf14cdd7532183e24cc8c0b9453840d75cf2b62", "size": "...
from celery.utils.log import get_task_logger from flask import current_app import datetime from redash.worker import celery from redash import utils from redash import models, settings from .base import BaseTask logger = get_task_logger(__name__) def base_url(org): if settings.MULTI_ORG: return "https:/...
{ "content_hash": "f5223d04f06a06d0645fe66af9441732", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 115, "avg_line_length": 33.10344827586207, "alnum_prop": 0.6755208333333333, "repo_name": "stefanseifert/redash", "id": "a431f2bb892d8e61275fff9d799c055af063ffa3", "size": ...
''' The core of ``pyfftw`` consists of the :class:`FFTW` class, :ref:`wisdom functions <wisdom_functions>` and a couple of :ref:`utility functions <utility_functions>` for dealing with aligned arrays. This module represents the full interface to the underlying `FFTW library <http://www.fftw.org/>`_. However, users may...
{ "content_hash": "8726a9314851bc70c2297f8d0add72b8", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 74, "avg_line_length": 26.541666666666668, "alnum_prop": 0.6656200941915228, "repo_name": "hgomersall/pyFFTW", "id": "6097f8b8619129f0ff6fb763c5c010f77445a093", "size": "13...
"""empty message Revision ID: e95429507f03 Revises: 82e227787c88 Create Date: 2017-10-08 04:00:04.899374 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e95429507f03' down_revision = '82e227787c88' branch_labels = None depends_on = None def upgrade(): # ...
{ "content_hash": "8398d768106161f3b965530d5d425171", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 94, "avg_line_length": 31.44736842105263, "alnum_prop": 0.6778242677824268, "repo_name": "coderadi/OAuth-server", "id": "84286f4206bbc030b263752e5f3d2ff5dfe6e233", "size": ...
from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0035_auto_20160102_1442'), ] operations = [ migrations.CreateModel( name='HackSawBlade', ...
{ "content_hash": "537bd6adb5ff17777e344420c6e5ec0e", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 206, "avg_line_length": 31.24, "alnum_prop": 0.6043533930857875, "repo_name": "n2o/guhema", "id": "60251d677ca6dde196648f2ebe6bc6d79855c4e9", "size": "856", "binary": fal...
from .primitives import * from .types import * __all__ = (types.__all__ + primitives.__all__)
{ "content_hash": "23bb473c2d62a7e8d98e82a1a7153ae3", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 46, "avg_line_length": 23.75, "alnum_prop": 0.6210526315789474, "repo_name": "jamespeterschinner/async_v20", "id": "7f81473c46566958aa273bc873d6406887a7f674", "size": "95", ...
import sys import spacy nlp = spacy.load('en') with open(sys.argv[1], 'r') as infile: sentences = infile.readlines() for sentence in sentences: sentence = sentence.strip() parse = nlp(sentence) print(parse.text) for token in parse: print(token.pos_, token.tag_, ...
{ "content_hash": "b4b1cc7156cc2056f76464e76690b655", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 63, "avg_line_length": 25.63157894736842, "alnum_prop": 0.4804928131416838, "repo_name": "hawkrives/project-e.a.s.t.", "id": "b0e08d22d5d9a76b4943a8912f6a4ce32b64192b", "si...
from marrow.package.loader import load from .util import redact_uri log = __import__('logging').getLogger(__name__) class DBAPIConnection: """WebCore DBExtension interface for projects utilizing PEP 249 DB API database engines.""" uri_safety = True # Go to some effort to hide connection passwords from logs. ...
{ "content_hash": "4d8e2cff10bcf2cf6c16e0b9dc472e77", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 102, "avg_line_length": 29.934426229508198, "alnum_prop": 0.6681270536692223, "repo_name": "marrow/web.db", "id": "e2c73cd64bf136b718442d0be400e1c650f21114", "size": "1826"...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('filer', '0009_auto_20171220_1635'), ] operations = [ migrations.AlterField( model_name='image', name='file_ptr', ...
{ "content_hash": "d7c0b1bc790da5bd726819d0c3c69fea", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 142, "avg_line_length": 26.055555555555557, "alnum_prop": 0.6226012793176973, "repo_name": "skirsdeda/django-filer", "id": "f40c52a30927c922fdd2e6e4d2ff28d963d444b4", "size...
import requests import smtplib exec(open(inemail.py)) def is_website_working(url, string_in_page): try: r = requests.get(url) if not string_in_page in r.content or r.status_code !=200: return False return True except: return False def send_mail(url, email): se...
{ "content_hash": "37f6504b19aaf18dd58ffb9bb314d3e0", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 89, "avg_line_length": 26.89855072463768, "alnum_prop": 0.5264008620689655, "repo_name": "NicoHinderling/website_status", "id": "8504d82b67a452b8c24c2ad61288bee773e8461e", ...
import projectors, computers, kipro import pcpUtils as utils def _printStartMenu(interfaces): print "\n", print "********************************\n" * 2 print "Welcome to the COL Production Control Panel!\n" print "********************************\n" * 2 # list out devices choices = {} for i, interface in en...
{ "content_hash": "937ea5ae727cec1e2c56b5b8ebfc362f", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 84, "avg_line_length": 25.145454545454545, "alnum_prop": 0.6167751265365148, "repo_name": "redreceipt/pcp", "id": "6b16a3165767fdb0d0a602a66d304f997824b4a8", "size": "1422"...
"""Beam DoFns for running Box Least Squares and processing the output.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import apache_beam as beam from apache_beam.metrics import Metrics import numpy as np from box_least_squares import ...
{ "content_hash": "9bcbc31a8636bfa2bf9c7082bd61f5f3", "timestamp": "", "source": "github", "line_count": 183, "max_line_length": 80, "avg_line_length": 34.486338797814206, "alnum_prop": 0.6629694184756774, "repo_name": "google-research/exoplanet-ml", "id": "83b56ddf122bd824b580e110b282071eada578ae", ...
import decimal from datetime import date from django.conf import settings from django.db import models from django.core import urlresolvers from django.contrib.auth.models import User, Group from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from shoppy.util.models im...
{ "content_hash": "a204318341698eb8247958786e145273", "timestamp": "", "source": "github", "line_count": 274, "max_line_length": 158, "avg_line_length": 42.24817518248175, "alnum_prop": 0.6609364201796821, "repo_name": "pocketone/django-shoppy", "id": "888108b2fed20c929322cfd62cd1b4ad49091408", "siz...
import itertools from ..language.ast import Document def concat_ast(asts): return Document(definitions=list(itertools.chain.from_iterable( document.definitions for document in asts )))
{ "content_hash": "a5e9250057b4ce3ce0238fb1580186cd", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 67, "avg_line_length": 22.666666666666668, "alnum_prop": 0.7401960784313726, "repo_name": "wandb/client", "id": "9abebe9245f4d34ef5af35d5cf47d412d0d29398", "size": "204", ...
""" Python library for the AR.Drone. This module was tested with Python 2.6.6 and AR.Drone vanilla firmware 1.5.1. """ import socket import struct import sys import threading import multiprocessing import arnetwork __author__ = "Bastian Venthur" ARDRONE_NAVDATA_PORT = 5554 ARDRONE_VIDEO_PORT = 5555 ARDRONE_COMM...
{ "content_hash": "6909c3acd20bf5a22565708977a306aa", "timestamp": "", "source": "github", "line_count": 426, "max_line_length": 150, "avg_line_length": 35.21830985915493, "alnum_prop": 0.5465573551956275, "repo_name": "kfreedland/quadrotor", "id": "95ac214b27c25052f8ebffa04480e6e92e5fa44e", "size":...
from typing import Optional from ConfigSpace.configuration_space import ConfigurationSpace from ConfigSpace.hyperparameters import ( UniformFloatHyperparameter, UnParametrizedHyperparameter, ) from autosklearn.askl_typing import FEAT_TYPE_TYPE from autosklearn.pipeline.components.base import AutoSklearnRegres...
{ "content_hash": "db5e946dd1102f198ba60f6482b0ea6e", "timestamp": "", "source": "github", "line_count": 149, "max_line_length": 79, "avg_line_length": 29.892617449664428, "alnum_prop": 0.5484957341715312, "repo_name": "automl/auto-sklearn", "id": "758c4b04d73ed54064b4e3f5f028777062e022d3", "size": ...
import pika import uuid import tasks.task_pb2 as pb import requests import json import re #1from tasks.task_pb2 import Response import sys class imageRpcClient(object): def __init__(self): self.connection = pika.BlockingConnection(pika.ConnectionParameters( host='master')) self.ch...
{ "content_hash": "df941eb97a1945678ed8800deb513406", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 107, "avg_line_length": 31.580246913580247, "alnum_prop": 0.5684128225175918, "repo_name": "fercamp09/elastic-transcoder", "id": "9e72e930daa211faba484a8c44b62b9929c331eb", ...
import os import re import sys import subprocess import StringIO from glob import glob test_dir = "tests" luajit_exec = "luajit" luajit_x = "./src/luajit-x" diff_exec = "diff" def lua_files(test_dir): for dirpath, dirnames, filenames in os.walk(test_dir): for filename in sorted(filenames): m = re.match(r'([^.]+...
{ "content_hash": "d2d22ade52d6c9513370336576964ddd", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 106, "avg_line_length": 25.510791366906474, "alnum_prop": 0.6291596164692611, "repo_name": "gaoxiaojun/symphony", "id": "f9d9b5546da59099e3b0e44053614e5be2e9adec", "size":...
import argparse import pytest from paasta_tools.cli.cli import get_argparser from paasta_tools.cli.cli import main def each_command(): parser = get_argparser() # We're doing some wacky inspection here, let's make sure things are sane subparsers, = [ action for action in parser._actions ...
{ "content_hash": "c52183de429c66d066fb95b490130bd8", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 77, "avg_line_length": 28.583333333333332, "alnum_prop": 0.6822157434402333, "repo_name": "somic/paasta", "id": "79d1a4e7945fb1c9dccbd58a63c16688c66594c3", "size": "1607", ...
from django import forms from django.db.models import get_model from django.forms.util import ErrorList # save file as : forms.py # use adminform[tab] to create your items!
{ "content_hash": "707f261253cff4ca1ae6e6538bc634d3", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 42, "avg_line_length": 28.833333333333332, "alnum_prop": 0.7861271676300579, "repo_name": "vigo/my-custom-textmate1-bundle", "id": "c0bbdb72f1c2176b963a620167937421e5b0c6b1", ...
import os, time, inspect import cPickle as pickle # Internal modules # from plumbing.autopaths import FilePath # Third party modules # from decorator import decorator ################################################################################ def property_cached(f): """Decorator for properties evaluated onl...
{ "content_hash": "ad3845c690489c11cc1f09e1be1fe963", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 89, "avg_line_length": 39.23364485981308, "alnum_prop": 0.5409718913768461, "repo_name": "DC23/plumbing", "id": "a014fdb58f8eb0392f5baf8714c79bef0cac34d4", "size": "4219",...
"""Unit tests for the DB API.""" import copy import datetime import iso8601 import types import uuid as stdlib_uuid import mox import netaddr from oslo.config import cfg from sqlalchemy.dialects import sqlite from sqlalchemy import exc from sqlalchemy.exc import IntegrityError from sqlalchemy import MetaData from sql...
{ "content_hash": "0df6fe6acae02d60fa77040df0edda16", "timestamp": "", "source": "github", "line_count": 6425, "max_line_length": 79, "avg_line_length": 45.208560311284046, "alnum_prop": 0.5661336133441206, "repo_name": "plumgrid/plumgrid-nova", "id": "d766181863a9604fb65f76ba326b70f7135c5f8f", "siz...
import datetime from django.db import connections from django.db.models import expressions from django.db.models.sql import query as django_query from django.db.models.sql.where import AND, OR, WhereNode from django.test import TestCase from django.utils import timezone from ldapdb import escape_ldap_filter, models f...
{ "content_hash": "eb3017285ffbbb9ba4213f57c674c22e", "timestamp": "", "source": "github", "line_count": 242, "max_line_length": 104, "avg_line_length": 43.421487603305785, "alnum_prop": 0.6230491054434717, "repo_name": "django-ldapdb/django-ldapdb", "id": "f2da2d4f37278ade03d1a78a1358dc62057e9669", ...
import pytest import six from pyocd.core.options_manager import OptionsManager from pyocd.core.options import OPTIONS_INFO @pytest.fixture(scope='function') def mgr(): return OptionsManager() @pytest.fixture(scope='function') def layer1(): return { 'foo': 1, 'bar': 2, 'baz...
{ "content_hash": "c7aace8df7b3a1fc7429c4d34bcb1a21", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 84, "avg_line_length": 30.046296296296298, "alnum_prop": 0.5651771956856703, "repo_name": "flit/pyOCD", "id": "518d2a96d9f1e492448212674ff8fa9764a0bb0d", "size": "3880", ...
from . import domainresource class Linkage(domainresource.DomainResource): """ Links records for 'same' item. Identifies two or more records (resource instances) that are referring to the same real-world "occurrence". """ resource_type = "Linkage" def __init__(self, jsondict=None...
{ "content_hash": "19a18a8e69e8a050c9a7ddaf37b098f8", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 106, "avg_line_length": 34.40229885057471, "alnum_prop": 0.6144336785833612, "repo_name": "all-of-us/raw-data-repository", "id": "68a21d3c84cb71bfe8920ac77eca7bb17324a697", ...
from uuid import uuid4 from random import randint from basic_http import BasicHttp def random_pk(length=8): s = uuid4().hex f = randint(0, (len(s) - length)) t = f + length return s[f:t] def get_url_info(url): req = BasicHttp(url) res = req.HEAD() data = { 'file_name': url.split...
{ "content_hash": "3fc1e66542d42e9211a5eeaaab80dd1e", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 54, "avg_line_length": 18.56, "alnum_prop": 0.5732758620689655, "repo_name": "nachopro/followlink", "id": "37cfc77c02d02b40eb454f0424307f74a68336b8", "size": "464", "bina...
from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.mininode import CTransaction, NetworkThread from test_framework.blocktools import create_coinbase, create_block from test_framework.comptool import TestInstance, TestManager from test_framework.script...
{ "content_hash": "30a0b697713e6e13d4ed1c3383a06bdc", "timestamp": "", "source": "github", "line_count": 176, "max_line_length": 100, "avg_line_length": 36.82954545454545, "alnum_prop": 0.6055229867324899, "repo_name": "dragosbdi/bitcredit-2.0", "id": "3a164f2511a8a330fccca82fc54ab26b218954e0", "siz...
from . import attributes, entity, player, mobile, archetype, feature, env, article, server
{ "content_hash": "8a2a496dfcf299edc7293d5f34c2e80c", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 90, "avg_line_length": 91, "alnum_prop": 0.7692307692307693, "repo_name": "genzgd/Lampost-Mud", "id": "476c0d6903be519b52aae992cd9944784ddd9302", "size": "91", "binary": f...
from .components import *
{ "content_hash": "9648105a5348e52b083e1051dbac2eb5", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 25, "avg_line_length": 26, "alnum_prop": 0.7692307692307693, "repo_name": "csdms/topoflow-bridge", "id": "dfc3c948e0dff4ce15d45d21e656f6c59164ce55", "size": "26", "binary"...
import logging import numpy as np from mxnet import context as ctx from mxnet import ndarray as nd from mxnet.io import DataDesc from mxnet.executor_manager import _split_input_slice def _load_general(data, targets, major_axis): """Load a list of arrays into a list of arrays specified by slices""" for d_src, ...
{ "content_hash": "edda605b899397e60bed2e20a7d1ad97", "timestamp": "", "source": "github", "line_count": 595, "max_line_length": 116, "avg_line_length": 42.4218487394958, "alnum_prop": 0.569430688166079, "repo_name": "deepinsight/Deformable-ConvNets", "id": "15c8469024f2e33d2068a4e751b92d1447752a51", ...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ResultTable.start_time' db.add_column(u'windberg_results_resulttable', 'start_time', self.gf('...
{ "content_hash": "a1bfdcccab32eb475f9f3b74895eee8e", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 154, "avg_line_length": 57.94805194805195, "alnum_prop": 0.5502017032720753, "repo_name": "janLo/Windberg-web", "id": "214471a259a491ca0ec7f66d23fb36906f91fa06", "size": "4...
""" Copyright (c) 2017-2022, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on May 20, 2017 """ # flake8: noqa F401 from .activity import Activity from .activity_indicator import ActivityIndicator from .app_bar_layout ...
{ "content_hash": "7cec39d622b9dea7d4b96c7e3c811eaf", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 80, "avg_line_length": 30.905882352941177, "alnum_prop": 0.818804720213171, "repo_name": "codelv/enaml-native", "id": "d4a740324b0497bb9f06570d8725a2d98eac3787", "size": "2...
from __future__ import absolute_import from __future__ import print_function from objects import TemporalObject, Link, PLink class Axiom(TemporalObject): def __init__(self,inRel,outRel,resultRel): self.inRel = inRel self.outRel = outRel self.resultRel = resultRel def __str__(self): ...
{ "content_hash": "bebc4d90b17c78a0f34547aab30974b4", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 90, "avg_line_length": 40.68888888888889, "alnum_prop": 0.5996723102129984, "repo_name": "tarsqi/ttk", "id": "e61fb6715c8e5d11d7ca71a844144a1de8f67b4c", "size": "5494", ...
""" ============================ Faces dataset decompositions ============================ This example applies to :ref:`olivetti_faces` different unsupervised matrix decomposition (dimension reduction) methods from the module :py:mod:`sklearn.decomposition` (see the documentation chapter :ref:`decompositions`) . """...
{ "content_hash": "811cc41ce3ddfe9da74505d62bfa9b78", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 79, "avg_line_length": 33.41984732824427, "alnum_prop": 0.5744632252169941, "repo_name": "DailyActie/Surrogate-Model", "id": "dffbc2c3c2df67ed717839a643666f15b13814d0", "s...
""" Test cases for twisted.reflect module. """ import weakref # Twisted Imports from twisted.trial import unittest from twisted.python import reflect class SettableTest(unittest.TestCase): def setUp(self): self.setter = reflect.Settable() def tearDown(self): del self.setter def testSet...
{ "content_hash": "edf074265a027a97c23f36014c31283a", "timestamp": "", "source": "github", "line_count": 327, "max_line_length": 108, "avg_line_length": 28.434250764525995, "alnum_prop": 0.5680791568079157, "repo_name": "santisiri/popego", "id": "6423f2e0d8b2320ca6d2f513a3a2b2233f92dfc3", "size": "9...
import os import re from time import sleep from opensextant import Place from opensextant.gazetteer import DB, estimate_name_bias, GazetteerIndex, get_default_db from opensextant.utility import replace_diacritics, load_list, get_list def filter_out_feature(pl: Place, feats): """ Filter out places by their fe...
{ "content_hash": "54135b4d612c21c5077becf85c9c420d", "timestamp": "", "source": "github", "line_count": 358, "max_line_length": 124, "avg_line_length": 40.857541899441344, "alnum_prop": 0.5528132904901893, "repo_name": "OpenSextant/Xponents", "id": "6e74cdec0891ef9029156715ca5347c6c46d30ed", "size"...
""" This is the main module, the main interface classes and functions are available in the top level hid package """ from __future__ import absolute_import from __future__ import print_function import sys import ctypes import threading import collections if sys.version_info >= (3,): import winreg el...
{ "content_hash": "e45eaf49ce15a7cd61f872eb38723ce6", "timestamp": "", "source": "github", "line_count": 1609, "max_line_length": 92, "avg_line_length": 41.26600372902424, "alnum_prop": 0.5405515309426631, "repo_name": "rene-aguirre/pywinusb", "id": "c98501ab81223db81852175ea9c32060dd3d4e7d", "size"...
""" The different agnocomplete classes to be discovered """ from copy import copy from six import with_metaclass from abc import abstractmethod, ABCMeta import logging from django.db.models import Q from django.core.exceptions import ImproperlyConfigured from django.utils.encoding import force_text as text from django...
{ "content_hash": "c9ad27ad3503821c86928958f50d91a5", "timestamp": "", "source": "github", "line_count": 669, "max_line_length": 79, "avg_line_length": 29.965620328849027, "alnum_prop": 0.581433630967227, "repo_name": "novafloss/django-agnocomplete", "id": "4fbcd5062c8b70c63520b075ea216a0f5bca83a8", ...
import os from django.db import models from django.db.models.signals import post_delete from django.dispatch import receiver from .base import Pessoa from djangosige.apps.login.models import Usuario from djangosige.configs.settings import MEDIA_ROOT def logo_directory_path(instance, filename): extension = os.pa...
{ "content_hash": "4f7f5250b021c36a93ee28c4ed326a31", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 104, "avg_line_length": 32.55555555555556, "alnum_prop": 0.666991711360312, "repo_name": "thiagopena/djangoSIGE", "id": "dad1a8de5ee8de72b6f64a27a1748f857e46a923", "size": ...
import theano.tensor as tt import pymc3 as pm class HotBinomial(pm.Binomial): """ A "hot" Binomial distribution. Parameters ---------- beta_temp : float on interval [0, 1] Beta value (inverse temperature) of the distribution. Returns ------- output : pymc3 distribution ...
{ "content_hash": "2f8a7d82d8186f395e049bbbc39ed86e", "timestamp": "", "source": "github", "line_count": 1111, "max_line_length": 81, "avg_line_length": 27.77047704770477, "alnum_prop": 0.5752114867273846, "repo_name": "justinbois/bebi103_utils", "id": "6047b7ab6302db32fbff9953a93b760b93b745f3", "si...
from pyspark.ml.param import * from ai.h2o.sparkling.ml.params.H2ODimReductionExtraParamsOnMOJO import H2ODimReductionExtraParamsOnMOJO class H2OGLRMExtraParamsOnMOJO(H2ODimReductionExtraParamsOnMOJO): def getReconstructedCol(self): return self._java_obj.getReconstructedCol() def getWithReconstructed...
{ "content_hash": "e5c5c6f7cbc21657741a1e408efd597d", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 104, "avg_line_length": 33.56, "alnum_prop": 0.7485101311084624, "repo_name": "h2oai/sparkling-water", "id": "cd7d578a055a144645096db0ab83992818e18bd4", "size": "1624", "...
from .aniversariantes import * from .cria_usuario import * from .views import *
{ "content_hash": "86fb670e36d0280e46f770699438ea97", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 30, "avg_line_length": 26.666666666666668, "alnum_prop": 0.7625, "repo_name": "anselmobd/fo2", "id": "74a7365dc6538d3ac414c7bb791c7d4d9e113daf", "size": "80", "binary": fa...
def jungle_animal(animal, my_speed): # YOUR CODE HERE text = "Introduce yourself!" if animal == "zebra": text = "Try to ride a zebra!" if animal == "cheetah" and my_speed <= 115: text = "Stay calm and wait!" if animal == "cheetah" and my_speed > 115: text = "Run!" print t...
{ "content_hash": "cacf777743b645d9af3889c1b0f0aa4f", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 47, "avg_line_length": 25.941176470588236, "alnum_prop": 0.5850340136054422, "repo_name": "ezralalonde/cloaked-octo-sansa", "id": "fbc2adb212b40580c42c54130acdfdae24cf383e", ...
import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) sys.path.append(os...
{ "content_hash": "b5b30f2e78020c543d46d5b064d43ffb", "timestamp": "", "source": "github", "line_count": 291, "max_line_length": 82, "avg_line_length": 31.786941580756015, "alnum_prop": 0.707891891891892, "repo_name": "jarlyyn/jarlyyn-docker-image", "id": "fec0279f6b5fafc78e9c90865ce256d649609c3d", ...
from __future__ import absolute_import from setuptools import setup, find_packages readme = open('README.md').read() setup( name='fabcloudkit', version='0.025', url='http://github.com/waxkinetic/fabcloudkit', license='BSD', author='Rick Bohrer', author_email='[email protected]', desc...
{ "content_hash": "3c8fbeb4f2cdf772cb8f6904fe49455f", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 95, "avg_line_length": 21.03030303030303, "alnum_prop": 0.6210374639769453, "repo_name": "waxkinetic/fabcloudkit", "id": "b462915472528f609cbfc71baf352688240b0bd9", "size":...
from __future__ import unicode_literals from django.db import migrations, models import djbetty.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='VideohubVideo', fields=[ ('id', models.IntegerFie...
{ "content_hash": "4a296002b94715fe8e153168cc861012", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 146, "avg_line_length": 38.724137931034484, "alnum_prop": 0.5779162956366874, "repo_name": "theonion/django-bulbs", "id": "e5499b5f1934046d4baebfae4bb28fabdd67b86f", "size"...
from tests import unittest from botocore import model from botocore.paginate import Paginator from botocore.paginate import PaginatorModel from botocore.paginate import TokenDecoder from botocore.paginate import TokenEncoder from botocore.exceptions import PaginationError from botocore.compat import six import mock ...
{ "content_hash": "a5835cf919f381acb8983b0d61433cb5", "timestamp": "", "source": "github", "line_count": 1407, "max_line_length": 83, "avg_line_length": 38.837242359630416, "alnum_prop": 0.5247053656394115, "repo_name": "pplu/botocore", "id": "bf8666b4ae4dd4869631672f27c6c19bda219731", "size": "5521...
"""Stage the Chromium checkout to update CTS test version.""" import contextlib import json import operator import os import re import sys import tempfile import threading try: # Workaround for py2/3 compatibility. # TODO(pbirk): remove once py2 support is no longer needed. import urllib.request as urllib_reques...
{ "content_hash": "14129cc290df476792d78a8172597bb0", "timestamp": "", "source": "github", "line_count": 459, "max_line_length": 80, "avg_line_length": 30.501089324618736, "alnum_prop": 0.6565, "repo_name": "scheib/chromium", "id": "bc1610c905853d79f562861e44c8be5927c7b8ab", "size": "14162", "bina...
import functools import itertools import logging import pickle import threading import time import uuid from collections import namedtuple from datetime import timedelta import click import psycopg2 from concurrent.futures import ( Future, TimeoutError, ) from kazoo.client import KazooState from kazoo.recipe.w...
{ "content_hash": "d5d8743fd5e5c88f726fb90ed7de8e11", "timestamp": "", "source": "github", "line_count": 357, "max_line_length": 148, "avg_line_length": 38.83473389355742, "alnum_prop": 0.5552510098095788, "repo_name": "fuziontech/pgshovel", "id": "b11de34e90af97b3eeb10188a26319a735a61fb6", "size": ...
""" Resource tests. """ from hamcrest import ( assert_that, equal_to, has_length, is_, ) from consulchecknagiosplugin.resources import ConsulCheckHealth, ConsulCheck from consulchecknagiosplugin.tests.fixtures import mocked_get, NODE, SERF_CHECK_ID OUTPUT = "output" def test_parse_check_health(): ...
{ "content_hash": "967498a21ca271dce40836535e2b971e", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 82, "avg_line_length": 22.82758620689655, "alnum_prop": 0.6185800604229608, "repo_name": "locationlabs/consul-check-nagios-plugin", "id": "ba498c95fab8238f9cc2e4738c9e42db907...
""" Training symbol detectors via Linear SVM """ import cv2 import numpy as np import random from symbol import LOC from sklearn.svm import SVC from sklearn.externals import joblib from utils import create_symbol_with_center_loc, get_sub_im from feature import hog, pixel_vec def read_annotations(annotation_file_path...
{ "content_hash": "34e2a77e0d29bd2aef91fd9c26f55e4f", "timestamp": "", "source": "github", "line_count": 164, "max_line_length": 120, "avg_line_length": 29.176829268292682, "alnum_prop": 0.6020898641588297, "repo_name": "liang-chen/Vintager", "id": "e0c40aee37f72ccba9351a28c53ade369a895e50", "size":...
""" Drivers for volumes. """ import time from oslo_concurrency import processutils from oslo_config import cfg from oslo_utils import excutils from cinder import exception from cinder.i18n import _, _LE, _LW from cinder.image import image_utils from cinder.openstack.common import fileutils from cinder.openstack.comm...
{ "content_hash": "4c439b047dd997d3c4c990d19ce9d44d", "timestamp": "", "source": "github", "line_count": 1364, "max_line_length": 79, "avg_line_length": 40.25513196480939, "alnum_prop": 0.5747978436657682, "repo_name": "Accelerite/cinder", "id": "11fa301b549f6b3029551c72d781f84785f12016", "size": "5...
"""Yaml CLI formatter.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from treadmill import yamlwrapper as yaml def format(obj): # pylint: disable=W0622 """Returns yaml representation of the object.""" ...
{ "content_hash": "3c5bccb32dfd55a7306c25e4c07209e6", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 52, "avg_line_length": 29.4375, "alnum_prop": 0.6411889596602972, "repo_name": "captiosus/treadmill", "id": "a98a0a3b4eac04d06240af72e0ca7fa7e2c4a7d4", "size": "471", "bi...
from django.conf.urls.defaults import patterns, include, url from django.conf import settings # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', url(r'', include('main_site.urls'), name="main_site"), url(r'^fonts/(?P<path>....
{ "content_hash": "5eb0909a0fc794f848128a685d3af6d2", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 73, "avg_line_length": 31.5, "alnum_prop": 0.673469387755102, "repo_name": "skoczen/encore-poem", "id": "b887e2a10f426ceb8103e22b46007414fa2d83c8", "size": "441", "binary...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'surveymaker.views.all_survey_responses', name='surveymaker_index'), url(r'^(?P<survey_slug>.*)/new/$', 'surveymaker.views.survey_form', name='surveymaker_fo...
{ "content_hash": "98e24cf02c9d2ea868a2b8fa3fce51c0", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 97, "avg_line_length": 37.5, "alnum_prop": 0.704, "repo_name": "willhardy/dynamic-models", "id": "0137fea0a86c5b031d4036ee9dc6f8b56b6068e4", "size": "375", "binary": fals...
XXXXXXXXX XXXXX XXXXXX XXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXX...
{ "content_hash": "9436b34553b19399403b5856af39a2b1", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 160, "avg_line_length": 44.26744186046512, "alnum_prop": 0.8534278959810875, "repo_name": "dnaextrim/django_adminlte_x", "id": "d983f61e3fbb53d92a53c575c8dbadd0d2f660bc", "...
import json import argparse import os parser = argparse.ArgumentParser( description="top module generation helper to show the optional fields of a given pad") parser.add_argument('--padType', '-t', action='store', required=False, help="The pad type to show the mapping for") parser.add_argumen...
{ "content_hash": "3018f380a676fedcbd90f660994d15da", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 145, "avg_line_length": 40.50847457627118, "alnum_prop": 0.5761506276150627, "repo_name": "efabless/openlane", "id": "029cdf82105887f96ddc87855184772d5950dfaa", "size": "29...
import wx from src.wizard.controller.frmSampFeatSelectPanel import SampFeatSelectPanel from src.wizard.controller.frmVariableSelectPanel import VariableSelectPanel from src.wizard.controller.frmUnitSelectPanel import UnitSelectPanel from src.wizard.controller.frmProcLevelSelectPanel import ProcLevelSelectPanel from src...
{ "content_hash": "4ba063d94e9b7e4a43308f709f6258fa", "timestamp": "", "source": "github", "line_count": 235, "max_line_length": 97, "avg_line_length": 34.52765957446808, "alnum_prop": 0.6093172294799113, "repo_name": "ODM2/ODM2StreamingDataLoader", "id": "6fd783ddf50ba8daaa41bd43da4402dd8b956881", ...
from parts import ( ArmGrips, ArmWrist, ArmElbow, ArmShoulder, ArmBase, ArmLed, ) from constants import ( PART_BASE, PART_ELBOW, PART_GRIPS, PART_LED, PART_SHOULDER, PART_WRIST ) from device import ArmDevice from locker import on_lock class ArmManager(object): grips...
{ "content_hash": "071b3b248ea0a5623fce29994ee66086", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 65, "avg_line_length": 21.153846153846153, "alnum_prop": 0.5709090909090909, "repo_name": "mapler/tuesday", "id": "260b3a51f3120c7e09b18839cd90fbfc02413057", "size": "1400"...
"""Simple Filter support""" import re import fnmatch class BaseFilter(object): """Filter a string based on a list of regular expression or glob patterns. This should be inherited and the __call__ overriden with a real implementation """ __slots__ = ('patterns', '_re_options') def __init__(se...
{ "content_hash": "0bd429f8c518de3566eae6771009b14c", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 78, "avg_line_length": 29.126126126126128, "alnum_prop": 0.6102690999072069, "repo_name": "m00dawg/holland", "id": "a70b2e068497ca4536a90b1bf89a90621f5b313e", "size": "323...