repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
gnuradio/gnuradio | refs/heads/master | grc/gui/external_editor.py | 5 | """
Copyright 2015 Free Software Foundation, Inc.
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
import os
import sys
import time
import threading
import tempfile
import subprocess
class ExternalEditor(threading.Thread):
def __init__(self, editor, name, value, callback):
... |
drape/leaf | refs/heads/master | node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py | 1788 | #!/usr/bin/env python
import re
import json
# https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
# http://stackoverflow.com/a/13436167/96656
def unisymbol(codePoint):
if codePoint >= 0x0000 and codePoint <= 0xFFFF:
return unichr(codePoint)
elif codePoint >= 0x010000 and codePoint <= 0x10FFFF:
... |
shangwuhencc/scikit-learn | refs/heads/master | examples/cluster/plot_dbscan.py | 346 | # -*- coding: utf-8 -*-
"""
===================================
Demo of DBSCAN clustering algorithm
===================================
Finds core samples of high density and expands clusters from them.
"""
print(__doc__)
import numpy as np
from sklearn.cluster import DBSCAN
from sklearn import metrics
from sklearn... |
googleads/google-ads-python | refs/heads/master | google/ads/googleads/v7/services/services/ad_group_service/transports/grpc.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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... |
belmiromoreira/nova | refs/heads/master | nova/scheduler/filters/numa_topology_filter.py | 40 | # 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... |
thedrow/django-guardian | refs/heads/devel | guardian/models.py | 8 | from __future__ import unicode_literals
from django.db import models
from django.core.exceptions import ValidationError
from django.contrib.auth.models import Group
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.generic impo... |
dieface/erpnext | refs/heads/develop | erpnext/setup/doctype/supplier_type/supplier_type.py | 103 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class SupplierType(Document):
pass |
keithroe/vtkoptix | refs/heads/master | ThirdParty/Twisted/twisted/names/tap.py | 62 | # -*- test-case-name: twisted.names.test.test_tap -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Domain Name Server
"""
import os, traceback
from twisted.python import usage
from twisted.names import dns
from twisted.application import internet, service
from twisted.names import ser... |
crafty78/ansible | refs/heads/devel | test/units/module_utils/test_database.py | 20 | import collections
import os
import re
from nose.tools import eq_
try:
from nose.tools import assert_raises_regexp
except ImportError:
from ansible.compat.six import string_types
# Python < 2.7
def assert_raises_regexp(expected, regexp, callable, *a, **kw):
try:
callable(*a, **kw)
... |
ubirch/aws-tools | refs/heads/master | virtual-env/lib/python2.7/site-packages/pip/_vendor/html5lib/tokenizer.py | 1710 | from __future__ import absolute_import, division, unicode_literals
try:
chr = unichr # flake8: noqa
except NameError:
pass
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, ... |
CaioIcy/Dauphine | refs/heads/master | externals/gtest-1.7.0/scripts/fuse_gtest_files.py | 2577 | #!/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... |
mattgiguere/scikit-learn | refs/heads/master | sklearn/datasets/tests/test_mldata.py | 384 | """Test functionality of mldata fetching utilities."""
import os
import shutil
import tempfile
import scipy as sp
from sklearn import datasets
from sklearn.datasets import mldata_filename, fetch_mldata
from sklearn.utils.testing import assert_in
from sklearn.utils.testing import assert_not_in
from sklearn.utils.test... |
ktan2020/legacy-automation | refs/heads/master | win/Lib/distutils/command/build_py.py | 54 | """distutils.command.build_py
Implements the Distutils 'build_py' command."""
__revision__ = "$Id$"
import os
import sys
from glob import glob
from distutils.core import Command
from distutils.errors import DistutilsOptionError, DistutilsFileError
from distutils.util import convert_path
from distutils ... |
jk1/intellij-community | refs/heads/master | python/testData/console/indent14.py | 80 | print 'One, two. How are you?\
Three, four. Who\'s at the door?\
Five, six. My name is Fix.\
Seven, eght. Sorry, I\'m late.\
Nine, ten. Say it again.' |
alexanderturner/ansible | refs/heads/devel | lib/ansible/modules/cloud/misc/proxmox_kvm.py | 9 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Abdoul Bah (@helldorado) <abdoul.bah at alterway.fr>
"""
Ansible module to manage Qemu(KVM) instance in Proxmox VE cluster.
This module is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the... |
prodicus/talks | refs/heads/master | accepted/chennaipy/october/samplecode/absoluteimports/foo.py | 1 | # absoluteimports/foo.py
a = 10
class Foo(object):
pass
print("inside 'absoluteimports/foo.py' with a variable in it")
|
zfrenchee/pandas | refs/heads/master | pandas/tests/indexes/interval/test_interval_range.py | 1 | from __future__ import division
import pytest
import numpy as np
from datetime import timedelta
from pandas import (
Interval, IntervalIndex, Timestamp, Timedelta, DateOffset,
interval_range, date_range, timedelta_range)
from pandas.tseries.offsets import Day
import pandas.util.testing as tm
import pandas as p... |
Maspear/odoo | refs/heads/8.0 | addons/payment_transfer/controllers/__init__.py | 4497 | # -*- coding: utf-8 -*-
import main
|
f3at/feat | refs/heads/master | src/feat/common/serialization/sexp.py | 1 | # F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# 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... |
azureplus/hue | refs/heads/master | apps/hbase/src/hbase/server/__init__.py | 646 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
40223144/2015cdafinal | refs/heads/master | static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/event.py | 603 | #!/usr/bin/env python
'''Pygame module for interacting with events and queues.
Pygame handles all it's event messaging through an event queue. The routines
in this module help you manage that event queue. The input queue is heavily
dependent on the pygame display module. If the display has not been
initialized and a ... |
OCForks/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/test/main.py | 120 | # Copyright (C) 2012 Google, Inc.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# n... |
turbokongen/home-assistant | refs/heads/dev | homeassistant/components/telnet/switch.py | 21 | """Support for switch controlled using a telnet connection."""
from datetime import timedelta
import logging
import telnetlib
import voluptuous as vol
from homeassistant.components.switch import (
ENTITY_ID_FORMAT,
PLATFORM_SCHEMA,
SwitchEntity,
)
from homeassistant.const import (
CONF_COMMAND_OFF,
... |
john-parton/django-oscar | refs/heads/master | src/oscar/apps/dashboard/vouchers/__init__.py | 59 | default_app_config = (
'oscar.apps.dashboard.vouchers.config.VouchersDashboardConfig')
|
vegitron/ansible | refs/heads/devel | lib/ansible/parsing/yaml/loader.py | 234 | # (c) 2012-2014, 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 the License, or
# (at your option) an... |
wfxiang08/django178 | refs/heads/master | django/utils/http.py | 11 | from __future__ import unicode_literals
import base64
import calendar
import datetime
import re
import sys
import unicodedata
from binascii import Error as BinasciiError
from email.utils import formatdate
from django.utils.datastructures import MultiValueDict
from django.utils.encoding import force_bytes, force_str, ... |
flaxsearch/highlighter | refs/heads/master | snowballstemmer/turkish_stemmer.py | 19 | # self file was generated automatically by the Snowball to Python interpreter
from .basestemmer import BaseStemmer
from .among import Among
class TurkishStemmer(BaseStemmer):
'''
self class was automatically generated by a Snowball to Python interpreter
It implements the stemming algorithm defined by a s... |
Cue/eventlet | refs/heads/master | tests/coros_test.py | 8 | from unittest import main
from tests import LimitedTestCase, silence_warnings
import eventlet
from eventlet import coros
from eventlet import event
from eventlet import greenthread
class IncrActor(coros.Actor):
def received(self, evt):
self.value = getattr(self, 'value', 0) + 1
if evt: evt.send()
... |
azizmb/django-authority | refs/heads/master | authority/widgets.py | 6 | from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from django.contrib.admin.widgets import ForeignKeyRawIdWidget
generic_script = """
<script type="text/javascript">
function showGenericRelatedObjectLookupPopu... |
awkspace/ansible | refs/heads/devel | test/runner/lib/cloud/gcp.py | 34 | # Copyright: (c) 2018, Google Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""GCP plugin for integration tests."""
from __future__ import absolute_import, print_function
import os
from lib.util import (
display,
)
from lib.cloud import (
CloudProvider,
... |
Woile/commitizen | refs/heads/master | tests/test_cz_conventional_commits.py | 1 | import pytest
from commitizen import defaults
from commitizen.config import BaseConfig
from commitizen.cz.conventional_commits.conventional_commits import (
ConventionalCommitsCz,
parse_scope,
parse_subject,
)
from commitizen.cz.exceptions import AnswerRequiredError
valid_scopes = ["", "simple", "dash-sep... |
maiklos/python-experiments | refs/heads/master | osspecific.py | 1 | import os
print os.name
print os.environ
print os.getcwd()
print os.listdir("/tmp")
print os.path.sep
print os.extsep
print os.path.join(".","home","michal")
|
boxu0001/practice | refs/heads/master | py3/S32_longestParenthesis.py | 1 | # Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
# Example 1:
# Input: "(()"
# Output: 2
# Explanation: The longest valid parentheses substring is "()"
# Example 2:
# Input: ")()())"
# Output: 4
# Explanation: The longest valid pare... |
shurihell/testasia | refs/heads/test1 | lms/djangoapps/mobile_api/migrations/0001_initial.py | 86 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operati... |
BorisJeremic/Real-ESSI-Examples | refs/heads/master | education_examples/_Chapter_Modeling_and_Simulation_Examples_Static_Examples/inelastic_structural_element/contact/Six_Solid_Block_Examples/pvESSI_camera.py | 109 | from paraview.simple import *
LoadPlugin("libpvESSI.so",ns=globals());
from paraview.simple import *
def ResetSession():
pxm = servermanager.ProxyManager();
pxm.UnRegisterProxies();
del pxm;
Disconnect();
Connect();
# reader = pvESSI(FileName='/home/yuan/Desktop/tttt/the.h5.feioutput');
# reader = p... |
BT-jmichaud/website | refs/heads/8.0 | website_legal_page/__init__.py | 48 | # -*- coding: utf-8 -*-
# Python source code encoding : https://www.python.org/dev/peps/pep-0263/
##############################################################################
|
nickster5001/ctracker | refs/heads/master | flask/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py | 355 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
from lxml import etree
from ..treebuilders.etree import tag_regexp
from gettext import gettext
_ = gettext
from . import _base
from .. import ihatexml
def ensure_str(s):
if s is None:
return None
... |
RafaelCarlos/Projeto-de-Compras-Coletivas | refs/heads/master | vendor/doctrine/orm/docs/en/conf.py | 2448 | # -*- coding: utf-8 -*-
#
# Doctrine 2 ORM documentation build configuration file, created by
# sphinx-quickstart on Fri Dec 3 18:10:24 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... |
jorge-marques/shoop | refs/heads/master | shoop/default_tax/admin_module/__init__.py | 2 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.translation impor... |
mitodl/world_geographic_regions | refs/heads/master | make_geographic_regions_csv.py | 1 | #!/usr/bin/python
#
# make CSV table of geographic regions, with each row being a country, and
# columns being cc, code, name, continent, econ_group, un_region, special_region1, developing_nation
#
# continent: africa, americas, asia, europe, ocenia
# econ_group: least_developed, landlocked_developing, small_island_de... |
wenottingham/ansible | refs/heads/devel | lib/ansible/module_utils/vca.py | 8 | #
# 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 License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope tha... |
javaJake/funtoo-overlay | refs/heads/master | funtoo/scripts/merge_utils.py | 1 | #!/usr/bin/python3
import glob
import itertools
import os
import shutil
import subprocess
import sys
import datetime
import re
from lxml import etree
debug = False
mergeLog = open("/var/tmp/merge.log","w")
def get_pkglist(fname):
cpkg_fn = os.path.dirname(os.path.abspath(__file__)) + "/" + fname
cpkg = open(cpkg_... |
gylian/headphones | refs/heads/master | lib/unidecode/x07e.py | 252 | data = (
'Xia ', # 0x00
'Yuan ', # 0x01
'Zong ', # 0x02
'Xu ', # 0x03
'Nawa ', # 0x04
'Odoshi ', # 0x05
'Geng ', # 0x06
'Sen ', # 0x07
'Ying ', # 0x08
'Jin ', # 0x09
'Yi ', # 0x0a
'Zhui ', # 0x0b
'Ni ', # 0x0c
'Bang ', # 0x0d
'Gu ', # 0x0e
'Pan ', # 0x0f
'Zhou ', # 0x1... |
emonty/ansible-modules-extras | refs/heads/devel | network/snmp_facts.py | 30 | #!/usr/bin/python
# This file is part of Networklore's snmp library for Ansible
#
# The module 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 your option) any later ... |
QQuick/Transcrypt | refs/heads/master | transcrypt/demos/cyclejs_demo/component_demos/labeled_slider/snabbdom.py | 1 | '''
this is just to allow `from snabbdom import div, input, ...`
'''
div = CycleDOM.div
input = CycleDOM.input
span = CycleDOM.span
|
renestvs/data_structure_project | refs/heads/master | data_structure/second_bim/pattern_searching.py | 1 | from pip._vendor.requests.packages.urllib3.connectionpool import xrange
__author__ = 'rene_'
######################
##### chapter 7 ######
######################
def convert_string(string):
array = [None] * len(string)
i=0
for char in string:
array[i] = char
i+=1
return array
def bru... |
jdm/gemrb | refs/heads/master | gemrb/GUIScripts/bg2/MessageWindow.py | 2 | # -*-python-*-
# GemRB - Infinity Engine Emulator
# Copyright (C) 2003-2005 The GemRB Project
#
# 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 opt... |
brett-patterson/pyface | refs/heads/master | pyface/workbench/workbench_window_layout.py | 5 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... |
zuowang/incubator-hawq | refs/heads/master | tools/bin/gppylib/testold/programs/test_clsInjectFault.py | 44 | #!/usr/bin/env python
#
#
from gppylib.testold.testDriver import TestDriver
from gppylib.programs.clsInjectFault import GpInjectFaultProgram
from gppylib.mainUtils import *
from gppylib.testold.testUtils import *
from gppylib.system import fileSystemImplTest, fileSystemInterface
from gppylib.gplog import get_default_lo... |
anybox/anybox.recipe.odoo | refs/heads/master | setup.py | 1 | import os
import sys
from setuptools import setup, find_packages
version = '1.9.3'
if sys.version_info < (2, 6):
sys.stderr.write("This package requires Python 2.6 or newer. "
"Yours is " + sys.version + os.linesep)
sys.exit(1)
# a sufficient version of pip is needed to parse Odoo requir... |
imankulov/sentry | refs/heads/master | src/sentry/templatetags/sentry_admin_helpers.py | 34 | """
sentry.templatetags.sentry_admin_helpers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import datetime
from django import template
from django.utils import tim... |
dev-platypus/marche | refs/heads/master | test/job.py | 2 | # -*- coding: utf-8 -*-
# *****************************************************************************
# Marche - A server control daemon
# Copyright (c) 2015-2016 by the authors, see LICENSE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public Licens... |
mikelalcon/bazel | refs/heads/master | third_party/protobuf/python/google/protobuf/internal/encoder.py | 90 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... |
FrostBite-Android/android_kernel_samsung_smdk4412 | refs/heads/ics | tools/perf/python/twatch.py | 3213 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... |
sikmir/QGIS | refs/heads/master | python/plugins/processing/algs/grass7/ext/i_pca.py | 45 | # -*- coding: utf-8 -*-
"""
***************************************************************************
i_pca.py
--------
Date : March 2016
Copyright : (C) 2016 by Médéric Ribreux
Email : medspx at medspx dot fr
*********************************************... |
shrinidhi666/wtfBox | refs/heads/master | testing/httpTimeoutTest.py | 1 | #!/usr/bin/python
import requests
a = requests.get("http://github.com",timeout=1)
print(a.text)
|
technohippy/three.js | refs/heads/master | utils/exporters/blender/addons/io_three/exporter/image.py | 96 | import os
import base64
from .. import constants, logger
from . import base_classes, io, api
class Image(base_classes.BaseNode):
"""Class the wraps an image node. This is the node that
represent that actual file on disk.
"""
def __init__(self, node, parent):
logger.debug("Image().__init__(%s)"... |
wfnex/openbras | refs/heads/master | src/VPP/test/test_ip6.py | 1 | #!/usr/bin/env python
import unittest
from socket import AF_INET6
from framework import VppTestCase, VppTestRunner
from vpp_sub_interface import VppSubInterface, VppDot1QSubint
from vpp_pg_interface import is_ipv6_misc
from vpp_ip_route import VppIpRoute, VppRoutePath, find_route, VppIpMRoute, \
VppMRoutePath, MR... |
pealco/Cephalo | refs/heads/master | src/cephalo_tools/megprocess.py | 1 | """Some utility functions specific to MEG data."""
from numpy import mean, nonzero, diff, arange, shape
from pylab import plot, figure
from utility import rms
#from pylab import *
#from peak_finding import *
def find_triggers(data, trigger_channels):
"""Locates triggers in the trigger channels. Returns a list of ... |
schatt/zulip | refs/heads/master | zilencer/models.py | 126 | from django.db import models
import zerver.models
def get_deployment_by_domain(domain):
return Deployment.objects.get(realms__domain=domain)
class Deployment(models.Model):
realms = models.ManyToManyField(zerver.models.Realm, related_name="_deployments")
is_active = models.BooleanField(default=True)
... |
flotre/sickbeard-vfvo | refs/heads/master | bs4/tests/test_htmlparser.py | 433 | """Tests to ensure that the html.parser tree builder generates good
trees."""
from bs4.testing import SoupTest, HTMLTreeBuilderSmokeTest
from bs4.builder import HTMLParserTreeBuilder
class HTMLParserTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest):
@property
def default_builder(self):
return ... |
jaxkodex/odoo | refs/heads/8.0 | addons/survey/__init__.py | 385 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... |
neerajvashistha/pa-dude | refs/heads/master | lib/python2.7/site-packages/docx/table.py | 12 | # encoding: utf-8
"""
The |Table| object and related proxy classes.
"""
from __future__ import absolute_import, print_function, unicode_literals
from .blkcntnr import BlockItemContainer
from .enum.style import WD_STYLE_TYPE
from .oxml.simpletypes import ST_Merge
from .shared import Inches, lazyproperty, Parented
c... |
iemejia/incubator-beam | refs/heads/master | sdks/python/apache_beam/io/tfrecordio_test.py | 2 | #
# 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 us... |
Yukinoshita47/Yuki-Chan-The-Auto-Pentest | refs/heads/master | Module/WPSeku/wpseku.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# WPSeku: Wordpress Security Scanner
#
# @url: https://github.com/m4ll0k/WPSeku
# @author: Momo Outaadi (M4ll0k)
#
# WPSeku 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 F... |
jweyrich/livemgr-webui | refs/heads/master | webui/livemgr/models/message.py | 1 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Jardel Weyrich
#
# This file is part of livemgr-webui.
#
# livemgr-webui 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... |
tonk/ansible | refs/heads/devel | test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py | 68 | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
"""Command line entry point for ansible-test."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import sys
def main():
"""Main program entry point."""
ansible_root = os.path.dirname(os.path.dirname(os.path.abspa... |
jumpojoy/neutron | refs/heads/generic_switch | neutron/agent/dhcp/config.py | 4 | # Copyright 2015 OpenStack Foundation
#
# 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 re... |
sshleifer/object_detection_kitti | refs/heads/master | im2txt/im2txt/show_and_tell_model.py | 26 | # Copyright 2016 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... |
glmcdona/meddle | refs/heads/master | examples/base/Lib/os2emxpath.py | 192 | # Module 'os2emxpath' -- common operations on OS/2 pathnames
"""Common pathname manipulations, OS/2 EMX version.
Instead of importing this module directly, import os and refer to this
module as os.path.
"""
import os
import stat
from genericpath import *
from ntpath import (expanduser, expandvars, isabs, islink, spli... |
codeinthehole/csvfilter | refs/heads/master | tests/processor_tests.py | 1 | import unittest
from csvfilter import Processor
SAMPLE_CSV = ['a,b,c', 'd,e,f', 'g,h,i']
SAMPLE_PSV = ['a|b|c', 'd|e|f', 'g|h|i']
SAMPLE_TSV = ['a b c', 'd e f', 'g h i']
SAMPLE_QUOTED_CSV = [
'"Pcode","Locality","State","Comments","DeliveryOffice","PresortIndicator","ParcelZone","BSPnumber","BSPname","Category","La... |
rmfitzpatrick/ansible | refs/heads/devel | lib/ansible/modules/commands/expect.py | 60 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Matt Martz <matt@sivel.net>
# 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',
... |
timrtoo/Intel | refs/heads/master | examples/python/cycle-pwm3.py | 43 | #!/usr/bin/env python
# Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
# Copyright (c) 2014 Intel Corporation.
#
# 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, inc... |
uniumwifi/wireless-testing | refs/heads/master | scripts/gdb/linux/symbols.py | 467 | #
# gdb helper commands and functions for Linux kernel debugging
#
# load kernel and module symbols
#
# Copyright (c) Siemens AG, 2011-2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
import os
import re
from linux import module... |
samuelclay/NewsBlur | refs/heads/master | utils/templatetags/bookmarklet_includes.py | 1 | from django.conf import settings
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@register.simple_tag
def include_bookmarklet_js():
return mark_safe(settings.JAMMIT.render_code('javascripts', 'bookmarklet'))
@register.simple_tag
def include_bookmarklet_... |
brianv0/sqlalchemy | refs/heads/master | test/dialect/postgresql/test_query.py | 20 | # coding: utf-8
from sqlalchemy.testing import AssertsExecutionResults, eq_, \
assert_raises_message, AssertsCompiledSQL
from sqlalchemy import Table, Column, MetaData, Integer, String, bindparam, \
Sequence, ForeignKey, text, select, func, extract, literal_column, \
tuple_, DateTime, Time, literal, and_, ... |
wkcn/mobula | refs/heads/master | tests/test_ops/test_power.py | 1 | import mobula.operators as O
import numpy as np
def test_power():
N, C, H, W = 1,2,1,3
a = np.random.random((N, C, H, W))
for n in range(4):
l = O.Power(a, n = n)
y = l.eval()
l.dY = np.random.random(l.Y.shape)
l.backward()
assert np.allclose(y, np.power(a, n))
... |
alikins/func-alikins-devel | refs/heads/master | examples/service_checker.py | 8 | #!/usr/bin/python
#
# Copyright 2008, Red Hat, Inc
# Steve 'Ashcrow' Milner <smilner@redhat.com>
#
# 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 ... |
TWRP-J5/android_kernel_samsung_j5lte | refs/heads/5.1 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | 4653 | # EventClass.py
#
# This is a library defining some events types classes, which could
# be used by other scripts to analyzing the perf samples.
#
# Currently there are just a few classes defined for examples,
# PerfEvent is the base class for all perf event sample, PebsEvent
# is a HW base Intel x86 PEBS event, and use... |
mstriemer/zamboni | refs/heads/master | mkt/files/tests/test_helpers.py | 3 | # -*- coding: utf-8 -*-
import os
import re
import zipfile
from django import forms
from django.conf import settings
from django.core.cache import cache
from django.core.urlresolvers import reverse
from mock import Mock, patch
from nose.tools import eq_
from mkt.files.helpers import FileViewer, DiffHelper
from mkt.f... |
jolyonb/edx-platform | refs/heads/master | openedx/core/djangoapps/bookmarks/services.py | 2 | """
Bookmarks service.
"""
from __future__ import absolute_import
import logging
import six
from django.core.exceptions import ObjectDoesNotExist
from edx_django_utils.cache import DEFAULT_REQUEST_CACHE
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.exceptions import ItemNotFoundError
f... |
ProjexSoftware/projexui | refs/heads/master | projexui/widgets/xsnapshotwidget.py | 2 | """ Defines an interface for creating desktop snapshots. """
# define authorship information
__authors__ = ['Eric Hulser']
__author__ = ','.join(__authors__)
__credits__ = []
__copyright__ = 'Copyright (c) 2011, Projex Software'
__license__ = 'LGPL'
# maintanence inform... |
SideStudios/pycybersource | refs/heads/master | pycybersource/response.py | 1 | from __future__ import unicode_literals
CC_RESPONSE_CODES = {
100: "Successful transaction",
101: "Declined - The request is missing one or more fields",
102: "Declined - One or more fields in the request contains invalid data",
104: "Declined - The merchantReferenceCode sent with this... |
Fokko/incubator-airflow | refs/heads/master | tests/providers/google/cloud/operators/test_sftp_to_gcs.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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 Licen... |
rosswhitfield/mantid | refs/heads/master | scripts/Engineering/gui/engineering_diffraction/tabs/fitting/view.py | 3 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from... |
willprice/weboob | refs/heads/master | modules/cmb/module.py | 4 | # -*- coding: utf-8 -*-
# Copyright(C) 2012 Johann Broudin
#
# This file is part of weboob.
#
# weboob 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 License, or
# (at your opt... |
allotria/intellij-community | refs/heads/master | python/testData/inspections/PyArgumentListInspection/floatFromhex.py | 62 | float.fromhex("0.5") |
czgu/opendataexperience | refs/heads/master | env/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py | 1729 | from __future__ import absolute_import, division, unicode_literals
from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \
COMMENT, IGNORABLE_WHITESPACE, CHARACTERS
from . import _base
from ..constants import voidElements
class TreeWalker(_base.TreeWalker):
def __iter__(self):
ignore_until = None... |
meiavy/python-weixin | refs/heads/master | lib/python2.7/site-packages/setuptools/compat.py | 57 | import sys
import itertools
if sys.version_info[0] < 3:
PY3 = False
basestring = basestring
import __builtin__ as builtins
import ConfigParser
from StringIO import StringIO
BytesIO = StringIO
execfile = execfile
func_code = lambda o: o.func_code
func_globals = lambda o: o.func_glob... |
spacebra/django-slack | refs/heads/master | admin_scripts/custom_templates/app_template/models.py | 157 | # whatever |
steedos/odoo | refs/heads/8.0 | addons/hr_holidays/wizard/hr_holidays_summary_department.py | 337 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# $Id: account.py 1005 2005-07-25 08:41:42Z nicoe $
#
# This program is free software: you can redistrib... |
RydrDojo/Ridr_app | refs/heads/master | pylotVenv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py | 2964 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... |
javalovelinux/SparkGroovyScript | refs/heads/master | clear/pyspark/mllib/stat/KernelDensity.py | 118 | #
# 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 us... |
EnviroCentre/jython-upgrade | refs/heads/develop | jython/lib/test/call_protected_method.py | 23 | from org.python.tests import Invisible
Invisible.protectedStaticMethod(7)
Invisible().protectedMethod(7)
Invisible.packageStaticMethod()
Invisible().packageMethod()
|
KMK-ONLINE/ansible | refs/heads/devel | lib/ansible/plugins/lookup/indexed_items.py | 127 | # (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 the License, or
# (at your option) any lat... |
sjsinju/coreclr | refs/heads/master | tests/scripts/smarty_parser.py | 127 | #!/usr/bin/env python
#
## Licensed to the .NET Foundation under one or more agreements.
## The .NET Foundation licenses this file to you under the MIT license.
## See the LICENSE file in the project root for more information.
#
##
# Title :smarty_parser.py
#
# Notes:
#
# Simple class to parse through the... |
Liftboard-Rider/volatility | refs/heads/master | volatility/plugins/overlays/windows/windows64.py | 44 | # Volatility
# Copyright (c) 2008-2013 Volatility Foundation
# Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu>
#
# This file is part of Volatility.
#
# Volatility 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... |
DEVSENSE/PTVS | refs/heads/master | Python/Tests/TestData/AstAnalysis/Classes.py | 5 | class C1:
"""C1"""
pass
class C2(object): pass
class C3(C2): pass
class C4(C1, C2, C3): pass
C5 = C1
if True:
class D: pass
if False:
class E: pass
class F1:
class F2: pass
class F3:
if True:
class F4: pass
else:
class F5: pass
F6 = C1
def f():
... |
chainer/chainer | refs/heads/master | tests/chainer_tests/functions_tests/array_tests/test_depth_2_space.py | 12 | import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
@testing.parameterize(*testing.product({
'dtype': [numpy.float16, numpy.float32, numpy.float64],
}))
class T... |
devops2014/djangosite | refs/heads/master | tests/admin_docs/urls.py | 94 | from django.conf.urls import include, url
from django.contrib import admin
from . import views
ns_patterns = [
url(r'^xview/func/$', views.xview_dec(views.xview), name='func'),
]
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^admindocs/', include('django.contrib.admindocs.urls')),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.