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
import logging import os import unittest from common import requires_binaries_private import archinfo import angr from angr.calling_conventions import ( SimStackArg, SimRegArg, SimCCCdecl, SimCCSystemVAMD64, ) test_location = os.path.join( os.path.dirname(os.path.realpath(str(__file__))), ".."...
angr/angr
tests/test_calling_convention_analysis.py
Python
bsd-2-clause
9,128
import re import numpy as np import pandas as pd import matplotlib.pyplot as plt from .helpers import determine_tag_value, figs_assert, initiate_figs, plot_helper_settings from ..xml_utils import parse def get_tdos(filepath='DOSCAR', ISPIN=None, Ef=None, plot=False, xlim=None, ylim_upper=None, on_figs=None): """ ...
terencezl/pydass_vasp
pydass_vasp/electronic_structure/dos.py
Python
mit
12,658
""" Implements main window of the trading platform. """ import webbrowser from functools import partial from importlib import import_module from typing import Callable, Dict, Tuple import vnpy from vnpy.event import EventEngine from .qt import QtCore, QtGui, QtWidgets from .widget import ( TickMonitor, Order...
vnpy/vnpy
vnpy/trader/ui/mainwindow.py
Python
mit
9,153
import copy from django import template register = template.Library() @register.filter def row_from_record(row, record): row = copy.copy(row) row._record = record return row
OpenTechFund/WebApp
opentech/apply/funds/templatetags/table_tags.py
Python
gpl-2.0
190
import os import re from collections import OrderedDict from django import template def get_styleguide_templates(styleguide_dirs=None): """Walk selected directories and pull out valid filenames""" if not styleguide_dirs: styleguide_dirs = get_styleguide_dirs() template_paths = {} sub_template...
caktus/django-styleguide
styleguide/utils.py
Python
bsd-3-clause
1,941
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
ptisserand/ansible
lib/ansible/module_utils/network/avi/avi.py
Python
gpl-3.0
4,188
import csv dirty_csv = 'dirty_csv.csv' #This is the file you have clean_csv = 'clean_csv.csv' #This is the file python will create with open(dirty_csv) as f: dr = csv.DictReader(f) #Write new dataset fn = dr.fieldnames #Automatically carry the columns over as is. To remove columns or alter the schema, change this...
exversion/data-cleaning-boilerplate
csv-to-csv.py
Python
gpl-2.0
775
# 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 (t...
apache/allura
scripts/perf/load-up-forum.py
Python
apache-2.0
2,632
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
catacgc/ansible-modules-core
cloud/digital_ocean/digital_ocean.py
Python
gpl-3.0
14,076
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eit...
tsdmgz/ansible
lib/ansible/module_utils/azure_rm_common.py
Python
gpl-3.0
34,247
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-09-13 09:06 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('silo', '0027_auto_20170913_0140'), ] operations = ...
toladata/TolaTables
silo/migrations/0028_auto_20170913_0206.py
Python
gpl-2.0
1,152
#!/usr/bin/python # """ Device-specific implementation for Holiday by MooresCloud Homepage and documentation: http://dev.moorescloud.com/ Copyright (c) 2013, Mark Pesce. License: MIT (see LICENSE for details) """ __author__ = 'Mark Pesce' __version__ = '1.0b3' __license__ = 'MIT' import subprocess, time, os import ...
moorescloud/holideck
iotas/devices/moorescloud/holiday/driver.py
Python
mit
17,066
# 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...
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/keystoneclient/v2_0/ec2.py
Python
mit
1,985
from __future__ import unicode_literals import locale import sys #=================================================================================================== # _StreamWrapper #=================================================================================================== class _StreamWrapper(object): ...
Kaniabi/ben10
source/python/ben10/foundation/print_detailed_traceback.py
Python
lgpl-2.1
6,374
# -*- coding: utf-8 -*- from anima.render.arnold import base85 import unittest import struct class Base85TestCase(unittest.TestCase): """tests the base85 module """ def setup(self): """setup the test """ pass def test_arnold_b85_encode_is_working_properly(self): """t...
eoyilmaz/anima
tests/arnold/test_base85.py
Python
mit
5,868
# 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. # # This is a Sphinx extension. # from __future__ import print_function import codecs from collections import namedtuple, OrderedDict import os import strin...
TeamEOS/external_chromium_org
native_client_sdk/src/doc/_sphinxext/chromesite_builder.py
Python
bsd-3-clause
10,484
from unittest import TestCase import networkx as nx import mmln class TestUtil(TestCase): label1 = 'Label 1' label2 = 'Label 2' def test_make_stratified_k_folds(self): net = self._get_network() folds = mmln.make_stratified_k_folds(net, seed=271828) self.assertEqual(len(folds), 2...
stephenbach/mmln
mmln/tests/test_util.py
Python
apache-2.0
1,884
#!/usr/bin/env python """ MultiQC submodule to parse output from RSeQC bam_stat.py http://rseqc.sourceforge.net/#bam-stat-py """ from collections import OrderedDict import logging import re from multiqc import config from multiqc.plots import beeswarm # Initialise the logger log = logging.getLogger(__name__) def ...
ahvigil/MultiQC
multiqc/modules/rseqc/bam_stat.py
Python
gpl-3.0
5,582
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from glob import glob from vlpp.utils import save_json from vlpp.qamosaic import Mosaic def main(): # Usefull directories os.mkdir("data") # Informations participant_id = "${sub.sub}" # Images Path try: anat = glob("${sub.anat}")[0] ...
villeneuvelab/vlpp
pipelines/templates/qa_mosaics_T1w.py
Python
mit
2,115
#!/usr/bin/env python # wikid, Copyright (c) 2010, R. P. Dillon <rpdillon@etherplex.org> # This file is part of wikid. # # wikid 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...
rpdillon/wikid
wikid/wikid.py
Python
gpl-3.0
13,569
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ from __future__ import division import logging imp...
gojomo/gensim
gensim/test/test_word2vec.py
Python
lgpl-2.1
55,488
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2011-2013 GSyC/LibreSoft, Universidad Rey Juan Carlos # # 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 Licens...
pombredanne/RepositoryHandler
setup.py
Python
gpl-2.0
1,225
# while stmt <stmt>while <cond>True: pass e<else>lse: pass
akosyakov/intellij-community
python/testData/psi/parts/While.py
Python
apache-2.0
63
from django.conf.urls import patterns, url from .views import ClassDetail urlpatterns = patterns('cms.test_utils.project.placeholderapp.views', url(r'^detail/(?P<pk>[0-9]+)/$', 'detail_view', name="example_detail"), url(r'^detail_char/(?P<pk>[a-z]+)/$', 'detail_view_char', name="example_detail_char"), url(...
amaozhao/basecms
cms/test_utils/project/placeholderapp/urls.py
Python
mit
460
class Cell(object): def __init__(self, data): self.expected = data self.has_passed = False def __repr__(self): return self.expected def __eq__(self, other): return self.expected == other #.expected def passed(self): self.has_passed = True def failed(self, ...
epronk/pyfit2
plaintypes.py
Python
gpl-2.0
1,081
''' New Integration Test for Multi Nics. @author: Glody ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker.operations.net_operations as net_ops import zstackwoodpecker.operations.resource_operations as...
zstackio/zstack-woodpecker
integrationtest/vm/virtualrouter/test_multi_nic_eip.py
Python
apache-2.0
7,390
#!/usr/bin/python # -*- coding: utf-8 -*- import datetime import json import os import os.path import re import sys import MySQLdb as mdb import ldap3 import pexpect # Run this on iodine.tjhsst.edu start_date = "2015-09-01" csl_realm = "CSL.TJHSST.EDU" host = "iodine.tjhsst.edu" ldap_realm = "CSL.TJHSST.EDU" ldap_...
jacobajit/ion
fixtures/create_fixtures.py
Python
gpl-2.0
7,857
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, tools class MailComposeMessage(models.TransientModel): """Add concept of mass mailing campaign to the mail.compose.message wizard """ _inherit = 'mail.compose.message' ...
Aravinthu/odoo
addons/mass_mailing/wizard/mail_compose_message.py
Python
agpl-3.0
4,560
""" Django settings for whatachore project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import o...
taylorschimek/WhatAChore
whatachore/settings.py
Python
mit
4,616
''' Copyright (C) 2011 Mihnea Dobrescu-Balaur 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, or (at your option) any later version. This program is distributed in ...
mihneadb/suse_bug_reporter
bugreporter/gathering_modules/uname.py
Python
gpl-2.0
1,356
# orm/events.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ORM event interfaces. """ from .. import event, exc, util from .base import _mappe...
olemis/sqlalchemy
lib/sqlalchemy/orm/events.py
Python
mit
70,582
#!/usr/bin/env python3 """Script to run mypy against its own code base.""" import subprocess import sys import tempfile from pathlib import Path MYPY_VERSION = "0.790" if __name__ == "__main__": with tempfile.TemporaryDirectory() as tempdir: dirpath = Path(tempdir) subprocess.run( ["...
dahlstrom-g/intellij-community
python/helpers/typeshed/tests/mypy_self_check.py
Python
apache-2.0
1,287
# This file is part of TRS (http://math.kompiler.org) # # TRS is free software: you can redistribute it and/or modify it under the # terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # TRS is distrib...
smvv/trs
tests/test_rules_integrals.py
Python
agpl-3.0
9,055
"""Tests for the unparse.py script in the Tools/parser directory.""" import unittest import test.support import io import os import random import tokenize import ast from test.test_tools import basepath, toolsdir, skip_if_missing skip_if_missing() parser_path = os.path.join(toolsdir, "parser") with test.support.Di...
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/test/test_tools/test_unparse.py
Python
gpl-2.0
8,393
#!/usr/bin/env python import argparse import binascii import datetime import gzip import json import magic import os import pymongo import sys def read_gzip(filename): with gzip.open(filename) as file: content = file.read() return content def read_plain(filename): with open(filename) as file: ...
ranisalt/moita-migrant
migrant.py
Python
mit
1,377
"""empty message Revision ID: 591df081093e Revises: 623663663ec8 Create Date: 2016-06-15 20:02:13.858000 """ # revision identifiers, used by Alembic. revision = '591df081093e' down_revision = '623663663ec8' from alembic import op import sqlalchemy as sa import sqlalchemy_utils def upgrade(): ### commands auto...
Princu7/open-event-orga-server
migrations/versions/591df081093e_.py
Python
gpl-3.0
918
"""This demo solves the Stokes equations, using quadratic elements for the velocity and first degree elements for the pressure (Taylor-Hood elements). The sub domains for the different boundary conditions used in this simulation are computed by the demo program in src/demo/mesh/subdomains.""" # Copyright (C) 2007 Kris...
MelanieBittl/dolfin
demo/documented/stokes-taylor-hood/python/demo_stokes-taylor-hood.py
Python
gpl-3.0
2,701
import os.path import shlex import re from M2Crypto import SMIME, X509, BIO import time import datetime import logging, logging.config import truststore import StringIO class NullHandler(logging.Handler): def emit(self, record): pass h = NullHandler() logging.getLogger("SmimeX509Validation").addHandler(h...
osynge/deb-python-smimex509validation
smimeX509validation/smimeX509validation.py
Python
apache-2.0
6,740
# coding=utf-8 """Uniform imeout generator: integer uniform distribution .. moduleauthor:: Stéphane Vialette <vialette@gmail.com> """ from .timeoutgenerator import TimeoutGenerator import random class Uniform(TimeoutGenerator): def __init__(self, lower_bound, upper_bound): super(self.__class__, self)....
vialette/ultrastorage
ultrastorage/timeoutgenerator/uniform.py
Python
mit
551
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' HAPI Generic Asset Interface Release: April 2017, Alpha Milestone Copyright 2016 Maya Culpa, LLC 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, eit...
PedroSFreitas/hapi
src/smart_module/asset_interface.py
Python
gpl-3.0
1,293
from pyjamas.ui.HTML import HTML from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.SimplePanel import SimplePanel import math from pyjamas.Timer import Timer from pyjamas import Window from pyjamas.raphael.raphael import Raphael from pyjamas import log import pyjd ##################################...
anandology/pyjamas
examples/raphael/spinner.py
Python
apache-2.0
2,372
from networkx import DiGraph from diagram import draw_diagram from domino_puzzle import MoveDescription from dominosa import DominosaBoard, PairState, DominosaGraph, DominosaProblem, \ generate_moves_from_unique_pairs, generate_moves_from_single_neighbours, \ generate_moves_from_newly_joined, generate_moves_fr...
donkirkby/domiculture
test_dominosa.py
Python
mit
10,735
{ 'name':'Website Animate', 'description':"Provide animation for page\'s blocks", 'category': 'Website', 'version':'1.1', 'author':'Odoo S.A.', 'data': [ 'views/assets.xml', 'views/options.xml', ], 'depends': ['website_less'], 'images': [ 'static/description/i...
OpenAT/cu_eura
website_animate/__openerp__.py
Python
agpl-3.0
339
# Copyright (C) 2011-2017 2ndQuadrant Limited # # This file is part of Barman. # # Barman 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 versio...
infoxchange/barman
barman/xlog.py
Python
gpl-3.0
14,318
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-10 18:01 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
WarwickAnimeSoc/aniMango
library/migrations/0013_auto_20170810_1801.py
Python
mit
3,097
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.utils.translation import ugettext as _ from rest_framework import serializers #from rest_framework.exceptions import ValidationError from base.models import * logger = logging.getLogger(__name__) class SensorNameSerializer(...
ArdAmb/campamento_base
base/serializers.py
Python
gpl-3.0
4,445
import sys import traceback from string import Template from six import iteritems from .lib.text import to_text __all__ = ['Message'] class Message(object): """A log message. All attributes are read-only.""" __slots__ = ['fields', 'suppress_newlines', 'traceback', 'text'] #: default option values. D...
wearpants/twiggy
twiggy/message.py
Python
bsd-3-clause
3,939
#!/usr/bin/env python # This script expects one line for each new revision on the form # <oldrev> <newrev> <refname> # # For example: # aa453216d1b3e49e7f6f98441fa56946ddcd6a20 # 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master # # Each of these changes will be passed to the buildbot server along # wit...
zozo123/buildbot
master/contrib/git_buildbot.py
Python
gpl-3.0
13,392
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013 University of Dundee & Open Microscopy Environment. # All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation;...
icaoberg/ricerca
tests/TestRicerca.py
Python
gpl-3.0
8,577
# -*- coding: utf-8 -*- """ *************************************************************************** PointsFromPolygons.py --------------------- Date : August 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *******...
nirvn/QGIS
python/plugins/processing/algs/qgis/PointsFromPolygons.py
Python
gpl-2.0
5,633
''' skrf is an object-oriented approach to microwave engineering, implemented in Python. ''' # Python 3 compatibility from __future__ import absolute_import, print_function, division from six.moves import xrange __version__ = '0.16-dev' ## Import all module names for coherent reference of name-space #import io fr...
gibbons/scikit-rf
skrf/__init__.py
Python
bsd-3-clause
1,438
# encoding: utf-8 # 2009 © Václav Šmilauer <eudoxos@arcig.cz> """ Core functionality (Scene in c++), such as accessing bodies, materials, interactions. Specific functionality tests should go to engines.py or elsewhere, not here. """ from builtins import range import unittest import random from yade.wrapper import * fr...
yade/trunk
py/tests/core.py
Python
gpl-2.0
10,463
# -*- coding: utf-8 -*- # ############# version ################## try: from pkg_resources import get_distribution, DistributionNotFound except BaseException: DistributionNotFound = Exception import os.path import subprocess import re # Import slogging to patch logging as soon as possible from . import slogging...
karlfloersch/pyethereum
ethereum/__init__.py
Python
mit
1,644
# -*- coding: utf-8 -*- # a template for making config.json files for functions #import pprint #pp = pprint.PrettyPrinter(indent=4) config = {} # human and machine readable names for the model config['id'] = {} config['id']['DOI'] = '10.1161/01.STR.25.1.40' config['id']['papertitle'] = 'Stroke Risk Profile: Adjust...
doirisks/dori
models/10.1161:01.STR.25.1.40/config_gener_a.py
Python
gpl-3.0
6,336
#======================================================================= __version__ = '''0.0.01''' __sub_version__ = '''20090827170844''' __copyright__ = '''(c) Alex A. Naanou 2007''' #----------------------------------------------------------------------- import ZODB import persistent import zodbutils import pl...
flynx/pli
pli/tags/zodb/zset.py
Python
bsd-3-clause
3,930
#!/usr/bin/env python #coding:utf-8 # Author: Beining --<ACICFG> # Purpose: A batch poster of srt file to danmaku on Bilibili. # Created: 11/23/2014 # srt2Bilibili is licensed under GNUv2 license ''' srt2Bilibili 0.02.1 Beining@ACICFG cnbeining[at]gmail.com http://www.cnbeining.com https://github.com/cnbeining/srt2bil...
cnbeining/srt2bilibili
srt2bilibili.py
Python
gpl-2.0
12,004
from sfepy.base.base import * from sfepy.solvers.solvers import TimeSteppingSolver def get_print_info( n_step ): if n_step > 1: n_digit = int( nm.log10( n_step - 1 ) + 1 ) format = '%%%dd of %%%dd' % (n_digit, n_digit) suffix = '%%0%dd' % n_digit else: n_digit, format, suffix =...
certik/sfepy
sfepy/solvers/ts.py
Python
bsd-3-clause
3,446
#!/usr/bin/env python3 # daemon.py """ originally from the Python Cookbook (version 3) 11.8. Implementing Remote Procedure Calls 12.2. Determining If a Thread Has Started 12.14. Launching a Daemon Process on Unix (perhaps more) """ import os import sys import atexit import signal import json from datetime ...
buffalotheory/critter_list
pyplayer/pyplayerd.py
Python
gpl-2.0
7,138
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import io import six import sys import json import runpy import shutil import tempfile import unittest from examples import storages f...
okfn/datapackage-storage-py
tests/system/test_bigquery.py
Python
mit
1,686
''' available factories: feed_forward_perceptron ''' import numpy from mlpdata import MLPData class zero_matrix(object): def __init__(self, rows, cols): self.__rows = rows self.__cols = cols def rows(self): return self.__rows def cols(self): return self.__c...
aolsux/DeepThought
deepthought/factories.py
Python
gpl-3.0
1,527
def __load(): import imp, os, sys ext = 'Quartz/CoreVideo/_CVPixelBuffer.so' for path in sys.path: if not path.endswith('lib-dynload'): continue ext = os.path.join(path, ext) if os.path.exists(ext): #print "py2app extension module", __name__, "->", ext ...
debugger06/MiroX
osx/build/bdist.macosx-10.5-fat/python2.7-standalone/app/temp/Quartz/CoreVideo/_CVPixelBuffer.py
Python
gpl-2.0
561
from openerp import fields, models from openerp import api from openerp.osv import osv class Invoice(models.Model): _inherit = 'account.invoice' charge = fields.Float(digits=(6, 2), help="spede d'incasso") # Add a new column to the account.payment.term model @api.multi def onchange_partn...
marcolongo/l10n_it_Payment_charges
invoice.py
Python
gpl-2.0
3,977
import unittest import numpy import six import chainer from chainer.backends import cuda from chainer import links from chainer import testing from chainer.testing import attr def _batch_renormalization(expander, gamma, beta, x, mean, std, test, r, d): mean = mean[expander] std = ...
hvy/chainer
tests/chainer_tests/links_tests/normalization_tests/test_batch_renormalization.py
Python
mit
7,033
from ..broker import Broker class IssueDetailBroker(Broker): controller = "issue_details" def show(self, **kwargs): """Shows the details for the specified issue detail. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``required...
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v3_8_0/issue_detail_broker.py
Python
apache-2.0
78,423
import sys from PyQt4 import Qt from PyQt4.phonon import Phonon class AIPYbody(): # in the class body are all functionalities of the AIPY Music Player # body will be one window from PyQT def __init__ (self): pass def Display(): # used for showing the remaining time, or elapsed time of song, it is posible to ...
MrIliev/AIPY-Music-Player
AIPY.py
Python
apache-2.0
1,128
"""Adds this path to the PYTHONPATH so normal import usage can occur for external packages.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os # import platform import sys # import warnings THIS_F...
tanium/pytan
lib/libs_external/__init__.py
Python
mit
1,896
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from ipykernel.comm import Comm from ipywidgets import Widget class DummyComm(Comm): comm_id = 'a-b-c-d' kernel = 'Truthy' def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) ...
jupyter-widgets/ipywidgets
python/ipywidgets/ipywidgets/widgets/tests/utils.py
Python
bsd-3-clause
1,229
from setuptools import setup, find_packages setup( name='django-vkontakte-polls', version=__import__('vkontakte_polls').__version__, description='Django implementation for vkontakte API Polls', long_description=open('README.md').read(), author='ramusus', author_email='ramusus@gmail.com', ur...
ramusus/django-vkontakte-polls
setup.py
Python
bsd-3-clause
1,153
""" WSGI config for mysite project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ from django.core.wsgi import get_wsgi_application import os os.environ.setdefault("DJANGO_SETTIN...
EmilyWebber/Healthy-Neighborhoods
Healthy-Neighborhoods/mysite/wsgi.py
Python
mit
387
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
AutorestCI/azure-sdk-for-python
azure-batch/azure/batch/models/pool_resize_parameter.py
Python
mit
2,412
import pickle import numpy as np from PIL import Image import os from StringIO import StringIO import math import pylab import chainer from chainer import computational_graph from chainer import cuda from chainer import optimizers from chainer import serializers from chainer import Variable from chainer.utils import ...
mattya/chainer-DCGAN
visualizer.py
Python
mit
2,165
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but...
kernelci/kernelci-reports
app/tests/__init__.py
Python
gpl-3.0
1,006
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_...
kvar/ansible
lib/ansible/modules/network/aci/aci_interface_policy_leaf_policy_group.py
Python
gpl-3.0
18,531
from bucketlist import create_app, db from bucketlist.models import User, Bucketlist, Item import json import unittest class BaseTestCase(unittest.TestCase): def setUp(self): """ this function creates the base test""" self.app = create_app(config_name="development") self.client = self.ap...
kevintumbo/Checkpoint2_Bucketlist
tests/base_test.py
Python
mit
2,589
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
jbedorf/tensorflow
tensorflow/contrib/gan/python/estimator/python/gan_estimator_impl.py
Python
apache-2.0
14,421
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/resource_usage_statistics.py
Python
mit
1,414
# python 2 from __future__ import absolute_import # builtins from unittest import TestCase, main from cssutils.css import Property # custom from blowdrycss.scalingparser import ScalingParser __author__ = 'chad nelson' __project__ = 'blowdrycss' class TestBreakpointParser(TestCase): def test_is_scaling_True(sel...
nueverest/BlowDryCSS
blowdrycss/unit_tests/test_ScalingParser.py
Python
mit
8,209
# # The Python Imaging Library. # $Id$ # # PIXAR raster support for PIL # # history: # 97-01-29 fl Created # # notes: # This is incomplete; it is based on a few samples created with # Photoshop 2.5 and 3.0, and a summary description provided by # Greg Coats <gcoats@labiris.er.usgs.gov>. Hop...
Microvellum/Fluid-Designer
win64-vc/2.78/Python/lib/site-packages/PIL/PixarImagePlugin.py
Python
gpl-3.0
1,671
#!/usr/bin/python # -*- coding: utf-8 -*- # This is code is commercial software. # Copyright © 2011 by Runar Tenfjord, Tenko. import sys from functools import partial try: from xml.etree import cElementTree as etree except ImportError: from xml.etree import ElementTree as etree try: from cairosvg import ...
joplen/svgplotlib
svgplotlib/SVG/__init__.py
Python
bsd-3-clause
17,225
""" Copyright (c) 2012, Vukasin Toroman <vukasin@toroman.name> """ import subprocess import tornado.ioloop import time import fcntl import functools import os class GenericSubprocess (object): def __init__(self, timeout=-1, **popen_args): self.args = dict() self.args["stdout"] = subprocess.PIPE ...
golden-tech-native/gd_facerecognize
testfolder/test2.py
Python
mit
5,868
# flake8: noqa: F405 # This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Andreas Korb <andreas.d.korb@gmail.com> # Copyright (C) Nils Weiss <nils@we155.de> # This program is published under a GPLv2 license # scapy.contrib.description = On Board Diagnostic Proto...
francois-contat/scapy
scapy/contrib/automotive/obd/obd.py
Python
gpl-2.0
3,883
# Copyright 2015 Hewlett-Packard Development Company, L.P # 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....
coreycb/horizon
openstack_dashboard/test/integration_tests/tests/test_floatingips.py
Python
apache-2.0
4,543
#!/usr/bin/python -B import jsonreader def get(): try: with open('.pakset', 'r') as readr: return load(readr.read()) except Exception, e: return jsonreader.read('{"dir": "pakmgr_dls/"}') def load(data): jsonData = jsonreader.read(data) return jsonData
TheDoxMedia/pakmgr
core/settings.py
Python
mit
264
__author__ = 'Kevin Mooney' from reportengine import base, register from reportengine.filtercontrols import StartsWithFilterControl from models import Customer, SaleItem class CustomerReport(base.ModelReport): """An example of a model report""" verbose_name = "User Report" slug = "user-report" namespa...
jrutila/django-reportengine
tests/reports.py
Python
bsd-3-clause
2,131
# Copyright 2015 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 logging import os import shutil import subprocess import sys import tempfile from telemetry.core import exceptions from telemetry.core import util fr...
js0701/chromium-crosswalk
tools/telemetry/telemetry/internal/backends/mandoline/desktop_mandoline_backend.py
Python
bsd-3-clause
5,112
import libcontext, bee from bee.segments import * from bee.types import stringtupleparser class hop_in(object): """The hop_in rerouter forwards an output to hop_out rerouters of the same name""" metaguiparams = { "mode": "str", "type_": "str", "autocreate": {"mode": "pull", "type_": ...
agoose77/hivesystem
sparta/rerouters/hop_in.py
Python
bsd-2-clause
1,930
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from urbansim.functions import attribute_label # Functions def my_attribute_label(attribute_name): """Return a triple (package, dataset_name, attribute_name). """ return attribut...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim/development_event/variable_functions.py
Python
gpl-2.0
368
""" Copyright 2013 OpERA 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, softwar...
ComputerNetworks-UFRGS/OpERA
python/sensing/feedback.py
Python
apache-2.0
6,299
from vacker.analyser.ffprobe import FfprobeAnalyser class AudioAnalyser(FfprobeAnalyser): @staticmethod def check_match(file_obj): return (file_obj.mime_type and file_obj.mime_type.split('/')[0] == 'audio' and file_obj.__class__.__name__ not in ['ZippedFile', 'Tarre...
MatthewJohn/vacker
vacker/analyser/audio.py
Python
apache-2.0
537
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_parameter_spec_query174_all_of.py
Python
mit
5,487
import struct stentry = struct.Struct('!IIxxxx') # offset, length, 4 byte for extension sthead = struct.Struct('!IIIq') # version, size, flags
quantum5/pyfortune
pyfortune/compile.py
Python
gpl-3.0
144
from __future__ import with_statement import sys import os import copy import optparse import re import types import inspect import itertools import operator import traceback from os.path import * import paver.deps.six as six from paver.deps.six import print_ from paver.version import VERSION # using six.moves is co...
thedrow/paver
paver/tasks.py
Python
bsd-3-clause
29,688
#@PydevCodeAnalysisIgnore """ Python Enumerations See https://pypi.python.org/pypi/enum34 BSD License """ #pylint: disable-all import sys as _sys __all__ = ['Enum', 'IntEnum', 'unique'] pyver = float('%s.%s' % _sys.version_info[:2]) try: any except NameError: def any(iterable): for element in itera...
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/music21/ext/enum.py
Python
mit
28,680
"""Cloud browser errors. All cloud browser errors are sub-classed off the base :class:`CloudBrowserException` error. """ class CloudBrowserException(Exception): """Base class for all exceptions.""" pass
ryan-roemer/django-cloud-browser
cloud_browser/errors.py
Python
mit
215
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:42512") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)
CoinProjects/MineCoin
contrib/wallettools/walletchangepass.py
Python
mit
221
#!/usr/bin/env python3 import sys import gemmi CCD_PATH = 'components.cif.gz' OUTPUT_PATH = 'sub_ccd.cif' COORDINATE_FILES = sys.argv[1:] # Make a list of residue names that we need. mon_names = set() for coordinate_file in COORDINATE_FILES: st = gemmi.read_structure(coordinate_file) mon_names.update(st[0].g...
project-gemmi/gemmi
examples/sub_ccd.py
Python
mpl-2.0
568
""" liason.defaults ~~~~~~~~~~~~~~~ """ db = { "engine": "postgresql", "user": "liason", "password": "secret", "hostname": "localhost", "database": "computerblue", "table": "contacts", }
hahnicity/liason
liason/defaults.py
Python
unlicense
213
# Copyright 2020 The FedLearner 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...
bytedance/fedlearner
test/data_join/test_data_block_manager.py
Python
apache-2.0
7,565
import numpy as np import math from timeseries.lazy import LazyOperation import pype class TimeSeries: ''' Data and methods for an object representing a general time series. Attributes: timesseq: sequence representing time series times (indices) valuesseq: sequence representing time ser...
Mynti207/cs207project
timeseries/timeseries.py
Python
mit
28,786
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
sysadminmatmoz/odoo-clearcorp
project_reports/wizard/__init__.py
Python
agpl-3.0
1,128