text
stringlengths
4
1.02M
meta
dict
''' This module provides interfaces to the RaspberrySTEM CREATOR Kit speaker. Additionally, it can be used for any audio out over the analog audio jack. ''' import os import sys import time import re import io import select from functools import partial from . import mixer # c extension import tempfile from threa...
{ "content_hash": "1266c158a34a7a61641782b751bda3f1", "timestamp": "", "source": "github", "line_count": 418, "max_line_length": 105, "avg_line_length": 33.66985645933014, "alnum_prop": 0.5271422481170953, "repo_name": "scottsilverlabs/raspberrystem", "id": "9e2d0c7c0c612fac5a3865aa48d58f3efa6b6edc", ...
import os import sys from file_manager.vhdl_reader import Vhdl_reader from decorator.pdfdrawer import PdfDrawer from tools.options import Options """ pyVhdl2Sch takes a .vhd file and return a pdf : name_of_the_entity.pdf. """ options = Options() files = [] options.analyse_args(sys.argv) for i in range(0, len(optio...
{ "content_hash": "9a98bceccf87bb310cbe1e7c66f95f70", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 103, "avg_line_length": 27.387096774193548, "alnum_prop": 0.6513545347467609, "repo_name": "LaurentCabaret/pyVhdl2Sch", "id": "6e733ceadf6d07fd8dc853775b1b6b97d10ce038", "s...
""" Test for pytimeseries library """ from transformer import transformer from AR import AR from AR import AR_Ridge_2 from AR import AR_Lasso from AR import AR_ElasticNet from HoltWinters import HoltWinters import pandas import matplotlib ts = pandas.Series.from_csv('champagne.csv', index_col = 0, header = 0) #ts = ...
{ "content_hash": "efd0ff6aee44d1dd46db4590ded4fb2b", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 78, "avg_line_length": 20.735294117647058, "alnum_prop": 0.7056737588652482, "repo_name": "jdvelasq/pytimeseries", "id": "d565585ab8f8f51839e1fb6a20cf57f01df2fae9", "size":...
import unittest from .. import sqltest import_error = False try: from ...auction.seller import Seller except ImportError: import_error = True Seller = None class TestCase00(unittest.TestCase): def test_import(self): self.assertFalse(import_error) class TestCase01(sqltest.TestSQL): def ...
{ "content_hash": "ce6ada8c14a9eb93a0ed0862509946af", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 48, "avg_line_length": 20.916666666666668, "alnum_prop": 0.649402390438247, "repo_name": "AdamGagorik/pydarkstar", "id": "e4e0b71adc18b1e642b9738c2b2c602306dafccb", "size":...
import marshmallow as ma import peewee as pw import pytest from marshmallow_peewee.fields import ForeignKey from .models import User @pytest.fixture def convertor(): from marshmallow_peewee.convert import ModelConverter from marshmallow_peewee.schema import SchemaOpts class Meta: model = User ...
{ "content_hash": "b72abf104ddce0eddc91f9b60f03ffd8", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 63, "avg_line_length": 24.314285714285713, "alnum_prop": 0.7344300822561692, "repo_name": "klen/marshmallow-peewee", "id": "6ccf1f6a744bb3f0f667de788778426533e3d181", "size...
from __future__ import absolute_import import os import random import sys import time import traceback import types from collections import defaultdict from copy import deepcopy from shutil import move from tempfile import mkstemp from django.conf import settings from django.core.cache import cache import six try: ...
{ "content_hash": "e318be45eb2fb042cff9b83d0aa1b2ad", "timestamp": "", "source": "github", "line_count": 538, "max_line_length": 104, "avg_line_length": 34.853159851301115, "alnum_prop": 0.5738360620766892, "repo_name": "DanCech/graphite-web", "id": "3c25bc9d9253e569ce86392ab55d38b2d627e1d9", "size"...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ] operations = [ migrations.AddField( model_name='debug', name='state', field=models.Char...
{ "content_hash": "a33a4a47bbc1bf882e327f0237bf5919", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 65, "avg_line_length": 20.77777777777778, "alnum_prop": 0.5775401069518716, "repo_name": "opentrv/ors", "id": "03fa9a010c55cbf72b1264d1a583cc60aaa5a799", "size": "398", "...
import ast from typing import Optional, TYPE_CHECKING from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QComboBox, QTabWidget, QDialog, QSpinBox, QFileDialog, QCheckBox, QLabel, QVBoxLayout, QGridLayout, QLineEdit, QPushBut...
{ "content_hash": "7c034d34630e4a34cbea56f13f2a3fc1", "timestamp": "", "source": "github", "line_count": 565, "max_line_length": 148, "avg_line_length": 47.92920353982301, "alnum_prop": 0.6125553914327917, "repo_name": "pooler/electrum-ltc", "id": "3e9db0f96958432e1268b6f1ef027d970602ec5e", "size": ...
from __future__ import print_function import json import itertools def run_funcs(module_names, run_names, repeat): from .utils.importer import import_object from .utils.timing import timed for i in range(repeat): for m, r in itertools.product(module_names, run_names): func = import_o...
{ "content_hash": "a3210f43a20eb48e9dad3ffdada4b886", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 76, "avg_line_length": 25.602564102564102, "alnum_prop": 0.5658487731597396, "repo_name": "tkf/comparatist", "id": "9b93fc8780bdb00edd7d27be4e8c93f23c9b4902", "size": "1997...
try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') setup( name='polygamy', version='0.1.2', description='Handle multiple SCM repositories easily.', long_d...
{ "content_hash": "3be4ee58d72a279a8f0e20c3f6d00117", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 66, "avg_line_length": 27, "alnum_prop": 0.5725308641975309, "repo_name": "solarnz/polygamy", "id": "ff5d458a2267f8891e13525ee2689c22af7dfea1", "size": "1343", "binary": ...
# Create your views here. from django import forms from django.template import RequestContext from django.http import HttpResponse, HttpResponseRedirect from django.template.loader import get_template from django.core.paginator import Paginator from django.core.urlresolvers import reverse # app specific fi...
{ "content_hash": "86aedef34f252d5a51f94b621975286d", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 67, "avg_line_length": 23.565217391304348, "alnum_prop": 0.6482164821648216, "repo_name": "yokiwhh/bookLab7", "id": "382e340b1cce58d4d00a39d96722d5bf17b98f3a", "size": "162...
from backend.api.base import BaseHandler from backend.common.errors import SchemaError class Handler(BaseHandler): _schema = None def get(self, *args, **kwargs): try: schema, validate = self.validate_schema() if not validate: raise SchemaError(schema.errors) ...
{ "content_hash": "bda5c561d71566b383046bf0c84bbfc5", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 58, "avg_line_length": 27.681818181818183, "alnum_prop": 0.6091954022988506, "repo_name": "alejandrobernardis/python-slot-machines", "id": "86f8395b9a338a6a8c4af2bb6b0aa838b8...
"""Ashier: Template-based scripting for terminal interactions. Ashier is a program that serves the same purpose as expect(1): it helps users script terminal interactions. However, unlike expect, Ashier is programming language agnostic and provides a readable template language for terminal output matching. These featur...
{ "content_hash": "18d7e9cfbe47b206bee847543efb9793", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 71, "avg_line_length": 34.1764705882353, "alnum_prop": 0.7053930005737234, "repo_name": "google/ashier", "id": "9f43cb0acbfa646615b520ee6ae7453dfa46c8a9", "size": "4103", ...
from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_param_LiveProcess', [dirname(__file__)]) except ImportError: import _...
{ "content_hash": "b4b65c6f2acbcc1a1b819177ae7b1e2b", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 137, "avg_line_length": 43, "alnum_prop": 0.694587363655073, "repo_name": "silkyar/570_Big_Little", "id": "15c11f12908fde89202bc2733926a985aac3c012", "size": "5063", "bi...
""" Curious - An async Python 3.6+ library for Discord bots. .. currentmodule:: curious .. autosummary:: :toctree: core commands dataclasses ext.paginator exc util """ from __future__ import generator_stop # enforce generator stop import sys from pkg_resources import Distribu...
{ "content_hash": "a36aca7aba3ad2c1eeccf160f4b83fbe", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 89, "avg_line_length": 33.88135593220339, "alnum_prop": 0.7968984492246123, "repo_name": "SunDwarf/curious", "id": "f91e8bdd2bda3b69f9671a61fccb7c5e06265a75", "size": "2674...
"""System call wrapper. Defines classes that wraps around direct calls via Python's Popen interface. Also, AdbWrapper that wraps around the type of ADB calls that are used by the other scripts. """ import logging import subprocess class SyscallWrapper: """A class that wraps around different modes of doing os syst...
{ "content_hash": "55cdae6526d52fb17e40f38b98d6ab9d", "timestamp": "", "source": "github", "line_count": 445, "max_line_length": 80, "avg_line_length": 30.925842696629214, "alnum_prop": 0.6339921523034443, "repo_name": "android/security-certification-resources", "id": "6df7fd1733470978242b825b56656152...
ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: avi_sslkeyandcertificate author: Gaurav Rastogi (@grastogi23) <[email protected]> short_description: Module for setup of SSLKeyAndCertificat...
{ "content_hash": "2359c004f74c93963ccd862fc78916f2", "timestamp": "", "source": "github", "line_count": 192, "max_line_length": 125, "avg_line_length": 35.135416666666664, "alnum_prop": 0.6019863622887637, "repo_name": "thaim/ansible", "id": "8b96fae24c188cc12b4b1ed1a4e60176b4ca4b97", "size": "7083...
"""Tests For miscellaneous util methods used with share.""" import ddt import mock from manila.common import constants from manila.share import utils as share_utils from manila import test @ddt.ddt class ShareUtilsTestCase(test.TestCase): def test_extract_host_without_pool(self): host = 'Host@Backend' ...
{ "content_hash": "4615e763be4cdccda76e23b930cd25b2", "timestamp": "", "source": "github", "line_count": 196, "max_line_length": 79, "avg_line_length": 40.11734693877551, "alnum_prop": 0.5340200941116622, "repo_name": "bswartz/manila", "id": "cc7f89d2beb1abc653e855f979d5c550d3f78198", "size": "8533"...
"""Wraps toco interface with python lazy loader.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function # We need to import pywrap_tensorflow prior to the toco wrapper. # pylint: disable=invalid-import-order,g-bad-import-order from tensorflow.python import pywra...
{ "content_hash": "1cd26988ceb4414d12c3f7468b6aa54a", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 80, "avg_line_length": 34.85294117647059, "alnum_prop": 0.7358649789029535, "repo_name": "gunan/tensorflow", "id": "2d3357819a43ed54fe9002d2c904d372f341661f", "size": "1874...
from oslo_log import log as logging import trove.common.apischema as apischema from trove.common.auth import admin_context from trove.common.i18n import _ from trove.common import wsgi from trove.extensions.mgmt.upgrade.models import UpgradeMessageSender LOG = logging.getLogger(__name__) class UpgradeController(ws...
{ "content_hash": "19f86b59783aef7b6ad8e1160b2b7d09", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 71, "avg_line_length": 30.083333333333332, "alnum_prop": 0.6583564173591875, "repo_name": "zhangg/trove", "id": "d4eba1944d947199b4edf4c5dbb08a5806447712", "size": "1719", ...
"""Serial algorithm for eigh, employing canonical (fixed trace) purification.""" import functools import jax from jax import lax import jax.numpy as jnp import numpy as np from distla_core.linalg.eigh.serial import purify from distla_core.linalg.polar.serial import polar from distla_core.utils import misc @functool...
{ "content_hash": "2328dc2e402e81f2d6ff4123f7118d70", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 80, "avg_line_length": 32.503937007874015, "alnum_prop": 0.686531007751938, "repo_name": "google/distla_core", "id": "a31144875e458945d7755013c413d700d66dce8d", "size": "4...
""" A collection of fonts and the functions necessary for accessing them. A common problem in drawing libraries is finding and loading fonts. The usual functions for these (in PIL, aggdraw, matplotlib) require a specific single path. If this path is hardcoded in, portability issues can arise. This module solves this p...
{ "content_hash": "9a5e87ba0cc4176f8a5ec2d0db8b98b5", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 79, "avg_line_length": 27.294117647058822, "alnum_prop": 0.6821120689655172, "repo_name": "agapow/relais.webviz", "id": "cd4d21fb967d2a53da0c5363fa8c93a25c4fb19c", "size": ...
from typing import Optional # third party from nacl.signing import VerifyKey # relative from ......grid import GridURL from .....common.serde.serializable import serializable from ....domain_msg_registry import DomainMessageRegistry from ....network_msg_registry import NetworkMessageRegistry from ....node_service imp...
{ "content_hash": "364aab5b6f541f5022773dd969bd61e2", "timestamp": "", "source": "github", "line_count": 155, "max_line_length": 103, "avg_line_length": 36.52258064516129, "alnum_prop": 0.6963434022257552, "repo_name": "OpenMined/PySyft", "id": "9f770d00f5ad5b3bac8c0427e0d862a2e79409fa", "size": "56...
from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import * from unittest import TestCase from ... import SpannerModelRegistry from .helper import TestModelA, TestModelB, TestModelC, TestModelD class SpannerModelTests(TestCase): def test_get_registered_model...
{ "content_hash": "ee5897e61f2e32c0ecd88c8fabdd673b", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 173, "avg_line_length": 39.696969696969695, "alnum_prop": 0.6706106870229007, "repo_name": "AndreCimander/ezspanner", "id": "993d314487ef506d32154f9670815e9ddaee44fb", "siz...
from django.core.exceptions import PermissionDenied from django.http import HttpResponseBadRequest, JsonResponse from django.shortcuts import get_object_or_404, render from django.template.loader import render_to_string from django.utils.encoding import force_text from django.views.decorators.http import require_POST f...
{ "content_hash": "82e62d074bb15222764d8da7991c28ee", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 116, "avg_line_length": 34.30246913580247, "alnum_prop": 0.6149001259672485, "repo_name": "nealtodd/wagtail", "id": "bd2740f16a7f9fc37b365439f7d9ab61aa28c4f9", "size": "55...
from __future__ import annotations from typing import TYPE_CHECKING, Optional import logging import math from ezdxf.math import Vec2, UCS, NULLVEC from ezdxf.lldxf import const from ezdxf.entities import DimStyleOverride, Dimension from .dim_base import ( BaseDimensionRenderer, get_required_defpoint, compi...
{ "content_hash": "491e956a8c9d85c13ced9b07f34b11d4", "timestamp": "", "source": "github", "line_count": 207, "max_line_length": 80, "avg_line_length": 37.729468599033815, "alnum_prop": 0.6261203585147247, "repo_name": "mozman/ezdxf", "id": "e534d69d196b18b4c26ef6fb440e5a03dd24af76", "size": "7875",...
import _plotly_utils.basevalidators class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="box", **kwargs): super(IdssrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_typ...
{ "content_hash": "63269a90acfd3d5bd0a2918dbf1cfa46", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 74, "avg_line_length": 35.916666666666664, "alnum_prop": 0.5986078886310905, "repo_name": "plotly/python-api", "id": "cb8e8d0141a5f394bab4487ab27a14edd3bf7425", "size": "43...
"""Signing Model Objects This module contains classes that encapsulate data about the signing process. """ import os.path class CodeSignedProduct(object): """Represents a build product that will be signed with `codesign(1)`.""" def __init__(self, path, identifier, ...
{ "content_hash": "a3bab1e920cdd6c49f4984337ab9aea0", "timestamp": "", "source": "github", "line_count": 357, "max_line_length": 80, "avg_line_length": 39.15126050420168, "alnum_prop": 0.5966945696501396, "repo_name": "ric2b/Vivaldi-browser", "id": "efb25b8bf1b8edb4ba156733a74959735b4d8141", "size":...
master_doc = "index" project = "variadic" author = '<a href="http://vincent-jacques.net/contact">Vincent Jacques</a>' copyright = ('2015 {} <script>var jacquev6_ribbon_github="{}"</script>'.format(author, project) + '<script src="https://jacquev6.github.io/ribbon.js"></script>') extensions = [] nitpicky ...
{ "content_hash": "1be5bd45aa65c1f303ff4b41459017b6", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 97, "avg_line_length": 25.51063829787234, "alnum_prop": 0.7114261884904087, "repo_name": "jacquev6/variadic", "id": "baeffbbafa175b1bff3d34a873364cff1d363b2f", "size": "128...
import tensorflow as tf import numpy as np def conv_relu(input, kernel_shape, bias_shape): # Create variable named "weights". weights = tf.get_variable("weights", kernel_shape, initializer=tf.random_normal_initializer()) # Create variable named "biases". biases = tf.get_variable("biases", bias_...
{ "content_hash": "c437fd73a13e0703c7b694615a42bb7e", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 104, "avg_line_length": 31.53012048192771, "alnum_prop": 0.703859380970577, "repo_name": "utensil/julia-playground", "id": "7312bac4331218a9842215f9a1caa9c0f6736102", "size...
ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'network'} DOCUMENTATION = r''' --- module: nxos_pim_interface extends_documentation_fragment: nxos version_added: "2.2" short_description: Manages PIM interface configuration. description: -...
{ "content_hash": "544259c94bb0d6cd20e3f7f90c5833e1", "timestamp": "", "source": "github", "line_count": 516, "max_line_length": 100, "avg_line_length": 34.87984496124031, "alnum_prop": 0.5718413157017447, "repo_name": "SergeyCherepanov/ansible", "id": "227f2179b6d9c199af56e22e29358537a6e89d53", "si...
+++ src/cryptography/hazmat/bindings/openssl/engine.py @@ -49,7 +49,6 @@ int ENGINE_init(ENGINE *); int ENGINE_finish(ENGINE *); void ENGINE_load_openssl(void); void ENGINE_load_dynamic(void); -void ENGINE_load_cryptodev(void); void ENGINE_load_builtin_engines(void); void ENGINE_cleanup(void); ENGINE *ENGINE_get_...
{ "content_hash": "c6869cd0396cfdb2172078674d71e35a", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 54, "avg_line_length": 37.666666666666664, "alnum_prop": 0.7345132743362832, "repo_name": "radare/void-packages", "id": "9f05a871fad1f8c96bdd6a56138cdeab7c1aaec3", "size": "...
from haystack import indexes from .models import Ruling class RulingIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) file_reference = indexes.CharField(model_attr='file_reference') date = indexes.DateTimeField(model_attr='date', null=True) cou...
{ "content_hash": "f085dc1b4a25437c783b3eec7b750552", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 77, "avg_line_length": 37.77272727272727, "alnum_prop": 0.7184115523465704, "repo_name": "netzwerkrecherche/auskunftsrecht", "id": "2423c408d9b10b024477df4eba3c260d25f5a5f4",...
import harvestmedia from harvestmedia.api.config import Config from harvestmedia.api.library import Library from harvestmedia.api.client import Client api_key = 'e1d5d645d2d984e499e816a7a314dfbd610149f124c3373455c37ad75ab3ffccf444a04a10953b62' webservice_url = 'https://service.harvestmedia.net/HMP-WS.svc' client = Cl...
{ "content_hash": "89cd9efb567e47b5caac968b6bfef534", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 92, "avg_line_length": 28.5, "alnum_prop": 0.7929824561403509, "repo_name": "ralfonso/harvestmedia", "id": "4e9c23668c28a6dc1f04f9205f37ad0e0f2a634d", "size": "570", "bin...
from functools import wraps from flask import request, Response, current_app def check_auth(username, password, roles): valid_user = current_app.config.get('admin_user') valid_pass = current_app.config.get('admin_pass') if valid_user is None and valid_pass is None: return True # no auth user...
{ "content_hash": "790b22d602ea94fb7c04e75c24b1b12f", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 62, "avg_line_length": 27.5, "alnum_prop": 0.5716363636363636, "repo_name": "rcbops/opencenter", "id": "f00ea439edc8ff2dac2fe541869495cde4e92254", "size": "2683", "binary...
import datetime import pytz import web import config db = web.database(dbn='sqlite', db='dp.sqlite') # ================================================================= # datetime def current_time(): return datetime.datetime.now(pytz.utc) def local_time(): return datetime.datetime.now(config.tz) def in...
{ "content_hash": "0a5bd8be850403f10bb9e4bbfef231ad", "timestamp": "", "source": "github", "line_count": 400, "max_line_length": 195, "avg_line_length": 31.9975, "alnum_prop": 0.5423079928119384, "repo_name": "homey1337/efnpractice", "id": "faabcc00c018f12465816ed939119c6b93a91ca9", "size": "12799",...
import os # from global_settings import PROJECT_PATH # Uncomment to put the application in non-debug mode. This is useful # for testing error handling and messages. DEBUG = False TEMPLATE_DEBUG = DEBUG # Override this to match the application endpoint FORCE_SCRIPT_NAME = '' # Non-restricted email port for developmen...
{ "content_hash": "bee4cbbfb3bae99680aed9ab06c8c93e", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 85, "avg_line_length": 29.127659574468087, "alnum_prop": 0.747991234477721, "repo_name": "glabilloy/fabrydb", "id": "d8c9ba372ff1a896209ecf9da8bb4196e6ca7db1", "size": "136...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('foirequest', '0023_remove_foimessage_is_postal'), ] operations = [ migrations.RemoveField( model_name='foimessage', name='or...
{ "content_hash": "7a7fa798d499aaccbd262b40d303254f", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 278, "avg_line_length": 33.40909090909091, "alnum_prop": 0.5795918367346938, "repo_name": "stefanw/froide", "id": "9e0fdffd41a49c291ce29c17da3e3c80a71b25e9", "size": "809",...
discord_bot_token = 'YOUR DISCORD BOT TOKEN' bot_description = 'ENTER THE BOT DESCRIPTION HERE' discord_channel = '' # Channel on which you want to post the videos # (in Discord -> Dev Mode activated, right click on channel and copy ID yt_api_key = 'ENTER YOUR YT API KEY HERE' # Add the Channel ID here (as part of ...
{ "content_hash": "fa7aa9919d6c6895f3ddb6e20c2c6f5e", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 74, "avg_line_length": 34.23809523809524, "alnum_prop": 0.6258692628650904, "repo_name": "Projekt95/Discord-YT-Checker", "id": "c6b9ea1bd06e8fe43c584f714c0fe449edc96c13", "...
import curses class Colors(object): def register(self): """Registers curses color pairs for later usage""" # Header curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK) # Selected Menu Entry curses.init_pair(2, curses.COLOR_GREEN, curses.COLOR_BLACK) def color_h...
{ "content_hash": "5743d7eefecf60f859d07a44cbd56dd5", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 79, "avg_line_length": 29.85, "alnum_prop": 0.6549413735343383, "repo_name": "omgwtflaserguns/matomatpy", "id": "feb28ab0d91c6e33ab9e2af67feedc85d8408da9", "size": "597", ...
"""Virtual filesystem module based on pyfsntfs.""" import stat from typing import Any, Callable, Dict, Iterable, Optional, Text, Type import pyfsntfs from grr_response_client import client_utils from grr_response_client.vfs_handlers import base as vfs_base from grr_response_core.lib import rdfvalue from grr_response...
{ "content_hash": "ef347db7528f0a599f9a2a28d244a778", "timestamp": "", "source": "github", "line_count": 251, "max_line_length": 137, "avg_line_length": 36.91235059760956, "alnum_prop": 0.6700485698866703, "repo_name": "google/grr", "id": "779e4c457ab06829185cfb516c1a84b32d55cded", "size": "9287", ...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('stateInfo', '0003_auto_20151006_1818'), ] operations = [ migrations.AlterField( model_name='county', name='state', ...
{ "content_hash": "8ba392425d1f7f0d76110adcb10a5ddd", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 69, "avg_line_length": 22.789473684210527, "alnum_prop": 0.5935334872979214, "repo_name": "antoineclaval/ruralpowerproject", "id": "ff21df5a48b702ebc49140674e33e911ce2b0a23",...
class ParserError(Exception): pass class ParserJSONLoadingError(ParserError): def __init__(self, json_decode_error): self.json_decode_error = json_decode_error self.msg = 'Failed Loading Scenario JSON\n' + \ str(json_decode_error) class ParserJSONValidationError(ParserErro...
{ "content_hash": "675efb733b5a965e4cbb15bad9d8ad6e", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 55, "avg_line_length": 30.6, "alnum_prop": 0.6710239651416122, "repo_name": "shlomihod/scenario", "id": "f2f0623a363a4c1e540d24bfbd9318095854a94e", "size": "459", "binary...
from util import crypto from util import time_ from util import urls TOKEN_EXPIRY_SECS = 60 * 60 * 24 * 7 # 1 week def generate_unsubscribe_url(email): token = generate_email_token(email) return urls.absurl(urls.append_params('/reminder/unsubscribe', dict( email=email, token=token))) def verify_emai...
{ "content_hash": "901771b6d1916aae913e9b5f7c669ed4", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 76, "avg_line_length": 30.925925925925927, "alnum_prop": 0.6550898203592814, "repo_name": "jlgoldman/writetogov", "id": "e8cbdc641ab7bd65b82b0850b7b2a282d31cec3a", "size": ...
import maya.cmds as cmds import tempfile import base64 import os from maya.app.general.mayaMixin import MayaQWidgetDockableMixin import maya.OpenMayaUI as OpenMayaUI import PySide2.QtCore as QtCore import PySide2.QtGui as QtGui import PySide2.QtWidgets as QtWidgets import shiboken2 import mtoa.ui.arnoldmenu as arnoldm...
{ "content_hash": "d8f10337d5d50e16dc73d9426abe439b", "timestamp": "", "source": "github", "line_count": 225, "max_line_length": 108, "avg_line_length": 33.39111111111111, "alnum_prop": 0.6261147344602689, "repo_name": "wgergely/After-Effects", "id": "e528050cf3e7f5fe145d3aebae1b89c3b9d30a23", "size...
try : # standard lib import os import importlib import socket import signal from datetime import datetime from io import StringIO import tornado.gen import sys import time import json import pprint from bson.son import SON from time import sleep import request...
{ "content_hash": "ee23582cfcce8018fe5d8ca56886793a", "timestamp": "", "source": "github", "line_count": 829, "max_line_length": 134, "avg_line_length": 33.635705669481304, "alnum_prop": 0.43426337684693733, "repo_name": "chromatic-universe/cci-stream-mta", "id": "7c17e5ee92eda6766e031009855fdf83ee157...
""" gettext for openstack-common modules. Usual usage in an openstack.common module: from payloadvoice.openstack.common.gettextutils import _ """ import copy import gettext import logging import os import re try: import UserString as _userString except ImportError: import collections as _userString from...
{ "content_hash": "d38c7750f5f3e587601aab94b756f74c", "timestamp": "", "source": "github", "line_count": 347, "max_line_length": 79, "avg_line_length": 34.97982708933718, "alnum_prop": 0.5958971824023727, "repo_name": "kickstandproject/payload-voice", "id": "5fc5b74544c45b660e3a7dec4fcf075935a2bf66", ...
""" util.py holds functions used in more than one module. NOTE: this code is uploaded to emr with mrjobs """ import cPickle import functools import boto.s3 from boto.exception import S3ResponseError from sherlock.common.aws import get_boto_creds class memoized(object): """Decorator that caches a function's retu...
{ "content_hash": "1a115018971389d2ddbc7a7ec650427c", "timestamp": "", "source": "github", "line_count": 140, "max_line_length": 96, "avg_line_length": 30.085714285714285, "alnum_prop": 0.6103988603988604, "repo_name": "Yelp/mycroft", "id": "b945c9c15b79ca0634d28c5d90501af63dd4bb46", "size": "4236",...
from PySide import QtCore, QtGui class TabDialog(QtGui.QDialog): def __init__(self, fileName, parent=None): super(TabDialog, self).__init__(parent) fileInfo = QtCore.QFileInfo(fileName) tabWidget = QtGui.QTabWidget() tabWidget.addTab(GeneralTab(fileInfo), "General") tabWi...
{ "content_hash": "7e16c3af756a823bc4228835393c7e27", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 101, "avg_line_length": 34.140127388535035, "alnum_prop": 0.6675373134328358, "repo_name": "pauloacmelo/papelex_winthor", "id": "635b738c7dbfa39acaa10abd540aa5e4b09ffb5f", ...
import urllib.request import urllib.parse import json as j import sys __version__ = 0.242 def query(query, useragent='python-duckduckgo '+str(__version__), safesearch=True, html=False, meanings=True, **kwargs): """ Query DuckDuckGo, returning a Results object. Here's a query that's unlikely to change: ...
{ "content_hash": "09e34686f383fda1d26429119074de63", "timestamp": "", "source": "github", "line_count": 176, "max_line_length": 120, "avg_line_length": 30.869318181818183, "alnum_prop": 0.5766611448555126, "repo_name": "haitaka/DroiTaka", "id": "8769347b4880035c0ef624a8eab36276a07cd1fa", "size": "5...
import os import asyncio from rainfall.web import Application, HTTPHandler, WSHandler from rainfall.http import HTTPError class HelloHandler(HTTPHandler): def handle(self, request): return 'Hello!' class TemplateHandler(HTTPHandler): def handle(self, request): return self.render('base.htm...
{ "content_hash": "a169fea01cb09c24da1cb868605a534a", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 74, "avg_line_length": 19.574074074074073, "alnum_prop": 0.6234626300851467, "repo_name": "mind1master/rainfall", "id": "8422e514cdb78367d766c7652580eb3f41aaabca", "size":...
import itertools import os import shutil import struct import tempfile import uuid from oslo_config import cfg from oslo_log import log as oslo_logging from cloudbaseinit import exception from cloudbaseinit.metadata.services.osconfigdrive import base from cloudbaseinit.osutils import factory as osutils_factory from c...
{ "content_hash": "594081cd298c769a931c8e695ba809d1", "timestamp": "", "source": "github", "line_count": 205, "max_line_length": 78, "avg_line_length": 38.38048780487805, "alnum_prop": 0.5644382308083375, "repo_name": "cmin764/cloudbase-init", "id": "80124421cded81eeff7c4346b9d762501e03bce2", "size"...
import unittest from unittest import mock from unittest.mock import patch from canvas_sdk.client import RequestContext class TestRequestContext(unittest.TestCase): longMessage = True def setUp(self): patcher = patch.object(RequestContext, 'get_default_headers') self.auth_token = 'my-auth-toke...
{ "content_hash": "abbef18c0d1219870c6b05e2627823a5", "timestamp": "", "source": "github", "line_count": 318, "max_line_length": 130, "avg_line_length": 51.39622641509434, "alnum_prop": 0.6685022026431718, "repo_name": "penzance/canvas_python_sdk", "id": "660e5be240b0d893345b16a58777753eb247bf34", "...
from django.apps import AppConfig class DemoConfig(AppConfig): name = 'tests.testapp'
{ "content_hash": "822f9f2620629f42ea96f9da8e126665", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 33, "avg_line_length": 18.4, "alnum_prop": 0.75, "repo_name": "raphaelm/django-hierarkey", "id": "548e8e31640722a5febad3978659d56216c27bd2", "size": "92", "binary": false,...
""" Performs cartographic transformations (converts from longitude,latitude to native map projection x,y coordinates and vice versa) using PROJ (https://proj.org). A Proj class instance is initialized with proj map projection control parameter key/value pairs. The key/value pairs can either be passed in a dictionary, ...
{ "content_hash": "c4e8e4c09b0056b0f1d470a0752bcd65", "timestamp": "", "source": "github", "line_count": 299, "max_line_length": 85, "avg_line_length": 37.64882943143812, "alnum_prop": 0.5930532113351692, "repo_name": "ocefpaf/pyproj", "id": "c4f1041b7132cf2d540d08e19eef8836d32d3007", "size": "11257...
import os import io # Import maras libs try: from maras import __version__ except ImportError: from __init__ import __version__ # Import third party libs import msgpack class IndexException(Exception): pass class IndexNotFoundException(IndexException): pass class ReindexException(IndexException)...
{ "content_hash": "3e69478b87accc07df2aac6bf62fe508", "timestamp": "", "source": "github", "line_count": 182, "max_line_length": 80, "avg_line_length": 23.318681318681318, "alnum_prop": 0.5721017907634307, "repo_name": "thatch45/maras_old", "id": "1e3c6d7ef9673c2f7dc5dea6b6dcbd69bd5822c2", "size": "...
class JobQueue: def read_data(self): self.num_workers, m = map(int, input().split()) self.jobs = list(map(int, input().split())) assert m == len(self.jobs) def write_response(self): for i in range(len(self.jobs)): print(self.assigned_workers[i], self.start_ti...
{ "content_hash": "a789593bf595b5dcce03688029b5bb69", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 98, "avg_line_length": 32.333333333333336, "alnum_prop": 0.5609965635738832, "repo_name": "supermikol/coursera", "id": "9c664f8085e0c247797288ed0df7bab20bcda602", "size": "...
r"""Contains functionality for making meteorological plots.""" import logging # Trigger matplotlib wrappers from . import _mpl # noqa: F401 from ._util import add_metpy_logo, add_timestamp, add_unidata_logo, convert_gempak_color from .ctables import * # noqa: F403 from .declarative import * # noqa: F403 from .skew...
{ "content_hash": "a3f54b05ca333320317309fbf473ebc6", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 88, "avg_line_length": 43.407407407407405, "alnum_prop": 0.7133105802047781, "repo_name": "ahaberlie/MetPy", "id": "57694f9eebabeddb0b185c9f80a89520828126b4", "size": "1325...
import click @click.group("veros") @click.version_option() def cli(): """Veros command-line tools""" pass
{ "content_hash": "bc28d1c45a9058290920fb9e63b65d0b", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 34, "avg_line_length": 14.5, "alnum_prop": 0.646551724137931, "repo_name": "dionhaefner/veros", "id": "c75964a98aca21c9e57b404ac76095de440a9bdd", "size": "116", "binary": ...
import re from typing import List, Dict, Tuple, Optional from pywikibot import Site from service.ws_re.register._typing import AuthorDict, CrawlerDict from tools import fetch_text_from_wiki_site TRANS_DICT = str.maketrans({"[": "", "]": "", "'": ""}) class AuthorCrawler: _SIMPLE_REGEX_MAPPING = re.compile(r"\[...
{ "content_hash": "e14357ffaf7947ab789b52eaf34a008d", "timestamp": "", "source": "github", "line_count": 155, "max_line_length": 91, "avg_line_length": 39.78064516129032, "alnum_prop": 0.5527084009082063, "repo_name": "the-it/WS_THEbotIT", "id": "d3ca362009466c15ef7f6d2014b92b9a2441c9d5", "size": "6...
from __future__ import print_function, absolute_import import subprocess import unittest import os import sys import time from .util import ShellProcess _ROOT = os.path.dirname(os.path.realpath(__file__)) def here(*x): return os.path.join(_ROOT, *x) class ShellSpoutTester(unittest.TestCase): @classmethod ...
{ "content_hash": "85377d0f88a44fc629969e4daff10bdf", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 74, "avg_line_length": 29.98780487804878, "alnum_prop": 0.5811305408702725, "repo_name": "thedrow/streamparse", "id": "876fa711337b7a2116455ac79dd8cc8d6a8cc51b", "size": "2...
import unittest from moveit_ros_visualization.moveitjoy_module import MoveitJoy import rospy import rostest import os _PKGNAME = 'moveit_ros_visualization' _NODENAME = 'test_moveit_joy' class TestMoveitJoy(unittest.TestCase): def __init__(self, *args, **kwargs): super(TestMoveitJoy, self).__init__(*args,...
{ "content_hash": "47887c820f068ffa68fd5936b3721ef1", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 84, "avg_line_length": 33.625, "alnum_prop": 0.701363073110285, "repo_name": "davetcoleman/moveit", "id": "b3974e8e52f32b5a31dd4804e495b5e7a47c3b7e", "size": "2522", "bin...
""" Created on Mar 18, 2012 """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "Mar 18, 2012" import os import unittest import warnings from pymatgen.apps.borg.hive import VaspToComput...
{ "content_hash": "f999048da04b1bbe49227967b00ec5b7", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 86, "avg_line_length": 25.813953488372093, "alnum_prop": 0.6693693693693694, "repo_name": "gmatteo/pymatgen", "id": "55c9206bfe776093f4b963b2b14a90d5d61ec261", "size": "122...
""" This example script demonstrates pySBOL's API for genetic design automation. A multi-level abstraction hierarchy is assembled and recursively compiled into a target sequence. """ from sbol import * setHomespace('http://sys-bio.org') doc = Document() doc.displayId = 'example' doc.name = 'example' doc.description =...
{ "content_hash": "6d0590ebe5d32331937a9a343684cf8f", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 182, "avg_line_length": 30.130434782608695, "alnum_prop": 0.7662337662337663, "repo_name": "SynBioDex/pySBOL", "id": "83788e363a817f03919031828b0badac3240b267", "size": "13...
from django.forms import Select from django.utils.functional import lazy from wagtail.wagtailcore.models import Site from .client import Client class ApiSelect(Select): def __init__(self, attrs=None, **kwargs): super(ApiSelect, self).__init__(attrs, ()) self.choices = lazy(self._get_choices, tupl...
{ "content_hash": "a9b5462f787221bf075322515be57ba9", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 70, "avg_line_length": 31.403846153846153, "alnum_prop": 0.5995101041028781, "repo_name": "apihackers/wagtail-sendinblue", "id": "b376b686895cf7c73dd5be3e8035557793dfe234", ...
from ._models_py3 import ApiKey from ._models_py3 import ApiKeyListResult from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import ConfigurationStore from ._models_py3 import ConfigurationStoreListResult from ._models_py3 import ConfigurationStoreUpdateParameters from ._models_py3 import Delete...
{ "content_hash": "9f641896bf2e913044118d9d11be898b", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 78, "avg_line_length": 33.95145631067961, "alnum_prop": 0.7760937946811552, "repo_name": "Azure/azure-sdk-for-python", "id": "95fdfb0529b8f8eeef74b2367c7b2c48075c3e35", "s...
import mock from oslo_serialization import jsonutils from nailgun import consts from nailgun import objects from nailgun.test.base import BaseMasterNodeSettignsTest from nailgun.test.base import fake_tasks from nailgun.utils import reverse class TestStatsUserTaskManagers(BaseMasterNodeSettignsTest): @fake_task...
{ "content_hash": "40eeb79913d8a33e5d6249f0b42499f4", "timestamp": "", "source": "github", "line_count": 232, "max_line_length": 78, "avg_line_length": 38.05603448275862, "alnum_prop": 0.5469475591799751, "repo_name": "eayunstack/fuel-web", "id": "959d29d42ab5f9b143147f6bc75a9b041118be1f", "size": "...
from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union, cast from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import...
{ "content_hash": "1448941a6e75b9cfad5512445f21619a", "timestamp": "", "source": "github", "line_count": 1625, "max_line_length": 733, "avg_line_length": 46.162461538461535, "alnum_prop": 0.6460793985122777, "repo_name": "Azure/azure-sdk-for-python", "id": "8f11eb857ad5d866ca78505136f1196affee32bf", ...
"""autogenerated by genpy from emotiv_epoc/EEGFrame.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import std_msgs.msg class EEGFrame(genpy.Message): _md5sum = "92a93661fa971fb7494f0877c88d2361" _type = "emotiv_epoc/EEGFrame" _has_header = Tru...
{ "content_hash": "30625d24759512c55bba92ff3ad2daec", "timestamp": "", "source": "github", "line_count": 295, "max_line_length": 145, "avg_line_length": 34.284745762711864, "alnum_prop": 0.600751433656318, "repo_name": "kaaninan/Centauri", "id": "1fd45cc3e42e63e8e492f795d52f32b0bac87863", "size": "1...
import datetime import os import sys import sphinx_bootstrap_theme sys.path.insert(0, os.path.abspath(os.path.join('..', '..', 'src'))) import dnutils sys.path.insert(0, os.path.abspath(os.path.join('..', '%s' % dnutils.version.__basedir__))) def setup(app): app.add_css_file('default.css') # may also be an UR...
{ "content_hash": "3526373e2be13b93230497ae96e0c6dc", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 91, "avg_line_length": 29.398692810457515, "alnum_prop": 0.6658514895509116, "repo_name": "danielnyga/dnutils", "id": "cc9a718b8d2c0b3e2f00c705bbd2c828b23cccb6", "size": "...
def is_list_or_tuple(obj, length = None, min_length = None, obj_type = None): ''' >>> is_list_or_tuple([1,2]) >>> is_list_or_tuple((1,2)) >>> is_list_or_tuple('asdf') Traceback (most recent call last): ... AssertionError: asdf is expected to be a list or tuple, but it is <type 'str'> ...
{ "content_hash": "10e5ccd907c2b736c917210de9e3d644", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 139, "avg_line_length": 46.53333333333333, "alnum_prop": 0.6031518624641834, "repo_name": "theorm/ellison", "id": "b78017a94562482f66d4a3a5981ffad9779e1a93", "size": "2094"...
from PyQt5.QtWidgets import QWidget from PyQt5.QtGui import QPainter, QColor, QPolygon from PyQt5.QtCore import QPoint, QRect, QSize class Ksztalty: """ Klasa pomocnicza, symuluje typ wyliczeniowy """ Rect, Ellipse, Polygon, Line = range(4) class Ksztalt(QWidget): """ Klasa definiująca widget do rysowan...
{ "content_hash": "84b1a97581d32f3340a5ad328f812a06", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 71, "avg_line_length": 30.746031746031747, "alnum_prop": 0.6159008776458441, "repo_name": "koduj-z-klasa/python101", "id": "47a6ca85c04d086f0709a5151991668cb81b8f80", "size...
""" Wrapper functions that will manage the creation of the objects, build the configuration, and execute the algorithm required to optimise a set of ctrl pulses for a given (quantum) system. The fidelity error is some measure of distance of the system evolution from the given target evolution in the time allowed for th...
{ "content_hash": "aff2b789f2074f409955ef11d72d4138", "timestamp": "", "source": "github", "line_count": 1875, "max_line_length": 79, "avg_line_length": 42.086933333333334, "alnum_prop": 0.6573568360092761, "repo_name": "qutip/qutip", "id": "05268f521542448a224b6368bd501785f226376f", "size": "79107"...
"""Unit tests for SerializedDagModel.""" import unittest from airflow import DAG, example_dags as example_dags_module from airflow.models import DagBag from airflow.models.dagcode import DagCode from airflow.models.serialized_dag import SerializedDagModel as SDM from airflow.serialization.serialized_objects import Se...
{ "content_hash": "63a3ba59c7a4a39a7b404e95ce294d29", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 109, "avg_line_length": 41.06015037593985, "alnum_prop": 0.637062809009339, "repo_name": "sekikn/incubator-airflow", "id": "db8282f943f7b0499db3a8ca87a9b465883f24a7", "siz...
"""Description: Call peaks from two wiggle file, one for treatment and one for control. Copyright (c) 2010 Tao Liu <[email protected]> This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file COPYING included with the distribution). @status: experi...
{ "content_hash": "3b77ae4a065f9bdfff4d44f088009355", "timestamp": "", "source": "github", "line_count": 242, "max_line_length": 161, "avg_line_length": 33.247933884297524, "alnum_prop": 0.5753169276659209, "repo_name": "taoliu/taolib", "id": "735f35bebb54cb8bc6afe07fe68825d3bd450e22", "size": "8113...
""" Random Value Property with Sleep This application is a server of analog value objects that return a random number when the present value is read. This version has an additional 'sleep' time that slows down its performance. """ import os import random import time from bacpypes.debugging import bacpypes_debugging...
{ "content_hash": "446c75ca8572b71c992b8c3eae10be56", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 146, "avg_line_length": 27.83582089552239, "alnum_prop": 0.6798927613941019, "repo_name": "JoelBender/bacpypes", "id": "0f9cf3de59409d3b58369988fd75635d768436e1", "size": ...
from csv2_common import check_keys, requests, show_active_user_groups, show_table, verify_yaml_file from subprocess import Popen, PIPE import filecmp import os KEY_MAP = { '-gn': 'group_name', '-go': 'group_option', '-SU': 'is_superuser', '-ucn': 'cert_cn', '-un': 'username', '-upw': ...
{ "content_hash": "433219c3013e27d5adda29a738cd152d", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 141, "avg_line_length": 25.483333333333334, "alnum_prop": 0.5275779376498801, "repo_name": "hep-gc/cloudscheduler", "id": "333f49f29e8063f2d2856182bcaa52b79ca8c181", "size...
from urllib.request import urlopen from random import randint def wordListSum(wordList): sum = 0 for word, value in wordList.items(): sum += value return sum def retrieveRandomWord(wordList): randIndex = randint(1, wordListSum(wordList)) for word, value in wordList.items(): randIndex...
{ "content_hash": "06cf92a2a76fbfc365747ed644d2ed41", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 76, "avg_line_length": 34.08163265306123, "alnum_prop": 0.6119760479041916, "repo_name": "Danceiny/HackGirlfriend", "id": "9af3b17ea6d1782e11b0b0ffe49f6892bb0658ad", "size"...
import os from supriya.tools.servertools.ServerObjectProxy import ServerObjectProxy class BufferGroup(ServerObjectProxy): r'''A buffer group. :: >>> server = servertools.Server().boot() :: >>> buffer_group = servertools.BufferGroup(buffer_count=4) >>> buffer_group <Buff...
{ "content_hash": "adffb8b46f991dc5814d55b31f53f8d3", "timestamp": "", "source": "github", "line_count": 246, "max_line_length": 76, "avg_line_length": 24.23170731707317, "alnum_prop": 0.5192081865458815, "repo_name": "andrewyoung1991/supriya", "id": "dbaf204f8923643f1f937839d127d8fc29921dde", "size...
import re import json import urwid from api import Api from helper import Helper class State(object): def __init__(self): # Api calls self.api = Api() # Save temporary data for quick opening (open <index> command) self.current_threads = {'board': None, 'list': []} # JSON...
{ "content_hash": "a64e197cae8b28c3bcb50abd82051fa6", "timestamp": "", "source": "github", "line_count": 255, "max_line_length": 148, "avg_line_length": 42.21176470588235, "alnum_prop": 0.5177443329617243, "repo_name": "gimu/chancli", "id": "0eefe2306fb479201c275206c3178881a2478467", "size": "10787"...
"""An auto-roller for GN binaries into Chromium. This script is used to update the GN binaries that a Chromium checkout uses. In order to update the binaries, one must follow four steps in order: 1. Trigger try jobs to build a new GN binary at tip-of-tree and upload the newly-built binaries into the right Google C...
{ "content_hash": "73b1c0bf1f4ee2133afdbd63548a5583", "timestamp": "", "source": "github", "line_count": 384, "max_line_length": 80, "avg_line_length": 30.84375, "alnum_prop": 0.5972644376899696, "repo_name": "lihui7115/ChromiumGStreamerBackend", "id": "ab85886a0b67513c2f868117da7284c833ae36d8", "si...
from tkinter import * import time import random SLEEP_TIME = 0.01 PADDLE_SPEED = [20, 10] BALL_SPEED = [1, 3] # Model for the Ball class # canvas is the tkinter current canvas # color is the color of the ball # paddle_pos is the current position of the paddle # speed [x, y] is the absolute speed of the ball class Bal...
{ "content_hash": "1b418b71d1f6d7c3b84a4db7c49b8b12", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 157, "avg_line_length": 35.16564417177914, "alnum_prop": 0.5767620376831821, "repo_name": "VictaLab/victalab_cpsc", "id": "7965ac03ab68c24f46031994471f3b357a5c06c5", "size...
import os import subprocess import re import sys import Locate import DomainLookup def Connections(connection_type): #Find Locations of users that are logged in cmd = ['pinky'] #try to run the pinky command cmd2 = ['who'] #if pinky fails run who command if (connection_type == 'ip'): #if the user is looking...
{ "content_hash": "1a30943ba460fd13517b8ea3bcdd48f3", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 96, "avg_line_length": 35.191489361702125, "alnum_prop": 0.6088270858524788, "repo_name": "NickTGraham/PythonPack", "id": "e501af7cd07bbc2135c92f1c008f5def67472c75", "size"...
''' This script is intended to evaluate dataset using SVM and 10-folds cross validation ''' import collections import csv import datetime import json import os import random import re import sys import time as t import nltk import nltk.classify from nltk.metrics import scores from sklearn.svm import LinearSVC from m...
{ "content_hash": "0ec8a4fa2e37ed193b030c351fab47a5", "timestamp": "", "source": "github", "line_count": 132, "max_line_length": 171, "avg_line_length": 36.93181818181818, "alnum_prop": 0.6703589743589744, "repo_name": "dwiajik/twit-macet-mining-v3", "id": "b654009048b396901d66a46f8a6d221dd342babb", ...
from ctypes import c_double import nidaqmx import numpy as np from nidaqmx.constants import AcquisitionType, TerminalConfiguration from nidaqmx.stream_readers import AnalogMultiChannelReader from nidaqmx._task_modules.read_functions import _read_analog_f_64 from toon.input.device import BaseDevice class ForceKeyboar...
{ "content_hash": "2f16c93d41dec4f8d4982e396ef969b4", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 86, "avg_line_length": 32.945945945945944, "alnum_prop": 0.5918785890073831, "repo_name": "aforren1/toon", "id": "e6968e87edf671d541c3529fb138287a75f080c6", "size": "2438",...
import os import sys g_cur_file = os.path.realpath(__file__) g_cur_dir = os.path.dirname(g_cur_file) XCODE_DIR="/Applications/Xcode.app/Contents/Developer" DST_DIR = os.path.join(g_cur_dir, "../prebuilt-with-ssl/iOS") DST_DIR = os.path.realpath(DST_DIR) CURL_DIR = os.path.join(g_cur_dir, "../curl") CURL_DIR = os.pa...
{ "content_hash": "3f9e0709f5f68f42837a416b810eb745", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 175, "avg_line_length": 30.100719424460433, "alnum_prop": 0.6771032504780115, "repo_name": "sundayliu/curl-android-ios", "id": "a9ca04c602f61e1757ae094bb7e2f0f54df3592b", ...
from typing import Any, Dict, List, Set, Union, TYPE_CHECKING from typing import cast as typecast from ..common import EnvoyRoute from ...cache import Cacheable from ...ir.irhttpmappinggroup import IRHTTPMappingGroup from ...ir.irbasemapping import IRBaseMapping from .v2ratelimitaction import V2RateLimitAction if TY...
{ "content_hash": "9b369edbe70b87e905f74ed8c26cf964", "timestamp": "", "source": "github", "line_count": 644, "max_line_length": 161, "avg_line_length": 40.92701863354037, "alnum_prop": 0.5440679895283985, "repo_name": "datawire/ambassador", "id": "6f397d9053b225c926429f9119a9582845bbfd22", "size": ...
import time import kbhit import os import sys import signal import subprocess """ call menu.example() for an example USAGE: menu.unbuffer_stdin() for normal menu operation, menu.restore_stdin() on exit or to get normal behavior back. newMenu=menu.submenu(name,menu_options_list,menu_functions_list,menu_characters_...
{ "content_hash": "4a3c1427b94587b238405b4186d61f5f", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 134, "avg_line_length": 29.728643216080403, "alnum_prop": 0.6064908722109533, "repo_name": "srazojr/QUADCAPE", "id": "44d23847fde143f5f2dfe0d7831c5ab304f3a8fb", "size": "5...
""" # Licensed to the Apache Software Foundation (ASF) under one * # or more contributor license agreements. See the NOTICE file * # distributed with this work for additional information * # regarding copyright ownership. The ASF licenses this file * # to you under the Apache License, Version 2.0 (the...
{ "content_hash": "d6ddfcf5dc44c7ae884c0f1c5ac72054", "timestamp": "", "source": "github", "line_count": 115, "max_line_length": 95, "avg_line_length": 38.56521739130435, "alnum_prop": 0.649379932356257, "repo_name": "OBIGOGIT/etch", "id": "33de6ae9085f7ec1ac8ce80be8796f5c5d9f8c6a", "size": "4435", ...
import pytest from coolcantonese.phonetic import ( NotationMarker, fetch_symbols, ) @pytest.fixture def marker(): return NotationMarker("coolcantonese/data/phonetic-data.txt") # def get_noted_chars(in_str): # return _default.get_noted_chars(in_str) # def get_symbols(char): # return _default.ge...
{ "content_hash": "d788b1290509b3b2b3aeaf874c81b020", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 65, "avg_line_length": 18.608695652173914, "alnum_prop": 0.6179906542056075, "repo_name": "kk17/CoolCantonese", "id": "a35510eb64287f61899025688602a09b965c1a60", "size": "9...
""" WSGI config for seed_control_interface 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.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.djang...
{ "content_hash": "f79720f5edc3cf25ddb1e11e2121bfb0", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 78, "avg_line_length": 28.105263157894736, "alnum_prop": 0.7621722846441947, "repo_name": "praekelt/seed-control-interface", "id": "746dd79fd3edf518656614a99524dcdca3b6b69f",...
""" Google Hangouts Relay """ import os import logging import asyncio import threading import hangups from .relay import Relay LOG = logging.getLogger(__name__) class HangoutsRelay(Relay): """ Hangouts Relay implementation that handles relays to and from an mq service. """ RELAY_ARG_WHITELIST = ['auth_to...
{ "content_hash": "fd2b9d5a81a05a4346fe722aebd2e752", "timestamp": "", "source": "github", "line_count": 143, "max_line_length": 120, "avg_line_length": 43.52447552447553, "alnum_prop": 0.6446015424164524, "repo_name": "nerdfarm/obs", "id": "604740906b80ebd1acd2d6da9214ff0c5903d43c", "size": "6273",...
import ConfigParser, Image, aztk_config display_sizes_cfg = ConfigParser.ConfigParser() display_sizes_cfg.read('%s/etc/display_sizes.cfg' % aztk_config.aztk_root) display_sizes = {} for size in display_sizes_cfg.sections(): display_sizes[size] = { 'width': display_sizes_cfg.getint(size, 'width'), 'height': displa...
{ "content_hash": "e8ccc611da925c0da3badc46e13b2618", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 119, "avg_line_length": 46.125, "alnum_prop": 0.6856368563685636, "repo_name": "kordless/zoto-server", "id": "5b9580ced117c075ccde97c10c6d0c384742cc6c", "size": "1107", "...
def extractShainagtranslationsWordpressCom(item): ''' Parser for 'shainagtranslations.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None if item['tags'] == ['Uncategorized']: titlemap = [ ('T...
{ "content_hash": "dacdb1b0f24059815c093e5c57ddb583", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 105, "avg_line_length": 60.5, "alnum_prop": 0.5165289256198347, "repo_name": "fake-name/ReadableWebProxy", "id": "8a8c33054198375cf12701f70249c1debc5c08b7", "size": "1947",...
"""Settings for bull installation.""" from os.path import abspath, dirname, join _cwd = dirname(abspath(__file__)) # Subject of the email sent after purchase # MAIL_SUBJECT = # Email address for the 'from' field of the generated email # MAIL_FROM = # Email server address # MAIL_SERVER = # Email server username # MA...
{ "content_hash": "9cf5d1271f06a6fd64319fddc882353a", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 73, "avg_line_length": 22.833333333333332, "alnum_prop": 0.7214111922141119, "repo_name": "abdelinho24/flask-shop", "id": "fe9fa2dad302926efd43ba0762bb3eaab76673c7", "size"...
"""The classes in this module represent objects sent and received from the XMS REST API. """ from __future__ import absolute_import, division, print_function class ReportType(object): """A collection of known delivery report types. These values are known to be valid in :py:attr:`MtSmsBatch.delivery_repo...
{ "content_hash": "511af85963602ee40170353b941dbdac", "timestamp": "", "source": "github", "line_count": 1171, "max_line_length": 77, "avg_line_length": 22.35269000853971, "alnum_prop": 0.6245272206303725, "repo_name": "clxcommunications/sdk-xms-python", "id": "664e8f442c5bef3ae28c9bffbd7e85d56df65d51...
import examples.connect """ Find a resource from the Compute service. For a full guide see TODO(etoews):link to docs on developer.openstack.org """ def find_image(conn): print("Find Image:") image = conn.compute.find_image(examples.connect.IMAGE_NAME) print(image) return image def find_flavor(c...
{ "content_hash": "3127078997303558d10d35c75e77caa9", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 73, "avg_line_length": 16.864864864864863, "alnum_prop": 0.6971153846153846, "repo_name": "briancurtin/python-openstacksdk", "id": "b009df922c9c3de54862b1fdd9b3d14dbaa982fd",...
import subprocess from command import Command from ..git_tools import git_base_command class ListVersionsCommand(Command): def __init__(self, flow, cmd_name, params): Command.__init__(self, flow, cmd_name, params) def exec_impl(self): output = self.shell_helper(git_base_comma...
{ "content_hash": "a9d7128e2104f672ed3550c29089ca11", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 69, "avg_line_length": 29.77777777777778, "alnum_prop": 0.5597014925373134, "repo_name": "manylabs/flow", "id": "6a016d0cd4311451f60abb862e5c2bdbbf9a4bd5", "size": "536", ...
''' Utilities module for jumeg ''' # Authors: Jurgen Dammers ([email protected]) # Praveen Sripad ([email protected]) # Eberhard Eich ([email protected]) () # # License: BSD (3-clause) import sys import os import os.path as op import fnmatch import numpy as np import scipy as sci from s...
{ "content_hash": "75e07c7ed275b3a00fbe0f766a7532cc", "timestamp": "", "source": "github", "line_count": 1483, "max_line_length": 119, "avg_line_length": 33.74713418745785, "alnum_prop": 0.5692848722201131, "repo_name": "pravsripad/jumeg", "id": "af120a050e53a6d77e68873839440d78c9c48448", "size": "5...
import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry class magicdictlist(dict): """Helper class to add conveniences to dict.""" def __getitem__(self, key): """Extend getitem behavior to create if not found.""" if key not in self: dict.__se...
{ "content_hash": "44124c62e9c4313040635733423d71e3", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 85, "avg_line_length": 32.529411764705884, "alnum_prop": 0.64376130198915, "repo_name": "infinitewarp/trekipsum", "id": "4d29467ab5be8bdf561837aa8bebdb4e46c98681", "size": ...