code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db.models.fields.files import ImageFieldFile, ImageField from django.utils.translation import ugettext_lazy as _ from django.db.models.signals import pre_save, pre_delete from PIL import Image as PILImage from storageimage import settings class StorageImageFie...
sixpearls/wagtail-storageimage
storageimage/models.py
Python
bsd-2-clause
2,687
# -*- coding: utf-8 -*- """ Module collecting classes and functions for dealing with (multiphase) chemical equilibria. .. Note:: This module is provisional at the moment, i.e. the API is not stable and may break without a deprecation cycle. """ import warnings import numpy as np from .chemistry import equilib...
bjodah/chempy
chempy/equilibria.py
Python
bsd-2-clause
16,931
import glob import os import shutil from distutils import sysconfig from setuptools import setup, Command from setuptools.command.install import install here=os.path.dirname(os.path.abspath(__file__)) site_packages_path = sysconfig.get_python_lib() class CleanCommand(Command): """Custom clean command to tidy up ...
stuaxo/pyHotReload
setup.py
Python
bsd-2-clause
2,321
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Project.year' db.add_column('cms_project', 'year', self.gf('django.db.models.fields.Intege...
ncsu-stars/Stars-CMS
cms/migrations/0012_auto__add_field_project_year.py
Python
bsd-2-clause
7,640
#!/usr/bin/env python """ Use the AppVeyor API to download Windows artifacts. Taken from: https://bitbucket.org/ned/coveragepy/src/tip/ci/download_appveyor.py # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """ f...
ionelmc/python-nameless
ci/appveyor-download.py
Python
bsd-2-clause
3,820
# -*- coding: utf-8 -*- # Copyright (c) 2015, Thierry Lemeunier <thierry at lemeunier dot net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain th...
thethythy/Mnemopwd
mnemopwd/server/util/__init__.py
Python
bsd-2-clause
1,500
from django.conf.urls import patterns, include, url from django.core.urlresolvers import reverse_lazy from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'pipeye.views.home', name='home'), url(r'^watches/', include('pipeye.watches.urls')), url(r'^packages/', include...
oinopion/pipeye
pipeye/urls.py
Python
bsd-2-clause
820
import random class MultiResultCallbackHandler(object): def __init__(self, cb=None): self._count = 0 self._results = [] self._cb = cb def result_cb(res): self._results.append(res) if len(self._results)==self._count: self._fire() self...
knorby/boxeeremotelib
boxeeremotelib/utils.py
Python
bsd-2-clause
951
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * import evernote.edam.userstore.ttypes import evernote.edam.type.ttypes import evernote.edam.error.ttypes import evernote.edam.limits.ttypes from thrift.transport import TTransport from thrif...
vinodc/evernote
src/evernote/edam/notestore/ttypes.py
Python
bsd-2-clause
89,345
#!/usr/bin/env python # https://github.com/svenkreiss/PyROOTUtils/blob/master/PyROOTUtils/Graph.py __author__ = "Kyle Cranmer <kyle.cranmer@nyu.edu" __version__ = "0.1" ''' This is a research work in progress. Define model mu_s*Gaus(x|alpha,sigma)+mu_b*flat(x) Generate {x} for several {alpha} Calculate power (expec...
cranmer/parametrized-learning
ttbar_resonance.py
Python
bsd-2-clause
11,616
#!/usr/bin/env python from setuptools import setup import os __doc__ = """ WiFi tools that could possibly work on a nice day, if you are lucky. """ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() install_requires = ['setuptools'] try: import argparse except: install_...
CptMonac/python-wifi
setup.py
Python
bsd-2-clause
909
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 12, transform = "Anscombe", sigma = 0.0, exog_count = 20, ar_order = 0);
antoinecarme/pyaf
tests/artificial/transf_Anscombe/trend_Lag1Trend/cycle_12/ar_/test_artificial_32_Anscombe_Lag1Trend_12__20.py
Python
bsd-3-clause
263
import hashlib from unittest import SkipTest import django import pytest from django.db import connection from django.db.models import F, FloatField, Q, Value from django.db.models.functions import Length, Lower, Upper from django.test import TestCase from django_mysql.models.functions import ( CRC32, ELT, ...
arnau126/django-mysql
tests/testapp/test_functions.py
Python
bsd-3-clause
26,378
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # FreeType high-level python API - Copyright 2011 Nicolas P. Rougier # Distributed under the terms of the new BSD license. # # ---------------------------------------------------------------...
davidcox/freetype-py
freetype/__init__.py
Python
bsd-3-clause
71,996
# [h] import layer from ufo ### suggested & sponsored by Bas Jacobs (Underware) ### http://underware.nl/ # import import os from mojo.roboFont import CurrentFont, RFont from vanilla import * from vanilla.dialogs import getFile from hTools2 import hDialog from hTools2.modules.messages import no_font_open # object ...
gferreira/hTools2_extension
hTools2.roboFontExt/lib/hTools2/dialogs/font/layer_import.py
Python
bsd-3-clause
3,547
"""CherryPy sphinx doc configuration module.""" # -*- coding: utf-8 -*- # # CherryPy documentation build configuration file, created by # sphinx-quickstart on Sat Feb 20 09:18:03 2010. # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration value...
Safihre/cherrypy
docs/conf.py
Python
bsd-3-clause
7,289
import core from core import * dmide_objtree_icon_size = 32 class DMIDE_ObjTree(wx.ListCtrl): def __init__(self, parent): wx.ListCtrl.__init__(self, parent, ID_OBJTREE, style = wx.LC_ICON | wx.LC_VIRTUAL | wx.LC_EDIT_LABELS | wx.NO_BORDER) self.last_pos = -1 self.icons = [] self.Bind(wx.EVT_SIZE, self.OnSi...
nyov/dmide
core/panels/objtree2.py
Python
bsd-3-clause
4,575
#!/usr/bin/env python import os import django if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'benchmark.settings') django.setup() from benchmark.base import Benchmark Benchmark().run()
BertrandBordage/django-tree
run_benchmark.py
Python
bsd-3-clause
233
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.discover.models import DiscoverSavedQuery from sentry.testutils import APITestCase, SnubaTestCase from sentry.testutils.helpers.datetime import before_now class DiscoverSavedQueryBase(APITestCase, SnubaTestCase): def...
beeftornado/sentry
tests/snuba/api/endpoints/test_discover_saved_queries.py
Python
bsd-3-clause
18,996
import numpy as np from bokeh.io import curdoc, show from bokeh.models import ColumnDataSource, Grid, LinearAxis, Plot, Triangle N = 9 x = np.linspace(-2, 2, N) y = x**2 sizes = np.linspace(10, 20, N) source = ColumnDataSource(dict(x=x, y=y, sizes=sizes)) plot = Plot( title=None, plot_width=300, plot_height=300...
ericmjl/bokeh
examples/reference/models/Triangle.py
Python
bsd-3-clause
749
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "pysymemu", version = "0.0.1-alpha", author = "Felipe Andres Manzano", author_email = "feliam@binamuse.com", description = ("A tool for symbolic execution of...
feliam/pysymemu
setup.py
Python
bsd-3-clause
1,306
# Copyright (c) 2021, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np import pytest from coremltools.converters.mil.mil import Builder as mb from coreml...
apple/coremltools
coremltools/converters/mil/mil/passes/test_layernorm_instancenorm_fusion.py
Python
bsd-3-clause
15,619
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_clouds -------------- Tests for `design.clouds` module. """ import imghdr import os import unittest from design import clouds class TestClouds(unittest.TestCase): def test_draw_cloud(self): clouds.draw_cloud() self.assertEqual(imghdr.what...
audreyr/design
tests/test_clouds.py
Python
bsd-3-clause
467
#!/usr/bin/env python """ This script is copied from pylearn2/scripts/train.py, so that we can put this LocateReLU folder on PYTHON_PATH automatically, so that we can import local modules without extra work Script implementing the logic for training pylearn2 models. This is a "driver" that we recommend using for all ...
hyqneuron/pylearn2-maxsom
pylearn2/scripts/papers/LocateReLU/mytrain.py
Python
bsd-3-clause
8,524
#!/usr/bin/env python from flexbe_core import EventState import rospy import math from geometry_msgs.msg import Pose from tf.transformations import quaternion_from_euler class point_at_gen_pose(EventState): """ calculates a pose from xyz for the gripper to point at something -- offsetx double ...
WalkingMachine/sara_behaviors
sara_flexbe_states/src/sara_flexbe_states/point_at_gen_pose.py
Python
bsd-3-clause
1,603
"""Parser for STAR Log.final.out file""" # (c) 2015-2021 Wibowo Arindrarto <contact@arindrarto.dev> import os from typing import Any, Callable, Dict, Optional, TextIO, Tuple, Union import click from .utils import convert, get_handle, get_linesep __all__ = ["parse"] def _pct_convert(raw_str: str) -> Union[str, int...
bow/crimson
crimson/star.py
Python
bsd-3-clause
3,822
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'builder.ui' # # Created: Mon May 22 10:30:45 2017 # by: pyside-uic 0.2.15 running on PySide 1.2.4 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_pandapower(object): def setupUi(s...
Tooblippe/pandapower_gui
resources/ui/builder.py
Python
bsd-3-clause
35,136
""" paxo.core - the guts of it all """ import os from clint.textui import colored, puts from clint import resources from paxo import __author__ from paxo.command import define_command, Collection from paxo.util import args, show_error, ExitStatus, XDG_DATA_HOME from paxo.storage import storage class Paxo(object): ...
cwoebker/paxo
paxo/core.py
Python
bsd-3-clause
3,371
# -*- coding: utf-8 -*- import os # Switches DEBUG = True DISQUS_ENABLED = False reCAPTCHA_ENABLED = False DEFAULT_STYLE = 'dark' DEFAULT_GRAVATAR = 'identicon' # reCAPTCHA reCAPTCHA_PUBLIC_KEY = '' reCAPTCHA_PRIVATE_KEY = '' SECRET_NAME_MINLENGTH = 2 SECRET_NAME_MAXLENGTH = 50 SECRET_SUBJECT_MINLENGTH = { 'de...
livibetter-backup/letsecretsout
src/config_base.py
Python
bsd-3-clause
2,260
#!/usr/bin/env python # encoding: utf-8 from util import * res = [ # commit ('90f02cb510335a5bfdb57f0c78915d5ac236013c', 'http://git.naquadah.org/?p=oocairo.git;a=commitdiff;h=90f02cb510335a5bfdb57f0c78915d5ac236013c'), # tree ('90f02cb510335a5bfdb57f0c78915d5ac236013c^{tree}', 'http://git....
gvalkov/git-link
tests/test_gitweb.py
Python
bsd-3-clause
2,301
def extractNightskytlWordpressCom(item): ''' Parser for 'nightskytl.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loi...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractNightskytlWordpressCom.py
Python
bsd-3-clause
560
#coding=utf-8 import re, os, time, random import sys if sys.version_info >= (2, 6, 0): import json as json else: import simplejson as json from django.core.paginator import Paginator, InvalidPage, EmptyPage, PageNotAnInteger from django.db.models import Q from django.core.urlresolvers import reverse from dja...
spunkmars/ProFTPD-Admin
src/proftpd/ftpadmin/lib/view_common.py
Python
bsd-3-clause
12,820
#!/usr/bin/env python # # Copyright 2016 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Run all infrastructure-related tests.""" import os import subprocess import sys INFRA_BOTS_DIR = os.path.dirname(os.path.realpath(__file__)) SKIA_DIR = os...
HalCanary/skia-hc
infra/bots/infra_tests.py
Python
bsd-3-clause
1,839
# -*- coding: utf-8 -*- """ fsnviz.fusioncatcher ~~~~~~~~~~~~~~~~~~~~ FusionCatcher output plotting. :copyright: (c) 2016 Wibowo Arindrarto <bow@bow.web.id> :license: BSD """ from crimson.fusioncatcher import parse from .models import CircosEntry, CircosLabel, CircosLink, FusionToolResults from ...
bow/fsnviz
fsnviz/fusioncatcher.py
Python
bsd-3-clause
2,336
# Drop the origal date and hour columns data_stacked = data_stacked.drop(['date', 'hour'], axis=1) data_stacked.head()
jorisvandenbossche/DS-python-data-analysis
notebooks/_solutions/case4_air_quality_processing8.py
Python
bsd-3-clause
118
import sys,os ## basic files #sys.path.append(os.path.realpath(__file__)) #print(os.path.realpath(__file__)) #print(os.path.pardir(os.path.realpath(__file__))) #print(os.path.split(os.path.abspath(__file__))[:-1]) from .version import __version__ from .basedir import __basedir__ ## database functions and classes fro...
ajrichards/htsint
htsint/__init__.py
Python
bsd-3-clause
693
from datetime import datetime try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict import six import sqlalchemy as sa from sqlalchemy.ext.compiler import compiles from .dialects.postgresql import ( CreateTemporaryTransactionTableSQL, InsertTemporaryTransacti...
avilaton/sqlalchemy-continuum
sqlalchemy_continuum/transaction.py
Python
bsd-3-clause
5,496
# -*- coding: utf-8 -*- from warnings import warn from django.conf import settings from django.core.exceptions import ImproperlyConfigured TRANSLATION_FILES = tuple(getattr(settings, 'MODELTRANSLATION_TRANSLATION_FILES', ())) TRANSLATION_REGISTRY = getattr(settings, 'MODELTRANSLATION_TRANSLATION_REGISTRY', None) if ...
acdha/django-modeltranslation
modeltranslation/settings.py
Python
bsd-3-clause
2,611
# -*- coding: utf-8 -*- """ Django settings for pfa project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, unicode_literal...
fretscha/pfa
config/settings/common.py
Python
bsd-3-clause
8,513
""" Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output "Fizz" instead of the number and for the multiples of five output "Buzz". For numbers which are multiples of both three and five output "FizzBuzz". """ def fizz_buzz(n): """ :type n:...
yfpeng/pengyifan-leetcode
src/main/python/pyleetcode/fizz_buzz.py
Python
bsd-3-clause
999
""" ABP analyzer and graphics tests """ cases = [ ('Run Pymodel Graphics to generate dot file from FSM model, no need use pma', 'pmg.py ABP'), ('Generate SVG file from dot', 'dotsvg ABP'), # Now display ABP.dot in browser ('Run PyModel Analyzer to generate FSM from original FSM, should be ...
nfredrik/pyModelStuff
samples/abp/test_graphics.py
Python
bsd-3-clause
613
import importlib import re from aiohttp import web from brink.serialization import json_dumps from brink.exceptions import HTTPBadRequest from brink.config import config class WebSocketResponse(web.WebSocketResponse): def send_json(self, json, *args, **kwargs): super().send_json(json, *args, dumps=json...
brinkframework/brink
brink/handlers.py
Python
bsd-3-clause
1,366
import os import sys import matplotlib.pyplot as plt class Experiment: def __init__(self, db, eps, eps_share, c0, rmax, nits, bf, seed): self.db = db self.eps = eps self.eps_share = eps_share self.c0 = c0 self.rmax = rmax self.nits = nits self.bf = bf ...
mihaimaruseac/dphcar
tools/stats_scripts/parse_icde.py
Python
bsd-3-clause
6,386
# Standard imports import unittest import json import logging from datetime import datetime, timedelta # Our imports from emission.clients.gamified import gamified from emission.core.get_database import get_db, get_mode_db, get_section_db from emission.core.wrapper.user import User from emission.core.wrapper.client im...
joshzarrabi/e-mission-server
emission/tests/client_tests/TestGamified.py
Python
bsd-3-clause
7,135
from collections import defaultdict from decimal import Decimal from django.test import SimpleTestCase, TestCase from django.utils.functional import cached_property from unittest.mock import Mock, patch from corehq.apps.custom_data_fields.models import ( CustomDataFieldsDefinition, Field, ) from corehq.apps....
dimagi/commcare-hq
corehq/apps/locations/tests/test_bulk_management.py
Python
bsd-3-clause
45,989
from setuptools import setup reqs = [ 'myhdl>=0.9.0', 'click', 'wrapt' ] test_reqs = ['pytest', 'hypothesis'] requires = { 'setup_requires': ['setuptools_scm'], 'install_requires': reqs, 'tests_require': test_reqs, 'extras_require': { 'testing': test_reqs, } } setup( name...
jck/uhdl
setup.py
Python
bsd-3-clause
1,201
# Software License Agreement (BSD License) # # Copyright (c) 2009, Willow Garage, 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...
MangoMangoDevelopment/neptune
lib/ros_comm-1.12.0/utilities/roswtf/src/roswtf/graph.py
Python
bsd-3-clause
14,968
# -*- encoding: utf-8 -*- ### # Copyright (c) 2002-2005, Jeremiah Fincher # 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 not...
Ban3/Limnoria
plugins/Filter/plugin.py
Python
bsd-3-clause
25,613
""" The DenseDesignMatrix class and related code. Functionality for representing data that can be described as a dense matrix (rather than a sparse matrix) with each row containing an example and each column corresponding to a different feature. DenseDesignMatrix also supports other "views" of the data, for example a d...
kastnerkyle/pylearn2
pylearn2/datasets/dense_design_matrix.py
Python
bsd-3-clause
55,686
from django.conf.urls.defaults import patterns, url from commons.views import redirect_to from . import views urlpatterns = patterns('', url(r'^$', redirect_to, {'url': 'eol.home'}), url(r'^home$', views.home, name='eol.home'), url(r'^newsletter', views.newsletter, name='eol.newsletter'), url(r'^m/$'...
mozilla/spark-eol
apps/eol/urls.py
Python
bsd-3-clause
644
import connect_tests import string_utils_tests
doubleO8/versionone-sdk-spoon
versio9/tests/__init__.py
Python
bsd-3-clause
49
#!/usr/bin/env python #:coding=utf-8: from setuptools import setup, find_packages import sys extra = {} if sys.version_info >= (3,): extra['use_2to3'] = True setup( name='bpssl', version='1.0.3', description='SSL/HTTPS for Django', long_description=open('README.rst').read() + '\n' + open('CHANGES...
beproud/bpssl
setup.py
Python
bsd-3-clause
1,131
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD from setuptools import setup from catkin_pkg.python_setup import generate_distutils_setup # fetch values from package.xml setup_args = generate_distutils_setup( packages=['swri_transform_util'], package_dir={'': 'src'}, requires=['diagnostic_ms...
swri-robotics/marti_common
swri_transform_util/setup.py
Python
bsd-3-clause
409
def run_all(): import nose2 nose2.discover(module='pygraphml') __all__ = [run_all]
hadim/pygraphml
pygraphml/tests/__init__.py
Python
bsd-3-clause
93
# -*- coding: utf-8 -*- # Copyright (c) 2016-present, CloudZero, Inc. All rights reserved. # Licensed under the BSD-style license. See LICENSE file in the project root for full license information. """ Plugin used to extract all contextual information we can from EC2 network-interface (ENI) Cloudtrail Events. """ imp...
Cloudzero/cloudzero-reactor-aws
reactor/features/cloudtrail_event_source/ingest_plugins/ec2/network_interface.py
Python
bsd-3-clause
2,385
# Django settings for project project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '...
fmierlo/django-default-settings
release/1.2/project/settings.py
Python
bsd-3-clause
3,293
"""Group module Groups are intented to cluster users together for logical reasons, such as a list of users for whom patient notifications apply. Groups should not be used to grant or restrict access - see `Role`. """ import re from sqlalchemy import UniqueConstraint from werkzeug.exceptions import BadRequest from ...
uwcirg/true_nth_usa_portal
portal/models/group.py
Python
bsd-3-clause
1,907
ELECTRONIC = 0 NON_ELECTRONIC = 1 ALIAS = 2 def as_choices_tuple(): return ((ELECTRONIC, 'Electronic'), (NON_ELECTRONIC, 'Non electronic'), (ALIAS, 'Alias'))
vegarang/devilry-django
devilry/apps/core/models/deliverytypes.py
Python
bsd-3-clause
187
import math import torch from .Module import Module from .utils import clear class VolumetricConvolution(Module): def __init__(self, nInputPlane, nOutputPlane, kT, kW, kH, dT=1, dW=1, dH=1, padT=0, padW=None, padH=None): super(VolumetricConvolution, self).__init__() self.nInputPlane = nInputPlan...
RPGOne/Skynet
pytorch-master/torch/legacy/nn/VolumetricConvolution.py
Python
bsd-3-clause
6,906
# Configuration settings for electoral address GUI from PyQt4.QtCore import * import ElectoralAddress.Database as Database organisationName='Land Information New Zealand' applicationName='Electoral Address Loader' _settings=None def settings(): global _settings if not _settings: _sett...
SPlanzer/AIMS
ElectoralAddress/Gui/Config.py
Python
bsd-3-clause
1,936
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/MedicationStatement) on 2019-05-07. # 2019, SMART Health IT. from . import domainresource class MedicationStatement(domainresource.DomainResource): """ Record of medication being take...
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_4_0_0/models/medicationstatement.py
Python
bsd-3-clause
8,384
#!/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. ''' Base class for postprocessing of RC files. ''' import sys class PostProcessor(object): ''' Base class for postprocessing of...
JoKaWare/WTL-DUI
tools/grit/grit/tool/postprocess_interface.py
Python
bsd-3-clause
1,029
import networkx as nx from bokeh.io import output_file, show from bokeh.models import (BoxSelectTool, Circle, HoverTool, MultiLine, NodesAndAdjacentNodes, Plot, Range1d, TapTool) from bokeh.palettes import Spectral4 from bokeh.plotting import from_networkx G=nx.karate_club_graph() plot = Pl...
bokeh/bokeh
sphinx/source/docs/user_guide/examples/graph_interaction_nodesadjacentnodes.py
Python
bsd-3-clause
1,359
__author__ = 'bkeyes' from django.apps import AppConfig class CoCreateConfig(AppConfig): name = "cocreate" verbose_name = "CoCreate"
nemonik/CoCreateLite
ccl-cookbook/files/default/cocreatelite/cocreate/apps.py
Python
bsd-3-clause
144
# Python modules import gc import os import subprocess import random import re import sys # My module import sysv_ipc SKIP_SEMAPHORE_TESTS = False SKIP_SHARED_MEMORY_TESTS = False SKIP_MESSAGE_QUEUE_TESTS = False # TEST_COUNT = 10 TEST_COUNT = 1024 * 100 PY_MAJOR_VERSION = sys.version_info[0] # ps output looks l...
mruffalo/sysv_ipc
extras/memory_leak_tests.py
Python
bsd-3-clause
20,971
import site import sys, os from peewee import * import datetime import time import calendar import sqlite3 import gzip import shutil #----------------------------------------------------------------------- if os.path.exists('/storage/extSdCard'): database = SqliteDatabase('/storage/extSdCard/mydb/lessonplan20...
mwbetrg/skripbatak
createlp2016table.py
Python
bsd-3-clause
2,171
""" Test the calcload.py utility and function calc_max_load() """ from tests.data import voyager_h5, voyager_fil from blimpy.calcload import cmd_tool, calc_max_load def test_calcload(): r""" Test the calcload command line tool """ args = [voyager_h5] cmd_tool(args) args = ['-v', voyager_fil] cmd_to...
UCBerkeleySETI/blimpy
tests/test_calcload.py
Python
bsd-3-clause
535
from django import forms from django.core.exceptions import ObjectDoesNotExist from helios.store.models import Category from helios.conf import settings if settings.USE_PAYPAL: from helios.paypal.forms import * class MyCategoryAdminForm(forms.ModelForm): class Meta: model = Category fields = ...
panosl/helios
helios/store/forms.py
Python
bsd-3-clause
1,013
# Generated by Django 2.0.3 on 2018-06-27 08:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ala', '0009_samplingfeature_geometry'), ] operations = [ migrations.RunSQL("UPDATE ala_observation " "SET procedure_id = (...
gis4dis/poster
apps/processing/ala/migrations/0010_update_aggregation_procedures.py
Python
bsd-3-clause
751
"""Iceland specific form helpers.""" from __future__ import unicode_literals from django.forms import ValidationError from django.forms.fields import RegexField from django.forms.widgets import Select from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ from localflavo...
jieter/django-localflavor
localflavor/is_/forms.py
Python
bsd-3-clause
2,973
import sys import FlyMovieFormat def main(): try: filename1 = sys.argv[1] except: print """Usage: fmf_info fmf_filename This program takes a set of .fmf files and saves the mean of all frames from all files as a .bmp image file. The files used are in the range fmf_filename1 <= FILE <= fmf_fil...
slivingston/flymovieformat
motmot/FlyMovieFormat/fmf_info.py
Python
bsd-3-clause
724
def extractKieshitlWordpressCom(item): ''' Parser for 'kieshitl.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('I am a Big Villain', 'I am a Big Villain', ...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractKieshitlWordpressCom.py
Python
bsd-3-clause
642
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
enthought/traitsgui
enthought/pyface/timer/do_later.py
Python
bsd-3-clause
2,116
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): filename = os.path.join(os.path.dirname(__file__), *file_paths) version_file = open(filename).read() ve...
comandrei/django-shortcircuit
setup.py
Python
bsd-3-clause
2,291
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
cedriclaunay/gaffer
python/GafferTest/SplinePlugTest.py
Python
bsd-3-clause
12,350
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
vlegoff/tsunami
src/secondaires/crafting/editeurs/gldedit/atelier.py
Python
bsd-3-clause
2,784
# -*- coding: utf-8 -*- """accounts context processors. A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the setting TEMPLATE_CONTEXT_PROCES...
juliotrigo/django-accounts
accounts/context_processors.py
Python
bsd-3-clause
544
# Copyright (c) 2017 Hristo Iliev <github@hiliev.eu> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of c...
hiliev/py-zfs-rescue
zfs/zio.py
Python
bsd-3-clause
12,640
import socket import logging from __writer import Writer class SocketWriter(Writer): """Conf: - host (required): hostname destination - port (required): port destination""" def setup(self): self.log = logging.getLogger('pycollector') self.sock = socket.socket() ...
intelie/pycollector
src/rwtypes/writers/socket/SocketWriter.py
Python
bsd-3-clause
745
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from rest_framework import serializers from maintenance.models import RecreateSlave from api.maintenance_base import MaintennanceBaseApi class RecreateSlaveSerializer(serializers.ModelSerializer): class Meta: model = Recreate...
globocom/database-as-a-service
dbaas/api/recreate_slave.py
Python
bsd-3-clause
770
from pyramid.httpexceptions import HTTPMovedPermanently from pyramid.view import view_config from zeit.redirect.db import Redirect import json @view_config(route_name='redirect', renderer='string') def check_redirect(request): redirect = Redirect.query().filter_by(source=request.path).first() if redirect: ...
ZeitOnline/zeit.redirect
src/zeit/redirect/redirect.py
Python
bsd-3-clause
710
__author__ = 'Cedric Da Costa Faro' from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField, validators from wtforms.validators import Required, Length, Email, Regexp, EqualTo from wtforms import ValidationError from ..models import User # We allow here a user to be c...
cdcf/time_tracker
app/auth/forms.py
Python
bsd-3-clause
1,942
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import os import os.path import pickle import shutil import threading import time import flask from .status import Status, StatusCls from digits.config import config_value from digits.utils import sizeof_fmt, ...
brainstorm-ai/DIGITS
digits/job.py
Python
bsd-3-clause
7,819
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'FilerMigrate' db.create_table(u'maintenance_filermigrate'...
globocom/database-as-a-service
dbaas/maintenance/migrations/0038_auto__add_filermigrate.py
Python
bsd-3-clause
59,365
from makeapp.appconfig import Config class PytestPluginConfig(Config): parent_template = ['pytest'] makeapp_config = PytestPluginConfig
idlesign/makeapp
makeapp/app_templates/pytestplugin/makeappconf.py
Python
bsd-3-clause
145
from django.contrib import admin from .models import Gallery, Photo class PhotoInline(admin.StackedInline): model = Photo extra = 1 class GalleryAdmin(admin.ModelAdmin): inlines = [PhotoInline] admin.site.register(Gallery, GalleryAdmin)
gygcnc/gygcnc
gygcnc/image_gallery/admin.py
Python
bsd-3-clause
255
import json from copy import deepcopy from django.conf import settings from django.contrib.auth.decorators import permission_required from django.core.cache import cache from django.core.exceptions import ObjectDoesNotExist from django.core.paginator import EmptyPage from django.db import IntegrityError from django.fo...
diefenbach/django-lfs
lfs/manage/product/variants.py
Python
bsd-3-clause
31,374
"""The Quantum Object (Qobj) class, for representing quantum states and operators, and related functions. """ __all__ = ['Qobj', 'qobj_list_evaluate', 'ptrace', 'dag', 'isequal', 'issuper', 'isoper', 'isoperket', 'isoperbra', 'isket', 'isbra', 'isherm', 'shape', 'dims'] import warnings import ty...
cgranade/qutip
qutip/qobj.py
Python
bsd-3-clause
79,002
""" WSGI config for django_model_deploy project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_AP...
juanpex/django-model-deploy
test_project/wsgi.py
Python
bsd-3-clause
1,153
from mozbadges.views.generic.detail import HybridDetailView from mozbadges.views.generic.list import HybridListView from models import Team class TeamDetailView(HybridDetailView): model = Team pk_url_kwarg = 'team' context_object_name = 'team' template_name = 'teams/detail.html' class TeamListView(H...
mozilla/mozilla-badges
mozbadges/site/teams/views.py
Python
bsd-3-clause
501
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
leighpauls/k2cro4
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
Python
bsd-3-clause
22,390
from numpy import * import scipy.stats from SloppyCell.ReactionNetworks import * import example_net, example_model # # Calculate an ensemble # # Step scale = 3 gives faster convergence for this problem. print("Generating ensemble") ens_data, costs, ratio = Ensembles.ensemble_log_params(example_model.m, ...
GutenkunstLab/SloppyCell
Example/Robertson/generate_ensembles_predictions.py
Python
bsd-3-clause
3,417
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root # for license information. import sys # Py3 compat - alias unicode to str, and xrange to range try: unicode # noqa except NameError: unicode = str try: xrange # noq...
SlicerRt/SlicerDebuggingTools
PyDevRemoteDebug/ptvsd-4.1.3/ptvsd/safe_repr.py
Python
bsd-3-clause
10,856
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import patterns, url from django.contrib import admin from django.core.urlresolvers import reverse, NoReverseMatch from django.db.models.fields import Field, FieldDoesNotExist from django.forms import...
rfleschenberg/django-shop
shop/admin/order.py
Python
bsd-3-clause
8,117
from datetime import datetime from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from django.contrib.auth.models import User,Group,Permission from django.contrib.contenttypes.models import ContentType from annotatetext.models import Annotation from actstream.m...
daonb/django-committee
src/committee/tests.py
Python
bsd-3-clause
7,138
# -*- coding: utf-8 -*- from django import forms class SearchForm(forms.Form): query = forms.CharField(required=False)
estebistec/django-get-forms
examples/demo/demo/forms.py
Python
bsd-3-clause
127
from decimal import Decimal from address import account_from_human from utils import * #------------------------------------------------------------------------------- FIELD_MAP = { 'Account': (8, 1), 'Amount': (6, 1), 'ClearFlag': (2, 34), 'Destination': (8, 3), 'DestinationTag': (2, 14), 'Fee': (6, ...
johansten/stellar-py
stellar/serialize.py
Python
bsd-3-clause
4,565
import os import sys import logging __all__ = [ 'clear_root_handlers', 'setup_console_logging', 'setup_file_logging' ] DEFAULT_DATE_FORMAT = '%a, %d %b %Y %H:%M:%S' DEFAULT_LOG_FORMAT = '%(asctime)s [%(levelname)s] %(message)s' DEFAULT_LOG_LEVEL = logging.INFO class NullHandler(logging.Handler): def ...
m00dawg/holland
holland/core/log.py
Python
bsd-3-clause
1,274
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
flgiordano/netcash
+/google-cloud-sdk/lib/googlecloudsdk/api_lib/functions/cloud_storage.py
Python
bsd-3-clause
1,984
from __future__ import absolute_import, print_function import os import logging from topik.intermediaries.raw_data import output_formats # imports used only for doctests from topik.tests import test_data_path logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging....
kcompher/topik
topik/readers.py
Python
bsd-3-clause
15,758