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
import pandas as pd from bokeh.sampledata.glucose import data from bokeh.plotting import * output_file("glucose.html", title="glucose.py example") hold() dates = data.index.to_series() figure(x_axis_type="datetime", tools="pan,wheel_zoom,box_zoom,reset,previewsave") line(dates, data['glucose'], color='red', lege...
jakevdp/bokeh
examples/plotting/file/glucose.py
Python
bsd-3-clause
1,674
# -*- coding: utf-8 -*- """This module provides an implementation of full matrix adagrad.""" from __future__ import division from base import Minimizer from mathadapt import sqrt, ones_like, clip, zero_like from scipy.linalg import pinv as scipy_pinv, polar import numpy as np from fjlt.SubsampledRandomizedFourrierTr...
gabobert/climin
climin/adagrad_full.py
Python
bsd-3-clause
4,355
# 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/test/tool_results.py
Python
bsd-3-clause
4,080
""" Tests for images support code. """ __authors__ = "Nicu Tofan" __copyright__ = "Copyright 2015, Nicu Tofan" __credits__ = ["Nicu Tofan"] __license__ = "3-clause BSD" __maintainer__ = "Nicu Tofan" __email__ = "nicu.tofan@gmail.com" if __name__ == '__main__': unittest.main()
TNick/pyl2extra
pyl2extra/testing/tests/test_images.py
Python
bsd-3-clause
286
"""Conuntries Class.""" from fmcapi.api_objects.apiclasstemplate import APIClassTemplate import logging class Countries(APIClassTemplate): """The Countries Object in the FMC.""" VALID_JSON_DATA = ["id", "name", "iso2", "iso3"] VALID_FOR_KWARGS = VALID_JSON_DATA + [] URL_SUFFIX = "/object/countries" ...
daxm/fmcapi
fmcapi/api_objects/object_services/countries.py
Python
bsd-3-clause
1,340
""" owtf.protocols.smtp ~~~~~~~~~~~~~~~~~~~ Description: This is the OWTF SMTP handler, to simplify sending emails. """ from email.mime import base, multipart, text as mimetext from email import encoders import logging import os import smtplib from owtf.utils.file import FileOperations, get_file_as_list __all__ = ["...
owtf/owtf
owtf/protocols/smtp.py
Python
bsd-3-clause
4,525
import guava class IndexController(guava.controller.Controller): def index(self): self.write("Hello World!")
StarfruitStack/guava
benchmark/python/guava/index.py
Python
bsd-3-clause
123
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2005-2006 Christian Boos <cboos@edgewall.org> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as pa...
exocad/exotrac
trac/versioncontrol/web_ui/log.py
Python
bsd-3-clause
21,201
"""Auto-generated file, do not edit by hand. CC metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_CC = PhoneMetadata(id='CC', country_code=61, international_prefix='(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]', general_desc=PhoneNumberDesc(national_number_p...
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/phonenumbers/data/region_CC.py
Python
bsd-3-clause
1,840
from __future__ import division, print_function import os import sys import pickle import copy import sysconfig import warnings from os.path import join from numpy.distutils import log from distutils.dep_util import newer from distutils.sysconfig import get_config_var from numpy._build_utils.apple_accelerate import ( ...
bringingheavendown/numpy
numpy/core/setup.py
Python
bsd-3-clause
40,820
import numpy as np import pytest import pandas.util._test_decorators as td from pandas import ( CategoricalDtype, DataFrame, NaT, Series, Timestamp, ) import pandas._testing as tm from pandas.core.arrays.string_arrow import ArrowStringDtype # noqa: F401 class TestUpdate: def test_update(sel...
datapythonista/pandas
pandas/tests/series/methods/test_update.py
Python
bsd-3-clause
4,683
from test.support import run_unittest from test.support.import_helper import unload, CleanImport from test.support.warnings_helper import check_warnings import unittest import sys import importlib from importlib.util import spec_from_file_location import pkgutil import os import os.path import tempfile import shutil im...
brython-dev/brython
www/src/Lib/test/test_pkgutil.py
Python
bsd-3-clause
21,886
from setuptools import setup, find_packages setup( name='django-citeit', version='3.0.0', packages=find_packages(exclude=['tests*']), description='A Django app for the creation of an annotated bibliography.', long_description=('Visit https://github.com/unt-libraries/django-citeit ' ...
unt-libraries/django-citeit
setup.py
Python
bsd-3-clause
992
import sys from setuptools import setup, find_packages setup( name='bluebird', version='0.1.0', author='Josh Bohde', author_email='josh@joshbohde.com', description=('bluebird is a client for Kestrel queues',), license='BSD', packages=['bluebird', 'bluebird.thrift_kestrel'], install_requ...
joshbohde/bluebird
setup.py
Python
bsd-3-clause
433
from datetime import date, datetime from unittest import TestCase from ccy import period, date2juldate, juldate2date, todate from ccy import date2yyyymmdd, yyyymmdd2date class PeriodTests(TestCase): def testPeriod(self): a = period('5Y') self.assertEqual(a.years, 5) b = period('1y3m') ...
artisavotins/ccy
tests/datetests.py
Python
bsd-3-clause
4,493
from django import forms from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth import authenticate from utils import create_login_ticket class LoginForm(forms.Form): username = forms.CharField(max_length=30) password = forms.CharField(widget=forms.PasswordInput) #warn = forms.B...
Nitron/django-cas-provider
cas_provider/forms.py
Python
bsd-3-clause
757
from __future__ import unicode_literals import array import fcntl import signal import six import termios import tty def get_size(fileno): # Thanks to fabric (fabfile.org), and # http://sqizit.bartletts.id.au/2011/02/14/pseudo-terminals-in-python/ """ Get the size of this pseudo terminal. :param ...
Carreau/python-prompt-toolkit
prompt_toolkit/utils.py
Python
bsd-3-clause
2,862
from .robotcontroller import RobotControllerBlock,RobotControllerIO from klampt.model import trajectory from klampt.io import loader class TrajectoryPositionController(RobotControllerBlock): """A (robot) controller that takes in a trajectory and outputs the position along the trajectory. If type is a 2-tuple,...
krishauser/Klampt
Python/klampt/control/blocks/trajectory_tracking.py
Python
bsd-3-clause
2,931
# Standard imports import jsonpickle as jpickle import logging # Our imports import emission.storage.timeseries.abstract_timeseries as esta import emission.analysis.modelling.tour_model.similarity as similarity import emission.analysis.modelling.tour_model.similarity as similarity import emission.analysis.modelling.to...
e-mission/e-mission-server
emission/analysis/modelling/tour_model_first_only/load_predict.py
Python
bsd-3-clause
6,342
#!/usr/bin/env python # -*- coding: utf-8 -*- # # orientdbcli documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...
ajkaanbal/orientdbcli
docs/conf.py
Python
bsd-3-clause
8,467
from enum import Enum from django.contrib.gis.db import models from django.template.defaulttags import register from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from emstrack.models import UpdatedByModel from emstrack.util import make_choices @register.filter def get_equipment...
EMSTrack/WebServerAndClient
equipment/models.py
Python
bsd-3-clause
4,379
import numpy, pylab, os, sys, csv, pickle from echem_plate_fcns import * from echem_plate_math import * PyCodePath=os.path.split(os.path.split(os.path.realpath(__file__))[0])[0] sys.path.append(os.path.join(PyCodePath,'ternaryplot')) from myternaryutility import TernaryPlot from myquaternaryutility import QuaternaryPlo...
johnmgregoire/JCAPdatavis
plotcustom_selectsamples.py
Python
bsd-3-clause
17,415
#! /usr/bin/env python3 # Import from json import loads as JSONLoad from math import pi as pi,\ sin as Sine,\ cos as Cosine,\ acos as ArcCosine from os.path import exists as Exists from pickle import dump as Pickle,\ load as UnPickle import sys # M...
jeffseif/dogWalkScore
static/py/dogWalkScore.py
Python
bsd-3-clause
39,621
import re from django import forms from parsley.widgets import ParsleyChoiceFieldRendererMixin FIELD_TYPES = [ (forms.URLField, "url"), (forms.EmailField, "email"), (forms.IntegerField, "digits"), (forms.DecimalField, "number"), (forms.FloatField, "number"), ] FIELD_ATTRS = [ ("min_length", ...
blueyed/Django-parsley
parsley/decorators.py
Python
bsd-3-clause
3,640
from setuptools import setup, find_packages setup( name = "django_internal_urls", version = "0.1.0-2", description = 'Add modular url callbacks', author = 'David Danier', author_email = 'david.danier@team23.de', url = 'https://github.com/ddanier/django_internal_urls', #long_description=open...
ddanier/django_internal_urls
setup.py
Python
bsd-3-clause
858
import enum import logging from typing import List, Any, Optional from PyQt5 import QtCore from ....config import Config logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class ComponentType(enum.Enum): Pinhole = 'pinhole' Beamstop = 'beamstop' PinholeSpacer = 'spacer' FlightPipe =...
awacha/cct
cct/core2/instrument/components/geometry/choices.py
Python
bsd-3-clause
15,843
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from cms.models.pluginmodel import CMSPlugin from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from .models import AuthorEntriesPlugin, LatestPostsPlugin, Post, BlogCategory from .forms import LatestEntries...
creimers/djangocms-blog
djangocms_blog/cms_plugins.py
Python
bsd-3-clause
3,724
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 5, transform = "Difference", sigma = 0.0, exog_count = 0, ar_order = 0);
antoinecarme/pyaf
tests/artificial/transf_Difference/trend_Lag1Trend/cycle_5/ar_/test_artificial_1024_Difference_Lag1Trend_5__0.py
Python
bsd-3-clause
265
import pandas as pd import numpy as np import pyaf.HierarchicalForecastEngine as hautof import pyaf.Bench.TS_datasets as tsds import datetime #get_ipython().magic('matplotlib inline') b1 = tsds.load_AU_hierarchical_dataset(); df = b1.mPastData; lEngine = hautof.cHierarchicalForecastEngine() lEngine.mOptions.mHierar...
antoinecarme/pyaf
tests/hierarchical/test_hierarchy_AU_AllMethods.py
Python
bsd-3-clause
1,019
# coding=utf-8 from django.utils.translation import ugettext_lazy as _ from django import template from django.utils.encoding import force_unicode from django.template.defaultfilters import floatformat as django_floatformat def floatformat(value, decimals): return django_floatformat(value, decimals).replace('-', u...
samluescher/django-expenses
expenses/templatetags/moneyformats.py
Python
bsd-3-clause
753
import tests.periodicities.period_test as per per.buildModel((30 , 'W' , 1600));
antoinecarme/pyaf
tests/periodicities/Week/Cycle_Week_1600_W_30.py
Python
bsd-3-clause
83
# -*- coding: utf-8 -*- # # giddy documentation build configuration file, created by # sphinx-quickstart on Wed Jun 6 15:54:22 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
pysal/giddy
docsrc/conf.py
Python
bsd-3-clause
11,247
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import geonames_field try: from setuptools import setup except ImportError: from distutils.core import setup version = geonames_field.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') print("You pro...
savioabuga/django-geonames-field
setup.py
Python
bsd-3-clause
1,533
#!/usr/bin/env python """ Simple example of a custom, very slow history, that is loaded asynchronously. By wrapping it in `ThreadedHistory`, the history will load in the background without blocking any user interaction. """ import time from prompt_toolkit import PromptSession from prompt_toolkit.history import Histor...
jonathanslenders/python-prompt-toolkit
examples/prompts/history/slow-history.py
Python
bsd-3-clause
1,373
# -*- coding: utf-8 -*- """ Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from flexmock import flexmock from textwrap import dedent import six import time import json import logging import ins...
vrutkovs/osbs-client
tests/test_core.py
Python
bsd-3-clause
19,623
from django.conf import settings from PIL import Image from appconf import AppConf class AvatarConf(AppConf): DEFAULT_SIZE = 80 RESIZE_METHOD = Image.ANTIALIAS STORAGE_DIR = 'avatars' GRAVATAR_BASE_URL = 'http://www.gravatar.com/avatar/' GRAVATAR_BACKUP = True GRAVATAR_DEFAULT = None DEFA...
nai-central/django-avatar
avatar/conf.py
Python
bsd-3-clause
909
from arybo.lib import MBA, boolean_expr_solve mba = MBA(64) x = mba.var('x') def f(X): T = ((X+1)&(~X)) C = ((T | 0x7AFAFA697AFAFA69) & 0x80A061440A061440)\ + ((~T & 0x10401050504) | 0x1010104) return C r = f(x) sols = boolean_expr_solve(r[63], x, 1) C0 = sols[0].get_int_be() print(hex(C0)) print(hex(f(0)))...
quarkslab/arybo
examples/dirac.py
Python
bsd-3-clause
339
# -*- coding: utf-8 -*- import datetime as dt from flask.ext.login import UserMixin from metapp2.extensions import bcrypt from metapp2.database import ( Column, db, Model, ReferenceCol, relationship, SurrogatePK ) class Meeting_Agenda_Item_User(SurrogatePK, Model): __tablename__ = 'meetin...
phamtrisi/metapp2
metapp2/meeting_agenda_item_user/models.py
Python
bsd-3-clause
773
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # lapack_testing.py ############################################################################### from __future__ import print_function from subprocess import Popen, STDOUT, PIPE import os...
kortschak/OpenBLAS
lapack-netlib/lapack_testing.py
Python
bsd-3-clause
12,799
""" kombu.transport.zookeeper ========================= Zookeeper transport. :copyright: (c) 2010 - 2013 by Mahendra M. :license: BSD, see LICENSE for more details. **Synopsis** Connects to a zookeeper node as <server>:<port>/<vhost> The <vhost> becomes the base for all the other znodes. So we can use it like a vho...
sivaprakashniet/push_pull
p2p/lib/python2.7/site-packages/kombu/transport/zookeeper.py
Python
bsd-3-clause
5,232
from django.shortcuts import render from rest_framework import generics from rest_framework.response import Response from rest_framework import views from geomat.feedback.serializers import FeedBackSerializer from django.core.mail import send_mail from rest_framework import status from drf_yasg.utils import swagger_aut...
GeoMatDigital/django-geomat
geomat/feedback/views.py
Python
bsd-3-clause
1,251
# from setuptools import setup, find_packages import sys, os version = "1.0" shortdesc = "" longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() setup(name="agx.dexteritytemplate", version=version, description=shortdesc, long_description=longdesc, classifiers=[ ...
AnneGilles/dexterity.product
setup.py
Python
bsd-3-clause
1,049
""" Module cdifflib -- c implementation of difflib. Class CSequenceMatcher: A faster version of difflib.SequenceMatcher. Reimplements a single bottleneck function - find_longest_match - in native C. The rest of the implementation is inherited. """ __all__ = ['CSequenceMatcher', '__version__'] __version...
mduggan/cdifflib
cdifflib.py
Python
bsd-3-clause
3,130
# Copyright (C) 2009, Hyves (Startphone Ltd.) # # This module is part of the Concurrence Framework and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php """This module implements the stackless API on top of py.magic greenlet API This way it is possible to run concurrence appli...
concurrence/concurrence
lib/concurrence/_stackless.py
Python
bsd-3-clause
8,949
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2015, Robotnik Automation SLL # 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...
RobospectEU/robospect_common
robospect_laser_assembler/src/robospect_laser_assembler_node.py
Python
bsd-3-clause
10,929
''' Created on Jul 23, 2015 @author: Aaron Klein ''' import GPy import numpy as np from robo.task.rembo import REMBO from robo.task.synthetic_functions.branin import Branin from robo.models.gpy_model import GPyModel from robo.maximizers.cmaes import CMAES from robo.solver.bayesian_optimization import BayesianOptimiz...
aaronkl/RoBO
examples/example_branin_in_billion_dims.py
Python
bsd-3-clause
1,197
#!/usr/bin/env python # Copyright 2018 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. """Runs tests to ensure annotation tests are working as expected. """ from __future__ import print_function import os import argparse...
endlessm/chromium-browser
tools/traffic_annotation/scripts/traffic_annotation_auditor_tests.py
Python
bsd-3-clause
5,523
# -*-coding:Utf-8 -* # Copyright (c) 2010 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 # l...
stormi/tsunami
src/primaires/temps/commandes/temps/__init__.py
Python
bsd-3-clause
2,324
# -*- coding: utf-8 -*- # 3rd party imports from model_bakery import baker # CrAdmin imports from cradmin_legacy import cradmin_testhelpers # Django imports from django import test # Devilry imports from devilry.devilry_qualifiesforexam_plugin_students.views import select_students class TestStudentSelectionView(...
devilry/devilry-django
devilry/devilry_qualifiesforexam_plugin_students/tests/test_student_selection_view.py
Python
bsd-3-clause
1,532
############################################################################### ## fs.py ## 9te [angband.ornl.gov] ## Wed Jan 12 10:37:50 2011 ############################################################################### ## Copyright (C) 2008 Oak Ridge National Laboratory, UT-Battelle, LLC. ##------------------------...
sslattery/Chimera
doc/spn/fuel_assembly/sp7/fs_azilut01.py
Python
bsd-3-clause
16,598
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-29 11:27 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): initial = True dependencies = [ ('content...
pobear/django-xadmin
xadmin/migrations/0001_initial.py
Python
bsd-3-clause
2,906
from multiprocessing import Pool def lower(str_in): return reversed(str_in.lower()) if __name__ == '__main__': pool = Pool(processes=4) data = ['FOO', 'BAR', 'BAZ'] * 1000 print pool.map(lower, data)
dcolish/Presentations
osbridge/mutliproc.py
Python
bsd-3-clause
219
import functools import json import urllib from django import http from django.conf import settings from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404, redirect, render import commonware import jinja2 import waffle from curling.lib import HttpClientError from tower import uget...
jinankjain/zamboni
mkt/developers/views_payments.py
Python
bsd-3-clause
19,059
""" Wrapper for the layout. """ from typing import Dict, Generator, Iterable, List, Optional, Union from prompt_toolkit.buffer import Buffer from .containers import ( AnyContainer, ConditionalContainer, Container, Window, to_container, ) from .controls import BufferControl, SearchBufferControl, UI...
jonathanslenders/python-prompt-toolkit
prompt_toolkit/layout/layout.py
Python
bsd-3-clause
14,111
import sys from setuptools import setup, find_packages exec(open('fftoptionlib/version.py').read()) def check_python_version(): if sys.version_info[:2] < (3, 4): print('Python 3.4 or newer is required. Python version detected: {}'.format(sys.version_info)) sys.exit(-1) def main(): setup(na...
arraystream/fftoptionlib
setup.py
Python
bsd-3-clause
1,367
from .base import * # NOQA # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'CHANGEME!!!' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': ...
RocketPod/wagtail-cookiecutter
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/settings/dev.py
Python
bsd-3-clause
686
import logging from glob import glob from os import path import pytest from steampak import SteamApi from steampak.libsteam.resources.apps import Application from steampak.libsteam.resources.stats import Achievement from steampak.libsteam.resources.user import User def set_log_level(lvl): logging.basicConfig(le...
idlesign/steampak
tests/test_manual.py
Python
bsd-3-clause
5,260
# 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. import inspect import os from telemetry.story import story as story_module from telemetry.wpr import archive_info class StorySet(object): """A collectio...
endlessm/chromium-browser
third_party/catapult/telemetry/telemetry/story/story_set.py
Python
bsd-3-clause
6,323
#!/usr/bin/env python import flask from flask_cors import cross_origin import StringIO import logging import os import cooperhewitt.roboteyes.atkinson as atkinson import cooperhewitt.flask.http_pony as http_pony app = http_pony.setup_flask_app('ATKINSON_SERVER') @app.route('/ping', methods=['GET']) @cross_origin(...
cooperhewitt/plumbing-atkinson-server
scripts/atkinson-server.py
Python
bsd-3-clause
1,302
# $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: # ...
DLR-SC/DataFinder
src/datafinder/persistence/metadata/value_mapping/__init__.py
Python
bsd-3-clause
1,988
"""Functions to plot raw M/EEG data.""" # Authors: Eric Larson <larson.eric.d@gmail.com> # Jaakko Leppakangas <jaeilepp@student.jyu.fi> # Daniel McCloy <dan.mccloy@gmail.com> # # License: Simplified BSD from functools import partial from collections import OrderedDict import numpy as np from ..ann...
mne-tools/mne-python
mne/viz/raw.py
Python
bsd-3-clause
23,560
#!/usr/bin/env python """Display status of APOGEE QuickLook Actor History: 2011-08-16 ROwen Save window state. """ import Tkinter import RO.Wdg import APOGEEWdg WindowName = "Inst.APOGEE" def addWindow(tlSet, visible=False): """Create the window. """ tlSet.createToplevel( name = WindowName, ...
r-owen/stui
TUI/Inst/APOGEE/APOGEEWindow.py
Python
bsd-3-clause
750
# Generated by Django 2.2.13 on 2021-03-29 13:29 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("profiles", "0009_remove_profile_leadership_level")] operations = [ migrations.AddField( model_name="profile", name="can_skip_app...
mitodl/bootcamp-ecommerce
profiles/migrations/0010_profile_can_skip_application_steps.py
Python
bsd-3-clause
407
from touchforms.formplayer.signals import sms_form_complete from corehq.apps.receiverwrapper.util import get_submit_url from corehq.apps.receiverwrapper.util import submit_form_locally from couchforms.models import XFormInstance def handle_sms_form_complete(sender, session_id, form, **kwargs): from corehq.apps.sms...
SEL-Columbia/commcare-hq
corehq/apps/smsforms/signals.py
Python
bsd-3-clause
844
# -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ import qt.QtCore as qc import qt.QtGui as qg class StrictDoubleValidator(qg.QDoubleValidator): def validate(self, input_value, pos): state, input_value, pos = supe...
danaukes/popupcad
popupcad/filetypes/validators.py
Python
mit
627
#!/usr/bin/env python import textwrap, time import sys if sys.version_info.major == 3: from queue import Empty as QueueEmpty else: from Queue import Empty as QueueEmpty import tx import monitor import peers import wallet import splash import console import net import forks import footer """ def resize(s, stat...
esotericnonsense/bitcoind-ncurses
process.py
Python
mit
10,751
from django.shortcuts import render from data_center.models import Announcement def index(request): announcements = Announcement.objects.all().order_by('-time') return render(request, 'index.html', {'announcements': announcements})
leVirve/NTHU_Course
index/views.py
Python
mit
243
"""ReClean URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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-bas...
oOPa/ReClean
ReClean/urls.py
Python
mit
1,075
from flask import Flask, request, g, abort app = Flask(__name__) @app.before_request def before_request(): abort(400) @app.after_request def after_request(response): print 'after_request', response return response @app.teardown_request def teardown_request(exc): print 'teardown_request', exc @app...
zeaphoo/cocopot
examples/flasktest.py
Python
mit
385
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.http import HttpResponse from django.views.generic import FormView class TemplateFormView(FormView): template_name = 'form.html' def heavy_data_1(request): numbers = ['Zero', 'One', 'Two', 'Three', 'Four', 'Five'] ...
djkartsa/django-select2-chained
tests/testapp/views.py
Python
mit
794
import os import click from keep import cli, utils @click.command('pull', short_help='Updates the local database with remote.') @click.option('--overwrite', is_flag=True, help='Overwrite local commands') @cli.pass_context def cli(ctx, overwrite): """Updates the local database with remote.""" credentials_path ...
OrkoHunter/keep
keep/legacy_commands/removed_cmd_pull.py
Python
mit
546
import math from unittest import TestCase import jsonschema class TestMinItems(TestCase): schema = { "type": "array", "minItems": 4 } schema2 = { "minItems": 4 } def test_minItems_pass(self): #test equal data1 = [1, 2, "3", 4.0] #test greater than data2 = [1, 2, "3", 4.0, 5.00] ...
okoye/json-grammer-nazi
jsonschema/tests/test_minItems.py
Python
mit
1,253
from __future__ import unicode_literals from django.contrib.auth.models import User from djblets.testing.decorators import add_fixtures from reviewboard.reviews.models import (DefaultReviewer, ReviewRequest, ReviewRequestDraft) from reviewboard.scmtools.errors import ChangeNumb...
davidt/reviewboard
reviewboard/reviews/tests/test_review_request_manager.py
Python
mit
34,489
#!/usr/bin/env python # encoding: utf-8 """ Haystack.py An on-disk cache with a dict-like API,inspired by Facebook's Haystack store Created by Rui Carmo on 2010-04-05 Published under the MIT license. """ __author__ = ('Rui Carmo http://the.taoofmac.com') __revision__ = "$Id$" __version__ = "1.0" import os, sys, stat...
rcarmo/yaki-gae
lib/haystack.py
Python
mit
8,031
# Copyright (c) 1999 John Aycock # Copyright (c) 2000-2002 by hartmut Goebel <hartmut@goebel.noris.de> # Copyright (c) 2005 by Dan Pascu <dan@windowmaker.org> # # See main module for license. # # # Decompilation (walking AST) # # All table-driven. Step 1 determines a table (T) and a path to a # table key (K) fr...
devyn/unholy
decompyle/decompyle/Walker.py
Python
mit
29,850
""" Objects with No values """ from galaxy.datatypes.metadata import MetadataCollection from galaxy.datatypes.registry import Registry class RecursiveNone: def __str__( self ): return "None" def __repr__( self ): return str( self ) def __getattr__( self, name ): value = RecursiveNon...
volpino/Yeps-EURAC
lib/galaxy/util/none_like.py
Python
mit
952
# -*- coding: utf-8 -*- #!/usr/bin/env python # DBSCAN_multiplex/setup.py; # Author: Gregory Giecold for the GC Yuan Lab # Affiliation: Harvard University # Contact: g.giecold@gmail.com, ggiecold@jimmy.harvard.edu """Setup script for DBSCAN_multiplex, a fast and memory-efficient implementation of DBSCAN (Density-...
GGiecold/DBSCAN
setup.py
Python
mit
3,305
from django import forms from django.contrib.auth.forms import UserCreationForm from models import ipl_scores from django.contrib import auth class customizedform(UserCreationForm): #Email = forms.EmailField(required=True) class Meta: model = User fields = ('username', 'password1', 'password2') def save(self...
Rahul91/Django_IPL
templates/signups/forms.py
Python
mit
735
# # Cython/Python language types # from __future__ import absolute_import import copy import re try: reduce except NameError: from functools import reduce from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode from . import StringEncoding from . import Naming from .Errors import error class...
bdh1011/wau
venv/lib/python2.7/site-packages/Cython/Compiler/PyrexTypes.py
Python
mit
158,149
""" bridge to docker-compose """ from compose.cli.main import TopLevelCommand from compose.container import Container import logging def ps_(project): """ containers status """ logging.debug('ps ' + project.name) containers = project.containers(stopped=True) + project.containers(one_off=True) ...
DaniTheLion/docker-compose-ui
scripts/bridge.py
Python
mit
1,520
import pystache class SVGGenerator: def __init__(self, template_file): self.template_file = template_file self.template = None self.renderer = pystache.Renderer() def to_svg(self, data=None): if self.template is None: template_file = open(self.template_file) ...
gizmo-cda/g2x
overlay/SVGGenerator.py
Python
mit
455
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import json import logging import os import re from collections import deque from functools import wraps, partial from flask import Flask, request, jsonify, make_response ...
jawilson/Flexget
flexget/api/app.py
Python
mit
13,897
# 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-loganalytics/azure/mgmt/loganalytics/models/metric_name.py
Python
mit
1,023
#!/usr/bin/env/python import os import numpy as np import pandas as pd import paths from utils import saveAnimation, animateSubseqs, dataNearAnnotations from utils import generateVideos, sectionsOfDataNearAnnotationsImpure VIDS_DIR = 'vids' # ------------------------------------------------ Public funcs def getLa...
dblalock/dig
python/dig/datasets/dishwasher.py
Python
mit
9,404
""" Authorize Sauce =============== The secret sauce for accessing the Authorize.net API. The Authorize APIs for transactions, recurring payments, and saved payments are all different and awkward to use directly. Instead, you can use Authorize Sauce, which unifies all three Authorize.net APIs into one coherent Pythoni...
drewisme/authorizesauce
setup.py
Python
mit
3,354
import socket import sys import random import threading local_address = '127.0.0.1', 9005 remote_address = '127.0.0.1' remote_address = sys.argv[1] connect_port = int(sys.argv[2]) mode = sys.argv[3] socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) socket.bind(local_address) socket.connect((remote_addr...
minminopk/PySnippet
tcp2tcp/mock.py
Python
mit
692
#!/usr/bin/env python """ A unittest script for the HostEpigeneticsRawSeqSet module. """ import unittest import json import tempfile from cutlass import HostEpigeneticsRawSeqSet from CutlassTestConfig import CutlassTestConfig from CutlassTestUtil import CutlassTestUtil # pylint: disable=W0703, C1801 class HostEpi...
ihmpdcc/cutlass
tests/test_host_epigenetics_raw_seq_set.py
Python
mit
13,839
############################################################################## # # Kennedy Institute of Rheumatology # # $Id$ # # Copyright (C) 2015 Stephen Sansom # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published b...
snsansom/xcell
pipelines/pipeline_cram2fastq.py
Python
mit
12,728
#!/usr/bin/env python # coding=utf-8 import pylab as pl import numpy as np from matplotlib.legend_handler import HandlerLine2D f = file("table3") next(f) next(f) a = [map(eval,l.split()[::2]) for l in f] a = [x for x in a if x[0] > 0 and x[3] == 25] pl.figure(figsize=(10, 5), dpi=80) pl.subplots_adjust(bottom=0.2...
christoff-buerger/reat
index/messung/energy_chart.py
Python
mit
1,030
# encoding=utf-8 from functools import partial from psi.app.models import Organization from psi.app.utils.security_util import is_super_admin, is_root_organization from flask_admin.contrib.sqla.fields import QuerySelectField from flask_admin.form import Select2Widget from flask_babelex import lazy_gettext, gettext fro...
betterlife/psi
psi/app/views/organization.py
Python
mit
7,777
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
KhronosGroup/COLLADA-CTS
StandardDataSets/collada/library_visual_scenes/visual_scene/node/instance_geometry/10_instance_of_same_geometry/10_instance_of_same_geometry.py
Python
mit
3,982
from i3pystatus import IntervalModule import subprocess class Xkblayout(IntervalModule): """Displays and changes current keyboard layout. ``change_layout`` callback finds the current layout in the ``layouts`` setting and enables the layout following it. If the current layout is not in the ``layouts``...
eBrnd/i3pystatus
i3pystatus/xkblayout.py
Python
mit
1,690
# provide easy access to a few of the important interfaces from .discordant import Discordant from .logging import configure_logging from .commands import * from .events import *
jonnyli1125/discordant
discordant/__init__.py
Python
mit
179
# -*- coding: utf-8 -*- from app.config import db_sql from sqlalchemy import and_ from app.models import Usuario, Registro, Detalle_registro class tiempo(object): """ docstring for . """ def __init__(self, id_registro, fecha_hora_entrada): self.id_registro = int(id_registro) self.fecha...
alanudg/SmartCheckIn
app/modules/analytics/ATiempo.py
Python
mit
876
import pybullet as p import time conid = p.connect(p.SHARED_MEMORY) if (conid < 0): p.connect(p.GUI) p.setInternalSimFlags(0) p.resetSimulation() p.loadURDF("plane.urdf", useMaximalCoordinates=True) p.loadURDF("tray/traybox.urdf", useMaximalCoordinates=True) gravXid = p.addUserDebugParameter("gravityX", -10, 10, ...
MadManRises/Madgine
shared/bullet3-2.89/examples/pybullet/examples/manyspheres.py
Python
mit
1,108
__author__ = 'allentran'
allentran/fed-rates-bot
fed_bot/tests/__init__.py
Python
mit
25
import cet import consts __all__ = ['cet', 'consts']
realityone/CetTicket
libcet/__init__.py
Python
mit
53
# -*- coding: utf-8 -*- # # RollerworksSearch documentation build configuration file, created by # sphinx-quickstart on Thu Aug 02 16:57:26 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
rollerworks/RollerworksSearch
docs/conf.py
Python
mit
8,572
#!/usr/bin/env python from __future__ import division, absolute_import, print_function from future.builtins import super from iris_sdk.models.base_resource import BaseResource from iris_sdk.models.data.line_option_order import LineOptionOrderData from iris_sdk.models.line_option_order_response import LineOptionOrderR...
scottbarstow/iris-python
iris_sdk/models/line_option_orders.py
Python
mit
962
""" Contains functions to decode, encode and generate keys. """ import enum import hashlib import hmac import libnacl.encode import libnacl.public import libnacl.secret from .exception import GatewayKeyError __all__ = ( 'HMAC', 'Key', ) class HMAC: """ A collection of HMAC functions used for the ga...
lgrahl/threema-msgapi-sdk-python
threema/gateway/key.py
Python
mit
4,302