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 |
|---|---|---|---|---|---|
codedsk/hubcheck | hubcheck/pageobjects/po_hubucoursemanageemail.py | 1 | 1364 | from hubcheck.pageobjects.po_hubucoursemanage import HubUCourseManagePage
class HubUCourseManageEmailPage(HubUCourseManagePage):
"""hub u course manager email
there is no tab for this page, you can get to it by direct url or
select some users from the membership tab and do the "send email"
act... | mit |
Medigate/cutiuta-server | cutiuta-server/env/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py | 2931 | 1684 | ######################## 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 |
Maximilian-Reuter/SickRage-1 | lib/unidecode/x018.py | 252 | 4099 | data = (
' @ ', # 0x00
' ... ', # 0x01
', ', # 0x02
'. ', # 0x03
': ', # 0x04
' // ', # 0x05
'', # 0x06
'-', # 0x07
', ', # 0x08
'. ', # 0x09
'', # 0x0a
'', # 0x0b
'', # 0x0c
'', # 0x0d
'', # 0x0e
'[?]', # 0x0f
'0', # 0x10
'1', # 0x11
'2', # 0x12
'3', # 0x13
'... | gpl-3.0 |
lowitty/selenium | libs/windows/Crypto/Cipher/AES.py | 126 | 4218 | # -*- coding: utf-8 -*-
#
# Cipher/AES.py : AES
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
# n... | mit |
mcella/django | tests/one_to_one/models.py | 203 | 3343 | """
One-to-one relationships
To define a one-to-one relationship, use ``OneToOneField()``.
In this example, a ``Place`` optionally can be a ``Restaurant``.
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compat... | bsd-3-clause |
google/google-ctf | third_party/edk2/BaseTools/Source/Python/GenFds/AprioriSection.py | 1 | 5218 | ## @file
# process APRIORI file data and generate PEI/DXE APRIORI file
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distri... | apache-2.0 |
mikemike/SkypeBot | custom/server.py | 1 | 1206 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resolve a host to an IP
"""
from __future__ import absolute_import, division, print_function
import sys
import urllib
import socket
from datetime import datetime, timedelta
def resolve_host(host):
try:
ip = socket.gethostbyname(host)
return ip
... | gpl-2.0 |
WMD-Bath/sulfur-model | scripts/plots.py | 2 | 45105 | #! /usr/bin/env python
import argparse
import os.path
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
from matplotlib import gridspec
from scipy.special import erf, erfc
import ase.thermochemistry
import ase.db
import shelve
from itertools import cycle
from matplotli... | gpl-3.0 |
luckylavish/zamboni | mkt/webapps/query.py | 8 | 5087 | from django.db import models
from django.db.models.sql import compiler
class IndexQuerySet(models.query.QuerySet):
def with_index(self, **kw):
"""
Suggest indexes that should be used with this query as key-value pairs.
qs.with_index(t1='xxx') => INNER JOIN t1 USE INDEX (`xxx`)
""... | bsd-3-clause |
Acehaidrey/incubator-airflow | airflow/contrib/operators/gcp_translate_operator.py | 7 | 1191 | #
# 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... | apache-2.0 |
elivre/arfe | e2018/SCRIPTS/00-rede2018-run-all.py | 1 | 1103 | #!/usr/bin/env python
# coding: utf-8
# # 00-run-all
# In[ ]:
ano_eleicao = '2018'
dbschema = f'rede{ano_eleicao}'
# In[2]:
import os
import sys
sys.path.append('../')
import mod_tse as mtse
home = os.environ["HOME"]
# In[3]:
get_ipython().run_line_magic('run', '005-{dbschema}_dicionarios.ipynb')
# In[4]:... | mit |
tobegit3hub/deep_cnn | java_predict_client/src/main/proto/tensorflow/contrib/distributions/python/kernel_tests/quantized_distribution_test.py | 12 | 17667 | # 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 |
lberruti/ansible | lib/ansible/cache/__init__.py | 133 | 1828 | # (c) 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) any lat... | gpl-3.0 |
mccheung/kbengine | kbe/res/scripts/common/Lib/site-packages/setuptools/svn_utils.py | 68 | 17284 | import os
import re
import sys
from distutils import log
import xml.dom.pulldom
import shlex
import locale
import codecs
import unicodedata
import warnings
from setuptools.compat import unicode
from xml.sax.saxutils import unescape
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
from ... | lgpl-3.0 |
Softmotions/edx-platform | openedx/core/djangoapps/user_api/preferences/tests/test_views.py | 82 | 22351 | # -*- coding: utf-8 -*-
"""
Unit tests for preference APIs.
"""
import unittest
import ddt
import json
from mock import patch
from django.core.urlresolvers import reverse
from django.conf import settings
from django.test.testcases import TransactionTestCase
from rest_framework.test import APIClient
from student.tests... | agpl-3.0 |
CydarLtd/ansible | lib/ansible/modules/windows/win_acl_inheritance.py | 72 | 2492 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
#
# 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 ... | gpl-3.0 |
Kagee/youtube-dl | youtube_dl/extractor/newstube.py | 37 | 3533 | # encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import ExtractorError
class NewstubeIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?newstube\.ru/media/(?P<id>.+)'
_TEST = {
'url': 'http://www.newstube.ru/media/telekanal-cnn-pere... | unlicense |
GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/networkx/algorithms/centrality/betweenness.py | 35 | 10649 | """
Betweenness centrality measures.
"""
# Copyright (C) 2004-2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import heapq
import networkx as nx
import random
__author__ = """Aric Hagberg (hagberg@lanl.... | agpl-3.0 |
thegedge/chooks | chooks/constants.py | 1 | 2092 | """Constants used by various parts of the chooks library."""
# Prefix used for keys in chook configuration
PREFIX = 'chooks'
#-----------------------------------------------------------------------
# Keys used for parameters grabbed from the git environment
#----------------------------------------------------------... | mit |
boomsbloom/dtm-fmri | DTM/for_gensim/lib/python2.7/site-packages/gensim/test/test_sklearn_integration.py | 3 | 6891 | import six
import unittest
import numpy
import os
import codecs
import pickle
from scipy import sparse
from sklearn.pipeline import Pipeline
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.datasets import load_files
from sklearn import linear_model
from gensim.sklearn_integration.sklearn_wrapp... | mit |
mancoast/CPythonPyc_test | cpython/233_test_math.py | 9 | 6550 | # Python test set -- math module
# XXXX Should not do tests around zero only
from test.test_support import TestFailed, verbose
seps='1e-05'
eps = eval(seps)
print 'math module, testing with eps', seps
import math
def testit(name, value, expected):
if abs(value-expected) > eps:
raise TestFailed, '%s retur... | gpl-3.0 |
sdlovecraft/samhains | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/styles/vim.py | 364 | 1976 | # -*- coding: utf-8 -*-
"""
pygments.styles.vim
~~~~~~~~~~~~~~~~~~~
A highlighting style for Pygments, inspired by vim.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keywor... | mit |
JorisPLA7/Super-D-mineur | tests/listes.py | 2 | 1976 | import random
class Draw():
def __init__(self,xLen,yLen,p):
self.xLen = xLen
self.yLen = yLen
self.draw = []
self.new(p)
def applyDraw(self, preset):
self.draw[0] = preset
self.i = 0
def __refresh(self,x,y,i):
S = 0
for nearx in range(0,3):
... | gpl-3.0 |
airanmehr/bio | Scripts/TimeSeriesPaper/Plot/EstimateN.py | 1 | 3621 | '''
Copyleft Jan 26, 2017 Arya Iranmehr, PhD Student, Bafna Lab, UC San Diego, Email: airanmehr@gmail.com
'''
import numpy as np;
np.set_printoptions(linewidth=200, precision=5, suppress=True)
import pandas as pd;
pd.options.display.max_rows = 20;
pd.options.display.expand_frame_repr = False
import seaborn as sns
im... | mit |
ivmech/iviny-scope | lib/xlsxwriter/test/styles/test_write_xf.py | 1 | 16250 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ...styles import Styles
from ...format import Format
class TestWriteXf(unittest.TestCase):
... | gpl-3.0 |
lukecwik/incubator-beam | sdks/python/apache_beam/transforms/external_test_py37.py | 2 | 2489 | #
# 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 |
ArnossArnossi/django | tests/gis_tests/gdal_tests/test_geom.py | 256 | 20748 | import json
import unittest
from binascii import b2a_hex
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.utils.six.moves import range
from ..test_data import TestDataMixin
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
if... | bsd-3-clause |
ArnossArnossi/django | django/contrib/gis/db/backends/postgis/schema.py | 333 | 3091 | from django.db.backends.postgresql.schema import DatabaseSchemaEditor
class PostGISSchemaEditor(DatabaseSchemaEditor):
geom_index_type = 'GIST'
geom_index_ops_nd = 'GIST_GEOMETRY_OPS_ND'
rast_index_wrapper = 'ST_ConvexHull(%s)'
sql_add_spatial_index = "CREATE INDEX %(index)s ON %(table)s USING %(inde... | bsd-3-clause |
NOAA-ORR-ERD/gridded | gridded/tests/test_pysgrid/test_sgrid_wrf.py | 1 | 1871 | """
Created on Apr 7, 2015
@author: ayan
"""
from __future__ import (absolute_import, division, print_function)
import pytest
import numpy as np
from gridded.pysgrid.sgrid import SGrid, load_grid
from .write_nc_test_files import wrf_sgrid
pytestmark = pytest.mark.skipif(True, reason="Lots of issues with these -... | unlicense |
Nothing-Dev/android_kernel_motorola_msm8610 | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
eadgarchen/tensorflow | tensorflow/python/keras/_impl/keras/datasets/__init__.py | 22 | 1349 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
ttyangf/gyp | gyptest.py | 1752 | 8019 | #!/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.
__doc__ = """
gyptest.py -- test runner for GYP tests.
"""
import os
import optparse
import subprocess
import sys
class CommandRunner(obje... | bsd-3-clause |
MrFelixU/ks5-edexcel | oink/simpletal/sgmlentitynames.py | 4 | 6958 | """ simpleTAL Implementation
Copyright (c) 2009 Colin Stewart (http://www.owlfish.com/)
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 ab... | apache-2.0 |
lileeyao/acm | tree/intermediate/binary_search_tree_add_find_delete.py | 2 | 1550 | # Definition for a binary tree node
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def add(self, val, root):
if not root: return None
if val < root.val:
child = self.add(val, root.left)
... | gpl-2.0 |
franek/sigal | sigal/video.py | 2 | 6357 | # -*- coding:utf-8 -*-
# Copyright (c) 2013 - Christophe-Marie Duquesne
# Copyright (c) 2013-2014 - Simon Conseil
# 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, i... | mit |
jgcaaprom/android_external_chromium_org | chrome/common/extensions/docs/server2/schema_processor.py | 66 | 8575 | # 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 collections import defaultdict, Mapping
import traceback
from third_party.json_schema_compiler import json_parse, idl_schema, idl_parser
from reference... | bsd-3-clause |
omnirom/android_external_chromium-org | tools/site_compare/commands/maskmaker.py | 179 | 10488 | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Component for automatically creating masks of changing areas of a website.
Works by repeated invokation of a browser and scraping of the resulting pa... | bsd-3-clause |
RTHMaK/RPGOne | Documents/skflow-master/examples/iris.py | 6 | 1182 | # Copyright 2015-present Scikit Flow 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... | apache-2.0 |
addition-it-solutions/project-all | addons/point_of_sale/report/pos_order_report.py | 4 | 5231 | # -*- 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 |
spiceqa/virt-test | qemu/tests/timerdevice_boot.py | 3 | 8062 | import logging
import re
import time
from autotest.client.shared import error
from autotest.client import utils
from virttest import data_dir, storage, utils_disk, utils_test, env_process
from virttest import funcatexit
@error.context_aware
def run_timerdevice_boot(test, params, env):
"""
Timer device boot gu... | gpl-2.0 |
tjarnold/jewel_3.4.49 | tools/perf/scripts/python/syscall-counts.py | 11181 | 1522 | # system call counts
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.path.append(os.envir... | gpl-2.0 |
MoamerEncsConcordiaCa/tensorflow | tensorflow/contrib/seq2seq/python/ops/loss.py | 2 | 4722 | # 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 |
dset0x/invenio | invenio/modules/documents/testsuite/test_file_permissions_and_fullpath.py | 5 | 3382 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 |
danblick/robocar | scripts/save_rgb_to_png.py | 1 | 1207 | import os
import argparse
import glob
import sys
import numpy as np
import cv2
def convert(args, in_dir, in_filename):
in_filepath = os.path.join(in_dir, in_filename)
x = np.fromfile(in_filepath, dtype=np.uint8)
y = x.reshape(args.height, args.width, 3)
basename, _ = os.path.splitext(in_filename)
... | mit |
2015fallproject/2015fallcase1 | static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_sys_settrace.py | 99 | 24959 | # Testing the line trace facility.
from test import support
import unittest
import sys
import difflib
import gc
# A very basic example. If this fails, we're in deep trouble.
def basic():
return 1
basic.events = [(0, 'call'),
(1, 'line'),
(1, 'return')]
# Many of the tests below ... | agpl-3.0 |
rhndg/openedx | cms/envs/yaml_config.py | 49 | 8112 | """
This is the default template for our main set of AWS servers.
Before importing this settings file the following MUST be
defined in the environment:
* SERVICE_VARIANT - can be either "lms" or "cms"
* CONFIG_ROOT - the directory where the application
yaml config files are located
"""
#... | agpl-3.0 |
colinnewell/odoo | addons/stock_invoice_directly/stock_invoice_directly.py | 337 | 2132 | # -*- 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 |
markandrewj/pygments | pygments/formatters/terminal.py | 1 | 4012 | # -*- coding: utf-8 -*-
"""
pygments.formatters.terminal
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Formatter for terminal output with ANSI sequences.
:copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.formatter import Formatter
from pyg... | bsd-2-clause |
appliedx/python-saml | src/onelogin/saml2/constants.py | 6 | 4639 | # -*- coding: utf-8 -*-
""" OneLogin_Saml2_Constants class
Copyright (c) 2014, OneLogin, Inc.
All rights reserved.
Constants class of OneLogin's Python Toolkit.
"""
class OneLogin_Saml2_Constants(object):
"""
This class defines all the constants that will be used
in the OneLogin's Python Toolkit.
... | bsd-3-clause |
laurentgo/pants | src/python/pants/backend/android/tasks/unpack_libraries.py | 5 | 11749 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from hashl... | apache-2.0 |
ikkini/etherbinge | arpsniff.py | 1 | 2249 | #! /usr/bin/env python
# Note that this script requires scapy to be installed (correctly)
# Additionally, it requires root privileges to run.
# This tool COULD be run together with arping.py to list any ARP resonse with a source not our own.
""" http://tools.ietf.org/rfc/rfc5227.txt
RFC 5227, IPv4 Address Conflict Det... | bsd-2-clause |
elkingtonmcb/rethinkdb | external/v8_3.30.33.16/build/gyp/buildbot/buildbot_run.py | 497 | 5998 | #!/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.
"""Argument-less script to select what to run on the buildbots."""
import os
import shutil
import subprocess
import sys
if sys.platform ... | agpl-3.0 |
gamahead/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/_mathtext_data.py | 69 | 57988 | """
font data tables for truetype and afm computer modern fonts
"""
# this dict maps symbol names to fontnames, glyphindex. To get the
# glyph index from the character code, you have to use get_charmap
"""
from matplotlib.ft2font import FT2Font
font = FT2Font('/usr/local/share/matplotlib/cmr10.ttf')
items = font.get_... | gpl-3.0 |
zhiwliu/openshift-ansible | roles/openshift_health_checker/openshift_checks/logging/fluentd.py | 55 | 6281 | """Check for an aggregated logging Fluentd deployment"""
import json
from openshift_checks import OpenShiftCheckException, OpenShiftCheckExceptionList
from openshift_checks.logging.logging import LoggingCheck
class Fluentd(LoggingCheck):
"""Check for an aggregated logging Fluentd deployment"""
name = "flu... | apache-2.0 |
PAC-lge/lge-kernel-star | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# 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.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
Balachan27/django | tests/m2m_regress/models.py | 358 | 2826 | from django.contrib.auth import models as auth
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
# No related name is needed here, since symmetrical relations are not
# explicitly reversible.
@python_2_unicode_compatible
class SelfRefer(models.Model):
name = models.CharFie... | bsd-3-clause |
hcs/mailman | src/mailman/testing/layers.py | 1 | 11933 | # Copyright (C) 2008-2012 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 you... | gpl-3.0 |
alexteodor/odoo | addons/account/account_analytic_line.py | 304 | 7914 | # -*- 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 |
plissonf/scikit-learn | examples/neighbors/plot_approximate_nearest_neighbors_scalability.py | 225 | 5719 | """
============================================
Scalability of Approximate Nearest Neighbors
============================================
This example studies the scalability profile of approximate 10-neighbors
queries using the LSHForest with ``n_estimators=20`` and ``n_candidates=200``
when varying the number of sa... | bsd-3-clause |
trriplejay/kubernetes | hack/boilerplate/boilerplate.py | 156 | 4733 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 |
tylerpedley/Tetris | gtest/scripts/gen_gtest_pred_impl.py | 2538 | 21986 | #!/usr/bin/env python
#
# Copyright 2006, 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... | gpl-3.0 |
jagguli/intellij-community | plugins/hg4idea/testData/bin/hgext/inotify/linux/watcher.py | 92 | 10504 | # watcher.py - high-level interfaces to the Linux inotify subsystem
# Copyright 2006 Bryan O'Sullivan <bos@serpentine.com>
# This library is free software; you can redistribute it and/or modify
# it under the terms of version 2.1 of the GNU Lesser General Public
# License, or any later version.
'''High-level interfa... | apache-2.0 |
ecosoft-odoo/odoo | addons/web_analytics/__openerp__.py | 305 | 1432 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
rschiang/shedskin | examples/quameon/orbital/atomic_sto.py | 6 | 2965 | #!/usr/bin/python
"""\
atomic_sto.py - Slater Type Orbitals
"""
# Copyright (c) 2007, Mark Dewing
# Quameon is covered under the GNU General Public License. Please see the
# file LICENSE that is part of this distribution.
import box_bc
import math
import atomic_sto_primitive
from orbital_base import orbital_base
... | gpl-3.0 |
ping/youtube-dl | youtube_dl/extractor/appleconnect.py | 52 | 1756 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
str_to_int,
ExtractorError
)
class AppleConnectIE(InfoExtractor):
_VALID_URL = r'https?://itunes\.apple\.com/\w{0,2}/?post/idsa\.(?P<id>[\w-]+)'
_TEST = {
'url': 'https://itunes.app... | unlicense |
keuv-grvl/bioconda-recipes | recipes/np-likeness-scorer/np-likeness.py | 51 | 1666 | #!/usr/bin/env python
#
# Wrapper script for Java Conda packages that ensures that the java runtime
# is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128).
#
# Program Parameters
#
import os
import s... | mit |
TheTimmy/spack | var/spack/repos/builtin/packages/atop/package.py | 3 | 1853 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
jmighion/ansible | lib/ansible/plugins/callback/jabber.py | 141 | 3912 | # Copyright (C) 2016 maxn nikolaev.makc@gmail.com
# Copyright (c) 2017 Ansible Project
# 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
DOCUMENTATION = '''
callback: jabber
type:... | gpl-3.0 |
1kastner/analyse_weather_data | plot_weather_data/show_husconet_properties.py | 1 | 1406 | """
Depends on filter_weather_data.filters.preparation.average_husconet_temperature
"""
import logging
import os
import pandas
from matplotlib import pyplot
from matplotlib import ticker as mticker
import seaborn
from gather_weather_data.husconet import HUSCONET_STATIONS
from gather_weather_data.husconet import OFFIC... | agpl-3.0 |
s20121035/rk3288_android5.1_repo | external/chromium_org/tools/telemetry/telemetry/results/chart_json_output_formatter.py | 27 | 2640 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import itertools
import json
from telemetry.results import output_formatter
from telemetry.value import summary as summary_module
def _R... | gpl-3.0 |
ibinti/intellij-community | python/lib/Lib/email/Charset.py | 93 | 15684 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Ben Gertzfield, Barry Warsaw
# Contact: email-sig@python.org
__all__ = [
'Charset',
'add_alias',
'add_charset',
'add_codec',
]
import email.base64mime
import email.quoprimime
from email import errors
from email.encoders import encode_... | apache-2.0 |
maciekcc/tensorflow | tensorflow/contrib/linalg/python/kernel_tests/linear_operator_full_matrix_test.py | 41 | 9729 | # 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 |
superbob/YunoSeeMe | test_geods.py | 1 | 3807 | """
Tests for the geods module
"""
import numpy as np
import gdal
from gdalconst import GA_ReadOnly
import ConfigParser
import geods
CONFIG = ConfigParser.ConfigParser()
CONFIG.read('pytest.ini')
DS_FILENAME = CONFIG.get('dem', 'location')
EPSILON = 0.001
EPSG3035_WKT = """PROJCS["ETRS89 / ETRS-LAEA",
GEOGC... | bsd-2-clause |
bpannier/TahomaProtocol | tests/test_event.py | 1 | 4481 | import unittest
from tahoma.event import Event, EventState, DeviceStateChangedEvent, CommandExecutionStateChangedEvent, ExecutionStateChangedEvent
class TestEvent(unittest.TestCase):
def test_DeviceEvent(self):
eventData = {
"name": "DeviceStateChangedEvent",
"setupOID": "1234567... | apache-2.0 |
endorphinl/horizon-fork | openstack_dashboard/dashboards/project/routers/tabs.py | 49 | 1705 | # Copyright 2012, Nachi Ueno, NTT MCL, 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 applic... | apache-2.0 |
hsaputra/tensorflow | tensorflow/python/client/client_lib.py | 111 | 1698 | # 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 |
leedm777/ansible-modules-core | utilities/helper/fireball.py | 132 | 8066 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, 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... | gpl-3.0 |
johnmonash/schoolbadge | badge_project/badge_project/wsgi.py | 1 | 1574 | """
WSGI config for badge_project project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICAT... | agpl-3.0 |
XueqingLin/tensorflow | tensorflow/python/framework/constant_op.py | 17 | 7338 | # 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 |
drglove/SickRage | lib/subliminal/services/opensubtitles.py | 4 | 9764 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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 3 of... | gpl-3.0 |
Gustry/QGIS | python/plugins/processing/algs/qgis/RandomSelectionWithinSubsets.py | 15 | 5989 | # -*- coding: utf-8 -*-
"""
***************************************************************************
RandomSelectionWithinSubsets.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
**********... | gpl-2.0 |
rmacchio/campus_ztp | actions/lib/Template_Parser.py | 4 | 1683 | """
Copyright 2016 Brocade Communications Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | apache-2.0 |
elrafael/web2py-test | handlers/scgihandler.py | 23 | 2175 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
scgihandler.py - handler for SCGI protocol
Modified by Michele Comitini <michele.comitini@glisco.it>
from fcgihandler.py to support SCGI
fcgihandler has the following copyright:
" This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipi... | apache-2.0 |
BeDjango/intef-openedx | openedx/core/djangoapps/credit/serializers.py | 16 | 4521 | """ Credit API Serializers """
from __future__ import unicode_literals
import datetime
import logging
from django.conf import settings
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
import pytz
from rest_framework import serializers
from rest_framework.exceptions import PermissionD... | agpl-3.0 |
Lautitia/newfies-dialer | newfies/mod_mailer/tests.py | 3 | 2359 | #
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2014 Star2Billing S.L.
#
# The Initia... | mpl-2.0 |
terzeron/FeedMaker | bin/extract.py | 1 | 11049 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
import signal
import html
import logging
import logging.config
from bs4 import BeautifulSoup, Comment
from feed_maker_util import Config, URL, IO, HTMLExtractor, header_str
logging.config.fileConfig(os.environ["FEED_MAKER_HOME_DIR"] + "/bin... | gpl-2.0 |
MrBerg/ParSed | parsed.py | 1 | 4827 | #!/usr/bin/env python
import sys
import argparse
import esm
import getch
import os.path
parser = argparse.ArgumentParser(description='ParSed - a parallel stream editor')
parser.add_argument('-i', '--input', nargs="+", help='Name of input file(s) to apply filters to')
parser.add_argument('-o', '--output', nargs="*", h... | gpl-3.0 |
markandrewj/pygments | pygments/lexers/_mapping.py | 1 | 29086 | # -*- coding: utf-8 -*-
"""
pygments.lexers._mapping
~~~~~~~~~~~~~~~~~~~~~~~~
Lexer mapping defintions. This file is generated by itself. Everytime
you change something on a builtin lexer defintion, run this script from
the lexers folder to update it.
Do not alter the LEXERS dictionary by hand... | bsd-2-clause |
uditagarwal/tastypie | tests/validation/api/resources.py | 40 | 1609 | from django.contrib.auth.models import User
from tastypie import fields
from tastypie.constants import ALL
from tastypie.resources import ModelResource
from tastypie.authorization import Authorization
from basic.models import Note, AnnotatedNote, UserForm
from django import forms
from tastypie.validation import FormVal... | bsd-3-clause |
kingvuplus/EGAMI-Base | tests/test_timer.py | 56 | 2581 | import enigma
import sys
import time
import tests
#enigma.reset()
def test_timer(repeat = 0, timer_start = 3600, timer_length = 1000, sim_length = 86400 * 7):
import NavigationInstance
at = time.time()
t = NavigationInstance.instance.RecordTimer
print t
print "old mwt:", t.MaxWaitTime
t.MaxWaitTime = 86400 *... | gpl-2.0 |
vossman/ctfeval | ctfevalgui.py | 1 | 14349 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.6.8 on Thu May 8 09:51:21 2014
#
import os
import wx
import numpy
from PIL import Image
from pyami import mrc
from pyami import imagefun
from pyami.Entry import FloatEntry
from appionlib.apCtf import ctfdisplay
# begin wxGlade: dependencies
# e... | apache-2.0 |
loop1024/pymo-global | android/pgs4a-0.9.6/python-install/lib/python2.7/bsddb/test/test_distributed_transactions.py | 39 | 5161 | """TestCases for distributed transactions.
"""
import os
import unittest
from test_all import db, test_support, get_new_environment_path, \
get_new_database_path
try :
a=set()
except : # Python 2.3
from sets import Set as set
else :
del a
from test_all import verbose
#--------------------------... | mit |
jfterpstra/bluebottle | bluebottle/recurring_donations/models.py | 1 | 3640 | from django.conf import settings
from django.db import models
from django_extensions.db.fields import CreationDateTimeField, \
ModificationDateTimeField
from localflavor.generic.models import IBANField, BICField
from django.utils.translation import ugettext as _
class MonthlyDonor(models.Model):
"""
Info... | bsd-3-clause |
lberruti/ansible | plugins/inventory/digital_ocean.py | 63 | 19887 | #!/usr/bin/env python
'''
DigitalOcean external inventory script
======================================
Generates Ansible inventory of DigitalOcean Droplets.
In addition to the --list and --host options used by Ansible, there are options
for generating JSON of other DigitalOcean data. This is useful when creating
d... | gpl-3.0 |
keimlink/django-cms | cms/admin/views.py | 4 | 2342 | # -*- coding: utf-8 -*-
from django.http import Http404
from django.shortcuts import get_object_or_404
from cms.models import Page, Title, CMSPlugin, Placeholder
def revert_plugins(request, version_id, obj):
from cms.utils.reversion_hacks import Version
version = get_object_or_404(Version, pk=version_id)
... | bsd-3-clause |
MrSurly/micropython | tests/basics/with_return.py | 82 | 1239 | class CtxMgr:
def __init__(self, id):
self.id = id
def __enter__(self):
print("__enter__", self.id)
return self
def __exit__(self, a, b, c):
print("__exit__", self.id, repr(a), repr(b))
# simple case
def foo():
with CtxMgr(1):
return 4
print(foo())
# for loop ... | mit |
pawelld/webias | webias/gnosis/xml/pickle/test/test_setstate.py | 3 | 1462 | """
Show that __setstate__ works by pickling the random.Random class --fpm
Note: python-2.0 lacks random, so I need another testcase for completeness
"""
import gnosis.xml.pickle as xml_pickle
import sys, random, pickle
from gnosis.xml.pickle.util import setParanoia
import funcs
funcs.set_parser()
class foo: pass
f... | agpl-3.0 |
YosefLab/scVI | scvi/core/modules/classifier.py | 1 | 1616 | from torch import nn as nn
from ._base import FCLayers
class Classifier(nn.Module):
"""
Basic fully-connected NN classifier
Parameters
----------
n_input
Number of input dimensions
n_hidden
Number of hidden nodes in hidden layer
n_labels
Numput of outputs dimensi... | bsd-3-clause |
blochaou/eshopwecan | shopping/admin.py | 1 | 1455 | from django.contrib import admin
from .models import Categorie,Marque,Product,Word
# Register your models here.
class MarqueAdmin(admin.ModelAdmin):
list_display = ('name', 'slug', 'image','is_home_display','date_creation','date_update',)
list_filter = ('name', )
search_fields = ('name', )
prepopulated... | gpl-3.0 |
MiltosD/CEF-ELRC | lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/errcheck.py | 623 | 3522 | """
Error checking functions for GEOS ctypes prototype functions.
"""
import os
from ctypes import c_void_p, string_at, CDLL
from django.contrib.gis.geos.error import GEOSException
from django.contrib.gis.geos.libgeos import GEOS_VERSION
from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc
# Getting the... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.