repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
AGG2017/diaphora
diaphora_ida.py
1
69821
""" Diaphora, a diffing plugin for IDA Copyright (c) 2015-2018, Joxean Koret This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. T...
gpl-2.0
andmos/ansible
lib/ansible/modules/packaging/os/homebrew_tap.py
87
6806
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Daniel Jaouen <dcj24@cornell.edu> # (c) 2016, Indrajit Raychaudhuri <irc+code@indrajit.com> # # Based on homebrew (Andrew Dunham <andrew@du.nham.ca>) # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ imp...
gpl-3.0
TeamAir4385/Letty
plugins/ti.alloy/plugin.py
1729
5251
import os, sys, subprocess, hashlib import subprocess def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. Backported from Python 2.7 as it's implemented as pure python on stdlib. >>> check_output(['/usr/bin/python', '--version']) Python 2.6....
apache-2.0
davidyezsetz/kuma
vendor/packages/ipython/IPython/demo.py
6
19830
"""Module for interactive demos using IPython. This module implements a few classes for running Python scripts interactively in IPython for demonstrations. With very simple markup (a few tags in comments), you can control points where the script stops executing and returns control to IPython. Provided classes =====...
mpl-2.0
fingeronthebutton/RIDE
src/robotide/lib/robot/utils/dotdict.py
23
1512
# 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...
apache-2.0
xmhubj/selenium
py/test/selenium/webdriver/common/typing_tests.py
20
12658
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
sameenjalal/mavenize-beta
mavenize/apps/leaderboard/migrations/0001_initial.py
1
4804
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'KarmaAction' db.create_table('leaderboard_karmaaction', ( ('id', self.gf('django...
mit
SanchayanMaity/gem5
src/arch/x86/isa/insts/simd128/floating_point/data_transfer/__init__.py
91
2383
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
fx2003/tensorflow-study
TensorFlow实战/models/slim/nets/inception_v1.py
26
15299
# 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 applicable ...
mit
johnbachman/belpy
indra/preassembler/grounding_mapper/analysis.py
4
10474
import csv import logging from itertools import groupby from collections import Counter from indra.databases import uniprot_client from indra.util import write_unicode_csv logger = logging.getLogger(__name__) # Some useful functions for analyzing the grounding of sets of statements # Put together all agent texts alo...
mit
jolyonb/edx-platform
lms/djangoapps/grades/tests/test_course_grade_factory.py
1
15537
""" Tests for the CourseGradeFactory class. """ import itertools import ddt from courseware.access import has_access from django.conf import settings from lms.djangoapps.grades.config.tests.utils import persistent_grades_feature_flags from mock import patch from openedx.core.djangoapps.content.block_structure.factory ...
agpl-3.0
mdworks2016/work_development
Python/20_Third_Certification/venv/lib/python3.7/site-packages/django/core/serializers/pyyaml.py
32
2861
""" YAML serializer. Requires PyYaml (https://pyyaml.org/), but that's checked for in __init__. """ import collections import decimal from io import StringIO import yaml from django.core.serializers.base import DeserializationError from django.core.serializers.python import ( Deserializer as PythonDeserializer,...
apache-2.0
chesters99/ghpages
pelicanconf.py
1
3501
''' module docstring ''' #!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = 'Graham Chester' SITENAME = 'GCHESTER.COM' SITEURL = 'http://localhost:8000' THEME = 'themes/pelican-bootstrap3' # 'themes/tuxlite_tbs' PATH = 'content' TIMEZONE = 'Europe/London' DEFAULT_LANG = ...
gpl-3.0
cchamberlain/gyp
test/configurations/target_platform/gyptest-target_platform.py
351
1112
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Tests the msvs specific msvs_target_platform option. """ import TestGyp import TestCommon def RunX64(exe, stdout): try: test.ru...
bsd-3-clause
rjhunter8285/nsc-cloudproject-s22016
api/FlaskApp/FlaskApp/python_modules/oauthlib/oauth2/__init__.py
86
1441
# -*- coding: utf-8 -*- """ oauthlib.oauth2 ~~~~~~~~~~~~~~ This module is a wrapper for the most recent implementation of OAuth 2.0 Client and Server classes. """ from __future__ import absolute_import, unicode_literals from .rfc6749.clients import Client from .rfc6749.clients import WebApplicationClient from .rfc674...
apache-2.0
gyang/nova
nova/tests/test_SolidFireSanISCSIDriver.py
6
7590
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
apache-2.0
nhynes/neon
neon/models/model.py
1
14454
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems 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.o...
apache-2.0
TNick/april
googletest/scripts/fuse_gtest_files.py
2577
8813
#!/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...
bsd-3-clause
ROMFactory/android_external_chromium_org
chrome/test/pyautolib/chrome_driver_factory.py
79
2664
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Factory that creates ChromeDriver instances for pyauto.""" import os import random import tempfile import pyauto_paths from selenium import webdrive...
bsd-3-clause
andresailer/DIRAC
Core/DISET/private/Transports/SSL/ThreadSafeSSLObject.py
10
1638
# $HeadURL$ __RCSID__ = "$Id$" import GSI from DIRAC.Core.Utilities.LockRing import LockRing from DIRAC.FrameworkSystem.Client.Logger import gLogger class ThreadSafeSSLObject: cLock = LockRing().getLock() def __init__( self, object ): self.cObject = object def __getattr__( self, name ): method = getattr...
gpl-3.0
tst-lsavoie/earthenterprise
earth_enterprise/src/fusion/portableglobe/cutter/cgi-bin/globe_cutter_app.py
4
40238
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc. # Copyright 2020 Open GEE Contributors # # 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-...
apache-2.0
bruth/django-tracking2
tracking/views.py
1
2215
import logging from datetime import timedelta from django import forms from django.shortcuts import render from django.contrib.auth.decorators import permission_required from django.utils.timezone import now from tracking.models import Visitor, Pageview from tracking.settings import TRACK_PAGEVIEWS log = logging.ge...
bsd-2-clause
ENjOyAbLE1991/scrapy
scrapy/utils/benchserver.py
130
1312
import random from six.moves.urllib.parse import urlencode from twisted.web.server import Site from twisted.web.resource import Resource from twisted.internet import reactor class Root(Resource): isLeaf = True def getChild(self, name, request): return self def render(self, request): tot...
bsd-3-clause
Hybrid-Cloud/cinder
cinder/api/contrib/volume_type_encryption.py
5
7266
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
Jgarcia-IAS/SITE
addons/fetchmail/__init__.py
437
1120
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # mga@openerp.com # # This program is free software: you can redistribute it and/or mo...
agpl-3.0
nan86150/ImageFusion
lib/python2.7/site-packages/scipy/fftpack/tests/test_real_transforms.py
18
14794
#!/usr/bin/env python from __future__ import division, print_function, absolute_import from os.path import join, dirname import numpy as np from numpy.testing import assert_array_almost_equal, assert_equal, TestCase from scipy.fftpack.realtransforms import dct, idct, dst, idst # Matlab reference data MDATA = np.loa...
mit
JMuscatello/create_hashtags
create_hashtags.py
1
8695
"""create_hashtags.py Python 2.7 script to calculate the n most frequent words appearing in a given set of text documents and outputs the words, containing documents, and sentences containing those words to a html table. OPTIONS: -f <file1> <file2> ... filenames of text documents to scan -n <number of ...
gpl-3.0
villalonreina/dipy
dipy/core/gradients.py
4
12110
from __future__ import division, print_function, absolute_import from dipy.utils.six import string_types import numpy as np try: from scipy.linalg import polar except ImportError: # Some elderly scipy doesn't have polar from dipy.fixes.scipy import polar from scipy.linalg import inv from dipy.io import gra...
bsd-3-clause
ujjvala-addsol/addsol_hr
openerp/addons/purchase_requisition/purchase_requisition.py
21
23448
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
dvu4/Data-Wrangling-with-MongoDB
final_project/improving_street_type.py
1
4136
""" Your task in this exercise has two steps: - audit the OSMFILE and change the variable 'mapping' to reflect the changes needed to fix the unexpected street types to the appropriate ones in the expected list. You have to add mappings only for the actual problems you find in this OSMFILE, not a generalize...
agpl-3.0
gdowding/pyvmomi
sample/getallvms.py
9
3807
#!/usr/bin/env python # VMware vSphere Python SDK # Copyright (c) 2008-2015 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
apache-2.0
rismalrv/edx-platform
openedx/core/djangoapps/credit/tests/test_tasks.py
62
13643
""" Tests for credit course tasks. """ import mock from datetime import datetime, timedelta from pytz import UTC from openedx.core.djangoapps.credit.api import get_credit_requirements from openedx.core.djangoapps.credit.exceptions import InvalidCreditRequirements from openedx.core.djangoapps.credit.models import Cred...
agpl-3.0
AgrAlert/AgrAlert_Backend
lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.py
1769
3979
# -*- coding: utf-8 -*- """Interpret PEP 345 environment markers. EXPR [in|==|!=|not in] EXPR [or|and] ... where EXPR belongs to any of those: python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) python_full_version = sys.version.split()[0] os.name = os.name sys.platform = sys.platfo...
mit
failys/CAIRIS
cairis/mio/AttackPatternContentHandler.py
2
14253
# 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...
apache-2.0
ZenithDK/mopidy
mopidy/internal/network.py
4
12849
from __future__ import absolute_import, unicode_literals import errno import logging import re import socket import sys import threading import pykka from mopidy.internal import encoding from mopidy.internal.gi import GObject logger = logging.getLogger(__name__) class ShouldRetrySocketCall(Exception): """In...
apache-2.0
altsen/diandiyun-platform
lms/djangoapps/wechat/tests/helpers.py
33
4710
import json from django.contrib.auth.models import User from django.core.urlresolvers import reverse from student.models import Registration from django.test import TestCase def check_for_get_code(self, code, url): """ Check that we got the expected code when accessing url via GET. Returns ...
agpl-3.0
Lilykos/invenio
invenio/legacy/docextract/task.py
15
7239
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012 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 (at your option) any...
gpl-2.0
dfang/odoo
addons/im_livechat/controllers/main.py
10
5474
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from odoo import http, _ from odoo.http import request from odoo.addons.base.ir.ir_qweb import AssetsBundle from odoo.addons.web.controllers.main import binary_content class LivechatController(http.Contr...
agpl-3.0
sachinkum/Bal-Aveksha
WebServer/BalAvekshaEnv/lib/python3.5/site-packages/packaging/_structures.py
1152
1416
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function class Infinity(object): def __repr__(self): return "Infinity...
gpl-3.0
cnsoft/kbengine-cocos2dx
kbe/res/scripts/common/Lib/ctypes/test/test_frombuffer.py
52
2485
from ctypes import * import array import gc import unittest class X(Structure): _fields_ = [("c_int", c_int)] init_called = False def __init__(self): self._init_called = True class Test(unittest.TestCase): def test_fom_buffer(self): a = array.array("i", range(16)) x = (c_int * ...
lgpl-3.0
Cuuuurzel/KiPyCalc
sympy/physics/quantum/tests/test_dagger.py
124
1512
from sympy import I, Matrix, symbols, conjugate, Expr, Integer from sympy.physics.quantum.dagger import adjoint, Dagger from sympy.external import import_module from sympy.utilities.pytest import skip def test_scalars(): x = symbols('x', complex=True) assert Dagger(x) == conjugate(x) assert Dagger(I*x) =...
mit
kd0aij/matrixpilot_old
Tools/pyparam/SubParameterDatabase.py
3
7500
#!/usr/bin/env python # # Generated Tue Mar 20 05:27:18 2012 by generateDS.py version 2.7b. # import sys import ParameterDatabase as supermod etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_library = None try:...
gpl-3.0
access-missouri/am-django-project
am/general/models/organization.py
1
4667
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Organization and related models. """ from __future__ import unicode_literals from datetime import datetime from general.models import AMBaseModel from django.db import models from django.db.models import Q from django.utils.encoding import python_2_unicode_compatible fr...
bsd-2-clause
zcbenz/cefode-chromium
third_party/mesa/MesaLib/src/gallium/tests/python/retrace/interpreter.py
32
24536
#!/usr/bin/env python ########################################################################## # # Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files ...
bsd-3-clause
ProgVal/Limnoria-test
plugins/Channel/test.py
4
13250
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2009, James McCoy # 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 copyr...
bsd-3-clause
kjedruczyk/phabricator-tools
py/abd/abdcmd_listrepos.py
2
2088
"""List the repositories managed by this arcyd instance.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # abdcmd_listrepos # # Public Functions: # getFromfilePrefixChars # setupParser # p...
apache-2.0
AdaptiveApplications/carnegie
tarc_bus_locator_client/numpy-1.8.1/numpy/distutils/command/build.py
53
1322
from __future__ import division, absolute_import, print_function import os import sys from distutils.command.build import build as old_build from distutils.util import get_platform from numpy.distutils.command.config_compiler import show_fortran_compilers class build(old_build): sub_commands = [('config_cc', ...
mit
nanhuayu/hello-world
Code/bing_wallpaper/bing_wallpaper.py
1
3896
#! /usr/bin/python3 # Author: Maximilian Muth <mail@maxi-muth.de> # https://github.com/mammuth/bing-wallpaper # Version: 1.0 # License: GPL-2.0 # Description: Downloads the Bing picture of the Day and sets it as wallpaper (Linux / Windows). import datetime from urllib.request import urlopen, urlretrieve from xml.dom i...
mit
Salat-Cx65/python-for-android
python3-alpha/python3-src/Lib/fractions.py
57
23033
# Originally contributed by Sjoerd Mullender. # Significantly modified by Jeffrey Yasskin <jyasskin at gmail.com>. """Fraction, infinite-precision, real numbers.""" from decimal import Decimal import math import numbers import operator import re import sys __all__ = ['Fraction', 'gcd'] def gcd(a, b): """Calcu...
apache-2.0
Titulacion-Sistemas/PythonTitulacion-EV
Lib/site-packages/simplejson/tests/test_fail.py
147
6346
import sys from unittest import TestCase import simplejson as json # 2007-10-05 JSONDOCS = [ # http://json.org/JSON_checker/test/fail1.json '"A JSON payload should be an object or array, not a string."', # http://json.org/JSON_checker/test/fail2.json '["Unclosed array"', # http://json.org/JSON_che...
mit
darktears/chromium-crosswalk
tools/telemetry/third_party/typ/typ/__init__.py
81
3167
# 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 ag...
bsd-3-clause
SiCKRAGETV/SickRage
sickrage/notifiers/twilio_notifer.py
2
3713
# Author: echel0n <echel0n@sickrage.ca> # URL: https://sickrage.ca # # This file is part of SickRage. # # SickRage 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...
gpl-3.0
adit-chandra/tensorflow
tensorflow/python/kernel_tests/decode_image_op_test.py
22
4508
# 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...
apache-2.0
boehlke/OpenSlides
tests/old/utils/test_main.py
2
3944
import os import sys from unittest.mock import MagicMock, patch from openslides.utils import main from openslides.utils.test import TestCase class TestFunctions(TestCase): @patch("openslides.utils.main.sys") def test_detect_openslides_type_unix(self, mock_sys): """ Tests the return value on a...
mit
ishay2b/tensorflow
tensorflow/contrib/keras/python/keras/constraints_test.py
55
3896
# 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...
apache-2.0
OpenHumans/open-humans
open_humans/management/commands/get_refresh_tokens.py
2
1032
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from oauth2_provider.models import RefreshToken from private_sharing.models import DataRequestProject, DataRequestProjectMember class Command(BaseCommand): help = "Get refresh tokens" args = "" def add_arguments(self, parser): ...
mit
digideskio/django-booking
booking/forms.py
3
3023
"""Forms for the ``booking`` app.""" from django import forms from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.forms import AuthenticationForm from django.utils.translation import ugettext_lazy as _ from .models import Booking, BookingStatus class BookingForm(for...
mit
GregoryVigoTorres/PaintingsApp
App/Security/user.py
1
1401
from flask import (render_template, redirect, request, url_for, session, flash, current_app) from .forms import LoginForm from flask_security.decorators import (login_required, anonymous_user_required) from flask_security.utils import (login_user, logout_user) from fla...
gpl-3.0
sohovet/sohovet
sohovet_partner_read_only/__openerp__.py
1
2058
# -*- encoding: utf-8 -*- ############################################################################## # # # OpenERP, Open Source Management Solution. # # ...
agpl-3.0
aYukiSekiguchi/ACCESS-Chromium
net/tools/testserver/echo_message.py
187
13195
# 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. """Provides utility functions for TCP/UDP echo servers and clients. This program has classes and functions to encode, decode, calculate checksum and ver...
bsd-3-clause
stephenbalaban/keras
tests/auto/keras/test_constraints.py
78
2446
import unittest import numpy as np from numpy.testing import assert_allclose from theano import tensor as T class TestConstraints(unittest.TestCase): def setUp(self): self.some_values = [0.1, 0.5, 3, 8, 1e-7] np.random.seed(3537) self.example_array = np.random.random((100, 100)) * 100. - 5...
mit
ProfessorX/CIS508
Codes/xen-4.3.1/tools/python/xen/xm/getpolicy.py
49
4621
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
gpl-2.0
IxLabs/net-next
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
ezoncoin/p2pool-ezon
SOAPpy/GSIServer.py
289
5238
from __future__ import nested_scopes """ GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov> ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (G...
gpl-3.0
stonekyx/binary
vendor/scons-local-2.3.4/SCons/Tool/msginit.py
9
4667
""" msginit tool Tool specific initialization of msginit tool. """ # Copyright (c) 2001 - 2014 The SCons Foundation # # 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, ...
gpl-3.0
DropFan/shadowsocks
shadowsocks/common.py
945
8921
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
quxiaolong1504/django
tests/template_tests/syntax_tests/test_if.py
204
25375
import warnings from django.template import TemplateSyntaxError from django.test import SimpleTestCase, ignore_warnings from django.test.utils import reset_warning_registry from django.utils.deprecation import RemovedInDjango110Warning from ..utils import TestObj, setup class IfTagTests(SimpleTestCase): @setup...
bsd-3-clause
josephbisch/the-blue-alliance
tests/test_event_test_creator.py
4
1066
import datetime import unittest2 from google.appengine.ext import testbed from helpers.event.event_test_creator import EventTestCreator from models.event import Event from models.team import Team class TestEventTeamCreator(unittest2.TestCase): def setUp(self): self.testbed = testbed.Testbed() s...
mit
simonkuang/grpc
test/http2_test/test_max_streams.py
30
1926
# Copyright 2016 gRPC 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 law or agreed to in writing...
apache-2.0
cbrewster/servo
tests/wpt/web-platform-tests/tools/third_party/html5lib/html5lib/treeadapters/genshi.py
155
1715
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName, Attrs from genshi.core import START, END, TEXT, COMMENT, DOCTYPE def to_genshi(walker): """Convert a tree to a genshi tree :arg walker: the treewalker to use to walk the tree to convert it :returns: genera...
mpl-2.0
dstiert/Wox
PythonHome/Lib/site-packages/pip/_vendor/requests/sessions.py
294
22290
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os from collections import Mapping from datetime import datetime from .auth import _basic_auth_str from .compat import cookielib, Or...
mit
zenefits/sentry
src/sentry/api/endpoints/release_details.py
2
7771
from __future__ import absolute_import from rest_framework import serializers from rest_framework.response import Response from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint, ProjectReleasePermission from sentry.api.exceptions import ResourceDoesNotExist from sentry.api.serial...
bsd-3-clause
chaluemwut/fbserver
venv/lib/python2.7/site-packages/numpy/lib/twodim_base.py
37
26758
""" Basic functions for manipulating 2d arrays """ from __future__ import division, absolute_import, print_function from numpy.core.numeric import ( asanyarray, arange, zeros, greater_equal, multiply, ones, asarray, where, int8, int16, int32, int64, empty, promote_types ) from numpy.core import iinfo __...
apache-2.0
rbtcollins/pip
pip/_vendor/distlib/resources.py
224
10615
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import bisect import io import logging import os import pkgutil import shutil import sys import types...
mit
kthordarson/CouchPotatoServer
couchpotato/core/media/_base/providers/torrent/kickasstorrents.py
7
7172
import re import traceback from bs4 import BeautifulSoup from couchpotato.core.helpers.variable import tryInt, getIdentifier from couchpotato.core.logger import CPLog from couchpotato.core.media._base.providers.torrent.base import TorrentMagnetProvider log = CPLog(__name__) class Base(TorrentMagnetProvider): ...
gpl-3.0
yongtang/tensorflow
tensorflow/compiler/tests/conv_node_name_test.py
14
4240
# 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...
apache-2.0
stackdio/stackdio
stackdio/api/volumes/serializers.py
2
2229
# -*- coding: utf-8 -*- # Copyright 2017, Digital Reasoning # # 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...
apache-2.0
m-soori/pjsip-blf
pjsip-apps/src/python/samples/call.py
60
5048
# $Id: call.py 2171 2008-07-24 09:01:33Z bennylp $ # # SIP call sample. # # Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either ver...
gpl-2.0
deer-hope/zulip
zerver/lib/notifications.py
115
24217
from confirmation.models import Confirmation from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template import loader from zerver.decorator import statsd_increment, uses_mandrill from zerver.models import Recipient, ScheduledJob, UserMessage, \ Stream, get_display_reci...
apache-2.0
ListFranz/tornado
docs/conf.py
28
2948
# Ensure we get the local copy of tornado instead of what's on the standard path import os import sys import time sys.path.insert(0, os.path.abspath("..")) import tornado master_doc = "index" project = "Tornado" copyright = "2009-%s, The Tornado Authors" % time.strftime("%Y") version = release = tornado.version ext...
apache-2.0
fffonion/you-get
src/you_get/extractors/netease.py
2
4295
#!/usr/bin/env python __all__ = ['netease_download'] from ..common import * from json import loads import hashlib import base64 import os def netease_cloud_music_download(url, output_dir='.', merge=True, info_only=False): rid = match1(url, r'id=(.*)') if rid is None: rid = match1(url, r'/(\d+)/?$')...
mit
ptemplier/ansible
test/units/modules/network/f5/test_bigip_snmp_trap.py
51
7030
# -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks 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) a...
gpl-3.0
Lightmatter/django-inlineformfield
.tox/py27/lib/python2.7/site-packages/django/db/models/sql/compiler.py
15
51284
import datetime from django.conf import settings from django.core.exceptions import FieldError from django.db.backends.utils import truncate_name from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import ExpressionNode from django.db.models.query_utils import select_related_descend, Qu...
mit
dongjoon-hyun/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/batch_reshape_test.py
25
21843
# 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...
apache-2.0
jainanisha90/WeVoteServer
geoip/controllers.py
1
4026
# geoip/controllers.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- # requires an installation of the C library at https://github.com/maxmind/geoip-api-c from django.contrib.gis.geoip import GeoIP import wevote_functions.admin from wevote_functions.functions import get_ip_from_headers, positive_value_...
mit
dinkel/gedit-zoom
zoom/localization.py
1
1163
# -*- coding: utf-8 -*- # # Zoom - gedit plugin # Copyright (C) 2010 Christian Luginbühl # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) ...
gpl-2.0
cliqz/socorro
socorro/lib/psycopghelper.py
11
6668
# 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/. """ Deprecated Module """ import psycopg2 import psycopg2.extensions import datetime import threading import socorro.l...
mpl-2.0
googleapis/python-pubsublite
google/cloud/pubsublite_v1/__init__.py
1
7298
# -*- 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...
apache-2.0
kholidfu/django-dynamic-scraper
setup.py
3
1267
from setuptools import setup import os setup( name='django-dynamic-scraper', version='0.7.3', description='Creating Scrapy scrapers via the Django admin interface', author='Holger Drewes', author_email='Holger.Drewes@gmail.com', url='https://github.com/holgerd77/django-dynamic-scraper/', l...
bsd-3-clause
goldenbull/grpc
src/python/grpcio/grpc/framework/core/_end.py
5
8663
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
0x46616c6b/ansible
lib/ansible/modules/cloud/cloudstack/cs_iso.py
25
11225
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
GitExl/DoomIdgamesArchive
idgames-extract/src/extractors/mapinfoextractor.py
1
1419
import re from typing import Optional, Pattern from archives.archivebase import ArchiveBase from archives.archivefilebase import ArchiveFileBase from doom.mapinfoparser import MapInfoParser from extractors.extractedinfo import ExtractedInfo from extractors.extractorbase import ExtractorBase from utils.lexer import Lex...
bsd-2-clause
azumimuo/family-xbmc-addon
plugin.video.filemmalaya/default.py
1
6229
import urllib, urllib2, re, cookielib, os.path, sys, socket import xbmc, xbmcplugin, xbmcgui, xbmcaddon, xbmcvfs, utils, favorites import telefilem socket.setdefaulttimeout(60) xbmcplugin.setContent(utils.addon_handle, 'movies') addon = xbmcaddon.Addon(id=utils.__scriptid__) progress = utils.progress dialog = utils....
gpl-2.0
alkyl1978/gnuradio
gr-filter/examples/channelize.py
58
7003
#!/usr/bin/env python # # Copyright 2009,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your ...
gpl-3.0
aljim/deploymentmanager-samples
examples/v2/waiter/instance.py
3
2634
# Copyright 2016 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...
apache-2.0
henrytao-me/openerp.positionq
openerp/addons/email_template/html2text.py
440
14143
#!/usr/bin/env python """html2text: Turn HTML into equivalent Markdown-structured text.""" __version__ = "2.36" __author__ = "Aaron Swartz (me@aaronsw.com)" __copyright__ = "(C) 2004-2008 Aaron Swartz. GNU GPL 3." __contributors__ = ["Martin 'Joey' Schulze", "Ricardo Reyes", "Kevin Jay North"] # TODO: # Support deco...
agpl-3.0
alexmorozov/django
django/db/models/fields/related_lookups.py
55
6225
from django.db.models.lookups import ( Exact, GreaterThan, GreaterThanOrEqual, In, IsNull, LessThan, LessThanOrEqual, ) class MultiColSource(object): contains_aggregate = False def __init__(self, alias, targets, sources, field): self.targets, self.sources, self.field, self.alias = targets, so...
bsd-3-clause
anantag/flightsearch
backend/flightsearch/rawParser/views.py
1
7013
from django.views.decorators.csrf import csrf_exempt from datetime import datetime,timedelta from django.conf import settings from django.shortcuts import render from django.http import HttpResponse import parsedatetime as pdt from parsedatetime import Constants from pytz import timezone from rawParser.models import Ai...
gpl-2.0
xadjmerripen/carbon
lib/carbon/log.py
4
3459
import time from os.path import exists from sys import stdout, stderr from zope.interface import implements from twisted.python.log import startLoggingWithObserver, textFromEventDict, msg, err, ILogObserver from twisted.python.syslog import SyslogObserver from twisted.python.logfile import DailyLogFile class CarbonLo...
apache-2.0
ds-hwang/chromium-crosswalk
third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
52
3482
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause