repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
mozilla/stoneridge | refs/heads/master | python/src/Lib/plat-mac/lib-scriptpackages/Terminal/Standard_Suite.py | 73 | """Suite Standard Suite: Common classes and commands for most applications.
Level 1, version 1
Generated from /Applications/Utilities/Terminal.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = '????'
class Standard_Suite_Events:
_argmap_close = {
'saving_i... |
OpenLD/enigma2-wetek | refs/heads/master | lib/python/Components/RecordingConfig.py | 1 | from config import ConfigSelectionNumber, ConfigYesNo, ConfigSubsection, ConfigSelection, config
from enigma import pNavigation
def InitRecordingConfig():
config.recording = ConfigSubsection()
# actually this is "recordings always have priority". "Yes" does mean: don't ask. The RecordTimer will ask when value is 0.
... |
zvolsky/vylet | refs/heads/master | languages/fr-ca.py | 1 | # -*- coding: utf-8 -*-
{
'!langcode!': 'fr-ca',
'!langname!': 'Français (Canadien)',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer ... |
ExcessiveUseOfCobblestone/tgstation | refs/heads/master | tools/midi2piano/pyperclip/exceptions.py | 113 | import ctypes
class PyperclipException(RuntimeError):
pass
class PyperclipWindowsException(PyperclipException):
def __init__(self, message):
message += " (%s)" % ctypes.WinError()
super(PyperclipWindowsException, self).__init__(message)
|
jalexvig/tensorflow | refs/heads/master | tensorflow/contrib/tensorrt/test/binary_tensor_weight_broadcast_test.py | 2 | # Copyright 2018 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... |
Martin2112/certificate-transparency | refs/heads/master | python/ct/crypto/asn1/tag_test.py | 35 | #!/usr/bin/env python
import unittest
from ct.crypto.asn1 import tag
class TagTest(unittest.TestCase):
"""Test tag encoding."""
def test_encode_read(self):
valid_tags = (
# (initializers, encoding)
((0, tag.UNIVERSAL, tag.PRIMITIVE), "\x00"),
((1, tag.UNIVERSAL, ... |
twitter/pants | refs/heads/master | src/python/pants/base/payload.py | 1 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import object
from hashlib import sha1
from future.utils import PY3
from ... |
15Dkatz/pants | refs/heads/master | src/python/pants/util/tarutil.py | 12 | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import tarfile
impo... |
gitgitcode/myflask | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py | 2918 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
franosincic/edx-platform | refs/heads/master | lms/djangoapps/__init__.py | 12133432 | |
BitcoinSolution/xenocoin | refs/heads/master | qa/rpc-tests/test_framework/__init__.py | 12133432 | |
maxsocl/django | refs/heads/master | django/contrib/gis/serializers/__init__.py | 12133432 | |
motord/Motorcycle-Diaries | refs/heads/master | lib/gdata/contacts/client.py | 7 | #!/usr/bin/env python
#
# Copyright (C) 2009 Google Inc.
#
# 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 ... |
resmo/ansible | refs/heads/devel | test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/test/test_subdir/my_subdir_tests.py | 66 | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
def subdir_test(data):
return data == 'subdir_from_user'
class TestModule(object):
def tests(self):
return {
'subdir_test': subdir_test
}
|
maoy/zknova | refs/heads/zk-servicegroup | nova/tests/image/test_glance.py | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack 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/... |
alxgu/ansible | refs/heads/devel | test/units/modules/network/f5/test_bigiq_device_discovery.py | 38 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2019, F5 Networks Inc.
# 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
import os
import json
import pytest
import sys
if sys.version_info < (2... |
sathieu/samba | refs/heads/master | python/samba/tests/dsdb.py | 1 | # Unix SMB/CIFS implementation. Tests for dsdb
# Copyright (C) Matthieu Patou <mat@matws.net> 2010
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at you... |
sapientgov/openfda-travel | refs/heads/master | misc/wapiti-2.3.0/wapitiCore/report/openvasreportgenerator.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the Wapiti project (http://wapiti.sourceforge.net)
# Copyright (C) 2013 Nicolas Surribas
#
# 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 Softwar... |
NoisyText/portia | refs/heads/master | slybot/slybot/fieldtypes/images.py | 23 | """
Images
"""
from scrapely.extractors import extract_image_url
from slybot.fieldtypes.url import UrlFieldTypeProcessor
class ImagesFieldTypeProcessor(UrlFieldTypeProcessor):
name = 'image'
description = 'extracts image URLs'
def extract(self, text):
return extract_image_url(text)
|
whatsthehubbub/playpilots | refs/heads/master | ebi/kipwip/admin.py | 1 | from ebi.kipwip.models import KippenrenCode, Kippenrace, Kippenrijder
from django.contrib import admin
class KippenrenCodeAdmin(admin.ModelAdmin):
list_display = ('created', 'code', 'player')
admin.site.register(KippenrenCode, KippenrenCodeAdmin)
class KippenraceAdmin(admin.ModelAdmin):
list_display = ('racei... |
liangtianyou/ST | refs/heads/master | stclient/stcnetwork.py | 1 | #-*- coding: utf-8 -*-
import os
import sys
import traceback
import utils
import errors
from base import Frame,Page,web,stow,_
#---------------------------------
# 网口管理
#---------------------------------
class iface(Page):
def _logic(self):
self.content = stow({})
self.setup = stow({
'... |
Teagan42/home-assistant | refs/heads/dev | tests/components/counter/common.py | 24 | """Collection of helper methods.
All containing methods are legacy helpers that should not be used by new
components. Instead call the service directly.
"""
from homeassistant.components.counter import (
DOMAIN,
SERVICE_DECREMENT,
SERVICE_INCREMENT,
SERVICE_RESET,
)
from homeassistant.const import ATTR... |
asoneofus/v350 | refs/heads/master | FADG_4.39A/external/webkit/WebKitTools/Scripts/webkitpy/diff_parser.py | 3 | # Copyright (C) 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 of conditions and the f... |
erudit/zenon | refs/heads/master | eruditorg/erudit/migrations/0077_auto_20171005_1003.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-10-05 15:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('erudit', '0076_auto_20171005_0938'),
]
operations = [
migrations.AlterModel... |
ovresko/erpnext | refs/heads/master | erpnext/support/web_form/issues/issues.py | 309 | from __future__ import unicode_literals
import frappe
def get_context(context):
# do your magic here
pass
|
micropython/micropython | refs/heads/master | tests/basics/compare_multi.py | 118 | print(1 < 2 < 3)
print(1 < 2 < 3 < 4)
print(1 > 2 < 3)
print(1 < 2 > 3)
|
gooofy/zamia-ai | refs/heads/master | zamiaai/skills/mythology/mythology.py | 3 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016, 2017, 2018 Guenter Bartsch
#
# 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.... |
diegocortassa/TACTIC | refs/heads/master | 3rd_party/site-packages/more_itertools/tests/__init__.py | 12133432 | |
manisandro/QGIS | refs/heads/master | python/plugins/processing/core/__init__.py | 12133432 | |
adorton-adobe/user-sync.py | refs/heads/v2 | tests/conftest.py | 2 | import os
import pytest
from user_sync import config
import shutil
@pytest.fixture
def fixture_dir():
return os.path.abspath(
os.path.join(
os.path.dirname(__file__), 'fixture'))
@pytest.fixture
def cli_args():
def _cli_args(args_in):
"""
:param dict args:
:retu... |
SuriyaaKudoIsc/olympia | refs/heads/master | lib/video/tests.py | 13 | import os
import stat
import tempfile
import pytest
from mock import Mock, patch
from nose import SkipTest
from nose.tools import eq_
import waffle
from django.conf import settings
import amo
import amo.tests
from amo.tests.test_helpers import get_image_path
from devhub.models import UserLog
from lib.video import ge... |
schinke/solid-fortnight-ba | refs/heads/master | flask/venv/lib/python2.7/site-packages/setuptools/depends.py | 114 | import sys
import imp
import marshal
from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN
from distutils.version import StrictVersion
from setuptools.extern import six
__all__ = [
'Require', 'find_module', 'get_module_constant', 'extract_constant'
]
class Require:
"""A prerequisite to building or... |
sloanesturz/cs224u-final-project | refs/heads/master | metrics.py | 2 | __author__ = "Bill MacCartney"
__copyright__ = "Copyright 2015, Bill MacCartney"
__credits__ = []
__license__ = "GNU General Public License, version 2.0"
__version__ = "0.9"
__maintainer__ = "Bill MacCartney"
__email__ = "See the author's website"
# An evaluation metric is a function that takes a list of parses and an... |
boudewijnrempt/kura | refs/heads/master | kuragui/guisyncedit.py | 1 | from qt import *
import string
from guimultilineedit import guiMultiLineEdit
TRUE=1
FALSE=0
class guiListEditor(guiMultiLineEdit):
def keyPressEvent(self, e):
if e.key()==Key_Return:
pass
elif e.key()==4103 and e.state()==16:
line=self.cursorPosition()[0]
self.emit(PYSIGNAL("lineRemoved"... |
epfl-lts2/room_transfer_function_toolkit | refs/heads/master | room_transfer_function_toolkit_python/room_transfer_function_toolkit/acoustic_methods.py | 1 | import classes
import other_methods
from scipy.signal.ltisys import TransferFunction as transfer_function
import math
import numpy as np
def get_air_properties(temperature):
'''
Retruns a the information about the air temperature depenent
parameters: sound speed, air density and acoustic impedance.
Inp... |
JshWright/home-assistant | refs/heads/dev | homeassistant/components/automation/mqtt.py | 21 | """
Offer MQTT listening automation rules.
For more details about this automation rule, please refer to the documentation
at https://home-assistant.io/docs/automation/trigger/#mqtt-trigger
"""
import asyncio
import json
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.components.... |
TangHao1987/intellij-community | refs/heads/master | python/lib/Lib/encodings/charmap.py | 860 | """ Generic Python Character Mapping Codec.
Use this codec directly rather than through the automatic
conversion mechanisms supplied by unicode() and .encode().
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import codecs
### Codec APIs
class... |
avatar29A/pyfuzzy | refs/heads/master | fuzzy/norm/HamacherUnion.py | 1 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Rene Liebscher
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option) any
# later version.... |
VoiDeD/Sick-Beard | refs/heads/development | sickbeard/image_cache.py | 27 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of t... |
rue89-tech/edx-platform | refs/heads/master | common/djangoapps/terrain/stubs/tests/test_lti_stub.py | 32 | """
Unit tests for stub LTI implementation.
"""
from mock import Mock, patch
import unittest
import urllib2
import requests
from terrain.stubs.lti import StubLtiService
class StubLtiServiceTest(unittest.TestCase):
"""
A stub of the LTI provider that listens on a local
port and responds with pre-defined gr... |
yihjie/Python_Crash_Course | refs/heads/master | Chapter_09/dog.py | 1 | # -*- coding:utf-8
class Dog():
def __init__(self, name, age):
self.name = name
self.age = age
def sit(self):
print(self.name.title() + " is now sitting.")
def roll_over(self):
print(self.name.title() + " rolled over!") |
cbertinato/pandas | refs/heads/master | pandas/tests/generic/test_frame.py | 1 | from copy import deepcopy
from distutils.version import LooseVersion
from operator import methodcaller
import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame, MultiIndex, Series, date_range
import pandas.util.testing as tm
from pandas.util.testing ... |
awni/tensorflow | refs/heads/master | tensorflow/python/summary/impl/__init__.py | 12133432 | |
lucasdavid/grapher | refs/heads/master | tests/parsers/__init__.py | 12133432 | |
bohlian/erpnext | refs/heads/develop | erpnext/buying/print_format/drop_shipping_format/__init__.py | 12133432 | |
boomsbloom/dtm-fmri | refs/heads/master | DTM/for_gensim/lib/python2.7/site-packages/pandas/tests/plotting/__init__.py | 12133432 | |
kevin-teddy/Beginning-Game-Development-with-Python-and-Pygame | refs/heads/master | Chapter 3/3-2.py | 3 | import pygame
from pygame.locals import *
from sys import exit
pygame.init()
SCREEN_SIZE = (800, 600)
screen = pygame.display.set_mode(SCREEN_SIZE, 0, 32)
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
exit()
print(event)
py... |
mermi/bedrock | refs/heads/master | bin/gen-crons.py | 18 | #!/usr/bin/env python
import os
from optparse import OptionParser
from jinja2 import Template
HEADER = '!!AUTO-GENERATED!! Edit {template}.tmpl instead.'
TEMPLATE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'etc', 'cron.d'))
def main():
parser = OptionParser()
parser.add_option('-w'... |
ToBeReplaced/ansible-modules-extras | refs/heads/devel | monitoring/sensu_check.py | 32 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Anders Ingemann <aim@secoya.dk>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... |
Dhivyap/ansible | refs/heads/devel | test/lib/ansible_test/_internal/manage_ci.py | 17 | """Access Ansible Core CI remote services."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import tempfile
import time
from .util import (
SubprocessError,
ApplicationError,
cmd_quote,
display,
ANSIBLE_TEST_DATA_ROOT,
)
from .util_common import... |
girving/tensorflow | refs/heads/master | tensorflow/contrib/constrained_optimization/python/constrained_minimization_problem.py | 11 | # Copyright 2018 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... |
psychopenguin/st2contrib | refs/heads/master | packs/servicenow/actions/get_non_structured.py | 1 | from lib.actions import BaseAction
class GetNonStructuredAction(BaseAction):
def run(self, table, query):
self.client.table = table # pylint: disable=no-member
response = self.client.get(query) # pylint: disable=no-member
return response
|
alx-eu/django | refs/heads/stable/1.5.x | django/contrib/auth/tests/management.py | 97 | from __future__ import unicode_literals
from datetime import date
from django.contrib.auth import models, management
from django.contrib.auth.management import create_permissions
from django.contrib.auth.management.commands import changepassword
from django.contrib.auth.models import User
from django.contrib.auth.test... |
vmanoria/bluemix-hue-filebrowser | refs/heads/master | hue-3.8.1-bluemix/desktop/core/ext-py/kazoo-2.0/kazoo/tests/test_counter.py | 50 | import uuid
from nose.tools import eq_
from kazoo.testing import KazooTestCase
class KazooCounterTests(KazooTestCase):
def _makeOne(self, **kw):
path = "/" + uuid.uuid4().hex
return self.client.Counter(path, **kw)
def test_int_counter(self):
counter = self._makeOne()
eq_(co... |
goodwinnk/intellij-community | refs/heads/master | python/testData/codeInsight/smartEnter/string_after.py | 83 | "some text"<caret> |
cynicaldevil/servo | refs/heads/master | etc/servo_gdb.py | 233 | # Copyright 2013 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
#... |
zhuwenping/python-for-android | refs/heads/master | python-modules/twisted/twisted/internet/test/test_gtkreactor.py | 56 | # Copyright (c) 2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests to ensure all attributes of L{twisted.internet.gtkreactor} are
deprecated.
"""
import sys
from twisted.trial.unittest import TestCase
class GtkReactorDeprecation(TestCase):
"""
Tests to ensure all attributes of L{twiste... |
sauloal/cnidaria | refs/heads/master | scripts/venv/lib/python2.7/site-packages/numpy/distutils/tests/pyrex_ext/setup.py | 135 | #!/usr/bin/env python
from __future__ import division, print_function
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('pyrex_ext', parent_package, top_path)
config.add_extension('primes',
['primes.pyx'])... |
caldwell/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_serializer.py | 451 | from __future__ import absolute_import, division, unicode_literals
import json
import unittest
from .support import get_data_files
try:
unittest.TestCase.assertEqual
except AttributeError:
unittest.TestCase.assertEqual = unittest.TestCase.assertEquals
import html5lib
from html5lib import constants
from html... |
ryanrdetzel/pjsip | refs/heads/master | tests/pjsua/scripts-pesq/201_codec_speex_16000.py | 3 | # $Id: 201_codec_speex_16000.py 2063 2008-06-26 18:52:16Z nanang $
#
from inc_cfg import *
# Call with Speex/16000 codec
test_param = TestParam(
"PESQ codec Speex WB (RX side uses snd dev)",
[
InstanceParam("UA1", "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav --... |
OpenBfS/dokpool-plone | refs/heads/master | Plone/src/docpool.transfers/setup.py | 1 | # -*- coding: utf-8 -*-
from setuptools import find_packages
from setuptools import setup
version = '0.0.4'
setup(
name='docpool.transfers',
version=version,
description="",
long_description="""\
""",
# Get more strings from
# http://www.python.org/pypi?%3Aaction=list_classifiers
classifi... |
openedoo/openedoo | refs/heads/master | openedoo/template_conf/project_template/project_name/management/commands/install_module.py | 3 | from flask_script import Command, Option
from openedoo.core.libs.get_requirement import *
from delete_module import Delete
import sys
import time
import shutil
import threading
from waiting_animated import animated
import pip
from create_module_app import get_root_project
delete_module = Delete()
BASE_DIR = os.path.di... |
rzenker/psphere-daemon | refs/heads/master | examples/find_vms_by_regex.py | 4 | #!/usr/bin/python
"""A script which generates DHCP configuration for hosts matching a regex.
Usage:
find_vms_by_regex.py <regex> <compute_resource>
e.g.
find_vms_by_regex.py 'ssi2+' 'Online Engineering'
"""
import re
import sys
from psphere.client import Client
from psphere.managedobjects import ComputeResour... |
miguel-porto/ecoSpace | refs/heads/master | R/ecoSpace/src/Infomap-0.18/examples/python/example-networkx.py | 4 | #!/usr/bin/env python
import networkx as nx
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from infomap import infomap
"""
Generate and draw a network with NetworkX, colored
according to the community structure found by Infomap.
"""
def findCommunities(G):
"""
Partition network with the Infoma... |
richbrowne/f5-cccl | refs/heads/master | f5_cccl/resource/ltm/test/test_pool.py | 1 | #!/usr/bin/env python
# Copyright 2017 F5 Networks Inc.
#
# 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... |
ian-garrett/meetMe | refs/heads/master | env/lib/python3.4/site-packages/flask/testing.py | 783 | # -*- coding: utf-8 -*-
"""
flask.testing
~~~~~~~~~~~~~
Implements test support helpers. This module is lazily imported
and usually not used in production environments.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from contextlib import contextmana... |
ipwndev/DSLinux-Mirror | refs/heads/master | user/samba/source/stf/standardcheck.py | 55 | #! /usr/bin/python
# Comfychair test cases for Samba
# Copyright (C) 2003 by Martin Pool <mbp@samba.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; either version 2 of the
# License, o... |
shumik/skencil-c | refs/heads/master | Script/unit.py | 1 | #
# unit.py - a module for unit conversion
# Tamito KAJIYAMA <26 March 2000>
# Copyright (C) 2000 by Tamito KAJIYAMA
# Copyright (C) 2000 by Bernhard Herzog
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published ... |
tedsunnyday/SE-Server | refs/heads/master | server/lib/jinja2/_stringdefs.py | 412 | # -*- coding: utf-8 -*-
"""
jinja2._stringdefs
~~~~~~~~~~~~~~~~~~
Strings of all Unicode characters of a certain category.
Used for matching in Unicode-aware languages. Run to regenerate.
Inspired by chartypes_create.py from the MoinMoin project, original
implementation from Pygments.
:co... |
andrewalexander/cloud-custodian | refs/heads/master | c7n/policy.py | 1 | # Copyright 2016 Capital One Services, LLC
#
# 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... |
signed/intellij-community | refs/heads/master | python/testData/refactoring/move/reformatFromImports/after/src/b.py | 30 | from lib import (
Class1,
Class2,
)
print(Class1())
def func():
print(Class2()) |
hovren/cyres | refs/heads/master | setup.py | 1 | from distutils.core import setup
from Cython.Distutils import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
import numpy
import os, tempfile, subprocess, shutil
# see http://openmp.org/wp/openmp-compilers/
omp_test = r"""#include <omp.h>
#include <stdio.h>
int main() {
#pragma om... |
sestrella/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/_na_cdot_aggregate.py | 44 | #!/usr/bin/python
# (c) 2017, NetApp, Inc
# 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_version': '1.1',
'status': ['deprecated'],
... |
atuljain/odoo | refs/heads/master | addons/calendar/contacts.py | 389 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... |
anastue/netforce | refs/heads/stable-3.1 | netforce_document/netforce_document/models/document_tmpl.py | 4 | # Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# 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, publ... |
moonbury/pythonanywhere | refs/heads/master | github/Numpy/Chapter9/candlesticks.py | 2 | from matplotlib.dates import DateFormatter
from matplotlib.dates import DayLocator
from matplotlib.dates import MonthLocator
from matplotlib.finance import quotes_historical_yahoo
from matplotlib.finance import candlestick
import sys
from datetime import date
import matplotlib.pyplot as plt
today = date.today()
start ... |
openweave/openweave-core | refs/heads/master | src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_25.py | 1 | #!/usr/bin/env python3
#
# Copyright (c) 2016-2017 Nest Labs, 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/lic... |
pleaseproject/python-for-android | refs/heads/master | python-build/python-libs/gdata/src/gdata/tlslite/integration/TLSTwistedProtocolWrapper.py | 237 | """TLS Lite + Twisted."""
from twisted.protocols.policies import ProtocolWrapper, WrappingFactory
from twisted.python.failure import Failure
from AsyncStateMachine import AsyncStateMachine
from gdata.tlslite.TLSConnection import TLSConnection
from gdata.tlslite.errors import *
import socket
import errno
... |
bcherry/adequatelygood | refs/heads/master | utils/external/simplejson/encoder.py | 4 | """
Implementation of JSONEncoder
"""
import re
ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
HAS_UTF8 = re.compile(r'[\x80-\xff]')
ESCAPE_DCT = {
'\\': '\\\\',
'"': '\\"',
'\b': '\\b',
'\f': '\\f',
'\n': '\\n',
'\r': '\\r',
'\t': '\\t',
}
fo... |
Ezhil-Language-Foundation/open-tamil | refs/heads/main | valai/solthiruthi.py | 1 | # * coding: utf8 *
#
# (C) 2019 Muthiah Annamalai <ezhillang@gmail.com>
#
# This file provides a REST API interface to Tamil spelling checker
# written in compliance
#
import requests
from collections import namedtuple
import re
Result = namedtuple("Result", ["word", "alternatives"])
BASEURL = "http://tamilpesu.us... |
atul-bhouraskar/django | refs/heads/master | django/conf/locale/en_GB/__init__.py | 12133432 | |
kernelci/kernelci-backend | refs/heads/kernelci.org | app/utils/bisect/tests/__init__.py | 12133432 | |
ftahmed/cli53 | refs/heads/master | cli53/client.py | 2 | import sys
import re
import itertools
import os
from cStringIO import StringIO
import time
import logging
try:
import boto.route53
import boto.jsonresponse
import boto.exception
import boto.ec2
except ImportError, ex:
print "Please install latest boto:"
print "pip install boto"
print "(erro... |
andrewfu0325/gem5-aladdin | refs/heads/ruby | ext/ply/test/lex_error1.py | 174 | # lex_error1.py
#
# Missing t_error() rule
import sys
if ".." not in sys.path: sys.path.insert(0,"..")
import ply.lex as lex
tokens = [
"PLUS",
"MINUS",
"NUMBER",
]
t_PLUS = r'\+'
t_MINUS = r'-'
t_NUMBER = r'\d+'
lex.lex()
|
duramato/SickRage | refs/heads/master | lib/hachoir_core/stream/stream.py | 95 | from hachoir_core.error import HachoirError
class StreamError(HachoirError):
pass
|
arcz/ansible-modules-core | refs/heads/devel | utilities/helper/fireball.py | 132 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of... |
MapofLife/MOL | refs/heads/develop | earthengine/google-api-python-client/sitecustomize.py | 1 | # Set up the system so that this development
# version of google-api-python-client is run, even if
# an older version is installed on the system.
#
# To make this totally automatic add the following to
# your ~/.bash_profile:
#
# export PYTHONPATH=/path/to/where/you/checked/out/apiclient
import sys
import os
sys.path.... |
howie6879/owllook | refs/heads/master | owllook/utils/verification/verification.py | 2 | #!/usr/bin/env python
import logging
import os
import random
from configparser import ConfigParser
_dir = os.path.dirname(__file__)
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s: %(message)s')
def ver_question() -> tuple:
"""
针对注册问题验证
问: 小说名
答: 作者名
:return: (questio... |
zake7749/Chatbot | refs/heads/master | Chatbot/task_modules/medicine/medicine.py | 2 | import os
import random
import json
from ..task import Task
from . import diagnose
class MedicalListener(Task):
def __init__(self, console):
self.console = console
self.subject_root = "主體描述"
self.description_root = "症狀描述"
self.symptom_dic = {}
self.load_symptom_set(pa... |
iitis/dnsclass | refs/heads/master | step7_analyze.py | 1 | #!/usr/bin/env python
# Author: Paweł Foremski <pjf@iitis.pl>
# Copyright (C) 2012-2013 IITiS PAN Gliwice
# Licensed under GNU GPL v3 (see the LICENSE file)
import re
from libshorttext import classifier as lst_class
from libshorttext import analyzer as lst_anl
import tokenizer
import argparse
class Buf():
def __init... |
overtherain/scriptfile | refs/heads/master | software/googleAppEngine/lib/django_1_4/tests/regressiontests/model_inheritance_regress/models.py | 75 | import datetime
from django.db import models
class Place(models.Model):
name = models.CharField(max_length=50)
address = models.CharField(max_length=80)
class Meta:
ordering = ('name',)
def __unicode__(self):
return u"%s the place" % self.name
class Restaurant(Place):
serves_hot... |
Ervii/garage-time | refs/heads/master | garage/tests/python/pants_test/tasks/test_depmap_integration.py | 2 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import json
import o... |
xsmart/bluecherry-client | refs/heads/master | breakpad/src/testing/test/gmock_leak_test.py | 12 | #!/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... |
MziRintu/kitsune | refs/heads/master | scripts/contributor_counts.py | 23 | # Shows top posters and percentage of posts from top posters for the
# last 14 days. You need recent data to run this.
#
# Run this with ./manage.py runscript run_contributor_counts.py
from collections import defaultdict
from datetime import datetime, timedelta
from kitsune.forums.models import Post
def run():
... |
ganeshrn/ansible | refs/heads/devel | test/units/module_utils/common/validation/test_check_type_jsonarg.py | 83 | # -*- coding: utf-8 -*-
# Copyright (c) 2019 Ansible Project
# 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
import pytest
from ansible.module_utils._text import to_native
from ansible.m... |
NaturalGIS/naturalgis_qgis | refs/heads/master | python/plugins/processing/algs/grass7/ext/v_to_3d.py | 45 | # -*- coding: utf-8 -*-
"""
***************************************************************************
v_to_3d.py
----------
Date : March 2016
Copyright : (C) 2016 by Médéric Ribreux
Email : medspx at medspx dot fr
*****************************************... |
Gillu13/scipy | refs/heads/master | scipy/special/tests/test_orthogonal_eval.py | 110 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import assert_, assert_allclose
import scipy.special.orthogonal as orth
from scipy.special._testutils import FuncData
def test_eval_chebyt():
n = np.arange(0, 10000, 7)
x = 2*np.random.rand() - 1
v1 = ... |
samdsmx/omegaup | refs/heads/master | stuff/dao_utils.py | 1 | # -*- coding: utf-8 -*-
# type: ignore
'''A tool that helps update the DAOs.'''
from __future__ import print_function
import datetime
import os
from typing import NamedTuple, Text, Sequence
import jinja2
from pyparsing import (CaselessKeyword, Optional, ParseException, Regex,
Suppress, Word, Z... |
andreasvc/cython | refs/heads/master | Cython/CodeWriter.py | 11 | """
Serializes a Cython code tree to Cython code. This is primarily useful for
debugging and testing purposes.
The output is in a strict format, no whitespace or comments from the input
is preserved (and it could not be as it is not present in the code tree).
"""
from Cython.Compiler.Visitor import TreeVisitor
from C... |
nistormihai/superdesk-core | refs/heads/master | superdesk/media/media_operations.py | 2 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import arro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.