text
stringlengths
4
1.02M
meta
dict
from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/item/shared_item_storage_cabinet_01.iff" result.attribute_template_id = -1 result.stfName("obj_n","unknown_object") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "7e5f5bef11c95d31535fff7da9975bbf", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 74, "avg_line_length": 23.307692307692307, "alnum_prop": 0.6897689768976898, "repo_name": "obi-two/Rebelion", "id": "42234c05d61a2b5c3cae3278944b1bc1acd615fc", "size": "448...
""" Created on Mon May 2 21:12:16 2016 Jan Cimbalnik """ import pyedflib,os abspath = os.path.abspath(__file__) dname = os.path.dirname(abspath) os.chdir(dname+'/../test_data/') file_name='./test.edf' file_name = '/home/jan_cimbalnik/Dropbox/HFO_detectors_project/HFO-detect-python/test_data/test.edf' f = pyedflib....
{ "content_hash": "b3ba560d2ef2da7a0040e09c5ef8575e", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 100, "avg_line_length": 22.666666666666668, "alnum_prop": 0.7107843137254902, "repo_name": "HFO-detect/HFO-detect-python", "id": "388179fd55f3f82af1871079f16a0169410092b9", ...
import json from django.conf import settings from django.core.urlresolvers import reverse from django.test.client import Client, MULTIPART_CONTENT from django.utils.encoding import force_text from rest_framework import status class APIClient(Client): def patch(self, path, data='', content_type=MULTIPART_CONTEN...
{ "content_hash": "55cfd3772402404769aa337c5a8393fc", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 105, "avg_line_length": 37.85964912280702, "alnum_prop": 0.6065801668211307, "repo_name": "maxim-kht/django-rest-auth", "id": "faaf7bb4e191471465b300f9be0710f1d02569e7", "...
""" file: splot.py created: 20160806 author(s): mr-augustine Statevars Plot (splot) produces plots for data in a given data file according to the file's user-defined format specification. """ import getopt import os.path import sys from statevars import Statevars from data import Data from plot import Plot HELP_TEXT...
{ "content_hash": "8696424ba1c8f3b3c8e4e131a2d7127b", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 97, "avg_line_length": 28.728571428571428, "alnum_prop": 0.6116360019890602, "repo_name": "mr-augustine/splot", "id": "5fbe21308fa6568b245b08d41b45ab2019e0f0cb", "size": "2...
import os import subprocess if "VIRTUAL_ENV" not in os.environ: sys.stderr.write("$VIRTUAL_ENV not found.\n\n") parser.print_usage() sys.exit(-1) virtualenv = os.environ["VIRTUAL_ENV"] file_path = os.path.dirname(__file__) subprocess.call(["pip", "install", "-E", virtualenv, "--requirement", ...
{ "content_hash": "b3a6513eabbfc17e9b118842c51581a0", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 69, "avg_line_length": 33.54545454545455, "alnum_prop": 0.6531165311653117, "repo_name": "gcaprio/cfbreference_com", "id": "97c833f98db0189b2fb8d309fa87642fc38f3594", "size...
import unittest import mock def _make_credentials(): import google.auth.credentials return mock.Mock(spec=google.auth.credentials.Credentials) def _make_entity_pb(project, kind, integer_id, name=None, str_val=None): from google.cloud.datastore._generated import entity_pb2 from google.cloud.datastor...
{ "content_hash": "6c9442da3e011a45780a22529ac112d9", "timestamp": "", "source": "github", "line_count": 1036, "max_line_length": 79, "avg_line_length": 33.25965250965251, "alnum_prop": 0.5996749571930232, "repo_name": "Fkawala/gcloud-python", "id": "f6e016d03712dc3147fbcb962b21958608b812c9", "size"...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: tower_organization version_added: "2.3" author: "Wayne Witz...
{ "content_hash": "5da0ca70b204f50fc5a2ecb355e7d370", "timestamp": "", "source": "github", "line_count": 141, "max_line_length": 105, "avg_line_length": 29.70921985815603, "alnum_prop": 0.6306994509429458, "repo_name": "e-gob/plataforma-kioscos-autoatencion", "id": "249ac7280dcb18c0e984dc91c5692c3aaa5...
import os, os.path import re import argparse import fileinput includes = "(.*\.html)|(.*\.js)|(.*\.css)" parser = argparse.ArgumentParser(description="Add a vendor prefix to the @viewport rules.") parser.add_argument("--vendor", required=True, help="""Specify the vendor name. For instance, "--vend...
{ "content_hash": "2ec59ba4471506bad7ec4113452dccd0", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 94, "avg_line_length": 36.85, "alnum_prop": 0.6431478968792401, "repo_name": "operasoftware/viewport-compliance-test", "id": "b66fcc6bb859b3a13dd0d00494e5a020fe18f35a", "si...
'''Compute recombination probabilities E.g: for each sample repertoire, compute P(V), P(J), P(D, J), P(delV|V), P(delJ|J), P(del5, del3|D), P(insVD), P(x_i|x_i-1), P(insDJ), P(y_j|y_j+1) Compute the median of a subset of samples etc... ''' import os import sys import gzip import cPickle as pickle from optparse import ...
{ "content_hash": "8f4adf845a4dad19c73b60d5b640c2c2", "timestamp": "", "source": "github", "line_count": 275, "max_line_length": 87, "avg_line_length": 35.57090909090909, "alnum_prop": 0.5850541811490493, "repo_name": "ngannguyen/aimseqtk", "id": "f39dcc040c9f126744994b6b5edb8a5559823788", "size": "...
import os import sys def verify(msys_path): if not msys_path: sys.exit( "Please set environment variable MSYS_PATH " "to directory with make.exe" ) make_found = False for path in msys_path.split(';'): if not os.path.isdir(path): sys.exit( "One of the MSYS_PATH componen...
{ "content_hash": "a7279e9cf47e17fc5cb6aea1b13496a4", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 77, "avg_line_length": 25.88, "alnum_prop": 0.5935085007727975, "repo_name": "idscan/polly", "id": "6e9562965c48d7e3ba0579fb8390f0b036317f08", "size": "708", "binary": fa...
class NoMixedCaseMeta(type): def __new__(cls, clsname, bases, clsdict): for name in clsdict: if name.lower() != name: raise TypeError('Bad attribute name: ' + name) return super().__new__(cls, clsname, bases, clsdict) class Root(metaclass=NoMixedCaseMeta): pass clas...
{ "content_hash": "2b03e1eab90d7b01c284a07a85132100", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 62, "avg_line_length": 27.22222222222222, "alnum_prop": 0.5816326530612245, "repo_name": "tuanavu/python-cookbook-3rd", "id": "78d32aaf2153e646feffcb5e92d9a5314ef0a94f", "s...
"""Mappings for OpenSearch v2."""
{ "content_hash": "50435c598eea922d186b0d6eb36ea49f", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 33, "avg_line_length": 34, "alnum_prop": 0.6764705882352942, "repo_name": "inveniosoftware/invenio-communities", "id": "8ad3be2550179838b299cf7514a44827dcfee361", "size": "2...
""" Contains a CLICommand that can issue DELETE requests. Uses the following from :py:class:`swiftly.cli.context.CLIContext`: ============== ===================================================== cdn True if the CDN Management URL should be used instead of the Storage URL. client_manager ...
{ "content_hash": "d335c86e259a813f6b251a722a959483", "timestamp": "", "source": "github", "line_count": 332, "max_line_length": 79, "avg_line_length": 44.2289156626506, "alnum_prop": 0.6082811223099973, "repo_name": "rackerlabs/swiftly", "id": "37e2ddf28d12a81462c37617ee22632761ee3f4b", "size": "14...
from django.core.management.base import BaseCommand from django.shortcuts import get_object_or_404 from bulbs.content.models import FeatureType class Command(BaseCommand): help = "Set a provided FeatureType as available for Facebook Instant Articles." def add_arguments(self, parser): parser.add_arg...
{ "content_hash": "5c66968f5e31032b415a8df7e3f30cfe", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 83, "avg_line_length": 33.714285714285715, "alnum_prop": 0.638771186440678, "repo_name": "theonion/django-bulbs", "id": "4fe90273fc2920b0424ecfe27ee480366cd8d58a", "size": ...
""" Tests for IBM Model 5 training methods """ import unittest from collections import defaultdict from nltk.translate import AlignedSent from nltk.translate import IBMModel from nltk.translate import IBMModel4 from nltk.translate import IBMModel5 from nltk.translate.ibm_model import AlignmentInfo cla...
{ "content_hash": "b53c24b7bbace7ecab5b3a1eb94a0f6a", "timestamp": "", "source": "github", "line_count": 165, "max_line_length": 80, "avg_line_length": 42.842424242424244, "alnum_prop": 0.5378412788230301, "repo_name": "MyRookie/SentimentAnalyse", "id": "9e9ce219436e962ccf79c6c4a36adff1897fa0af", "s...
""" DeiT model configuration """ from ...configuration_utils import PretrainedConfig from ...utils import logging logger = logging.get_logger(__name__) DEIT_PRETRAINED_CONFIG_ARCHIVE_MAP = { "facebook/deit-base-distilled-patch16-224": "https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.js...
{ "content_hash": "cd6943fa5f3f441cd9d848614c8dc53c", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 129, "avg_line_length": 45.83495145631068, "alnum_prop": 0.6606651133234485, "repo_name": "huggingface/pytorch-transformers", "id": "0bbbff709b83f7ebb5dff7f79e99abadef43f59e...
"""Removes the `users.username` column and adds the `users.facebook_id` column. Revision ID: ddd00fbe2758 Revises: b5c16f116e54 Create Date: 2017-06-19 21:49:45.269126 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = 'ddd00fbe2758' down_revision = 'b5c16f116e54' ...
{ "content_hash": "9c7faeb4e7acc8597677da4a406122fa", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 109, "avg_line_length": 35.878787878787875, "alnum_prop": 0.6875, "repo_name": "Rdbaker/Mealbound", "id": "99f31ebcf46817d9c2859699a369b533e829de05", "size": "1184", "bin...
"""The tests for numeric state automation.""" import unittest from homeassistant.bootstrap import setup_component import homeassistant.components.automation as automation from tests.common import get_test_home_assistant class TestAutomationNumericState(unittest.TestCase): """Test the event automation.""" d...
{ "content_hash": "c47e3dda3866fa5dfb3cfa88346cd4c2", "timestamp": "", "source": "github", "line_count": 529, "max_line_length": 79, "avg_line_length": 35.61058601134216, "alnum_prop": 0.473564072619174, "repo_name": "betrisey/home-assistant", "id": "fa2d237ee00c97ed795f1bb3d9da4612d0b16e24", "size"...
from m5.SimObject import * from m5.defines import buildEnv from m5.params import * from m5.proxy import * from DVFSHandler import * from SimpleMemory import * class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing', 'atomic_noncaching'] class System(MemObject): type = 'Syste...
{ "content_hash": "30a80bc7b03b2be0d9e9086e5edd1c75", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 80, "avg_line_length": 44.8875, "alnum_prop": 0.6636034530771373, "repo_name": "gedare/gem5", "id": "53377989d4b800cf79e519d603bf74d421132bc5", "size": "5256", "binary": ...
import copy from django.test import TestCase from mock import patch, call, MagicMock from datetime import datetime from graphite.render.datalib import TimeSeries from graphite.render import functions from graphite.render.functions import NormalizeEmptyResultError def return_greater(series, value): return [i for i...
{ "content_hash": "0f17c9f8e1c4a6015b2f2d0701227603", "timestamp": "", "source": "github", "line_count": 321, "max_line_length": 146, "avg_line_length": 40.4392523364486, "alnum_prop": 0.5895539634850936, "repo_name": "g76r/graphite-web", "id": "7a447465b463aa769419941dea8600cfe0cce872", "size": "12...
"""Tests for `lyricsmaster` package.""" import os import sys import codecs import pytest from click.testing import CliRunner from bs4 import BeautifulSoup, Tag from lyricsmaster import models from lyricsmaster import cli from lyricsmaster.providers import LyricWiki, AzLyrics, Genius, Lyrics007, \ MusixMatch fro...
{ "content_hash": "da330e248fa2dc794b187bad234b159a", "timestamp": "", "source": "github", "line_count": 429, "max_line_length": 172, "avg_line_length": 45.56410256410256, "alnum_prop": 0.5935437663068501, "repo_name": "SekouD/lyricsmaster", "id": "3697cee9bb39e36366b6787325017ff710165f16", "size": ...
from __future__ import print_function, division from sympy.core import C, sympify from sympy.core.add import Add from sympy.core.function import Lambda, Function, ArgumentIndexError from sympy.core.cache import cacheit from sympy.core.power import Pow from sympy.core.singleton import S from sympy.core.symbol import Wi...
{ "content_hash": "7dcb1f16915b9ed2ea36019dae587413", "timestamp": "", "source": "github", "line_count": 824, "max_line_length": 80, "avg_line_length": 30.70266990291262, "alnum_prop": 0.5048420886201036, "repo_name": "jamesblunt/sympy", "id": "1f9168bed9d09ed9d964434f96186d88f08ad6f3", "size": "252...
import time class Solution(object): def fractionToDecimal(self, numerator, denominator): """ :type numerator: int :type denominator: int :rtype: str """ if numerator == 0: return '0' if numerator < 0 and denominator < 0: return self.fractionToDec...
{ "content_hash": "2047c952db1d87c106f6f8fa116b5309", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 81, "avg_line_length": 27.563636363636363, "alnum_prop": 0.5356200527704486, "repo_name": "xiaonanln/myleetcode-python", "id": "74c877722010d45093123c6bb2302c0e0c62cc73", "...
""" Kivy-iconfonts ============== Simple helper functions to make easier to use icon fonts in Labels and derived widgets. """ from .iconfonts import * if __name__ == '__main__': from kivy.lang import Builder from kivy.base import runTouchApp from kivy.animation import Animation from os.path import jo...
{ "content_hash": "03b47b644235854045e3986d4fc03787", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 78, "avg_line_length": 24.737704918032787, "alnum_prop": 0.5347912524850894, "repo_name": "bit0001/chumme", "id": "23dac3eed20b51adbd13970fd3bdd8d864a0c2cb", "size": "1509"...
import webapp2 from jinja2 import Environment class Hello(webapp2.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/plain' env = Environment() template = env.from_string("Hello {{ greeting }}!") self.response.out.write(template.render(greeting='world')) ...
{ "content_hash": "f2f3f45f5b5f8e342467e99253bd0d15", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 66, "avg_line_length": 31.5, "alnum_prop": 0.671957671957672, "repo_name": "Trii/NoseGAE", "id": "ed9c06baae39b296c9bff563bbb56016a668b71d", "size": "378", "binary": fals...
from django.views.i18n import JavaScriptCatalog from django.views.static import serve from cms.utils.conf import get_cms_setting from django.conf import settings from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from django.contrib import admin admin.autodiscover() urlpatterns...
{ "content_hash": "e6ca8fd4abf077bca15c3a75a76cb4f3", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 83, "avg_line_length": 32.916666666666664, "alnum_prop": 0.6924050632911393, "repo_name": "benzkji/django-cms", "id": "37f218a55635b1f0df1bed55aab52d09f6dde865", "size": "7...
""" Transformation utilities for STIX pattern comparison expressions. """ import functools import itertools from stix2.equivalence.pattern.compare import iter_in, iter_lex_cmp from stix2.equivalence.pattern.compare.comparison import ( comparison_expression_cmp, ) from stix2.equivalence.pattern.transform import Tra...
{ "content_hash": "f845480f925c0886bc4021e076ff1a67", "timestamp": "", "source": "github", "line_count": 404, "max_line_length": 80, "avg_line_length": 33.12871287128713, "alnum_prop": 0.5882396891811118, "repo_name": "oasis-open/cti-python-stix2", "id": "9da91eff1f96ac267b91bef84f29c143a471fc1f", "...
from setuptools import setup from setuptools.command.install import install as _install class install(_install): def run(self): _install.run(self) setup( cmdclass = { 'install' : install }, name = 'hydra', version = '0.1', author = 'tatsy', author_email = 'tatsy.mail@gmail.com', ur...
{ "content_hash": "53fab3095f62e015ac07ae3cafc79c69", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 58, "avg_line_length": 26, "alnum_prop": 0.5637019230769231, "repo_name": "tatsy/hydra", "id": "e7480e46acbddcd69f925328f54a3a8f35b1978c", "size": "832", "binary": false,...
import os import sys import subprocess import itertools from os import path f = open(sys.argv[1], 'wb') components = sys.argv[2].split(' ') components = [i for i in components if i] # ignore extra whitespaces enable_static = sys.argv[3] f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // ...
{ "content_hash": "06480616b9a24ba559e1d3122c5b49e6", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 81, "avg_line_length": 29.95098039215686, "alnum_prop": 0.5577741407528641, "repo_name": "erickt/rust", "id": "f184e07891b9642cd2487cff40ef70eb5c04a744", "size": "3518", ...
from django.core.urlresolvers import reverse from tastypie import authorization from tastypie.authentication import MultiAuthentication from crits.samples.sample import Sample from crits.samples.handlers import handle_uploaded_file from crits.core.api import CRITsApiKeyAuthentication, CRITsSessionAuthentication from c...
{ "content_hash": "79e25715a3c9bd043786ee143678f38c", "timestamp": "", "source": "github", "line_count": 141, "max_line_length": 82, "avg_line_length": 42.198581560283685, "alnum_prop": 0.5097478991596639, "repo_name": "ckane/crits", "id": "871cdaf3fdb48607d58a1c8e67ed3433f6e1cc56", "size": "5950", ...
import ast import dendropy import unittest import numpy as np import taxonfixer class TestTreeReWrite(unittest.TestCase): def test_tree_rewrite1(self): treelist = dendropy.TreeList.get_from_path('/Users/ruthdavidson/code/phylogenetics-tools/tests/feefifofum','newick') taxondict = {'fa': 1, 'fee': 2...
{ "content_hash": "441c4d6c4ef2a0ddec72b896c0d3a868", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 169, "avg_line_length": 44.22727272727273, "alnum_prop": 0.6173347036656389, "repo_name": "redavids/phylogenetics-tools", "id": "21bf8fd371ef12e91b523f61e1342a895a5695ea", ...
import os from setuptools import setup f = open(os.path.join(os.path.dirname(__file__), 'README.txt')) long_description = f.read().strip() f.close() setup( name='nose-advancedlogging', version='0.1', author='Anand Palanisamy', author_email='apalanisamy@paypal.com', description='Advanced logging fo...
{ "content_hash": "be13eab761218e4f1381152358b39c92", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 64, "avg_line_length": 26.64, "alnum_prop": 0.6516516516516516, "repo_name": "paypal/aurora", "id": "fcf3de815c1ef99a895d4bbb75ab9180d0db8197", "size": "666", "binary": f...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cog', '0004_auto_20160106_0812'), ] operations = [ migrations.AddField( model_name='project', name='shared', fie...
{ "content_hash": "9ed9769fe3ece668c34a94d549a39c56", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 52, "avg_line_length": 20.833333333333332, "alnum_prop": 0.5893333333333334, "repo_name": "EarthSystemCoG/COG", "id": "0bd618ff497319a870e7cacd1c90a2f252eeb557", "size": "4...
from datadog.api.base import ActionAPIResource class Host(ActionAPIResource): """ A wrapper around Host HTTP API. """ _class_url = '/host' @classmethod def mute(cls, host_name, **params): """ Mute a host. :param host_name: hostname :type host_name: string ...
{ "content_hash": "028ae9c98325f79f769b32f0642a351f", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 90, "avg_line_length": 25.15909090909091, "alnum_prop": 0.5998193315266486, "repo_name": "jofusa/datadogpy", "id": "f14432c1fcaccf0199fa21e0e2edcdbad37aa9b5", "size": "1107...
from menpo.shape.exceptions import FieldError class TriFieldError(FieldError): pass
{ "content_hash": "cb004782e57f1147f6f90aadcb87aa4e", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 45, "avg_line_length": 18, "alnum_prop": 0.8, "repo_name": "karla3jo/menpo-old", "id": "2e73ff7f0f5eca54decd0c44a6d018299825f6a1", "size": "90", "binary": false, "copies...
from django.contrib import admin from django import forms from django.contrib import admin from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin from django.contrib.auth.forms import ReadOnlyPasswordHashField from sso.models import Member class MemberCreationForm(forms.ModelFor...
{ "content_hash": "4269779a343d8edd8b07643e93dd5ec8", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 90, "avg_line_length": 36.40909090909091, "alnum_prop": 0.6644818976279651, "repo_name": "favoritemedium/sso-prototype", "id": "e07b39da97b73714a08f85b096538eb0e0a5138c", "...
"""This module defines tableau file reader base class""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from future.utils import raise_with_traceback import lxml.etree as etree from pathlib2 import Path from tableaupy.contenthandlers import Con...
{ "content_hash": "46d9f9d2be8dd9c4eb4dae020f09f4e8", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 77, "avg_line_length": 29.25925925925926, "alnum_prop": 0.6118143459915611, "repo_name": "practo/Tableau-Py", "id": "c1a533ef9fdca6fcb1f9933abc7e4d134ae62a11", "size": "239...
"""Package contenant la commande 'porter'.""" from primaires.interpreteur.commande.commande import Commande class CmdPorter(Commande): """Commande 'porter'""" def __init__(self): """Constructeur de la commande""" Commande.__init__(self, "porter", "wear") self.nom_categorie = "objets"...
{ "content_hash": "86c1f1f9c920c873f00857e85dbe8354", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 78, "avg_line_length": 40.45614035087719, "alnum_prop": 0.5754553339115351, "repo_name": "stormi/tsunami", "id": "44bcef171d3a7661f6e4f4db14a25b866a4b255d", "size": "3882",...
from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_commoner_tatooine_bith_female_01.iff" result.attribute_template_id = 9 result.stfName("npc_name","bith_base_female") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return resul...
{ "content_hash": "68ae345690e6794a23aa4113fd7ad25e", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 86, "avg_line_length": 24.692307692307693, "alnum_prop": 0.7040498442367601, "repo_name": "obi-two/Rebelion", "id": "671734b9c76e41588d21e90e4ca7bd22333d045e", "size": "466...
""" Common functionalities shared between different iLO modules. """ import tempfile from oslo.utils import importutils from oslo_config import cfg from ironic.common import exception from ironic.common.i18n import _ from ironic.common.i18n import _LE from ironic.common.i18n import _LI from ironic.common import imag...
{ "content_hash": "f976d038ae8b76c8c5918c69b8bcd240", "timestamp": "", "source": "github", "line_count": 411, "max_line_length": 79, "avg_line_length": 37.34063260340633, "alnum_prop": 0.6412979735453183, "repo_name": "ramineni/myironic", "id": "807e89b475eefc10404ba6c3c6b4e2675f89fa14", "size": "15...
"""setup.py Upload to PyPI, Thx to: http://peterdowns.com/posts/first-time-with-pypi.html python3 setup.py sdist twine upload --repository pypitest dist/pyleri-x.x.x.tar.gz twine upload --repository pypi dist/pyleri-x.x.x.tar.gz """ from setuptools import setup from pyleri import __version__ as version try: with...
{ "content_hash": "0913ccf39628dbfcbe537ed20b710034", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 77, "avg_line_length": 35.46153846153846, "alnum_prop": 0.6220173535791758, "repo_name": "transceptor-technology/pyleri", "id": "c1a005a10996a52cc5943000fedd8284b258fff8", ...
""" Diametrically point loaded 2-D disk, using commands for interactive use. See :ref:`sec-primer`. The script combines the functionality of all the ``its2D_?.py`` examples and allows setting various simulation parameters, namely: - material parameters - displacement field approximation order - uniform mesh refinemen...
{ "content_hash": "58ccfa18b6bffd67851af1f04cb20de3", "timestamp": "", "source": "github", "line_count": 290, "max_line_length": 79, "avg_line_length": 36.324137931034485, "alnum_prop": 0.5928422251756218, "repo_name": "RexFuzzle/sfepy", "id": "1d7509708e14bb41b58aa42dd2a775e649d28a93", "size": "105...
"""This example creates a creative field associated with a given advertiser. To get an advertiser ID, run get_advertisers.py. Tags: creativefield.saveCreativeField """ __author__ = 'api.jdilallo@gmail.com (Joseph DiLallo)' import os import sys sys.path.insert(0, os.path.join('..', '..', '..', '..')) # Import approp...
{ "content_hash": "7cc941eebecd84a894afcf7e01dea154", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 79, "avg_line_length": 29.170731707317074, "alnum_prop": 0.6931438127090301, "repo_name": "caioserra/apiAdwords", "id": "f8886339db69dfaa58d582745d678a0026f6c9eb", "size": ...
from application import Application import os my_app = Application(environment=os.environ) celery = my_app.celery() import tasks app = my_app.flask_app if __name__ == '__main__': app.logger.info("Running {}".format(app.flask_app.name)) app.run()
{ "content_hash": "452e77d6f53702a5ac3e2a312cbb103c", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 60, "avg_line_length": 21.416666666666668, "alnum_prop": 0.688715953307393, "repo_name": "rocknsm/docket", "id": "508dad018eebc766f9db0af7bfe91569f8f116d8", "size": "948", ...
import unittest import math import random import yodel.filter import yodel.analysis import yodel.conversion import yodel.complex class TestLowPassFilter(unittest.TestCase): def setUp(self): self.flt = yodel.filter.SinglePole() pass def test_coefficients(self): samplerate = 48000 ...
{ "content_hash": "77bddda1b4bd7b081aca30641231d4cd", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 104, "avg_line_length": 27.38372093023256, "alnum_prop": 0.597452229299363, "repo_name": "rclement/yodel", "id": "cc1715e7340e2074aeb882816a843e994fb6a444", "size": "2355",...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0003_user_registration_method'), ] operations = [ migrations.AddField( model_name='user', name='agreement_date', ...
{ "content_hash": "c4eb4fbe8554bbb4223e906d010eab2e", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 158, "avg_line_length": 27.38888888888889, "alnum_prop": 0.6348884381338742, "repo_name": "opennode/nodeconductor", "id": "15416d5efc273c410dd0233c3a6e4934626750f8", "size"...
from nba_py import player pd = player.PlayerDashboard('203507') print pd.starting_position() ap = player.CommonAllPlayers() print ap.info() pc = player.PlayerInfoCommon('203507') print pc.headline_stats() p_cstats = player.PlayerCareerStats('201939') print p_cstats.regular_season_career_totals()
{ "content_hash": "5f027f9b8494948d38323247bfa933d4", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 45, "avg_line_length": 23.153846153846153, "alnum_prop": 0.7674418604651163, "repo_name": "jeremyjbowers/nba_py", "id": "c0546d39732da3765f262dbd44688a8eda38c881", "size": ...
import unittest class TestDlib(unittest.TestCase): # From http://dlib.net/face_detector.py.html def test_face_detector(self): import dlib import pkgutil import tempfile with tempfile.NamedTemporaryFile(buffering=0) as f: f.write(pkgutil.get_data(__name__, "abba.jp...
{ "content_hash": "70bfbc05bfe20de1beec2c5d297927de", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 84, "avg_line_length": 37.38709677419355, "alnum_prop": 0.5332182916307161, "repo_name": "chaquo/chaquopy", "id": "62558b97fa6c03af7326e61df86b0b113316a181", "size": "1159"...
from __future__ import unicode_literals import os import sys import json from copy import deepcopy from itertools import count from threading import RLock, Event from datetime import datetime, timedelta from collections import Mapping, MutableMapping import six from ws4py.client.threadedclient import WebSocketClient ...
{ "content_hash": "0e54aae86bbb74d3b395f4ebb268b971", "timestamp": "", "source": "github", "line_count": 636, "max_line_length": 150, "avg_line_length": 41.125786163522015, "alnum_prop": 0.6231075087933935, "repo_name": "RobRuana/sideboard", "id": "23543451b99edcce8591bddd45dd1ca7408ef3e2", "size": ...
""" __Delay.py_____________________________________________________ Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY) Author: gehan Modified: Sat Aug 30 18:23:40 2014 _______________________________________________________________ """ from ASGNode import * from ATOM3Type import * from ATOM3Stri...
{ "content_hash": "7530db6d9bd06ecb7c1335dee8b89416", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 90, "avg_line_length": 36.81720430107527, "alnum_prop": 0.602803738317757, "repo_name": "levilucio/SyVOLT", "id": "2e914aa72f0ee7739f32f325e3529f5bc959d268", "size": "3424"...
from django.conf import settings from django.http import HttpResponse from django.shortcuts import render import opentracing import urllib2 tracer = settings.OPENTRACING_TRACER # Create your views here. def client_index(request): return HttpResponse("Client index page") @tracer.trace() def client_simple(reques...
{ "content_hash": "7b13390703ff2254e18e1141bf067dcd", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 90, "avg_line_length": 32.607142857142854, "alnum_prop": 0.696604600219058, "repo_name": "kcamenzind/django_opentracing", "id": "06112f52218150ad4263a4f03d17fed4b662955a", ...
import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Anonymous') def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whe...
{ "content_hash": "5f335486aabcac6ebc1abe83be7aa979", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 80, "avg_line_length": 54, "alnum_prop": 0.7656084656084656, "repo_name": "Ban3/Limnoria", "id": "2737475619f605907a2ee16f8a5255dd49e303ae", "size": "3472", "binary": fal...
import DistributedLawnDecor from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.ShowBase import * import GardenGlobals from toontown.toonbase import TTLocalizer class DistributedPlantBase(DistributedLawnDecor.DistributedLawnDecor): notify = DirectNot...
{ "content_hash": "6d4b7c64c22e6680d0b2bbd5023d9891", "timestamp": "", "source": "github", "line_count": 223, "max_line_length": 148, "avg_line_length": 34.89686098654708, "alnum_prop": 0.6495759444872783, "repo_name": "linktlh/Toontown-journey", "id": "4b1803c9834117bc51bcb94478d5ca1339ab118b", "si...
'Arquivo com diretivas de configuração para scripts de backup e restauração' __author__ = 'Pablo Santiago Blum de Aguiar <pablo.aguiar@gmail.com>' __copyright__ = 'Copyright (c) 2008 Blum-Aguiar' __license__ = '''Copyright (c) 2008 Blum-Aguiar Copyright (c) 2008 Pablo Santiago Blum de Aguiar <pablo.aguiar@gmail.com> A...
{ "content_hash": "03cede0a2e38ef4be4c35d2485d9fb57", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 82, "avg_line_length": 51.10526315789474, "alnum_prop": 0.7703398558187435, "repo_name": "scorphus/dotfilesetal", "id": "00f08cca50ac18ada1db6927ef6239356485a6c1", "size": ...
import pygame from buffalo import utils from menu import Menu def main(): while not utils.end: utils.scene.logic() utils.scene.update() utils.scene.render() utils.delta = utils.clock.tick( utils.FRAMES_PER_SECOND ) if __name__ == "__main__": if not utils.init( ...
{ "content_hash": "8e979e8abfe176c1e6318e5af3fe0e00", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 65, "avg_line_length": 18.357142857142858, "alnum_prop": 0.5486381322957199, "repo_name": "gragas/adept", "id": "f59785a10008f9ca2563ce465d6f4bd81c42e2b7", "size": "514", ...
from docutils import nodes from docutils.writers import html4css1 class HTMLTranslator(html4css1.HTMLTranslator): def visit_request_block(self, node): self.body.append(node.astext()) raise nodes.SkipNode def visit_headers_block(self, node): self.body.append(node.astext()) rais...
{ "content_hash": "f55fdfe02712a82bc573d7a56f3c24cf", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 78, "avg_line_length": 29.77777777777778, "alnum_prop": 0.6393034825870647, "repo_name": "Team-Zeus/okapi", "id": "8114dfc1e2d989db8e866072fd7327eda081235a", "size": "804",...
"""Tests for mind controllers and other wizards.""" import axelrod from .test_player import TestPlayer C, D = axelrod.Actions.C, axelrod.Actions.D class TestMindController(TestPlayer): name = 'Mind Controller' player = axelrod.MindController expected_classifier = { 'memory_depth': -10, ...
{ "content_hash": "d1269fe0756691bc4c586352d3da5ffb", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 70, "avg_line_length": 28.27102803738318, "alnum_prop": 0.6023140495867768, "repo_name": "ranjinidas/Axelrod", "id": "e6ab40c96c552b5f4eaf6c03b108e199e5a83626", "size": "3...
from setuptools import setup from Cython.Build import cythonize cobj = cythonize("poissondisk.pyx", language="c++") setup(name="poissondisk", version="1.0", ext_modules=cobj)
{ "content_hash": "86e75990abec2dfa9d63cd8ef36c1478", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 51, "avg_line_length": 21.11111111111111, "alnum_prop": 0.7052631578947368, "repo_name": "thisch/cypoissondisk", "id": "cc3855236637b65ec42298226c4e9b1e4009e79b", "size": "1...
import time from .exceptions import EOF, TIMEOUT class Expecter(object): def __init__(self, spawn, searcher, searchwindowsize=-1): self.spawn = spawn self.searcher = searcher if searchwindowsize == -1: searchwindowsize = spawn.searchwindowsize self.searchwindowsize = se...
{ "content_hash": "2750f64d2b23d56d776f37a51582e50a", "timestamp": "", "source": "github", "line_count": 299, "max_line_length": 80, "avg_line_length": 35.668896321070235, "alnum_prop": 0.5537740271917487, "repo_name": "nateprewitt/pipenv", "id": "7e07cfa4c231bbccf3ea7857dcdf024985e93463", "size": "...
import unittest from bulbs.config import Config from bulbs.property import String from bulbs.element import VertexProxy, EdgeProxy from bulbs.model import Node, NodeProxy, Relationship, RelationshipProxy from bulbs.base.client import Client from .testcase import BulbsTestCase # Test Models class User(Node): e...
{ "content_hash": "de8a04506567d56c49ba732b72b58be5", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 72, "avg_line_length": 23.54237288135593, "alnum_prop": 0.6954643628509719, "repo_name": "mudbungie/NetExplorer", "id": "a9b3a48de3f8704af26c2978517918d3ba519058", "size": ...
import psycopg2 import sys import os import os.path import csv import dateutil.parser from datetime import datetime import itertools import re import json # Note: initially need to run `python scripts/create_new_detector.py --detector macrobase_ma` # This script also requires additional logging statements in MacroBase...
{ "content_hash": "48d3eb9d4171d2221dee279b4a0f3340", "timestamp": "", "source": "github", "line_count": 136, "max_line_length": 118, "avg_line_length": 34.588235294117645, "alnum_prop": 0.6513605442176871, "repo_name": "kexinrong/macrobase", "id": "4dbb712521295fc4da70016e2a3be20170ed3710", "size":...
"""Dev CLI entry point for QtPy, a compat layer for the Python Qt bindings.""" import qtpy.cli def main(): return qtpy.cli.main() if __name__ == "__main__": main()
{ "content_hash": "0004f1f5d1b341223f573e6922d2074f", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 78, "avg_line_length": 16.09090909090909, "alnum_prop": 0.6101694915254238, "repo_name": "spyder-ide/qtpy", "id": "a8f993c01acebb4f86bea6e65e2918df7e8b895c", "size": "461",...
""" Copyright (c) 2013 Timon Wong Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub...
{ "content_hash": "da9db1c9e39c2cfae002c52de6acd5b0", "timestamp": "", "source": "github", "line_count": 402, "max_line_length": 107, "avg_line_length": 35.62686567164179, "alnum_prop": 0.6055718475073314, "repo_name": "timonwong/OmniMarkupPreviewer", "id": "fd6fe178b558c61cee3250c5d9ebcbc32cb06082", ...
from __future__ import absolute_import, print_function, division import operator from petl.compat import string_types, izip from petl.errors import ArgumentError from petl.util.base import Table, dicts def fromtextindex(index_or_dirname, indexname=None, docnum_field=None): """ Extract all documents from a...
{ "content_hash": "a1314781e2c394690ef961952d9b1fc1", "timestamp": "", "source": "github", "line_count": 492, "max_line_length": 84, "avg_line_length": 35.209349593495936, "alnum_prop": 0.5582751255556196, "repo_name": "alimanfoo/petl", "id": "e20b4f9646f974493bd1ba45d9a2cf8f3c19ce32", "size": "1734...
import argparse import mir3.data.score as score import mir3.lib.midi.MidiOutFile as MidiOutFile import mir3.module class Score2Midi(mir3.module.Module): def get_help(self): return """convert the internal score representation to midi""" def build_arguments(self, parser): parser.add_argument('in...
{ "content_hash": "803ec100689a2927612a857934a1d9fd", "timestamp": "", "source": "github", "line_count": 182, "max_line_length": 80, "avg_line_length": 31.373626373626372, "alnum_prop": 0.5381786339754816, "repo_name": "pymir3/pymir3", "id": "ef028146e8f3063cc82306c0f099c0abccebf0c9", "size": "5710"...
from django.core.management.base import BaseCommand from ... import tools class Command(BaseCommand): help = 'Grab data from VoxImplant' def handle(self, *args, **options): print('Load scenarios...') tools.scenarios_download() print('Load applications...') tools.apps_download...
{ "content_hash": "7175f2d885d3860398dcb77171edb868", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 51, "avg_line_length": 22.764705882352942, "alnum_prop": 0.627906976744186, "repo_name": "telminov/django-voximplant", "id": "a202335c25ad2ecc6c1a412af058a45f6da0cc05", "si...
import logging from operator import attrgetter from telemetry.page import page_measurement from telemetry.web_perf.metrics import rendering_frame # These are LatencyInfo component names indicating the various components # that the input event has travelled through. # This is when the input event first reaches chrome....
{ "content_hash": "a3dbe4ac8d392a68a6ec315939dc9b01", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 79, "avg_line_length": 42.63478260869565, "alnum_prop": 0.6984499286151336, "repo_name": "chromium2014/src", "id": "bd8c826d440c907e5b6e18975665143056d3d62f", "size": "996...
""" Requires simplejson; can be downloaded from http://cheeseshop.python.org/pypi/simplejson """ import xmlrpclib from datetime import datetime try: import json except ImportError: import simplejson as json # From xmlrpclib. SERVER_ERROR = xmlrpclib.SERVER_ERROR NOT_WELLFORMED_ERROR = xmlrpclib.NOT_WELLFORME...
{ "content_hash": "9f9521ca4b3907c4902f15966b09a08e", "timestamp": "", "source": "github", "line_count": 211, "max_line_length": 97, "avg_line_length": 28.42654028436019, "alnum_prop": 0.6085361787262421, "repo_name": "oubiwann/txjsonrpc", "id": "bf97a991f093fa331333cff2f50844c8349093cb", "size": "5...
def bag_of_words(text): """Returns bag-of-words representation of the input text. Args: text: A string containing the text. Returns: A dictionary of strings to integers. """ bag = {} for word in text.lower().split(): bag[word] = bag.get(word, 0) + 1 return bag
{ "content_hash": "ebe9202ab17e3ece315217d15cd0691c", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 59, "avg_line_length": 22.23076923076923, "alnum_prop": 0.6401384083044983, "repo_name": "DasAllFolks/pylang", "id": "47d9a9bfa92048a45290bece85b68e05997e1a18", "size": "28...
import unittest import os from test.aiml_tests.client import TestClient from programy.config import BrainFileConfiguration class BasicTestClient(TestClient): def __init__(self): TestClient.__init__(self) def load_configuration(self, arguments): super(BasicTestClient, self).load_configuration(...
{ "content_hash": "700891357ca1182f4a14a8cbb0a376a6", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 126, "avg_line_length": 36.72, "alnum_prop": 0.7200435729847494, "repo_name": "Thielak/program-y", "id": "071ade860fb9260c30f2cb789f22e86e051d0066", "size": "918", "binar...
import libopenid.conf import logging import django_openid_auth import desktop.conf from desktop.lib import security_util __all__ = ['OPENID_CONFIG', 'OPENID_CREATE_USERS', 'OPENID_SSO_SERVER_URL', 'OPENID_USE_EMAIL_FOR_USERNAME', 'OPENID_IDENTITY_URL_PREFIX'] OPENID_CONFIG = { # set to 1 to output debugging i...
{ "content_hash": "97028544578d20174dbaf718871400e4", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 138, "avg_line_length": 26.32, "alnum_prop": 0.7462006079027356, "repo_name": "xq262144/hue", "id": "b6b7c338854173ec1ed7a435490c0a75db63c85e", "size": "1429", "binary": ...
from setuptools import setup, find_packages from ratelimit import VERSION setup( name='django-ratelimit', version='.'.join(map(str, VERSION)), description='Cache-based rate-limiting for Django.', long_description=open('README.rst').read(), author='James Socol', author_email='james@mozilla.com'...
{ "content_hash": "37530862383886aa6c5b91af4834c529", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 71, "avg_line_length": 33.724137931034484, "alnum_prop": 0.6288343558282209, "repo_name": "haoqili/MozSecWorld", "id": "d07c6c1dc0f97fd26401da810203d9fb60053d40", "size": "...
__all__ = [ 'map_readers', 'buffered', 'compose', 'chain', 'shuffle', 'ComposeNotAligned', 'firstn', 'xmap_readers' ] import itertools import random from Queue import Queue from threading import Thread def map_readers(func, *readers): """ Creates a data reader that outputs return value of function us...
{ "content_hash": "dbe1d8fe8de22d817d36ec0f37913855", "timestamp": "", "source": "github", "line_count": 311, "max_line_length": 79, "avg_line_length": 27.488745980707396, "alnum_prop": 0.5784302257573986, "repo_name": "yu239/Paddle", "id": "45a4288751e37b99dd1005ec78f30a98044926ff", "size": "9159",...
""" Tests for yatsm.config_parser """ import os import pytest from yatsm import config_parser from yatsm.regression.packaged import packaged_regressions # YATSM: SECTION PARSING @pytest.fixture(scope='function') def YATSM_cfg(request): cfg = { 'YATSM': { 'prediction': packaged_regressions[0]...
{ "content_hash": "2c67f172721d0b488a81a2e56acd4a4f", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 71, "avg_line_length": 27.220338983050848, "alnum_prop": 0.5933997509339975, "repo_name": "ceholden/yatsm", "id": "d214ed751a1ef1b1f223ea2121a7948ec6b10bd4", "size": "3212...
import sys import latex2mathml.converter latex_input = sys.argv[1] mathml_output = latex2mathml.converter.convert(latex_input) print mathml_output
{ "content_hash": "ef44b03cce0920c9b1eee05fbf980c6c", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 59, "avg_line_length": 25, "alnum_prop": 0.8066666666666666, "repo_name": "TU-Berlin/mathosphere", "id": "fece1ec8d70f3872fb8e1d48dabb6418c568e19a", "size": "150", "binary...
import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scatter", **kwargs): super(TextfontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
{ "content_hash": "20528e26d20a0528f71127d6386447a6", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 80, "avg_line_length": 40.52173913043478, "alnum_prop": 0.5343347639484979, "repo_name": "plotly/python-api", "id": "1798fb8cf4a6af8d59ff17947ef2c3f1bd4d02b0", "size": "186...
from __future__ import unicode_literals import frappe, copy, json from frappe import _, msgprint from frappe.utils import cint import frappe.share rights = ("read", "write", "create", "delete", "submit", "cancel", "amend", "print", "email", "report", "import", "export", "set_user_permissions", "share") def check_adm...
{ "content_hash": "5cc5b9ddb50db8a6b9c3a28ecf3a197c", "timestamp": "", "source": "github", "line_count": 403, "max_line_length": 142, "avg_line_length": 35.32258064516129, "alnum_prop": 0.706989813839129, "repo_name": "elba7r/frameworking", "id": "e76603193b035bc34d7dfa8946bef41f3a3ced91", "size": "...
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 5, transform = "Difference", sigma = 0.0, exog_count = 0, ar_order = 0);
{ "content_hash": "0a45ebe63ae9b38436988d102f732711", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 167, "avg_line_length": 38.142857142857146, "alnum_prop": 0.7078651685393258, "repo_name": "antoinecarme/pyaf", "id": "d49b7b4a37e199c34035aa67ff1d521468e3b2f3", "size": "26...
from flask.ext.mongoset import Model from conftest import BaseModelTest, app, mongo class NewModel(Model): __collection__ = 'notdbrefstests' inc_id = True indexes = ['id', 'name'] class InsideModel(Model): __collection__ = 'inside' class TestModelDecorator(BaseModelTest): def setUp(self): ...
{ "content_hash": "8cae4a81ce2c739287f5dcba49867233", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 75, "avg_line_length": 35, "alnum_prop": 0.5916256157635468, "repo_name": "Fibio/flask-mongoset", "id": "6c7c7c5534a389df480563aa60b80d8bb17852cc", "size": "2030", "binar...
from attest import Tests, assert_hook samples = Tests() @samples.test def number_and_sequence(): number = 2 + 3 sequence = [1, 2, 3] assert number in sequence and isinstance(number, float) if __name__ == '__main__': samples.main()
{ "content_hash": "b4aabda40c76711c0a078ee610e94d10", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 59, "avg_line_length": 20.833333333333332, "alnum_prop": 0.64, "repo_name": "dag/attest", "id": "e21702a4a98b498412707345b0ee895138790fe4", "size": "250", "binary": false...
from distutils.core import setup import subprocess import sys import os path = os.path.dirname(os.path.realpath(__file__)) submodule_path = os.path.join(path, "spacescout_admin") subprocess.call(["git", "submodule", "init"], cwd=path) subprocess.call(["git", "submodule", "update"], cwd=path) subprocess.call(["git", ...
{ "content_hash": "881e434743eaacae8b8668a1e92a593d", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 93, "avg_line_length": 28.263157894736842, "alnum_prop": 0.6871508379888268, "repo_name": "vegitron/spacescout_admin_wrapper", "id": "707975dfd85a21067655bc4e993a375d23536554...
""" Common code and definitions used by Link extractors (located in scrapy.contrib.linkextractor). """ import re from six.moves.urllib.parse import urlparse from scrapy.selector.csstranslator import ScrapyHTMLTranslator from scrapy.utils.url import url_is_from_any_domain from scrapy.utils.url import canonicalize_url, ...
{ "content_hash": "2bb24660e815ac137adbfd63a7317bdb", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 102, "avg_line_length": 38.19, "alnum_prop": 0.6203194553548049, "repo_name": "Partoo/scrapy", "id": "227d79b46a6c53271ce1c0174fe52604769669f4", "size": "3819", "binary"...
from operator import itemgetter, attrgetter from webapp.models.consts import ADMINS from webapp.models.notify import Notify from libs import store from libs import doubandb, doubanfs, Employee, doubanmc, store, User from datetime import datetime, timedelta class Answer(object): def __init__(self, id, blog_id, ques...
{ "content_hash": "75f18944850ea9dccf42edeb410dfa64", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 115, "avg_line_length": 33.84496124031008, "alnum_prop": 0.5968850206138342, "repo_name": "liangsun/me", "id": "f05c105845b77f26e4424ddb87d70a745f5bb4da", "size": "4413", ...
'''@author: Difan Zhang <tifan@ifanr.com> @license: New BSD License @see: README.rst A simple Flask based Event API handler. ''' from flask import Flask, request from flask.ext.restful import Api, Resource import pprint app = Flask(__name__) api = Api(app) class EventAPIDemo(Resource): def post(self): retu...
{ "content_hash": "4498acd2bb2002374847a652c85ef79f", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 65, "avg_line_length": 17.38235294117647, "alnum_prop": 0.6700507614213198, "repo_name": "ifanrx/socialbase-eventapi", "id": "351ea0e2e3e556c65d46290bb213efd8ffe6c6da", "si...
import pygame """ Screens are statically rendered with no interactivity """ PAUSE_COLOR = (0,0,0) PAUSE_ALPHA = 150 class PauseScreen(object): def __init__(self, config, enabled=False): self.enabled = enabled def doFrame(self, screen, delta, events): if self.enabled: surface = py...
{ "content_hash": "7631f214ef68083bf58bc13fdc1f3a4c", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 55, "avg_line_length": 27.76595744680851, "alnum_prop": 0.61455938697318, "repo_name": "Desolace/LudumDare32", "id": "c2bfb48b8c317840f224202368c7836c4c8583d7", "size": "13...
from django.contrib.sitemaps import Sitemap from django.conf import settings from ietf.liaisons.models import LiaisonDetail if settings.USE_DB_REDESIGN_PROXY_CLASSES: from ietf.liaisons.proxy import LiaisonDetailProxy as LiaisonDetail class LiaisonMap(Sitemap): changefreq = "never" def items(self): ...
{ "content_hash": "1ee5c32644a8994fe705821f5c808d6d", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 71, "avg_line_length": 32.266666666666666, "alnum_prop": 0.7541322314049587, "repo_name": "mcr/ietfdb", "id": "156ffed4c45c1d807cc4b31519a7c85cd0d913b7", "size": "539", "...
import sys import os import glob import yaml from string import Template import tempfile import subprocess template="""format_version: '1.0' input_files: '$target' properties: - property_file: ../properties/termination.prp expected_verdict: true """ tasks = sys.argv[1:] for task in tasks: with open(os.pat...
{ "content_hash": "9d4af928a2b2e6704fd67f94d1f91f06", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 86, "avg_line_length": 33.54545454545455, "alnum_prop": 0.5203252032520326, "repo_name": "zkincaid/duet", "id": "b686fead682920a62f15ba68fe84f92c71c06740", "size": "1492", ...
import sys from pymatic.scripting import Automation, Settings, NaiveInterpreter, ScriptFiles def test1(): auto = Automation(Settings(300)) auto.startapp("gedit") auto.alttab() auto.say("Hello World!") auto.close() def test2(): sf = ScriptFiles("../scripts") sf.runscriptbyfirstname("hellowo...
{ "content_hash": "30efe23ed3510ce40e3c7ab222b055c0", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 81, "avg_line_length": 25.115942028985508, "alnum_prop": 0.621465666474322, "repo_name": "xyproto/pymatic", "id": "35aa2cd1b189b9cff8efce539825b1d227094646", "size": "1796"...
from django import forms from django.contrib.contenttypes.models import ContentType from .models import Comment class CommentForm(forms.ModelForm): class Meta: model = Comment fields = [ "name", "email", "website", "comment" ] def __init__(self, *args, **kwargs): ...
{ "content_hash": "fde0d1a68dd88d52fc685ca531d11290", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 74, "avg_line_length": 32.294117647058826, "alnum_prop": 0.5983606557377049, "repo_name": "pinax/pinax-comments", "id": "ef76f97e849927f390eab3d581bdafecbd5ac34f", "size": ...
"""minimail URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
{ "content_hash": "71f7a1c6cb7c291467de7745aa93f316", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 79, "avg_line_length": 40.51724137931034, "alnum_prop": 0.6961702127659575, "repo_name": "minimail/minimail", "id": "db639c1b8a6e0ed50eca42157b84ba070527eff9", "size": "117...
import os import fnmatch from multiprocessing import Process import process_cup def process_set(cups_dir, set_tag, idx_start, idx_stop, sym_Y = False): """ Process all shots for both collimators for a given cup tag Parameters ---------- cups_dir: string location of the directories with s...
{ "content_hash": "0a5c3d71e9e224fb7d0224cc5a37529e", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 170, "avg_line_length": 24.94, "alnum_prop": 0.6110665597433841, "repo_name": "Iwan-Zotow/runEGS", "id": "dc15aa5e731ccd14b8959ca6fddb9c8845e649b3", "size": "1266", "bina...
import sys from Calculation_variable import Calculation_variable #Check Python version and import appropriate tkinter module if sys.version_info.major == 3: from tkinter import * else: from Tkinter import * class Std_button(Button): """Declare button with sandard hight and width""" def __init__(self, ...
{ "content_hash": "abf64e7d733095b26367ca31e6cad343", "timestamp": "", "source": "github", "line_count": 341, "max_line_length": 141, "avg_line_length": 31.20234604105572, "alnum_prop": 0.5912593984962407, "repo_name": "rowan08/Python_test_code", "id": "6d6cfe2099c5f81bd3329d645748451e46a8d29f", "si...
""" Support for Insteon Hub. For more details about this component, please refer to the documentation at https://home-assistant.io/components/insteon_hub/ """ import logging from homeassistant.const import CONF_API_KEY, CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers import validate_config, discovery DOMAIN ...
{ "content_hash": "a6fa7819cbc89c4329c5491cac792a48", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 75, "avg_line_length": 25.933333333333334, "alnum_prop": 0.6846615252784919, "repo_name": "mikaelboman/home-assistant", "id": "bd12f32b39d85d9e1410af497cd3dbb7cdf94879", "s...
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from shop.models.order import OrderModel class PaymentProvider(object): """ Base class for all Payment Service Providers. """ @property def namespace(self): """ Use a unique namespace f...
{ "content_hash": "0142f8dfbba07a08872ef51476da9e21", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 132, "avg_line_length": 38.389830508474574, "alnum_prop": 0.6547461368653421, "repo_name": "divio/django-shop", "id": "e9fd543eb0e5f59f6860fd0a581d6b7216edd5a6", "size": "2...
import os, sys import string import glob debug=0 #debugsym='ignorableWhitespaceSAXFunc' debugsym=None # # C parser analysis code # ignored_files = { "trio": "too many non standard macros", "trio.c": "too many non standard macros", "trionan.c": "too many non standard macros", "triostr.c": "too many non standar...
{ "content_hash": "fe58791f0220df07c613efe89b75098b", "timestamp": "", "source": "github", "line_count": 2125, "max_line_length": 117, "avg_line_length": 30.21976470588235, "alnum_prop": 0.543532086519146, "repo_name": "relokin/parsec", "id": "1e73725064fce7e1c17e67b62980c4c1b670c46c", "size": "6441...
def write_file(filename, value): with open(filename, "w") as f: f.write(value) def write_ignore_busy(filename, value): try: write_file(filename, value) except IOError as e: if e.errno == 16: pass else: raise e def read_file(filename): with open...
{ "content_hash": "36e60a7e73562c041e79e4c1de8a4bca", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 39, "avg_line_length": 20.055555555555557, "alnum_prop": 0.556786703601108, "repo_name": "K900/intel_iot", "id": "6ed1e1ef01998bce13ded1418f032dea5eced589", "size": "361", ...
""" Support for Zyxel Keenetic NDMS2 based routers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.keenetic_ndms2/ """ import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.compon...
{ "content_hash": "dbd27c0108a46f2b7a16083bee6497fb", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 75, "avg_line_length": 31.611650485436893, "alnum_prop": 0.6514127764127764, "repo_name": "persandstrom/home-assistant", "id": "4be6d96eb5ac4c03bd172843b02a0b76725782cb", ...
from pyinfra import host, local if "misc_servers" in host.groups: local.include("apt.py") local.include("npm.py") local.include("files.py") local.include("server.py") local.include("virtualbox/virtualbox.py") if "docker_servers" in host.groups: local.include("docker_ce.py")
{ "content_hash": "75c0537de7ea68ab878a7f22a76564b0", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 45, "avg_line_length": 27.363636363636363, "alnum_prop": 0.6877076411960132, "repo_name": "Fizzadar/pyinfra", "id": "a2aa48b259e58229ba0d1501442bb778e1b82b62", "size": "301...
from __future__ import unicode_literals from django.db import migrations, models import sys fwd_operations = [ 'ALTER TABLE `auth_user` MODIFY `password` varchar(128) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci ', 'ALTER TABLE `auth_user` MODIFY `username` varchar(30) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci...
{ "content_hash": "3fe0a1a2b1786456dd6939548bce80e3", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 124, "avg_line_length": 63.33684210526316, "alnum_prop": 0.7266079441582184, "repo_name": "dlareau/puzzlehunt_server", "id": "aa1812f0fc8a5510d0598d437bea1ade6056f017", "si...
""" Django settings for reactlibapp project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build ...
{ "content_hash": "83ee08e18d271712dc3394fd3e83abb6", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 91, "avg_line_length": 28.830065359477125, "alnum_prop": 0.6871457719338019, "repo_name": "andela-sjames/Django-ReactJS-Library-App", "id": "0694b63e9212d27b2184a0536a3fde02...