text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'Said Sef'
saidsef/cloudflare
lib/__init__.py
Python
mit
67
0
import linecache import os.path import re import sys import traceback # @Reimport from _pydev_bundle import pydev_log from _pydevd_bundle import pydevd_dont_trace from _pydevd_bundle import pydevd_vars from _pydevd_bundle.pydevd_breakpoints import get_exception_breakpoint from _pydevd_bundle.pydevd_comm import CMD_ST...
RandallDW/Aruba_plugin
plugins/org.python.pydev/pysrc/_pydevd_bundle/pydevd_frame.py
Python
epl-1.0
33,951
0.006038
# Copyright (c) 2013 Mirantis 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 writ...
ekasitk/sahara
sahara/plugins/vanilla/v1_2_1/run_scripts.py
Python
apache-2.0
4,367
0
from __future__ import unicode_literals from django.db import models from django.test import TestCase from django.core.exceptions import ImproperlyConfigured from rest_framework import serializers, viewsets, permissions from rest_framework.compat import include, patterns, url from rest_framework.decorators import link,...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/rest_framework/tests/test_routers.py
Python
agpl-3.0
7,115
0.000703
#!/usr/bin/env python3 # -*- Coding: UTF-8 -*- # --------------------------------------------------------------------------- # Open Asset Import Library (ASSIMP) # --------------------------------------------------------------------------- # # Copyright (c) 2006-2010, ASSIMP Development Team # # All rights reserved. #...
MadManRises/Madgine
shared/assimp/test/regression/run.py
Python
mit
11,801
0.006949
''' Defines the base class of an electric potential grid. ''' import numpy as np import matplotlib as mpl import matplotlib.pylab as plt from numba import jit # Global dimensions (used for plots) sqc_x = (2., 'cm') # unit length for SquareCable sqc_u = (10., 'V') # unit potential for SquareCable edm_x = (10., 'mm')...
nkoukou/University_Projects_Year_3
EDM_Assembly/base_class.py
Python
mit
11,366
0.006159
import unittest class TestColor(unittest.TestCase): def test(self): self.assertTrue(True)
Samael500/social-inspector
inspector/tests/test.py
Python
mit
105
0
import os import sys import random import logging import signal main_path = os.path.abspath (os.path.dirname (__file__)) prev_path = main_path + "/.." sys.path.append (prev_path) from utils import _redis_connect, log_init from command import * from RedisHelper import RedisServer from Config import Config from sipcore ...
sipdbg/sipdbg
server/main_server.py
Python
gpl-2.0
6,551
0.020608
#!/usr/bin/env python # coding=utf-8 import re import random from datetime import date class Todo: """Single Todo item""" _priority_regex = re.compile(r'\(([A-Z])\) ') def __init__(self, item, index, colored="", priority="", contexts=[], projects=[], creation_date="", du...
AnthonyDiGirolamo/todotxt-machine
todotxt_machine/todo.py
Python
gpl-3.0
38,728
0.003823
# -*- coding: utf-8 -*- __author__ = """Ivan Ogasawara""" __email__ = 'ivan.ogasawara@gmail.com' __version__ = '0.1.0'
xmnlab/hermes
hermes/__init__.py
Python
mit
120
0
import copy # flake8: noqa LSPCI = """ 0000:00:00.0 "Host bridge" "Intel Corporation" "Haswell-E DMI2" -r02 "Intel Corporation" "Device 0000" 0000:00:03.0 "PCI bridge" "Intel Corporation" "Haswell-E PCI Express Root Port 3" -r02 "" "" 0000:00:03.2 "PCI bridge" "Intel Corporation" "Haswell-E PCI Express Root Port 3" -r0...
coreycb/charms.openstack
unit_tests/pci_responses.py
Python
apache-2.0
10,045
0.005077
"""This module contains the general information for EquipmentLocatorLed ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class EquipmentLocatorLedConsts: ADMIN_STATE_INACTIVE = "inactive" ADMIN_STATE_OFF = "off" ADMI...
ragupta-git/ImcSdk
imcsdk/mometa/equipment/EquipmentLocatorLed.py
Python
apache-2.0
5,417
0.011076
import unittest from conans.client.recorder.search_recorder import SearchRecorder class SearchRecorderTest(unittest.TestCase): def setUp(self): self.recorder = SearchRecorder() def empty_test(self): info = self.recorder.get_info() expected_result = {'error': False, 'results': []} ...
birsoyo/conan
conans/test/functional/search_recorder_test.py
Python
mit
10,512
0.00333
from test import support import unittest import sys # Skip test if nis module does not exist. nis = support.import_module('nis') class NisTests(unittest.TestCase): def test_maps(self): try: maps = nis.maps() except nis.error as msg: # NIS is probably not active, so this te...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/test/test_nis.py
Python
gpl-3.0
1,167
0.001714
from autobahn.twisted.websocket import WebSocketServerFactory, \ WebSocketServerProtocol from tws_game.lobby import Lobby from tws_game.tetris import Tetris from pprint import pprint import json class ClientConnection(WebSocketServerProtocol): def onOpen(self): self.factory.register(self) def...
tomreitsma/the-weird-science
tws_game/server.py
Python
mit
3,918
0.00051
"""Migration for a given Submitty course database.""" def up(config, database, semester, course): """ Run up migration. :param config: Object holding configuration details about Submitty :type config: migrator.config.Config :param database: Object for interacting with given database for environme...
RCOS-Grading-Server/HWserver
migration/migrator/migrations/course/20200704004101_gradeable_access.py
Python
bsd-3-clause
1,205
0.004149
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
eicher31/compassion-modules
sbc_compassion/controllers/__init__.py
Python
agpl-3.0
426
0
""" sentry.web.urls ~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import __all__ = ('urlpatterns',) from django.conf.urls import include, patterns, url from django.conf import settings from ...
nicholasserra/sentry
src/sentry/web/urls.py
Python
bsd-3-clause
18,988
0.003318
############################ ## replaceLinesFull.py ############################ """ Script for replacing special escape characters in the original yelp academic dataset files. Special characters such as \n cause problems for the JSON to CSV conversions. If you want to include review text in the edge file, use this scr...
Aneapiy/graph_visualization_Yelp
dataProcScripts/replaceLinesFull.py
Python
apache-2.0
698
0.018625
# -*- coding: utf-8 -*- """ terminal.prompt ~~~~~~~~~~~~~~~ Prompt support on terminal. :copyright: (c) 2013 by Hsiaoming Yang. """ import getpass import sys # Python 3 if sys.version_info[0] == 3: string_type = str else: string_type = (unicode, str) def prompt(name, default=None): """...
lepture/terminal
terminal/prompt.py
Python
bsd-3-clause
3,060
0.000327
import requests import pytest import subprocess # ============================================================================ class TestAuto(object): PREFIX = 'http://localhost:8089' USER = 'testauto' LIST_ID = '' AUTO_ID = '' NUM_BROWSERS = 2 @classmethod def setup_class(cls): c...
webrecorder/webrecorder
webrecorder/auto_tests/runauto.py
Python
apache-2.0
4,145
0.003619
from setuptools import setup, find_packages setup( name='plutokore', packages=find_packages(), version='0.10', description='Python tool for analysing PLUTO simulation data', author='Patrick Yates', author_email='patrick.yates@utas.edu.au', url='https://github.com/pmyates/plutokore', ke...
opcon/plutokore
setup.py
Python
mit
588
0.003401
class Zvire(object): def __init__(self,jmeno = "",druh = "",hmotnost =0): self._jmeno = jmeno self._druh = druh self._hmotnost = hmotnost @property def jmeno(self): return self._jmeno @jmeno.setter def jmeno(self,ajmeno): self._jmeno = ajmeno @proper...
xtompok/uvod-do-prg
cv10/cv10.py
Python
mit
886
0.01812
import socket as sk from kivy.logger import Logger def getWebsite(): return "www.google.com" def getIpPort(): sock_info=sk.getaddrinfo(getWebsite(),80,proto=sk.IPPROTO_TCP) return sock_info[0][-1] def checkInternet(): sock=sk.socket() sock.settimeout(1) try: sock.connect(getIpPort()) ...
udaykrishna/unCap
checks.py
Python
mit
1,028
0.019455
# -*- coding: utf-8 -*- """ fbone.modules.user ~~~~~~~~~~~~~~~~~~~~~~~~ user management commands """ from flask.ext.script import Command, prompt, prompt_pass from werkzeug.datastructures import MultiDict from .models import User class CreateUserCommand(Command): """Create a user""" """!!!broke...
jessekl/flixr
fbone/modules/user/commands.py
Python
mit
1,438
0.000695
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'FormDefinitionField.help_text' db.alter_column('form_d...
MagicSolutions/django-form-designer
form_designer/migrations/0010_auto__chg_field_formdefinitionfield_help_text.py
Python
bsd-3-clause
10,400
0.008173
# Copyright 2011 OpenStack LLC. # 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...
salv-orlando/MyRepo
nova/tests/test_vsa.py
Python
apache-2.0
7,062
0.000142
"""Init Extension.""" from flask_cache import Cache cache = Cache() def setup_app(app): """Init the extension with app context.""" cache.init_app(app) return app
PawelPamula/who-are-you
webfest/extensions/cache/__init__.py
Python
mit
178
0
"""Mayavi/traits GUI for converting data from KIT systems.""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) from collections import Counter import os import sys from warnings import warn import numpy as np from scipy.linalg import inv from threading import Thread from ..exter...
teonlamont/mne-python
mne/gui/_kit2fiff_gui.py
Python
bsd-3-clause
28,774
0
# PPFem: An educational finite element code # Copyright (C) 2015 Matthias Rambausek # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
mrambausek/PPFem
ppfem/__init__.py
Python
gpl-3.0
1,648
0.00182
#!/usr/bin/env python3 # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
dbtsai/spark
dev/create-release/translate-contributors.py
Python
apache-2.0
12,628
0.003088
# -*- coding: utf-8 -*- """This file is part of the microerp project. This program 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 License, or (at your option) any later version. ...
dudanogueira/microerp
microerp/solicitacao/models.py
Python
lgpl-3.0
6,439
0.006412
import os from django.contrib.gis.geos import Point from data_importers.management.commands import BaseCsvStationsCsvAddressesImporter """ Define a stub implementation of address importer we can run tests against """ class Command(BaseCsvStationsCsvAddressesImporter): srid = 4326 council_id = "ABC" addr...
DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_importers/tests/stubs/stub_addressimport.py
Python
bsd-3-clause
1,144
0.001748
#!/usr/bin/env python from Acspy.Nc.CommonNC import CommonNC from Acspy.Nc.Supplier import Supplier import datacapEx from datacapEx import ExecBlockProcessedEvent, DataCapturerId, ExecBlockStartedEvent, ScanStartedEvent import asdmEX s = Supplier('pyTest-NC') name = 'DATACAP1' s.publishEvent(name) ses...
ACS-Community/ACS
LGPL/CommonSoftware/nctest/ws/test/pyStructureEventTest.py
Python
lgpl-2.1
1,355
0.030996
from office365.runtime.client_value import ClientValue class ServicePlanInfo(ClientValue): """Contains information about a service plan associated with a subscribed SKU. The servicePlans property of the subscribedSku entity is a collection of servicePlanInfo.""" def __init__(self, _id=None, name=None, pr...
vgrem/Office365-REST-Python-Client
office365/directory/licenses/service_plan_info.py
Python
mit
1,595
0.004389
# SPDX-License-Identifier: MIT import sys try: # Our match_hostname function is the same as 3.5's, so we only want to # import the match_hostname function if it's at least that good. if sys.version_info < (3, 5): raise ImportError("Fallback to vendored code") from ssl import CertificateError, ...
vlvkobal/netdata
collectors/python.d.plugin/python_modules/urllib3/packages/ssl_match_hostname/__init__.py
Python
gpl-3.0
719
0.001391
import numpy as np import pyroms from pyroms_toolbox.BGrid_GFDL import BGrid_GFDL def get_nc_BGrid_GFDL(grdfile, name='GFDL_CM2.1_North_Pacific', \ # xrange=(80,189), yrange=(96,198)): xrange=(60,175), yrange=(120, 190)): """ Bgrd = get_nc_BGrid_GFDL(gr...
dcherian/pyroms
pyroms_toolbox/pyroms_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py
Python
bsd-3-clause
1,731
0.009821
# This file is part of OMG-tools. # # OMG-tools -- Optimal Motion Generation-tools # Copyright (C) 2016 Ruben Van Parys & Tim Mercy, KU Leuven. # All rights reserved. # # OMG-tools 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...
meco-group/omg-tools
examples/p2p_3dquadrotor.py
Python
lgpl-3.0
2,057
0.000972
from robot.api.deco import keyword def defined_twice(): 1/0 @keyword('Defined twice') def this_time_using_custom_name(): 2/0 def defined_thrice(): 1/0 def definedThrice(): 2/0 def Defined_Thrice(): 3/0 @keyword('Embedded ${arguments} twice') def embedded1(arg): 1/0 @keyword('Embedded ${a...
ChrisHirsch/robotframework
atest/testdata/keywords/DupeKeywords.py
Python
apache-2.0
372
0.016129
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Radim Rehurek <radimrehurek@seznam.cz> # Copyright (C) 2016 Manas Ranjan Kar <manasrkar91@gmail.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: $ python -m gensim.scripts.glove2word2vec --input <GloVe ve...
summanlp/gensim
gensim/scripts/glove2word2vec.py
Python
lgpl-2.1
2,742
0.002918
from .. import cpso from .._helpers import register __all__ = [ "minimize", ] def minimize( fun, bounds, x0=None, args=(), maxiter=100, popsize=10, inertia=0.7298, cognitivity=1.49618, sociability=1.49618, seed=None, xtol=1.0e-8, ftol=1.0e-8, constraints=None, ...
keurfonluu/StochOPy
stochopy/optimize/pso/_pso.py
Python
mit
5,326
0.003192
#!/usr/bin/python import urllib2, base64 import shutil import json import json import argparse import os if __name__ == '__main__': parser = argparse.ArgumentParser(description=''' This script will copy the step/jobentry images from a running carte (with kthin-server) to the img folder ''', formatter_class = arg...
brosander/kettle-vertx-webapp
src/util/copyData.py
Python
apache-2.0
1,824
0.014254
# Copyright (C) 2017 Martin Nilsson # This file is part of the Memtran compiler. # # The Memtran compiler 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 # ...
LJMNilsson/memtran
src/tokens.py
Python
gpl-3.0
12,189
0.008696
#!/usr/bin/python # # Copyright (C) 2010-2015 Gordon Fraser, Andrea Arcuri and EvoSuite # contributors # # This file is part of EvoSuite. # # EvoSuite is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser Public License as published by the # Free Software Foundation, either vers...
SoftwareEngineeringToolDemos/FSE-2011-EvoSuite
release_results/script/experiments_base.py
Python
lgpl-3.0
5,733
0.017966
# (c) 2012, Zettar Inc. # Written by Chin Fang <fangchin@zettar.com> # # This file is part of Ansible # # This module 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 y...
goozbach/ansible
lib/ansible/inventory/expand_hosts.py
Python
gpl-3.0
4,357
0.00459
# -*- coding: utf-8 -*- # Copyright 2017 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_employee_display_own_info
VitalPet/addons-onestein
hr_employee_display_own_info/tests/__init__.py
Python
agpl-3.0
192
0
""" @package mi.dataset.driver.ctdpf_ckl.mmp_cds.driver @file marine-integrations/mi/dataset/driver/ctdpf_ckl/mmp_cds/driver.py @author Mark Worden @brief Driver for the CtdpfCklMmpCds Release notes: initial release """ __author__ = 'Mark Worden' __license__ = 'Apache 2.0' from mi.core.log import get_logger log = g...
ooici/marine-integrations
mi/dataset/driver/ctdpf_ckl/mmp_cds/driver.py
Python
bsd-2-clause
2,429
0.003705
# 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. #---------------------------------------------------------------------...
SUSE/azure-sdk-for-python
azure-mgmt/tests/test_graphrbac.py
Python
mit
1,961
0.002552
# Copyright 2011 OpenStack LLC. # 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...
sileht/deb-openstack-nova
nova/db/sqlalchemy/migrate_repo/versions/026_add_agent_table.py
Python
apache-2.0
3,336
0.003897
"""Measure the distance or depth with an HCSR04 Ultrasonic sound sensor and a Raspberry Pi. Imperial and Metric measurements are available""" # Al Audet # MIT License from __future__ import division import time import math import warnings import RPi.GPIO as GPIO class Measurement(object): """Create a measurem...
alaudet/hcsr04sensor
hcsr04sensor/sensor.py
Python
mit
8,573
0.001166
#! /usr/bin/env python # -*- coding: utf-8 -*- import subprocess import SocketServer from lib import const class PowerIRSendHandler(SocketServer.StreamRequestHandler): def handle(self): # print "connected from:", self.client_address sent_data = "" while True: data = self.req...
nmatsui/wasted_energy_of_tv_iot
power_ir_send_server.py
Python
mit
939
0.001065
# proxy module from __future__ import absolute_import from envisage.plugins.refresh_code.refresh_code_plugin import *
enthought/etsproxy
enthought/plugins/refresh_code/refresh_code_plugin.py
Python
bsd-3-clause
118
0
# -*- coding: utf-8 -*- # # Copyright 2015 Thomas Amland # # 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 l...
tamland/python-actors
actors/internal/messages.py
Python
apache-2.0
995
0
import logging access_logger = logging.getLogger('aiohttp.access') client_logger = logging.getLogger('aiohttp.client') internal_logger = logging.getLogger('aiohttp.internal') server_logger = logging.getLogger('aiohttp.server') web_logger = logging.getLogger('aiohttp.web') ws_logger = logging.getLogger('aiohttp.websoc...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/aiohttp/log.py
Python
apache-2.0
326
0
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __doc__ = """ gyptest.py -- test runner for GYP tests. """ import os import optparse import shlex import subprocess import sys class Comma...
hoho/dosido
nodejs/tools/gyp/gyptest.py
Python
mit
8,032
0.015065
import pytz from sqlalchemy.types import TypeDecorator from sqlalchemy.ext.indexable import index_property from sqlalchemy.ext.mutable import Mutable from sqlalchemy_utils import EncryptedType from redash.utils import json_dumps, json_loads from redash.utils.configuration import ConfigurationContainer from .base impo...
chriszs/redash
redash/models/types.py
Python
bsd-2-clause
3,048
0.000656
#coding=utf-8 import unittest import HTMLTestRunner import time from config import globalparam from public.common import sendmail def run(): test_dir = './testcase' suite = unittest.defaultTestLoader.discover(start_dir=test_dir,pattern='test*.py') now = time.strftime('%Y-%m-%d_%H_%M_%S') reportname =...
lsp84ch83/PyText
UItestframework/run.py
Python
gpl-3.0
730
0.011204
import json import os import shutil import datetime try: from urllib.parse import urlencode except ImportError: from urllib import urlencode try: import subprocess32 as subprocess except ImportError: import subprocess try: from os import scandir, walk except ImportError: from scandir import s...
dougbenjamin/panda-harvester
pandaharvester/harvestermessenger/shared_file_messenger.py
Python
apache-2.0
35,562
0.002362
#! /usr/bin/env python2 ############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in...
pivonroll/Qt_Creator
scripts/dependencyinfo.py
Python
gpl-3.0
8,279
0.002416
#!/usr/bin/env python3 import sys import os import os.path import subprocess import tempfile import re import itertools import hashlib import shutil import argparse import codecs import json import multiprocessing import errno from functools import partial class Paths(): def __init__(self, spirv_cross, glslang, s...
johnparker007/mame
3rdparty/bgfx/3rdparty/spirv-cross/test_shaders.py
Python
gpl-2.0
29,937
0.008852
import unittest import os import time # import itertools from pprint import ( pprint, pformat ) from FuXi.DLP import non_DHL_OWL_Semantics # , MapDLPtoNetwork from FuXi.DLP.ConditionalAxioms import AdditionalRules from FuXi.Horn.HornRules import HornFromN3 from FuXi.Horn.PositiveConditions import BuildUnit...
mpetyx/pyrif
3rdPartyLibraries/FuXi-master/test/OWLsuite.py
Python
mit
20,462
0.002883
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
xuleiboy1234/autoTitle
tensorflow/tensorflow/contrib/boosted_trees/lib/learner/batch/ordinal_split_handler_test.py
Python
mit
44,613
0.005828
"""Constants for the cloud component.""" DOMAIN = 'cloud' REQUEST_TIMEOUT = 10 PREF_ENABLE_ALEXA = 'alexa_enabled' PREF_ENABLE_GOOGLE = 'google_enabled' PREF_ENABLE_REMOTE = 'remote_enabled' PREF_GOOGLE_ALLOW_UNLOCK = 'google_allow_unlock' PREF_CLOUDHOOKS = 'cloudhooks' PREF_CLOUD_USER = 'cloud_user' CONF_ALEXA = 'al...
molobrakos/home-assistant
homeassistant/components/cloud/const.py
Python
apache-2.0
1,006
0
def extractTheevilduketranslationsBlogspotCom(item): ''' Parser for 'theevilduketranslations.blogspot.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', ...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractTheevilduketranslationsBlogspotCom.py
Python
bsd-3-clause
584
0.032534
#!/usr/bin/python # JIRA commit acceptance python client for CVS # Author: istvan.vamosi@midori.hu # $Id$ import sys import urlparse import xmlrpclib # configure JIRA access # ("projectKey" can contain multiple comma-separated JIRA project keys like "projectKey = 'TST,ARP'". # If you specify multiple key...
terabyte/Jira-Commit-Acceptance-Plugin
src/main/resources/client/python/cvs/jira-client.py
Python
bsd-3-clause
1,566
0.01341
# coding: utf-8 from __future__ import unicode_literals """ This module provides classes to perform fitting of molecule with arbitrary atom orders. This module is supposed to perform exact comparisons without the atom order correspondence prerequisite, while molecule_structure_comparator is supposed to do rough compa...
rousseab/pymatgen
pymatgen/analysis/molecule_matcher.py
Python
mit
24,855
0.000483
# -*- coding: utf-8 -*- from __future__ import print_function import re import sys from datetime import datetime, timedelta import numpy as np import pandas as pd import pandas.compat as compat import pandas.core.common as com import pandas.util.testing as tm from pandas import (Series, Index, DatetimeIndex, Timedel...
pjryan126/solid-start-careers
store/api/zillow/venv/lib/python2.7/site-packages/pandas/tests/test_base.py
Python
gpl-2.0
38,533
0.000052
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class TripadItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
acehanks/projects
tripadvisor_scrapy/tripad/items.py
Python
mit
285
0
import datetime import sqlalchemy as sa from sqlalchemy.testing import engines from sqlalchemy import testing from sqlalchemy import Integer, String, Date, ForeignKey, literal_column, \ orm, exc, select, TypeDecorator from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationshi...
Cito/sqlalchemy
test/orm/test_versioning.py
Python
mit
27,671
0.003795
from sqlalchemy import Column, Integer, String, func, Boolean from app import db class CnesProfessional(db.Model): __tablename__ = 'cnes_professional' year = Column(Integer, primary_key=True) region = Column(String(1), primary_key=True) mesoregion = Column(String(4), primary_key=True) microregion ...
DataViva/dataviva-api
app/models/cnes_professional.py
Python
mit
2,123
0.000471
from django.contrib.staticfiles.testing import StaticLiveServerTestCase from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait import sys from .server_tools import reset_database class FunctionalTest(StaticLiveServerTestCase): @classmethod def setUpClass(cls): for arg in sys.argv:...
doctori/PythonTDD
functional_tests/base.py
Python
gpl-2.0
1,832
0.027293
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2014 Cloudwatt # 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/l...
vmahuli/contrail-controller
src/vnsw/opencontrail-vrouter-netns/opencontrail_vrouter_netns/tests/test_vrouter_netns.py
Python
apache-2.0
3,842
0
# Copyright (c) 2014, the GREAT3 executive committee (http://www.great3challenge.info/?q=contacts) # 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...
barnabytprowe/great3-public
inputs/galdata/make_fits_catalogs.py
Python
bsd-3-clause
15,061
0.007503
# -*- coding: utf-8 -*- {%- if cookiecutter.pyapp_type == "asyncio" -%} {%- set async = "async" -%} {%- set appmod = "nicfit.aio" -%} {%- else -%} {%- set async = "" -%} {%- set appmod = "nicfit" -%} {%- endif %} from {{ appmod }} import Application from nicfit.console import pout from . import version {{ async }} de...
nicfit/nicfit.py
cookiecutter/{{cookiecutter.project_name}}/{{cookiecutter.py_module}}/__main__.py
Python
mit
614
0.061889
#! /Users/rkrsn/anaconda/bin/python from __future__ import print_function from __future__ import division from os import environ, getcwd from pdb import set_trace from random import uniform, randint, shuffle import sys # Update PYTHONPATH HOME = environ['HOME'] axe = HOME + '/git/axe/axe/' # AXE pystat = HOME + '/git...
ai-se/Tree-Learner
CROSSTREES.py
Python
unlicense
7,714
0.012315
# Copyright (c) 2007 Roman Glass # See LICENSE for details. """Play around with different SortingAlgorithms""" from zope.interface import Interface, implements from interfaces import IListManager from baselist import * from sortingalgorithms import * from help import * class ListM: implements(IListManager) ...
rglass/buddha-bum
listman.py
Python
gpl-3.0
711
0.001406
import caveGenerate import yaml filename = 'data/cavegen.map' def addObjects(): o = list() o.append('floor') o.append('ground') o.append('apple') o.append('cherry') o.append('enemy_poringp') o.append('enemy_poringb') return o def writeMap(fn, m): data = yaml.dump(m, default_flow_s...
anokata/pythonPetProjects
surgame/src/mapGenerator.py
Python
mit
1,097
0.004558
# Django settings for ssssss project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS import os if 'SERVER_SOFTWARE' in os.environ: from sae.const import ( MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, MYSQL_DB ) else: # Make `...
huaijiefeng/contact-sync-server
contactsync/settings.py
Python
apache-2.0
5,270
0.00038
class Board(object): """This class defines the board""" def __init__(self, board_size): """The initializer for the class""" self.board_size = board_size self.board = [] for index in range(0, self.board_size): self.board.append(['0'] * self.board_size) def is_on...
jonbrohauge/pySudokuSolver
board.py
Python
mit
1,589
0.001259
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ('let_me_app', '0003_auto_20150713_2051'), ] operations = [ migrations.RemoveField(...
oleg-chubin/let_me_play
let_me_app/migrations/0004_auto_20150713_2126.py
Python
apache-2.0
848
0.001179
""" Support for IP Webcam, an Android app that acts as a full-featured webcam. For more details about this component, please refer to the documentation at https://home-assistant.io/components/android_ip_webcam/ """ import asyncio import logging from datetime import timedelta import voluptuous as vol from homeassista...
miniconfig/home-assistant
homeassistant/components/android_ip_webcam.py
Python
mit
9,809
0
import metrics def rate(artToCatSim, label, membershipData, categoryTree, artNamesDict, catNamesDict): # countBefore1 = artToCatSim.count_nonzero() # for article in membershipData: # id_and_categories = article.split('\t') # articleId = int(id_and_categories[0]) # del id_and_categories...
pcejrowski/iwi
notebooks/calcs/rating.py
Python
mit
2,328
0.005155
# Copyright 2013 IBM Corp. # # 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 t...
HybridF5/tempest_debug
tempest/tests/test_list_tests.py
Python
apache-2.0
1,828
0.001641
from tests.unit.dataactcore.factories.staging import DetachedAwardFinancialAssistanceFactory from tests.unit.dataactvalidator.utils import number_of_errors, query_columns _FILE = 'fabs28_detached_award_financial_assistance_1' def test_column_headers(database): expected_subset = {'row_number', 'assistance_type', ...
fedspendingtransparency/data-act-broker-backend
tests/unit/dataactvalidator/test_fabs28_detached_award_financial_assistance_1.py
Python
cc0-1.0
2,049
0.007321
# -*- coding: utf-8 -*- # Copyright © 2013, 2014, 2017, 2020 Tom Most <twm@freecog.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) a...
twm/yarrharr
yarrharr/scripts/yarrharr.py
Python
gpl-3.0
1,676
0.000597
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class MyuniversityscraperPipeline(object): def process_item(self, item, spider): return item
systemovich/scrapy-myuniversity
myuniversityscraper/pipelines.py
Python
gpl-3.0
273
0
from django.urls import reverse from course_discovery.apps.api.v1.tests.test_views.mixins import APITestCase, SerializationMixin from course_discovery.apps.core.tests.factories import USER_PASSWORD, UserFactory from course_discovery.apps.course_metadata.models import LevelType from course_discovery.apps.course_metadat...
edx/course-discovery
course_discovery/apps/api/v1/tests/test_views/test_level_types.py
Python
agpl-3.0
1,985
0.002519
#!/usr/bin/env python3 # Sifer Aseph """Prints a "hello world" statement.""" def main(): """Utterly standard.""" print("Hello cruel world.") if __name__ == "__main__": main()
Surufel/Personal
2.pysifer/Older/hello_world.py
Python
agpl-3.0
189
0.010582
from django.conf.urls import patterns, include, url from darkoob.book import views as book_views urlpatterns = patterns('', url(r'^(?P<book_id>\d+)/(?P<book_title>[a-zA-Z0-9\-_]+)/$', book_views.page, name='book_page'), url(r'^look/$', book_views.book_lookup), url(r'^author/$', book_views.author_lookup), ...
s1na/darkoob
darkoob/book/urls.py
Python
mit
374
0.005348
# -*- coding: utf-8 -*- # $Id$ # # Copyright (c) 2007 Otto-von-Guericke-Universität Magdeburg # # This file is part of ECReviewBox. from StringIO import StringIO from Products.Archetypes.Extensions.utils import installTypes, install_subskin from Products.Archetypes.public import listTypes from Products.CMFCore.utils...
collective/ECReviewBox
Extensions/Install.py
Python
gpl-2.0
2,470
0.00486
# -*- coding: utf-8 -*- # Copyright (c) 2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
rbramwell/pulp
nodes/extensions/admin/pulp_node/extensions/admin/sync_schedules.py
Python
gpl-2.0
4,455
0.001571
''' Pulse characterization Created Fri May 12 2017 @author: cpkmanchee ''' import numpy as np import os.path import inspect from beamtools.constants import h,c,pi from beamtools.common import normalize, gaussian, sech2, alias_dict from beamtools.import_data_file import import_data_file as _import from beamtools.imp...
kikimaroca/beamtools
build/lib/beamtools/pulse.py
Python
mit
9,048
0.021994
# Copyright (C) 2006-2011 Canonical Ltd # # 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 distribute...
stewartsmith/bzr
bzrlib/plugins/weave_fmt/test_bzrdir.py
Python
gpl-2.0
26,897
0.005391
# -*- coding: utf-8 -*- # Copyright 2016-2017 Versada <https://versada.eu/> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging from odoo.service import wsgi_server from odoo.tools import config as odoo_config from . import const from .logutils import LoggerNameFilter, OdooSentryHandler _...
thinkopensolutions/server-tools
sentry/__init__.py
Python
agpl-3.0
2,417
0
""" environ settings """ import environ BASE_DIR = environ.Path(__file__) - 4 ENV_VAR = environ.Env()
kaizentech/skeleton
config/settings/configurations/ENV.py
Python
apache-2.0
103
0
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.event import event from flexget.plugin import PluginError log = logging.getLogger('list_clear') class ListClear(object...
oxc/Flexget
flexget/plugins/modify/list_clear.py
Python
mit
2,149
0.003723
from sympy import Sieve, sieve, Symbol, S, limit, I, zoo, nan, Rational from sympy.core.compatibility import range from sympy.ntheory import isprime, totient, mobius, randprime, nextprime, prevprime, \ primerange, primepi, prime, primorial, composite, compositepi, reduced_totient from sympy.ntheory.generate import...
kaushik94/sympy
sympy/ntheory/tests/test_generate.py
Python
bsd-3-clause
6,809
0.001028
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = "Ricardo Ribeiro" __credits__ = ["Ricardo Ribeiro"] __license__ = "MIT" __version__ = "1.0" __maintainer__ = "Ricardo Ribeiro" __email__ = "ricardojvr@gmail.com" __status__ = "Production"
UmSenhorQualquer/pyStateMachine
pyStateMachine/States/__init__.py
Python
mit
273
0.025641
from .views import ( SensorTypeViewSet, SensorViewSet, SensingPointViewSet, DataPointViewSet ) def contribute_to_router(router): router.register(r'sensorType', SensorTypeViewSet) router.register(r'sensor', SensorViewSet) router.register(r'sensingPoint', SensingPointViewSet) router.register(r'dataPo...
OpenAgInitiative/gro-api
gro_api/sensors/urls.py
Python
gpl-2.0
344
0.002907
import logging import ast import re import requests from cStringIO import StringIO from .config import config log = logging.getLogger(__name__) ''' Map 'generic' package name to 'flavor-specific' package name. If entry is None, either the package isn't known here, or it's known but should not be installed on remote...
michaelsevilla/teuthology
teuthology/packaging.py
Python
mit
22,261
0.000225