code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
"""mlshopping URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
stodola/mlshopping
mlshopping/urls.py
Python
apache-2.0
1,219
from typing import Any, Dict, List from packed import packable from ...requests import Request from ...resolvers import Resolver from .._resolvable_matcher import ResolvableMatcher from ._logical_matcher import LogicalMatcher __all__ = ("AllMatcher",) @packable("jj.matchers.AllMatcher") class AllMatcher(LogicalMat...
nikitanovosibirsk/jj
jj/matchers/logical_matchers/_all_matcher.py
Python
apache-2.0
1,204
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
platformio/platform-atmelsam
builder/frameworks/_bare.py
Python
apache-2.0
2,207
# # Copyright (c) 2017 Juniper Networks, Inc. All rights reserved. # """ VNC management for kubernetes """ import gevent from gevent.queue import Empty import requests import argparse import uuid from cStringIO import StringIO from cfgm_common import importutils from cfgm_common import vnc_cgitb from cfgm_common.ex...
eonpatapon/contrail-controller
src/container/kube-manager/kube_manager/vnc/vnc_kubernetes.py
Python
apache-2.0
24,698
from Firefly import logging from Firefly.components.zwave.zwave_device import ZwaveDevice from Firefly.const import (EVENT_ACTION_OFF) TITLE = 'Aeotec ZW117 Range Extender' DEVICE_TYPE = 'UNKNONW' AUTHOR = 'Zachary Priddy' COMMANDS = [] REQUESTS = [] INITIAL_VALUES = { '_state': EVENT_ACTION_OFF } def Setup(firefl...
Firefly-Automation/Firefly
Firefly/components/zwave/aeotec/zw117_range_extender_6.py
Python
apache-2.0
812
from django.db import models import requests import json import time import re import googlemaps import csv from random_words import RandomWords import pyusps_modified import os #reading in apikey for goog and USPS APIKEY = os.environ.get('GOOG_API_KEY') USPSKEY = os.environ.get('USPS_KEY') #initializing google maps ...
cszc/Meet-Halfway
meethalfway/models.py
Python
apache-2.0
19,090
#!/usr/bin/env python # # Broadcasts a dictionary from 0 to all the other processes in COMM_WORLD # # # agomez (at) tacc.utexas.edu # 30 Oct 2014 # # --------------------------------------------------------------------- from mpi4py import MPI comm = MPI.COMM_WORLD if comm.rank == 0: data = {'key1' : [7, 2.72, 2+...
antoniogi/HPC
Python/TACC_HPC/4_mpi4py/bcast_dict.py
Python
apache-2.0
455
import os import unittest from pyramid import testing from mock import Mock, MagicMock, patch, mock_open from .. deploy.deploy import Deployment from .. deploy.helion_cli import HelionCliComposer from .. deploy.batch import Batch from .. logger import getLogger logger = getLogger(__name__) class DeployTests(unittes...
dockerian/pyapi
pyapi/addins-api/localapi/tests/deploy_test.py
Python
apache-2.0
5,026
# Copyright 2020 Google LLC # # 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, ...
GoogleCloudPlatform/professional-services-data-validator
data_validation/query_builder/random_row_builder.py
Python
apache-2.0
1,718
"""Support for tasks, coroutines and the scheduler.""" __all__ = ['Task', 'FIRST_COMPLETED', 'FIRST_EXCEPTION', 'ALL_COMPLETED', 'wait', 'wait_for', 'as_completed', 'sleep', 'gather', 'shield', 'ensure_future', 'run_coroutine_threadsafe', 'timeout', ] import conc...
IronLanguages/ironpython3
Src/StdLib/Lib/asyncio/tasks.py
Python
apache-2.0
26,558
''' Copyright 2014-2016 PTIN 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 wr...
T-NOVA/WICM
database/nap.py
Python
apache-2.0
4,805
from __future__ import absolute_import, division, print_function, unicode_literals import logging from amaascore.books.utils import json_to_book from amaascore.core.interface import Interface class BooksInterface(Interface): def __init__(self, environment=None, logger=None, endpoint=None, username=None, passwo...
amaas-fintech/amaas-core-sdk-python
amaascore/books/interface.py
Python
apache-2.0
8,095
import sqlalchemy as sa from enum import Enum from sqlalchemy.ext import declarative # this is incredible thread-safe (because of a sqlalchemy magic) _scoped_session = None def create_db_session(database_url=None): global _scoped_session if database_url is None and _scoped_session is None: raise Runt...
AdRoll/slackask
models.py
Python
apache-2.0
2,302
# Copyright 2016 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...
google/pyu2f
pyu2f/hid/macos.py
Python
apache-2.0
15,975
# Copyright 2015 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 ...
openstack/tripleo-common
tripleo_common/tests/image/test_image_uploader.py
Python
apache-2.0
106,811
# coding=utf-8 # Copyright 2017 The Tensor2Tensor Authors. # # 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...
waterblue13/tensor2tensor
tensor2tensor/data_generators/tokenizer.py
Python
apache-2.0
6,177
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
JimJiangX/BoneDragon
example/db/sqlalchemy/migration.py
Python
apache-2.0
3,712
import socket class dns: def __init__(self): self.socket = socket.socket() def run(self, config): ret = { 'ok': None, 'message': None } # Check for mandatory parameters if not 'host' in config: ret['ok'] = False ret['message'] = 'No server to check' ...
Lex-Persona/SupExt
supext/modules/tests/dns.py
Python
apache-2.0
916
# Copyright (c) 2016 PaddlePaddle 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 applic...
reyoung/Paddle
python/paddle/fluid/layers/learning_rate_scheduler.py
Python
apache-2.0
12,303
# -*- coding: utf-8 -*- """ Test github actions and backing library """ # Because pylint can't figure out dynamic attributes for config or sh # pylint: disable=no-member from functools import partial import json import httpretty import mock from orcoursetrion.actions import ( create_export_repo, rerun_studio...
mitodl/orcoursetrion
orcoursetrion/tests/test_action.py
Python
bsd-2-clause
11,922
# SPDX-License-Identifier: BSD-2-Clause # pylint: skip-file # # NOTE: this file, as all the others in this directory, run in the same global # context as their runner (run_interactive_test). just_run_vim_and_exit() do_interactive_actions( "vim2", [ r"cd /usr/lib/vim/samples{ret}vim perl.pl{ret}", r"...
vvaltchev/experimentOs
tests/interactive/vim2.py
Python
bsd-2-clause
456
# Define a Dictionary, population, # that provides information # on the world's largest cities. # The key is the name of a city # (a string), and the associated # value is its population in # millions. # Key | Value # Shanghai | 17.8 # Istanbul | 13.3 # Karachi | 13.0 # Mumbai | 12.5 population...
ezralalonde/cloaked-octo-sansa
05/qu/07.py
Python
bsd-2-clause
442
# -*- coding: utf-8 -*- """ Created on Sun Jun 25 22:58:30 2017 @author: Winand https://pythonspot.com/en/create-a-chrome-plugin-with-python/ """ from pathlib import Path import shutil import threading import win32file import win32con import winnt import time from pyscript import script2js, parser0 import sys import...
Winand/pychromext
build.py
Python
bsd-2-clause
10,430
from flask import render_template, request from weblab.webclient.web.flask_app import flask_app @flask_app.route("/upload", methods=["GET", "POST"]) def upload(): if request.method == "POST": file = request.files["file"] if file and file.filename.endswith("png"): file.save("/tmp/saved...
zstars/weblabdeusto
server/src/weblab/core/webclient/web/view_upload.py
Python
bsd-2-clause
368
""" Text images of expressions. """ import sys from . import constants as c from . import declarations from . import tags as t # Helpers # ============================================================================ def perror(message): """ Shorthand to print to `stderr`. """ print(message, file=sys.stderr...
Hibou57/PostiATS-Utilities
postiats/images.py
Python
bsd-2-clause
11,577
import scrapy class MailSpider(scrapy.Spider): name = "emails" start_urls = [ 'https://www.hs-niederrhein.de/elektrotechnik-informatik/personen/', ] def parse(self, response): persons = response.css("div.tx-iwpersonen-pi1-item-box") for person in persons: mail = person.css("a.font-size-11::text").extrac...
LdPx/Scrap-this...-and-that
tutorial/spiders/mail_spider.py
Python
bsd-2-clause
468
from __future__ import unicode_literals from django.apps import AppConfig class AlbumcreatorConfig(AppConfig): name = 'AlbumCreator'
onurhunce/AutoAlbumCreator
Assignment/AlbumCreator/apps.py
Python
bsd-2-clause
140
__author__ = 'johannes' from devviz import app from devviz.views import View from flask import render_template class ChartView(View): url = 'chart' name = 'Charts and Plots' script = """ <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script> <script src...
hildensia/devviz
devviz/views/chart.py
Python
bsd-2-clause
1,135
### ### This file was automatically generated ### from archinfo.arch import register_arch, Endness, Register from .common import ArchPcode class ArchPcode_PowerPC_BE_64_A2_32addr(ArchPcode): name = 'PowerPC:BE:64:A2-32addr' pcode_arch = 'PowerPC:BE:64:A2-32addr' description = 'Power ISA 3.0 Big Endian w...
angr/angr
angr/engines/pcode/arch/ArchPcode_PowerPC_BE_64_A2_32addr.py
Python
bsd-2-clause
128,832
''' Created by auto_sdk on 2015.04.21 ''' from aliyun.api.base import RestApi class Bss20140714SetResourceBusinessStatusRequest(RestApi): def __init__(self,domain='bss.aliyuncs.com',port=80): RestApi.__init__(self,domain, port) self.BusinessStatus = None self.ResourceId = None self.ResourceType = None...
wanghe4096/website
aliyun/api/rest/Bss20140714SetResourceBusinessStatusRequest.py
Python
bsd-2-clause
414
from interface import CVODE_IVP_Integrator
bjodah/symodesys
symodesys/sundials/__init__.py
Python
bsd-2-clause
43
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest from model import * class ModelBuilderTestCase(unittest.TestCase): def testAddNode(self): b = ModelBuilder() b.addNode("a") m = b.consume() self.assertTrue("a" in m.nodes) self.assertFalse("b" in m.nodes) def testRemoveNode(self): b ...
verhoevenv/semcplogic
semcplogic/modeltests.py
Python
bsd-2-clause
772
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2015-2017, Fabian Greif # All Rights Reserved. # # The file is part of the lbuild project and is released under the # 2-clause BSD license. See the file `LICENSE.txt` for the full license # governing this code. import os import sys import unittest # Hac...
dergraaf/library-builder
test/config_test.py
Python
bsd-2-clause
5,927
import unittest from collections import namedtuple import time from io import StringIO import sys import traceback (SUCCESS, FAILURE, ERROR, SKIPPED) = range(4) ResultStatusMap = { SUCCESS: "success", FAILURE: "failure", ERROR: "error", SKIPPED: "skipped" } TestCounters = namedtuple("TestCounters", ...
ameily/pyjotr
pyjotr/tests.py
Python
bsd-2-clause
3,599
# https://code.google.com/p/salmon-protocol/source/browse/trunk/salmon-playground/dumper.py """dumper Dump Python data structures (including class instances) in a nicely- nested, easy-to-read form. Handles recursive data structures properly, and has sensible options for limiting the extent of the dump both by simple ...
wakitus/peaky
src/dumper.py
Python
bsd-2-clause
20,166
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
jkyeung/XlsxWriter
xlsxwriter/test/comparison/test_cond_format05.py
Python
bsd-2-clause
1,497
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
cnheitman/barf-project
barf/analysis/gadget/gadgetverifier.py
Python
bsd-2-clause
15,050
#Copyright (c) 2013, Regents of the University of California #All rights reserved. # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are met: # #1. Redistributions of source code must retain the above copyright notice, #this list of...
amplab/smash
smashbenchmarking/vcf_eval/eval_helper.py
Python
bsd-2-clause
16,887
# Copyright (c) 2012, Robert Fielding <rf@tamasi.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # lis...
rooprob/pyacter
pyacter/__init__.py
Python
bsd-2-clause
1,428
# -*- coding: utf-8 -*- """ Pygments basic API tests ~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import random import unittest from pygments import lexers, formatters, fi...
kirbyfan64/pygments-unofficial
tests/test_basic_api.py
Python
bsd-2-clause
10,634
# Copyright (c) 2020 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
Yubico/yubikey-manager
yubikit/management.py
Python
bsd-2-clause
16,733
""" Scan a large frequency range at a given frequency resolution. At each LO frequency, scan using positive baseband frequencies and save one SweepArray. """ from __future__ import division import time import numpy as np from kid_readout.roach import analog, hardware_tools, tools from kid_readout.measurement import ...
ColumbiaCMB/kid_readout
apps/data_taking_scripts/cooldown/2017-11-23_starcryo/r2h14_scan.py
Python
bsd-2-clause
4,916
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('warehouse', '0021_importjob_conversation'), ] operations = [ migrations.AddField( model_name='importjob', ...
smn/goggles
goggles/warehouse/migrations/0022_importjob_profile.py
Python
bsd-2-clause
466
import six from babel import numbers, Locale from flask import current_app from flask_babel import format_datetime, get_locale from .. import babel if six.PY3: unicode = str def currencyfmt(currency): # We're only formatting ISK, so it has a bit of a special format number = numbers.format_decimal(curren...
paxswill/evesrp
src/evesrp/util/locale.py
Python
bsd-2-clause
1,016
from __future__ import absolute_import from collections import Iterable, Mapping, OrderedDict import atexit import datetime import time import os import re import warnings import alembic.ddl import sqlalchemy import six DATABASE_NAME = os.environ.get("SCRAPERWIKI_DATABASE_NAME", "sqlit...
tlevine/scraperwiki-python
scraperwiki/sql.py
Python
bsd-2-clause
10,644
# Copyright (c) 2011, Enthought, Ltd. # Author: Pietro Berkes <pberkes@enthought.com> # License: Modified BSD license (2-clause) from traits.has_traits import on_trait_change from traits.trait_types import Instance, Str, Range, Button, Int, Enum from traitsui.editors.range_editor import RangeEditor from traitsui.group...
enthought/uchicago-pyanno
pyanno/ui/model_a_view.py
Python
bsd-2-clause
5,879
from fabric.api import * env.repo_base = "https://dev.lagrummet.se/svn/rinfo" env.repo_tags = "%(repo_base)s/tags"%env TAG_PATTERN = r"^\w[a-z-_0-9\.]+-\d+(?:\.\d+)?(?:-\w+)$" def tag_release(tag=None): env.tag = tag if not env.tag: prompt('Tag:', "tag", validate=TAG_PATTERN) env.msg = "Tagging %...
rinfo/rdl
manage/project/svn.py
Python
bsd-2-clause
500
"""Module containing Builder class.""" from .builder_base import BuilderBase from .builder_base import BuilderManyBody from .builder_elph import BuilderElPh from .builder_elph import BuilderManyBodyElPh # noinspection PyUnresolvedReferences class Builder(BuilderBase): """ Class for building the system for st...
gedaskir/qmeq
qmeq/builder/builder.py
Python
bsd-2-clause
7,458
from __future__ import generators from schema import * import classutil def update_graph(self,graph): 'save nodes and edges of graph to self' for node,d in graph.iteritems(): self += node saveDict = self[node] for target,edge in d.iteritems(): saveDict[target] = edge ...
ctb/pygr
pygr/mapping.py
Python
bsd-3-clause
31,511
from django.test import TestCase from django.core.urlresolvers import reverse from .factories import PageFactory from waliki.settings import WALIKI_DATA_DIR from waliki.models import Page from waliki.git import Git import json import os import shutil from sh import git git = git.bake("--no-pager", _tty_out=False) cla...
fpytloun/waliki
tests/test_git_webhook.py
Python
bsd-3-clause
3,004
""" Functions for parsing GTF files """ def parseID(GTFline, ID, version=3): padding = 2 start=GTFline[8].find(ID) start+=len(ID)+padding length = GTFline[8][start:].find(";") return(GTFline[8][start:start+length].strip('"'))
jeffhsu3/genda
genda/parsing/gtfTools.py
Python
bsd-3-clause
237
# -*- coding: utf-8 -*- from flask_wtf import FlaskForm from wtforms.fields import TextField, TextAreaField, BooleanField, IntegerField from wtforms.validators import DataRequired, Email, NumberRange from wtforms.ext.sqlalchemy.fields import QuerySelectField from purchasing.data.contracts import ContractType class ...
CityofPittsburgh/pittsburgh-purchasing-suite
purchasing/scout/forms.py
Python
bsd-3-clause
2,564
"""Utility functions for working with Django Migrations.""" from __future__ import unicode_literals from importlib import import_module import django try: # Django >= 1.7 from django.core.management.sql import (emit_post_migrate_signal, emit_pre_migrate_signal) ...
beanbaginc/django-evolution
django_evolution/utils/migrations.py
Python
bsd-3-clause
33,403
from django.conf.urls.defaults import * urlpatterns = patterns('djcorsche.students.views', url( r'^getstudentexams/$', 'getstudentexams', name="getstudentexams" ), url( r'^searchwithincourse/$', 'getjquerystudents', name="getjquerystudents" ), url( r'^addtoex...
carthagecollege/django-djcorsche
djcorsche/students/urls.py
Python
bsd-3-clause
669
"""Test functions for simbad.mr.molrep_mr""" __author__ = "Adam Simpkin" __date__ = "20 Feb 2018" import os import tempfile import unittest import simbad import simbad.mr.molrep_mr class Test(unittest.TestCase): """Unit test""" def test_check_contrast_1(self): """Test case for simbad.mr.molrep_mr.c...
rigdenlab/SIMBAD
simbad/mr/tests/test_molrep_mr.py
Python
bsd-3-clause
4,436
"""The WaveBlocks Project This file contains the Hagedorn propagator class for inhomogeneous wavepackets. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012, 2015 R. Bourquin @license: Modified BSD License """ from numpy import dot, eye, atleast_2d from numpy.linalg import inv, det from WaveBlocksND.Pr...
WaveBlocks/WaveBlocksND
WaveBlocksND/HagedornPropagatorInhomogeneous.py
Python
bsd-3-clause
7,754
''' Calculates the average RMSF for each residue in the trajectory using MDAnalysis's RMSF method. Output: If called using shortcut for multiple residues, returned is a single csv called rmsfs.csv containg the resname, resid, and trajectory number e.g. resname | resid | traj_1 | resid | traj_2 ... LEU | 1 | 1...
dkoes/md-scripts
rmsf.py
Python
bsd-3-clause
3,438
# Import USB support depending on version of pyUSB try: import usb.core import usb.util USBVER=1 import sys print >>sys.stderr, "Warning: You are using pyUSB 1.x, support is in beta." except ImportError: import usb #print("Warning: You are using pyUSB 0.x, future deprecation planned.") U...
JonathonReinhart/killerbee
killerbee/dev_rzusbstick.py
Python
bsd-3-clause
21,178
# Generated by Django 2.2.10 on 2020-04-23 15:49 from django.db import migrations import machina.core.validators import machina.models.fields class Migration(migrations.Migration): dependencies = [ ('forum_member', '0004_auto_20181103_1406'), ] operations = [ migrations.AlterField( ...
ellmetha/django-machina
machina/apps/forum_member/migrations/0005_auto_20200423_1049.py
Python
bsd-3-clause
600
#!/usr/bin/env python # Copyright 2012 The Swarming Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 that # can be found in the LICENSE file. """Reads a .isolated, creates a tree of hardlinks and runs the test. To improve performance, it keeps a local cache. Th...
guorendong/iridium-browser-ubuntu
tools/swarming_client/run_isolated.py
Python
bsd-3-clause
12,341
# A list of our CSS and JS assets for jingo-minify. CSS = { 'mkt/admin': ( 'css/zamboni/zamboni.css', 'css/zamboni/mkt-admin.css', 'css/zamboni/admin-django.css', ), 'mkt/devreg': ( # Contains reset, clearfix, etc. 'css/devreg/base.css', # Base styles (body,...
ngokevin/zamboni
mkt/asset_bundles.py
Python
bsd-3-clause
9,529
# -*- coding: utf-8 -*- """ Jokes from stackoverflow - provided under CC BY-SA 3.0 http://stackoverflow.com/questions/234075/what-is-your-best-programmer-joke?page=4&tab=votes#tab-top """ neutral = [ "Complaining about the lack of smoking shelters, the nicotine addicted Python programmers said there ought to be '...
borjaayerdi/pyjokes
pyjokes/jokes_en.py
Python
bsd-3-clause
15,994
""" Test behavtask_tr module the following functions: merge_cond events2neural_extend Run with:: **Run from project-theta directory with 'make test' """ # Loading modules. from __future__ import absolute_import, division, print_function import numpy as np import os import sys from numpy.testing import ass...
berkeley-stat159/project-theta
code/utils/tests/test_behavtask_tr.py
Python
bsd-3-clause
1,805
from lektor.types.base import BadValue # noqa - reexport from lektor.types.base import get_undefined_info # noqa - reexport from lektor.types.base import RawValue # noqa - reexport from lektor.types.base import Type # noqa - reexport from lektor.types.fake import HeadingType from lektor.types.fake import InfoType f...
lektor/lektor
lektor/types/__init__.py
Python
bsd-3-clause
1,735
# Generated by Django 2.1.3 on 2018-12-04 06:04 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('menu', '0010_auto_20180913_0841'), ] operations = [ migrations.AlterModelOptions( name='menu', options={'ordering': ['pk'], ...
UITools/saleor
saleor/menu/migrations/0011_auto_20181204_0004.py
Python
bsd-3-clause
396
# # # from django.conf.urls import url from . import views urlpatterns = [ url(r'^(?P<medium_id>[0-9]+)$', views.detailed_media, name="media"), ]
Technikradio/C3FOCSite
c3shop/frontpage/mediaurls.py
Python
bsd-3-clause
152
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('product', '0005_auto_20150212_1137'), ] operations = [ migrations.RemoveField( model_name='transaction', ...
CorbanU/corban-shopify
shopify/product/migrations/0006_auto_20150302_1133.py
Python
bsd-3-clause
570
""" byceps.blueprints.snippet.signals ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from blinker import Namespace snippet_signals = Namespace() snippet_created = snippet_signals.signal('snippet-created') snippet_updated = snippet_...
m-ober/byceps
byceps/blueprints/snippet/signals.py
Python
bsd-3-clause
354
import re from kol.request.GenericRequest import GenericRequest class CustomOutfitListRequest(GenericRequest): """Gets a list of custom outfits""" _matcher = re.compile(r'(?i)<b>#(\d+)</b></td><td><input type=text class=text size=30 name=name(?:\d*) value="([^"]+)"></td><td align=center><input type=checkbox n...
ijzer/cwbot-ndy
cwbot/kolextra/request/CustomOutfitListRequest.py
Python
bsd-3-clause
1,244
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
certik/sympy-oldcore
sympy/plotting/pyglet/media/lib_alc.py
Python
bsd-3-clause
12,359
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('historias', '0013_auto_20150426_1541'), ] operations = [ migrations.AlterField( model_name='hist...
btenaglia/hpc-historias-clinicas
hpc-historias-clinicas/historias/migrations/0014_auto_20150426_1545.py
Python
bsd-3-clause
1,028
import os from django.conf import settings, global_settings from oscar.defaults import OSCAR_SETTINGS from oscar import OSCAR_CORE_APPS if not settings.configured: # Helper function to extract absolute path location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), x) settings.configur...
snowball-one/django-oscar-easyrec
tests/config.py
Python
bsd-3-clause
2,129
"""Unit tests for the Milestone class.""" import github3 from .helper import UnitIteratorHelper, create_url_helper,create_example_data_helper get_milestone_example_data = create_example_data_helper('milestone_example') example_data = get_milestone_example_data() url_for = create_url_helper("https://api.github.com/re...
degustaf/github3.py
tests/unit/test_issues_milestone.py
Python
bsd-3-clause
908
"""This module defines some handy :py:class:`Importable` elements. An ``Importable`` is usually composed of two different parts: * A *natural key* used to identify *the same* element across different systems. This is the only required component for an ``Importable``. * An optional set of properties that form *the ...
pbs/importtools
importtools/importables.py
Python
bsd-3-clause
15,420
import serial import sys from time import sleep def get_connection(): locations= ['/dev/tty.usbmodemfd121', '/dev/ttyACM0', '/dev/tty.usbserial-A700dYwR'] for device in locations: try: print "Trying...",device robot = serial.Serial(devi...
sharnett/MobileAC2
remote.py
Python
bsd-3-clause
714
"""Orthogonal matching pursuit algorithms """ # Author: Vlad Niculae # # License: BSD 3 clause import warnings import numpy as np from scipy import linalg from scipy.linalg.lapack import get_lapack_funcs from .base import LinearModel, _pre_fit from ..base import RegressorMixin from ..utils import array2d, as_float_...
depet/scikit-learn
sklearn/linear_model/omp.py
Python
bsd-3-clause
31,682
import logging l = logging.getLogger("abg") import flask from flask import Blueprint, flash, redirect, render_template, request, url_for from flask_login import login_required, login_user, logout_user from flask import Markup from flask import send_file from flask import abort l.error("flask") from abg_stats.extension...
jacobSingh/allbackgammongroup
abg_stats/abg/views/player.py
Python
bsd-3-clause
7,454
import os import twitinfo from private_settings import * DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Adam Marcus', 'marcua@csail.mit.edu'), # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/...
mitdbg/twitinfo
server/settings.py
Python
bsd-3-clause
2,693
from django.conf.urls.defaults import * handler500 = 'djangotoolbox.errorviews.server_error' urlpatterns = patterns('', url(r'^$', 'mapsapp.views.index'), url(r'^mapsapp/$', 'mapsapp.views.index'), url(r'^mapsapp/map/$', 'mapsapp.views.map'), url(r'^mapsapp/geoip/$', 'mapsapp.views.geoip') )
dlopes-samba/dlopes-maps-sambatech
urls.py
Python
bsd-3-clause
300
from django.contrib.sitemaps import Sitemap class StaticFilePage: "Custom Page class for use with static template in sitemaps" def __init__(self, url): self.url = url def get_absolute_url(self): return self.url class StaticFileSitemap(Sitemap): "Custom Sitemap Class for use with static...
django-de/django-de-v2
django_de/sitemaps.py
Python
bsd-3-clause
696
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
elgertam/eastpy
setup.py
Python
bsd-3-clause
1,424
import os from .errors import parse_log class LatexError(Exception): pass class LatexBuildError(LatexError): """LaTeX call exception.""" # the binary log is probably latin1 or utf8? # utf8 throws errors occasionally, so we try with latin1 # and ignore invalid chars LATEX_MESSAGE_ENCODING =...
mbr/latex
latex/exc.py
Python
bsd-3-clause
928
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0006_auto_20150724_1935'), ] operations = [ migrations.AddField( model_name='county', name='...
mjtamlyn/archery-scoring
core/migrations/0007_auto_20150724_1945.py
Python
bsd-3-clause
638
"""autogenerated by genpy from segment_plans_objects/ImageArray.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import std_msgs.msg import sensor_msgs.msg class ImageArray(genpy.Message): _md5sum = "2d45007bb1ef655f17889f52265cf557" _type = "segm...
GuidoManfredi/ManipLearning
segment_plans_objects/src/segment_plans_objects/msg/_ImageArray.py
Python
bsd-3-clause
10,054
import logging from pylons import request, response, session, tmpl_context as c from pylons.controllers.util import abort, redirect from kai.lib.base import BaseController, render from kai.model import Article, Comment, Snippet, Paste from kai.websetup import sync_db log = logging.getLogger(__name__) class HomeCont...
Pylons/kai
kai/controllers/home.py
Python
bsd-3-clause
2,502
#!/usr/bin/python import sys import getopt from amsoil import config from amsoil.core import pluginmanager as pm def print_usage(): print "USAGE: ./main.py [--help] [--worker]" print print "When no option is specified, the server will be started." print print " --help Print this help message....
GENI-NSF/geni-soil
src/main.py
Python
bsd-3-clause
1,069
from __future__ import annotations import random import pytest from cctbx import sgtbx from dials.algorithms.symmetry.cosym._generate_test_data import generate_intensities from dials.array_family import flex from dxtbx.model import Beam, Crystal, Experiment, Scan from dxtbx.model.experiment_list import ExperimentLis...
xia2/xia2
tests/Modules/Scaler/test_DialsScalerHelper.py
Python
bsd-3-clause
14,996
"""I/O from symbolic expressions. """ from .symbolic import * from .symbolic import _infix_operators,_prefix_operators,_builtin_functions from ..io import loader import json from json import encoder import weakref import sys import warnings VAR_PREFIX = '' USER_DATA_PREFIX = '$' NAMED_EXPRESSION_TAG = '#' NAMED_EXPRE...
krishauser/Klampt
Python/klampt/math/symbolic_io.py
Python
bsd-3-clause
29,191
from zeit.cms.repository.interfaces import IAutomaticallyRenameable from zeit.content.article.edit.header import HEADER_NAME from zope.schema.interfaces import SchemaNotFullyImplemented import gocept.lxml.interfaces import grokcore.component as grok import lxml.etree import lxml.objectify import zeit.content.article.ed...
ZeitOnline/zeit.content.article
src/zeit/content/article/edit/body.py
Python
bsd-3-clause
8,041
""" Flask web app that exposes a restful API to obs """ import datetime import uuid import flask.json from flask import Flask, request, jsonify, _request_ctx_stack, g from flask_cors import cross_origin import redis import dateutil.parser from jwtauth import requires_auth, handle_error app = Flask(__name__) # dum...
esc24/restfulobs
server.py
Python
bsd-3-clause
2,906
# 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 model 'PackageIndex' db.create_table('djangopypi_mirroring_packageindex', ( ('id', se...
benliles/djangopypi-mirroring
djangopypi_mirroring/migrations/0001_initial.py
Python
bsd-3-clause
7,108
# 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 model 'ChatRoom' db.create_table('foundry_chatroom', ( ('modelbase_ptr', self.gf('dja...
praekelt/jmbo-foundry
foundry/migrations/0005_auto__add_chatroom.py
Python
bsd-3-clause
22,612
""" Troika Namespaced Package ========================= """ __import__('pkg_resources').declare_namespace(__name__)
troika-framework/troika-http
troika/__init__.py
Python
bsd-3-clause
117
#!/usr/bin/env python import roslib; roslib.load_manifest('smacha') import rospy import smach import smach_ros from smacha.srv import GripperSrv from smacha.srv import GripperSrvRequest from smacha.srv import GripperSrvResponse from geometry_msgs.msg import * def gripper_srv(req): if req.max_effort > 5.0: ...
ReconCell/smacha
smacha/test/executive_smach_tutorials/smach_tutorials/examples/service_test.py
Python
bsd-3-clause
2,922
from django.db import models class Article(models.Model): headline = models.CharField(max_length=100, default='Default headline') pub_date = models.DateTimeField() def __unicode__(self): return self.headline class Meta: app_label = 'fixtures_model_package' ordering = ('-pub_da...
disqus/django-old
tests/modeltests/fixtures_model_package/models/__init__.py
Python
bsd-3-clause
338
# -*-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/primaires/autoquetes/v_editeur.py
Python
bsd-3-clause
7,132
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
ericmjl/bokeh
tests/unit/bokeh/sampledata/test_olympics2014.py
Python
bsd-3-clause
2,040
from muffin import Application from muffin_classy import MuffinView, route from functools import wraps VALUE1 = "value1" def get_value(): return VALUE1 app = Application('example') class IndexView(MuffinView): def index(self, request): """A docstring for testing that docstrings are set""" ...
ei-grad/muffin-classy
example.py
Python
bsd-3-clause
6,242
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'glue/qt/ui/scatterwidget.ui' # # Created: Wed Jul 31 15:07:26 2013 # by: pyside-uic 0.2.13 running on glue.external.qt 1.1.0 # # WARNING! All changes made in this file will be lost! from glue.external.qt import QtCore, QtGui class Ui_...
glue-viz/glue-qt
glue/qt/ui/scatterwidget.py
Python
bsd-3-clause
12,113
# -*- coding: utf-8 -*- """ click ~~~~~ Click is a simple Python module that wraps the stdlib's optparse to make writing command line scripts fun. Unlike other modules, it's based around a simple API that does not come with too much magic and is composable. In case optparse ever gets removed ...
cbandera/click
click/__init__.py
Python
bsd-3-clause
2,813