code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!/usr/bin/env python # Copyright 2020 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 generate_unexpire_flags import os import unittest class TestUnexpireGenerator(unittest.TestCase): TEST_MSTONE = 123 def r...
nwjs/chromium.src
tools/flags/generate_unexpire_flags_unittests.py
Python
bsd-3-clause
1,062
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from benchmarks import press from telemetry import benchmark from page_sets import dromaeo_pages @benchmark.Info(component='Blink>Bindings', ...
scheib/chromium
tools/perf/benchmarks/dromaeo.py
Python
bsd-3-clause
675
# 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 import abc import os import six from cryptography import utils from cr...
deandunbar/html2bwml
venv/lib/python2.7/site-packages/cryptography/hazmat/primitives/padding.py
Python
mit
3,948
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_renyi_ascii.py ------------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ********************...
geopython/QGIS
python/plugins/processing/algs/grass7/ext/r_li_renyi_ascii.py
Python
gpl-2.0
1,538
#!/usr/bin/python # -*- coding: utf-8 -*- """ *** Description *** Converts a progression to chords, orchestrates them and plays them using fluidsynth. Make sure to set SF2 to a valid soundfont file. Based on play_progression.py """ from mingus.core import progressions, intervals from mingus.core im...
yardex/python-mingus
mingus_examples/improviser/improviser.py
Python
gpl-3.0
5,915
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is auto generated by ...
sestrella/ansible
lib/ansible/module_utils/network/nxos/argspec/interfaces/interfaces.py
Python
gpl-3.0
2,238
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Soft...
bjolivot/ansible
lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py
Python
gpl-3.0
60,368
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
ptisserand/ansible
lib/ansible/plugins/strategy/__init__.py
Python
gpl-3.0
51,787
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2014, Chris Schmidt <chris.schmidt () contrastsecurity.com> # # Built using https://github.com/hamnis/useful-scripts/blob/master/python/download-maven-artifact # as a reference and starting point. # # GNU General Public License v3.0+ (see COPYING or https://www...
marratj/ansible
lib/ansible/modules/packaging/language/maven_artifact.py
Python
gpl-3.0
18,975
# -*- encoding: utf-8 -*- ############################################################################## # # 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 Licens...
odoocn/odoomrp-wip
mrp_product_variants/__openerp__.py
Python
agpl-3.0
1,735
#!/usr/bin/env python # Line too long - pylint: disable=C0301 # Invalid name - pylint: disable=C0103 """ Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the under the Apache License, Version 2.0 (the "License"); you may not use this ...
Chibin/gpdb
src/test/tinc/tincrepo/mpp/lib/gpSystem.py
Python
apache-2.0
4,502
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
svanschalkwyk/datafari
windows/python/Lib/test/test_io.py
Python
apache-2.0
120,213
"""Default variable filters.""" import re from decimal import Decimal, InvalidOperation, ROUND_HALF_UP import random as random_module try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. from django.template import Variable, Library from django...
nycholas/ask-undrgz
src/ask-undrgz/django/template/defaultfilters.py
Python
bsd-3-clause
28,636
r""" ================================== Constants (:mod:`scipy.constants`) ================================== .. currentmodule:: scipy.constants Physical and mathematical constants and units. Mathematical constants ====================== ================ ===========================================================...
WarrenWeckesser/scipy
scipy/constants/__init__.py
Python
bsd-3-clause
12,116
from __future__ import print_function, division from sympy.core.basic import Basic from sympy.core.mul import Mul from sympy.core.singleton import S, Singleton from sympy.core.symbol import Dummy, Symbol from sympy.core.compatibility import (range, integer_types, with_metaclass, i...
wxgeo/geophar
wxgeometrie/sympy/series/sequences.py
Python
gpl-2.0
29,580
from functools import update_wrapper, wraps from unittest import TestCase from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.decorators import ( login_required, permission_required, user_passes_test, ) from django.http import HttpRequest, HttpResponse, HttpResponseNotA...
atul-bhouraskar/django
tests/decorators/tests.py
Python
bsd-3-clause
15,914
""" The main purpose of this module is to expose LinkCollector.collect_links(). """ import cgi import functools import itertools import logging import mimetypes import os import re from collections import OrderedDict from pip._vendor import html5lib, requests from pip._vendor.distlib.compat import unescape from pip._...
sserrot/champion_relationships
venv/Lib/site-packages/pip/_internal/index/collector.py
Python
mit
22,838
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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 ...
djrscally/eve-wspace
evewspace/Teamspeak/models.py
Python
gpl-3.0
1,834
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. ## this functions are taken from the setuptools package (version 0.6c8) ## http://peak.telecommunity.com/DevCenter/PkgResources#parsing-utilities from __future__ import print_function import re from odoo.tools import p...
Aravinthu/odoo
odoo/tools/parse_version.py
Python
agpl-3.0
3,532
from typing import NewType SomeType = NewType("SomeType", bytes) SomeType(b"va<caret>lue")
smmribeiro/intellij-community
python/testData/refactoring/introduceVariable/argumentToUnnamedParameter.py
Python
apache-2.0
90
#!/usr/bin/env python # # Copyright 2012 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 option) # ...
manojgudi/sandhi
modules/gr36/gnuradio-core/src/python/gnuradio/gr/qa_vector_map.py
Python
gpl-3.0
3,870
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
eharney/nova
nova/tests/api/openstack/compute/contrib/test_extended_hypervisors.py
Python
apache-2.0
4,737
import os import sys import codecs from contextlib import contextmanager from itertools import repeat from functools import update_wrapper from .types import convert_type, IntRange, BOOL from .utils import make_str, make_default_short_help, echo from .exceptions import ClickException, UsageError, BadParameter, Abort, ...
gameduell/duell
pylib/click/core.py
Python
bsd-2-clause
68,206
from sympy.core.compatibility import range from sympy import (FiniteSet, S, Symbol, sqrt, symbols, simplify, Eq, cos, And, Tuple, Or, Dict, sympify, binomial, cancel, KroneckerDelta) from sympy.concrete.expr_with_limits import AddWithLimits from sympy.matrices import Matrix from sympy.stats import (Disc...
Shaswat27/sympy
sympy/stats/tests/test_finite_rv.py
Python
bsd-3-clause
8,667
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modi...
Endika/hr
hr_experience/models/hr_academic.py
Python
agpl-3.0
1,388
# 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 u...
jiajiechen/mxnet
example/autoencoder/model.py
Python
apache-2.0
2,838
#!/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 ...
0x0all/nupic
tests/unit/py2/nupic/data/aggregator_test.py
Python
gpl-3.0
2,186
# (c) 2016, Matt Davis <mdavis@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 import time from datetime import datetime, timedelta from ansible.errors import AnsibleErro...
photoninger/ansible
lib/ansible/plugins/action/win_reboot.py
Python
gpl-3.0
8,292
# Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 OpenStack Foundation # Copyright 2011 University of Southern California # 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 # ...
rakeshmi/cinder
cinder/tests/unit/test_volume_types_extra_specs.py
Python
apache-2.0
5,074
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2011 Cubic ERP - Teradata SAC. (https://cubicerp.com). { "name": "Bolivia - Accounting", "version": "2.0", "description": """ Bolivian accounting chart and tax localization. Plan contable ...
vileopratama/vitech
src/addons/l10n_bo/__openerp__.py
Python
mit
656
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2016 Rapptz 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 us...
LordDamionDevil/Lony
lib/discord/ext/commands/errors.py
Python
gpl-3.0
4,513
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'DjangoApplication1.views.home', name='home'), # url(r'^DjangoApplication1/', include('...
jkorell/PTVS
Python/Tests/TestData/DjangoProject/urls.py
Python
apache-2.0
813
import imp import os import io import sys from mock import patch from gp_unittest import GpTestCase class GpSshTestCase(GpTestCase): def setUp(self): # because gpssh does not have a .py extension, we have to use imp to import it # if we had a gpssh.py, this is equivalent to: # import g...
edespino/gpdb
gpMgmt/bin/gppylib/test/unit/test_unit_gpssh.py
Python
apache-2.0
1,292
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
pheanex/ansible
lib/ansible/playbook/base.py
Python
gpl-3.0
18,228
#!/usr/bin/env python from tempfile import TemporaryFile, SpooledTemporaryFile import os, sys, re, socket, time, pickle, csv, uuid, subprocess, argparse, decimal, select, platform class LLDB: def __init__(self): self.debugger = lldb.SBDebugger.Create() self.command_interpreter = self.debugger.GetCommandInter...
mellis13/moose
scripts/memory_logger.py
Python
lgpl-2.1
43,940
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # this script tests vtkImageReslice with different interpolation modes, # with the wrap-pad feature turned on and with a rotation # Image pipeline reader = vtk.vtkImageReader() reader...
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/VTK/Imaging/Core/Testing/Python/ResliceBSpline.py
Python
gpl-3.0
3,591
from __future__ import absolute_import from __future__ import print_function from .ChessFile import ChessFile, LoadingError from pychess.Utils.GameModel import GameModel from pychess.Utils.const import WHITE, BLACK, WON_RESIGN, WAITING_TO_START, BLACKWON, WHITEWON, DRAW from pychess.Utils.logic import getStatus from py...
Karlon/pychess
lib/pychess/Savers/epd.py
Python
gpl-3.0
5,385
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import logging import os import sys try: from magic import from_file as magic_from_file except ImportError: magic_from_file = None from six.moves import SimpleHTTPServer as srvmod from six.moves import socketserver class Comple...
jimperio/pelican
pelican/server.py
Python
agpl-3.0
2,272
""" MixedModuleStore allows for aggregation between multiple modulestores. In this way, courses can be served up both - say - XMLModuleStore or MongoModuleStore """ import logging from contextlib import contextmanager import itertools import functools from contracts import contract, new_contract from opaque_keys im...
beni55/edx-platform
common/lib/xmodule/xmodule/modulestore/mixed.py
Python
agpl-3.0
40,382
import base64 import cPickle as pickle from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.utils.hashcompat import md5_constructor class SessionManager(models.Manager): def encode(self, session_dict): """ Returns the gi...
nycholas/ask-undrgz
src/ask-undrgz/django/contrib/sessions/models.py
Python
bsd-3-clause
2,675
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net> # 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_versio...
maartenq/ansible
lib/ansible/modules/net_tools/cloudflare_dns.py
Python
gpl-3.0
33,473
# 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...
npuichigo/ttsflow
third_party/tensorflow/tensorflow/python/util/deprecation_test.py
Python
apache-2.0
28,547
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import assert_array_equal, assert_equal, assert_raises def test_packbits(): # Copied from the docstring. a = [[[1, 0, 1], [0, 1, 0]], [[1, 1, 0], [0, 0, 1]]] for dt in '?bBhHiIlLqQ': ar...
jjas0nn/solvem
tensorflow/lib/python2.7/site-packages/numpy/lib/tests/test_packbits.py
Python
mit
3,214
from sentry.testutils.cases import RuleTestCase from sentry.rules.conditions.level import LevelCondition, LevelMatchType class LevelConditionTest(RuleTestCase): rule_cls = LevelCondition def get_event(self): event = self.event event.group.level = 20 return event def test_equals(s...
wujuguang/sentry
tests/sentry/rules/conditions/test_level_event.py
Python
bsd-3-clause
1,452
#!/usr/bin/python """ Test the TahoeLAFS @author: Marek Palatinus <marek@palatinus.cz> """ import sys import logging import unittest from fs.base import FS import fs.errors as errors from fs.tests import FSTestCases, ThreadingTestCases from fs.contrib.tahoelafs import TahoeLAFS, Connection ...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/fs/contrib/tahoelafs/test_tahoelafs.py
Python
agpl-3.0
1,455
# 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...
jbedorf/tensorflow
tensorflow/contrib/nn/python/ops/alpha_dropout.py
Python
apache-2.0
3,426
# 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...
eadgarchen/tensorflow
tensorflow/contrib/estimator/python/estimator/extenders_test.py
Python
apache-2.0
10,770
# ============================================================================= # 2013+ Copyright (c) Alexey Ivanov <rbtz@ph34r.me> # All rights reserved. # # 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 F...
reverbrain/elliptics
recovery/elliptics_recovery/types/__init__.py
Python
lgpl-3.0
769
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
thaim/ansible
lib/ansible/utils/path.py
Python
mit
5,225
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import os import shutil from unittest import TestCase, TestSuite, TestLoader, TextTestRunner from babelfish import Language from subliminal import list_subtitles, download_subtitles, save_subtitles, download_best_subtitles, scan_video...
ravselj/subliminal
subliminal/tests/test_subliminal.py
Python
mit
8,711
""" FacetGrid with custom projection ================================ _thumb: .33, .5 """ import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns sns.set() # Generate an example radial datast r = np.linspace(0, 10, num=100) df = pd.DataFrame({'r': r, 'slow': r, 'medium': 2 * r, ...
lypzln/seaborn
examples/facets_with_custom_projection.py
Python
bsd-3-clause
767
# -*- coding: utf-8 -*- # Copyright: (c) 2014, Hewlett-Packard Development Company, L.P. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard openstack documentation fragment DOCUMENTATION = r''' options: cloud: descri...
thaim/ansible
lib/ansible/plugins/doc_fragments/openstack.py
Python
mit
3,726
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
cee1/cerbero-mac
test/test_cerbero_packages_wix.py
Python
lgpl-2.1
8,020
from __future__ import unicode_literals from frappe import _
indautgrp/frappe
frappe/config/tools.py
Python
mit
60
import os import threading import Queue # Windows import import win32file import win32pipe import win32api import win32con import win32security import win32process import win32event class Win32Spawn(object): def __init__(self, cmd, shell=False): self.queue = Queue.Queue() self.is_terminated = Fal...
wizardxbl/rtt-stm32f10x
tools/win32spawn.py
Python
gpl-2.0
5,808
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
diogocs1/comps
web/openerp/modules/graph.py
Python
apache-2.0
7,587
#!/usr/bin/env python """Check CFC - Check Compile Flow Consistency This is a compiler wrapper for testing that code generation is consistent with different compilation processes. It checks that code is not unduly affected by compiler options or other changes which should not have side effects. To use: -Ensure that ...
apple/swift-clang
utils/check_cfc/check_cfc.py
Python
apache-2.0
14,638
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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...
cvegaj/ElectriCERT
venv3/lib/python3.6/site-packages/pbr/tests/test_commands.py
Python
gpl-3.0
3,688
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.threadable}. """ from __future__ import division, absolute_import import sys, pickle try: import threading except ImportError: threadingSkip = "Platform lacks thread support" else: threadingSkip = None...
skycucumber/Messaging-Gateway
webapp/venv/lib/python2.7/site-packages/twisted/test/test_threadable.py
Python
gpl-2.0
3,760
# 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. """Presubmit script for Chromium theme resources. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the...
Chilledheart/chromium
chrome/app/theme/PRESUBMIT.py
Python
bsd-3-clause
1,456
from mkt.collections.models import Collection def run(): """Backfill slugs.""" for c in Collection.objects.all(): c.save()
harikishen/addons-server
src/olympia/migrations/645-collection-backfill-slugs.py
Python
bsd-3-clause
141
# # Copyright 2018 Red Hat 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. # # Ansibl...
alxgu/ansible
lib/ansible/plugins/action/cli_config.py
Python
gpl-3.0
1,287
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
poiesisconsulting/openerp-restaurant
portal_project_issue/tests/test_access_rights.py
Python
agpl-3.0
10,548
"""Tests for distutils.msvc9compiler.""" import sys import unittest import os from distutils.errors import DistutilsPlatformError from distutils.tests import support from test.support import run_unittest _MANIFEST = """\ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-co...
invisiblek/python-for-android
python3-alpha/python3-src/Lib/distutils/tests/test_msvc9compiler.py
Python
apache-2.0
4,424
#!/usr/bin/env python # -*- coding: utf-8 -*- """Compiler for keymap.c files This scrip will generate a keymap.c file from a simple markdown file with a specific layout. Usage: python compile_keymap.py INPUT_PATH [OUTPUT_PATH] """ from __future__ import division from __future__ import print_function from __future...
paxy97/qmk_firmware
layouts/community/ergodox/german-manuneo/compile_keymap.py
Python
gpl-2.0
21,163
# -*- encoding: utf-8 -*- """ Tests for django.core.servers. """ from __future__ import unicode_literals import os import socket from django.core.exceptions import ImproperlyConfigured from django.test import LiveServerTestCase from django.test.utils import override_settings from django.utils.http import urlencode fr...
atruberg/django-custom
tests/servers/tests.py
Python
bsd-3-clause
5,773
"""AutoComplete.py - An IDLE extension for automatically completing names. This extension can complete either attribute names of file names. It can pop a window with all available names, for the user to select from. """ import os import sys import string from configHandler import idleConf import AutoCompleteWindow f...
leighpauls/k2cro4
third_party/python_26/Lib/idlelib/AutoComplete.py
Python
bsd-3-clause
9,041
"""distutils.command.build_clib Implements the Distutils 'build_clib' command, to build a C/C++ library that is included in the module distribution and needed by an extension module.""" __revision__ = "$Id$" # XXX this module has *lots* of code ripped-off quite transparently from # build_ext.py -- not sur...
ktan2020/legacy-automation
win/Lib/distutils/command/build_clib.py
Python
mit
8,340
""" Abstract base classes define the primitives that renderers and graphics contexts must implement to serve as a matplotlib backend :class:`RendererBase` An abstract base class to handle drawing/rendering operations. :class:`FigureCanvasBase` The abstraction layer that separates the :class:`matplotlib.fi...
tkaitchuck/nupic
external/linux64/lib/python2.6/site-packages/matplotlib/backend_bases.py
Python
gpl-3.0
69,740
""" pip.vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip.vendor should be considered immutable and should only be updated to versions from upstream. """ from __future__ import absolute_import
piyush82/icclab-rcb-web
virtualenv/lib/python2.7/site-packages/pip/vendor/__init__.py
Python
apache-2.0
264
# 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...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/contrib/distributions/python/ops/bijectors/affine_linear_operator.py
Python
bsd-2-clause
1,182
# 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...
samueldotj/TeeRISC-Simulator
src/arch/x86/isa/insts/simd128/floating_point/data_conversion/__init__.py
Python
bsd-3-clause
2,483
""" Settings and configuration for Django. Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment variable, and then from django.conf.global_settings; see the global settings file for a list of all possible variables. """ import logging import os import sys import time # Needed fo...
edisonlz/fruit
web_project/base/site-packages/django/conf/__init__.py
Python
apache-2.0
7,796
# -*- Mode: Python; -*- # Copyright (c) 2009 INESC Porto # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, #...
mohittahiliani/tcp-eval-suite-ns3
src/flow-monitor/examples/wifi-olsr-flowmon.py
Python
gpl-2.0
7,439
#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://pythonhosted.org/setuptools/easy_install.html """ impo...
cortext/crawtextV2
~/venvs/crawler/lib/python2.7/site-packages/setuptools/command/easy_install.py
Python
mit
74,243
# -*- coding: utf-8 -*- from . import project
sergiocorato/project-service
service_desk_issue/__init__.py
Python
agpl-3.0
46
# -*- coding: utf-8 -*- """ Test for matlab problems """ import time from ...pages.lms.matlab_problem import MatlabProblemPage from ...fixtures.course import XBlockFixtureDesc from ...fixtures.xqueue import XQueueResponseFixture from .test_lms_problems import ProblemsTest from textwrap import dedent class MatlabProb...
MakeHer/edx-platform
common/test/acceptance/tests/lms/test_lms_matlab_problem.py
Python
agpl-3.0
3,475
import re import json import logging import random import venusian from collections import namedtuple from collections import OrderedDict from zope.interface import providedBy, Interface from pyramid.compat import string_types from pyramid.config.views import DefaultViewMapper from pyramid.location import lineage from ...
djedproject/djed.layout
djed/layout/__init__.py
Python
isc
8,833
import pytest from tests.utils.targetdriver import TargetDriver, if_feature from tests.utils.testdriver import TestDriver def get_services(): return TargetDriver('rep1'), TestDriver('rep2') @pytest.fixture(autouse=True) def _(module_launcher_launch): pass @if_feature.copy_file_from_onitu def test_driver_...
onitu/onitu
tests/functional/driver/test_driver_copy.py
Python
mit
717
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-03 13:45 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('frontend', '0001_initial'), ] operations = [ migrations.AlterField( ...
sussexstudent/falmer
falmer/frontend/migrations/0002_auto_20170703_1345.py
Python
mit
462
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import itertools import os import sys try: from urllib import quote_plus, urlencode from urlparse import parse_qsl, urlparse, urlunparse except ImportError: from urllib.parse import parse_qsl, quote_plus, urlencode, urlparse, urlunparse ERR_INV...
jdp/urp
urp.py
Python
mit
7,836
#!/usr/bin/python # -*- coding: utf-8 -*- from DataApi_32 import CDataProcess #from DataApi_Linux import CDataApi import datetime def main(): #HOST = '192.168.1.186' HOST = '180.166.168.126' #公网ip PORT = 18201 subStock = ["999999"] ApiInstance = CDataProcess(HOST,PORT, False, subStock, 0,1,datetime.datetime(...
sharmaking/DataApi
demo_32.py
Python
mit
439
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/security_rule_associations.py
Python
mit
2,182
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "devproject.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that t...
philgyford/django-spectator
devproject/manage.py
Python
mit
822
from amon.apps.core.basemodel import BaseModel class BaseDeviceModel(BaseModel): def __init__(self): super(BaseDeviceModel, self).__init__() self.collection = self.mongo.get_collection(self.collection_name) # Pylint displays errors for undefined self, it actually works fine def get_by_name(...
martinrusev/amonone
amon/apps/devices/models.py
Python
mit
4,472
"""LegacyFileDiffData model defitnition.""" from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from djblets.db.fields import Base64Field, JSONField class LegacyFileDiffData(models.Model): """Deprecated, legacy class for base64-encoded dif...
chipx86/reviewboard
reviewboard/diffviewer/models/legacy_file_diff_data.py
Python
mit
837
from distutils.core import setup import pygiphy VERSION = pygiphy.__version__ AUTHOR = pygiphy.__author__ setup_kwargs = { 'name': 'pygiphy', 'version': VERSION, 'url': 'https://github.com/MichaelYusko/PyGiphy', 'license': 'MIT', 'author': AUTHOR, 'author_email': 'freshjelly12@yahoo.com', ...
MichaelYusko/PyGiphy
setup.py
Python
mit
871
# coding=utf-8 from ..packet import Packet from ..proto import Proto from ..flags import Flags class Refresh(Packet): __slots__ = ('flags', ) + Packet.__slots__ def __init__(self): super(Refresh, self).__init__() self.flags = 0x00 def getPayload(self): payload = bytearray() ...
MPjct/PyMP
mysql_proto/com/refresh.py
Python
mit
710
import logging import requests import socket import sys import threading import time from concurrent.futures import ThreadPoolExecutor from .configs import defaults from .utils import sanitize_meta, get_ip, normalize_list_option class LogDNAHandler(logging.Handler): def __init__(self, key, options={}): ...
logdna/python
logdna/logdna.py
Python
mit
10,185
#!/usr/bin/env python import os, sys def touch(path): with open(path, 'a'): os.utime(path, None) fout = open('sample.fileids', 'wb') fout2 = open('sample.transcription', 'wb') for fn in sorted(os.listdir('.')): if not fn.endswith('.wav'): continue base_fn = os.path.splitext(fn)[0] txt_...
chrisspen/homebot
src/test/detect_voice/sphinxtrain_test/samples/make_fileids.py
Python
mit
559
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/timeseriesinsights/azure-mgmt-timeseriesinsights/azure/mgmt/timeseriesinsights/aio/operations/_reference_data_sets_operations.py
Python
mit
19,516
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/ams/_params.py
Python
mit
51,064
from firebase import firebase firebase = firebase.FirebaseApplication('https://wapi.firebaseio.com', None) new_user = 'Ozgur Vatansever' result = firebase.post('/users', new_user, name=None, connection=None, params={'print': 'pretty'}, headers={'X_FANCY_HEADER': 'VERY FANCY'}) print result
jonasprobst/wandering-pillar-cli
firebase-test.py
Python
mit
292
import unittest import route53 from route53.exceptions import AlreadyDeletedError from route53.transport import BaseTransport from tests.utils import get_route53_connection import datetime import os from test_basic import BaseTestCase try: from .credentials import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY except Im...
jcastillocano/python-route53
tests/test_integration.py
Python
mit
5,689
# -*- coding: utf-8 -*- """ Created on Sat Apr 22 16:47:12 2017 @author: Jasmin """ from parser import * #from parser import read_data #from parser import read_params #import parser from Methode2 import EvalWeightedSumInteract from Methode2 import * from Methode1 import * from algo3 import * #oui ...
SimoRihani/ProjetLS
FlaskApp/algo.py
Python
mit
4,802
import asyncio import gta.utils # The following metadata will not be processed but is recommended # Author name and E-Mail __author__ = 'Full Name <email@example.com>' # Status of the script: Use one of 'Prototype', 'Development', 'Production' __status__ = 'Development' # The following metadata will be parsed and sh...
lgrahl/scripthookvpy3k
python/scripts/metadata.py
Python
mit
857
# idea is to scan the elments from left to right # partition the list into two lists # one with emtpy [ where we shall keep things sorted ] and the other the given list # scan and swap elments in two lists def ss(a): for i in range(0,len(a)-1): smallest=i; for j in range(i,len(a)): if a...
bourneagain/pythonBytes
selectionSort.py
Python
mit
444
from flask import Blueprint, render_template,request,Response,make_response,session,flash,redirect,url_for index = Blueprint('index', __name__) from models.User import User from models.Company import Company from models.Comments import Comments import time,serials @index.route('/') def index_list(): list=Company...
isaced/ComSay
views/index.py
Python
mit
3,226
# Based on Rapptz's RoboDanny's repl cog import contextlib import inspect import logging import re import sys import textwrap import traceback from io import StringIO from typing import * from typing import Pattern import discord from discord.ext import commands # i took this from somewhere and i cant remember where ...
10se1ucgo/LoLTrivia
plugins/debug.py
Python
mit
4,487
# -*- coding: utf-8 -*- from __future__ import print_function import sys from ipa_auto import ipa_auto if __name__ == "__main__": label = "" pub = False con = False # url = "http://192.168.0.33/publish/ipapub/" # url = "http://127.0.0.1:8000/ipapub/" url = '' cfg = 'auto.cfg' if len(sys...
rayer4u/ipaauto
src/__main__.py
Python
mit
954