repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
michaelgallacher/intellij-community
python/helpers/coveragepy/coverage/data.py
209
9188
"""Coverage data for Coverage.""" import os from coverage.backward import iitems, pickle, sorted # pylint: disable=W0622 from coverage.files import PathAliases from coverage.misc import file_be_gone class CoverageData(object): """Manages collected coverage data, including file storage. The data file for...
apache-2.0
MoisesTedeschi/python
Scripts-Python/Modulos-Diversos/python-com-scrapy/Lib/site-packages/pip/_vendor/chardet/gb2312freq.py
343
20715
######################## 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...
gpl-3.0
mozilla/make.mozilla.org
vendor-local/lib/python/amqplib/client_0_8/connection.py
22
26968
""" AMQP 0-8 Connections """ # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your o...
bsd-3-clause
EricCline/CEM_inc
env/lib/python2.7/site-packages/IPython/qt/inprocess.py
10
1313
""" Defines an in-process KernelManager with signals and slots. """ # Local imports. from IPython.kernel.inprocess import ( InProcessShellChannel, InProcessIOPubChannel, InProcessStdInChannel, InProcessHBChannel, InProcessKernelClient, InProcessKernelManager, ) from IPython.utils.traitlets import Type from .k...
mit
pope/SublimeYetAnotherCodeSearch
tests/test_csearch.py
1
2481
import sublime import os.path import shutil import textwrap import time import uuid from YetAnotherCodeSearch.tests import CommandTestCase _NEEDLE_IN_HAYSTACK = 'cc5b252b-e7fb-5145-bf8a-ed272e3aa7bf' class CsearchCommandTest(CommandTestCase): def setUp(self): super(CsearchCommandTest, self).setUp() ...
mit
dohoangkhiem/ansible
lib/ansible/plugins/lookup/url.py
95
2020
# (c) 2015, Brian Coca <bcoca@ansible.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) any later version....
gpl-3.0
awong1900/platformio
platformio/builder/scripts/frameworks/mbed.py
1
7172
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. """ mbed The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down...
mit
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/site-packages/OpenGL/GL/SUN/global_alpha.py
4
1736
'''OpenGL extension SUN.global_alpha This module customises the behaviour of the OpenGL.raw.GL.SUN.global_alpha to provide a more Python-friendly API Overview (from the spec) Transparency is done in OpenGL using alpha blending. An alpha value of 0.0 is used for fully transparent objects, while an alpha value o...
mit
cosmicAsymmetry/zulip
zerver/tests/test_signup.py
1
51499
# -*- coding: utf-8 -*- from __future__ import absolute_import import datetime from django.conf import settings from django.http import HttpResponse from django.test import TestCase from mock import patch from zerver.lib.test_helpers import MockLDAP from confirmation.models import Confirmation from zilencer.models i...
apache-2.0
rlpy/rlpy
rlpy/Representations/LocalBases.py
1
7491
""" Representations which use local bases function (e.g. kernels) distributed in the statespace according to some scheme (e.g. grid, random, on previous samples) """ from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from ...
bsd-3-clause
robbiet480/home-assistant
tests/components/speedtestdotnet/test_init.py
6
2222
"""Tests for SpeedTest integration.""" import speedtest from homeassistant import config_entries from homeassistant.components import speedtestdotnet from homeassistant.setup import async_setup_component from tests.async_mock import patch from tests.common import MockConfigEntry async def test_setup_with_config(has...
apache-2.0
Plain-Andy-legacy/android_external_chromium_org
native_client_sdk/src/build_tools/manifest_util.py
161
19959
# 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. import copy import hashlib import json import string import sys import urllib2 MANIFEST_VERSION = 2 # Some commonly-used key names. ARCHIVES_KEY = 'arc...
bsd-3-clause
manipopopo/tensorflow
tensorflow/python/kernel_tests/random/random_grad_test.py
11
9670
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
alexmojaki/odo
docs/source/conf.py
8
9099
# -*- coding: utf-8 -*- # # into documentation build configuration file, created by # sphinx-quickstart on Sat Dec 6 16:03:44 2015. # # 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 # autogenerated file. # # All co...
bsd-3-clause
nmercier/linux-cross-gcc
win32/bin/Lib/xml/sax/__init__.py
63
3689
"""Simple API for XML (SAX) implementation for Python. This module provides an implementation of the SAX 2 interface; information about the Java version of the interface can be found at http://www.megginson.com/SAX/. The Python version of the interface is documented at <...>. This package contains the followi...
bsd-3-clause
pipermerriam/django
django/template/defaultfilters.py
224
28536
"""Default variable filters.""" from __future__ import unicode_literals import random as random_module import re import warnings from decimal import ROUND_HALF_UP, Context, Decimal, InvalidOperation from functools import wraps from pprint import pformat from django.conf import settings from django.utils import format...
bsd-3-clause
SoftwareKing/zstack-woodpecker
integrationtest/vm/virtualrouter/sg/test_egress.py
4
5655
''' Test Security Group for 1 VM with egress connection control @author: Youyk ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker.zstack_test.zstack_test_security_group as test_sg_header imp...
apache-2.0
loveyoupeng/rt
modules/web/src/main/native/Tools/Scripts/webkitpy/common/thread/threadedmessagequeue.py
134
2089
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
gpl-2.0
kavigupta/61a-analysis
src/analytics.py
1
4920
""" A module containing a variety of functions for analyzing the data. This is supposed to be more data specific than statistics. """ import numpy as np from tools import cached_property def compensate_for_grader_means(evals, z_thresh=1): """ Compensates for grader means by subtracting each grader's avera...
gpl-3.0
Vishakha1990/Lambdas
testing/digitalocean/test.py
1
2597
#!/usr/bin/python import os, requests, time, json, argparse API = "https://api.digitalocean.com/v2/droplets" DROPLET_NAME = "ol-tester" HEADERS = { "Authorization": "Bearer "+os.environ['TOKEN'], "Content-Type": "application/json" } def post(args): r = requests.post(API, data=args, headers=HEADERS) re...
apache-2.0
stverhae/incubator-airflow
airflow/operators/presto_check_operator.py
44
4442
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
javachengwc/hue
desktop/libs/liboozie/src/liboozie/credentials_tests.py
33
2933
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
talnoah/Lemur_kernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
jumpstarter-io/nova
nova/virt/baremetal/ipmi.py
13
10740
# coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, 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 a...
apache-2.0
valexandersaulys/airbnb_kaggle_contest
venv/lib/python3.4/site-packages/numpy/lib/function_base.py
7
134697
from __future__ import division, absolute_import, print_function import warnings import sys import collections import operator import numpy as np import numpy.core.numeric as _nx from numpy.core import linspace, atleast_1d, atleast_2d from numpy.core.numeric import ( ones, zeros, arange, concatenate, array, asarr...
gpl-2.0
msabramo/kallithea
kallithea/controllers/admin/my_account.py
2
10917
# -*- coding: 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 License, or # (at your option) any later version. # # This program is distributed in the hope that...
gpl-3.0
Observer-Wu/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py
121
3076
# Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
bsd-3-clause
frankyrumple/ope
admin_app/gluon/__init__.py
21
2775
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Web2Py framework modules ======================== """ __all__ = ['A', 'B', 'BEAUTIFY', 'BODY', 'BR', 'CAT'...
mit
unicefuganda/mics
survey/views/surveys.py
2
2608
from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.contrib import messages from django.contrib.auth.decorators import permission_required from survey.models.surveys import Survey from survey.forms.surveys impor...
bsd-3-clause
Thingee/cinder
cinder/db/sqlalchemy/migrate_repo/versions/011_add_bootable_column.py
11
1537
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
Oliver2213/NVDAYoutube-dl
addon/globalPlugins/nvdaYoutubeDL/youtube_dl/extractor/wsj.py
23
3399
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, ) class WSJIE(InfoExtractor): _VALID_URL = r'https?://video-api\.wsj\.com/api-video/player/iframe\.html\?guid=(?P<id>[a-zA-Z0-9-]+)' IE_DESC = 'Wall Street J...
gpl-2.0
ioannistsanaktsidis/invenio
modules/bibformat/lib/elements/bfe_photos.py
18
5831
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 ## License, or ...
gpl-2.0
hsaputra/tensorflow
tensorflow/examples/adding_an_op/zero_out_2_test.py
111
1988
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
klmitch/nova
nova/tests/functional/compute/test_resource_tracker.py
1
30750
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
yehudagale/fuzzyJoiner
old/TripletLossFacenetLSTM-angular.py
1
21847
import numpy as np import tensorflow as tf import random as random # import cntk as C # """ # The below is necessary in Python 3.2.3 onwards to # have reproducible behavior for certain hash-based operations. # See these references for further details: # https://docs.python.org/3.4/using/cmdline.html#envvar-PYTHONHASHSE...
epl-1.0
AsylumConnect/asylum-connect-catalog
app/__init__.py
2
2981
import os from flask import Flask from flask.ext.mail import Mail from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from flask.ext.assets import Environment from flask.ext.wtf import CsrfProtect from flask.ext.compress import Compress from flask.ext.rq import RQ from config import co...
mit
hynekcer/django
django/contrib/gis/forms/fields.py
504
4316
from __future__ import unicode_literals from django import forms from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.utils.translation import ugettext_lazy as _ from .widgets import OpenLayersWidget class GeometryField(forms.Field): """ This is the basic form field for a Geometry. A...
bsd-3-clause
cyandterry/Python-Study
Ninja/Leetcode/99_Recover_Binary_Search_Tree.py
2
1570
""" Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty straight forward. Could you devise a constant space solution? """ # Definition for a binary tree node # class TreeNode: # def __init__(self, x): # ...
mit
gautamMalu/rootfs_xen_arndale
usr/lib/python2.7/lib-tk/tkFont.py
36
6094
# Tkinter font wrapper # # written by Fredrik Lundh, February 1998 # # FIXME: should add 'displayof' option where relevant (actual, families, # measure, and metrics) # __version__ = "0.9" import Tkinter # weight/slant NORMAL = "normal" ROMAN = "roman" BOLD = "bold" ITALIC = "italic" def nametofont(name): ...
gpl-2.0
krsjoseph/youtube-dl
youtube_dl/extractor/tvc.py
113
3902
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( clean_html, int_or_none, ) class TVCIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?tvc\.ru/video/iframe/id/(?P<id>\d+)' _TEST = { 'url': 'http://www.tvc.ru/video/ifra...
unlicense
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/Instagram/SearchUsers.py
5
3764
# -*- coding: utf-8 -*- ############################################################################### # # SearchUsers # Allows you to search for users by name. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this ...
apache-2.0
LLNL/spack
lib/spack/external/_pytest/pytester.py
11
40498
""" (disabled by default) support for testing pytest and pytest plugins. """ from __future__ import absolute_import, division, print_function import codecs import gc import os import platform import re import subprocess import sys import time import traceback from fnmatch import fnmatch from weakref import WeakKeyDic...
lgpl-2.1
lmorchard/django-allauth
allauth/utils.py
36
8688
import base64 import re import unicodedata import json from django.core.exceptions import ImproperlyConfigured from django.core.validators import validate_email, ValidationError from django.core import urlresolvers from django.contrib.sites.models import Site from django.db.models import FieldDoesNotExist from django....
mit
samlaudev/LeetCode
Python/Insert Delete GetRandom O(1) - Duplicates allowed/Solution.py
1
2970
# Problem: Insert Delete GetRandom O(1) - Duplicates allowed # # Design a data structure that supports all following operations in average O(1) time. # # Note: Duplicate elements are allowed. # 1. insert(val): Inserts an item val to the collection. # 2. remove(val): Removes an item val from the collection if presen...
mit
robovm/robovm-studio
python/lib/Lib/sets.py
132
19624
"""Classes to represent arbitrary sets (including sets of sets). This module implements sets using dictionaries whose values are ignored. The usual operations (union, intersection, deletion, etc.) are provided as both methods and operators. Important: sets are not sequences! While they support 'x in s', 'len(s)', a...
apache-2.0
NoUsername/PrivateNotesExperimental
notes/views.py
7
4286
# # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # 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 the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # This...
agpl-3.0
gsmaxwell/phase_offset_rx
gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py
19
1497
#!/usr/bin/env python # # Copyright 2005,2007,2010 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
grevutiu-gabriel/sympy
sympy/matrices/expressions/tests/test_inverse.py
92
1261
from sympy.core import symbols from sympy.matrices.expressions import MatrixSymbol, Inverse from sympy.matrices import eye, Identity, ShapeError from sympy.utilities.pytest import raises from sympy import refine, Q n, m, l = symbols('n m l', integer=True) A = MatrixSymbol('A', n, m) B = MatrixSymbol('B', m, l) C = Mat...
bsd-3-clause
ArtsiomCh/tensorflow
tensorflow/contrib/learn/python/learn/estimators/composable_model_test.py
77
6392
# 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
cancro7/gem5
util/encode_inst_dep_trace.py
13
8604
#!/usr/bin/env python # Copyright (c) 2015 ARM Limited # 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 implementation...
bsd-3-clause
mcgachey/edx-platform
common/lib/capa/capa/registry.py
201
1921
"""A registry for finding classes based on tags in the class.""" class TagRegistry(object): """ A registry mapping tags to handlers. (A dictionary with some extra error checking.) """ def __init__(self): self._mapping = {} def register(self, cls): """ Register cls as ...
agpl-3.0
egabancho/invenio
invenio/legacy/search_engine/__init__.py
1
332135
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 Found...
gpl-2.0
shubhdev/edx-platform
lms/djangoapps/verify_student/tests/test_views.py
3
87809
# encoding: utf-8 """ Tests of verify_student views. """ import json import urllib from datetime import timedelta, datetime from uuid import uuid4 import ddt import httpretty import mock import pytz from bs4 import BeautifulSoup from mock import patch, Mock, ANY from django.conf import settings from django.core.urlr...
agpl-3.0
ashray/VTK-EVM
Filters/Core/Testing/Python/TestSynchronizedTemplates2D.py
20
1438
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Create the RenderWindow, Renderer and both Actors # ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.SetMultiSamples(0) renWin.AddRenderer(ren1) iren = vtk.vtkRenderWi...
bsd-3-clause
danakj/chromium
third_party/pycoverage/coverage/files.py
209
10724
"""File wrangling.""" from coverage.backward import to_string from coverage.misc import CoverageException import fnmatch, os, os.path, re, sys import ntpath, posixpath class FileLocator(object): """Understand how filenames work.""" def __init__(self): # The absolute path to our current directory. ...
bsd-3-clause
mozman/ezdxf
tests/test_05_tools/test_510_byte_stream.py
1
1134
# Copyright (c) 2020, Manfred Moitzi # License: MIT License import pytest import struct from ezdxf.tools.binarydata import ByteStream def test_init(): bs = ByteStream(b'ABCDABC\x00') assert bs.index == 0 assert len(bs.buffer) == 8 def test_read_ps(): bs = ByteStream(b'ABCDABC\x00') s = bs.read_...
mit
zvolsky/praha
languages/default.py
180
4428
# coding: utf8 { '!langcode!': 'en-us', '!langname!': 'English (US)', '%s %%(shop)': '%s %%(shop)', '%s %%(shop[0])': '%s %%(shop[0])', '%s %%{quark[0]}': '%s %%{quark[0]}', '%s %%{shop[0]}': '%s %%{shop[0]}', '%s %%{shop}': '%s %%{shop}', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '@markmin\x01*...
agpl-3.0
abyssxsy/gnuradio
gr-digital/python/digital/qa_correlate_and_sync.py
54
3786
#!/usr/bin/env python # # Copyright 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 option) ...
gpl-3.0
robinro/ansible
lib/ansible/modules/cloud/amazon/rds_subnet_group.py
71
5419
#!/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
alindt/Cinnamon
files/usr/lib/cinnamon-settings/modules/cs_default.py
1
14784
#!/usr/bin/env python from SettingsWidgets import * PREF_MEDIA_AUTORUN_NEVER = "autorun-never" PREF_MEDIA_AUTORUN_X_CONTENT_START_APP = "autorun-x-content-start-app" PREF_MEDIA_AUTORUN_X_CONTENT_IGNORE = "autorun-x-content-ignore" PREF_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER = "autorun-x-content-open-folder" CUSTOM_ITEM...
gpl-2.0
andrewtholt/My-amforth-6.1
avr8/devices/at90usb647/device.py
5
13009
# Partname: AT90USB647 # generated automatically, do not edit MCUREGS = { 'WDTCSR': '&96', 'WDTCSR_WDIF': '$80', 'WDTCSR_WDIE': '$40', 'WDTCSR_WDP': '$27', 'WDTCSR_WDCE': '$10', 'WDTCSR_WDE': '$08', 'PORTA': '&34', 'DDRA': '&33', 'PINA': '&32', 'PORTB': '&37', 'DDRB': '&36', 'PINB': '&35', 'PORT...
gpl-3.0
bugzPDX/airmozilla
airmozilla/manage/views/dashboard.py
1
5401
import datetime from django.contrib.auth.models import User from django.shortcuts import render from django.utils import timezone from django.db.models import Sum from jsonview.decorators import json_view from airmozilla.main.models import ( Event, SuggestedEvent, Picture, EventRevision, ) from airmo...
bsd-3-clause
jakevdp/scipy
scipy/signal/tests/test_cont2discrete.py
38
12406
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import TestCase, run_module_suite, \ assert_array_almost_equal, assert_almost_equal, \ assert_allclose import warnings from scipy.signal import cont2discrete as c2...
bsd-3-clause
cesarmarinhorj/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/stylequeuetask.py
127
2897
# Copyright (c) 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 retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
holachek/ecosense
app/webassets/filter/handlebars.py
3
2658
import subprocess from os import path from webassets.exceptions import FilterError from webassets.filter.jst import JSTemplateFilter __all__ = ('Handlebars',) class Handlebars(JSTemplateFilter): """Compile `Handlebars <http://handlebarsjs.com/>`_ templates. This filter assumes that the ``handlebars`` exec...
mit
pmazurek/ansible-modules-extras
cloud/profitbricks/profitbricks_nic.py
132
8769
#!/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
mathemage/h2o-3
h2o-docs/src/product/conf.py
2
10519
# -*- coding: utf-8 -*- # # documentation documentation build configuration file, created by # sphinx-quickstart on Tue Apr 26 14:35:07 2016. # # 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 # autogenerated file....
apache-2.0
sebastianwelsh/artifacts
tests/reader_test.py
1
8292
# -*- coding: utf-8 -*- """Tests for the artifact definitions readers.""" import io import os import unittest from artifacts import definitions from artifacts import errors from artifacts import reader class YamlArtifactsReaderTest(unittest.TestCase): """Class to test the YAML artifacts reader.""" def testRead...
apache-2.0
uclouvain/osis
ddd/logic/application/test/use_case/write/test_renew_multiple_attributions_service.py
1
9080
# ############################################################################ # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core business i...
agpl-3.0
amyshi188/osf.io
website/project/decorators.py
8
12504
# -*- coding: utf-8 -*- import functools import httplib as http from furl import furl from flask import request from modularodm import Q from modularodm.exceptions import ModularOdmException from framework import status from framework.auth import Auth, cas from framework.flask import redirect # VOL-aware redirect f...
apache-2.0
batxes/4c2vhic
SHH_WT_models_highres/SHH_WT_models_highres_final_output_0.1_-0.1_5000/mtx1_models/SHH_WT_models_highres1537.py
4
88211
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
MaizerGomes/youtube-dl
youtube_dl/extractor/wimp.py
65
1839
from __future__ import unicode_literals import re from .common import InfoExtractor from .youtube import YoutubeIE class WimpIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?wimp\.com/([^/]+)/' _TESTS = [{ 'url': 'http://www.wimp.com/maruexhausted/', 'md5': 'f1acced123ecb28d9bb79f2479f2b6a...
unlicense
AlperSaltabas/OR_Tools_Google_API
examples/python/production.py
34
2848
# Copyright 2011 Hakan Kjellerstrand hakank@bonetmail.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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
allmightyspiff/softlayer-python
tests/api_tests.py
2
12260
""" SoftLayer.tests.api_tests ~~~~~~~~~~~~~~~~~~~~~~~~~ :license: MIT, see LICENSE for more details. """ from unittest import mock as mock import SoftLayer import SoftLayer.API from SoftLayer import testing from SoftLayer import transports class Initialization(testing.TestCase): def test_init(self):...
mit
jelugbo/tundex
lms/djangoapps/instructor/tests/test_legacy_anon_csv.py
27
2540
""" Unit tests for instructor dashboard Based on (and depends on) unit tests for courseware. Notes for running by hand: ./manage.py lms --settings test test lms/djangoapps/instructor """ from django.test.utils import override_settings # Need access to internal func to put users in the right group from django.contr...
agpl-3.0
matthewgall/dnsjson.com
app.py
1
5654
#!/usr/bin/env python3 import os, logging, argparse, json, datetime import requests import dns.resolver from bottle import route, request, response, redirect, hook, error, default_app, view, static_file, template def set_content_type(fn): def _return_type(*args, **kwargs): if request.headers.get('Accept') == "appl...
mit
ventrixcode/yowsup
yowsup/env/env.py
11
2576
import abc import logging from six import with_metaclass logger = logging.getLogger(__name__) DEFAULT = "s40" class YowsupEnvType(abc.ABCMeta): def __init__(cls, name, bases, dct): if name != "YowsupEnv": YowsupEnv.registerEnv(cls) super(YowsupEnvType, cls).__init__(name, bases, dct) ...
gpl-3.0
Agent007/deep-learning
image-classification/helper.py
155
5631
import pickle import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import LabelBinarizer def _load_label_names(): """ Load the label names from file """ return ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck'] def load_cfar10_batch(ci...
mit
anirudhSK/chromium
tools/perf/benchmarks/page_cycler.py
1
3123
# Copyright (c) 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 measurements import page_cycler from telemetry import test class PageCyclerBloat(test.Test): test = page_cycler.PageCycler page_set = 'page_se...
bsd-3-clause
flotre/sickbeard-vfvo
lib/hachoir_parser/container/ogg.py
90
11888
# # Ogg parser # Author Julien Muchembled <jm AT jm10.no-ip.com> # Created: 10 june 2006 # from lib.hachoir_parser import Parser from lib.hachoir_core.field import (Field, FieldSet, createOrphanField, NullBits, Bit, Bits, Enum, Fragment, MissingField, ParserError, UInt8, UInt16, UInt24, UInt32, UInt64, Raw...
gpl-3.0
JimCircadian/ansible
lib/ansible/modules/cloud/amazon/cloudfront_distribution.py
15
85998
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module...
gpl-3.0
samdoran/ansible
lib/ansible/utils/module_docs_fragments/eos.py
87
5493
# # (c) 2015, Peter Sprygada <psprygada@ansible.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) any late...
gpl-3.0
garyjyao1/ansible
lib/ansible/modules/core/cloud/amazon/iam.py
29
28823
#!/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
JanNash/sms-tools
lectures/06-Harmonic-model/plots-code/spectral-peaks.py
22
1161
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, triang, blackmanharris import math import sys, os, functools, time sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import dftModel as DFT import utilFunctions as UF (fs, x) = UF...
agpl-3.0
SYNchroACK/VulnPryer
shiploader.py
3
7960
#!/usr/bin/env python import ConfigParser from pymongo import MongoClient import csv import simplejson as json import sys import glob import logging import os logger = logging.getLogger('vulnpryer.shiploader') config = ConfigParser.ConfigParser() config.read('vulnpryer.conf') mongo_host = config.get('Mongo', 'hostn...
mit
googleapis/googleapis-gen
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/offline_user_data_job_service/transports/base.py
1
5564
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/encodings/email/header.py
255
22243
# Copyright (C) 2002-2006 Python Software Foundation # Author: Ben Gertzfield, Barry Warsaw # Contact: email-sig@python.org """Header encoding and decoding functionality.""" __all__ = [ 'Header', 'decode_header', 'make_header', ] import re import binascii import email.quoprimime import email.base64m...
gpl-3.0
antonblanchard/linux
tools/perf/python/twatch.py
221
2515
#! /usr/bin/python # SPDX-License-Identifier: GPL-2.0-only # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # import perf def main(context_switch = 0, thread = -1): cpus = perf.cpu_map() threads = pe...
gpl-2.0
harshadyeola/easyengine
ee/cli/plugins/stack_upgrade.py
1
12752
from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from ee.core.logging import Log from ee.core.variables import EEVariables from ee.core.aptget import EEAptGet from ee.core.apt_repo import EERepo from ee.core.services import EEService from ee.core.fileutils import EEF...
mit
sahilTakiar/spark
python/pyspark/status.py
159
3756
# # 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
tunneln/CarnotKE
jyhton/lib-python/2.7/lib2to3/fixes/fix_exitfunc.py
291
2505
""" Convert use of sys.exitfunc to use the atexit module. """ # Author: Benjamin Peterson from lib2to3 import pytree, fixer_base from lib2to3.fixer_util import Name, Attr, Call, Comma, Newline, syms class FixExitfunc(fixer_base.BaseFix): keep_line_order = True BM_compatible = True PATTERN = """ ...
apache-2.0
noba3/KoTos
addons/plugin.video.filmibynaturex-2.5.7/mymoves/movie/Metadata.py
1
2017
from common import XBMCInterfaceUtils, Logger from metahandler import metahandlers # @UnresolvedImport import sys def retieveMovieInfoAndAddItem(request_obj, response_obj): items = response_obj.get_item_list() XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__addMovieInfo_i...
gpl-2.0
shepdelacreme/ansible
lib/ansible/modules/cloud/ovirt/ovirt_tag.py
66
8130
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 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 #...
gpl-3.0
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/soyuz/model/archivesubscriber.py
1
9106
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Database class for table ArchiveSubscriber.""" __metaclass__ = type __all__ = [ 'ArchiveSubscriber', ] from operator import itemgetter import pytz from storm.ex...
agpl-3.0
iffy/AutobahnPython
examples/twisted/wamp/rpc/errors/backend.py
2
3487
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
cee1/cerbero-mac
test/test_cerbero_packages_packagesstore.py
27
5247
# 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...
lgpl-2.1
glass-bead-labs/data-reflector
comment_tracker/github_comments.py
2
3106
import requests import json class GitHubComments: key = '63f38f069567d2468f1be592301eb096acb2682b' def __init__(self, owner, repo): self.owner = owner self.repo = repo parameters = {'state': 'all', 'per_page': 100} self.request_issues = requests.get('https://api.github.com/...
isc
ppizarror/Ned-For-Spod
bin/external/mechanize/_mozillacookiejar.py
3
6323
"""Mozilla / Netscape cookie loading / saving. Copyright 2002-2006 John J Lee <jjl@pobox.com> Copyright 1997-1999 Gisle Aas (original libwww-perl code) This code is free software; you can redistribute it and/or modify it under the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt included with the distri...
gpl-2.0
openhatch/oh-mainline
vendor/packages/irc/irc/util.py
19
1109
from __future__ import division, absolute_import import six # from jaraco.util.itertools def always_iterable(item): """ Given an object, always return an iterable. If the item is not already iterable, return a tuple containing only the item. >>> always_iterable([1,2,3]) [1, 2, 3] >>> always_i...
agpl-3.0
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/django/contrib/sessions/middleware.py
36
2664
import time from importlib import import_module from django.conf import settings from django.utils.cache import patch_vary_headers from django.utils.http import cookie_date class SessionMiddleware(object): def __init__(self): engine = import_module(settings.SESSION_ENGINE) self.SessionStore = eng...
mit