repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
manipopopo/tensorflow | refs/heads/master | tensorflow/contrib/bigtable/python/ops/bigtable_api.py | 4 | # 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... |
ds-hwang/chromium-crosswalk | refs/heads/master | tools/traceline/traceline/scripts/filter_short.py | 179 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Takes an input JSON, and filters out all system call events that
took less than 0.2ms.
This helps trim down the JSON data to on... |
jjinux/party-playlist-picker | refs/heads/master | third-party/gdata/tlslite/integration/__init__.py | 407 | """Classes for integrating TLS Lite with other packages."""
__all__ = ["AsyncStateMachine",
"HTTPTLSConnection",
"POP3_TLS",
"IMAP4_TLS",
"SMTP_TLS",
"XMLRPCTransport",
"TLSSocketServerMixIn",
"TLSAsyncDispatcherMixIn",
"TLSTwisted... |
ghchinoy/tensorflow | refs/heads/master | tensorflow/contrib/gan/python/eval/python/summaries_impl.py | 5 | # 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... |
Alidron/demo-nao | refs/heads/master | alidron-env/lib/python2.7/site-packages/pyre/pyre_node.py | 3 | import zmq
import uuid
import logging
import struct
import socket
import time
from .zactor import ZActor
from .zbeacon import ZBeacon
from .zre_msg import ZreMsg
from .pyre_peer import PyrePeer
from .pyre_group import PyreGroup
BEACON_VERSION = 1
ZRE_DISCOVERY_PORT = 5670
REAP_INTERVAL = 1.0 # Once per second
logge... |
q40223241/2015cdb_g3_40223241 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/test/__init__.py | 2547 | # Dummy file to make this directory a package.
|
google/init2winit | refs/heads/master | init2winit/model_lib/wide_resnet.py | 1 | # coding=utf-8
# Copyright 2021 The init2winit 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 applicable la... |
ekansa/open-context-py | refs/heads/master | opencontext_py/apps/searcher/solrsearcher/geojsonregions.py | 1 | import re
import json
import geojson
from django.conf import settings
from geojson import Feature, Point, Polygon, GeometryCollection, FeatureCollection
from urllib.parse import urlparse, parse_qs
from django.utils.http import urlquote, quote_plus, urlquote_plus
from opencontext_py.libs.isoyears import ISOyears
from op... |
stone5495/NewsBlur | refs/heads/master | vendor/yaml/tokens.py | 986 |
class Token(object):
def __init__(self, start_mark, end_mark):
self.start_mark = start_mark
self.end_mark = end_mark
def __repr__(self):
attributes = [key for key in self.__dict__
if not key.endswith('_mark')]
attributes.sort()
arguments = ', '.join(['%s=... |
cn-app-registry/cnr-server | refs/heads/master | tests/commands/test_plugins.py | 2 | from __future__ import absolute_import, division, print_function
import platform
import os
import json
import pytest
import requests_mock
from appr import SYSTEM
from appr.commands.plugins import PluginsCmd
from appr.utils import convert_utf8
def parse_args(cli_parser, args):
return cli_parser.parse_args(["plug... |
michalliu/OpenWrt-Firefly-Libraries | refs/heads/master | staging_dir/host/lib/python3.4/test/test_cmd_line.py | 8 | # Tests invocation of the interpreter with various command line arguments
# Most tests are executed with environment variables ignored
# See test_cmd_line_script.py for testing of script execution
import test.support, unittest
import os
import shutil
import sys
import subprocess
import tempfile
from test import script... |
freedesktop-unofficial-mirror/drm-intel | refs/heads/drm-intel-fixes | arch/ia64/scripts/unwcheck.py | 13143 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... |
jnovinger/django | refs/heads/master | tests/i18n/models.py | 451 | from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
class TestModel(models.Model):
text = models.CharField(max_length=10, default=_('Anything'))
class Company(models.Model):
name = models.CharField(max_length=50)
date_added = models.DateTim... |
yogstation13/yogstation-old | refs/heads/dev | bot/gen_fml.py | 36 | from FMLformatter import formatter
from urllib2 import urlopen
try:
from hashlib import md5
except:
from md5 import md5
from save_load import save,load
import CORE_DATA
directory = CORE_DATA.directory
FML = urlopen("http://www.fmylife.com/random")
formatted = formatter(FML.read().split("\n"))
for Quote i... |
ALM-Rangers/azure-quickstart-templates | refs/heads/master | bosh-cf-crossregion/scripts/setup_env.py | 123 | #!/usr/bin/env python
import json
import netaddr
import os
import random
import re
import requests
import sys
from azure.storage.blob import AppendBlobService
from azure.storage.table import TableService
import azure.mgmt.network
from azure.common.credentials import ServicePrincipalCredentials
from azure.mgmt.network ... |
cclauss/stash | refs/heads/master | system/dummyconsole.py | 2 |
def hud_alert(msg, icon, duration):
pass
def show_activity():
pass
def hide_activity():
pass
|
sfrenza/test-for-bot | refs/heads/master | venv/Lib/site-packages/pip/utils/ui.py | 490 | from __future__ import absolute_import
from __future__ import division
import itertools
import sys
from signal import signal, SIGINT, default_int_handler
import time
import contextlib
import logging
from pip.compat import WINDOWS
from pip.utils import format_size
from pip.utils.logging import get_indentation
from pip... |
xiaoyanit/kivy | refs/heads/master | examples/widgets/compound_selection.py | 32 | from kivy.uix.gridlayout import GridLayout
from kivy.uix.button import Button
from kivy.uix.behaviors import CompoundSelectionBehavior
from kivy.app import runTouchApp
from kivy.core.window import Window
class SelectableGrid(CompoundSelectionBehavior, GridLayout):
def __init__(self, **kwargs):
super(Sele... |
victoriamorris/iams2rf | refs/heads/master | iams2rf/__init__.py | 1 | #!/usr/bin/env python
# -*- coding: utf8 -*-
"""Main package for iams2rf."""
# Import required modules
from .main import *
# import datetime
# import sys
__author__ = 'Victoria Morris'
__license__ = 'MIT License'
__version__ = '1.0.0'
__status__ = '4 - Beta Development'
def iams2rf_snapshot2sql(iam... |
MikeLing/shogun | refs/heads/develop | examples/undocumented/python/distance_hammingword.py | 5 | #!/usr/bin/env python
from tools.load import LoadMatrix
lm=LoadMatrix()
traindna = lm.load_dna('../data/fm_train_dna.dat')
testdna = lm.load_dna('../data/fm_test_dna.dat')
testdat = lm.load_labels('../data/fm_test_real.dat')
parameter_list = [[traindna,testdna,testdat,4,0,False,False],
[traindna,testdna,testdat,3,0... |
gojira/tensorflow | refs/heads/master | tensorflow/contrib/data/python/kernel_tests/shuffle_dataset_op_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... |
hanlind/nova | refs/heads/master | nova/objects/keypair.py | 4 | # Copyright 2013 IBM Corp.
#
# 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 agree... |
jvanasco/beaker | refs/heads/master | beaker/exceptions.py | 16 | """Beaker exception classes"""
class BeakerException(Exception):
pass
class BeakerWarning(RuntimeWarning):
"""Issued at runtime."""
class CreationAbortedError(Exception):
"""Deprecated."""
class InvalidCacheBackendError(BeakerException, ImportError):
pass
class MissingCacheParameter(BeakerExce... |
jjs0sbw/CSPLN | refs/heads/master | apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/lib/python2.7/numpy/lib/tests/test_arraysetops.py | 22 | """ Test functions for 1D array set operations.
"""
from numpy.testing import *
import numpy as np
from numpy.lib.arraysetops import *
import warnings
class TestAso(TestCase):
def test_unique( self ):
a = np.array( [5, 7, 1, 2, 1, 5, 7] )
ec = np.array( [1, 2, 5, 7] )
c = unique( a )
... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
mrunge/horizon | refs/heads/master | openstack_dashboard/dashboards/project/data_processing/jobs/urls.py | 34 | # 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
# distributed under the... |
macmanes-lab/wgs-assembler | refs/heads/master | kmer/atac-driver/chainer/python/squeezeIntraRunGaps.py | 2 | #!/usr/bin/env python
import sys
import string
import MatchRecord
#import MyFile
import IdxStore
#import localAlignerInterface
#import shelve
# True=1
False=0
theIsolatedSNPcount = 0
completefillednotXY = 0
completefilledXnotY = 0
completefilledYnotX = 0
completefilledXandY = 0
def analyzeGap(x,y,left,righ... |
mahendra-r/edx-platform | refs/heads/master | lms/djangoapps/mobile_api/users/serializers.py | 46 | """
Serializer for user API
"""
from rest_framework import serializers
from rest_framework.reverse import reverse
from django.template import defaultfilters
from courseware.access import has_access
from student.models import CourseEnrollment, User
from certificates.models import certificate_status_for_student, Certif... |
the872/pyglmnet | refs/heads/master | pyglmnet/externals/six.py | 547 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2013 Benjamin Peterson
#
# 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 with... |
duqiao/django | refs/heads/master | django/contrib/messages/constants.py | 837 | DEBUG = 10
INFO = 20
SUCCESS = 25
WARNING = 30
ERROR = 40
DEFAULT_TAGS = {
DEBUG: 'debug',
INFO: 'info',
SUCCESS: 'success',
WARNING: 'warning',
ERROR: 'error',
}
DEFAULT_LEVELS = {
'DEBUG': DEBUG,
'INFO': INFO,
'SUCCESS': SUCCESS,
'WARNING': WARNING,
'ERROR': ERROR,
}
|
saurabh6790/pow-app | refs/heads/master | stock/page/stock_home/__init__.py | 37694 | from __future__ import unicode_literals
|
elba7r/system | refs/heads/master | erpnext/setup/doctype/customer_group/__init__.py | 37694 | from __future__ import unicode_literals
|
chongtianfeiyu/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_xml_etree_c.py | 80 | # xml.etree test for cElementTree
import sys, struct
from test import support
from test.support import import_fresh_module
import types
import unittest
cET = import_fresh_module('xml.etree.ElementTree',
fresh=['_elementtree'])
cET_alias = import_fresh_module('xml.etree.cElementTree',
... |
rizumu/django | refs/heads/master | tests/staticfiles_tests/test_templatetags.py | 317 | from __future__ import unicode_literals
from .cases import StaticFilesTestCase
class TestTemplateTag(StaticFilesTestCase):
def test_template_tag(self):
self.assertStaticRenders("does/not/exist.png", "/static/does/not/exist.png")
self.assertStaticRenders("testfile.txt", "/static/testfile.txt")
|
richpolis/siveinpy | refs/heads/master | env/lib/python2.7/site-packages/setuptools/command/setopt.py | 285 | import distutils, os
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import *
__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']
def config_file(kind="local"):
"""Get the filename of the distutils, local, global, or per-user co... |
nicain/dipde_dev | refs/heads/master | dipde/interfaces/mpi/benchmark.py | 1 | import json
import os
# Set up number of threads for fair comparison:
os.environ['OPENBLAS_NUM_THREADS'] = '1'
import copy
import logging
import argparse
logging.disable(logging.CRITICAL)
from dipde.interfaces.mpi.synchronizationharness import MPISynchronizationHarness
from dipde.profiling import time_network
# Exampl... |
hoangt/goblin-core | refs/heads/master | riscv/llvm/3.5/cfe-3.5.0.src/bindings/python/clang/cindex.py | 7 | #===- cindex.py - Python Indexing Library Bindings -----------*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===--------------------------------------------------------------... |
ste616/cabb-schedule-api | refs/heads/master | python/example2.py | 1 | # example2.py
# Jamie Stevens
# Part of the ATCA scheduler Python library.
# This example shows how to create a simple schedule to follow up a ToO
# source.
# Example 2:
# Suppose an event trigger has been received for a flaring magnetar at
# coordinates RA = 01:00:43.1, Dec = -72:11:33.8.
# You have decided to obser... |
akarki15/mozillians | refs/heads/master | vendor-local/lib/python/unidecode/x0d2.py | 253 | data = (
'toels', # 0x00
'toelt', # 0x01
'toelp', # 0x02
'toelh', # 0x03
'toem', # 0x04
'toeb', # 0x05
'toebs', # 0x06
'toes', # 0x07
'toess', # 0x08
'toeng', # 0x09
'toej', # 0x0a
'toec', # 0x0b
'toek', # 0x0c
'toet', # 0x0d
'toep', # 0x0e
'toeh', # 0x0f
'tyo', # 0x10... |
blazek/QGIS | refs/heads/master | python/plugins/processing/algs/gdal/rasterize_over.py | 6 | # -*- coding: utf-8 -*-
"""
***************************************************************************
rasterize_over.py
---------------------
Date : September 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
********... |
chongyangtao/gmmreg | refs/heads/master | Python/_demo.py | 14 | #!/usr/bin/env python
#coding=utf-8
##====================================================
## $Author$
## $Date$
## $Revision$
## $URL$
##====================================================
import time
import subprocess
import ConfigParser
from numpy import loadtxt
import _core
import _plotting
def test(f_config,... |
Alexander-M-Waldman/local_currency_site | refs/heads/master | lib/python2.7/site-packages/django/contrib/gis/geos/point.py | 338 | from ctypes import c_uint
from django.contrib.gis.geos import prototypes as capi
from django.contrib.gis.geos.error import GEOSException
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.utils import six
from django.utils.six.moves import range
class Point(GEOSGeometry):
_minlength = 2
_m... |
TheGurke/Progenitus | refs/heads/master | sleekxmpp/stanza/stream_error.py | 4 | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.stanza.error import Error
from sleekxmpp.xmlstream import StanzaBase, ElementBase, ET
from sleekxmpp.xmlstream import register_st... |
c0710204/edx-platform | refs/heads/master | common/djangoapps/student/migrations/0036_access_roles_orgless.py | 125 | # -*- coding: utf-8 -*-
from south.v2 import DataMigration
from xmodule.modulestore.django import modulestore
import re
from opaque_keys.edx.locations import SlashSeparatedCourseKey
import logging
from django.db.models.query_utils import Q
from django.db.utils import IntegrityError
from xmodule.modulestore import Modul... |
zhjunlang/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_mmap.py | 68 | from test.support import (TESTFN, run_unittest, import_module, unlink,
requires, _2G, _4G, gc_collect, cpython_only)
import unittest
import os
import re
import itertools
import socket
import sys
import weakref
# Skip test if we can't import mmap.
mmap = import_module('mmap')
PAGESIZE = mmap.... |
suizokukan/urwid | refs/heads/master | urwid/__init__.py | 10 | #!/usr/bin/python
#
# Urwid __init__.py - all the stuff you're likely to care about
#
# Copyright (C) 2004-2012 Ian Ward
#
# This library 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; eit... |
yhoshino11/pytest_example | refs/heads/master | .tox/py27/lib/python2.7/site-packages/pip/_vendor/pkg_resources/tests/test_resources.py | 242 | import os
import sys
import tempfile
import shutil
import string
import pytest
import pkg_resources
from pkg_resources import (parse_requirements, VersionConflict, parse_version,
Distribution, EntryPoint, Requirement, safe_version, safe_name,
WorkingSet)
packaging = pkg_resources.packaging
def safe_repr(ob... |
havard024/prego | refs/heads/master | venv/lib/python2.7/site-packages/django/forms/util.py | 102 | from __future__ import unicode_literals
from django.conf import settings
from django.utils.html import format_html, format_html_join
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.safestring import mark_safe
from django.utils import timezone
from django.utils.translation im... |
jfpla/odoo | refs/heads/8.0 | openerp/service/report.py | 324 | # -*- coding: utf-8 -*-
import base64
import logging
import sys
import threading
import openerp
import openerp.report
from openerp import tools
import security
_logger = logging.getLogger(__name__)
# TODO: set a maximum report number per user to avoid DOS attacks
#
# Report state:
# False -> True
self_reports... |
liveblog/liveblog | refs/heads/master | server/liveblog/advertisements/amp/__init__.py | 3 | from .utils import AdsSettings, inject_advertisements
__all__ = ['AdsSettings', 'inject_advertisements']
|
dNG-git/pas_upnp | refs/heads/master | src/dNG/data/upnp/services/abstract_service.py | 1 | # -*- coding: utf-8 -*-
"""
direct PAS
Python Application Services
----------------------------------------------------------------------------
(C) direct Netware Group - All rights reserved
https://www.direct-netware.de/redirect?pas;upnp
The following license agreement remains valid unless any additions or
changes a... |
victor-rene/MicroScada | refs/heads/master | archive/day_05/datasource.py | 13 | from random import randint
class DataSource:
def __init__(self, mode=None):
self.mode = mode
def read(self, variable):
if self.mode == 'offline':
if variable.type == 'bool':
return randint(0, 1)
elif variable.type == 'word':
return randint(0, 255)
elif variable.type... |
vwvww/servo | refs/heads/master | tests/wpt/web-platform-tests/annotation-vocab/tools/vocab_tester.py | 64 |
# Author: Rob Sanderson (azaroth42@gmail.com)
# License: Apache2
# Last Modified: 2016-09-02
import json
from rdflib import ConjunctiveGraph, URIRef
from pyld import jsonld
from pyld.jsonld import compact, expand, frame, from_rdf, to_rdf, JsonLdProcessor
import urllib
# Stop code from looking up the contexts online ... |
huseyinkozan/PiSiDo | refs/heads/master | resources/files/actions_template_qt4.py | 2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt
from pisi.actionsapi import qt4
#from pisi.actionsapi import pisitools
# if pisi can't find source directory, see /var/pisi/__package_name__/work/ and:
# WorkDir="__... |
fnouama/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/hgext/largefiles/reposetup.py | 91 | # Copyright 2009-2010 Gregory P. Ward
# Copyright 2009-2010 Intelerad Medical Systems Incorporated
# Copyright 2010-2011 Fog Creek Software
# Copyright 2010-2011 Unity Technologies
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'... |
chiffa/numpy | refs/heads/master | numpy/_import_tools.py | 93 | from __future__ import division, absolute_import, print_function
import os
import sys
import warnings
__all__ = ['PackageLoader']
class PackageLoader(object):
def __init__(self, verbose=False, infunc=False):
""" Manages loading packages.
"""
if infunc:
_level = 2
else... |
teppeis/closure-library.old | refs/heads/master | closure/bin/labs/code/generate_jsdoc_test.py | 212 | #!/usr/bin/env python
#
# Copyright 2013 The Closure Library 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
... |
gangadhar-kadam/helpdesk-erpnext | refs/heads/master | erpnext/patches/v5_8/__init__.py | 37694 | from __future__ import unicode_literals
|
sanjeevtripurari/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/contrib/auth/tests/urls.py | 105 | from django.conf.urls import patterns, url
from django.contrib.auth import context_processors
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.urls import urlpatterns
from django.contrib.auth.views import password_reset, login
from django.contrib.auth.decorators import login_required
fr... |
zycdragonball/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/identity_op_py_test.py | 115 | # 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... |
rsms/smisk | refs/heads/master | lib/smisk/test/core/xml.py | 1 | #!/usr/bin/env python
# encoding: utf-8
from smisk.test import *
import smisk.core.xml as xml
class XMLTests(TestCase):
def setUp(self):
pass
def test_encode(self):
#Encode/escape unsafe character in XML
encoded = xml.escape('Some <document> with strings & characters which should be "escaped"')
... |
rassillon/android_kernel_samsung_grandneove3g | refs/heads/cm-11.0 | tools/perf/scripts/python/futex-contention.py | 11261 | # futex contention
# (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Translation of:
#
# http://sourceware.org/systemtap/wiki/WSFutexContention
#
# to perf python scripting.
#
# Measures futex contention
import os, sys
sys.path.append(os.environ['PER... |
javelinanddart/ElementalX-m9 | refs/heads/ElementalX-3.00 | tools/perf/scripts/python/futex-contention.py | 11261 | # futex contention
# (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Translation of:
#
# http://sourceware.org/systemtap/wiki/WSFutexContention
#
# to perf python scripting.
#
# Measures futex contention
import os, sys
sys.path.append(os.environ['PER... |
Antreasgr/Random-Graphs | refs/heads/master | Python/tmp/toJson.py | 1 | # -*- coding: utf-8 -*-
from openpyxl import load_workbook
import pprint
import json
import sys
def check_add_node(parent, name, description, size = 1):
field = [c for c in parent["children"] if c and c["name"] == name]
if len(field) == 0:
field = {"name": name, "description": description, "size": si... |
darionyaphet/flink | refs/heads/master | flink-python/pyflink/fn_execution/tests/test_flink_fn_execution_pb2_synced.py | 25 | ################################################################################
# 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... |
chand3040/cloud_that | refs/heads/named-release/cypress.rc | common/djangoapps/edxmako/management/commands/preprocess_assets.py | 100 | """
Preprocess templatized asset files, enabling asset authors to use
Python/Django inside of Sass and CoffeeScript. This preprocessing
will happen before the invocation of the asset compiler (currently
handled by the assets paver file).
For this to work, assets need to be named with the appropriate
template extension... |
clumsy/intellij-community | refs/heads/master | python/testData/inspections/PyRedundantParenthesesInspection/TryExcept.py | 83 | try:
foo()
except (<weak_warning descr="Remove redundant parentheses">(A)</weak_warning>):
pass
except <weak_warning descr="Remove redundant parentheses">(A)</weak_warning> :
pass
|
digidudeofdw/enigma2 | refs/heads/master | lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py | 29 | from Screens.Wizard import WizardSummary
from Screens.WizardLanguage import WizardLanguage
from Screens.Wizard import wizardManager
from Screens.Rc import Rc
from Components.Label import Label
from Components.MenuList import MenuList
from Components.PluginComponent import plugins
from Plugins.Plugin import PluginDescri... |
Boy-314/winner-winner-bidget-sbinner | refs/heads/master | discord/ext/__init__.py | 15 | # -*- coding: utf-8 -*-
"""
discord.py extensions
~~~~~~~~~~~~~~~~~~~~~~
Extensions for the discord.py library live in this namespace.
:copyright: (c) 2016 Rapptz
:license: MIT, see LICENSE for more details.
"""
|
akash1808/glance | refs/heads/master | glance/async/flows/convert.py | 5 | # 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 requ... |
aseemmittal/LibreHatti | refs/heads/master | src/librehatti/catalog/request_change.py | 5 | from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic import View
from django.shortcuts import render
from librehatti.voucher.models import VoucherId
from librehatti.voucher.models import FinancialSession
from librehatti.catalog.models import Bill
from librehatti.catalog.models import ... |
jose36/PLUGIN.JMDl1 | refs/heads/master | wattv.py | 304 | import hashlib,binascii, time,base64
def getWatToken(mediaId):
curr_time=int(time.time())
appName='sdk/Iphone/1.0'
method='getLiveUrl'
version='1.3'
#time=1417304914#fbc3d36ff262e98acedfcb5dda7ea346/1417304914
#46091b344ccc00e4db189c1097804bbc/1417193313000
secret=base64.b64decode('VzNtMCMxbUZJ')
s="%s-%s-%s-%s... |
feureau/Small-Scripts | refs/heads/master | Blender/Blender config/2.91/scripts/addons/onion_skin_tools/util.py | 1 | import bpy
import blf
import bgl
from mathutils import Vector
from bpy_extras.view3d_utils import location_3d_to_region_2d as l3d_r2d
debug = False
def Debug( *args):
if debug:
print( " ".join( str(arg) for arg in args))
def me_transform( me, ob, inst_name):
"""Transform created meshes to match origin... |
Ju2ender/Python-E | refs/heads/master | x/QunarSpider.py | 2 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import time
import datetime
import codecs
import multiprocessing as mp
from os import makedirs
from os.path import exists
from selenium import webdriver
from selenium.webdriver.common.proxy import *
site = 'http://flight.qunar.com'
hot_city_list = [u'上海', u'北京',... |
GunoH/intellij-community | refs/heads/master | python/testData/inspections/PyRedeclarationInspection/while.py | 18 | def test_while_loop(c):
def foo():
pass
while True:
def <warning descr="Redeclared 'foo' defined above without usage">foo</warning>():
pass |
gnzandrs/opencare | refs/heads/master | src/server/api/Opencare/company/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
max-arnold/uwsgi-backports | refs/heads/master | plugins/airbrake/uwsgiplugin.py | 13 | from uwsgiconfig import spcall
NAME='airbrake'
CFLAGS = [spcall('xml2-config --cflags')]
LDFLAGS = []
LIBS = ['-lcurl', spcall('xml2-config --libs')]
GCC_LIST = ['airbrake_plugin']
|
nychitman1/android_kernel_samsung_manta | refs/heads/lollipop | tools/perf/scripts/python/check-perf-trace.py | 11214 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... |
Dreizan/csci1200OnlineCourse | refs/heads/master | modules/notifications/stats.py | 6 | # Copyright 2014 Google 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 by applicable law or ... |
chokribr/invenio | refs/heads/master | invenio/modules/indexer/tokenizers/BibIndexDefaultTokenizer.py | 12 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2010, 2011, 2012, 2014, 2015 CERN.
#
# Invenio 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 (a... |
Fedena/XueDu | refs/heads/master | vendor/plugins/fckeditor/public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py | 93 | #!/usr/bin/env python
"""
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or l... |
shlinx/cloudflare-ddns | refs/heads/master | cloudflare_ddns/exceptions.py | 1 | class CloudFlareError(Exception):
"""
Base exception for CloudFlare module
"""
pass
class ZoneNotFound(CloudFlareError):
"""
Raised when a specified zone is not found from CloudFlare
"""
pass
class RecordNotFound(CloudFlareError):
"""
Raised when a specified record is not fou... |
davgeo/kodex | refs/heads/master | kodex/kodex/settings.py | 1 | """
Django settings for kodex project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths... |
peterlauri/django | refs/heads/master | tests/model_fields/test_imagefield.py | 7 | from __future__ import unicode_literals
import os
import shutil
from unittest import skipIf
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.core.files import File
from django.core.files.images import ImageFile
from django.test import TestCase
from django.test.testcases import Seri... |
victims/victims-client | refs/heads/master | contrib/yum/client_plugin/victims.py | 1 | # Copyright 2010
# Steve 'Ashcrow' Milner <stevem@gnulinux.net>
#
# This software may be freely redistributed under the terms of the GNU
# general public license.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 M... |
apache/airflow | refs/heads/main | airflow/providers/ssh/operators/__init__.py | 5130 | #
# 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... |
steveklabnik/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/test/test_util.py | 449 | #!/usr/bin/env python
#
# Copyright 2011, 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... |
pshen/ansible | refs/heads/devel | lib/ansible/modules/cloud/openstack/os_ironic_inspect.py | 29 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2015-2016, Hewlett Packard Enterprise Development Company LP
#
# 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 Free Software Foundation, either version 3 of the License, or
# (... |
panpap/LoadBalanced_zk | refs/heads/master | build/zookeeper-3.4.5/contrib/zkpython/src/test/async_test.py | 159 | #!/usr/bin/python
#
# 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
# "Lic... |
joshpfosi/gbn | refs/heads/master | src/csma-layout/bindings/modulegen__gcc_ILP32.py | 28 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
chrishiestand/git-workshop | refs/heads/master | docs/conf.py | 1 | # -*- coding: utf-8 -*-
#
# Git Workshop @Salk documentation build configuration file, created by
# sphinx-quickstart on Sun Oct 19 23:22:43 2014.
#
# 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 ... |
dtran320/xhtml2pdf | refs/heads/stable | sx/pisa3/pisa_turbogears.py | 16 | # -*- coding: ISO-8859-1 -*-
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# 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 requir... |
Cito/sqlalchemy | refs/heads/master | lib/sqlalchemy/orm/instrumentation.py | 78 | # orm/instrumentation.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Defines SQLAlchemy's system of class instrumentation.
This module is usuall... |
adaussy/eclipse-monkey-revival | refs/heads/master | plugins/python/org.eclipse.eclipsemonkey.lang.python/Lib/test/test___future__.py | 92 | #! /usr/bin/env python
import unittest
from test import test_support
import __future__
GOOD_SERIALS = ("alpha", "beta", "candidate", "final")
features = __future__.all_feature_names
class FutureTest(unittest.TestCase):
def test_names(self):
# Verify that all_feature_names appears correct.
given_... |
vmax-feihu/hue | refs/heads/master | desktop/libs/liboozie/src/liboozie/conf.py | 12 | #!/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... |
alshedivat/tensorflow | refs/heads/master | tensorflow/contrib/opt/__init__.py | 9 | # 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... |
bird-house/flyingpigeon | refs/heads/master | flyingpigeon/processes/wps_subset_countries.py | 1 | import logging
from pywps import ComplexInput, Format, LiteralInput, Process, FORMATS
from pywps.ext_autodoc import MetadataUrl
from pywps.inout.outputs import MetaFile, MetaLink4
from flyingpigeon.processes.wpsio import output, metalink
from flyingpigeon.subset import clipping
from flyingpigeon.subset import countri... |
m45t3r/i3pystatus | refs/heads/myfork | i3pystatus/iinet.py | 8 | import requests
from i3pystatus import IntervalModule
from i3pystatus.core.color import ColorRangeModule
__author__ = 'facetoe'
class IINet(IntervalModule, ColorRangeModule):
"""
Check IINet Internet usage.
Requires `requests` and `colour`
Formatters:
* `{percentage_used}` — percentage ... |
lulandco/SickRage | refs/heads/develop | lib/adba/__init__.py | 67 | #!/usr/bin/env python
#
# This file is part of aDBa.
#
# aDBa 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.
#
# aDBa is distributed i... |
spaceone/pyjs | refs/heads/master | examples/helloworldsplash/Hello2.py | 19 | import pyjd # this is dummy in pyjs.
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.Button import Button
from pyjamas.ui.HTML import HTML
from pyjamas.ui.Label import Label
from pyjamas import Window
import pygwt
def greet(fred):
fred.setText("No, really click me!")
Window.alert("Hello, AJAX!")
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.