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
MadManRises/Madgine
shared/bullet3-2.89/examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_env_randomizer_from_config.py
2
7105
"""An environment randomizer that randomizes physical parameters from config.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import random import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentf...
mit
Randgalt/zookeeper
src/contrib/rest/src/python/zkrest.py
115
7227
# 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
anentropic/django-denorm
denorm/db/base.py
13
4384
from django.db import models, connections, connection from django.contrib.contenttypes.generic import GenericRelation from django.db.models.related import RelatedObject class RandomBigInt(object): def sql(self): raise NotImplementedError class TriggerNestedSelect: def __init__(self, table, columns, ...
bsd-3-clause
after1990s/little_utils
PE_to_shellcode/pefile/pefile.py
2
206872
# -*- coding: Latin-1 -*- """pefile, Portable Executable reader module All the PE file basic structures are available with their default names as attributes of the instance returned. Processed elements such as the import table are made available with lowercase names, to differentiate them from the upper case basic s...
apache-2.0
glouppe/scikit-learn
benchmarks/bench_isotonic.py
268
3046
""" Benchmarks of isotonic regression performance. We generate a synthetic dataset of size 10^n, for n in [min, max], and examine the time taken to run isotonic regression over the dataset. The timings are then output to stdout, or visualized on a log-log scale with matplotlib. This alows the scaling of the algorith...
bsd-3-clause
mscherer/ansible
lib/ansible/plugins/lookup/sequence.py
23
6884
# (c) 2013, Jayson Vantuyl <jayson@aggressive.ly> # # 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 v...
gpl-3.0
sam-m888/gprime
gprime/plugins/lib/librecords.py
1
20750
# encoding:utf-8 # # gPrime - A web-based genealogy program - Records plugin # # Copyright (C) 2008-2011 Reinhard Müller # Copyright (C) 2010 Jakim Friant # Copyright (C) 2013-2016 Paul Franklin # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public ...
gpl-2.0
entropy1337/infernal-twin
Modules/build/pip/build/lib.linux-i686-2.7/pip/locations.py
184
6644
"""Locations where we look for configs, install stuff, etc""" from __future__ import absolute_import import getpass import os import os.path import site import sys from distutils import sysconfig from distutils.command.install import install, SCHEME_KEYS # noqa from pip.compat import WINDOWS from pip.utils import a...
gpl-3.0
oihane/odoomrp-utils
mrp_production_unreserve_movements/models/mrp_production.py
6
3941
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api class MrpProducti...
agpl-3.0
gaddman/ansible
lib/ansible/modules/cloud/google/gcp_sql_database.py
7
9770
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
JioCloud/glance
glance/api/cached_images.py
14
3721
# Copyright 2011 OpenStack Foundation # 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 requ...
apache-2.0
pavel-odintsov/openvz_rhel6_kernel_mirror
tools/perf/util/setup.py
242
1531
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
yencarnacion/jaikuengine
.google_appengine/google/appengine/_internal/django/core/management/commands/makemessages.py
23
14707
import fnmatch import glob import os import re import sys from itertools import dropwhile from optparse import make_option from subprocess import PIPE, Popen from google.appengine._internal.django.core.management.base import CommandError, BaseCommand from google.appengine._internal.django.utils.text import get_text_li...
apache-2.0
hujiajie/chromium-crosswalk
tools/telemetry/telemetry/value/merge_values_unittest.py
10
9217
# 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. import os import unittest from telemetry import story from telemetry import page as page_module from telemetry.value import improvement_direction from teleme...
bsd-3-clause
anbangr/trusted-nova
nova/tests/api/openstack/compute/contrib/test_server_start_stop.py
16
2480
# Copyright (c) 2012 Midokura Japan K.K. # # 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 l...
apache-2.0
tunneln/CarnotKE
jyhton/lib-python/2.7/calendar.py
64
23304
"""Calendar printing functions Note when comparing these calendars to the ones printed by cal(1): By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention). Use setfirstweekday() to set the first day of the week (0=Monday, 6=Sunday).""" import sys import da...
apache-2.0
diego-d5000/MisValesMd
env/lib/python2.7/site-packages/django/conf/locale/ca/formats.py
1
1049
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FO...
mit
littlstar/chromium.src
mojo/public/tools/bindings/pylib/mojom/generate/data_tests.py
104
1946
# 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. import sys import data import test_support EXPECT_EQ = test_support.EXPECT_EQ EXPECT_TRUE = test_support.EXPECT_TRUE RunTest = test_support.RunTest def D...
bsd-3-clause
neerajvashistha/pa-dude
lib/python2.7/site-packages/django/utils/six.py
223
30628
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
mit
aleonliao/depot_tools
third_party/oauth2client/gce.py
224
3038
# Copyright (C) 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
bsd-3-clause
raphaelmerx/django
tests/flatpages_tests/test_sitemaps.py
380
1326
from __future__ import unicode_literals from django.apps import apps from django.contrib.sites.models import Site from django.test import TestCase from django.test.utils import modify_settings, override_settings @override_settings( ROOT_URLCONF='flatpages_tests.urls', SITE_ID=1, ) @modify_settings( INSTA...
bsd-3-clause
Allow2CEO/browser-ios
brave/node_modules/ad-block/node_modules/bloom-filter-cpp/vendor/depot_tools/third_party/pylint/pyreverse/utils.py
67
3752
# Copyright (c) 2002-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, o...
mpl-2.0
Gitdefllo/CrossSudoku
plugins/ti.alloy/plugin.py
1729
5251
import os, sys, subprocess, hashlib import subprocess def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. Backported from Python 2.7 as it's implemented as pure python on stdlib. >>> check_output(['/usr/bin/python', '--version']) Python 2.6....
apache-2.0
MaxTyutyunnikov/lino
lino/management/commands/show.py
1
1890
# -*- coding: UTF-8 -*- ## Copyright 2013 Luc Saffre ## This file is part of the Lino project. ## Lino 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 op...
gpl-3.0
leeseulstack/openstack
neutron/tests/unit/ml2/db/test_ml2_dvr_db.py
14
6655
# Copyright (c) 2014 OpenStack Foundation, 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 applic...
apache-2.0
Jon-ICS/upm
examples/python/otp538u.py
7
2228
#!/usr/bin/python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 limi...
mit
BondAnthony/ansible
test/support/integration/plugins/modules/mongodb_user.py
36
16235
#!/usr/bin/python # (c) 2012, Elliott Foster <elliott@fourkitchens.com> # Sponsored by Four Kitchens http://fourkitchens.com. # (c) 2014, Epic Games, Inc. # # 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 __m...
gpl-3.0
mshirley/dionaea
modules/python/scripts/smb/smb.py
10
22704
#******************************************************************************** #* Dionaea #* - catches bugs - #* #* #* #* Copyright (C) 2010 Markus Koetter & Tan Kean Siong #* Copyright (C) 2009 Paul Baecher & Markus Koetter & Mark Schloesser #* #* This prog...
gpl-2.0
nmartensen/pandas
scripts/file_sizes.py
7
4949
from __future__ import print_function import os import sys import numpy as np import matplotlib.pyplot as plt from pandas import DataFrame from pandas.util.testing import set_trace from pandas import compat dirs = [] names = [] lengths = [] if len(sys.argv) > 1: loc = sys.argv[1] else: loc = '.' walked = os...
bsd-3-clause
ramnes/mongo-python-driver
test/test_database.py
2
34172
# Copyright 2009-2015 MongoDB, 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 in writin...
apache-2.0
jgatkinsn/pyang
pyang/hello.py
7
3677
import xml.parsers.expat NC_NS_URI ="urn:ietf:params:xml:ns:netconf:base:1.0" CAPABILITIES = { "urn:ietf:params:xml:ns:netconf:base:1.0" : "base", "urn:ietf:params:netconf:base:1.1" : "base", "urn:ietf:params:netconf:capability:writable-running:1.0" : "writable-running", "urn:ietf:params:netconf:capabi...
isc
FusionSP/android_external_chromium_org
tools/perf/benchmarks/dom_perf.py
33
3234
# 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. import json import math import os from telemetry import benchmark from telemetry.core import util from telemetry.page import page_set from telemetry.page im...
bsd-3-clause
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/web_infrastructure/htpasswd.py
31
8713
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Nimbis Services, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
bsd-3-clause
vrv/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py
20
22477
# 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
edowson/director
src/python/ddapp/lcmobjectcollection.py
6
4604
import time import pprint import uuid import json from collections import OrderedDict from ddapp import lcmUtils from ddapp.thirdparty import numpyjsoncoder from ddapp import callbacks from ddapp.utime import getUtime from ddapp.uuidutil import newUUID import drc as lcmdrc class LCMObjectCollection(object): DESC...
bsd-3-clause
VigneshMohan1/spark-branch-2.3
examples/src/main/python/mllib/multi_class_metrics_example.py
98
2827
# # 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
jiangjiali66/linux-xlnx
tools/perf/scripts/python/syscall-counts-by-pid.py
1996
2105
# system call counts, by pid # (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, sys sys.path.append(os.env...
gpl-2.0
tklaus/ansible
lib/ansible/utils/hashing.py
202
3125
# (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...
gpl-3.0
yuewko/neutron
neutron/tests/api/base_security_groups.py
48
2176
# Copyright 2013 OpenStack Foundation # 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 requ...
apache-2.0
danieljaouen/ansible
lib/ansible/modules/network/eos/eos_l2_interface.py
30
10670
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
hwsyy/scrapy
scrapy/commands/runspider.py
109
3523
import sys import os from importlib import import_module from scrapy.utils.spider import iter_spider_classes from scrapy.commands import ScrapyCommand from scrapy.exceptions import UsageError from scrapy.utils.conf import arglist_to_dict def _import_file(filepath): abspath = os.path.abspath(filepath) dirname...
bsd-3-clause
kushG/osf.io
scripts/consistency/find_bad_registrations.py
64
1244
""" """ from website.app import init_app from website import models from framework import Q app = init_app() known_schemas = [ 'Open-Ended_Registration', 'OSF-Standard_Pre-Data_Collection_Registration', 'Replication_Recipe_(Brandt_et_al__!dot!__,_2013):_Pre-Registration', 'Replication_Recipe_(Brandt...
apache-2.0
relango/kafka
system_test/utils/kafka_system_test_utils.py
15
118706
# 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...
apache-2.0
blinktrade/bitex
tools/arbitrage/arbitrator.py
9
5468
import os import sys ROOT_PATH = os.path.abspath( os.path.join(os.path.dirname(__file__), "../../")) sys.path.insert( 0, os.path.join(ROOT_PATH, 'libs')) from order_book_processor import OrderBookProcessor from util import get_funded_entries, aggregate_orders from pyblinktrade.signals import Signal from client impor...
gpl-3.0
metasmile/awesome-strings
raw/chromium/grit/grit/tool/buildinfo.py
62
2380
#!/usr/bin/env python # 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. """Output the list of files to be generated by GRIT from an input. """ import getopt import os from grit import grd_reader from g...
mit
botswana-harvard/getresults-label
getresults_label/classes/client_printer.py
1
1707
import socket from ..exceptions import LabelPrinterError from ..models import Client, LabelPrinter from .printer import Printer class ClientPrinter(Printer): """Sets up the printer by selecting an instance of the Client model for a given IP address. Args: * client_addr: ip_address or hostname. cl...
gpl-2.0
kernsuite-debian/obit
bin/obitinclude.py
1
1077
#!python # Script to run gcc preprocessor on files whose name ends in "Def.h" # or echo the file contents otherwise # File name is only argument import os, sys # Routine to recursively read include def parseInclude(lline): fname = lline.split()[1].replace('"','') infil = os.getenv("OBIT")+"include/"+fname ...
gpl-2.0
nvictus/23andCSB
apps/api/views.py
1
3339
from django.http import HttpResponse from django.shortcuts import redirect import json import logging log = logging.getLogger("apidemo") # import our OAuth client from . import client # view decorator def requires_login(view_fcn): def wrapper(request, *args, **kwargs): if client.OAUTH_KEY in request.sess...
bsd-2-clause
javivi001/OctoPrint
src/octoprint/plugins/softwareupdate/version_checks/commandline.py
37
1727
# coding=utf-8 from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging from ..exce...
agpl-3.0
Tkkg1994/IronKernel
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
martinling/imusim
imusim/tests/maths/ukf_test.py
2
3896
""" Tests for unscented Kalman filter implementation. """ # Copyright (C) 2009-2011 University of Edinburgh # # This file is part of IMUSim. # # IMUSim 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 ve...
gpl-3.0
minhtuancn/odoo
addons/account_anglo_saxon/__openerp__.py
264
2393
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
opencloudinfra/orchestrator
venv/Lib/site-packages/django/test/testcases.py
49
58071
from __future__ import unicode_literals import difflib import errno import json import os import posixpath import socket import sys import threading import unittest import warnings from collections import Counter from contextlib import contextmanager from copy import copy from functools import wraps from unittest.util...
gpl-3.0
pyload/pyload
src/pyload/plugins/base/xfs_account.py
1
7673
# -*- coding: utf-8 -*- import locale import re import time import urllib.parse from pyload.core.utils import parse from ..helpers import parse_html_form, set_cookie, search_pattern from .account import BaseAccount class XFSAccount(BaseAccount): __name__ = "XFSAccount" __type__ = "account" __version__ ...
agpl-3.0
malthe/google-protobuf
python/google/protobuf/internal/wire_format_test.py
3
10823
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
bsd-3-clause
brianrogers/TCEmailConnector
main.py
1
1540
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
mit
cntnboys/cmput410-project
venv/lib/python2.7/site-packages/setuptools/tests/test_easy_install.py
16
14292
"""Easy install Tests """ from __future__ import absolute_import import sys import os import shutil import tempfile import site import contextlib import tarfile import logging import itertools import pytest import mock from setuptools import sandbox from setuptools.compat import StringIO, BytesIO, urlparse from setu...
apache-2.0
hsaputra/tensorflow
tensorflow/contrib/linear_optimizer/python/kernel_tests/sdca_ops_test.py
76
42292
# 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
MichaelNedzelsky/intellij-community
python/lib/Lib/site-packages/django/contrib/localflavor/mx/mx_states.py
350
1251
# -*- coding: utf-8 -*- """ A list of Mexican states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from django.utils.translation import ugettext_lazy as _ STATE_CHOICES = ( ('AGU', _(u'Aguascalientes')), ('BCN', _(u...
apache-2.0
jakobkolb/MayaSim
mayasim/model/ModelCore.py
1
66303
from __future__ import print_function import datetime import operator import os import sys import traceback import warnings from itertools import compress import networkx as nx import numpy as np import pandas import pkg_resources import scipy.ndimage as ndimage import scipy.sparse as sparse try: import cPickle ...
gpl-3.0
lokeshjindal15/pd-gem5
src/arch/x86/isa/insts/x87/control/initialize.py
91
2159
# 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...
bsd-3-clause
MarshedOut/android_external_skia
tools/skp/page_sets/skia_css3gradients_desktop.py
33
1386
# 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. # pylint: disable=W0401,W0614 from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class SkiaBuildbotDesk...
bsd-3-clause
darmaa/odoo
addons/purchase/report/__init__.py
380
1070
# -*- 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
GaetanCambier/CouchPotatoServer
couchpotato/core/media/movie/providers/info/fanarttv.py
64
4060
import traceback from couchpotato import tryInt from couchpotato.core.event import addEvent from couchpotato.core.logger import CPLog from couchpotato.core.media.movie.providers.base import MovieProvider from requests import HTTPError log = CPLog(__name__) autoload = 'FanartTV' class FanartTV(MovieProvider): ...
gpl-3.0
hgrif/incubator-airflow
tests/contrib/operators/test_ssh_operator.py
10
3522
# -*- 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
recifeorganico/MITMf
core/sslstrip/ServerConnectionFactory.py
26
1930
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati # # 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...
gpl-3.0
AOKP/external_chromium_org
chrome/common/extensions/docs/server2/test_branch_utility.py
26
1398
# 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 branch_utility import BranchUtility, ChannelInfo from test_data.canned_data import (CANNED_BRANCHES, CANNED_CHANNELS) class TestBranchUtility(object): ...
bsd-3-clause
BioXiao/chimerascan
chimerascan/deprecated/estimate_fragment_length_distribution.py
6
6774
''' Created on Apr 29, 2011 @author: mkiyer chimerascan: chimeric transcript discovery using RNA-seq Copyright (C) 2011 Matthew Iyer 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 ...
gpl-3.0
tapomayukh/projects_in_python
rapid_categorization/haptic_map/outlier/hmm_crossvalidation_force.py
1
19066
# Hidden Markov Model Implementation import pylab as pyl import numpy as np import matplotlib.pyplot as pp #from enthought.mayavi import mlab import scipy as scp import scipy.ndimage as ni import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import rospy #import hrl_lib.mayavi2_util as mu import hrl_lib.viz ...
mit
nyuwireless/ns3-mmwave
.waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7/waflib/Tools/compiler_d.py
11
1402
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,sys,imp,types,re from waflib import Utils,Configure,Options,Logs d_compiler={'default':['gdc','dmd','ldc2']} def default_compilers(): build_platform=Utils.unversioned_sys_platform() possi...
gpl-2.0
mapr/hue
desktop/core/ext-py/PyYAML-3.09/tests/lib3/test_resolver.py
62
3298
import yaml import pprint def test_implicit_resolver(data_filename, detect_filename, verbose=False): correct_tag = None node = None try: correct_tag = open(detect_filename, 'r').read().strip() node = yaml.compose(open(data_filename, 'rb')) assert isinstance(node, yaml.SequenceNode)...
apache-2.0
antivirtel/Flexget
flexget/plugins/urlrewrite_isohunt.py
13
3509
from __future__ import unicode_literals, division, absolute_import import logging import re import urllib import feedparser from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.search import torrent_availability, normalize_unicode log = logging.getLogger('isoh...
mit
benzkji/django-cms
cms/context_processors.py
4
1027
# -*- coding: utf-8 -*- from django.utils import lru_cache from django.utils.functional import lazy from cms.utils.conf import get_cms_setting from cms.utils.page import get_page_template_from_request def cms_settings(request): """ Adds cms-related variables to the context. """ from menus.menu_pool i...
bsd-3-clause
alianmohammad/pd-gem5
src/arch/x86/isa/insts/simd64/floating_point/arithmetic/addition.py
91
2150
# 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...
bsd-3-clause
kenshay/ImageScript
Script_Runner/PYTHON/Lib/lib2to3/fixes/fix_next.py
203
3174
"""Fixer for it.next() -> next(it), per PEP 3114.""" # Author: Collin Winter # Things that currently aren't covered: # - listcomp "next" names aren't warned # - "with" statement targets aren't checked # Local imports from ..pgen2 import token from ..pygram import python_symbols as syms from .. import fixer_base f...
gpl-3.0
percy-g2/Novathor_xperia_u8500
6.1.1.B.0.253/external/webkit/Tools/Scripts/webkitpy/common/config/ports_unittest.py
15
4509
#!/usr/bin/env python # 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 lis...
gpl-2.0
rwl/muntjac
muntjac/demo/sampler/features/embedded/ImageEmbed.py
1
1210
from muntjac.demo.sampler.features.embedded.FlashEmbed import FlashEmbed from muntjac.demo.sampler.APIResource import APIResource from muntjac.demo.sampler.features.embedded.WebEmbed import WebEmbed from muntjac.demo.sampler.Feature import Feature, Version from muntjac.ui.embedded import Embedded from muntjac.terminal...
apache-2.0
KhronosGroup/COLLADA-CTS
StandardDataSets/1_5/collada/library_effects/effect/profile_COMMON/technique/blinn/transparent/effect_blinn_transparent_rgb_zero/effect_blinn_transparent_rgb_zero.py
2
6534
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
mit
Moulde/django-extensions
django_extensions/management/commands/runjob.py
28
1938
from optparse import make_option from django.core.management.base import LabelCommand from django_extensions.management.jobs import get_job, print_jobs from django_extensions.management.utils import signalcommand class Command(LabelCommand): option_list = LabelCommand.option_list + ( make_option('--list...
mit
willingc/oh-mainline
vendor/packages/irc/scripts/testbot.py
13
3565
#! /usr/bin/env python # # Example program using irc.bot. # # Joel Rosdahl <joel@rosdahl.net> """A simple example bot. This is an example bot that uses the SingleServerIRCBot class from irc.bot. The bot enters a channel and listens for commands in private messages and channel traffic. Commands in channel messages a...
agpl-3.0
rksaxena/hacker_ramp
scoring.py
1
2740
import find_overlap scores = { 'zara': 0.5, 'vogue': 0.5, 'google': 0.5 } def find_keyword_occurences_in_source(map, source): freq = 0 for key, value in map.iteritems(): for k, v in value.iteritems(): if v['source'] == source: freq += 1 # print freq ret...
apache-2.0
zhaoluxyz/Hugula
Client/tools/site-packages/xlwt/examples/merged1.py
44
1828
#!/usr/bin/env python # -*- coding: windows-1251 -*- # Copyright (C) 2005 Kiseliov Roman from xlwt import * wb = Workbook() ws0 = wb.add_sheet('sheet0') fnt1 = Font() fnt1.name = 'Verdana' fnt1.bold = True fnt1.height = 18*0x14 pat1 = Pattern() pat1.pattern = Pattern.SOLID_PATTERN pat1.pattern_fore_colour = 0x16 b...
mit
heeraj123/oh-mainline
vendor/packages/pytz/pytz/tests/test_tzinfo.py
16
27078
# -*- coding: ascii -*- import sys, os, os.path import unittest, doctest try: import cPickle as pickle except ImportError: import pickle from datetime import datetime, time, timedelta, tzinfo import warnings if __name__ == '__main__': # Only munge path if invoked as a script. Testrunners should have setup...
agpl-3.0
CallaJun/hackprince
indico/numpy/f2py/tests/test_return_character.py
69
3903
from __future__ import division, absolute_import, print_function from numpy.testing import * from numpy import array from numpy.compat import asbytes import util class TestReturnCharacter(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] if tname in ['t0', 't1', 's0', 's1']...
lgpl-3.0
shaftoe/home-assistant
homeassistant/components/zwave/workaround.py
4
3143
"""Zwave workarounds.""" from . import const # Manufacturers FIBARO = 0x010f PHILIO = 0x013c WENZHOU = 0x0118 SOMFY = 0x47 # Product IDs PHILIO_SLIM_SENSOR = 0x0002 PHILIO_3_IN_1_SENSOR_GEN_4 = 0x000d PHILIO_PAN07 = 0x0005 # Product Types FGFS101_FLOOD_SENSOR_TYPE = 0x0b00 FGRM222_SHUTTER2 = 0x0301 FGR222_SHUTTER2 =...
apache-2.0
ryfeus/lambda-packs
pytorch/source/caffe2/python/transformations.py
1
2103
# Copyright (c) 2016-present, Facebook, 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...
mit
crlang/sublime-text---front-end-config
Data/Packages/wakatime/packages/wakatime/packages/pygments/lexers/c_like.py
8
24120
# -*- coding: utf-8 -*- """ pygments.lexers.c_like ~~~~~~~~~~~~~~~~~~~~~~ Lexers for other C-like languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, inherit,...
mit
Teagan42/home-assistant
tests/components/datadog/test_init.py
3
5897
"""The tests for the Datadog component.""" import unittest from unittest import mock import homeassistant.components.datadog as datadog from homeassistant.const import ( EVENT_LOGBOOK_ENTRY, EVENT_STATE_CHANGED, STATE_OFF, STATE_ON, ) import homeassistant.core as ha from homeassistant.setup import setu...
apache-2.0
moijes12/oh-mainline
vendor/packages/twisted/doc/core/examples/wxdemo.py
19
1552
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Demo of wxPython integration with Twisted.""" import sys from wx import Frame, DefaultPosition, Size, Menu, MenuBar, App from wx import EVT_MENU, EVT_CLOSE from twisted.python import log from twisted.internet import wxreactor wxreactor.insta...
agpl-3.0
uchuugaka/anaconda
commands/enable_linting.py
6
1194
# Copyright (C) 2013 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details import sublime_plugin from ..anaconda_lib.helpers import get_settings from ..anaconda_lib.helpers import valid_languages from ..anaconda_lib.linting.sublime import ANACONDA, run_linter cla...
gpl-3.0
UManPychron/pychron
pychron/mdd/tasks/plugin.py
2
2726
# =============================================================================== # Copyright 2018 ross # # 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/LICE...
apache-2.0
Wengex/PyDirectory
pydirectory/activedirectory/objects/types.py
1
3640
from pydirectory.ldap.objects import types class object(types.object): _type = {} class user(object): _type = { 'objectClass' : [b'top', b'person', b'organizationalPerson', b'user'] } @property def is_enable(self): mod = int(self.useraccountcontrol.value) % 8 if mod == 0: return True else: return F...
gpl-2.0
Semi-global/edx-platform
common/djangoapps/student/migrations/0035_access_roles.py
75
19916
# -*- coding: utf-8 -*- from south.v2 import DataMigration import re from opaque_keys.edx.locations import SlashSeparatedCourseKey from opaque_keys import InvalidKeyError import bson.son import logging from django.db.models.query_utils import Q from django.db.utils import IntegrityError from xmodule.modulestore import ...
agpl-3.0
mdblv2/joatu-django
application/site-packages/django/conf/locale/nb/formats.py
107
1585
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATET...
apache-2.0
darkleons/odoo
addons/event/report/__init__.py
435
1079
# -*- 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
wsyzxcn/tornado
tornado/ioloop.py
1
42597
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
ct-23/home-assistant
tests/components/fan/test_zwave.py
21
3122
"""Test Z-Wave fans.""" from homeassistant.components.fan import ( zwave, SPEED_OFF, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH, SUPPORT_SET_SPEED) from tests.mock.zwave import ( MockNode, MockValue, MockEntityValues, value_changed) def test_get_device_detects_fan(mock_openzwave): """Test get_device returns a z...
apache-2.0
shearichard/spellsplash
splsplsh_project/splsplsh_project/settings/HIDE_s_e_t_t_i_n_g_s.py
1
2002
""" Django settings for splsplsh_project project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR...
gpl-3.0
utecuy/edx-platform
common/djangoapps/util/keyword_substitution.py
148
2343
""" keyword_substitution.py Contains utility functions to help substitute keywords in a text body with the appropriate user / course data. Supported: LMS: - %%USER_ID%% => anonymous user id - %%USER_FULLNAME%% => User's full name - %%COURSE_DISPLAY_NAME%% => display name of the course ...
agpl-3.0
cristian99garcia/agubrowser-activity
Modulos/Pantalla_Completa.py
1
3372
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Arma una pantalla completa con la ventana de AguBrowse # Pantalla_Completa.py por: # Agustin Zuiaga <aguszs97@gmail.com> # Python Joven - Utu Rafael Peraza # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Ge...
gpl-2.0