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
jalexvig/tensorflow
tensorflow/contrib/data/python/ops/enumerate_ops.py
41
1984
# 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
x303597316/hue
desktop/core/ext-py/Babel-0.9.6/scripts/dump_data.py
40
1551
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. ...
apache-2.0
peterfpeterson/mantid
Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTestHelper.py
3
4706
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
gpl-3.0
aisipos/django
django/contrib/gis/geoip/prototypes.py
535
3943
from ctypes import POINTER, Structure, c_char_p, c_float, c_int, string_at from django.contrib.gis.geoip.libgeoip import free, lgeoip # #### GeoIP C Structure definitions #### class GeoIPRecord(Structure): _fields_ = [('country_code', c_char_p), ('country_code3', c_char_p), ('cou...
bsd-3-clause
munyirik/python
cpython/Lib/test/test_pyexpat.py
6
26058
# XXX TypeErrors on calling handlers, or on bad return values from a # handler, are obscure and unhelpful. from io import BytesIO import os import sysconfig import unittest import traceback from xml.parsers import expat from xml.parsers.expat import errors from test.support import sortdict class SetAttributeTest(u...
bsd-3-clause
invisiblek/python-for-android
python3-alpha/python3-src/Lib/cProfile.py
79
6350
#! /usr/bin/env python3 """Python interface for the 'lsprof' profiler. Compatible with the 'profile' module. """ __all__ = ["run", "runctx", "Profile"] import _lsprof # ____________________________________________________________ # Simple interface def run(statement, filename=None, sort=-1): """Run statemen...
apache-2.0
TOCyna/tabelinha
flask/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py
1730
3405
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
gpl-2.0
ovnicraft/odoo
addons/crm/res_partner.py
159
5149
# -*- 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...
agpl-3.0
Sup3Roque/Pancas
_OLD/plugin.video.pancas/resources/lib/resolvers/hdcast.py
23
1601
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
gpl-2.0
Lh4cKg/django-facebook
example/django_facebook/settings.py
1
3945
""" Django settings for django_facebook project. Generated by 'django-admin startproject' using Django 1.8.11. 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/ """ # B...
mit
ddico/odoo
addons/hr/tests/test_hr_flow.py
6
2396
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.hr.tests.common import TestHrCommon class TestHrFlow(TestHrCommon): def setUp(self): super(TestHrFlow, self).setUp() self.dep_rd = self.env['hr.department'].create({ 'n...
agpl-3.0
szeged/servo
tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/text-decor-3/support/generate-text-emphasis-line-height-tests.py
829
3431
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests text-emphasis-line-height-001 ~ 004 except 001z. They test the line height expansion in different directions. This script outputs a list of all tests it generated in the format of Mozilla reftest.list to the stdout. """ from __future__ ...
mpl-2.0
zhangtianyi1234/django-haystack
haystack/inputs.py
12
4603
from __future__ import unicode_literals import re import warnings from django.utils.encoding import python_2_unicode_compatible try: from django.utils.encoding import force_text except ImportError: from django.utils.encoding import force_unicode as force_text @python_2_unicode_compatible class BaseInput(obj...
bsd-3-clause
cloudkick/cast-site
hyde/lib/tornado/demos/blog/blog.py
5
6902
#!/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...
apache-2.0
VanirAOSP/external_chromium_org
chrome/common/extensions/docs/server2/docs_server_utils.py
27
1296
# 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. from base64 import b64encode from hashlib import sha1 import os def FormatKey(key): '''Normalize a key by making sure it has a .html extension, and co...
bsd-3-clause
dingocuster/scikit-learn
sklearn/decomposition/fastica_.py
199
18122
""" Python implementation of the fast ICA algorithms. Reference: Tables 8.3 and 8.4 page 196 in the book: Independent Component Analysis, by Hyvarinen et al. """ # Authors: Pierre Lafaye de Micheaux, Stefan van der Walt, Gael Varoquaux, # Bertrand Thirion, Alexandre Gramfort, Denis A. Engemann # License: BS...
bsd-3-clause
EvanK/ansible
lib/ansible/plugins/terminal/nos.py
177
1962
# # (c) 2018 Extreme 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) any later version. # # Ans...
gpl-3.0
jtimon/bitcoin
test/functional/wallet_txn_doublespend.py
6
6036
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet accounts properly when there is a double-spend conflict.""" from decimal import Decimal...
mit
Amechi101/concepteur-market-app
venv/lib/python2.7/site-packages/django/contrib/gis/geos/coordseq.py
219
5438
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import c_double, c_uint, byref from django.contrib.gis.geos.base import GEOSBase, numpy from django.contrib.gis.geos.error impo...
mit
Winand/pandas
pandas/tests/indexing/test_categorical.py
5
17421
# -*- coding: utf-8 -*- import pytest import pandas as pd import numpy as np from pandas import (Series, DataFrame, Timestamp, Categorical, CategoricalIndex) from pandas.util.testing import assert_series_equal, assert_frame_equal from pandas.util import testing as tm class TestCategoricalIndex(o...
bsd-3-clause
StevenBlack/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/committers.py
121
11526
# Copyright (c) 2011, Apple Inc. All rights reserved. # Copyright (c) 2009, 2011, 2012 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 ret...
bsd-3-clause
Intevation/ringo
ringo/views/auth.py
3
13434
import uuid import logging import pyramid.httpexceptions as exc from pyramid.security import remember, forget from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound from formbar.config import Config, load from formbar.form import Form, Validator from ringo.lib.sql import DBSession from rin...
gpl-2.0
xiaoyuanW/gem5
src/mem/slicc/ast/ActionDeclAST.py
60
3453
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
jcgknudson/spotify-lib
common/players/spotify.py
1
9411
#definition for api to create spotify playlist and check if track exists in service import sys, os sys.path.insert(0, os.path.abspath('..')) import math import logging import spotipy import spotipy.util from spotipy.oauth2 import SpotifyClientCredentials class SpotifyPlayer(object): """ Clas...
mit
uhef/fs-uae-gles
launcher/fs_uae_launcher/ui/imports/ImportGroup.py
2
2904
from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import fs_uae_launcher.fsui as fsui from ...I18N import _, ngettext from ...Signal import Signal from .ImportDialog import ImportDialog class ImportGroup(fsui.Group): ...
gpl-2.0
guarddogofww/cs108test
src/jarabe/frame/devicestray.py
4
1901
# Copyright (C) 2008 One Laptop Per Child # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distribu...
gpl-3.0
Juniper/contrail-dev-neutron
neutron/neutron_plugin_base_v2.py
6
13983
# Copyright 2011 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/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
taolei87/rcnn
code/nn/optimization.py
1
9054
''' This file implements various optimization methods, including -- SGD with gradient norm clipping -- AdaGrad -- AdaDelta -- Adam Transparent to switch between CPU / GPU. @author: Tao Lei (taolei@csail.mit.edu) ''' import random from collections import OrderedDict import...
apache-2.0
jeremiedecock/pyai
ailib/mdp/agent/td0.py
1
4686
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2014,2015,2016,2017 Jeremie DECOCK (http://www.jdhp.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, ...
mit
gsmartway/odoo
addons/stock_dropshipping/__openerp__.py
260
2037
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
multikatt/CouchPotatoServer
couchpotato/core/plugins/renamer.py
13
70976
import fnmatch import os import re import shutil import time import traceback from couchpotato import get_db from couchpotato.api import addApiView from couchpotato.core.event import addEvent, fireEvent, fireEventAsync from couchpotato.core.helpers.encoding import toUnicode, ss, sp from couchpotato.core.helpers.variab...
gpl-3.0
mdeemer/XlsxWriter
xlsxwriter/test/comparison/test_rich_string10.py
8
1236
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
ArthurGarnier/SickRage
lib/chardet/sbcsgroupprober.py
273
3546
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
ajaali/django
tests/bash_completion/tests.py
327
3888
""" A series of tests to establish that the command-line bash completion works. """ import os import sys import unittest from django.apps import apps from django.core.management import ManagementUtility from django.test.utils import captured_stdout class BashCompletionTests(unittest.TestCase): """ Testing th...
bsd-3-clause
sajeeshcs/nested_quota_latest
nova/tests/unit/compute/test_hvtype.py
11
1617
# Copyright (C) 2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
allanice001/RJ45
plugins/admin.py
1
6874
from util import hook import os import re import json import time import subprocess @hook.command(autohelp=False, permissions=["permissions_users"]) def permissions(inp, bot=None, notice=None): "permissions [group] -- lists the users and their permission level who have permissions." permissions = bot.config.ge...
gpl-2.0
wscullin/spack
var/spack/repos/builtin/packages/xhost/package.py
3
1821
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
beni55/olympia
apps/reviews/tests/test_helpers.py
14
4658
from nose.tools import eq_ import jingo from pyquery import PyQuery as pq import amo.tests from addons.models import Addon from amo.urlresolvers import reverse from reviews.models import ReviewFlag from reviews.forms import ReviewForm class HelpersTest(amo.tests.TestCase): def render(self, s, context={}): ...
bsd-3-clause
mvaled/OpenUpgrade
addons/hr_contract/hr_contract.py
302
5377
# -*- 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...
agpl-3.0
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201302/inventory_service/create_ad_units.py
3
2804
#!/usr/bin/python # # Copyright 2013 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 b...
apache-2.0
Darkmoth/python-django-4
Thing/env/Lib/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py
1730
2746
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def __init__(self, source, encoding): _base.Filter.__init__(self, source) self.encoding = encoding def __iter__(self): state = "pre_head" meta_found = (self.enco...
gpl-2.0
deapplegate/wtgpipeline
cal_extinctions.py
1
2531
def calc_EBV(coord_in_ra,coord_in_dec): #coord_in_ra='12:51:26.28' #coord_in_dec='27:07:42.' coord = Equatorial( str(coord_in_ra*(24./360.)), str(coord_in_dec), epoch='2000') # input needs to be in HOURS as a STRING g = Galactic(coord, epoch='2000') # output is in degrees not hours--it's lati...
mit
chintal/cocomo
setup.py
1
1153
#!/usr/bin/env python import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open...
mit
renatogames2/namebench
nb_third_party/simplejson/encoder.py
296
18214
"""Implementation of JSONEncoder """ import re from decimal import Decimal def _import_speedups(): try: from simplejson import _speedups return _speedups.encode_basestring_ascii, _speedups.make_encoder except ImportError: return None, None c_encode_basestring_ascii, c_make_encoder = _im...
apache-2.0
chen0031/nupic
tests/unit/nupic/encoders/pass_through_encoder_test.py
28
5099
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
egabancho/invenio
invenio/modules/formatter/format_elements/bfe_imprint.py
36
2474
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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 ## ...
gpl-2.0
s-hertel/ansible
hacking/build_library/build_ansible/command_plugins/release_announcement.py
55
2905
# coding: utf-8 # Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import sys from collections import UserString from...
gpl-3.0
asimshankar/tensorflow
tensorflow/python/saved_model/constants.py
13
4118
# 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
josemartin/TVshowDownloader
subService.py
1
13451
# -*- coding: utf-8 -*- # based on argenteam.net subtitles, based on a mod of Subdivx.com subtitles, based on a mod of Undertext subtitles # developed by quillo86 and infinito for Subtitulos.es and XBMC.org # little fixes and updates by tux_os # # Adaptation for tv show downloader by J. Martin # import os, sys, re, st...
gpl-3.0
stsouko/MWUI
vk_update/VKUpdate/misaka.py
1
1044
# -*- coding: utf-8 -*- # # Copyright 2019 Ramil Nugmanov <stsouko@live.ru> # This file is part of CIpress. # # CIpress is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the Licen...
agpl-3.0
MungoRae/home-assistant
homeassistant/const.py
1
12851
# coding: utf-8 """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 52 PATCH_VERSION = '0.dev0' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2) REQUIRED_PYTHON_VER_WIN = (3, 5...
apache-2.0
when30/namebench
libnamebench/nameserver_test.py
175
7015
#!/usr/bin/env python # Copyright 2009 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...
apache-2.0
mapequation/infomap
examples/python/infomap-networkx.py
1
2219
#!/usr/bin/env python import networkx as nx import matplotlib.pyplot as plt import matplotlib.colors as colors import pathlib import infomap """ Generate and draw a network with NetworkX, colored according to the community structure found by Infomap. """ def find_communities(G): """ Partition network with ...
agpl-3.0
chouseknecht/openshift-restclient-python
openshift/test/test_v1_cluster_resource_quota.py
1
4299
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is...
apache-2.0
TNT-Samuel/Coding-Projects
DNS Server/Source - Copy/Lib/turtledemo/lindenmayer.py
164
2434
#!/usr/bin/env python3 """ turtle-example-suite: xtx_lindenmayer_indian.py Each morning women in Tamil Nadu, in southern India, place designs, created by using rice flour and known as kolam on the thresholds of their homes. These can be described by Lindenmayer systems, which can easily be implemented ...
gpl-3.0
kunovg/pldownload
workers/linkgenerator.py
1
2225
import logging from queue import Queue from threading import Thread from linkgenerators.soundcloud import ScDownloader from linkgenerators.vubey import Vubey from linkgenerators.youtubemp3org import Mp3Org from linkgenerators.youtubetomp3cc import Mp3Cc from linkgenerators.onlinevideoconverter import Ovc from linkgener...
mit
osvalr/odoo
addons/account_followup/wizard/__init__.py
437
1076
# -*- 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...
agpl-3.0
willcodefortea/wagtail
wagtail/project_template/core/migrations/0002_create_homepage.py
3
7165
# -*- coding: utf-8 -*- from __future__ import unicode_literals from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models, connection from django.db.transaction import set_autocommit class Migration(DataMigration): depends_on = ( ...
bsd-3-clause
enovance/numeter
web-app/numeter_webapp/rest/viewsets/view.py
2
2170
""" View ViewSet module. """ from rest_framework.viewsets import ModelViewSet from rest_framework.renderers import JSONRenderer from rest_framework.response import Response from rest_framework.status import HTTP_201_CREATED, HTTP_400_BAD_REQUEST from rest_framework.decorators import link from multiviews.models impor...
agpl-3.0
jmhsi/justin_tinker
data_science/courses/learning_dl_packages/models/research/slim/datasets/build_imagenet_data.py
8
26196
# 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
SujaySKumar/django
tests/staticfiles_tests/test_liveserver.py
247
3474
""" A subset of the tests in tests/servers/tests exercicing django.contrib.staticfiles.testing.StaticLiveServerTestCase instead of django.test.LiveServerTestCase. """ import contextlib import os from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.core.exceptions import ImproperlyConfig...
bsd-3-clause
ebbypeter/enso
enso/graphics/measurement.py
7
5398
# Copyright (c) 2008, Humanized, 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 conditi...
bsd-3-clause
ActionAdam/osmc
package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x011.py
252
4135
data = ( 'g', # 0x00 'gg', # 0x01 'n', # 0x02 'd', # 0x03 'dd', # 0x04 'r', # 0x05 'm', # 0x06 'b', # 0x07 'bb', # 0x08 's', # 0x09 'ss', # 0x0a '', # 0x0b 'j', # 0x0c 'jj', # 0x0d 'c', # 0x0e 'k', # 0x0f 't', # 0x10 'p', # 0x11 'h', # 0x12 'ng', # 0x13 'nn', ...
gpl-2.0
royalharsh/grpc
examples/python/route_guide/route_guide_client.py
25
4682
# 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
classmember/proof_of_concept
python/events/lib/python3.4/site-packages/pip/_internal/locations.py
8
6307
"""Locations where we look for configs, install stuff, etc""" from __future__ import absolute_import import os import os.path import platform import site import sys import sysconfig from distutils import sysconfig as distutils_sysconfig from distutils.command.install import SCHEME_KEYS # type: ignore from pip._inter...
mit
Workday/OpenFrame
tools/telemetry/third_party/gsutilz/third_party/boto/boto/elasticache/layer1.py
150
73538
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
bsd-3-clause
kastriothaliti/techstitution
venv/lib/python3.5/site-packages/pip/_vendor/distlib/database.py
334
49672
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """PEP 376 implementation.""" from __future__ import unicode_literals import base64 import codecs import contextlib import hashlib import logging import os import posixpath import sys import z...
gpl-3.0
open-synergy/vertical-community
__unreviewed__/community/__openerp__.py
4
2022
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron. Copyright Yannick Buron # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by t...
agpl-3.0
djw8605/condor
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/conversion.py
10
15351
'''Conversion between constants and text. ''' import enums import os # Following code is needed when building executable files using py2exe. # Together with the Languages.__init__ it makes sure that all languages # are included in the package built by py2exe. The tool lookes just at # the imports, it ignores the 'if...
apache-2.0
wwgong/CVoltDB
tests/scripts/profctl.py
4
1385
#!/usr/bin/env python # -*- coding: utf-8 # This file is part of VoltDB. # Copyright (C) 2008-2011 VoltDB Inc. # # 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, includin...
gpl-3.0
Distrotech/buck
programs/gen_buck_info.py
11
1482
import errno import os import json import sys import time import buck_version def main(argv): # Locate the root of the buck repo. We'll need to be there to # generate the buck version UID. path = os.getcwd() while not os.path.exists(os.path.join(path, '.buckconfig')): path = os.path.dirname...
apache-2.0
3dfxsoftware/cbss-addons
stock_picking_validate_past/__init__.py
1
1292
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxoo (info@vauxoo.com) ####################################...
gpl-2.0
thinkwhale/MyTakeOnQuotes
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/token.py
365
5662
# -*- coding: utf-8 -*- """ pygments.token ~~~~~~~~~~~~~~ Basic token types and the standard tokens. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ class _TokenType(tuple): parent = None def split(self): buf = [] ...
mit
g0tmi1k/veil-Evasion
modules/common/shellcode.py
3
24253
""" Contains main Shellcode class as well as the Completer class used for tab completion of metasploit payload selection. """ # Import Modules import commands import socket import sys import os import sys import re import readline import subprocess import binascii from modules.common import messages from modules.com...
gpl-3.0
paaschpa/badcomputering
docutils/parsers/rst/roles.py
6
13426
# $Id: roles.py 6451 2010-10-25 08:02:43Z milde $ # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # Copyright: This module has been placed in the public domain. """ This module defines standard interpreted text role functions, a registry for interpreted text roles, and an API for adding to and retrieving from ...
bsd-3-clause
Karumi/Kin
kin/grammar/PBXProjLexer.py
1
80888
# Generated from PBXProj.g4 by ANTLR 4.9.2 from antlr4 import * from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO else: from typing.io import TextIO def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\...
apache-2.0
jonasundderwolf/django-localizedfields
localizedfields/fields.py
1
7494
from composite_field.base import CompositeField from django.conf import settings from django.db import models from django.utils import translation from django.utils.functional import lazy from .utils import ( SHORT_LANGUAGES, LanguageAwareUploadToDirectory, for_all_languages, get_language, localize...
bsd-3-clause
bussiere/pypyjs
website/demo/home/rfk/repos/pypy/lib-python/2.7/encodings/iso2022_jp_2.py
816
1061
# # iso2022_jp_2.py: Python Unicode Codec for ISO2022_JP_2 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_2') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class Incrementa...
mit
alx-eu/django
tests/modeltests/update/tests.py
118
4307
from __future__ import absolute_import, unicode_literals from django.test import TestCase from .models import A, B, C, D, DataPoint, RelatedPoint class SimpleTest(TestCase): def setUp(self): self.a1 = A.objects.create() self.a2 = A.objects.create() for x in range(20): B.objec...
bsd-3-clause
Tejal011089/osmosis_erpnext
erpnext/support/doctype/maintenance_visit/maintenance_visit.py
34
3196
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from erpnext.utilities.transaction_base import TransactionBase class MaintenanceVisit(TransactionBase): def get_fe...
agpl-3.0
hainm/mdtraj
mdtraj/utils/unit/doctests.py
17
21017
""" Module simtk.unit.doctests Lots of in-place doctests would no longer work after I rearranged so that specific unit definitions are defined late. So those tests are here. Examples >>> furlong = BaseUnit(length_dimension, "furlong", "fur") Examples >>> furlong_base_unit = BaseUnit(length_dimension, "furlong", "...
lgpl-2.1
sorenk/ansible
lib/ansible/modules/system/runit.py
64
8646
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2015, Brian Coca <bcoca@ansible.com> # 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': '...
gpl-3.0
zanderle/django
tests/update_only_fields/tests.py
296
9780
from __future__ import unicode_literals from django.db.models.signals import post_save, pre_save from django.test import TestCase from .models import Account, Employee, Person, Profile, ProxyEmployee class UpdateOnlyFieldsTests(TestCase): def test_update_fields_basic(self): s = Person.objects.create(nam...
bsd-3-clause
SpiderLabs/deblaze
pyamf/pyamf/tests/modules/test_decimal.py
2
1030
# Copyright (c) 2007-2009 The PyAMF Project. # See LICENSE for details. """ Tests for the C{decimal} module integration. """ import unittest import decimal import pyamf class DecimalTestCase(unittest.TestCase): def test_amf0_encode(self): x = decimal.Decimal('1.23456463452345') self.assertEqual...
gpl-3.0
DougFirErickson/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/algorithms/link_analysis/tests/test_hits.py
79
2544
#!/usr/bin/env python from nose.tools import * from nose import SkipTest from nose.plugins.attrib import attr import networkx # Example from # A. Langville and C. Meyer, "A survey of eigenvector methods of web # information retrieval." http://citeseer.ist.psu.edu/713792.html class TestHITS: def setUp(self): ...
gpl-3.0
tailhook/quire
doc/conf.py
1
7731
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Quire documentation build configuration file, created by # sphinx-quickstart on Wed Oct 16 19:11:54 2013. # # 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 # autoge...
mit
meego-tablet-ux/meego-app-browser
chrome/test/functional/shortcuts.py
3
8091
#!/usr/bin/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. import os import re import pyauto_functional import pyauto class ShortcutsTest(pyauto.PyUITest): """Test for browser shortcuts. ...
bsd-3-clause
Google1234/Information_retrieva_Projectl-
similar_doc.py
1
11809
#-*- coding: UTF-8 -*- import jieba import config import News_Recommend path="data/netease" class read_block: def __init__(self,buff_size,filename): self.size=buff_size self.filename=open(filename,'r') self.buff=self.filename.read(self.size) self.pointer=0 if ...
mit
python-xlib/python-xlib
Xlib/keysymdef/cyrillic.py
14
2540
XK_Serbian_dje = 0x6a1 XK_Macedonia_gje = 0x6a2 XK_Cyrillic_io = 0x6a3 XK_Ukrainian_ie = 0x6a4 XK_Ukranian_je = 0x6a4 XK_Macedonia_dse = 0x6a5 XK_Ukrainian_i = 0x6a6 XK_Ukranian_i = 0x6a6 XK_Ukrainian_yi = 0x6a7 XK_Ukranian_yi = 0x6a7 XK_Cyrillic_je = 0x6a8 XK_Serbian_je = 0x6a8 XK_Cyrillic_lje = 0x6a9 XK_Serbian_lje =...
lgpl-2.1
vinayan3/scrapy-statsd
setup.py
1
1505
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
mit
sichenucsd/caffe_si
python/classify.py
31
3625
#!/usr/bin/env python """ classify.py is an out-of-the-box image classifer callable from the command line. By default it configures and runs the Caffe reference ImageNet model. """ import numpy as np import os import sys import argparse import glob import time import caffe def main(argv): pycaffe_dir = os.path....
bsd-2-clause
J216/gimp_be
gimp_be/core.py
1
27568
import gimp from gimp import pdb from settings import * from network import * from image import * from utils import * from draw import * from paint import * from collections import Counter import TwitterAPI from random import randrange, choice, shuffle from string import letters import datetime as dt from time import...
mit
Rhizi/rhizi
rhizi/tests/test_binaries.py
1
4163
# coding: utf-8 import unittest import os import sys import subprocess from glob import glob import time from tempfile import TemporaryFile, mktemp from six import u root_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..')) bin_path = os.path.join(root_path, 'bin') def which(f): return...
agpl-3.0
exowanderer/SpitzerDeepLearningNetwork
Python Scripts/sklearn_RandomForests_training.py
1
29664
from argparse import ArgumentParser ap = ArgumentParser() ap.add_argument('-ns' , '--n_resamp' , required=False, type=int , default=1 , help="Number of resamples to perform (GBR=1; No Resamp=0)") ap.add_argument('-nt' , '--n_trees' , required=False, type=int , default=100 , help="Number of trees in the fores...
mit
SDSG-Invenio/invenio
invenio/modules/alerts/models.py
13
2619
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2014 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 optio...
gpl-2.0
was4444/chromium.src
build/android/pylib/instrumentation/instrumentation_test_instance_test.py
16
3588
#!/usr/bin/env python # 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. """Unit tests for instrumentation.TestRunner.""" import unittest from pylib.base import base_test_result from pylib.constants import...
bsd-3-clause
jroyal/plexpy
lib/apscheduler/util.py
32
12956
"""This module contains several handy functions primarily meant for internal use.""" from __future__ import division from datetime import date, datetime, time, timedelta, tzinfo from inspect import isfunction, ismethod, getargspec from calendar import timegm import re from pytz import timezone, utc import six try: ...
gpl-3.0
meteorcloudy/tensorflow
tensorflow/contrib/predictor/predictor_factories.py
10
5570
# 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
rocky/python2-trepan
trepan/processor/command/set_subcmd/patsub.py
2
1775
# -*- coding: utf-8 -*- # Copyright (C) 2020 Rocky Bernstein # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
gpl-3.0
wtanaka/beam
sdks/python/apache_beam/examples/wordcount_debugging.py
8
6469
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0