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
from __future__ import unicode_literals import unittest from functools import partial from beekeeper.variable_handlers import render import beekeeper.variable_handlers class VariableReceiver(object): def execute(self, var_type, **kwargs): render(self, var_type, **kwargs) def receive(self, expected...
haikuginger/beekeeper
test/test_variable_handers.py
Python
mit
3,412
0.005569
import pytest import rules from adhocracy4.projects.enums import Access from adhocracy4.test.helpers import freeze_phase from adhocracy4.test.helpers import freeze_post_phase from adhocracy4.test.helpers import freeze_pre_phase from adhocracy4.test.helpers import setup_phase from adhocracy4.test.helpers import setup_u...
liqd/a4-meinberlin
tests/ideas/rules/test_rules_view.py
Python
agpl-3.0
4,529
0
# 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 t...
VoiDeD/Sick-Beard
sickbeard/processTV.py
Python
gpl-3.0
9,409
0.004251
from ckan.lib.authenticator import UsernamePasswordAuthenticator from ckan.model import User, Session from sqlalchemy import Column, types, MetaData, DDL from sqlalchemy.ext.declarative import declarative_base from zope.interface import implements from repoze.who.interfaces import IAuthenticator Base = declarative_b...
ThrawnCA/ckanext-qgov
ckanext/qgov/common/authenticator.py
Python
agpl-3.0
2,108
0.009013
import os import json from PySide2 import QtCore from opencmiss.zinc.context import Context from opencmiss.zinc.material import Material from mapclientplugins.meshgeneratorstep.model.meshgeneratormodel import MeshGeneratorModel from mapclientplugins.meshgeneratorstep.model.meshannotationmodel import MeshAnnotationMo...
rchristie/mapclientplugins.meshgeneratorstep
mapclientplugins/meshgeneratorstep/model/mastermodel.py
Python
apache-2.0
6,058
0.007098
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime import ...
lbarahona/UdacityProject4
conference.py
Python
apache-2.0
37,472
0.005444
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
ntt-sic/heat
heat/tests/test_ceilometer_alarm.py
Python
apache-2.0
15,354
0.000065
""" Motion correction of image sequences by 'efficient subpixel image registration by cross correlation'. A reference image is iteratively computed by aligning and averaging a subset of images/frames. 2015 Lloyd Russell, Christoph Schmidt-Hieber *************************************************************************...
jzaremba/sima
sima/motion/dftreg.py
Python
gpl-2.0
31,079
0.000064
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
jayceyxc/hue
apps/search/src/search/conf.py
Python
apache-2.0
1,443
0
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ...testing import assert_equal from ..meshfix import MeshFix def test_MeshFix_inputs(): input_map = dict(args=dict(argstr='%s', ), cut_inner=dict(argstr='--cut-inner %d', ), cut_outer=dict(argstr='--cut-outer %d', ), decouple_inin=...
sgiavasis/nipype
nipype/interfaces/tests/test_auto_MeshFix.py
Python
bsd-3-clause
3,030
0.024092
import numpy as np import copy as copy import tensorflow as tf from pybullet_envs.deep_mimic.learning.pg_agent import PGAgent from pybullet_envs.deep_mimic.learning.solvers.mpi_solver import MPISolver import pybullet_envs.deep_mimic.learning.tf_util as TFUtil import pybullet_envs.deep_mimic.learning.rl_util as RLUtil ...
MadManRises/Madgine
shared/bullet3-2.89/examples/pybullet/gym/pybullet_envs/deep_mimic/learning/ppo_agent.py
Python
mit
15,708
0.006175
# Copyright 2010 OpenStack Foundation # 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 requ...
cloudbase/nova-virtualbox
nova/api/openstack/compute/plugins/v3/flavors_extraspecs.py
Python
apache-2.0
6,450
0
#!/usr/bin/env python import sys sys.dont_write_bytecode = True import glob import re import yaml import json import os import sys import time import logging import requests import platform import imp from argparse import ArgumentParser from slackclient import SlackClient def dbg(debug_string): if debug: ...
zbeaver4/python-webpage-monitor-slackbot
rtmbot.py
Python
mit
7,767
0.007596
""" Formula for building parallel """ from pakit import Archive, Recipe class Parallel(Recipe): """ GNU parallel executes shell jobs in parallel """ def __init__(self): super(Parallel, self).__init__() self.homepage = 'http://www.gnu.org/software/parallel' self.repos = { ...
pakit/recipes
parallel.py
Python
bsd-3-clause
883
0
#!/usr/bin/env python2 from hgraph import Hgraph import amr_graph_description_parser #import tree import re import sys import string from collections import defaultdict as ddict def format_tagged(s): #return [tuple(p.split('/')) for p in s.split()] return [p.rsplit('-',1)[0] for p in s.split()] def format_amr(l)...
isi-nlp/bolinas
common/hgraph/amr_corpus_reader.py
Python
mit
4,973
0.019706
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2012 Owais Lone <hello@owaislone.org> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software ...
andrenam/Fogger
fogger/FoggerWindow.py
Python
gpl-3.0
10,132
0.002764
from collections import namedtuple import io import re from six.moves.urllib.parse import urlparse from apitools.base.py import exceptions as apitools_exceptions from googlecloudsdk.api_lib.deployment_manager import dm_base from ruamel.yaml import YAML DM_OUTPUT_QUERY_REGEX = re.compile( r'!DMOutput\s+(?P<url>\bd...
aljim/deploymentmanager-samples
community/cloud-foundation/src/cloud_foundation_toolkit/dm_utils.py
Python
apache-2.0
3,240
0
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='davis-weatherlink-scraper', version='0.1.0', description='Scrap...
ojarva/davis-weatherlink-scraper
setup.py
Python
bsd-3-clause
1,407
0.001421
replacing='qwertyuiopasdfghjklzxcvbnm )([]\/{}!@#$%^&*' a='\/abcdefghijklmnopqrstuvwxyz() }{][*%$&^#@!' replacing=list(replacing) a=list(a) d={} e={} if len(replacing)==len(a): for x in range(len(a)): d[replacing[x]]=a[x] e[a[x]]=replacing[x] def encypt(dict,stri...
javaarchive/PIDLE
ccode.py
Python
mit
846
0.049645
# Copyright 2015 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...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/contrib/quantization/python/array_ops.py
Python
bsd-2-clause
1,156
0
from test import test_support from test.test_support import bigmemtest, _1G, _2G, _4G, precisionbigmemtest import unittest import operator import string import sys # Bigmem testing houserules: # # - Try not to allocate too many large objects. It's okay to rely on # refcounting semantics, but don't forg...
babyliynfg/cross
tools/project-creator/Python2.6.6/Lib/test/test_bigmem.py
Python
mit
39,354
0.001347
import svgutils.transform as sg from common import load_svg, label_plot fig = sg.SVGFigure("4.1in", "1.8in") a = load_svg(snakemake.input[1]) b = load_svg(snakemake.input[0]) b.moveto(190, 0) la = label_plot(5, 10, "a") lb = label_plot(185, 10, "b") fig.append([a, b, la, lb]) fig.save(snakemake.output[0])
merfishtools/merfishtools-evaluation
scripts/fig-dataset-correlation.py
Python
mit
311
0
from .. import __description__ from ..defender import VkRaidDefender, data, update_data #################################################################################################### LOGO = '''\ _ _ _ _ __ _ __ _| | __ _ __ __ _(_) __| | __| | ___ / _| __...
r4rdsn/vk-raid-defender
vk_raid_defender/cli/cli.py
Python
mit
7,730
0.007869
# Gradient Sliders # Custom ControlP5 Compound Classes for percentage sliders # For Processing in Python import copy add_library('controlP5') class GradientController(object): def __init__(self, colorList, cp5, sliderClass): self.colorList = self.colorListFromColors(colorList) self.cp5 = cp5 self.Slider = sl...
irlabs/BathroomTiles
GradientSliders.py
Python
mit
12,149
0.033254
#!/usr/bin/env python from math import (sqrt, ceil) from insertion_sort import * def bucket_sort(L=[]): ''' Unstable implementation of bucket sort. :param L: list of sortable elements. ''' if len(L) < 2: return L # create buckets num_bucket = sqrt(len(L)) interval = int(ceil(max(L) / num_b...
pymber/algorithms
algorithms/sorting/bucket_sort.py
Python
mit
730
0.012329
from collections import Counter, defaultdict import math import pprint import functools # Advanced material here, feel free to ignore memoize if you like. # Long story short, it remembers the inputs and outputs to functions, # and if the same input is seen multiple times, then rather than # running the function multi...
npoznans/python_etl
bayes_evening_workshop/Naive_Bayes_Evening_Workshop/classifiers.py
Python
mit
6,290
0.002226
from euclid import Vector3 from ..util.vectors import tuple_of_ints class Collision(object): ''' detects if any objects in the world collide ''' def __init__(self, world): world.item_added += self.world_add_item world.item_removed += self.world_remove_item self...
tartley/pyweek11-cube
source/model/collision.py
Python
bsd-3-clause
1,781
0.003369
from mosaic import app if __name__ == '__main__': app.run()
BumagniyPacket/mosaic
run.py
Python
apache-2.0
65
0
import py.test import unittest from quick_sort import sort import random class testQuickSort(unittest.TestCase): def test__init__(self): pass def test_sort_inorder(self): arr = [i for i in xrange(0, 10000)] sortarr = sort(arr) for i in xrange(1, 10000): self.assert...
CharlesGust/data_structures
sort_quick/test_quick_sort.py
Python
mit
794
0
# Copyright 2020 DeepMind Technologies Limited. # 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 # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed t...
deepmind/jraph
jraph/examples/lstm.py
Python
apache-2.0
5,350
0.006168
#!/usr/bin/env python3 # Copyright (c) 2018-2019, Ulf Magnusson # SPDX-License-Identifier: ISC """ Lists all user-modifiable symbols that are not given a value in the configuration file. Usually, these are new symbols that have been added to the Kconfig files. The default configuration filename is '.config'. A diffe...
ulfalizer/Kconfiglib
listnewconfig.py
Python
isc
2,619
0
# -*- coding: utf8 -*- """ The ``queue` utils ================== Some operation will require a queue. This utils file """ __author__ = 'Salas' __copyright__ = 'Copyright 2014 LTL' __credits__ = ['Salas'] __license__ = 'MIT' __version__ = '0.2.0' __maintainer__ = 'Salas' __email__ = 'Salas.106.212@gma...
salas106/irc-ltl-framework
utils/queue.py
Python
mit
352
0.005682
#!/usr/bin/env python3 class Solution(): def numSubarrayProductLessThanK(self, nums, k): lo, prod = 0, 1 ret = 0 for hi, n in enumerate(nums): prod *= n while lo <= hi and prod >= k: prod //= nums[lo] lo += 1 ret += (hi-lo+...
eroicaleo/LearningPython
interview/leet/713_Subarray_Product_Less_Than_K.py
Python
mit
434
0.009217
# encoding: utf-8 import mimetypes import re from django.core.urlresolvers import reverse def order_name(name): """order_name -- Limit a text to 20 chars length, if necessary strips the middle of the text and substitute it for an ellipsis. name -- text to be limited. """ name = re.sub(r'^.*/', '...
extremoburo/django-jquery-file-upload
fileupload/serialize.py
Python
mit
1,030
0.001942
''' ps = psi4.Solver with psi4.quite_run(): ps.prepare_chkpt(mo_coeff, fock_on_mo, nelec, e_scf, nuclear_repulsion) ecc = ps.energy('CCSD', c.shape[1], hcore_on_mo, eri_on_mo) rdm1, rdm2 = ps.density(mo_coeff.shape[1]) eccsdt = ps.energy('CCSD(T)', c.shape[1], hcore_on_mo, eri_on_mo) rdm1, rdm2 = p...
sunqm/psi4-cc
psi4/__init__.py
Python
gpl-2.0
434
0
# Copyright 2017 NeuStar, 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 a...
sbarbett/ip_intelligence
src/check_json.py
Python
apache-2.0
945
0.012698
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
crmccreary/openerp_server
openerp/addons/product_manufacturer/__openerp__.py
Python
agpl-3.0
1,833
0.004364
# Copyright 2014-2016 The ODL development group # # This file is part of ODL. # # ODL 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. #...
bgris/ODL_bgris
lib/python3.5/site-packages/odl/tomo/backends/scikit_radon.py
Python
gpl-3.0
4,830
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('campaigns', '0002_auto_20141022_1840'), ] operations = [ migrations.AlterField( model_name='campaignform', ...
Monithon/Monithon-2.0
campaigns/migrations/0003_auto_20141130_0858.py
Python
gpl-2.0
1,412
0.003541
# Copyright 2015-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
jimmyraywv/cloud-custodian
tests/test_offhours.py
Python
apache-2.0
21,903
0.000274
# Copyright (c) 2014-2018 Matteo Degiacomi and Valentina Erastova # # Assemble 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. # Assemb...
degiacom/assemble
ForceField.py
Python
gpl-3.0
4,345
0.023245
import imagepusher, random if __name__ == '__main__': host, port = '', 18002 pusher = imagepusher.ImagePusher( (host, port) ) width, height = 12, 10 munch = [ [ [0,0,0] for x in xrange(width) ] for y in xrange(height) ] while True: for i in xrange(16): for j in xrange(i+1): for y in xrange(height): ...
techinc/imagepusher
munch.py
Python
mit
651
0.058372
import sys, os, re, time, resource, gc import ujson, boto import boto.s3.connection from collections import defaultdict access_key = os.environ["AWS_ACCESS_KEY"] secret_key = os.environ["AWS_SECRET_KEY"] def key_iterator(key): """ Iterator for line by line, for going through the whole contents of a key ""...
jvictor0/TweetTracker
src/TwitterRank/CheckGraph.py
Python
mit
1,247
0.00401
#import libraries import tensorflow as tf import numpy as np def get_data(): #data is from the computer hardware dataset found on the UCI ML repository with open('data.txt', 'r') as fin: text_in = fin.read() split = text_in.splitlines() data = [] for line in split: data.append(line.split(',')) np_data = np....
SimpleGeometry/bisv-ml
tensorflow-2/tf_linreg.py
Python
mit
2,049
0.028306
""" Custom Authenticator to use MediaWiki OAuth with JupyterHub Requires `mwoauth` package. """ import json import os from asyncio import wrap_future from concurrent.futures import ThreadPoolExecutor from jupyterhub.handlers import BaseHandler from jupyterhub.utils import url_path_join from mwoauth import ConsumerTok...
jupyterhub/oauthenticator
oauthenticator/mediawiki.py
Python
bsd-3-clause
4,178
0.000957
# Copyright 2014, Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain # rights in this software. from __future__ import absolute_import from __future__ import division import toyplot.cairo.png def render(canvas, fobj=None, width=None, hei...
cmorgan/toyplot
toyplot/png.py
Python
bsd-3-clause
2,849
0.002457
""" Test that the debugger handles loops in std::list (which can appear as a result of e.g. memory corruption). """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class LibcxxListDataFormatterTestCase(TestBase): mydir = TestBase.co...
endlessm/chromium-browser
third_party/llvm/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
Python
bsd-3-clause
2,446
0.002044
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # # Copyright 2008-2009 Red Hat, Inc. # This file is part of python-fedora # # python-fedora 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 # versi...
vivekanand1101/python-fedora
fedora/client/wiki.py
Python
gpl-2.0
9,280
0.000862
"""distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio. """ # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) # This module should be kept compatible with P...
Csega/pyTsai
windows_binary_2.4/windows_compiling/msvccompiler.py
Python
lgpl-2.1
22,127
0.004384
import sys from remoteserver import DirectResultRemoteServer class SpecialErrors(object): def continuable(self, message, traceback): return self._special_error(message, traceback, continuable=True) def fatal(self, message, traceback): return self._special_error(message, traceback, ...
yahman72/robotframework
atest/testdata/standard_libraries/remote/specialerrors.py
Python
apache-2.0
689
0.001451
#!/usr/bin/env python import threading import Queue import ftplib import getopt import os import sys import time DEF_THREAD_CNT = 5 DEF_NAP_TIME = 10 class FTPExcept(Exception): def __init__(self, v): self.value = v def __str__(self): return repr(self.value) class FTPWT(threading.Thread): ...
rereidy/SPSE
module 5 - Exploitation Techniques/5-1.py
Python
gpl-3.0
3,540
0.004237
# # 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 # "License"); you may not...
spektom/incubator-airflow
airflow/contrib/sensors/gcs_sensor.py
Python
apache-2.0
3,286
0.003652
from collections import namedtuple # Structure returned by DatabaseIntrospection.get_table_list() TableInfo = namedtuple('TableInfo', ['name', 'type']) # Structure returned by the DB-API cursor.description interface (PEP 249) FieldInfo = namedtuple('FieldInfo', 'name type_code display_size internal_size precision sca...
uranusjr/django
django/db/backends/base/introspection.py
Python
bsd-3-clause
7,497
0.001601
# Copyright 2013 The Distro Tracker Developers # See the COPYRIGHT file at the top-level directory of this distribution and # at http://deb.li/DTAuthors # # This file is part of Distro Tracker. It is subject to the license terms # in the LICENSE file found in the top-level directory of this # distribution and at http:/...
sa2ajj/DistroTracker
pts/vendor/skeleton/rules.py
Python
gpl-2.0
11,857
0.000675
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "QiuDaBao.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
sysuccc/QiuDaBao
manage.py
Python
gpl-2.0
251
0
class O(object): pass class A(O): pass class B(O): pass class C(O): pass class D(O): pass class E(O): pass class K1(A,B,C): pass class K2(D,B,E): pass class K3(D,A): pass class Z(K1,K2,K3): pass print K1.__mro__ print K2.__mro__ print K3.__mro__ print Z.__mro__
ArcherSys/ArcherSys
skulpt/test/run/t242.py
Python
mit
262
0.072519
# # 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 "License"); you may not us...
RyanSkraba/beam
sdks/python/apache_beam/examples/streaming_wordcount_it_test.py
Python
apache-2.0
4,580
0.001965
''' This is not part of specification Helper class to make it work as python lib ''' from .attribute import DbusAttr from .interface import DbusInterface from .method import DbusMethod from .signal import DbusSignal from .utils import get_mainloop, get_uri, implements, \ list_all_interface, list_interfaces, list_pat...
pat1/autoradio
autoradio/mpris2/decorator/__init__.py
Python
gpl-2.0
323
0.003096
""" Activity logs. """ import asyncio import datetime import json import websockets from . import base from shellish.layout import Table class Log(base.PlexCommand): """ Show activity log """ name = 'log' type_map = { 'StatusNotification': 'Status', 'ProgressNotification': 'Progress' ...
mayfield/plexcli
plexcli/commands/activity.py
Python
mit
1,539
0
from ImageScripter import * from elan.functions import Get_Device_List_Simple,Diff from elan import * #Past_List = ['2GIG GC3', '2GIG GC3', '2GIG GC3 (3.2 firmware)', 'Ademco VISTA-128BP,250BP,FA1660C', 'Ademco VISTA-128BPT,250BPT', 'Ademco VISTA-128FBP,250FBP', 'Bosch/Radionics D7412G,D9412G', 'DSC MAXSYS', 'DSC Powe...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/elan/Pools/AddRemove/1_Count_Security_Panels.py
Python
gpl-3.0
2,762
0.005069
#! /usr/bin/python #Guruprasad ANanda """ Fetches substitutions from pairwise alignments. """ from galaxy import eggs from galaxy.tools.util import maf_utilities import bx.align.maf import sys import os, fileinput def stop_err(msg): sys.stderr.write(msg) sys.exit() if len(sys.argv) < 3: stop_err("In...
volpino/Yeps-EURAC
tools/regVariation/substitutions.py
Python
mit
2,849
0.015444
__version__ = '0.1.2'
dashee87/cluster-flag
clusterflag/__init__.py
Python
mit
23
0
from django.shortcuts import render from django.http import HttpResponse import json def services(request): return render(request, 'services/services.html', {})
Adventure-Inc/chachas-adventures
services/views.py
Python
apache-2.0
167
0
#!/usr/bin/env python # # Generate an input mesh # from boututils import DataFile # Wrapper around NetCDF4 libraries nx = 5 # Minimum is 5: 2 boundary, one evolved ny = 32 # Minimum 5. Should be divisible by number of processors (so powers of 2 nice) dy = 1. # distance between points in y, in m/g22/lengthunit ixs...
bendudson/BOUT
examples/test-staggered/generate.py
Python
gpl-3.0
522
0.005747
# 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 # "License"); you may not u...
reminisce/mxnet
tests/python/unittest/test_random.py
Python
apache-2.0
50,683
0.009569
# Licensed to the StackStorm, Inc ('StackStorm') 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 "License"); you may not use th...
punalpatel/st2
st2common/st2common/exceptions/db.py
Python
apache-2.0
1,337
0
# -*- encoding: utf-8 -*- # # Copyright © 2013 Intel # # Author: Shuangtai Tian <shuangtai.tian@intel.com> # # 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/licen...
tanglei528/ceilometer
ceilometer/compute/notifications/__init__.py
Python
apache-2.0
1,338
0
# coding: utf-8 from datetime import timedelta as td import json from django.core import mail from django.utils.timezone import now from hc.api.models import Channel, Check, Notification, Ping from hc.test import BaseTestCase class NotifyEmailTestCase(BaseTestCase): def setUp(self): super().setUp() ...
iphoting/healthchecks
hc/api/tests/test_notify_email.py
Python
bsd-3-clause
5,005
0
from __future__ import unicode_literals from django.apps import AppConfig class ToolboxConfig(AppConfig): name = 'toolbox'
california-civic-data-coalition/django-calaccess-downloads-website
toolbox/apps.py
Python
mit
130
0
#!/usr/bin/env python from urlparse import urlparse from socket import gethostbyname from spam import DomainInexistentException class SpamHausChecker(object): """spam checker using spamhaus""" IS_SPAM = 1 IS_NOT_SPAM = 2 def _query_spamhaus(self, spamhaus_zone): try: return getho...
fmarani/spam
spam/spamhaus.py
Python
lgpl-3.0
1,760
0.001705
import gtk import treetohtml from mensajes import info, yesno from datetime import date, datetime from articulos import DlgArticulo from articulos_produccion import ArticulosEnProduccion from modelo import Model from comunes import punto_coma, coma_punto, caracter_a_logico, logico_a_caracter, calcular_iva_venta, calcul...
jehomez/pymeadmin
actualizacion_de_precios.py
Python
gpl-2.0
1,494
0.003347
import base64 import datetime import json from M2Crypto import EVP, X509, Rand class TicketEncoder(): @staticmethod def _formatDate(d): return d.strftime("%Y%m%d%H%M%S") def __init__(self, cert, key, lifetime=5): self._lifetime = lifetime self._x509 = X509.load_cert(cert) ...
walteryang47/ovirt-engine
packaging/pythonlib/ovirt_engine/ticket.py
Python
apache-2.0
3,464
0
import re from LUIObject import LUIObject from LUISprite import LUISprite from LUILabel import LUILabel from LUIInitialState import LUIInitialState from LUILayouts import LUIHorizontalStretchedLayout __all__ = ["LUIInputField"] class LUIInputField(LUIObject): """ Simple input field, accepting text input. This ...
tobspr/LUI
Builtin/LUIInputField.py
Python
mit
8,056
0.002234
#! /usr/bin/python # _*_ coding: utf-8 _*_ # # Dell EMC OpenManage Ansible Modules # # Copyright © 2017 Dell Inc. or its subsidiaries. All rights reserved. # Dell, EMC, and other trademarks are trademarks of Dell Inc. or its # subsidiaries. Other trademarks may be trademarks of their respective owners. # # This progra...
anupamaloke/Dell-EMC-Ansible-Modules-for-iDRAC
library/dellemc_idrac_nic.py
Python
gpl-3.0
16,156
0.001795
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Class in Python 2.7 for incorporation of the RPi.GPIO module to control the GPIO channels of Raspberry Pi. """ import RPi.GPIO as GPIO __author__ = "" __copyright__ = "" __email__ = "" __status__ = "Prototype" class PinsGPIO(object): gpi...
pat-odoo/TwoRC522_RPi2-3
module/gpio.py
Python
gpl-3.0
391
0.01023
from __future__ import print_function import qt # Importing vtk initializes vtkPythonMap owned by vtkPythonUtil and prevent # call to vtkPythonUtil::GetObjectFromPointer() from segfaulting. # PythonQt internally uses vtkPythonUtil to properly wrap/unwrap VTK objects from vtk import * t = _testWrappedVTKQInvokableIns...
SINTEFMedtek/CTK
Applications/ctkSimplePythonShell/Testing/Python/wrappedVTKQInvokableTest.py
Python
apache-2.0
531
0.001883
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # 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...
amandolo/ansible-modules-core
system/setup.py
Python
gpl-3.0
5,256
0.005327
from __future__ import division from __future__ import print_function import numpy as np import numpy.testing as npt import pandas as pd from deepcpg.data import annotations as annos def test_join_overlapping(): f = annos.join_overlapping s, e = f([], []) assert len(s) == 0 assert len(e) == 0 ...
cangermueller/deepcpg
tests/deepcpg/data/test_annos.py
Python
mit
2,793
0
from django.contrib import admin from fluent_contents.admin import PlaceholderFieldAdmin from .models import PlaceholderFieldTestPage class PlaceholderFieldTestPageAdmin(PlaceholderFieldAdmin): """ Admin interface for the PlaceholderFieldTestPage model. """ pass admin.site.register(PlaceholderFieldT...
jpotterm/django-fluent-contents
fluent_contents/tests/testapp/admin.py
Python
apache-2.0
360
0
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 ...
xclxxl414/rqalpha
rqalpha/utils/package_helper.py
Python
apache-2.0
953
0
from __future__ import unicode_literals from calendar import timegm from django.conf import settings from django.contrib.sites.models import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import HttpResponse, Http404 from django.template import loader, Te...
edisonlz/fruit
web_project/base/site-packages/django/contrib/syndication/views.py
Python
apache-2.0
8,515
0.007634
from django.db import models from django.core.exceptions import ValidationError from django.db.models.fields.related import ForeignObject try: from django.db.models.fields.related_descriptors import ForwardManyToOneDescriptor except ImportError: from django.db.models.fields.related import ReverseSingleRelatedOb...
jamesaud/se1-group4
address/models.py
Python
mit
9,864
0.004562
# -*- coding: utf-8 -*- ''' Connection module for Amazon SQS .. versionadded:: 2014.7.0 :configuration: This module accepts explicit sqs credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no furthe...
stephane-martin/salt-debian-packaging
salt-2016.3.3/salt/modules/boto_sqs.py
Python
apache-2.0
5,122
0.000976
import subprocess import sys import re try: # Make terminal colors work on windows import colorama colorama.init() except ImportError: pass def add_nanopb_builders(env): '''Add the necessary builder commands for nanopb tests.''' # Build command that runs a test program and saves the output ...
kasbah/slim_looper
src/protocol/nanopb/tests/site_scons/site_init.py
Python
gpl-3.0
3,700
0.015135
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import render_template, request, redirect, session, flash, url_for from functools import wraps from user import app import services2db import log2db import users import json import time import sys import asset reload(sys) sys.setdefaultencoding('gb18030') # 登录验...
51reboot/actual_09_homework
09/tanshuai/cmdb_v6/user/views.py
Python
mit
8,533
0.006442
import distutils.version try: import greenlet getcurrent = greenlet.greenlet.getcurrent GreenletExit = greenlet.greenlet.GreenletExit preserves_excinfo = (distutils.version.LooseVersion(greenlet.__version__) >= distutils.version.LooseVersion('0.3.2')) greenlet = greenlet.greenlet except...
ioram7/keystone-federado-pgid2013
build/eventlet/eventlet/support/greenlets.py
Python
apache-2.0
1,085
0.003687
from mapwidgets.widgets import GooglePointFieldWidget from miot.models import PointOfInterest, Page, Profile from django import forms class PointOfInterestForm(forms.ModelForm): '''The form for a point of interest.''' class Meta: model = PointOfInterest fields = ("name", "featured_image", "posi...
Ishydo/miot
miot/forms.py
Python
mit
791
0.005057
import os import string #Enter your username and password below within double quotes # eg. username="username" and password="password" username="username" password="password" com="wget -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate" temp=os.popen(com) msg=temp.read() ind...
maximilianofaccone/puppy-siberian
root/.conky/gmail.py
Python
gpl-3.0
480
0.03125
from flask import Flask, request, render_template app = Flask(__name__) @app.route('/') def index(): # return 'hello flask' # return '<input type="button" value="click me!!">' # return '<input type="text">' # return '<input type="password">' # return '<input type="date">' # return '<input type=...
seerjk/reboot06
06/flask_web.py
Python
mit
1,609
0.003108
# -*- coding: utf-8 -*- """The LVM path specification resolver helper implementation.""" # This is necessary to prevent a circular import. import dfvfs.file_io.lvm_file_io import dfvfs.vfs.lvm_file_system from dfvfs.lib import definitions from dfvfs.resolver import resolver from dfvfs.resolver import resolver_helper ...
dc3-plaso/dfvfs
dfvfs/resolver/lvm_resolver_helper.py
Python
apache-2.0
1,206
0.003317
"""Gopher protocol client interface.""" __all__ = ["send_selector","send_query"] # Default selector, host and port DEF_SELECTOR = '1/' DEF_HOST = 'gopher.micro.umn.edu' DEF_PORT = 70 # Recognized file types A_TEXT = '0' A_MENU = '1' A_CSO = '2' A_ERROR = '3' A_MACBINHEX = '4' A_PCBIN...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.3/Lib/gopherlib.py
Python
mit
5,564
0.010065
# coding=utf-8 from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils.translation import ugettext_lazy as _ from models import WorkflowBase, State from utils import get_wf_dict_value def create_transition_method(transition_name, transit...
suselrd/django-wflow
workflows/decorators.py
Python
bsd-3-clause
6,481
0.003857
__version__ = '0.5.0.dev0+git'
bjodah/pycompilation
pycompilation/_release.py
Python
bsd-2-clause
31
0
# -*- coding: utf-8 -*- import logging import os logger = logging.getLogger(__name__) class KerberosCacheMiddleware(object): """Reloads the KRB5CCNAME environmental variable from the session for potential use in future LDAP requests. For a login request, the KRB5CCNAME environmental variable has al...
jacobajit/ion
intranet/middleware/environment.py
Python
gpl-2.0
1,848
0.002165
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time import json import random import urllib import logging import argparse import coloredlogs from pyquery import PyQuery BASEDIR = os.path.dirname(os.path.abspath(__name__)) OUTPUTDIR = os.path.join(BASEDIR, 'data/output') coloredlogs.install() clas...
shanzi/thesiscode
topiccrawler.py
Python
bsd-2-clause
4,289
0.001632
# -*- coding: utf-8 -*- # # spherepy documentation build configuration file, created by # sphinx-quickstart on Sat Feb 7 21:35:42 2015. # # 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. # # ...
rdireen/spherepy
documentation/source/conf.py
Python
gpl-3.0
9,496
0.008951
# Copyright 2019 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...
arborh/tensorflow
tensorflow/lite/testing/op_tests/relu.py
Python
apache-2.0
2,072
0.002896
from AppKit import NSDocument from PyObjCTools import AppHelper from tinyTextEditorDocumentWindow import TinyTextEditorDocumentWindow class TinyTextEditorDocument(NSDocument): def init(self): self = super(TinyTextEditorDocument, self).init() self.vanillaWindowController = TinyTextEditorDocume...
bitforks/vanilla
Demos/TinyTextEditor/TinyTextEditor.py
Python
mit
1,067
0.005623
# # # Copyright 2011,2013 Luis Ariel Vega Soliz, Uremix (http://www.uremix.org) and contributors. # # # This file is part of UADH (Uremix App Developer Helper). # # UADH 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 Sof...
arielvega/uremix-app-developer-helper
src/uadh/gui/tkinter/__init__.py
Python
gpl-3.0
936
0.003205
#ImportModules import ShareYourSystem as SYS #Define and set with #key dict for the KeyVariable MySetter=SYS.SetterClass( ).set( 'MyStr', 'HelloStr' ).set( {'#key':"MyStr"}, "hello" ) #Define and set with a #get in the value MySetter.set( "FirstCloneMyStr", '#get:MyStr' ) #Define and set with a recu...
Ledoux/ShareYourSystem
Pythonlogy/build/lib/ShareYourSystem/Standards/Itemizers/Setter/11_ExampleDoc.py
Python
mit
1,233
0.042985