repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
xvedejas/limbo4 | refs/heads/master | Lib/logging/handlers.py | 11 | # Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this perm... |
BotoX/Dahua-Firmware-Mod-Kit | refs/heads/master | configs/SD-Zi-Themis.py | 1 | from .config import *
DAHUA_FILES = OrderedDict([
("Install", {
"required": True,
"type": DAHUA_TYPE.Plain
}),
("kernel.img", {
"required": True,
"type": DAHUA_TYPE.Plain,
"size": 0x00500000
}),
("dhboot-min.bin.img", {
"required": True,
"type": DAHUA_TYPE.Plain,
"size": 0x00040000
}),
("dhboot.... |
DarkPurple141/Maps | refs/heads/master | MapGen/geom.py | 1 | #!/usr/bin/env python3
import random
"""
Map generating code using voronoi polygons.
Copyright (C) 2017 Alexander Walker Hinds
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, e... |
sbalde/edxplatform | refs/heads/master | common/djangoapps/embargo/migrations/0004_migrate_embargo_config.py | 102 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"""Move the current course embargo configuration to the new models. """
for old_course in orm.EmbargoedCourse.obj... |
DeadSix27/python_cross_compile_script | refs/heads/master | packages/products/ffmpeg_shared.py | 1 | {
'repo_type' : 'git',
'url' : 'git://git.ffmpeg.org/ffmpeg.git',
'rename_folder' : 'ffmpeg_shared_git',
'configure_options' : '!VAR(ffmpeg_config)VAR! !VAR(ffmpeg_nonfree)VAR! --prefix={output_prefix}/ffmpeg_shared_git.installed --enable-opencl --enable-sdl --enable-shared --disable-static --disable-libbluray --d... |
chunying/ffmpeg3 | refs/heads/master | module/opencv.py | 1 |
class opencv:
name = "OpenCV 3.2.0"
url = "https://github.com/opencv/opencv/archive/3.2.0.zip"
dirname = "opencv-3.2.0"
#ffmpeg_opts = [ "--enable-libopencv" ] # temporarily disabled for ffmpeg?
def skip(self, prefix, force):
if force: return False;
if file_exist(prefix + "/include... |
shivam1111/odoo | refs/heads/8.0 | addons/payment_ogone/tests/test_ogone.py | 430 | # -*- coding: utf-8 -*-
from lxml import objectify
import time
import urlparse
from openerp.addons.payment.models.payment_acquirer import ValidationError
from openerp.addons.payment.tests.common import PaymentAcquirerCommon
from openerp.addons.payment_ogone.controllers.main import OgoneController
from openerp.tools i... |
TheTypoMaster/chromium-crosswalk | refs/heads/master | build/android/pylib/gtest/local_device_gtest_run.py | 27 | # Copyright 2014 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.
import itertools
import logging
import os
import posixpath
from pylib import constants
from pylib import ports
from pylib.base import test_run
from pylib.de... |
fwmiller/Conserver-Freescale-Linux-U-boot | refs/heads/master | rpm/BUILD/linux-3.0.35/scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
PetePriority/home-assistant | refs/heads/dev | homeassistant/components/folder_watcher/__init__.py | 6 | """
Component for monitoring activity on a folder.
For more details about this platform, refer to the documentation at
https://home-assistant.io/components/folder_watcher/
"""
import os
import logging
import voluptuous as vol
from homeassistant.const import (
EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP)
im... |
boberfly/gaffer | refs/heads/master | python/GafferTest/ProcessMessageHandlerTest.py | 8 | ##########################################################################
#
# Copyright (c) 2018, Image Engine Design 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:
#
# * Redistrib... |
taaviteska/django | refs/heads/master | tests/template_backends/apps/good/templatetags/good_tags.py | 1426 | from django.template import Library
register = Library()
|
ChawalitK/odoo | refs/heads/master | addons/l10n_hu/migrations/2.0/post-migrate_tags_on_taxes.py | 536 | from openerp.modules.registry import RegistryManager
def migrate(cr, version):
registry = RegistryManager.get(cr.dbname)
from openerp.addons.account.models.chart_template import migrate_tags_on_taxes
migrate_tags_on_taxes(cr, registry)
|
hackebrot/pytest-cookies | refs/heads/master | tests/test_help_message.py | 1 | # -*- coding: utf-8 -*-
def test_cookies_group(testdir):
result = testdir.runpytest("--help")
# fnmatch_lines does an assertion internally
result.stdout.fnmatch_lines(["cookies:", "*--template=TEMPLATE*"])
|
defionscode/ansible | refs/heads/devel | lib/ansible/modules/system/known_hosts.py | 26 | #!/usr/bin/python
# Copyright(c) 2014, Matthew Vernon <mcv21@cam.ac.uk>
# 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',
... |
derekstavis/bluntly | refs/heads/master | vendor/github.com/youtube/vitess/test/cache_invalidation.py | 2 | #!/usr/bin/env python
#
# Copyright 2013, Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can
# be found in the LICENSE file.
"""This test provides a blue print for a service using a caching layer.
We use an in-memory cache to simplify the implementation, but using a... |
dharmabumstead/ansible | refs/heads/devel | lib/ansible/modules/identity/ipa/ipa_sudorule.py | 28 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
nikolas/smc | refs/heads/master | salvus/scripts/create_project_user.py | 6 | #!/usr/bin/env python
###############################################################################
#
# SageMathCloud: A collaborative web-based interface to Sage, IPython, LaTeX and the Terminal.
#
# Copyright (C) 2014, William Stein
#
# This program is free software: you can redistribute it and/or modify
# ... |
attackjz/Cocos2d-x_CustomSliderList | refs/heads/master | CustomSliderList/cocos2d/plugin/tools/toolsForGame/main.py | 265 | import sys, string, os
from Tkinter import *
import steps
Plugins = sys.argv[1]
print Plugins
pluginList = Plugins.split(':')
maxStep = 2
curStep = 1
stepList = []
# functions
# show step on the num index
def showStep(num):
global stepList
stepNum = len(stepList)
if num >= stepNum or num <= 0 :
... |
xparedesfortuny/pylines | refs/heads/master | setup.py | 1 | # Author: Xavier Paredes-Fortuny (xparedesfortuny@gmail.com)
# License: MIT, see LICENSE.md
params = {
'input_file': 'PULSAR',
'nick_name': 'steady',
'output_file': 'current_lines',
'test_rhd': 0,
'binary_output_file': 1,
'tstep': 1.0,
'itemax': 10000,
'resamp': 200, # 0 OFF
'nline... |
RobberPhex/shadowsocks | refs/heads/master | tests/graceful_cli.py | 977 | #!/usr/bin/python
import socks
import time
SERVER_IP = '127.0.0.1'
SERVER_PORT = 8001
if __name__ == '__main__':
s = socks.socksocket()
s.set_proxy(socks.SOCKS5, SERVER_IP, 1081)
s.connect((SERVER_IP, SERVER_PORT))
s.send(b'test')
time.sleep(30)
s.close()
|
stanzinofree/Digital_Archive_Creator | refs/heads/master | auth.py | 1 | # -*- encoding: UTF-8 -*-
"""
*Version* : *0.1.4*
This lib give the api for the autentication and consultation of user
"""
import hashlib
import string
import random
import cherrypy
import redis
import libs.db_connection
import libs.local_variables
from base_config import html_header
r = redis.StrictRedis(host='... |
luotao1/Paddle | refs/heads/develop | python/paddle/distributed/fleet/meta_optimizers/sharding/__init__.py | 2 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... |
frewsxcv/keyczar | refs/heads/master | cpp/src/tools/swtoolkit/test/collada_dom_test.py | 9 | #!/usr/bin/python2.4
# 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 of... |
vitmod/enigma2-test | refs/heads/master | lib/python/Components/Renderer/Progress.py | 45 | from Components.VariableValue import VariableValue
from Renderer import Renderer
from enigma import eSlider
class Progress(VariableValue, Renderer):
def __init__(self):
Renderer.__init__(self)
VariableValue.__init__(self)
self.__start = 0
self.__end = 100
GUI_WIDGET = eSlider
def changed(self, what):
i... |
mapler/simple-page-monitor | refs/heads/master | test/test_sender.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from sender import (
Output,
FileOutput,
SenderManager,
SenderConfError,
SENDERS,
)
import unittest
import mock
import sys
import os
import shutil
class OutputTestCase(unittest.TestCase):
def setUp(self):
self.outpu... |
ai-ku/uwsd | refs/heads/master | run/fetch-semeval10-aw.py | 1 | #! /usr/bin/python
# -*- coding: utf-8 -*-
__author__ = "Osman Baskaya"
from bs4 import BeautifulSoup
f = '../data/semeval10/aw/test/English/EnglishAW.test.xml'
soup = BeautifulSoup(open(f), 'xml')
sentences = soup.find_all('s')
for sentence in sentences:
print u' '.join(sentence.text.split()).encode('utf-8').s... |
ProfessorX/Electronic-Books | refs/heads/master | Misc/HW3_Q2_2.py | 1 | '''
Created on May 5, 2014
@author: Nengbao
'''
class EdgeWeightedDigraph(object):
'''Edge weighted Directed Graph'''
def __init__(self, numV):
if numV < 0:
raise 'Number of vertices should not be negative.'
self.numV = numV
self.numE = 0
self.adj = [[] for _ in... |
quadflor/Quadflor | refs/heads/master | Code/lucid_ml/weighting/SpreadingActivation.py | 1 | #!/usr/bin/env/python3
# -*- coding:utf-8 -*-
import networkx as nx
from collections import defaultdict, deque
from math import log
import numpy as np
import scipy.sparse as sp
from sklearn.base import BaseEstimator, TransformerMixin
from math import log
class SpreadingActivationTransformer(BaseEstimator, Transform... |
iwm911/plaso | refs/heads/master | plaso/parsers/mac_wifi_test.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual 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 L... |
nmrao/robotframework | refs/heads/master | src/robot/model/keyword.py | 12 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... |
ageron/tensorflow | refs/heads/master | tensorflow/contrib/timeseries/python/timeseries/state_space_models/varma_test.py | 25 | # 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... |
korealerts1/sentry | refs/heads/master | tests/sentry/metrics/test_statsd.py | 27 | from __future__ import absolute_import
from mock import patch
from sentry.metrics.statsd import StatsdMetricsBackend
from sentry.testutils import TestCase
class StatsdMetricsBackendTest(TestCase):
def setUp(self):
self.backend = StatsdMetricsBackend(prefix='sentrytest.')
@patch('statsd.StatsClient.... |
PeterWangPo/Django-facebook | refs/heads/master | docs/docs_env/Lib/encodings/iso8859_5.py | 593 | """ Python Character Mapping Codec iso8859_5 generated from 'MAPPINGS/ISO8859/8859-5.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors='... |
demon-ru/iml-crm | refs/heads/master | addons/stock/wizard/make_procurement_product.py | 95 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
marcoserafini/h-store | refs/heads/master | tools/traces/hstoretraces/__init__.py | 9 | # -*- coding: utf-8 -*-
from common import *
from storedprocedure import StoredProcedure
from traceelements import TransactionTrace, QueryTrace
|
bank-netforce/netforce | refs/heads/stable-3.1 | netforce_purchase/netforce_purchase/models/purchase_order.py | 2 | # 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... |
mgagne/nova | refs/heads/master | nova/tests/functional/api/__init__.py | 178 | # Copyright (c) 2011 Justin Santa Barbara
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
repotvsupertuga/repo | refs/heads/master | plugin.video.pancas/resources/lib/libraries/f4mproxy/flvlib/scripts/retimestamp_flv.py | 98 | import os
import sys
import shutil
import logging
import tempfile
from optparse import OptionParser
from flvlib import __versionstr__
from flvlib.constants import TAG_TYPE_AUDIO, TAG_TYPE_VIDEO, TAG_TYPE_SCRIPT
from flvlib.constants import AAC_PACKET_TYPE_SEQUENCE_HEADER
from flvlib.constants import H264_PACKET_TYPE_... |
cntnboys/410Lab6 | refs/heads/master | build/django/django/core/validators.py | 49 | from __future__ import unicode_literals
import re
from django.core.exceptions import ValidationError
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _, ungettext_lazy
from django.utils.encoding import force_text
from django.utils.ipv6 import is_valid_ipv6_add... |
hongbin/magnum | refs/heads/master | magnum/common/pythonk8sclient/client/models/V1beta3_EndpointPort.py | 15 | #!/usr/bin/env python
"""
Copyright 2015 Reverb Technologies, 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 require... |
cevaris/pants | refs/heads/master | tests/python/pants_test/backend/graph_info/tasks/test_paths.py | 16 | # coding=utf-8
# Copyright 2015 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)
from pants.backend.g... |
dkodnik/Ant | refs/heads/master | openerp/tools/func.py | 63 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can red... |
vetalypp/e2openplugin-CrossEPG | refs/heads/master | src/enigma2/python/crossepg_setup.py | 1 | from enigma import getDesktop
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.config import KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, ConfigYesNo, ConfigSelection, ConfigClock, config, configfile
from Components.ConfigList import ConfigList
from Components.Button impor... |
pasqualguerrero/django | refs/heads/master | tests/migrations/test_migrations_conflict/0001_initial.py | 2995 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
operations = [
migrations.CreateModel(
"Author",
[
("id", models.AutoField(primary_key=True)),
("name",... |
morelab/weblabdeusto | refs/heads/master | server/src/test/unit/weblab/core/coordinator/test_config_parser.py | 3 | #!/usr/bin/env python
#-*-*- encoding: utf-8 -*-*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individual... |
j00bar/ansible | refs/heads/devel | lib/ansible/playbook/conditional.py | 19 | # (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... |
JinXinDeep/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/shape_ops_test.py | 5 | # Copyright 2015 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 a... |
jakevdp/scipy | refs/heads/master | scipy/special/tests/test_ellip_harm.py | 99 | #
# Tests for the Ellipsoidal Harmonic Function,
# Distributed under the same license as SciPy itself.
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.testing import (assert_equal, assert_almost_equal, assert_allclose,
assert... |
StackOps/python-automationclient | refs/heads/master | automationclient/tests/v1_1/test_devices.py | 1 | # Copyright 2012-2013 STACKOPS TECHNOLOGIES S.L.
# 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... |
aviau/joulupukki-worker | refs/heads/master | config.py | 2 | # Server Specific Configurations
server = {
'port': '8082',
'host': '0.0.0.0'
}
# Pecan Application Configurations
app = {
'root': 'joulupukki.worker.controllers.root.RootController',
'modules': ['joulupukki.worker'],
'static_root': '%(confdir)s/public',
'template_path': '%(confdir)s/joulupukki... |
googleapis/python-dialogflow | refs/heads/master | samples/snippets/noxfile.py | 1 | # Copyright 2019 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 agreed to in writing, ... |
leonsio/YAHM | refs/heads/master | share/tools/ubi_reader/ubi/display.py | 3 | #!/usr/bin/env python
#############################################################
# ubi_reader/ubi
# (c) 2013 Jason Pruitt (jrspruitt@gmail.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 Foundatio... |
appneta/boto | refs/heads/develop | boto/vpc/networkacl.py | 151 | # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... |
agogear/python-1 | refs/heads/master | NKUCodingCat/0023/main.py | 40 | #coding=utf-8
from bottle import static_file,route, run, post, request, redirect
import os, makeweb, urllib,re,json,time
Root = os.path.split(os.path.realpath(__file__))[0]+"/static/"
Const = """
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h... |
kdwink/intellij-community | refs/heads/master | python/testData/formatter/alignListComprehensionInDict_after.py | 79 | def foo():
return {field.key: field for key, field in inspect.getmembers(instance)
if isinstance(field, QueryableAttribute)
and isinstance(field.property, ColumnProperty)
or field.foreign_keys}
|
palaxi00/palaxi00.github.io | refs/heads/gh-pages | Codeeval/calculate_distance.py | 1 |
import sys
import re
with open(sys.argv[1], 'r') as test_cases:
for test in test_cases:
stri = str(test.strip())
points = re.findall("[-+]?\d+[\.]?\d*", stri)
x1 = int(points[0])
y1 = int(points[1])
x2 = int(points[2])
y2 = int(points[3])
d = (((... |
michel-slm/0install | refs/heads/master | tests/testgpg.py | 9 | #!/usr/bin/env python
from basetest import BaseTest
import sys, tempfile
import unittest
import warnings
sys.path.insert(0, '..')
from zeroinstall.injector import gpg, model, trust
err_sig = b"""<?xml version="1.0" ?>
<?xml-stylesheet type='text/xsl' href='interface.xsl'?>
<interface xmlns="http://zero-install.source... |
videetssinghai/Blog-Rest-Api | refs/heads/master | lib/python2.7/site-packages/pip/_vendor/html5lib/_tokenizer.py | 385 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import unichr as chr
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, hexDigits, EOF
from .c... |
nycholas/ask-undrgz | refs/heads/master | src/ask-undrgz/django/db/backends/sqlite3/base.py | 11 | """
SQLite3 backend for django.
Python 2.4 requires pysqlite2 (http://pysqlite.org/).
Python 2.5 and later can use a pysqlite2 module or the sqlite3 module in the
standard library.
"""
import re
import sys
from django.db import utils
from django.db.backends import *
from django.db.backends.signals import connection... |
alxgu/ansible | refs/heads/devel | test/integration/targets/module_utils/module_utils/spam3/ham/bacon.py | 298 | data = 'spam3'
|
angr/angr | refs/heads/master | angr/procedures/win_user32/keyboard.py | 5 | import angr
class GetKeyboardType(angr.SimProcedure):
def run(self, param):
# return the values present at time of author's testing
if self.state.solver.is_true(param == 0):
return 4
if self.state.solver.is_true(param == 1):
return 0
if self.state.solver.is_t... |
SungEun-Steve-Kim/test-mp | refs/heads/master | tests/float/int_power.py | 100 | # negative power should produce float
x = 2
print(x ** -2)
x = 3
x **= -2
print('%.5f' % x)
|
keithroe/vtkoptix | refs/heads/master | ThirdParty/Twisted/twisted/conch/ssh/forwarding.py | 59 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
"""
This module contains the implementation of the TCP forwarding, which allows
clients and servers to forward arbitrary TCP data across the connection.
Maintainer: Paul Swartz
"""
import struct
from twisted.internet import protocol, reacto... |
glovebx/odoo | refs/heads/8.0 | addons/auth_ldap/__init__.py | 442 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... |
insidenothing/3D-Printing-Software | refs/heads/master | skein_engines/skeinforge-47/fabmetheus_utilities/euclidean.py | 4 | """
Euclidean is a collection of python utilities for complex numbers, paths, polygons & Vector3s.
To use euclidean, install python 2.x on your machine, which is avaliable from http://www.python.org/download/
Then in the folder which euclidean is in, type 'python' in a shell to run the python interpreter. Finally ty... |
bhargav2408/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/lib2to3/tests/data/py2_test_grammar.py | 285 | # Python test set -- part 1, grammar.
# This just tests whether the parser accepts them all.
# NOTE: When you run this test as a script from the command line, you
# get warnings about certain hex/oct constants. Since those are
# issued by the parser, you can't suppress them by adding a
# filterwarnings() call to this... |
theheros/kbengine | refs/heads/master | kbe/src/lib/python/Lib/lib2to3/tests/data/py2_test_grammar.py | 285 | # Python test set -- part 1, grammar.
# This just tests whether the parser accepts them all.
# NOTE: When you run this test as a script from the command line, you
# get warnings about certain hex/oct constants. Since those are
# issued by the parser, you can't suppress them by adding a
# filterwarnings() call to this... |
pantsbuild/pex | refs/heads/main | pex/vendor/_vendored/pip/pip/_vendor/chardet/euctwprober.py | 289 | ######################## 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... |
prutseltje/ansible | refs/heads/devel | test/units/modules/system/test_systemd.py | 133 | import os
import tempfile
from ansible.compat.tests import unittest
from ansible.modules.system.systemd import parse_systemctl_show
class ParseSystemctlShowTestCase(unittest.TestCase):
def test_simple(self):
lines = [
'Type=simple',
'Restart=no',
'Requires=system.slic... |
domenicosolazzo/practice-django | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/contenttypes/__init__.py | 809 | default_app_config = 'django.contrib.contenttypes.apps.ContentTypesConfig'
|
s20121035/rk3288_android5.1_repo | refs/heads/master | external/chromium_org/build/android/gyp/util/md5_check_test.py | 99 | # Copyright 2013 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.
import tempfile
import unittest
import md5_check # pylint: disable=W0403
class TestMd5Check(unittest.TestCase):
def setUp(self):
self.called = False... |
wgapl/moose | refs/heads/devel | framework/contrib/nsiqcppstyle/nsiqcppstyle_exe-test.py | 43 | #!/usr/bin/python
#
# Copyright (c) 2009 NHN 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 condi... |
40223133/cadp_w2 | refs/heads/master | wsgi/static/templates/jscript/Lib/itertools.py | 4 | # downloaded from http://shedskin.googlecode.com/svn-history/r1279/trunk/shedskin/lib/itertools.py
# http://docs.python.org/dev/_sources/library/itertools.txt
# Infinite Iterators
def count(start = 0, step = 1):
yield start
def cycle(iterable):
yield next(iter(iterable))
def repeat(object, times = 0):
y... |
ashishnitinpatil/vnitstudnotifs | refs/heads/master | django/contrib/gis/forms/widgets.py | 109 | from __future__ import unicode_literals
import logging
from django.conf import settings
from django.contrib.gis import gdal
from django.contrib.gis.geos import GEOSGeometry, GEOSException
from django.forms.widgets import Widget
from django.template import loader
from django.utils import six
from django.utils import t... |
maxrothman/config | refs/heads/master | Alfred.alfredpreferences/workflows/user.workflow.104E1FF8-0361-4CCD-B53B-76D1D5BA58F4/requests/packages/chardet/hebrewprober.py | 2928 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... |
boundarydevices/android_external_chromium_org | refs/heads/cm-12.0 | tools/telemetry/telemetry/core/platform/profiler/profiler_finder.py | 55 | # Copyright 2013 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.
import os
from telemetry.core import discover
from telemetry.core import util
from telemetry.core.platform import profiler
def _DiscoverProfilers():
pro... |
NINAnor/QGIS | refs/heads/master | python/plugins/processing/algs/gdal/fillnodata.py | 11 | # -*- coding: utf-8 -*-
"""
***************************************************************************
fillnodata.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
****************************... |
drpngx/tensorflow | refs/heads/master | tensorflow/python/framework/versions.py | 23 | # 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... |
jlquant/yappi | refs/heads/master | test/testdeadlock.py | 14 | import yappi
import threading
class deadlock_thread(threading.Thread):
# acquire the lock two times to create a very
# simple deadlock:)
def foo(self):
for i in xrange(0,2): self.lock.acquire()
def run(self):
self.lock = threading.Lock()
self.foo()
yappi.start() # start the p... |
shravan-achar/servo | refs/heads/master | tests/wpt/harness/wptrunner/__init__.py | 1447 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
SurfasJones/djcmsrc3 | refs/heads/master | venv/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... |
KristianOellegaard/django-filer | refs/heads/develop | filer/admin/__init__.py | 1 | #-*- coding: utf-8 -*-
from django.contrib import admin
from filer.admin.clipboardadmin import ClipboardAdmin
from filer.admin.fileadmin import FileAdmin
from filer.admin.folderadmin import FolderAdmin
from filer.admin.imageadmin import ImageAdmin
from filer.admin.permissionadmin import PermissionAdmin
from filer.model... |
svogl/mbed-os | refs/heads/master | tools/host_tests/host_tests_plugins/module_copy_shell.py | 74 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... |
liorvh/raspberry_pwn | refs/heads/master | src/pentest/metagoofil/hachoir_parser/archive/mar.py | 95 | """
Microsoft Archive parser
Author: Victor Stinner
Creation date: 2007-03-04
"""
MAX_NB_FILE = 100000
from hachoir_parser import Parser
from hachoir_core.field import FieldSet, String, UInt32, SubFile
from hachoir_core.endian import LITTLE_ENDIAN
from hachoir_core.text_handler import textHandler, filesizeHandler, h... |
rjamorim/netsec-hw1 | refs/heads/master | client1.py | 1 | # Network Security Spring 2015 Assignment 1
# Programming problem
# Roberto Amorim - rja2139
import argparse
import socket
import os.path
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
from Crypto import Random
# Here I take care of the command line arguments
parser = ar... |
charlottepierce/music_essentials | refs/heads/master | doc/conf.py | 1 | import sys
import os
sys.path.insert(0, os.path.abspath('../../music_essentials'))
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../'))
# -*- coding: utf-8 -*-
#
# music_essentials documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 7 10:47:21 2017.
#... |
theatlantic/djangotoolbox | refs/heads/master | djangotoolbox/fields.py | 17 | # All fields except for BlobField written by Jonas Haag <jonas@lophus.org>
from django.db import models
from django.core.exceptions import ValidationError
from django.utils.importlib import import_module
__all__ = ('RawField', 'ListField', 'DictField', 'SetField',
'BlobField', 'EmbeddedModelField')
class ... |
MounirMesselmeni/django | refs/heads/master | tests/template_backends/apps/good/templatetags/good_tags.py | 1426 | from django.template import Library
register = Library()
|
2gis/ansible | refs/heads/devel | v2/ansible/executor/task_result.py | 7690 | # (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... |
emersonsoftware/ansiblefork | refs/heads/devel | lib/ansible/modules/storage/netapp/netapp_e_storage_system.py | 45 | #!/usr/bin/python
# (c) 2016, NetApp, Inc
#
# 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.... |
auready/django | refs/heads/master | django/db/backends/base/operations.py | 9 | import datetime
import decimal
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.backends import utils
from django.utils import timezone
from django.utils.dateparse import parse_duration
from django.utils.encoding import force_te... |
ymollard/apex_playground | refs/heads/master | ros/apex_playground/src/apex_playground/controller/learning.py | 2 | import rospy
from apex_playground.srv import *
class Learning(object):
def __init__(self):
self.services = {'produce': {'name': 'learning/produce', 'type': Produce},
'perceive': {'name': 'learning/perceive', 'type': Perceive}}
for service_name, service in self.services.it... |
you21979/phantomjs | refs/heads/2.0 | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py | 121 | # Copyright (C) 2012 Intel 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:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
Wojtechnology/Muzit | refs/heads/master | StreetMuse/lib/python2.7/site-packages/tornado/httputil.py | 22 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 a... |
vetscience/Tools | refs/heads/master | Cwl/renamereads/renameFasta.py | 1 | #!/usr/bin/env python
import os, sys, optparse
from base import Base
#################################################
def options():
parser = optparse.OptionParser('usage: "python %prog -i filename -f reffile" or "cat file | python %prog -i - -f reffile" or "cat file | python %prog -f reffile"')
parser.add_o... |
AlkamiCode/snake-game | refs/heads/gh-pages | node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py | 1284 | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import copy
import hashlib
import json
import multiprocessing
import os.path
import re
import signal
import subprocess
import sys
import gyp
imp... |
jhgoebbert/cvl-fabric-launcher | refs/heads/master | pyinstaller-2.1/tests/basic/test_module_attributes.py | 7 | #-----------------------------------------------------------------------------
# Copyright (c) 2013, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this softwa... |
RJVB/audacity | refs/heads/master | lib-src/lv2/lv2/plugins/eg02-midigate.lv2/waflib/Tools/irixcc.py | 330 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os
from waflib import Utils
from waflib.Tools import ccroot,ar
from waflib.Configure import conf
@conf
def find_irixcc(conf):
v=conf.env
cc=None
if v['CC']:cc=v['CC'... |
abradle/jython_test | refs/heads/master | src/find_props/find_props.py | 1 | # File to calculate properties for a molecule and add these properties back to the molecules
# property to be calculate will be put in using a request.header string
from java import lang
lang.System.loadLibrary('GraphMolWrap')
from org.RDKit import *
from threading import Thread
import os
def num_hba(mol):
"""Func... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.