repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
ruleant/weblate
refs/heads/master
weblate/trans/tests/test_requirements.py
2
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
Dekken/tick
refs/heads/master
tick/solver/history/history.py
2
# License: BSD 3 clause from collections import defaultdict import dill import numpy as np from tick.base import Base from numpy.linalg import norm def spars_func(coeffs, **kwargs): eps = np.finfo(coeffs.dtype).eps return np.sum(np.abs(coeffs) > eps, axis=None) class History(Base): """A class to manag...
kvesteri/sqlalchemy-i18n
refs/heads/master
tests/test_joined_loading.py
2
# -*- coding: utf-8 -*- import sqlalchemy as sa from tests import ClassicTestCase, DeclarativeTestCase class Suite(object): def test_joinedload_for_current_translation(self): article = ( self.session.query(self.Article) .options(sa.orm.joinedload(self.Article.current_translation)...
edx/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/contrib/admin/validation.py
153
from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.fields import FieldDoesNotExist from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model, _get_foreign_key) from django.contrib.admin.util import get_fields_from_path, NotRelationFiel...
GenericStudent/home-assistant
refs/heads/dev
tests/components/blebox/test_light.py
7
"""BleBox light entities tests.""" import logging import blebox_uniapi import pytest from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_HS_COLOR, ATTR_WHITE_VALUE, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_WHITE_VALUE, ) from homeassistant.const import ( ATTR_SUPPORTED_FE...
arcolife/django-scholarec
refs/heads/master
scholarec_web/social/tests/backends/base.py
10
import unittest import requests from sure import expect from httpretty import HTTPretty from social.utils import module_member, parse_qs from social.backends.utils import user_backends_data, load_backends from social.tests.strategy import TestStrategy from social.tests.models import User, TestUserSocialAuth, TestNonc...
wyaeld/fpm
refs/heads/master
lib/fpm/package/pyfpm/get_metadata.py
23
from distutils.core import Command import os import sys import pkg_resources try: import json except ImportError: import simplejson as json PY3 = sys.version_info[0] == 3 if PY3: def u(s): return s else: def u(s): if isinstance(u, unicode): return u return s.decode(...
nhenezi/kuma
refs/heads/master
vendor/packages/sqlalchemy/lib/sqlalchemy/test/__init__.py
8
"""Testing environment and utilities. This package contains base classes and routines used by the unit tests. Tests are based on Nose and bootstrapped by noseplugin.NoseSQLAlchemy. """ from sqlalchemy.test import testing, engines, requires, profiling, pickleable, config from sqlalchemy.test.schema import Column, ...
lebauce/artub
refs/heads/master
builder/Installer/mf.py
1
import sys, string, os, imp, marshal iswin = sys.platform[:3] == 'win' if iswin: import dircache #=======================Owners==========================# # An Owner does imports from a particular piece of turf # That is, there's an Owner for each thing on sys.path # There are owners for directories and .p...
chromium/chromium
refs/heads/master
tools/perf/contrib/cluster_telemetry/loading_ct.py
10
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from contrib.cluster_telemetry import loading_base_ct # pylint: disable=protected-access class LoadingClusterTelemetry(loading_base_ct._LoadingBaseClusterTel...
jhawkesworth/ansible
refs/heads/devel
lib/ansible/module_utils/manageiq.py
38
# # Copyright (c) 2017, Daniel Korn <korndaniel1@gmail.com> # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the...
spnow/TekDefense
refs/heads/master
regexTester.py
21
#!/usr/bin/python ''' Created on Oct 19, 2012 Script to test regex against a file containing values to match. @author 1aN0rmus@tekdefense.com ''' import re fileImport =open('sample.txt') strFile='' for line in fileImport: strFile += line print(strFile) regexValue = re.compile('\d{1,5}\s\w+\s\w{1,3}\.') rege...
hackndev/dalboot
refs/heads/master
dalmod/pdb.py
1
# Simple PDB file format parser # Author: Alex Osborne <alex@mugofgrog.com> # Created: 27 Nov 2006 # import struct import sys def main(): if len(sys.argv) > 1: fn = sys.argv[1] else: fn = 'brahma-spl.pdb' out = file('test.pdb','wb') pdb = Pdb() pdb.read(file(fn,'rb')) print str(pdb) pdb.write(out) def trun...
res2k/0install
refs/heads/master
zeroinstall/support/ssl_match_hostname.py
2
"""This is a temporary hack to fix an SSL bug in Python versions before 3.2. It is used automatically when you download an HTTPS URL using a Fetcher. Copyright: Python Software Foundation License: MIT License Downloaded from: http://pypi.python.org/pypi/backports.ssl_match_hostname/""" # pylint: disable=W0312 import...
google/automl
refs/heads/master
efficientdet/visualize/shape_utils.py
1
# Copyright 2020 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
foursquare/commons-old
refs/heads/master
src/python/twitter/pants/tasks/jvm_run.py
2
# ================================================================================================== # Copyright 2012 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
luistorresm/odoo
refs/heads/8.0
addons/account/project/report/__init__.py
427
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
RAtechntukan/Sick-Beard
refs/heads/development
cherrypy/lib/jsontools.py
80
import sys import cherrypy if sys.version_info >= (2, 6): # Python 2.6: simplejson is part of the standard library import json else: try: import simplejson as json except ImportError: json = None if json is None: def json_decode(s): raise ValueError('No JSON library is avai...
popazerty/SDG-gui
refs/heads/master
lib/python/Screens/NumericalTextInputHelpDialog.py
156
from Screen import Screen from Components.Label import Label class NumericalTextInputHelpDialog(Screen): def __init__(self, session, textinput): Screen.__init__(self, session) self["help1"] = Label(text="<") self["help2"] = Label(text=">") for x in (1, 2, 3, 4, 5, 6, 7, 8, 9, 0): self["key%d" % x] = Label(...
SophosBlitz/glacon
refs/heads/master
plugins/suggest.py
24
import random import re from util import hook, http @hook.command def suggest(inp, inp_unstripped=None): ".suggest [#n] <phrase> -- gets a random/the nth suggested google search" if inp_unstripped is not None: inp = inp_unstripped m = re.match('^#(\d+) (.+)$', inp) num = 0 if m: ...
julienchurch/julienchurch.com
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
886
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml import gyp.generator...
tchernomax/ansible
refs/heads/devel
lib/ansible/modules/clustering/consul_kv.py
7
#!/usr/bin/python # # (c) 2015, Steve Gargan <steve.gargan@gmail.com> # (c) 2018 Genome Research Ltd. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_versio...
CoDEmanX/ArangoDB
refs/heads/devel
3rdParty/V8-4.3.61/build/gyp/test/actions-subdir/gyptest-action.py
501
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test actions that output to PRODUCT_DIR. """ import TestGyp # TODO fix this for xcode: http://code.google.com/p/gyp/issues/detail?id=8...
hardikvasa/google-images-download
refs/heads/master
docs/conf.py
1
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
argusdev17/ARGUS
refs/heads/master
contrib/testgen/base58.py
2139
''' Bitcoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): return c def chr(n): return byte...
ioram7/keystone-federado-pgid2013
refs/heads/master
build/setuptools/build/lib.linux-x86_64-2.7/setuptools/tests/test_dist_info.py
452
"""Test .dist-info style distributions. """ import os import shutil import tempfile import unittest import textwrap try: import ast except: pass import pkg_resources from setuptools.tests.py26compat import skipIf def DALS(s): "dedent and left-strip" return textwrap.dedent(s).lstrip() class TestDist...
DasIch/django
refs/heads/master
django/conf/locale/de_CH/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date from __future__ import unicode_literals DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATE...
SuLab/biothings.api
refs/heads/master
biothings/www/api/es/handlers/biothing_handler.py
1
from tornado.web import HTTPError from biothings.www.api.es.handlers.base_handler import BaseESRequestHandler from biothings.utils.www import sum_arg_dicts from biothings.www.api.helper import BiothingParameterTypeError import logging import traceback class BiothingHandler(BaseESRequestHandler): ''' Request handle...
djkonro/client-python
refs/heads/master
kubernetes/test/test_v1beta1_http_ingress_rule_value.py
2
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
JuniorPolegato/pole
refs/heads/master
src/pole/PoleLog.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """PoleLog - Operações com Log em Python Arquivo: PoleLog.py Versão.: 0.2.0 Autor..: Claudio Polegato Junior Data...: 04 Abr 2011 Copyright © 2011 - Claudio Polegato Junior <junior@juniorpolegato.com.br> Todos os direitos reservados """ import os import errno import logg...
sparkslabs/kamaelia
refs/heads/master
Code/Python/Kamaelia/Kamaelia/Util/LossyConnector.py
9
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
Cynary/distro6.01
refs/heads/master
arch/6.01Soft/lib601-F13-4/build/lib/soar/worlds/oneDdiff.py
2
dimensions(8,2) wall((0, 2), (8, 2)) wall((1, 1.5),(1.5, 1.5)) wall((2, 1.6),(2.8, 1.6)) wall((3.1, 1.4),(3.5, 1.4)) initialRobotLoc(1.0, 1.0)
CingHu/neutron-ustack
refs/heads/master
neutron/tests/unit/midonet/test_midonet_driver.py
8
# Copyright (C) 2012 Midokura Japan K.K. # Copyright (C) 2013 Midokura PTE LTD # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.or...
luofei98/qgis
refs/heads/master
tests/src/python/test_qgsrectangle.py
7
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsComposition. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __...
eicher31/compassion-modules
refs/heads/dev
message_center_compassion/migrations/1.6/pre-migration.py
4
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
LeadsPlus/OpenClimateGIS
refs/heads/master
src/openclimategis/util/toshp.py
7
from osgeo import ogr, osr import datetime from django.contrib.gis.gdal.geomtype import OGRGeomType from django.contrib.gis.gdal.error import check_err import zipfile from django.http import HttpResponse import os from io import BytesIO class OpenClimateShp(object): """ Write ESRI Shapefiles from dictionary l...
andresriancho/w3af-api-client
refs/heads/master
tests/utils/mock.py
1
import w3af_api_client from w3af_api_client.finding import Finding from w3af_api_client.traffic import Traffic class MockFinding(Finding): """ A wrapper around the finding to help test w3af-api-client implementations """ DATA = {'url': 'http://www.w3af.org/', 'var': 'id', 'resp...
szopu/django
refs/heads/master
tests/migrations/test_autodetector.py
6
# -*- coding: utf-8 -*- from django.conf import settings from django.test import TestCase, override_settings from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.questioner import MigrationQuestioner from django.db.migrations.state import ProjectState, ModelState from django.db....
LukeMarlin/pmiCardReader
refs/heads/master
main.py
1
#!/usr/bin/python3.2 import RPIO import signal import sys from cardReader import CardReader BIT_TRANSMISSION_TIME = 0.002 #From wiegand specification FRAMESIZE = 26 #Supposed size of received frame FRAMETIME = FRAMESIZE * BIT_TRANSMISSION_TIME #Theoric time necessary to transfer a frame ALLOWANCE = 10 #Auhtorized all...
keen99/SickRage
refs/heads/master
lib/cachecontrol/heuristics.py
374
import calendar import time from email.utils import formatdate, parsedate, parsedate_tz from datetime import datetime, timedelta TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT" def expire_after(delta, date=None): date = date or datetime.now() return date + delta def datetime_to_header(dt): return formatdate(c...
muntasirsyed/intellij-community
refs/heads/master
python/testData/codeInsight/classMRO/ExampleFromDoc4.py
83
class F(object): pass class E(F): pass class G(E, F): pass
laosiaudi/tensorflow
refs/heads/master
tensorflow/models/image/cifar10/cifar10.py
4
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
manashmndl/pattern_classification
refs/heads/master
machine_learning/webapp/movieclassifier/app.py
17
from flask import Flask, render_template, request from wtforms import Form, TextAreaField, validators import pickle import sqlite3 import re import os import numpy as np app = Flask(__name__) ######## Preparing the Classifier import re from sklearn.feature_extraction.text import HashingVectorizer cur_dir = os.path....
UKTradeInvestment/export-wins-data
refs/heads/master
fdi/tests/base.py
1
import json from uuid import UUID from django.utils.datetime_safe import datetime from django.utils.timezone import get_current_timezone from sso.tests.test_oauth import BaseSSOTestCase FDIValueMapping = { UUID('38e36c77-61ad-4186-a7a8-ac6a1a1104c6'): 'high', UUID('002c18d9-f5c7-4f3c-b061-aee09fce8416'): 'go...
oihane/odoomrp-wip
refs/heads/8.0
product_variants_no_automatic_creation/models/pricelist.py
29
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
siosio/intellij-community
refs/heads/master
python/testData/refactoring/pullup/severalParents.after.py
80
class Spam: pass class Parent_1(object, Spam): pass class Parent_2(): pass class Child(Parent_1, Parent_2): pass
padmec-reservoir/PRESTO
refs/heads/master
presto/Preprocessors/Multiscale/Structured2D/StructuredMultiscaleMesh.py
1
import numpy as np from pymoab import core from pymoab import types from pymoab import topo_util class StructuredMultiscaleMesh: """ Defines a structured multiscale mesh representation. Parameters ---------- coarse_ratio: List or array of integers List or array containing three values indicat...
mivanov/editkit
refs/heads/master
editkit/ckeditor/tests/tests.py
1
# coding=utf-8 import os from django.test import TestCase from django.db import models from django.core import exceptions from ckeditor.models import XHTMLField from ckeditor.models import XMLField from ckeditor.models import HTML5Field from ckeditor.models import HTML5FragmentField from ckeditor.widgets import CKEd...
suyashphadtare/test
refs/heads/develop
erpnext/accounts/doctype/budget_distribution/test_budget_distribution.py
40
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe test_records = frappe.get_test_records('Budget Distribution')
anggorodewanto/oppia
refs/heads/develop
core/domain/collection_services.py
5
# coding: utf-8 # # Copyright 2015 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
deconst/preparer-sphinx
refs/heads/master
deconstrst/builders/serial.py
1
# -*- coding: utf-8 -*- import urllib.parse from docutils import nodes from sphinx import addnodes from sphinx.builders.html import JSONHTMLBuilder from sphinx.util import jsonimpl from sphinx.util.osutil import relative_uri from .common import init_builder, derive_content_id from .envelope import Envelope TOC_DOCN...
eayunstack/rally
refs/heads/product
rally/task/engine.py
2
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
schumi2004/NOT_UPDATED_Sick-Beard-Dutch
refs/heads/dutch-tpb
cherrypy/_cpdispatch.py
35
"""CherryPy dispatchers. A 'dispatcher' is the object which looks up the 'page handler' callable and collects config for the current request based on the path_info, other request attributes, and the application architecture. The core calls the dispatcher as early as possible, passing it a 'path_info' argument. ...
tensor-tang/Paddle
refs/heads/develop
python/paddle/fluid/layers/nn.py
1
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
osuripple/ripple
refs/heads/master
c.ppy.sh/serverPackets.py
1
""" Contains functions used to write specific server packets to byte streams """ import packetHelper import dataTypes import userHelper import glob import userRanks import packetIDs import slotStatuses import matchModModes import random """ Login errors packets (userID packets derivates) """ def loginFailed(): return...
berrange/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/235_placeholder.py
338
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
noxrepo/pox
refs/heads/carp
pox/messenger/__init__.py
37
# Copyright 2011,2012 James McCauley # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
AkA84/edx-platform
refs/heads/master
openedx/core/lib/api/tests/test_authentication.py
87
"""Tests for util.authentication module.""" from mock import patch from django.conf import settings from rest_framework import permissions from rest_framework.compat import patterns, url from rest_framework.tests import test_authentication from provider import scope, constants from unittest import skipUnless from ..a...
cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools
refs/heads/master
third_party/boto/pyami/startup.py
107
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
ntt-sic/nova
refs/heads/master
nova/api/openstack/compute/contrib/extended_availability_zone.py
15
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Netease, LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licens...
asimshankar/tensorflow
refs/heads/master
tensorflow/python/training/warm_starting_util_test.py
11
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
uberamd/NGECore2
refs/heads/master
scripts/object/draft_schematic/structure/generic_house_player_large_window_s02.py
85615
import sys def setup(core, object): return
ibinti/intellij-community
refs/heads/master
python/testData/optimizeImports/orderNamesInsightFromImportDoesntAffectAlreadyOrderedImports.py
70
# Optimize Imports should not re-create imports statements that are in order from module1 import a, b, c from module2 import A, B, C print(A, B, C, a, b, c)
mavas/lojypitan
refs/heads/master
lolpython.py
1
''' Implementation of the lojypitan language. Converts from Lojban to Python then optionally runs the Python. This package depends on PLY -- http://www.dabeaz.com/ply/ Written by David Kilgore 26 October 2015, San Jose, California This software is in the public domain. For details see: http://creativecommons.org/...
ii0/pybrain
refs/heads/master
pybrain/structure/modules/evolinonetwork.py
25
__author__ = 'Michael Isik' from pybrain.structure.networks.recurrent import RecurrentNetwork from pybrain.structure.modules.lstm import LSTMLayer from pybrain.structure.modules.linearlayer import LinearLayer from pybrain.structure.connections.full import FullConnection from pybrain.structure.modules.module import Mo...
SimenB/thefuck
refs/heads/master
tests/rules/test_react_native_command_unrecognized.py
5
import pytest from io import BytesIO from thefuck.rules.react_native_command_unrecognized import match, \ get_new_command from thefuck.types import Command output = "Unrecognized command '{}'".format stdout = b''' Scanning 615 folders for symlinks in /home/nvbn/work/zcho/BookkaWebView/node_modules (6ms) Usage:...
sidartaoliveira/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/portage.py
71
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, William L Thomson Jr # (c) 2013, Yap Sok Ann # Written by Yap Sok Ann <sokann@gmail.com> # Modified by William L. Thomson Jr. <wlt@o-sinc.com> # Based on apt module written by Matthew Williams <matthew@flowroute.com> # # This module is free software: you can redist...
bodi000/odoo
refs/heads/master
openerp/report/render/rml2txt/__init__.py
381
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
google-research/google-research
refs/heads/master
m_theory/dim4/so8_supergravity_extrema/colab/__init__.py
218
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
jessicalucci/TaskManagement
refs/heads/master
taskflow/tests/unit/persistence/test_dir_persistence.py
2
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2013 Rackspace Hosting All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at #...
USBhost/Nexus-payer-kernel
refs/heads/2.0.y
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
Unofficial-Extend-Project-Mirror/openfoam-extend-Breeder-other-scripting-PyFoam
refs/heads/master
unittests/IPythonHelpers/__init__.py
15
import unittest theSuite=unittest.TestSuite()
LeonardCohen/coding
refs/heads/master
hd/mrdp/partitioning_m.py
1
#!/usr/bin/env python import sys for line in sys.stdin: line_d = eval(line) d_m = {} newline = line_d['LastAccessDate'][:7]+'\t'+line print(newline)
bbcf/bsPlugins
refs/heads/master
tests/test_form.py
1
#!/usr/bin/env python import sys import bsPlugins def formtest(plugin): imp = "from bsPlugins.%s import %sForm" % (plugin,plugin) test = "bsPlugins.base.test_form(%sForm, port=8080)" % plugin exec(imp) exec(test) if __name__ == '__main__': plugin = sys.argv[1] print "Test plugin %s" % plugin ...
jessstrap/servotk
refs/heads/master
components/script/dom/bindings/codegen/parser/runtests.py
146
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os, sys import glob import optparse import traceback import WebIDL class TestHarness(object): def __init__(s...
NSInteger/kule
refs/heads/master
kule/__init__.py
2
from kule import *
khalilbenihoud/lightbloog
refs/heads/master
vendor/silex/silex/doc/conf.py
171
import sys, os from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer sys.path.append(os.path.abspath('_exts')) extensions = [] master_doc = 'index' highlight_language = 'php' project = u'Silex' copyright = u'2010 Fabien Potencier' version = '0' release = '0.0.0' lexers['php'] = PhpLexer(s...
dlazz/ansible
refs/heads/devel
lib/ansible/module_utils/network/cnos/cnos.py
5
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by # Ansible still belong to the author of the module, and may assign their own # license to the complete wo...
cfg2015/EPT-2015-2
refs/heads/master
addons/procurement/__openerp__.py
267
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
pwarren/AGDeviceControl
refs/heads/master
agdevicecontrol/thirdparty/site-packages/win32/zope/interface/tests/__init__.py
438
# # This file is necessary to make this directory a package.
andresailer/DIRAC
refs/heads/rel-v6r22
StorageManagementSystem/Agent/__init__.py
19
""" DIRAC.StorageManagementSystem.Agent package """
twilio/twilio-python
refs/heads/main
twilio/rest/voice/__init__.py
2
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base.domain import Domain from twilio.rest.voice.v1 import V1 class Voice(Domain): def __init__(self, twilio): """ Initialize the Voice Domain :returns: Do...
wileeam/airflow
refs/heads/master
airflow/models/taskfail.py
4
# # 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 # "License"); you may not...
rapidhere/rpbtman_autosign
refs/heads/master
pytz/zoneinfo/America/Recife.py
9
'''tzinfo timezone information for America/Recife.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Recife(DstTzInfo): '''America/Recife timezone definition. See datetime.tzinfo for details''' zone = 'America/Recife' ...
BiznetGIO/horizon
refs/heads/stable/pike-gio
openstack_dashboard/test/integration_tests/regions/tables.py
2
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
elenaoat/tests
refs/heads/master
twisted-deferred/deferred-simulator.py
11
#!/usr/bin/env python import optparse, sys from twisted.internet import defer from twisted.python.failure import Failure __doc__ = """\ usage: %prog A Deferred simulator. Use this to see how a particular set of callbacks and errbacks will fire in a deferred.\ """ class BadInput(Exception): pass def parse_args(): ...
G-P-S/depot_tools
refs/heads/master
third_party/boto/regioninfo.py
73
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # 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 res...
benmcclelland/kinetic-c
refs/heads/master
vendor/protobuf-2.6.0/gtest/test/gtest_help_test.py
2968
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
blanu/py-obfsproxy
refs/heads/master
src/obfsproxy/transports/obfs3.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- """ The obfs3 module implements the obfs3 protocol. """ from dust.extensions.lite.lite_socket2 import makeSession, \ makeEphemeralSession, createEphemeralKeypair from dust.core.dust_packet import IV_SIZE, KEY_SIZE from obfsproxy.crypto.aes import AESCoder from obfsproxy....
robbiet480/home-assistant
refs/heads/dev
tests/components/webhook/test_init.py
6
"""Test the webhook component.""" import pytest from homeassistant.config import async_process_ha_core_config from homeassistant.setup import async_setup_component @pytest.fixture def mock_client(hass, hass_client): """Create http client for webhooks.""" hass.loop.run_until_complete(async_setup_component(has...
hsuantien/scikit-learn
refs/heads/master
examples/linear_model/plot_ridge_path.py
254
""" =========================================================== Plot Ridge coefficients as a function of the regularization =========================================================== Shows the effect of collinearity in the coefficients of an estimator. .. currentmodule:: sklearn.linear_model :class:`Ridge` Regressi...
xasopheno/audio_visual
refs/heads/master
audio/venv/lib/python2.7/site-packages/pip/index.py
336
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi from collections import namedtuple import itertools import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor....
afandria/sky_engine
refs/heads/master
tools/git/git-diff-ide.py
197
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Invokes git diff [args...] and inserts file:line in front of each line of diff output where possible. This is useful fro...
Lektorium-LLC/edx-platform
refs/heads/master
lms/djangoapps/edxnotes/plugins.py
5
""" Registers the "edX Notes" feature for the edX platform. """ from django.conf import settings from django.utils.translation import ugettext_noop from courseware.tabs import EnrolledTab class EdxNotesTab(EnrolledTab): """ The representation of the edX Notes course tab type. """ type = "edxnotes" ...
wreckJ/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImportedSeveralTimes/my_module.py
240
def my_func(): pass
mikedingjan/wagtail
refs/heads/master
wagtail/core/apps.py
12
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class WagtailCoreAppConfig(AppConfig): name = 'wagtail.core' label = 'wagtailcore' verbose_name = _("Wagtail core") def ready(self): from wagtail.core.signal_handlers import register_signal_handlers ...
mewbak/idc
refs/heads/master
aterm/__init__.py
1
'''Package for term representation and manipulation. Loosely inspired on the Java version of the ATerm library. '''
hwine/build-relengapi
refs/heads/master
setup.py
1
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import import os from setuptools import find_packages from setuptools import setup he...
yencarnacion/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.3/tests/regressiontests/admin_util/models.py
52
from django.db import models class Article(models.Model): """ A simple Article model for testing """ site = models.ForeignKey('sites.Site', related_name="admin_articles") title = models.CharField(max_length=100) title2 = models.CharField(max_length=100, verbose_name="another name") created ...
tarasfrompir/majordomo
refs/heads/master
lib/python/job.py
2
from mjd_constants import * import re import MySQLdb as mdb import sys import six import datetime import time from typing import List, Any from datetime import datetime as DT, timedelta import mjdm def clearScheduledJob(title): con = mdb.connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, charset='utf8') ...