code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
import nstbot bot = nstbot.PushBot() #bot.connect(connection.Serial('/dev/ttyUSB0', baud=4000000)) bot.connect(nstbot.Socket('10.162.177.135')) bot.laser(150) bot.track_frequencies(freqs=[50, 100, 150]) bot.retina(True) bot.show_image() #bot.track_spike_rate(all=(0,0,128,128)) import time while True: time.sleep(1...
caxenie/nstbot
nstbot/examples/pushbot.py
Python
gpl-2.0
349
#!/usr/bin/env python3 ############################################################################### # Copyright 2017 The Apollo 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...
xiaoxq/apollo
modules/tools/mapshow/libs/planning.py
Python
apache-2.0
20,994
from django.shortcuts import render # Create your views here. from django.shortcuts import render_to_response from blogs.models import Post from django.http import HttpResponse def home(request): post_list = Post.objects.all() return render_to_response('home.html', locals()) def post_detail(request, id): ...
boompieman/blog_in_django
mysite/blogs/views.py
Python
gpl-2.0
466
# coding=utf-8 import requests import time from pychroner import PluginMeta, PluginType @PluginMeta(PluginType.Thread) def do(pluginApi): db = pluginApi.getMongoDB().getCollection("bot") slack = pluginApi.getSlack() while True: url = f"https://api.foursquare.com/v2/users/63379277/scoreboard?oauth_...
SlashNephy/PyChroner-Bot
plugins/SlashNephy/Swarm.py
Python
mit
3,264
# Copyright 2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
jiazichenzhan/Server_Manage_Plugin
ironic-plugin-pike/ironic/drivers/modules/agent.py
Python
apache-2.0
30,566
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
elfnor/sverchok
nodes/scene/BMOperatorsMK2.py
Python
gpl-3.0
5,037
#!/usr/bin/env python """ Copyright 2012 GroupDocs. 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...
liosha2007/temporary-groupdocs-python3-sdk
groupdocs/models/SignaturePredefinedListInfo.py
Python
apache-2.0
1,107
#!/usr/bin/env python # -*- coding:utf-8 -*- import logging #打开日志文件,没有会创建,level是记录日志的级别设置的info logging.basicConfig(filename='log_test.log',level=logging.INFO) #会直接在前台打印 logging.warning("user attemped") logging.critical("server is down")
zhangyage/Python-oldboy
loging-study/log-one.py
Python
apache-2.0
313
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from decimal import Decimal from d...
shawnadelic/shuup
shuup/core/models/_shipments.py
Python
agpl-3.0
5,816
from foscambackup.constant import Constant import foscambackup.util.helper as helper from foscambackup.config import Config class ConfigFactory: """ Create a config model """ def read_conf(self, file_path): """ Read config to conf object """ conf = Config() with open(file_path) as filen...
dutchbot/FoscamBackupper
foscambackup/config_factory.py
Python
gpl-3.0
1,044
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('invoicer', '0002_product_swap'), ] operations = [ migrations.RenameField( model_name='product', old_...
sde1000/miltonxero
invoicer/migrations/0003_auto_20160316_1502.py
Python
gpl-3.0
584
from django.db import connection, transaction from django_comments.models import Comment from django.core.management.base import BaseCommand from hcomments.models import HComment class Command(BaseCommand): help = "Import the standard comments into hcomments" @transaction.atomic def handle(self, *args, ...
artcz/epcon
hcomments/management/commands/import_standard_comments.py
Python
bsd-2-clause
1,074
import uncertainties from uncertainties import ufloat import math import numpy import numpy import pylab from scipy.optimize import curve_fit import math import scipy.stats import uncertainties from uncertainties import unumpy def linear(x, a, b): return a*x+b INPUT = "/home/federico/Laboratorio3/relazione6/datiInt...
fedebell/Laboratorio3
relazione6/estensioneBodeIntegratore.py
Python
gpl-3.0
1,003
#!/usr/bin/env python """Create training data from OpenStreetMap labels and NAIP images.""" import argparse from src.training_data import download_and_serialize def create_parser(): """Create the argparse parser.""" parser = argparse.ArgumentParser() parser.add_argument("--tile-size", ...
andrewljohnson/Deep-Trails
bin/create_training_data.py
Python
mit
3,912
# -*- coding: utf-8 -*- import os import re os.environ['PYWIKIBOT_DIR'] = os.path.dirname(os.path.realpath(__file__)) import pywikibot os.environ['TZ'] = 'UTC' site = pywikibot.Site() site.login() cat = pywikibot.Page(site, 'Category:合併歷史候選') cnt = 1 for targetPage in site.categorymembers(cat): targetTitle = t...
Xi-Plus/Xiplus-Wikipedia-Bot
zhwikt-merge-history/edit.py
Python
mit
1,597
import views_lib as views import config import datasets_lib as datasets import projects_lib as projects import accounts_lib as accounts import events_lib as events import time import queries_lib as queries accountId = None session = None projectId = None datasetId = None def setup_module(module): set_up() def te...
ericmort/axelerator
backend/tests/views_test.py
Python
mit
2,979
#!/bin/env python """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # To use a consistent encoding from codecs import open from os import path # Always prefer setuptools over distutils from setuptools import find_packages, setup...
bbfrederick/rapidtide
setup.py
Python
apache-2.0
7,998
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import json import pystat_config class UDPClient(object): def __init__(self, server_ip, server_port): """Initalize client""" self.server_ip = server_ip self.server_port = server_port self.sock = socket.socket(socket.AF_IN...
bdastur/utils
pystats/pystatsagent.py
Python
apache-2.0
2,103
# coding=utf-8 # This file is part of SickChill. # # Author: Dustyn Gibson (miigotu) <miigotu@gmail.com> # URL: https://sickchill.github.io # Git: https://github.com/SickChill/SickChill.git # # SickChill is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
coderbone/SickRage-alt
sickchill/helper/media_info.py
Python
gpl-3.0
3,882
from django.db.models import IntegerField, Lookup, Transform, lookups class NetFieldDecoratorMixin(object): def process_lhs(self, qn, connection, lhs=None): lhs = lhs or self.lhs lhs_string, lhs_params = qn.compile(lhs) lhs_string = 'TEXT(%s)' % lhs_string return lhs_string, lhs_p...
digitalocean/netbox
netbox/ipam/lookups.py
Python
apache-2.0
5,373
import os import json TEST_DIR = os.path.dirname(__file__) SAMPLES_DIR = os.path.join(TEST_DIR, 'samples') def get_sample_path(sample_filename): return os.path.join(SAMPLES_DIR, sample_filename) def get_sample(sample_filename): with open(get_sample_path(sample_filename)) as f: return json.load(f) ...
stummjr/skinfer
tests/fixtures.py
Python
bsd-3-clause
3,961
# 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 sys import unittest from telemetry import decorators from telemetry.core.platform.profiler import vtune_profiler from telemetry.unittest_util import ...
CTSRD-SOAAP/chromium-42.0.2311.135
tools/telemetry/telemetry/core/platform/profiler/vtune_profiler_unittest.py
Python
bsd-3-clause
3,667
import os import types import collections from functools import wraps import django from django.db import models from django.conf import settings from django.utils.encoding import smart_text from django.shortcuts import render from django.utils.six.moves import filterfalse, range from django.utils.six.moves.urllib.p...
mtrgroup/django-mtr-utils
mtr/utils/helpers.py
Python
mit
6,053
"""This module contains values that affect the operation of the game's Title Screen. Module Constants: BG_PATH: A String for the file path to the background image's sprite sheet. BG_FRAMES: An integer greater than 0 for the amount of animation frames in the background image's sprite sheet. ...
MarquisLP/Sidewalk-Champion
customize/title.py
Python
unlicense
5,374
# -*- coding: latin1 -*- ################################################################################################ # Script para coletar egos do Twitter: # Mínimo de 2 listas # Mínimo de 5 membros em cada lista # import tweepy, datetime, sys, time, json, os.path, shutil reload(sys) sys.setdefaultencoding('utf-...
amaurywalbert/twitter
scripts_old/ego_collect/ego_collection_v4.py
Python
gpl-3.0
10,409
# Copyright (c) by it's authors. # Some rights reserved. See LICENSE, AUTHORS. from peer import * from multiViewer import MultiViewer from viewer import Viewer from editor import Editor class MemDoc(Peer): Routings = [ (Editor.Out.FieldChanged, Viewer.In.Refresh) ] def __init__(self, room): ...
FreshXOpenSource/wallaby-base
wallaby/pf/peer/memDoc.py
Python
bsd-2-clause
538
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: gbk.py import _codecs_cn import codecs import _multibytecodec as mbc codec = _codecs_cn.getcodec('gbk') class Codec(codecs.Codec): encode = code...
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/encodings/gbk.py
Python
unlicense
995
""" Support for UK Met Office weather service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/weather.metoffice/ """ import logging import voluptuous as vol from homeassistant.components.sensor.metoffice import ( CONDITION_CLASSES, CONF_ATTRIBUTION...
PetePriority/home-assistant
homeassistant/components/weather/metoffice.py
Python
apache-2.0
3,832
"""The tests for the feedreader component.""" from datetime import timedelta from logging import getLogger from os import remove from os.path import exists import time import unittest from unittest import mock from unittest.mock import patch from homeassistant.components import feedreader from homeassistant.components...
leppa/home-assistant
tests/components/feedreader/test_init.py
Python
apache-2.0
7,644
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
stephanehenry27/Sickbeard-anime
sickbeard/databases/cache_db.py
Python
gpl-3.0
2,126
''' This module sets up a scheme for validating that arbitrary Python objects are correctly typed. It is totally decoupled from Django, composable, easily wrapped, and easily extended. A validator takes two parameters--var_name and val--and returns an error if val is not the correct type. The var_name parameter is u...
shubhamdhama/zulip
zerver/lib/validator.py
Python
apache-2.0
16,530
from ._mod1_0_0_1_1_0 import * from ._mod1_0_0_1_1_1 import * from ._mod1_0_0_1_1_2 import * from ._mod1_0_0_1_1_3 import * from ._mod1_0_0_1_1_4 import *
asedunov/intellij-community
python/testData/completion/heavyStarPropagation/lib/_pkg1/_pkg1_0/_pkg1_0_0/_pkg1_0_0_1/_pkg1_0_0_1_1/__init__.py
Python
apache-2.0
154
import _plotly_utils.basevalidators class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="barpolar.marker.pattern", **kwargs ): super(FgcolorsrcValidator, self).__init__( plotly_name=plotly_name, ...
plotly/plotly.py
packages/python/plotly/plotly/validators/barpolar/marker/pattern/_fgcolorsrc.py
Python
mit
432
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf8 # Copyright 2014 IBM Corporation # Copyright 2015 Lenovo # # 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.o...
benoit-canet/pyghmi
pyghmi/ipmi/sdr.py
Python
apache-2.0
27,627
if x() and y() and z(): a() else: b()
bronikkk/tirpan
tests/test_mir04.py
Python
gpl-3.0
46
#!/usr/bin/env python3 # ~*~ coding: utf-8 ~*~ list = [4, 5, 7, 8, 9, 1, 0, 7, 10] list.sort() prev = None for item in list: if prev == item: print("Duplicate of", prev, "found.") prev = item
JoseALermaIII/python-tutorials
pythontutorials/books/wikibook/Chapter 11/C11-3_duplicates.py
Python
mit
209
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
nielsbuwen/ilastik
ilastik/applets/base/applet.py
Python
gpl-3.0
5,722
""" DPRL Math Symbol Recognizers Copyright (c) 2012-2014 Kenny Davila, Richard Zanibbi This file is part of DPRL Math Symbol Recognizers. DPRL Math Symbol Recognizers is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by t...
DPRL/MathSymbolRecognizer
src/svm_rbf_classifier.py
Python
gpl-3.0
5,759
""" Input reader to fetch the 20 Newsgroups dataset from Sklearn. See: https://scikit-learn.org/stable/modules/generated/sklearn.datasets.fetch_20newsgroups.html The original data can be downloaded from http://qwone.com/~jason/20Newsgroups/. """ from pimlico.datatypes.corpora.ints import IntegerDocumentType from pim...
markgw/pimlico
src/python/pimlico/modules/input/text/20newsgroups/sklearn_download/info.py
Python
gpl-3.0
2,419
'''extra statistical function and helper functions contains: * goodness-of-fit tests - powerdiscrepancy - gof_chisquare_discrete - gof_binning_discrete Author: Josef Perktold License : BSD-3 changes ------- 2013-02-25 : add chisquare_power, effectsize and "value" ''' import numpy as np from scipy import s...
yarikoptic/pystatsmodels
statsmodels/stats/gof.py
Python
bsd-3-clause
16,760
#------------------------------------------------------------------------------ # Copyright (c) 2008, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD license # available at http://www.enthought.com/licenses/BSD.txt and may be # redistributed only under th...
cournape/ensetuptools
ensetuptools/utilities.py
Python
bsd-3-clause
10,367
"""Adding max_attempts to Challenges Revision ID: d6514ec92738 Revises: a4e30c94c360 Create Date: 2017-03-09 01:20:31.423407 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd6514ec92738' down_revision = 'a4e30c94c360' branch_labels = None depends_on = None d...
semprix/CTFIgniter
payload/CTFd/migrations/versions/d6514ec92738_adding_max_attempts_to_challenges.py
Python
apache-2.0
703
# -*- coding: utf-8 -*- # © 2016 GRAP # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # -*- encoding: utf-8 -*- from . import test_auth_admin_passkey
ClearCorp/server-tools
auth_admin_passkey/tests/__init__.py
Python
agpl-3.0
173
# from django.conf.urls import include, url # # from .views import ListDataModelView # # urlpatterns = [ # # url(r'^/form/single/', SingleFormView.as_view()), # # url(r'^/inline/single/', SingleInlineView.as_view()), # # url(r'^/listdata/', include(ListDataModelView().urls)) # ]
Merino/poc-cbb
tests/example/views/urls.py
Python
bsd-3-clause
289
from nltk_contrib.drt import * def resolve(drs): print drs print drs.__class__ print AbstractDRS print isinstance(drs, AbstractDRS) assert isinstance(drs, AbstractDRS) return _resolve(drs, []) def _resolve(current, trail): resolve_method = None if isinstance(current, DRS): ...
hectormartinez/rougexstem
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/drt/resolve_anaphora.py
Python
apache-2.0
4,854
"""The Mullvad VPN integration.""" import asyncio from datetime import timedelta import logging import async_timeout from mullvad_api import MullvadAPI from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from homeas...
partofthething/home-assistant
homeassistant/components/mullvad/__init__.py
Python
apache-2.0
1,776
# -*- coding: utf8 -*- from phystricks import * def UYJooCWjLgK(): pspict,fig = SinglePicture("UYJooCWjLgK") pspict.dilatation_X(2) pspict.dilatation_Y(2) x=3 y=2 theta=30 A=Point(0,0) Y=Circle(A,y).get_point(theta) P=Circle(A,1).get_point(theta) X=Point(x,0) d1=Segment(A,Y...
Naereen/mazhe
phystricksUYJooCWjLgK.py
Python
gpl-3.0
1,014
#!/usr/bin/python # Copyright 2015 Google Inc. All Rights Reserved. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type """An Ansible module to utilize GCE image resources.""" ANSIBLE_METAD...
skg-net/ansible
lib/ansible/modules/cloud/google/gce_img.py
Python
gpl-3.0
5,969
""" ===================================== Include On-leveling into Cape Cod ===================================== This example demonstrates how to incorporate on-leveling into the `CapeCod` estimator. The on-level approach emulates the approach taken by Friedland in "Estimating Unpaid Claims Using Basic Techniques" C...
jbogaardt/chainladder-python
examples/plot_capecod_onlevel.py
Python
mit
2,182
#!/usr/bin/env python3 """ Wrapper for Linux/Mac screen locking """ import glob import os import signal import sys import time import desktop_mod import command_mod import subtask_mod import task_mod class ScreenLocker: """ Screen Locker base class. """ def __init__(self) -> None: self._dae...
drtuxwang/system-config
bin/xlock.py
Python
gpl-2.0
5,925
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2017) Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limi...
HewlettPackard/python-hpOneView
examples/firmware_bundles.py
Python
mit
1,916
from operator import attrgetter from django.db import connection, connections, router, transaction from django.db.backends import utils from django.db.models import signals, Q from django.db.models.fields import (AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist) fr...
AlexHill/django
django/db/models/fields/related.py
Python
bsd-3-clause
77,816
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Gregory Bowman # Contributors: Robert McGibbon # # MDTraj is f...
rmcgibbo/mdtraj
tests/test_io.py
Python
lgpl-2.1
4,978
import typing from datetime import date, timedelta def daterange(start_date: date, end_date: date) -> typing.Iterator[date]: for n in range(int((end_date - start_date).days)): yield start_date + timedelta(days=n)
patrick91/pycon
backend/api/conferences/helpers/days.py
Python
mit
227
# encoding: utf-8 import csv from urllib2 import HTTPError import django from django.db import transaction import urllib2 from datetime import datetime from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import BaseCommand from openfonacide.matcher import Matcher from openfonacide.mo...
nemesiscodex/openfonacide
openfonacide/management/commands/actualizar_datasets.py
Python
lgpl-3.0
3,284
# Copyright (C) 2007-2015 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at you...
khushboo9293/mailman
src/mailman/rules/loop.py
Python
gpl-3.0
1,367
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=C0103 """ Process shallow discourse relations from CoNLL16st corpus (from `relations.json` or `relations-no-senses.json`). """ __author__ = "GW [http://gw.tnode.com/] <gw.2016@tnode.com>" __license__ = "GPLv3+" from .files import load_parses, load_raws, l...
gw0/conll16st_data
relations.py
Python
agpl-3.0
9,141
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import super...
superdesk/superdesk-aap
server/aap/subscriber_transmit_references/__init__.py
Python
agpl-3.0
701
#!/usr/bin/env python3 from core import * from fetch import fetch import shutil emailRgx = r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b' class clone(Command): """Clone a TFS repository.""" def __init__(self): self.fetch = fetch() Command.__init__(self) def _initArgParser(self, parser): ...
nodirt/git-tf
clone.py
Python
apache-2.0
4,629
from typing import Any, Sequence, Union from dataclasses import dataclass from . import RequestMsg, ReplyMsg, Message, SimpleMessage from hedgehog.protocol.proto import ack_pb2 from hedgehog.utils import protobuf __all__ = ['Acknowledgement'] # <GSL customizable: module-header> from hedgehog.protocol.proto.ack_pb2 i...
PRIArobotics/HedgehogProtocol
hedgehog/protocol/messages/ack.py
Python
agpl-3.0
1,301
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
kernow/ansible-modules-core
cloud/amazon/route53.py
Python
gpl-3.0
22,225
#!/usr/bin/env python # Copyright 2013 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 unittest from appengine_wrappers import GetAppVersion from app_yaml_helper import AppYamlHelper from cron_servlet import CronSe...
mogoweb/chromium-crosswalk
chrome/common/extensions/docs/server2/cron_servlet_test.py
Python
bsd-3-clause
8,542
import openbabel as ob import pybel import networkx as nx def obabel_to_eden(input, file_type='sdf', **options): """ Takes a string list in sdf format format and yields networkx graphs. Parameters ---------- input : string A pointer to the data source. """ for mol in pybel.readfi...
bgruening/EDeN
eden/converter/molecule/obabel.py
Python
gpl-3.0
893
"""Fundamental data processing operations, utility functions for iterables, and other data tools Copyright (c) 2016 Aubrey Barnard. This is free software released under the MIT license. See LICENSE for details. """ import itertools as itools # TODO implement the relational algebra operations as objects that can b...
afbarnard/barnapy
barnapy/datatools.py
Python
mit
3,620
""" Test for RFlink sensor components. Test setup of rflink sensor component/platform. Verify manual and automatic sensor creation. """ from datetime import timedelta from unittest.mock import patch from homeassistant.components.rflink import CONF_RECONNECT_INTERVAL from homeassistant.const import ( EVENT_STATE_C...
Teagan42/home-assistant
tests/components/rflink/test_binary_sensor.py
Python
apache-2.0
5,273
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from __future__ import absolute_import impo...
ta2-1/pootle
tests/forms/contact.py
Python
gpl-3.0
7,271
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
funkring/fdoo
config/enabled-addons/openerp/__init__.py
Python
agpl-3.0
1,045
import pyxel from .button import Button from .constants import ( BUTTON_DISABLED_COLOR, BUTTON_ENABLED_COLOR, BUTTON_PRESSED_COLOR, BUTTON_TEXT_COLOR, FONT_HEIGHT, FONT_WIDTH, ) class TextButton(Button): """ Events: __on_press() __on_release() """ def __init__...
ferriman/SSandSP
pyxel-test/venv/lib/python3.8/site-packages/pyxel/ui/text_button.py
Python
gpl-3.0
1,065
""" WSGI config for starfish 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_APPLICATION``...
ictofnwi/steep
steep/wsgi.py
Python
agpl-3.0
1,422
from ...exception import APIError class RbxProjectUseAction(object): def do_action_use(self): project = self._get_project() components = self._index(project.get('components', []), 'name') self.query_resource(project.get('name') and 'put' or 'post', json=self._merge_component_c...
jexhson/rbx
rbx/action/project/use.py
Python
gpl-2.0
4,326
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name="Translation", fields=[ ( "id", ...
ulule/django-linguist
linguist/migrations/0001_initial.py
Python
mit
3,093
import warnings import rules from rules import predicates as rules_predicates from adhocracy4.organisations.predicates import is_initiator from adhocracy4.organisations.predicates import is_org_member from adhocracy4.phases import predicates as phase_predicates from adhocracy4.projects.predicates import is_live from ...
liqd/adhocracy4
adhocracy4/modules/predicates.py
Python
agpl-3.0
4,907
# TODO: As of writing this our only concern is ensuring that the fact feature is reflected in the Host endpoint. # Other host tests should live here to make this test suite more complete. import pytest import urllib.parse from awx.api.versioning import reverse from awx.main.models import Organization, Host, Group, In...
GoogleCloudPlatform/sap-deployment-automation
third_party/github.com/ansible/awx/awx/main/tests/functional/api/test_host_filter.py
Python
apache-2.0
1,890
# BSD Licence # Copyright (c) 2012, Science & Technology Facilities Council (STFC) # All rights reserved. # # See the LICENSE file in the source distribution of this software for # the full license text. from setuptools import setup, find_packages import sys import os # Import version from the top-level package from ...
bird-house/esgf-pyclient
setup.py
Python
bsd-3-clause
1,668
"""parse_file.py: Parses each page from the website.""" import re from bs4 import BeautifulSoup import parse_tweet def parse_tweets(tweets, output_file): """Iterates over each tweet in tweets, parses them, and writes the tweet to the output file as a new line (which will be a new row/record in the sprea...
CaryWillard/DeletedTweetScraper
src/parse_file.py
Python
unlicense
860
"""Generic testing tools. Authors ------- - Fernando Perez <Fernando.Perez@berkeley.edu> """ from __future__ import absolute_import #----------------------------------------------------------------------------- # Copyright (C) 2009 The IPython Development Team # # Distributed under the terms of the BSD License. T...
wolfram74/numerical_methods_iserles_notes
venv/lib/python2.7/site-packages/IPython/testing/tools.py
Python
mit
15,350
import sys import unittest from dynd import nd, ndt class TestArrayAsPy(unittest.TestCase): def test_struct_or_tuple(self): a = nd.array((3, "testing", 1.5), type='{x:int, y:string, z:real}') self.assertEqual(nd.as_py(a), {'x': 3, 'y': "testing", 'z': 1.5}) a = nd.array([(1, 1.5), (2, 3.5)]...
ContinuumIO/dynd-python
dynd/nd/test/test_array_as_py.py
Python
bsd-2-clause
1,759
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from vocabularies import createSubjectsVocab from vocabularies import createThemesVocab from vocabularies import createFormatsVocab from vocabularies import createDataTypesVocab from utility import stringToTags from utility import loadArray from ut...
ilri/ckanext-tools
ckanext-toolsmetadata/ckanext/toolsmetadata/plugin.py
Python
gpl-3.0
11,193
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
kratman/psi4public
psi4/driver/qcdb/molpro2.py
Python
gpl-2.0
27,551
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-07-21 17:51 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0003_auto_20170718_1633'), ] operations = ...
schiller/cartolafc
core/migrations/0004_auto_20170721_1851.py
Python
mit
2,107
from __future__ import division from sympy import cos, exp, expand, I, Matrix, pi, S, sin, sqrt, Sum, symbols from sympy.abc import alpha, beta, gamma, j, m from sympy.physics.quantum import hbar, represent, Commutator, InnerProduct from sympy.physics.quantum.qapply import qapply from sympy.physics.quantum.tensorproduc...
lidavidm/mathics-heroku
venv/lib/python2.7/site-packages/sympy/physics/quantum/tests/test_spin.py
Python
gpl-3.0
320,424
import os, shutil, tempfile, csv, time import subprocess import warnings import tunerconfig from tunerconfig import config class dialect(csv.excel_tab): lineterminator="\n" try: from os.path import relpath as _relpath except: def _relpath(path, root = None): if root is None: root = os.getcwd() ret...
hellok/PetaBricks
scripts/storagedirs.py
Python
mit
4,681
# Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
lrocheWB/navitia
source/jormungandr/jormungandr/scenarios/stif.py
Python
agpl-3.0
2,077
# To do: # slicing? getItem, setItem? # reverse? # length? from point import Point from line import Line from affinematrix import AffineMatrix class Polyline(object): ''' A polyline is a list of points that are connected, in the order in which they are stored ''' def __init__(self, pointList=None, cl...
gfsmith/gears
gears/geometry/polyline.py
Python
mit
4,573
#!/usr/bin/python # # Copyright 2012 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 b...
donspaulding/adspygoogle
examples/adspygoogle/adwords/v201209/basic_operations/get_text_ads.py
Python
apache-2.0
2,527
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
AsimmHirani/ISpyPi
tensorflow/contrib/tensorflow-master/tensorflow/contrib/learn/python/learn/learn_runner_test.py
Python
apache-2.0
8,363
# -*- coding: utf-8 -*- import click @click.command() def main(args=None): """Console script for localhost""" click.echo("Replace this message by putting your code into " "localhost.cli.main") click.echo("See click documentation at http://click.pocoo.org/") if __name__ == "__main__": ...
Grupo-de-Oceanografia-Costeira/localhost
localhost/cli.py
Python
mit
328
from cvxpy import * import create_graph as g import pickle # An object oriented max-flow problem. class Edge(object): """ An undirected, capacity limited edge. """ def __init__(self, capacity): self.capacity = capacity self.flow = Variable() # Connects two nodes via the edge. def conne...
riadnassiffe/Simulator
src/tools/ecos/cvxpy/examples/flows/max_flow.py
Python
mit
1,618
# -*- coding: utf-8 -*- # Copyright(C) 2017 Théo Dorée # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
vicnet/weboob
modules/amazon/module.py
Python
lgpl-3.0
4,122
#coding=utf-8 from django.conf.urls import patterns, url import views urlpatterns = patterns('', url(r'/genmd5', views.genmd5, name='genmd5'), url(r'/crashmd5/(\w{32})', views.crashmd5, name='crashmd5'), url(r'/md5', views.md5, name='md5'), url(r'/base64', views.base64, name='base64'), url(r'/t...
sunjiesh/freeapi
freeapi/freeapi/encrypt/urls.py
Python
gpl-2.0
410
# -*- coding: utf-8 -*- # # GitGate documentation build configuration file, created by # sphinx-quickstart on Sat Apr 26 03:46:24 2014. # # 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. # # A...
nullism/gitgate
docs-rst/conf.py
Python
mit
10,185
import log, decorators from decorators import FootprintAllMethods, footprint, footprintcls @footprintcls() class Test(object): def __init__(self): self.foo = 'Foo' def __str__(self): return 'Test' __repr__ = __str__ def bar(self, hello='World'): self.aj() def aj(self):...
wmgaca/logcandy
logcandy/example.py
Python
mit
854
# Password validation # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators # They are validators of passwords to create strong password in the system password_validation = 'django.contrib.auth.password_validation' AUTH_PASSWORD_VALIDATORS = [ { 'NAME': '{password}.UserAttributeSi...
TeamBasedLearning/Service
pgtbl/tbl/config/password.py
Python
gpl-3.0
766
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2010 Nick Hall # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
pmghalvorsen/gramps_branch
gramps/gen/lib/locationbase.py
Python
gpl-2.0
6,529
#1. Program - Python shell de çalışan metin tabanlı uçuş kontrol programı :) metin = """ (1) Uçuş Saati Gir (2) Mesai Saati Gir (3) İstatistikleri Göster ------------------------- Lütfen Seçiminizi yapınız Çıkmak için (q) ya basınız """ #devam edecek :) d ="Devam etmek için bir tuşa basınız" while True: try: ...
ozgurturkiye/istihzapython
000.JustForFunPrograms/0010_ucuskontrol.py
Python
gpl-3.0
2,292
from common import * from dataset.mask import * CARVANA_DIR = '/root/share/data/kaggle-carvana-cars-2017' CARVANA_NUM_VIEWS = 16 CARVANA_HEIGHT = 1280 CARVANA_WIDTH = 1918 CARVANA_H = 512 CARVANA_W = 512 #data iterator ---------------------------------------------------------------- class KgCarDataset_1x(D...
chicm/carvana
08-02/software/car-segment/dataset/carvana_cars.py
Python
apache-2.0
7,924
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
VitalPet/c2c-rd-addons
stock_get_name_qty/__openerp__.py
Python
agpl-3.0
1,635
# -*- coding: utf-8 -*- # -*- Channel Ievenn -*- # -*- Created for Alfa Addon -*- # -*- By the Alfa Development Group -*- import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int import re from channels import filtertools from bs4 import BeautifulSoup from ...
alfa-addon/addon
plugin.video.alfa/channels/ievenn.py
Python
gpl-3.0
7,523
from setuptools import setup setup( name="spout", version="0.1.6", author="Jamie Davies", author_email="jamie@jamiedavies.me", packages=['spout'], url="http://github.com/daviesjamie/spout", license="MIT", description="A simple framework that makes it easy to work with data streams in Py...
daviesjamie/spout
setup.py
Python
mit
3,535
# # Collective Knowledge (classification of similar programs by the community) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # cfg={} # Will be updated by CK (meta description of this module) work=...
ctuning/ck-autotuning
module/program.species/module.py
Python
bsd-3-clause
809