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
roscalabrin/bomberman
node_modules/node-gyp/gyp/tools/pretty_sln.py
1831
5099
#!/usr/bin/env python # Copyright (c) 2012 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. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
mit
Evenity/py_psa
py_psa/example_multi_(sagitally_focused)_vertical.py
1
3090
from psa_functions_numeric import * from psa_functions_symbolic import * SourceI = 1e25 SigmaXSource = 1e-1 SigmaYSource = 1e-2 SigmaYPSource = 10**-4 SigmaXPSource = 3e-5 GammaSource = 0 SigmaSLambda = 1e-3 bMonoX = 1 bMonoY = 1 CoefMonoX = 1 CoefMonoY = 1 CoefAtten = 1 # distances z0 = 32000 z1 = 3000 ListDistance ...
mit
pFernbach/hpp-rbprm-corba
script/tools/muscodSSH.py
1
1769
from config import * import subprocess from subprocess import Popen, PIPE, STDOUT if DISPLAY_MUSCOD: d=" -X " else: d=" " #cmd = "ssh"+d+"iwaki 'cd "+MUSCOD_DIR+" ; source /local/pfernbac/config.sh ; muscod_release "+DAT_NAME+" ; killall pgxwin_server '" #cmd = "ssh -X iwaki 'cd /local/pfernbac/muscod/walk/uc-dua...
lgpl-3.0
israeltobias/DownMedia
youtube-dl/youtube_dl/extractor/tfo.py
12
1909
# coding: utf-8 from __future__ import unicode_literals import json from .common import InfoExtractor from ..utils import ( HEADRequest, ExtractorError, int_or_none, ) class TFOIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tfo\.org/(?:en|fr)/(?:[^/]+/){2}(?P<id>\d+)' _TEST = { 'ur...
gpl-3.0
catacgc/ansible-modules-core
cloud/rackspace/rax_clb.py
5
8997
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
mancoast/CPythonPyc_test
fail/310_test_aifc.py
55
3979
from test.support import findfile, run_unittest, TESTFN import unittest import os import aifc class AIFCTest(unittest.TestCase): def setUp(self): self.f = self.fout = None self.sndfilepath = findfile('Sine-1000Hz-300ms.aif') def tearDown(self): if self.f is not None: sel...
gpl-3.0
habibiefaried/ryu
ryu/contrib/ncclient/transport/session.py
31
7902
# Copyright 2009 Shikhar Bhushan # # 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 writin...
apache-2.0
Herst/selenium
py/test/selenium/webdriver/common/rendered_webelement_tests.py
2
2987
# 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
he7d3r/revscoring
revscoring/languages/turkish.py
2
5504
from .features import RegexMatches, Stopwords name = "turkish" try: from nltk.corpus import stopwords as nltk_stopwords stopwords = set(nltk_stopwords.words('turkish')) except LookupError: raise ImportError("Could not load stopwords for {0}. ".format(__name__) + "You may need to inst...
mit
Pathoschild/stewbot
stewbot/components/modules/chardet/mbcssm.py
1
17850
######################## 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...
isc
sreecha/grpc
examples/python/debug/get_stats.py
2
1474
# Copyright 2019 The 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 writ...
apache-2.0
lipis/electron-crash-reporter
main/auth/instagram.py
8
1466
# coding: utf-8 import flask import auth import model import util from main import app instagram_config = dict( access_token_method='POST', access_token_url='https://api.instagram.com/oauth/access_token', authorize_url='https://instagram.com/oauth/authorize/', base_url='https://api.instagram.com/v1', cons...
mit
ecelis/monroe
monroe/getchar.py
1
1035
class _GetchUnix: def __init__(self): import tty, sys def __call__(self): import sys, tty, termios fd = sys.stdin.fileno() old_settings = termios.tcgetattr(fd) try: tty.setraw(sys.stdin.fileno()) ch = sys.stdin.read(1) finally: ...
apache-2.0
eciis/web
backend/models/__init__.py
1
1032
"""Initialize models module.""" from .address import * from .institution import * from .user import * from .event import * from .invite import * from .invite_institution import * from .invite_institution_children import * from .invite_institution_parent import * from .invite_user import * from .invite_user_adm import *...
gpl-3.0
Yong-Lee/django
django/conf/locale/zh_Hans/formats.py
1008
1810
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y年n月j日' # 2016年9月5...
bsd-3-clause
citrix-openstack-build/ceilometer
ceilometer/storage/impl_log.py
3
7985
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # # 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 # # ...
apache-2.0
jskew/gnuradio
gr-blocks/python/blocks/qa_udp_source_sink.py
40
3667
#!/usr/bin/env python # # Copyright 2008,2010,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
noblisnsp/volatility
volatility/plugins/malware/devicetree.py
44
10862
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (c) 2010, 2011, 2012 Michael Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
gpl-2.0
lsinfo/odoo
addons/hr_attendance/report/attendance_errors.py
377
3669
# -*- 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
topxiaoke/myedx
lms/envs/acceptance.py
13
6658
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 from .test import * from .sauce import * # You ...
agpl-3.0
pmav99/praktoras
checks.d/riakcs.py
1
3750
# (C) Fractal Industries, Inc. 2016 # (C) Datadog, Inc. 2010-2016 # (C) Jon Glick <jglick@basho.com> 2014 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from collections import defaultdict # 3rd party from boto.s3.connection import S3Connection import simplejson as json # projec...
bsd-3-clause
oscar810429/mysql-5.6_facebook
xtrabackup/test/kewpie/lib/modes/sysbench/sysbench_test_execution.py
25
6315
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2010 Patrick Crews # # # 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 Softwar...
gpl-2.0
Sorsly/subtle
google-cloud-sdk/lib/surface/iam/service_accounts/list.py
3
1823
# 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 ag...
mit
cyberden/CouchPotatoServer
libs/suds/metrics.py
211
2004
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will ...
gpl-3.0
skevy/django
django/db/models/deletion.py
2
10834
from functools import wraps from operator import attrgetter from django.db import connections, transaction, IntegrityError from django.db.models import signals, sql from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE from django.utils.datastructures import SortedDict class ProtectedError(IntegrityErro...
bsd-3-clause
OSSOS/MOP
src/ossos/core/ossos/ssos.py
1
31302
import datetime import os import pprint import warnings import numpy import requests from astropy import units from astropy.coordinates import SkyCoord from astropy.io import ascii from astropy.time import Time from . import astrom, mpc, parameters from .astrom import SourceReading from .gui import logger, config from...
gpl-3.0
robdodson/WebFundamentals
gae/lib/markdown/blockprocessors.py
47
22991
""" CORE MARKDOWN BLOCKPARSER =========================================================================== This parser handles basic parsing of Markdown blocks. It doesn't concern itself with inline elements such as **bold** or *italics*, but rather just catches blocks, lists, quotes, etc. The BlockParser is made up ...
apache-2.0
muntasirsyed/intellij-community
python/helpers/pydev/pydevd_import_class.py
57
1833
#Note: code gotten from _pydev_imports_tipper. import sys def _imp(name, log=None): try: return __import__(name) except: if '.' in name: sub = name[0:name.rfind('.')] if log is not None: log.AddContent('Unable to import', name, 'trying with'...
apache-2.0
jeppeter/pytest
testing/test_mark.py
2
14385
import py, pytest from _pytest.mark import MarkGenerator as Mark class TestMark: def test_markinfo_repr(self): from _pytest.mark import MarkInfo m = MarkInfo("hello", (1,2), {}) repr(m) def test_pytest_exists_in_namespace_all(self): assert 'mark' in py.test.__all__ asse...
mit
mupi/timtec
timtec/urls.py
2
9417
# -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.views.generic import TemplateView from accounts.views import (ProfileEditView, ProfileView, UserSearchView, TimtecUserViewSet, ...
agpl-3.0
pedrobaeza/stock-logistics-workflow
__unported__/stock_move_on_hold/product.py
33
3646
# -*- coding: utf-8 -*- ################################################################################# # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Julius Network Solutions SARL <contact@julius.fr> # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
walterst/qiime
qiime/nmds.py
15
1417
#!/usr/bin/env python from __future__ import division import numpy import os.path import cogent.cluster.nmds as nmds_module from qiime.format import format_nmds_coords from qiime.parse import parse_distmat __author__ = "Justin Kuzynski" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Justin Kuczyns...
gpl-2.0
lseyesl/phantomjs
src/qt/qtwebkit/Tools/BuildSlaveSupport/build.webkit.org-config/htdigestparser_unittest.py
117
4550
# Copyright (C) 2011 Apple 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...
bsd-3-clause
mikeAopeneng/joyo-kanji
tools/manage-crowdin.py
1
5582
#!/usr/bin/python # Copyright (c) 2010 norbert.nagold@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 # Foundation; either version 3 of the License, or (at your option) any later # version. # # T...
gpl-2.0
tuxillo/aarch64-dragonfly-binutils-gdb
gdb/testsuite/gdb.python/py-objfile-script-gdb.py
46
1961
# Copyright (C) 2011-2015 Free Software Foundation, Inc. # 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 progr...
gpl-2.0
davidwaroquiers/abiflows
abiflows/fireworks/tasks/src_tasks_abc.py
2
51910
import abc import copy import inspect import json import os import six from fireworks.core.firework import FireTaskBase from fireworks.core.firework import FWAction from fireworks.core.firework import Workflow from fireworks.core.firework import Firework from fireworks.core.launchpad import LaunchPad from fireworks.ut...
gpl-2.0
zarboz/Ville-Test
Documentation/target/tcm_mod_builder.py
3119
42754
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
neilswainston/PathwayGenie
plasmid_genie/plasmid.py
1
5402
''' PathwayGenie (c) GeneGenie Bioinformatics Ltd. 2018 PathwayGenie is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' # pylint: disable=wrong-import-order from __future__ import division from synbiochem.utils import dna_utils...
mit
kleins11/intdatasci-byte2
lib/werkzeug/utils.py
345
22972
# -*- coding: utf-8 -*- """ werkzeug.utils ~~~~~~~~~~~~~~ This module implements various utilities for WSGI applications. Most of them are used by the request and response wrappers but especially for middleware development it makes sense to use them without the wrappers. :copyright: (c) 2014 ...
apache-2.0
kamwar/simLAB
tests/live/test_shell.py
1
9808
#!/usr/bin/python # LICENSE: GPL2 # (c) 2015 Kamil Wartanowicz import sys,os.path sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from sim import sim_router from sim import sim_card from sim import sim_shell from util import hextools from util import types_g from util import types import unittest im...
gpl-2.0
vbextreme/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/exceptions.py
245
2258
# urllib3/exceptions.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php ## Base Exceptions class HTTPError(Exception): "Base exception used by this module." ...
lgpl-2.1
timchen86/ntulifeguardapp
gdata-2.0.18/src/gdata/projecthosting/data.py
120
3309
#!/usr/bin/env python # # Copyright 2009 Google 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
tafaRU/odoo
addons/hr_timesheet_invoice/hr_timesheet_invoice.py
82
17704
# -*- 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
tobiasgehring/qudi
hardware/sc_magnet/magnet.py
1
62977
# -*- coding: utf-8 -*- """ Hardware file for the Superconducting Magnet (SCM) QuDi 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. QuDi is...
gpl-3.0
bedalus/nexus4
scripts/tracing/draw_functrace.py
14676
3560
#!/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 ...
gpl-2.0
eayunstack/python-neutronclient
neutronclient/tests/unit/vpn/test_cli20_endpoint_group.py
6
6110
# (c) Copyright 2015 Cisco Systems, 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 # # Un...
apache-2.0
procangroup/edx-platform
openedx/core/djangoapps/embargo/test_utils.py
10
2877
"""Utilities for writing unit tests that involve course embargos. """ import contextlib import mock from django.core.cache import cache from django.core.urlresolvers import reverse import pygeoip from .models import Country, CountryAccessRule, RestrictedCourse @contextlib.contextmanager def restrict_course(course_...
agpl-3.0
amitjamadagni/sympy
sympy/assumptions/handlers/ntheory.py
1
6427
""" Handlers for keys related to number theory: prime, even, odd, etc. """ from sympy.assumptions import Q, ask from sympy.assumptions.handlers import CommonHandler from sympy.ntheory import isprime class AskPrimeHandler(CommonHandler): """ Handler for key 'prime' Test that an expression represents a prim...
bsd-3-clause
lauri-codes/GameShop
gameshop/social/tests/backends/test_google.py
80
10397
import datetime import json from httpretty import HTTPretty from social.p3 import urlencode from social.actions import do_disconnect from social.tests.models import User from social.tests.backends.oauth import OAuth1Test, OAuth2Test from social.tests.backends.open_id import OpenIdTest, OpenIdConnectTestMixin class...
gpl-2.0
darksigma/traceless
demo/slave4/app/view_manager/routes.py
10
3958
from . import view_manager from flask import jsonify, request, abort from flask import current_app as app import os from .. import traceless_crypto import requests import json @view_manager.route('/', methods = ['POST']) def hello_world(): print "hello world" return "hello world" @view_manager.route('/send_pi...
mit
gennadykr/selenium-training
selenium/python-example/test_litecart_admin_country_external_links.py
1
2329
import pytest from selenium import webdriver from selenium.common.exceptions import StaleElementReferenceException from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.select...
apache-2.0
realsaiko/odoo
addons/account_asset/report/account_asset_report.py
279
4226
# -*- encoding: 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 t...
agpl-3.0
SiLab-Bonn/pyBAR
pybar/daq/readout_utils.py
1
19022
import logging import os import numpy as np import tables as tb class NameValue(tb.IsDescription): name = tb.StringCol(256, pos=0) value = tb.StringCol(4 * 1024, pos=0) def save_configuration_dict(h5_file, configuation_name, configuration, **kwargs): '''Stores any configuration dictionary ...
bsd-3-clause
andfoy/margffoy-tuay-server
env/lib/python2.7/site-packages/tornado/platform/interface.py
387
2244
#!/usr/bin/env python # # Copyright 2011 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...
gpl-2.0
badloop/SickRage
tests/tv_tests.py
7
3699
# coding=UTF-8 # Author: Dennis Lutter <lad1337@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # 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 vers...
gpl-3.0
ckprice/bedrock
bedrock/firefox/firefox_details.py
3
6888
import re from operator import itemgetter from urllib import urlencode from product_details import ProductDetails # TODO: port this to django-mozilla-product-details class FirefoxDetails(ProductDetails): download_base_url_direct = 'https://download.mozilla.org/' download_base_url_transition = '/products/down...
mpl-2.0
dralves/nixysa
third_party/ply-3.1/test/yacc_dup.py
174
1511
# ----------------------------------------------------------------------------- # yacc_dup.py # # Duplicated rule name # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import tokens # Parsi...
apache-2.0
chromium/chromium
third_party/blink/web_tests/external/wpt/webdriver/tests/refresh/refresh.py
16
3290
import pytest from webdriver.error import NoSuchElementException, StaleElementReferenceException from tests.support.asserts import assert_error, assert_success def refresh(session): return session.transport.send( "POST", "session/{session_id}/refresh".format(**vars(session))) def test_null_response_va...
bsd-3-clause
evanma92/routeh
flask/lib/python2.7/site-packages/sqlalchemy/util/topological.py
21
2594
# util/topological.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Topological sorting algorithms.""" from ..exc import CircularDependencyError...
bsd-3-clause
juergh/dwarf
tests/clients/test_openstack.py
2
1668
#!/usr/bin/env python # # Copyright (c) 2017 Hewlett Packard Enterprise, L.P. # Copyright (c) 2013 OpenStack Foundation # # 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.apach...
apache-2.0
aioue/ansible
test/units/module_utils/facts/test_collectors.py
39
14792
# unit tests for ansible fact collectors # -*- coding: utf-8 -*- # # 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. # # Ansibl...
gpl-3.0
alvaroaleman/ansible
test/units/module_utils/basic/test__log_invocation.py
40
3275
# -*- coding: utf-8 -*- # (c) 2016, James Cammarata <jimi@sngx.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 License, or # (at your o...
gpl-3.0
qudou/musicbox
NEMbox/config.py
3
4846
# encoding: UTF-8 from __future__ import ( print_function, unicode_literals, division, absolute_import ) import json import os from future.builtins import open from .singleton import Singleton from .const import Constant from .utils import utf8_data_to_file class Config(Singleton): def __init__(self): ...
mit
Livhaker/django-calaccess-raw-data
example/toolbox/management/commands/analyzeuniquekeys.py
18
1407
import os import time import calculate from github import Github from django.conf import settings from calaccess_raw import get_model_list from calaccess_raw.management.commands import CalAccessCommand from django.contrib.humanize.templatetags.humanize import intcomma class Command(CalAccessCommand): help = 'Anal...
mit
braingineer/AI-games
pacman/search/grading.py
36
9271
# grading.py # ---------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # #...
mit
wangxuan007/flasky
venv/lib/python2.7/site-packages/werkzeug/useragents.py
257
5418
# -*- coding: utf-8 -*- """ werkzeug.useragents ~~~~~~~~~~~~~~~~~~~ This module provides a helper to inspect user agent strings. This module is far from complete but should work for most of the currently available browsers. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more deta...
gpl-3.0
greasypizza/grpc
src/python/grpcio/grpc/framework/interfaces/base/__init__.py
901
1528
# 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
Jionglun/2015
static/Brython3.1.1-20150328-091302/Lib/genericpath.py
727
3093
""" Path operations common to more than one OS Do not use directly. The OS specific modules import the appropriate functions from this module themselves. """ import os import stat __all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime', 'getsize', 'isdir', 'isfile'] # Does a path exist? #...
gpl-3.0
hhsprings/cython
Cython/Compiler/Tests/TestMemView.py
127
2516
from Cython.TestUtils import CythonTest import Cython.Compiler.Errors as Errors from Cython.Compiler.Nodes import * from Cython.Compiler.ParseTreeTransforms import * from Cython.Compiler.Buffer import * class TestMemviewParsing(CythonTest): def parse(self, s): return self.should_not_fail(lambda: self.fra...
apache-2.0
adamfisk/littleshoot-client
server/appengine/boto/sdb/db/manager/sdbmanager.py
1
17379
# Copyright (c) 2006,2007,2008 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,...
gpl-2.0
romanov6416/runos
test/gmock-1.7.0/gtest/test/gtest_xml_outfiles_test.py
2526
5340
#!/usr/bin/env python # # Copyright 2008, 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...
apache-2.0
tedsunnyday/SE-Server
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/langbulgarianmodel.py
2965
12784
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
apache-2.0
darktears/crosswalk
build/android/generate_runtime_client_version.py
44
1333
#!/usr/bin/env python # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import sys def ReplaceVersion(template_file, output_file, xwalk_version): output_handle = open(output_file, 'w+') ...
bsd-3-clause
niknow/scipy
scipy/weave/base_spec.py
100
3516
from __future__ import absolute_import, print_function class base_converter(object): """ Properties: headers -- list of strings that name the header files needed by this object. include_dirs -- list of directories where the header files can be found. libraries ...
bsd-3-clause
dakr/xbmc
tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py
138
6987
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008-2013 Team XBMC # # 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
vileopratama/vitech
src/openerp/addons/base/ir/ir_values.py
18
25433
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import tools from openerp.osv import osv, fields from openerp.exceptions import AccessError, MissingError from openerp.tools.translate import _ from openerp.tools import pickle EXCLUDED_FIELDS = set(( '...
mit
jimboatarm/workload-automation
wlauto/workloads/iozone/__init__.py
7
11123
# Copyright 2012-2015 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 w...
apache-2.0
drnextgis/QGIS
python/plugins/db_manager/dlg_sql_layer_window.py
2
20567
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
pierrelb/RMG-Py
scripts/checkModels.py
2
10691
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2009-2011 by the RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of thi...
mit
jshiv/turntable
test/lib/python2.7/site-packages/scipy/lib/_tmpdirs.py
126
2438
''' Contexts for *with* statement providing temporary directories ''' from __future__ import division, print_function, absolute_import import os from contextlib import contextmanager from shutil import rmtree from tempfile import mkdtemp @contextmanager def tempdir(): """Create and return a temporary directory. ...
mit
rosudrag/Freemium-winner
VirtualEnvironment/Lib/site-packages/werkzeug/contrib/cache.py
252
27983
# -*- coding: utf-8 -*- """ werkzeug.contrib.cache ~~~~~~~~~~~~~~~~~~~~~~ The main problem with dynamic Web sites is, well, they're dynamic. Each time a user requests a page, the webserver executes a lot of code, queries the database, renders templates until the visitor gets the page he sees. ...
mit
diogocs1/comps
web/addons/l10n_ro/__openerp__.py
77
2045
# -*- encoding: utf-8 -*- ############################################################################## # # @author - Fekete Mihai <feketemihai@gmail.com> # Copyright (C) 2011 TOTAL PC SYSTEMS (http://www.www.erpsystems.ro). # Copyright (C) 2009 (<http://www.filsystem.ro>) # # This program is free softwa...
apache-2.0
niksolaz/GeoJS
venv/lib/python2.7/site-packages/setuptools/tests/contexts.py
73
1951
import tempfile import os import shutil import sys import contextlib import site from ..compat import StringIO @contextlib.contextmanager def tempdir(cd=lambda dir:None, **kwargs): temp_dir = tempfile.mkdtemp(**kwargs) orig_dir = os.getcwd() try: cd(temp_dir) yield temp_dir finally: ...
mit
shellderp/sublime-robot-plugin
lib/robot/running/keywords.py
2
9673
# Copyright 2008-2012 Nokia Siemens Networks Oyj # # 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
luzeduardo/antonov225
flyer/flyerapp/admin.py
1
10170
from django.contrib import admin from django.contrib import messages from django.contrib.admin import helpers from models import Place, Schedule, Flight from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from datetime import datetime, date, timedelta from collections import O...
gpl-2.0
koparasy/faultinjection-gem5
ext/ply/test/yacc_badtok.py
174
1535
# ----------------------------------------------------------------------------- # yacc_badtok.py # # A grammar, but tokens is a bad datatype # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc tokens = "Hel...
bsd-3-clause
damomeen/pox-datapath
pox/messenger/web_transport.py
26
8919
# Copyright 2011,2012 James McCauley # # This file is part of POX. # # POX 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. # # POX is d...
apache-2.0
alexlo03/ansible
test/units/modules/network/exos/test_exos_config.py
30
10656
# # (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
tayfun/django
django/contrib/postgres/forms/ranges.py
393
3005
from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange from django import forms from django.core import exceptions from django.forms.widgets import MultiWidget from django.utils.translation import ugettext_lazy as _ __all__ = ['IntegerRangeField', 'FloatRangeField', 'DateTimeRangeField', 'DateRangeField...
bsd-3-clause
unseenlaser/python-for-android
python3-alpha/python3-src/Lib/test/test_complex.py
61
27765
import unittest from test import support from random import random from math import atan2, isnan, copysign import operator INF = float("inf") NAN = float("nan") # These tests ensure that complex math does the right thing class ComplexTest(unittest.TestCase): def assertAlmostEqual(self, a, b): if isinsta...
apache-2.0
postlund/home-assistant
homeassistant/components/heos/__init__.py
6
12267
"""Denon HEOS Media Player.""" import asyncio from datetime import timedelta import logging from typing import Dict from pyheos import Heos, HeosError, const as heos_const import voluptuous as vol from homeassistant.components.media_player.const import DOMAIN as MEDIA_PLAYER_DOMAIN from homeassistant.config_entries i...
apache-2.0
stshine/servo
tests/wpt/css-tests/tools/pytest/_pytest/_code/_py2traceback.py
192
2887
# copied from python-2.7.3's traceback.py # CHANGES: # - some_str is replaced, trying to create unicode strings # import types def format_exception_only(etype, value): """Format the exception part of a traceback. The arguments are the exception type and value such as given by sys.last_type and sys.last_va...
mpl-2.0
kuyun-zhangyang/flexx
flexx/pyscript/tests/test_functions.py
21
3960
""" Tests for PyScript functions """ import tempfile from pytest import raises from flexx.util.testing import run_tests_if_main from flexx.pyscript import py2js, evaljs, evalpy, script2js, clean_code def test_py2js_on_wrong_vals(): raises(ValueError, py2js, []) raises(ValueError, py2js, {}) r...
bsd-2-clause
SrNetoChan/Quantum-GIS
python/plugins/processing/modeler/ProjectProvider.py
29
5651
# -*- coding: utf-8 -*- """ *************************************************************************** ProjectProvider.py ------------------------ Date : July 2018 Copyright : (C) 2018 by Nyall Dawson Email : nyall dot dawson at gmail dot com *************...
gpl-2.0
feigames/Odoo
addons/pos_restaurant/restaurant.py
325
2246
# -*- 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
matthew-brett/pymc
pymc/sandbox/test_model_ave.py
1
1727
# 30-3-07 AP: Changed Sampler to Model. """ This demo compares three different models for the coal mining disasters data. It doesn't use RJMCMC, it just integrates out the model stochastics by sampling their values conditional on their parents. Nothing fancy, but it works OK. The biggest problem is that the variance ...
mit
hojel/calibre
src/calibre/ebooks/mobi/debug/headers.py
14
25842
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import struct...
gpl-3.0
alobbs/ansible
lib/ansible/plugins/action/assemble.py
13
6118
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # Stephen Fromm <sfromm@gmail.com> # Brian Coca <briancoca+dev@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 publish...
gpl-3.0
camilaavilarinho/monitorador-twitter
users/migrations/0001_initial.py
1
2272
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-24 18:45 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alte...
mit
sugarsweetrobotics/wasanbon
wasanbon/core/plugins/admin/systembuilder_plugin/__init__.py
1
3036
import time, sys, os import wasanbon from wasanbon.core.plugins import PluginFunction, manifest class Plugin(PluginFunction): """ This plugin provides building RT-system (connecting and configuring) APIs """ def __init__(self): #PluginFunction.__init__(self) super(Plugin, self).__init__() ...
gpl-3.0