code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
"""distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library...
Symmetry-Innovations-Pty-Ltd/Python-2.7-for-QNX6.5.0-x86
usr/pkg/lib/python2.7/distutils/unixccompiler.py
Python
mit
14,430
# -*- coding: utf-8 -*- import os def filedir(): print u'我在这个目录:',os.getcwdu() cwd = os.getcwdu() print u'这个目录包含',os.listdir(cwd) filelist = os.listdir(cwd) L=[] for item in filelist: if os.path.isfile(item): L.append(item) print u'这个目录下的文件有',L def pythonpath(): py =...
inkfountain/learn-py-a-little
lesson_os/practiceOS_2.py
Python
gpl-2.0
726
__author__ = 'mdavid' import os import sys from unittest import TestLoader, TextTestRunner if __name__ == '__main__': tl = TestLoader() master_test_suite = tl.discover( start_dir=os.getcwd(), pattern='test_*.py', top_level_dir=os.path.join(os.getcwd(), '..') ) result = TextTe...
netkicorp/addressimo
test/run_tests.py
Python
bsd-3-clause
442
import unittest from rowgenerators import get_generator from rowgenerators import parse_app_url, get_cache class TestIssues(unittest.TestCase): def x_test_pass_target_format(self): us = 'file:///Users/eric/Downloads/7908485365090507159.zip#VictimRecords.txt&target_format=csv' u = parse_app_url(...
CivicKnowledge/rowgenerators
rowgenerators/test/test_issues.py
Python
mit
556
# -*- coding: utf-8 -*- import pprint from datetime import datetime class BaseResponse(dict): class assertRaises: def __init__(self, expected, expected_regexp=None): self.expected = expected self.failureException = AssertionError self.expected_regexp = expected_regex...
geokrety/geokrety-api
tests/unittests/utils/responses/base.py
Python
gpl-3.0
10,902
# -*- coding: utf-8 -*- """ script to run a local, self contained server python 3.6 or higher required currently is a candidate to use asyncio """ import logging import time import platform from subprocess import Popen, call logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('tailor.launcher') proc...
bitcraft/tailor
run_local.py
Python
gpl-3.0
2,771
#!/usr/bin/env python from __future__ import with_statement import sys import datetime import ConfigParser sys.path.insert(0,"/usr/lib/dialcentral/") import constants import alarm_notify def notify_on_change(): filename = "%s/notification.log" % constants._data_path_ with open(constants._notifier_logpath_, "a...
epage/dialcentral-gtk
src/examples/log_notifier.py
Python
lgpl-2.1
690
# # 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 # ...
eayunstack/neutron
neutron/db/migration/alembic_migrations/versions/newton/expand/67daae611b6e_add_standard_attr_to_qos_policies.py
Python
apache-2.0
978
import decimal from twisted.trial.unittest import SkipTest, TestCase from jsonutil.jsonutil import decoder from jsonutil.jsonutil import encoder class TestSpeedups(TestCase): def test_scanstring(self): if not encoder.c_encode_basestring_ascii: raise SkipTest("no C extension speedups available ...
zookos/jsonutil
jsonutil/test/json_tests/test_speedups.py
Python
gpl-2.0
854
"""Test UniFi Controller.""" from collections import deque from datetime import timedelta import aiounifi from asynctest import Mock, patch import pytest from homeassistant import config_entries from homeassistant.components import unifi from homeassistant.components.unifi.const import ( CONF_CONTROLLER, CONF...
leppa/home-assistant
tests/components/unifi/test_controller.py
Python
apache-2.0
12,269
import astropy, astropy.io.fits as pyfits, numpy, scipy, sys, re,pylab def mypoly(a, x): #n = n terms in fit # float *a = poly terms, # x; = val array y = [1.] t = [x] print 'printing x' print x z=y[0]*t[0] #NORMPOINT = 10000 for i in range(1,len(a)+1): t.app...
deapplegate/wtgpipeline
subarucorr.py
Python
mit
4,836
#!/usr/bin/env python #-*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf8') import xmpp, atexit, json, codecs, re import os.path import schedule class Messenger: """ для общения """ def __init__(self, login, password, onmessage=None): """ конструктор """ self.login = login self.pa...
darviarush/rubin-forms
ex/mishel/mishel.py
Python
bsd-2-clause
6,721
comb= combs.newLoadCombination("ELU001","1.00*G") comb= combs.newLoadCombination("ELU002","1.35*G") comb= combs.newLoadCombination("ELU003","1.00*G + 1.50*SC") comb= combs.newLoadCombination("ELU004","1.00*G + 1.50*SC + 0.90*NV") comb= combs.newLoadCombination("ELU005","1.00*G + 1.50*SC + 0.90*VT") comb= combs.newLoadC...
lcpt/xc
verif/tests/aux/def_hip_elu.py
Python
gpl-3.0
1,780
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # Copyright 2017 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 re...
tst-mswartz/earthenterprise
earth_enterprise/src/server/wsgi/search/plugin/coordinate_search_handler.py
Python
apache-2.0
10,743
# -*- coding: utf-8 -*- # list of priorities that requirements can have PRIORITY_LIST = ['O', 'F', 'D'] # list of types that requirements can have TYPE_LIST = ['F', 'P', 'Q', 'D']
diegoberaldin/PyRequirementManager
src/model/constants.py
Python
gpl-3.0
181
# -*- coding: utf-8 -*- # # Copyright 2016, 2017 dpa-infocom GmbH # # 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 appl...
dpa-newslab/livebridge
livebridge/controldata/controlfile.py
Python
apache-2.0
6,321
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-07 00:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0009_database'), ] operations = [ migrations.AlterField( ...
tjcsl/director
web3/apps/sites/migrations/0010_auto_20161207_0014.py
Python
mit
538
# Copyright 2015 Docker, 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 agree...
metacloud/gilt
gilt/interpolation.py
Python
mit
2,988
############################################################################## # # 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 ...
uclouvain/osis
ddd/logic/encodage_des_notes/encodage/use_case/write/encoder_notes_service.py
Python
agpl-3.0
5,601
#!/usr/bin/env python # Copyright (c) 2015 Tobias Neumann, Philipp Rescheneder. # # This file is part of Slamdunk. # # Slamdunk 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 #...
t-neumann/slamdunk
slamdunk/splash.py
Python
agpl-3.0
22,085
# -*- coding: utf-8 -*- """ spyderplugins is a **namespace package** for spyder plugins """ import pkg_resources pkg_resources.declare_namespace(__name__)
martindurant/conda-manager
spyplugins/__init__.py
Python
mit
156
class KeyGenerator(object): @staticmethod def get_lens_key(lens_details): return "{}_{}".format(lens_details['name'], lens_details['lenstype']) @staticmethod def get_model_key(model_details): return "{}_{}_{}".format(model_details['style'], model_details['name'], model_details['sku'])
stevekew/oakleydb
infra/oakleydb/keygenerator.py
Python
mpl-2.0
320
#coding=utf-8 from flask import render_template, redirect, request, url_for, flash,abort from sqlalchemy import and_,desc,or_ from . import database from ..models import dbs,user_db,users from .forms import DBAddForm from app.main.forms import SearchForm from flask.ext.login import login_required, current_user from con...
linuxyan/opsmanage
app/database/views.py
Python
apache-2.0
4,214
#importing fluxi runs from fluxi.fluxi import Fluxi #initializing a whole Qt application with #a window, movable docks, parameter explorer, debug output window and logging #is so easy fl=Fluxi("Example") #%% print fl._callInMainThread("_test",1,2,x="a") #%% from fluxis_misc import ExecInThread def test(thr): p...
fluxiresearch/fluxi
devtests/test_thread.py
Python
mit
424
from sklearn.ensemble import RandomForestClassifier as RF from sklearn.linear_model import LogisticRegression as LGR from sklearn.ensemble import GradientBoostingClassifier as GBC from sklearn.ensemble import ExtraTreesClassifier as ET from xgboost_multi import XGBC from sklearn import cross_validation from sklearn.cro...
bikash/kaggleCompetition
microsoft malware/Malware_Say_No_To_Overfitting/kaggle_Microsoft_malware_small/model2.py
Python
apache-2.0
5,409
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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/li...
tpaszkowski/quantum
quantum/db/migration/cli.py
Python
apache-2.0
4,201
import unittest import mock import logging import datetime import time import esgfpid.rabbit.asynchronous from esgfpid.rabbit.asynchronous.exceptions import OperationNotAllowed LOGGER = logging.getLogger(__name__) LOGGER.addHandler(logging.NullHandler()) # Test resources: from resources.TESTVALUES import * import res...
IS-ENES-Data/esgf-pid
tests/testcases/rabbit/asyn/rabbit_asynchronous_tests.py
Python
apache-2.0
18,090
# encoding: utf-8 # # # 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divisi...
klahnakoski/SpotManager
vendor/jx_elasticsearch/es52/expressions/suffix_op.py
Python
mpl-2.0
1,103
""" Test compiling and executing using the gdc tool. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to...
timj/scons
test/D/HSTeoh/sconstest-linkingProblem_gdc.py
Python
mit
1,375
import os, sys import atexit import optparse import signal import logging import gc from dpark.rdd import * from dpark.accumulator import Accumulator from dpark.schedule import LocalScheduler, MultiProcessScheduler, MesosScheduler from dpark.env import env from dpark.moosefs import walk from dpark.tabular import Tabul...
fe11x/dpark
dpark/context.py
Python
bsd-3-clause
11,856
""" Routes data between subnets and networks. """ from networkdevice import NetworkDevice from ethernet import Ethernet from packet import Packet from exceptions import DiscoveryFailure from warnings import warn from threading import Thread class Router(NetworkDevice): def __init__(self, **kwargs): if n...
unazed/PyT
router.py
Python
gpl-3.0
880
# Principal Component Analysis Code : from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud from pylab import * import numpy as np import matplotlib.pyplot as pp #from enthought.mayavi import mlab import scipy.ndimage as ni import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import ro...
tapomayukh/projects_in_python
classification/Classification_with_kNN/Single_Contact_Classification/Final/results/2-categories/test10_cross_validate_categories_mov_fixed_1200ms.py
Python
mit
4,331
""" Handle basic SQLite 3 functions here, presenting a unified interface that other DBs could also follow to be transparently replaced (except for SQL differences). """ import sqlite3 def Connect(database_path): """Returns sqlite3 Database Connection object.""" # Connect, parse the column names and the data t...
ghowland/slicuist
scripts/database/sqlite_wrapper.py
Python
mit
1,572
#!/usr/bin/env python #-*-indent-tabs-mode: nil-*- import sys import os.path import gi from gi.repository import Gtk, Gio SCHEMAS = "org.sagarmatha.desklets.launcher" LAUNCHER_KEY = "launcher-list" HOME_DIR = os.path.expanduser("~")+"/" CUSTOM_LAUNCHERS_PATH = HOME_DIR + ".sagarmatha/panel-launchers/" EDITOR_DIALOG...
chitwanix/Sagarmatha
files/usr/share/sagarmatha/desklets/launcher@sagarmatha.org/editorDialog.py
Python
gpl-2.0
8,184
#!/usr/bin/env python # # Copyright (C) 2015--2016, the ximpol team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU GengReral Public Licensese as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later versio...
lucabaldini/ximpol
ximpol/examples/grb_swift_mdp.py
Python
gpl-3.0
13,622
# encoding: utf8 """Collection of small functions and scraps of data that don't belong in the pokedex core -- either because they're inherently Web-related, or because they're very flavorful and don't belong or fit well in a database. """ from __future__ import absolute_import, division import math import re from ite...
Sanqui/spline-pokedex
splinext/pokedex/helpers.py
Python
mit
19,255
'''Viewer widgets ================= Defines widgets used with the :mod:`~ceed.view` module. These widgets are used to control and display the experiment on screen, both when playing the experiment for preview and when playing the experiment full-screen in a second process. ''' from time import perf_counter from typing...
matham/Ceed
ceed/view/view_widgets.py
Python
mit
5,758
from waflib import Utils from waflib.Configure import conf from samba_utils import get_string done = {} @conf def SAMBA_CHECK_PERL(conf, mandatory=True, version=(5,0,0)): if "done" in done: return done["done"] = True conf.find_program('perl', var='PERL', mandatory=mandatory) conf.load('perl') ...
kernevil/samba
buildtools/wafsamba/samba_perl.py
Python
gpl-3.0
2,115
# # Copyright (c) 2008-2015 Citrix 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 l...
benfinke/ns_python
nssrc/com/citrix/netscaler/nitro/resource/config/lb/lbvserver_cmppolicy_binding.py
Python
apache-2.0
10,917
from ..models import Developer from os.path import dirname, join from leancloud import Object from application.common.util import post_panel_data from flask import Blueprint, render_template, request, session, redirect, url_for, json panel = Blueprint('panel', __name__, template_folder='templates') Installation = Obj...
petchat/senz.dashboard.backend
application/views/panel.py
Python
mit
2,465
import unittest from ebird.api.validation import is_subnational2 class IsSubnational2Tests(unittest.TestCase): """Tests for the is_subnational2 validation function.""" def test_is_subnational2(self): self.assertTrue(is_subnational2("US-NV-11")) def test_invalid_code_is_not_subnational2(self): ...
ProjectBabbler/ebird-api
tests/validation/test_is_subnational2.py
Python
mit
676
import unittest from rest_framework_cache.utils import get_cache_key, get_all_cache_keys from rest_framework_cache.registry import cache_registry from .models import TestModel from .serializers import TestSerializer class GetCacheKeyTestCase(unittest.TestCase): def test_ok(self): instance = TestModel()...
ervilis/django-rest-framework-cache
tests/tests_utils.py
Python
gpl-3.0
929
#!/usr/bin/env python3 """ Created on 4 Mar 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ from scs_core.aqcsv.specification.mpc import MPC from scs_core.data.json import JSONify # -----------------------------------------------------------------------------------------------------------------...
south-coast-science/scs_core
tests/aqcsv/specification/mpc_test.py
Python
mit
761
# -*- coding: utf-8 -*- """ *************************************************************************** v_net_path.py --------------------- Date : December 2015 Copyright : (C) 2015 by Médéric Ribreux Email : medspx at medspx dot fr ************************...
sebastic/QGIS
python/plugins/processing/algs/grass7/ext/v_net_path.py
Python
gpl-2.0
1,206
# -*- coding: utf-8 -*- """ @author: Tobias Krauss """ from lib.Instruction import Instruction import lib.PseudoInstruction as PI import lib.StartVal as SV from lib.PseudoInstruction import (PseudoInstruction, PseudoOperand) from lib.Register import (get_reg_class, ...
anatolikalysch/VMAttack
lib/VmInstruction.py
Python
mit
33,455
__all__ = ["Capabilities", \ "Switches"] from browser.status import * from base.bind import Bind from base.log import VLOG class Switches(object): def __init__(self): self.switch_map = {} def SetSwitch(self, name, value=""): self.switch_map[name] = value # In case of same key, |switches| w...
PeterWangIntel/crosswalk-webdriver-python
misc/capabilities.py
Python
bsd-3-clause
13,867
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Now with 30% more starch. """ from __future__ import generators import hmac from zope import interface from twisted.trial import unittest from twisted.cred import portal, checkers, credentials, error from twisted.python import com...
tquilian/exeNext
twisted/test/test_newcred.py
Python
gpl-2.0
13,850
# -*- coding: utf-8 -*- from __future__ import print_function from contextlib import contextmanager import re from cartouche._portability import u from .errors import CartoucheError from .nodes import (Node, Raises, Except, Note, Warning, Returns, Arg, Yields, Attribute, Usage, ensure_terminal_bl...
rob-smallshire/cartouche
cartouche/parser.py
Python
bsd-3-clause
17,022
import socket import IPython import datetime import logging import random import threading import struct import time import sys import os # logging formatter="%(asctime)s %(levelname)-12s %(message)s" # to file log_filename="log_"+datetime.datetime.strftime(datetime.datetime.now(), '%Y-%m-%d.%H.%M.%S....
solvery/lang-features
python/case/case.dkm_api_sender_tcp_1/dkm_api_sender_tcp_interact.py
Python
gpl-2.0
2,422
import os from datetime import date from unittest import skipUnless from django.apps import apps from django.conf import settings from django.contrib.sitemaps import Sitemap from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.test import modify_settings, ove...
ifduyue/django
tests/sitemaps_tests/test_http.py
Python
bsd-3-clause
12,772
"""Testcases for cssutils.css.CSSCharsetRule""" __version__ = '$Id: test_csscharsetrule.py 1356 2008-07-13 17:29:09Z cthedot $' import sys import xml.dom import basetest from cssutils.prodparser import * from cssutils.prodparser import ParseError, Done, Exhausted, NoMatch # not in __all__ class ProdTestCase(...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/cssutils/tests/test_prodparser.py
Python
agpl-3.0
15,466
import pytest import six from mock import call, patch from tests import utils from week_parser.base import parse_row, parse_week, populate_extra_data from week_parser.main import PrettyPrinter def test_populate_extra_data_no_days(): """ If we haven't found any days data, there is not extra data to add ""...
JoseKilo/week_parser
tests/unit/test_week_parser.py
Python
mit
5,936
"""Tests for the Whois integration."""
rohitranjan1991/home-assistant
tests/components/whois/__init__.py
Python
mit
39
from PyQt4 import QtGui from Orange.data import Table from Orange.widgets import gui, widget from Orange.widgets.settings import Setting from Orange.preprocess.remove import Remove class OWPurgeDomain(widget.OWWidget): name = "Purge Domain" description = "Remove redundant values and features from the data se...
hugobuddel/orange3
Orange/widgets/data/owpurgedomain.py
Python
gpl-3.0
4,905
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('changeset', '0021_auto_20160222_2345'), ] operations = [ migrations.AlterField( model_name='suspicionreasons', ...
batpad/osmcha-django
osmchadjango/changeset/migrations/0022_auto_20160222_2358.py
Python
gpl-3.0
428
#!/usr/bin/python ############################################################################################## # Copyright (C) 2014 Pier Luigi Ventre - (Consortium GARR and University of Rome "Tor Vergata") # Copyright (C) 2014 Giuseppe Siracusano, Stefano Salsano - (CNIT and University of Rome "Tor Vergata") # www....
netgroup/Dreamer-Topology-Parser
topo_parser_utils.py
Python
apache-2.0
1,368
import pytest import os from mock import patch, call, Mock, MagicMock import blt.environment as env class Commands(env.Commander): def visible_command(self): pass def _hidden_command(self): pass # -- Set Fixtures ------------------------------------------------------------- @pytest.fixture d...
dencold/blt
blt/test/test_environment.py
Python
mit
2,376
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), 'libs/')) sys.path.append(os.path.join(os.path.dirname(__file__), '.'))
Praxyk/Praxyk-DevOps
server/_fix_path_.py
Python
gpl-2.0
150
# Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only from pkg_resources import resource_filename import marv_node.testing from marv_node.testing import make_dataset, run_nodes, temporary_directory from marv_robotics.detail import bagmeta_table as node from marv_store import Store class TestCa...
ternaris/marv-robotics
code/marv/marv_node/testing/_robotics_tests/test_widget_bagmeta_table.py
Python
agpl-3.0
954
from datetime import ( datetime, timedelta, ) import re import numpy as np import pytest from pandas import ( Index, NaT, Timedelta, TimedeltaIndex, Timestamp, notna, timedelta_range, to_timedelta, ) import pandas._testing as tm class TestGetItem: def test_ellipsis(self):...
jorisvandenbossche/pandas
pandas/tests/indexes/timedeltas/test_indexing.py
Python
bsd-3-clause
12,228
""" Stub version control system, for testing purposes """ from __future__ import print_function from rez.release_vcs import ReleaseVCS from rez.utils.logging_ import print_warning from rez.utils.yaml import dump_yaml from rez.vendor import yaml import os.path import time class StubReleaseVCS(ReleaseVCS): """A re...
cwmartin/rez
src/rezplugins/release_vcs/stub.py
Python
lgpl-3.0
3,019
from distutils.core import setup setup( name='django-submodel', version='0.1', license='MIT', author='Li Meng', author_email='liokmkoil@gmail.com', packages=['submodel'], description='A Django model field which value works like a model instance and supports seamless inline editing in Django...
liokm/django-submodel
setup.py
Python
mit
885
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime #from lib_output import * from collections import defaultdict # converts a string in the format dd/mm/yyyy to python datetime def str_date_to_datetime(str_date): return datetime.datetime.strptime(str_date, '%d/%m/%Y') # converts a timestamp to a sting i...
ufeslabic/parse-facebook
lib_time.py
Python
mit
3,565
import os module = None for module in os.listdir(os.path.dirname(__file__)): if module == '__init__.py' or module[-3:] != '.py': continue __import__(module[:-3], locals(), globals()) del module
sdgdsffdsfff/redis-ctl
models/__init__.py
Python
mit
211
"""Contains all available scenarios in Flow.""" # base scenario class from flow.scenarios.base_scenario import Scenario # custom scenarios from flow.scenarios.bay_bridge import BayBridgeScenario from flow.scenarios.bay_bridge_toll import BayBridgeTollScenario from flow.scenarios.bottleneck import BottleneckScenario f...
cathywu/flow
flow/scenarios/__init__.py
Python
mit
1,017
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku ''' from __future__ import absolute_import, unicode_literals from boto.s3.connection import OrdinaryCallingFormat from django.util...
EricZaporzan/evention
config/settings/production.py
Python
mit
6,730
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of cha...
KEHANG/RMG-Py
rmgpy/thermo/thermodataTest.py
Python
mit
11,500
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2012 Zhang ZY<http://idupx.blogspot.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/L...
bufferx/tns
setup.py
Python
apache-2.0
2,220
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import unslug from openerp.tools import DEFAULT_SERVER_DATE_FORMAT from openerp.tools.translate import _ import time import werkzeug.urls ...
ingadhoc/odoo
addons/website_membership/controllers/main.py
Python
agpl-3.0
9,436
from screenlets.options import ColorOption, IntOption fft = True peak_heights = [ 0 for i in range( 256 ) ] peak_acceleration = [ 0.0 for i in range( 256 ) ] bar_color = ( 0.75, 0.75, 0.75, 0.65 ) bg_color = ( 0.25, 0.25, 0.25, 0.65 ) peak_color = ( 1.0, 1.0, 1.0, 0.8 ) n_cols = 15 col_width = 16 col_spacing = 1 n...
kb3dow/dotfiles
conky/ConkyBar/Impulse/Themes/default/__init__.py
Python
gpl-3.0
3,535
# -*- Encoding: utf-8 -*- ### # Copyright (c) 2005, Daniel DiPaolo # 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, # ...
bnrubin/ubuntu-bots
Lart/__init__.py
Python
gpl-2.0
2,491
#!/usr/bin/env python def compteVrais( *liste ): compte = 0 for i in liste: if i: compte += 1 return compte plageValeurs = ( True, False ) print( "XOR - 2 opérandes" ) for a in plageValeurs: for b in plageValeurs: print( "%s ^ %s = %s"%( a, b, a^b ) ) print( "\nXOR - 3 opérandes" ) for a in plageVal...
EricMinso/Scripts
ExemplesPython/xor-test.py
Python
gpl-3.0
749
#!/usr/bin/env python from __future__ import print_function import sys, textwrap print() print("# The tool was invoked with these arguments:") print("# " + "\n# ".join(textwrap.wrap(str(sys.argv[1:]))))
timodonnell/sefara
docs/example_tool.py
Python
apache-2.0
205
# This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from itertools import groupby from operator import attrgetter from django.db.models import Q from d...
jorge-marques/shoop
shoop/default_tax/module.py
Python
agpl-3.0
3,217
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('author_app', '0001_initial'), ] operations = [ migrations.CreateModel( name='Book', fields=[ ...
BrotherPhil/django
tests/migrations/migrations_test_apps/alter_fk/book_app/migrations/0001_initial.py
Python
bsd-3-clause
569
""" (c) 2013 Rachel Sanders. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
iromli/Flask-FeatureFlags
flask_featureflags/__init__.py
Python
apache-2.0
5,814
import numpy as np from scipy.stats import skew, kurtosis, shapiro, pearsonr, ansari, mood, levene, fligner, bartlett, mannwhitneyu from scipy.spatial.distance import braycurtis, canberra, chebyshev, cityblock, correlation, cosine, euclidean, hamming, jaccard, kulsinski, matching, russellrao, sqeuclidean from sklearn.p...
diogo149/autocause
autocause/autocause_settings.py
Python
mit
7,414
# Copyright (c) 2014 Red Hat, 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 wri...
rackerlabs/marconi
marconi/queues/storage/sqlalchemy/options.py
Python
apache-2.0
856
class Solution(object): def subsets(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ result = [] do_subsets(nums, 0, [], result) return result def do_subsets(nums, i, bk, result): if i == len(nums): result.append(bk) retu...
kingsamchen/Eureka
crack-data-structures-and-algorithms/leetcode/subsets_q78.py
Python
mit
750
from django.conf import settings from django.utils import translation from geotrek.tourism import models as tourism_models from geotrek.tourism.views import TouristicContentViewSet, TouristicEventViewSet from geotrek.trekking.management.commands.sync_rando import Command as BaseCommand # Register mapentity models fro...
johan--/Geotrek
geotrek/tourism/management/commands/sync_rando.py
Python
bsd-2-clause
1,966
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # KryPy documentation build configuration file, created by # sphinx-quickstart on Fri Jun 21 17:54:43 2013. # # 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 # autoge...
highlando/krypy
docs/conf.py
Python
mit
8,372
from .Child import Child from .Node import Node # noqa: I201 EXPR_NODES = [ # An inout expression. # &x Node('InOutExpr', kind='Expr', children=[ Child('Ampersand', kind='PrefixAmpersandToken'), Child('Expression', kind='Expr'), ]), # A #column expression. ...
nathawes/swift
utils/gyb_syntax_support/ExprNodes.py
Python
apache-2.0
21,870
#!/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...
pynewb/appengine
appengine101/main.py
Python
mit
3,084
#!/usr/bin/python # (c) 2017, NetApp, 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.0', 'status': ['preview'], ...
Tatsh-ansible/ansible
lib/ansible/modules/storage/netapp/na_cdot_user_role.py
Python
gpl-3.0
6,983
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
hightoon/game_management
bottle.py
Python
mit
148,406
from SubProviders.Subtitle import ISubtitleProvider from SubProviders.Subtitle.ISubtitleProvider import SUBTITLE_PAGES, SUBTITLE_LANGUAGES class SubtitleProvider(ISubtitleProvider.ISubtitleProvider): PROVIDER_NAME = 'English - www.subtitle.co.il' def __init__(self): #Set the language ...
yosi-dediashvili/SubiT
src/SubProviders/Subtitle/eng_SubtitleProvider/SubtitleProvider.py
Python
gpl-3.0
484
# -*- coding: utf-8 -*- from mock import patch from unittest import TestCase from datetime import date, timedelta from django.http import Http404 from django.test import RequestFactory, override_settings from fr_notices.navigation import make_preamble_nav from regulations.generator.layers import diff_applier from re...
18F/regulations-site
regulations/tests/views_preamble_tests.py
Python
cc0-1.0
10,884
import os.path import idb def test_issue29(): """ demonstrate GetManyBytes can retrieve the entire .text section see github issue #29 for the backstory. """ cd = os.path.dirname(__file__) idbpath = os.path.join(cd, "data", "issue29", "issue29.i64") with idb.from_file(idbpath...
williballenthin/python-idb
tests/test_issue29.py
Python
apache-2.0
820
import os import numpy as np import pydotplus as pydotplus from orderedset import OrderedSet from sklearn import tree from collections import OrderedDict from typing import List from npf.build import Build from npf.testie import Testie from npf.types.dataset import Dataset from npf import npf class Statistics: ...
tbarbette/npf
npf/statistics.py
Python
gpl-3.0
4,929
# -*- coding: utf-8 -*- def command(): return "list-load-balancer" def init_argument(parser): parser.add_argument("--farm-no", required=True) def execute(requester, args): farm_no = args.farm_no parameters = {} parameters["FarmNo"] = farm_no return requester.execute("/ListLoadBalancer", par...
primecloud-controller-org/pcc-cli
src/pcc/api/lb/list_load_balancer.py
Python
apache-2.0
329
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0003_new_emailfield_max_length'), ] operations = [ migrations.AddField( model_name='parliamentarysession...
mysociety/pombola
pombola/core/migrations/0004_parliamentarysession_position_title.py
Python
agpl-3.0
460
#!/usr/bin/env python """ @author: dn13(dn13@gmail.com) @author: Fibrizof(dfang84@gmail.com) """ import types def _splitword( text, quotes ): if text[0] in quotes : s = text.find(text[0],1) return text[0], text[1:s], text[s+1:] else : for i in range(len(t...
hackshel/py-aluminium
src/easydoc.py
Python
bsd-3-clause
16,108
""" Write code to make the following unit test pass """
ynonp/python-examples-verint-2016-07
25_exceptions_lab/03.py
Python
mit
57
import _plotly_utils.basevalidators class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="carpet", **kwargs): super(XaxisValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, df...
plotly/plotly.py
packages/python/plotly/plotly/validators/carpet/_xaxis.py
Python
mit
449
######################################################################### # # detectors.py - This file is part of the Spectral Python (SPy) # package. # # Copyright (C) 2012-2013 Thomas Boggs # # Spectral Python is free software; you can redistribute it and/ # or modify it under the terms of the GNU General P...
ohspite/spectral
spectral/algorithms/detectors.py
Python
gpl-2.0
28,119
# # SNMPv1 message syntax # # ASN.1 source from: # http://www.ietf.org/rfc/rfc1157.txt # # Sample captures from: # http://wiki.wireshark.org/SampleCaptures/ # from pyasn1.type import univ, namedtype, namedval, tag, constraint from pyasn1_modules import rfc1155 class Version(univ.Integer): namedValues = namedval.Na...
ychen820/microblog
y/google-cloud-sdk/lib/pyasn1_modules/rfc1157.py
Python
bsd-3-clause
3,285
""" Authors: Damien Irving (irving.damien@gmail.com) Copyright 2015 CSIRO 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...
CWSL/cwsl-mas
cwsl/vt_modules/vt_zonal_agg.py
Python
apache-2.0
3,526
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import os import warnings from pip.basecommand import Command from pip.index import PackageFinder from pip.exceptions import CommandError, PreviousBuildDirError from pip.req import InstallRequirement, RequirementSet, parse_requirements from...
d3banjan/polyamide
webdev/lib/python2.7/site-packages/pip/commands/wheel.py
Python
bsd-2-clause
9,184
""" ViewTemperature class """ # pylint: disable=no-member from chartingperformance import db_session from chartingperformance.views.view import View from chartingperformance.models import TemperatureHourly from chartingperformance.models import HDDHourly from flask import jsonify from sqlalchemy import func from sql...
netplusdesign/home-performance-flask-api
chartingperformance/views/temperature.py
Python
mit
3,516
from __future__ import division import numpy as np from numpy.testing import assert_almost_equal from statsmodels.datasets import star98 from statsmodels.emplike.descriptive import DescStat from .results.el_results import DescStatRes class GenRes(object): """ Reads in the data and creates class instance to b...
waynenilsen/statsmodels
statsmodels/emplike/tests/test_descriptive.py
Python
bsd-3-clause
4,334