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
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
mbohlool/client-python
kubernetes/test/test_rbac_authorization_v1alpha1_api.py
Python
apache-2.0
5,278
0.006631
## # Copyright 2009-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
boegel/easybuild-easyblocks
easybuild/easyblocks/m/mymedialite.py
Python
gpl-2.0
2,788
0.002869
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
luotao1/Paddle
python/paddle/fluid/tests/unittests/xpu/test_gaussian_random_op_xpu.py
Python
apache-2.0
1,364
0.006598
import random import string def random_string(n): result = '' for _ in range(10): result += random.SystemRandom().choice( string.ascii_uppercase + string.digits) return result
adrianp/cartz
server/utils.py
Python
mit
210
0
from django.conf.urls import url from .views import simple_password urlpatterns = [ url(r'^$', view=simple_password, name="simple_auth_password"), ]
bennylope/django-simple-auth
simple_auth/urls.py
Python
bsd-2-clause
156
0
import os,json from cgi import escape def unescape(s): s = s.replace("&lt;", "<") s = s.replace("&gt;", ">") # this has to be last: s = s.replace("&amp;", "&") return s class FilesystemMixin: def h_fs_get(_,path,eltName=''): from stat import S_ISDIR data = (escape(open(path).re...
val314159/framist
fssvr/fs.py
Python
apache-2.0
1,267
0.037096
import os from kivy.lang import Builder from kivy.properties import NumericProperty, StringProperty from kivy.uix.anchorlayout import AnchorLayout from cobiv.modules.core.hud import Hud Builder.load_file(os.path.abspath(os.path.join(os.path.dirname(__file__), 'progresshud.kv'))) class ProgressHud(Hud, AnchorLayout)...
gokudomatic/cobiv
cobiv/modules/hud_components/progresshud/progresshud.py
Python
mit
473
0.002114
import sdms server = { 'HOST' : 'localhost', 'PORT' : '2506', 'USER' : 'SYSTEM', 'PASSWORD' : 'VerySecret' } conn = sdms.SDMSConnectionOpenV2(server, server['USER'], server['PASSWORD'], "Simple Access Example") try: if 'ERROR' in conn: print(str(conn)) exit(1) except: pass stmt = "LIST SESSIONS;" re...
schedulix/schedulix
src/examples/SimpleAccess3.py
Python
agpl-3.0
704
0.053977
#! /usr/bin/env python import unittest import sys import os import shutil import mock import subprocess import re # Import gslab_scons testing helper modules import _test_helpers as helpers import _side_effects as fx # Ensure that Python can find and load the GSLab libraries os.chdir(os.path.dirname(os.path.realpath(_...
gslab-econ/gslab_python
gslab_scons/tests/test_build_stata.py
Python
mit
6,869
0.016305
''' Given a new mlst version or DB, update the container ''' import pathlib import click import jinja2 import toml import pendulum import subprocess import shlex def load_template(name): ''' Return the singularity recipe template as unicode text ''' template = pathlib.Path(name).read_text() retur...
MDU-PHL/meningotype
update_meningotype.py
Python
gpl-3.0
1,346
0
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-06-23 15:41 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mendel', '0008_auto_20160613_1911'), ] operations =...
Architizer/mendel
mendel/migrations/0009_auto_20160623_1141.py
Python
agpl-3.0
1,091
0.001833
'''Contains the Core classes of the PEATSA command line tool''' import ProteinDesignTool, Data, Exceptions, PEATSAParallel
dmnfarrell/peat
PEATSA/Core/__init__.py
Python
mit
123
0.00813
# # Copyright 2017 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
opencord/voltha
voltha/adapters/interface.py
Python
apache-2.0
20,438
0.00044
#!/usr/bin/python ''' Spectral Harmonographs Copyright 2014 Alan Richmond (Tuxar.uk) Trace of 4 decaying sine waves, 2 per axis (x & y)(i.e. 2-pendula), with rainbow colour. I did this in Java some decades ago (Encyclogram; I no longer have the source), this version is in Python, with PyGame. It r...
tuxar-uk/Spectral-Harmonographs
harmonograph.py
Python
mit
3,592
0.032294
import pygame from ui.utils.interpolator import Interpolator class LcarsWidget(pygame.sprite.DirtySprite): """Base class for all widgets""" def __init__(self, color, pos, size, handler=None): pygame.sprite.DirtySprite.__init__(self) if self.image == None: self.image = pygame.Surfac...
tobykurien/rpi_lcars
app/ui/widgets/sprite.py
Python
mit
3,393
0.006779
#!/usr/bin/env python # Copyright(C) 2011-2016 Thomas Voegtlin # # 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 limitation the rights to use, copy, m...
bauerj/electrum-server
src/processor.py
Python
mit
9,045
0.002211
# # Copyright (c) 2008 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a copy of...
colloquium/spacewalk
client/tools/osad/test/simple-dispatcher.py
Python
gpl-2.0
1,087
0.00644
from django import forms from django.contrib import admin from django.contrib.admin import AdminSite from django.contrib.auth.backends import ModelBackend from django.contrib.auth.middleware import AuthenticationMiddleware from django.contrib.contenttypes.admin import GenericStackedInline from django.contrib.messages.m...
wkschwartz/django
tests/admin_checks/tests.py
Python
bsd-3-clause
32,171
0.000591
import numpy as np import cv2 from sys import argv class Test: def __init__(self, name, image): self.image = image self.name = name self.list = [] def add(self, function): self.list.append(function) def run(self): cv2.imshow(self.name, self.image) ...
JacobMiki/Emotionnaise-python
test.py
Python
mit
1,452
0.00551
#!/usr/bin/env python # -*- coding: utf8 -*- # # autocomplit.py # # Copyright 2011 Basmanov Illya <ffsdmad@gmail.com> # # 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 Foundati...
ffsdmad/af-web
cgi-bin/plugins/plugin_manager.py
Python
gpl-3.0
2,225
0.008539
class Event: MESSAGE = 'MESSAGE' JOIN = 'JOIN' LEAVE = 'LEAVE' def __init__(self, _type, user, text): self._type = _type self.user = user self.text = text def __repr__(self): return '[{}] {}: {}'.format(self._type, self.user, self.text) def __str__(self): return self.__repr__() def message(user, te...
d3adc0d3/DeadBot
events.py
Python
mit
509
0.033399
""" Map urls to the relevant view handlers """ from django.conf.urls import url from openedx.core.djangoapps.zendesk_proxy.v0.views import ZendeskPassthroughView as v0_view from openedx.core.djangoapps.zendesk_proxy.v1.views import ZendeskPassthroughView as v1_view urlpatterns = [ url(r'^v0$', v0_view.as_view()...
eduNEXT/edunext-platform
openedx/core/djangoapps/zendesk_proxy/urls.py
Python
agpl-3.0
412
0.004854
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import csv from collections import ( defaultdict as dd, OrderedDict as od ) from math import log import datetime from flask import ( Flask, render_template, g, request, redirect, url_for, send_from_directory, flash, j...
globalwordnet/OMW
omw/__init__.py
Python
mit
35,734
0.007472
# iSCSI configuration dialog # # Copyright (C) 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distribute...
kparal/anaconda
pyanaconda/ui/gui/spokes/advstorage/iscsi.py
Python
gpl-2.0
20,233
0.003311
# -*- coding: utf-8 -*- # # MAdmin documentation build configuration file, created by # sphinx-quickstart on Wed Sep 25 13:48:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
GreyRook/madmin
doc/conf.py
Python
apache-2.0
8,136
0.006268
# encoding: utf8 from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('infrastructure', '0012_auto_20140209_0400'), ] operations = [ migrations.AddField( model_name='module_list', name='widget', field=mo...
SingularityHA/WebUI
infrastructure/migrations/0013_module_list_widget.py
Python
gpl-3.0
411
0.002433
# Copyright (C) 2017-2019 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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 optio...
repology/repology
repology/parsers/parsers/cran.py
Python
gpl-3.0
1,459
0.001371
# -*- 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): # Adding field 'PurpleRobotDevice.first_reading_timestamp' db.add_column(...
cbitstech/Purple-Robot-Django
migrations/0037_auto__add_field_purplerobotdevice_first_reading_timestamp.py
Python
gpl-3.0
10,672
0.007309
from os import listdir from os.path import isfile, join import paer mypath = 'aedat/' onlyfiles = [ f for f in listdir(mypath) if isfile(join(mypath,f)) and f.endswith('.aedat')] for file in onlyfiles: ae = paer.aefile(mypath + str(file)) aed= paer.aedata(ae).downsample((16,16)) paer.create_pngs(aed, '16...
darioml/fyp-public
data/make_pngs.py
Python
gpl-2.0
394
0.025381
import unittest import sys import inspect from robot.running.handlers import _PythonHandler, _JavaHandler, DynamicHandler from robot import utils from robot.utils.asserts import * from robot.running.testlibraries import TestLibrary from robot.running.dynamicmethods import ( GetKeywordArguments, GetKeywordDocumenta...
synsun/robotframework
utest/running/test_handlers.py
Python
apache-2.0
13,048
0.00138
from django.db.models import get_model from django.utils.translation import ugettext # a notice like "foo and bar are now friends" is stored in the database # as "{auth.User.5} and {auth.User.7} are now friends". # # encode_object takes an object and turns it into "{app.Model.pk}" or # "{app.Model.pk.msgid}" if named ...
brosner/django-notification
notification/message.py
Python
mit
3,596
0.001947
from commands import getoutput def NetworkFromPrefix(val): """ Return the network with the network prefix given. """ ifaces = getoutput('hostname -I') # *nix only. sifaces = ifaces.strip().split() for iface in sifaces: if iface.startswith(val): return iface
stuntgoat/conf-syrup
conf_syrup/network_type.py
Python
mit
307
0
# coding: utf-8 import re from crossword import * class Crossword2(Crossword): def __init__(self): self.grid = OpenGrid() self.connected = {} self.used_words = [] def copy(self): copied = Crossword2() copied.grid = self.grid.copy() copied.connected = self.co...
yattom/crossword
crossword2.py
Python
mit
7,931
0.003404
#!/usr/bin/env python3 """ Copyright 2015 Stefano Benvenuti <ste.benve86@gmail.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/licenses/LICENSE-2.0 Unless required ...
stebenve86/poem_reader
utilities/add_poem.py
Python
apache-2.0
1,540
0.016234
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.main_page, name='main_page'), )
apiaas/gae-base-app-with-drf
src/landing/urls.py
Python
gpl-3.0
145
0.006897
print('Yes' if (lambda a,b : (lambda number: a == b or (a[1:] == b and a[0] in number and len(a)-1 == len(b)) or (a[:-1] == b and a[-1] in number and len(a)-1 == len(b)) or ''.join(x.upper() if x.islower() else x.lower() for x in b) == a)({str(i) for i in range(10)}))(input(), input()) else 'No')
JonSteinn/Kattis-Solutions
src/Soft Passwords/Python 3/main.py
Python
gpl-3.0
297
0.013468
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
mganeva/mantid
Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic2.py
Python
gpl-3.0
3,610
0.001662
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '%s rows deleted': '已刪除 %s 筆', '%s rows updated': ...
tectronics/pyafipws.web2py-app
languages/zh-tw.py
Python
agpl-3.0
8,854
0.02909
from datetime import datetime, timedelta from subprocess import PIPE, call, Popen import tempfile, os, argparse, sys, re def get_file_duration(infilename): ''' :param infilename: input mp4 filename :type infilename: str :returns: (h,m,s) tuple ''' cmd=['ffmpeg','-i',infilename] p=Popen(cmd,stdout...
unpingco/mp4utils
mp4_cut.py
Python
mit
5,940
0.051852
# 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...
krummas/cassandra
pylib/cqlshlib/test/run_cqlsh.py
Python
apache-2.0
12,156
0.002303
import pygame, random, time, copy from Piece import Piece from pygame.locals import * from gameconstants import * # block direction constants CMD_ROTATE_R, CMD_ROTATE_L, CMD_MOVE_R, CMD_MOVE_L = range(4) OCCUPIED_S = '1' OCCUPIED_F = '0' BLANK = ' ' PENDING_MAX = 50 # max number of elements in pendings PENDING_MIN = ...
tvhong/one
src/game.py
Python
gpl-3.0
8,378
0.012175
import cmd import json try: import readline except ImportError: pass from lib.asmdecoder import AsmDecoder from lib.uploadprogram import uploadProgram def run(hardware): cli = CommandLineInterface(hardware) cli.printStatus() cli.cmdloop() class CommandLineInterface(cmd.Cmd): def __init__(self, hardware, *args...
zr40/scc
debugger/cli.py
Python
mit
6,986
0.031492
#!/usr/bin/python # Copyright (c) 2017-2018 Utrecht University # GNU General Public License v3.0 ANSIBLE_METADATA = { 'metadata_version': '1.1', 'supported_by': 'community', 'status': ['preview'] } from ansible.module_utils.basic import * IRODSCLIENT_AVAILABLE = False try: from irods.session import ...
UtrechtUniversity/yoda-ansible
library/irods_moduser.py
Python
gpl-3.0
1,822
0.001098
from datetime import timedelta from flask import Flask, json, helpers, request from flask.views import MethodView from wordpress_xmlrpc import Client from wordpress_xmlrpc import methods as wp_methods from wordpress_xmlrpc.methods import taxonomies as wp_taxonomies app = Flask(__name__) wp = Client('http://localhos...
maxcutler/wp-xmlrpc-rest-wrapper
wp-rest.py
Python
mit
13,839
0.002457
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para rtpa # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import s...
titienmiami/mmc.repository
plugin.video.tvalacarta/servers/rtpa.py
Python
gpl-2.0
1,033
0.026163
from typing import Optional, Dict import unittest from autosklearn.pipeline.util import _test_classifier, \ _test_classifier_predict_proba, _test_classifier_iterative_fit from autosklearn.pipeline.constants import SPARSE import sklearn.metrics import numpy as np from test.test_pipeline.ignored_warnings import i...
automl/auto-sklearn
test/test_pipeline/components/classification/test_base.py
Python
bsd-3-clause
13,012
0.000999
# This is a modified version of original twilio_sms Gluu's script to work with Casa from java.util import Arrays from javax.faces.application import FacesMessage from org.gluu.jsf2.message import FacesMessages from org.gluu.oxauth.security import Identity from org.gluu.oxauth.service import UserService, Authenticati...
GluuFederation/community-edition-setup
static/casa/scripts/casa-external_twilio_sms.py
Python
mit
6,740
0.004748
"""Runner for testing app and blueprint logging individually""" import subprocess from tests.samples import app if __name__ == '__main__': app.run() subprocess.call(['rm', '-rf', 'logs'])
pinntech/flask-logex
runner.py
Python
mit
198
0
from default_test_case import DefaultTestCase from sns_project import SnsProject class TestSnsProjects(DefaultTestCase): def test_project_with_defaults(self): project = SnsProject.find(self.loaded_config.sns_projects, 'project_with_defaults') self.assertEqual(project.raw_message, False) self.assertEqual(...
kayaman/jararaca
test/test_sns_projects.py
Python
mit
1,358
0.0081
# # Collective Knowledge (checking and installing software) # # 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={} # Will be update...
ctuning/ck
ck/repo/module/soft/module.py
Python
bsd-3-clause
97,841
0.035261
# coding: utf-8 # # Copyright 2017 The Oppia 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 requi...
prasanna08/oppia-ml
core/classifiers/TextClassifier/text_classifier_test.py
Python
apache-2.0
2,185
0
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
VShangxiao/tornado
tornado/auth.py
Python
apache-2.0
46,438
0.000538
def extractMobileSuitZetaGundamNovelsTranslation(item): """ Parser for 'Mobile Suit Zeta Gundam Novels Translation' """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or 'preview' in item['title'].lower(): return None if 'WATTT' in item['tags']: return buildRelea...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractMobileSuitZetaGundamNovelsTranslation.py
Python
bsd-3-clause
405
0.024691
import re import weakref from buildbot import util class Properties(util.ComparableMixin): """ I represent a set of properties that can be interpolated into various strings in buildsteps. @ivar properties: dictionary mapping property values to tuples (value, source), where source is a string ...
kzys/buildbot
buildbot/process/properties.py
Python
gpl-2.0
5,112
0.005869
# -*- coding: utf-8 -*- """ lantz.drivers.rgblasersystems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :company: RGB Lasersysteme GmbH. :description: Lasers and Lasers Systems. :website: http://www.rgb-laser.com/ ---- :copyright: 2015 by Lantz Authors, see AUTHORS for more details. :license: BSD, se...
varses/awsch
lantz/drivers/rgblasersystems/__init__.py
Python
bsd-3-clause
414
0
import os import shutil import stat import sys import unittest import platform from collections import namedtuple from conans import tools from conans.model.conan_file import ConanFile from conans.model.ref import ConanFileReference from conans.model.build_info import CppInfo, DepsCppInfo from conans.model.settings i...
birsoyo/conan
conans/test/build_helpers/cmake_test.py
Python
mit
41,766
0.002275
from django.views import generic from django.db.models import get_model from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from . import forms from ..utils import get_page_model, get_node_model PageNode = get_node_model() FancyPage = get_page_model() ContentBlock = ...
tangentlabs/django-fancypages
fancypages/dashboard/views.py
Python
bsd-3-clause
1,888
0
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyrigh...
nuagenetworks/vspk-python
vspk/v5_0/nuctranslationmap.py
Python
bsd-3-clause
9,274
0.009165
# Copyright 2016 Pinterest, 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 writi...
pinterest/teletraan
deploy-board/deploy_board/webapp/helpers/placements_helper.py
Python
apache-2.0
1,467
0.003408
#!/usr/bin/env python # # ex13.py # # Author: Billy Wilson Arante # Created: 2016/04/26 PHT # from sys import argv def main(): """Exercise 13: Parameters, Unpacking, Variables""" script, first, second, third = argv print "The script is called:", script print "Your first variable is:", first prin...
arantebillywilson/python-snippets
py2/lpthw/ex13.py
Python
mit
440
0.002273
# flake8: noqa from flask import Flask from flask_assets import Environment, Bundle from flask_compress import Compress from flask_cache import Cache from flask_wtf.csrf import CsrfProtect app = Flask(__name__) #App config app.config.from_pyfile('config.py') # Flask Assets assets = Environment(app) css = Bundle('css...
MashSoftware/place-ui
mash_place_ui/__init__.py
Python
mit
578
0.00519
import cgi print "Content-Type: text/html\n" form = cgi.FieldStorage() print """ <!DOCTYPE html> <html lang="en"> <head> <title>CodeBin</title> <link rel="stylesheet" type="text/css" href="./css/editor.css"/> <link rel="stylesheet" rel="stylesheet" type="text/css" media="screen" href="http://openfontl...
Alex-Jaeger/CodeBin
src/editor.py
Python
apache-2.0
6,836
0.010532
from rambutan3.check_args.annotation.NUMBER import NUMBER def test(): assert not NUMBER.matches("abc") assert not NUMBER.matches(True) assert NUMBER.matches(-1.234) assert NUMBER.matches(-1) assert NUMBER.matches(0) assert NUMBER.matches(0.234) assert NUMBER.matches(1) assert NUMBER.ma...
kevinarpe/kevinarpe-rambutan3
tests/check_args/annotation/test_NUMBER.py
Python
gpl-3.0
362
0
#!/usr/bin/env python import re import time import getopt import imp import sys import types import errno __version__ = 0.5 from xml.etree import cElementTree as ElementTree INDENT = 4*" " DEBUG = False XMLSCHEMA = "http://www.w3.org/2001/XMLSchema" XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' CLASS_PRO...
rohe/pysaml2-3
tools/parse_xsd2.py
Python
bsd-2-clause
68,704
0.005618
# 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 unittest from telemetry.internal.results import page_test_results from telemetry.page import page as page_module from telemetry.web_perf.metrics impo...
SaschaMester/delicium
tools/telemetry/telemetry/web_perf/metrics/smoothness_unittest.py
Python
bsd-3-clause
13,607
0.003087
# cell definition # name = 'Epos_AD' # libname = 'can' inp = 0 outp = 1 parameters = dict() #parametriseerbare cell properties = {'Device ID': ' 0x01', 'Channel [0/1]': ' 0', 'name': 'epos_areadBlk'} #voor netlisten #view variables: iconSource = 'AD' views = {'icon':iconSource}
imec-myhdl/pycontrol-gui
BlockEditor/libraries/library_can/Epos_AD.py
Python
lgpl-2.1
283
0.024735
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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 limitation the rights to use, copy, modi...
nanocell/lsync
python/boto/cloudformation/connection.py
Python
gpl-3.0
15,766
0.001395
single_numeral_to_decimal_map = {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
uttamk/katas
roman_numerals/python/roman_numerals/__init__.py
Python
mit
98
0.010204
from django.apps import AppConfig class GeoDashServerDjangoConfig(AppConfig): name = 'geodashserver' verbose_name = "GeoDash Server"
geodashio/geodash-server
geodashserver/apps.py
Python
bsd-3-clause
143
0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Object Relational Mapping module: * Hierarchical structure * Constraints consistency and validation * Object metadata depends on its status * Optimised processing by complex query (multiple a...
jeremiahyan/odoo
odoo/models.py
Python
gpl-3.0
303,080
0.002221
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import itertools import os import re from importlib import import_module from django.apps import apps from django.conf import settings from django.contrib.admin.models import LogEntry from django.contrib.auth import REDIRECT_FIELD_NAME, S...
bikong2/django
tests/auth_tests/test_views.py
Python
bsd-3-clause
45,028
0.001621
# -*- coding: UTF-8 -*- from django.contrib import admin from .models import * class UserAdmin(admin.ModelAdmin): list_display = ('nickName', 'realName') admin.site.register(User, UserAdmin) class UserLoginStatusAdmin(admin.ModelAdmin): list_display = ('key', 'description') admin.site.register(UserLogin...
xiaoyexu/xCRM
crm/admin.py
Python
gpl-3.0
12,452
0.002008
import _plotly_utils.basevalidators class ComputedValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="computed", parent_name="layout", **kwargs): super(ComputedValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotly/plotly.py
packages/python/plotly/plotly/validators/layout/_computed.py
Python
mit
395
0
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apa...
rajrohith/blobstore
samples/file/__init__.py
Python
apache-2.0
902
0.003333
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cisco Systems, 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...
wallnerryan/quantum_migrate
quantum/plugins/cisco/nexus/cisco_nexus_plugin_v2.py
Python
apache-2.0
9,634
0
from sender import * import threading QUEUE_NAME = 'event_queue' class CompetingReceiver(object): def __init__(self): self.connection = Connection().initialize() def receive(self): self.connection.channel.queue_declare(QUEUE_NAME, False, False, False, None) self.connection.channel.ba...
harunyasar/rabbitmq_playground
default_exchange_receiver.py
Python
gpl-3.0
779
0.002567
# Download the Python helper library from twilio.com/docs/python/install from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "ACCOUNT_SID" auth_token = "your_auth_token" client = Client(account_sid, auth_token) number = client.lookups.phone_numbers("+15108675309...
teoreteetik/api-snippets
lookups/lookup-get-basic-example-1/lookup-get-basic-example-1.6.x.py
Python
mit
406
0
# -*- coding: UTF-8 -*- # 来源:疯狂的蚂蚁的博客www.crazyant.net总结整理 import MySQLdb as mdb import sys #获取数据库的链接对象 #con = mdb.connect('192.168.2.117', 'root', 'zzjr#2015', 'disconf') con = mdb.connect('localhost', 'root', '', 'jumpserver') with con: #获取普通的查询cursor cur = con.cursor() cur.execute("select * from juser_...
xskh2007/zjump
dbtool/test.py
Python
gpl-2.0
722
0.009772
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class GdkPixbuf(Package): """The Gdk Pixbuf is a toolkit for image loading and pixel buffer ...
rspavel/spack
var/spack/repos/builtin/packages/gdk-pixbuf/package.py
Python
lgpl-2.1
3,882
0.002061
#!/usr/bin/env python2 """Demo checker script. Given a demo .cpp file PATH.cpp we can make it a small test if there is a file PATH.cpp.stdout and/or PATH.cpp.stderr. The test is implemented using this script. The script is called with the options --binary-path and one or both of --stdout-path and --stderr-path. The...
xenigmax/seqan
util/bin/demo_checker.py
Python
bsd-3-clause
4,665
0.005145
# -*- coding: UTF-8 -*- from .codegen import * from .cmake import * from .printing import * from .utilities import *
ratnania/pyccel
pyccel/codegen/__init__.py
Python
mit
125
0.024
import bee from bee.segments import * class toggle(bee.worker): inp = antenna("push", "trigger") on = variable("bool") parameter(on, False) state = output("pull", "bool") connect(on, state) true = output("push", "trigger") trig_true = triggerfunc(true) false = output("push", "trigger"...
agoose77/hivesystem
dragonfly/logic/toggle.py
Python
bsd-2-clause
568
0.001761
from ....common.db.sql import VARCHAR, Numeric as NUMBER, DateTime as DATETIME, Column, BaseModel, CLOB, DATE VARCHAR2 = VARCHAR class CBondBalanceSheet(BaseModel): """ 4.158 中国债券发行主体资产负债表 Attributes ---------- object_id: VARCHAR2(100) 对象ID s_info_compcode: VARCHAR2(40) 公司I...
SnowWalkerJ/quantlib
quant/data/wind/tables/cbondbalancesheet.py
Python
gpl-3.0
14,897
0.019439
import os, sys import random import time import feedparser import itertools import HTMLParser from feed import Feed if os.getcwd().rstrip(os.sep).endswith('feeds'): os.chdir('..') sys.path.insert(0, os.getcwd()) from gui_client import new_rpc import web import reddit class RSSFeed(Feed): def __init__(se...
pjurik2/pykarma
feeds/rss.py
Python
mit
3,205
0.005304
# -*-coding:Utf-8 -* # Copyright (c) 2012 NOEL-BARON Léo # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # li...
stormi/tsunami
src/secondaires/cuisine/commandes/recettes/__init__.py
Python
bsd-3-clause
2,392
0.003349
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-02-23 22:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tournament', '0145_auto_20170211_1825'), ] operations = [ migrations.AddField( model_name='league', ...
cyanfish/heltour
heltour/tournament/migrations/0146_league_description.py
Python
mit
414
0
from scrapy.spiders import Spider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request from scrapy.conf import settings from beerindex.items import BeerindexItem import logging import lxml.html from urlparse import urlparse import re class BeerSpider(Spider): name = "beerspider" beer_...
asiviero/brbeerindex
beerindex/spiders/beerspider.py
Python
lgpl-2.1
4,667
0.012642
# -*- 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): # Adding field 'Space.kind' db.add_column(u'catalog_space', 'kind', ...
Makeystreet/makeystreet
woot/apps/catalog/migrations/0100_auto__add_field_space_kind__add_field_space_logo__add_field_space_lati.py
Python
apache-2.0
50,619
0.007645
''' Copyright 2016, EMC, Inc. Author(s): FIT test script template ''' import fit_path # NOQA: unused import import sys import subprocess import pprint import fit_common import test_api_utils # LOCAL NODELIST = [] def get_switches(): # returns a list with valid node IDs that match ARGS_LIST.sku in 'Name' or ...
tannoa2/RackHD
test/tests/switch/test_rackhd11_switch_pollers.py
Python
apache-2.0
12,932
0.004098
doctests = """ ########### Tests mostly copied from test_listcomps.py ############ Test simple loop with conditional >>> sum({i*i for i in range(100) if i&1 == 1}) 166650 Test simple case >>> {2*y + x + 1 for x in (0,) for y in (1,)} set([3]) Test simple nesting >>> list(sorted({(i,j) for i in...
teeple/pns_server
work/install/Python-2.7.4/Lib/test/test_setcomps.py
Python
gpl-2.0
3,847
0.00104
# This script created a queue # # Author - Paul Doyle Nov 2015 # # import boto.sqs import boto.sqs.queue from boto.sqs.message import Message from boto.sqs.connection import SQSConnection from boto.exception import SQSError import sys import urllib2 # Get the keys from a specific url and then use them to connect to A...
maciekzdaleka/lab11
write-aws-queue.py
Python
mit
1,195
0.009205
import os, sys, re import optparse import shutil import pandas import numpy import gc import subprocess ##################################### #This is a script to combine the output reports from #Skyline, in preparation for MSstats! Let's get started. # #VERSION 0.70A version="0.70A" #DATE: 10/11/2016 date="10/11/201...
wohllab/milkyway_proteomics
galaxy_milkyway_files/tools/wohl-proteomics/wohl_skyline/msstats_plots_wrapper.py
Python
mit
7,436
0.023534
# Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
googledatalab/pydatalab
solutionbox/ml_workbench/tensorflow/setup.py
Python
apache-2.0
1,189
0.003364
## # Copyright 2012-2013 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
hajgato/easybuild-easyblocks
setup.py
Python
gpl-2.0
3,586
0.012828
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 17-8-13 下午1:31 # @Author : Tom.Lee # @CopyRight : 2016-2017 # @File : demo.py # @Product : PyCharm # @Docs : # @Source : import rpyc from rpyc.utils.server import ThreadedServer class MyService(rpyc.Se...
amlyj/pythonStudy
2.7/rpc/RPyC/demo.py
Python
mit
1,415
0.002126
#!/usr/bin/env python3 # -*- coding: utf-8 -*- '第 0010 题:使用 Python 生成类似于图中的字母验证码图片' from PIL import Image, ImageDraw, ImageFont, ImageFilter import random # 随机字母: def rndChar(): return chr(random.randint(65, 90)) # 随机颜色1: def rndColor(): return (random.randint(64, 255), random.randint(64, 255), random.rand...
Show-Me-the-Code/python
Drake-Z/0010/0010.py
Python
mit
1,049
0.01164
# pyGeoNet_readGeotiff #import sys #import os from osgeo import gdal #from string import * import numpy as np from time import clock import pygeonet_defaults as defaults import pygeonet_prepare as Parameters from math import modf, floor #from scipy.stats.mstats import mquantiles def read_dem_from_geotiff(demFileName...
harish2rb/pyGeoNet
test/test_pygeonet_processing.py
Python
gpl-3.0
4,709
0.031004
# -*- coding: utf-8 -*- class ScrapeError(Exception): """scraping Failed"""
abrenaut/waybackscraper
waybackscraper/exceptions.py
Python
mit
82
0
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
uclouvain/osis
assessments/templatetags/score_display.py
Python
agpl-3.0
1,668
0.0018
class Car: def beep(): print('Beep') car = Car() Car.beep() #https://pt.stackoverflow.com/q/482008/101
bigown/SOpt
Python/OOP/Static.py
Python
mit
117
0.017094