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 kwonly_args import kwonly_defaults from .parser import ParserListener class ObjectBuilderParams(object): # By creating a subclass of this class and overriding these # attributes you can change the default values of __init__(). default_object_creator = None default_array_creator = None defaul...
pasztorpisti/json-cfg
src/jsoncfg/parser_listener.py
Python
mit
5,570
0.005027
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/subnet_paged.py
Python
mit
922
0.001085
""" Virtualization installation functions. Currently somewhat Xen/paravirt specific, will evolve later. Copyright 2006-2008 Red Hat, Inc. Michael DeHaan <mdehaan@redhat.com> Original version based on virtguest-install Jeremy Katz <katzj@redhat.com> Option handling added by Andrew Puch <apuch@redhat.com> Simplified ...
charles-dyfis-net/koan
koan/xencreate.py
Python
gpl-2.0
5,855
0.008027
""" Craft is a script to access the plugins which craft a gcode file. The plugin buttons which are commonly used are bolded and the ones which are rarely used have normal font weight. """ from __future__ import absolute_import #Init has to be imported first because it has code to workaround the python bug where rela...
tobykurien/MakerDroid
assetsrc/public.mp3/skeinforge/skeinforge_utilities/skeinforge_craft.py
Python
gpl-3.0
7,636
0.043609
# Copyright 2010 http://www.collabq.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 by applicable law or agreed to i...
CollabQ/CollabQ
administration/views.py
Python
apache-2.0
8,027
0.017815
# -*- coding: utf-8 -*- # # ***** BEGIN GPL LICENSE BLOCK ***** # # -------------------------------------------------------------------------- # Blender 2.5 Extensions Framework # -------------------------------------------------------------------------- # # Authors: # Doug Hammond # # This program is free software; yo...
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/addons/modules/extensions_framework/validate.py
Python
gpl-3.0
6,509
0.002612
# 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...
Acehaidrey/incubator-airflow
tests/providers/amazon/aws/operators/test_glue_crawler.py
Python
apache-2.0
3,458
0.001735
import json import unittest from boto.s3.key import Key from mock import create_autospec, Mock, call from arbalest.s3 import Bucket from arbalest.pipeline import S3SortedDataSources def mock_key(name): return Key(Mock(), name) class S3SortedDataSourcesShould(unittest.TestCase): def setUp(self): pa...
Dwolla/arbalest
test/pipeline/test_s3_sorted_data_sources.py
Python
mit
5,292
0.000189
#!/usr/bin/env python """ lit - LLVM Integrated Tester. See lit.pod for more information. """ import math, os, platform, random, re, sys, time, threading, traceback import ProgressBar import TestRunner import Util import LitConfig import Test import lit.discovery class TestingProgressDisplay: def __init__(se...
dbrumley/recfi
llvm-3.3/utils/lit/lit/main.py
Python
mit
15,230
0.00499
# This file is part of HDL Checker. # # Copyright (c) 2015 - 2019 suoto (Andre Souto) # # HDL Checker 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 ...
suoto/hdlcc
setup.py
Python
gpl-3.0
3,321
0.014453
#!/usr/pkg/bin/python import os, sys, time from reportlab.graphics.barcode.common import * from reportlab.graphics.barcode.code39 import * from reportlab.graphics.barcode.code93 import * from reportlab.graphics.barcode.code128 import * from reportlab.graphics.barcode.usps import * from reportlab.graphics.barcode.usps...
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/thirdparty/src/reportlab/graphics/barcode/test.py
Python
gpl-3.0
9,268
0.007769
# -*- coding: utf-8 -*- ' 检查扩展名是否合法 ' __author__ = 'Ellery' from app import app import datetime, random from PIL import Image import os def allowed_file(filename): return '.' in filename and \ filename.rsplit('.', 1)[1] in app.config.get('ALLOWED_EXTENSIONS') def unique_name(): now_time = dateti...
allotory/basilinna
app/main/upload_file.py
Python
mit
1,433
0.007774
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # # Easy AVR USB Keyboard Firmware Keymapper # Copyright (C) 2018 David Howland # # 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 ...
dhowland/EasyAVR
keymapper/easykeymap/legacy.py
Python
gpl-2.0
6,758
0.001776
# ============================================================================= # Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/ # FileName: 10433.py # Description: UVa Online Judge - 10433 # ============================================================================= while True:...
mjenrungrot/competitive_programming
UVa Online Judge/v104/10433.py
Python
mit
619
0
#!/usr/bin/env python from __future__ import absolute_import, print_function import copy import matplotlib from grid_cell_model.submitting import flagparse import noisefigs from noisefigs.env import NoiseEnvironment import config parser = flagparse.FlagParser() parser.add_flag('--gammaSweep') args = parser.parse_ar...
MattNolanLab/ei-attractor
grid_cell_model/simulations/007_noise/figures/cosyne2015-abstract/figure_gamma.py
Python
gpl-3.0
492
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 bu...
uclouvain/OSIS-Louvain
base/tests/views/learning_units/external/test_update.py
Python
agpl-3.0
4,921
0.001829
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2014 Zuza Software Foundation # # This file is part of amaGama. # # 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 ...
translate/amagama
amagama/application.py
Python
gpl-3.0
1,780
0
# Copyright(c) 2017, Dimitar Venkov # @5devene, dimitar.ven@gmail.com # www.badmonkeys.net from itertools import imap, repeat import System badChars = set(System.IO.Path.GetInvalidFileNameChars() ) def tolist(x): if hasattr(x,'__iter__'): return x else : return [x] def fixName(n, rep="", badChars=badChars): n1 = ...
dimven/SpringNodes
py/String.ReplaceIllegalChars.py
Python
mit
557
0.028725
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from flask_script import Manager, Shell, Server from flask_script.commands import Clean, ShowUrls from flask_migrate import MigrateCommand from inspectors.app import create_app from inspectors.settings import DevConfig, ProdConfig from inspectors.database import ...
codeforamerica/mdc-inspectors
manage.py
Python
bsd-3-clause
1,026
0
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import pytest from shoop.notify import Context from shoop_tests.notify.fixt...
taedori81/shoop
shoop_tests/notify/test_log_entries.py
Python
agpl-3.0
1,388
0.002161
# constraints should be multiplicative so we can do them in any order # ok, maybe not multiplicative. not sure yet. # want to avoid plateaus in the space. import copy import numpy as np from scipy.special import binom import scipy import librosa_analysis import novelty BEAT_DUR_KEY = "med_beat_duration" class Co...
ucbvislab/radiotool
radiotool/algorithms/constraints.py
Python
isc
27,809
0.000467
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in> # Copyright (c) 2008, Enthought, Inc. # License: BSD Style. # Enthought library imports. from tvtk.tools.tvtk_doc import TVTKFilterChooser, TVTK_FILTERS # Local imports. from mayavi.filters.filter_base import FilterBase from mayavi.core.common import ...
dmsurti/mayavi
mayavi/filters/user_defined.py
Python
bsd-3-clause
3,082
0.001622
""" mbed SDK Copyright (c) 2011-2013 ARM 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
c1728p9/mbed-os
tools/host_tests/host_tests_plugins/module_copy_mbed.py
Python
apache-2.0
2,899
0.001725
# Various utilies for dealing with Neutron and the renaming from Quantum. from subprocess import check_output from charmhelpers.core.hookenv import ( config, log, ERROR, ) from charmhelpers.contrib.openstack.utils import os_release def headers_package(): """Ensures correct linux-headers for running...
jiasir/openstack-trove
lib/charmhelpers/contrib/openstack/neutron.py
Python
mit
7,812
0.000256
#!/usr/bin/env python import puka import sys client = puka.Client("amqp://localhost/") promise = client.connect() client.wait(promise) promise = client.exchange_declare(exchange='direct_logs', type='direct') client.wait(promise) promise = client.queue_declare(exclusive=True) queue_name = client.wait(promise)['queue...
fams/rabbitmq-tutorials
python-puka/receive_logs_direct.py
Python
apache-2.0
902
0
""" Contains the database connection tools and sqlalchemy models for iom database Created by adam on 11/11/15 In order to use this, import the module and create a sqlalchemy engine named 'engine' then do: # connect to db from sqlalchemy.orm import sessionmaker # ORM's handle to database at global level Session = ses...
PainNarrativesLab/IOMNarratives
IomDataModels.py
Python
mit
13,627
0.001614
from nanpy import (ArduinoApi, SerialManager) from time import sleep #Connect to Arduino. Automatically finds serial port. connection = SerialManager() a = ArduinoApi(connection = connection) sensor = 14 #Analog pin 0 a.pinMode(sensor, a.INPUT) #Setup sensor while True: total = 0 #Each set of re...
lcc755/WorkTerm1
5Array/2Temp/Code/average.py
Python
apache-2.0
897
0.020067
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the...
akashlevy/Lyff
lyff_lambda/boto/s3/key.py
Python
mit
83,034
0.000313
""" Convert an OpenTripPlanner json itinerary response into something that's more suitable for rendering via a webpage """ import re import sys import math from decimal import * import datetime from datetime import timedelta import simplejson as json from ott.utils import object_utils from ott.utils import date_utils ...
OpenTransitTools/otp_client_py
ott/otp_client/otp_to_ott.py
Python
mpl-2.0
36,580
0.004265
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models39351.py
Python
gpl-3.0
17,562
0.025111
import redis import psycopg2 from tornado.options import options import tornadobase.handlers class BaseHandler(tornadobase.handlers.BaseHandler): def initialize(self): self.dbref = psycopg2.connect(dbname=options.dbname, user=options.dbuser, ...
coyote240/zeroecks.com
zeroecks/handlers/base_handler.py
Python
mit
1,495
0
from pygame import Rect class AfflictionBox(): def __init__(self, affliction, font, rectPosition = (0, 0)): self.affliction = affliction self.rectPosition = rectPosition self.name = self.affliction.name self.font = font self.textSize = self.font.size(self.name) self.textRect = Rect(self.rectPosition, self...
ZakDoesGaming/OregonTrail
lib/afflictionBox.py
Python
mit
523
0.032505
#!/usr/bin/env python # coding=utf-8 import requests import time import json """ ansible 运行结果回调 """ class CallbackModule(object): def v2_runner_item_on_ok(self, *args, **kwargs): # time.sleep(10) # print args for i in dir(args[0]): if not i.startswith('__'): ...
tao12345666333/Talk-Is-Cheap
ansible/plugins/callback/test.py
Python
mit
3,110
0.000646
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 30, transform = "Quantization", sigma = 0.0, exog_count = 20, ar_order = 0);
antoinecarme/pyaf
tests/artificial/transf_Quantization/trend_PolyTrend/cycle_30/ar_/test_artificial_1024_Quantization_PolyTrend_30__20.py
Python
bsd-3-clause
269
0.085502
import operator import unittest import numpy import six from cupy import testing @testing.gpu class TestArrayElementwiseOp(unittest.TestCase): _multiprocess_can_split_ = True @testing.for_all_dtypes() @testing.numpy_cupy_allclose() def check_array_scalar_op(self, op, xp, dtype, swap=False): ...
ikasumi/chainer
tests/cupy_tests/test_ndarray_elementwise_op.py
Python
mit
8,059
0
from omni_api.base import ClientBase, DataItem class HackpadClient(ClientBase): def __init__(self, client_id, secret): self.auth = self.get_oauth_token(client_id, secret) def get_url(self, url, **kwargs): kwargs['auth'] = self.auth return super(HackpadClient, self).get_url( ...
harveyr/omni-api
omni_api/hackpad.py
Python
mit
1,372
0
class ListViewTestsMixin(object): def test_admin_users_can_access_all_tables(self): for username in ('super', 'follow'): with self.login_as(username): for model_name in ('news', 'tip', 'crawl', 'user', 'schedule'): self._test_table_view(username, model_name, ...
ivandeex/dz
dz/tests/views.py
Python
mit
3,249
0.003078
# BinGrep, version 1.0.0 # Copyright 2017 Hiroki Hada # coding:UTF-8 import sys, os, time, argparse import re import pprint #import pydot import math import cPickle import ged_node from idautils import * from idc import * import idaapi def idascript_exit(code=0): idc.Exit(code) def get_short_function_name(functi...
hada2/bingrep
bingrep_dump.py
Python
bsd-3-clause
8,471
0.007909
# -*- coding: utf-8 -*- # Taboot - Client utility for performing deployments with Func. # Copyright © 2009, Red Hat, Inc. # # 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 th...
tbielawa/Taboot
taboot/tasks/httpd.py
Python
gpl-3.0
805
0
# Copyright (C) 2007 - 2009 Khronos Group # Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the...
KhronosGroup/COLLADA-CTS
StandardDataSets/collada/library_geometries/geometry/mesh/polygons/one_geometry_one_polygons/one_geometry_one_polygons.py
Python
mit
5,053
0.008114
# -*- coding: utf-8 -*- from .dev import * # noqa INSTALLED_APPS += ( 'django_extensions', ) DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'healthsites_dev', 'USER': '', 'PASSWORD': '', 'HOST': 'localhost', # Set to empt...
ismailsunni/healthsites
django_project/core/settings/dev_dodobas.py
Python
bsd-2-clause
1,782
0
from bson.json_util import dumps, loads from bson.objectid import ObjectId from flask import Blueprint, request, Response from app.commons import build_response from app.commons.utils import update_document from app.entities.models import Entity entities_blueprint = Blueprint('entities_blueprint', __name__, ...
alfredfrancis/ai-chatbot-framework
app/entities/controllers.py
Python
mit
1,963
0
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
google-research/google-research
cascaded_networks/models/densenet.py
Python
apache-2.0
6,633
0.004975
#http://informatics.mccme.ru/mod/statements/view3.php?id=22783&chapterid=113362#1 n = int(input()) def sum_kv_cifr(x): su = 0 for i in str(x): su += int(i)*int(i) return su maxi_power = 0 for i in range(1, n//2+1): print('______',i) for k in range(n//i, 0, -1): power = sum_kv_cif...
dichenko/kpk2016
Diff/dra.py
Python
gpl-3.0
442
0.011312
# -*- coding: utf-8 -*- # GMate - Plugin Based Programmer's Text Editor # Copyright © 2008-2009 Alexandre da Silva # # This file is part of Gmate. # # See LICENTE.TXT for licence information import gtk from GMATE import i18n as i from GMATE.status_widget import StatusWidget class StatusPosition(StatusWidget): ""...
lexrupy/gmate-editor
GMATE/status_position.py
Python
mit
2,729
0.002566
#!/usr/bin/env python3 from linker import Linker import htmlPage import content.index,content.db,content.fincom # TODO put into config spbBudgetXlsPath='../spb-budget-xls' if __name__=='__main__': linker=Linker('filelists',{ 'csv':['csv'], 'xls':['xls'], 'db':['zip','sql','xlsx'], }) htmlPage.HtmlPage('inde...
AntonKhorev/BudgetSpb
main.py
Python
bsd-2-clause
1,072
0.041295
#!/usr/bin/env python from setuptools import setup, find_packages from os import path import codecs import os import re import sys # When creating the sdist, make sure the django.mo file also exists: if 'sdist' in sys.argv or 'develop' in sys.argv: os.chdir('fluent_blogs') try: from django.core import...
edoburu/django-fluent-blogs
setup.py
Python
apache-2.0
3,060
0.002614
import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages import sys #NOTE: if you want to develop askbot #you might want to install django-debug-toolbar as well import askbot setup( name = "askbot", version = askbot.get_version(),#remember to manually set this correctly descr...
maxwward/SCOPEBak
setup.py
Python
gpl-3.0
5,541
0.009024
''' Created on Apr 20, 2011 @author: michel ''' import os from lxml import etree from FeatureServer.WebFeatureService.FilterEncoding.Operator import Operator class LogicalOperator(Operator): def __init__(self, node): super(LogicalOperator, self).__init__(node) self.type = 'LogicalOperator' ...
guolivar/totus-niwa
service/thirdparty/featureserver/FeatureServer/WebFeatureService/FilterEncoding/LogicalOperators/LogicalOperator.py
Python
gpl-3.0
1,243
0.008045
import os import ROOT from __common__ import * OUTPUT_FILE_PATH = 'beta_sanity_check.root' print 'Opening output file %s...' % OUTPUT_FILE_PATH outputFile = ROOT.TFile(OUTPUT_FILE_PATH, 'RECREATE') for station in STATIONS: filePath = os.path.join(DATA_FOLDER, '%s_full_upgoingmu.root' % station) f = ROOT.TFil...
centrofermi/e3analysis
upgoingmu/beta_sanity_check.py
Python
lgpl-3.0
3,115
0.000642
""" Copyright 2014 This file is part of Phase. Phase 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. Phase is distributed in the hope that...
phase-dev/phase
libphase/tabs/vulnerabilities.py
Python
gpl-3.0
6,578
0.03907
import logging from tornado.web import RequestHandler from NXTornadoWServer.ControlSocketHandler import ControlSocketHandler class ClientsHandler(RequestHandler): def get(self): try: controller_i = ControlSocketHandler.clients.index(ControlSocketHandler.client_controller) except Value...
spseol/DOD-2014
NXTornadoWServer/NXTornadoWServer/ClientsHandler.py
Python
lgpl-2.1
775
0.003871
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems 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.o...
SalemAmeen/neon
tests/test_linear_layer.py
Python
apache-2.0
6,132
0
# import matplotlib.pyplot as plt # import numpy as np # from scipy import stats # import sys # # c = list() # b = list() # for line in sys.stdin: # linesp = list(map(float, line.strip().split(","))) # if(linesp[0] < 4): # c.append(linesp[0]) # b.append(linesp[1]) # # carr = np.array(c) # barr ...
marcos-sb/hacker-rank
artificial-intelligence/statistics-and-machine-learning/battery/Solution.py
Python
apache-2.0
639
0
import os from hanziconv import HanziConv # 简繁转换 from app.ResultParse import ResultParse from app.statistics import analysis from interface.api import LookUp, Search, Association from tools.parse_and_filter import parse_sentence from tools.translate import Translate class Query: def __init__(self, debug=False)...
zhouhoo/conceptNet_55_client
app/query.py
Python
apache-2.0
5,682
0.001562
from dataingestion.initial_input import InitialInput from const.constants import Constants from dataingestion.preprocessing import preprocess_basic from dataingestion.window import get_windows from dataingestion.cache_control import * from analysis.preparation import permutate from analysis.preparation import split_tes...
joergsimon/gesture-analysis
main.py
Python
apache-2.0
1,322
0.008321
# encoding: utf-8 """calculator.py - module for choosing a calculator.""" import gtk from gettext import gettext as _ import os import numpy as np from copy import copy from ase.gui.setupwindow import SetupWindow from ase.gui.progress import DefaultProgressIndicator, GpawProgressIndicator from ase.gui.widgets import p...
alexei-matveev/ase-local
ase/gui/calculator.py
Python
gpl-2.0
84,895
0.003028
from warnings import warn warn("IPython.utils.daemonize has moved to ipyparallel.apps.daemonize", stacklevel=2) from ipyparallel.apps.daemonize import daemonize
unnikrishnankgs/va
venv/lib/python3.5/site-packages/IPython/utils/daemonize.py
Python
bsd-2-clause
162
0.012346
# -*- coding: UTF-8 -*- from freesms import FreeClient from base import BaseProvider, MissingConfigParameter, ServerError class FreeProvider(BaseProvider): """ This is a provider class for the French telco 'Free'. >>> f = FreeProvider({'api_id': '12345678', 'api_key':'xyz'}) >>> f.send('Hello, Worl...
bfontaine/RemindMe
remindme/providers/free.py
Python
mit
841
0
import sys import xbmc,xbmcaddon,xbmcvfs import sqlite3 from subprocess import Popen import datetime,time channel = sys.argv[1] start = sys.argv[2] ADDON = xbmcaddon.Addon(id='script.tvguide.Vader') def adapt_datetime(ts): # http://docs.python.org/2/library/sqlite3.html#registering-an-adapter-callable return ...
ledtvavs/repository.ledtv
script.tvguide.Vader/resources/playwith/playwithchannel.py
Python
gpl-3.0
2,435
0.009035
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details. """ import logging def setup_logging(name="cct", level=logging.DEBUG): # create logger logger = logging.getLogger(name) logger.hand...
goldmann/cct
cct/__init__.py
Python
mit
696
0.001437
#!/usr/bin/env python # Execute with # $ python webvulnscan/__main__.py (2.6+) # $ python -m webvulnscan (2.7+) import sys if __package__ is None and not hasattr(sys, "frozen"): # direct call of __main__.py import os.path path = os.path.realpath(os.path.abspath(__file__)) sys.path.append(os....
hhucn/webvulnscan
webvulnscan/__main__.py
Python
mit
428
0
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class SyncListTestCase(Integrat...
twilio/twilio-python
tests/integration/preview/sync/service/test_sync_list.py
Python
mit
8,183
0.003666
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011 CERN. ## ## Invenio 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) a...
valkyriesavage/invenio
modules/bibauthorid/lib/bibauthorid_tables_utils.py
Python
gpl-2.0
54,551
0.00275
import random import time from dot3k.menu import MenuOption class Debris(MenuOption): def __init__(self, backlight=None): if backlight is None: import dot3k.backlight self.backlight = dot3k.backlight else: self.backlight = backlight self.debug = False ...
teamllamauk/ScopeDriver
plugins/debris.py
Python
gpl-3.0
6,763
0.000591
import json from aiohttp import ClientSession from tribler_core.restapi import get_param from tribler_core.tests.tools.test_as_server import TestAsServer from tribler_core.utilities.path_util import Path from tribler_core.version import version_id def path_to_str(obj): if isinstance(obj, dict): return {...
hbiyik/tribler
src/tribler-core/tribler_core/restapi/base_api_test.py
Python
lgpl-3.0
2,844
0.003516
class DeferredForeignKey(object): def __init__(self, *args, **kwargs): self.name = kwargs.pop('name', None) self.args = args self.kwargs = kwargs
danfairs/django-dfk
dfk/models.py
Python
bsd-3-clause
176
0
import logging, os, json import search.archive class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) logging.info('**** new Singleton instance') retur...
gauthiier/mailinglists
www/archives.py
Python
gpl-3.0
1,896
0.030063
#!/usr/bin/env python from ecl.summary import EclSum OIL_PRICES = { "2010-01-01": 78.33, "2010-02-01": 76.39, "2010-03-01": 81.20, "2010-04-01": 84.29, "2010-05-01": 73.74, "2010-06-01": 75.34, "2010-07-01": 76.32, "2010-08-01": 76.60, "2010-09-01": 75.24, "2010-10-01": 81.89, ...
joakim-hove/ert
test-data/local/snake_oil_structure/snake_oil/jobs/snake_oil_npv.py
Python
gpl-3.0
2,757
0
#!/usr/bin/env python ########################################################################## # # Copyright (c) 2020, Cinesite VFX Ltd. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
GafferHQ/gaffer
.github/workflows/main/setBuildVars.py
Python
bsd-3-clause
6,394
0.021896
# coding: utf-8 """ Vericred API Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and an...
vericred/vericred-python
test/test_county_bulk.py
Python
apache-2.0
9,989
0.002903
""" Copyright (c) 2015 Michael Bright and Bamboo HR 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...
BambooHR/rapid
rapid/release/data/models.py
Python
apache-2.0
4,322
0.003702
# 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. # --------------------------------------------------------------------...
Azure/azure-sdk-for-python
sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_recognize_business_cards.py
Python
mit
5,129
0.003509
""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #---------------------------------------...
zeeshanali/blaze
blaze/compute/air/passes/ckernel_impls.py
Python
bsd-3-clause
1,537
0.003904
"""Common objects used throughout the project.""" import atexit import functools import logging import os import shutil import tempfile import weakref import click class Config(object): """The global configuration and state of the running program.""" def __init__(self): """Constructor.""" s...
Robpol86/sphinxcontrib-versioning
sphinxcontrib/versioning/lib.py
Python
mit
5,599
0.0025
# -*- coding: utf-8 -*- """ Projy template for PythonPackage. """ # system from datetime import date from os import mkdir, rmdir from shutil import move from subprocess import call # parent class from projy.templates.ProjyTemplate import ProjyTemplate # collectors from projy.collectors.AuthorCollector import AuthorCol...
stephanepechard/projy
projy/templates/DjangoProjectTemplate.py
Python
gpl-3.0
4,869
0.00801
""" Field classes. """ import datetime import os import re import time import urlparse import warnings from decimal import Decimal, DecimalException try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.core.exceptions import ValidationError from django.core import valida...
tjsavage/rototutor_djangononrel
django/forms/fields.py
Python
bsd-3-clause
31,759
0.026575
import warnings from django.contrib.localflavor.cz.forms import (CZPostalCodeField, CZRegionSelect, CZBirthNumberField, CZICNumberField) from django.core.exceptions import ValidationError from utils import LocalFlavorTestCase class CZLocalFlavorTests(LocalFlavorTestCase): def setUp(self): self.save_...
mitsuhiko/django
tests/regressiontests/forms/localflavor/cz.py
Python
bsd-3-clause
3,835
0.001825
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
KhronosGroup/COLLADA-CTS
StandardDataSets/1_5/collada/library_kinematics_model/kinematics_model/asset/unit/unit.py
Python
mit
3,954
0.006829
# -*- coding: utf-8 -*- # 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 # # Un...
alshedivat/tensorflow
tensorflow/python/kernel_tests/py_func_test.py
Python
apache-2.0
22,732
0.012234
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-01 05:38 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('booker', '0025_event_wedding_options'), ] operations = [ migrations.RemoveField( ...
luckiestlindy/osproject
booker/migrations/0026_remove_event_expected_guests.py
Python
gpl-3.0
403
0
from django.db.models import FieldDoesNotExist, Avg, Max, Min, Count, Sum from django.utils.translation import ugettext as _ from nadmin.sites import site from nadmin.views import BaseAdminPlugin, ListAdminView from nadmin.views.list import ResultRow, ResultItem from nadmin.util import display_for_field AGGREGATE_ME...
A425/django-nadmin
nadmin/plugins/aggregation.py
Python
mit
2,408
0.002076
# lint-amnesty, pylint: disable=missing-module-docstring from xmodule.contentstore.content import StaticContent from .django import contentstore def empty_asset_trashcan(course_locs): ''' This method will hard delete all assets (optionally within a course_id) from the trashcan ''' store = contentsto...
edx/edx-platform
common/lib/xmodule/xmodule/contentstore/utils.py
Python
agpl-3.0
1,571
0.001273
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Create CSV from AWR text reports # # Tested Versions # 10.2.0.1 RAC # 10.2.0.4 RAC # # Note # extracts values specified with "===" sequence. # ###################################################################################################### t = {...
yasushiyy/awr2csv
awrtext2csv102.py
Python
mit
21,131
0.007668
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import reverse from django.test import TestCase, override_settings from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailcore.models import Page, Site from wagtail.wagtailredirects import mode...
iansprice/wagtail
wagtail/wagtailredirects/tests.py
Python
bsd-3-clause
23,927
0.003679
# rkivas file backupper # Copyright (C) 2016 Daniel Getz # # 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 later version. # # This pro...
talflon/rkivas-python
rkivas/config.py
Python
gpl-3.0
3,679
0.000272
# Copyright 2015 Red Hat, 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 agre...
cloudbase/neutron
neutron/tests/fullstack/test_qos.py
Python
apache-2.0
11,734
0
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys from pyasn1.codec.der import decoder as der_decoder from pyasn1.codec.der import encoder as der_encoder from pyasn1_modules import pe...
kawamon/hue
desktop/core/ext-py/pyasn1-modules-0.2.6/tests/test_rfc5649.py
Python
apache-2.0
1,730
0.001156
import os from notifications_delivery.app import create_app from credstash import getAllSecrets # on aws get secrets and export to env secrets = getAllSecrets(region="eu-west-1") for key, val in secrets.items(): os.environ[key] = val application = create_app() if __name__ == "__main__": application.run(...
alphagov/notifications-delivery
wsgi.py
Python
mit
322
0.003106
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:12644") pwd = raw_input("Enter wallet passphrase: ") access.walletpassphrase(pwd, 60)
Tutakamimearitomomei/Kongcoin
contrib/wallettools/walletunlock.py
Python
mit
159
0
# # django-atompub by James Tauber <http://jtauber.com/> # http://code.google.com/p/django-atompub/ # An implementation of the Atom format and protocol for Django # # For instructions on how to use this module to generate Atom feeds, # see http://code.google.com/p/django-atompub/wiki/UserGuide # # # Copyright (c) 2...
hzlf/openbroadcast
website/_notification/atomformat.py
Python
gpl-3.0
22,948
0.009936
# # 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 writing, software # ...
steveb/heat
heat/tests/openstack/heat/test_resource_group.py
Python
apache-2.0
58,016
0
#!/usr/bin/env python # encoding: utf-8 ''' pvaurora configuration file ''' LATITUDE = 42.6 LONGITUDE = 12.9 API_KEY = "api_key_value" SYSTEM_ID = -1
yuroller/pvaurora
src/config-dist.py
Python
gpl-3.0
152
0.006579
""" barbell_capilar script. """ from common import info import dolfin as df import mshr import os from generate_mesh import MESHES_DIR, store_mesh_HDF5 import matplotlib.pyplot as plt def description(**kwargs): info("Generates mesh for a barbell capillary.") def method(res=50, diameter=1., length=5., show=False...
gautelinga/BERNAISE
utilities/mesh_scripts/barbell_capillary.py
Python
mit
1,501
0
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2017 OSGeo # # 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 ...
tomkralidis/geonode
geonode/tasks/tasks.py
Python
gpl-3.0
4,983
0.000201
from octopus.plugins.plugin import OctopusPlugin class VSA(OctopusPlugin): def __init__(self, executor): super().__init__(executor) self._pluginname = 'vsa.jar' self._classname = 'bjoern.plugins.vsa.VSAPlugin' def __setattr__(self, key, value): if key == "project": ...
octopus-platform/bjoern
python/bjoern-tools/bjoern/plugins/vsa.py
Python
gpl-3.0
414
0
def agts(queue): al = queue.add('surface.agts.py') queue.add('work_function.py', ncpus=1, deps=[al]) if __name__ == '__main__': execfile('Al100.py', {'k': 6, 'N': 5})
qsnake/gpaw
doc/exercises/surface/surface.agts.py
Python
gpl-3.0
180
0.005556
# coding=utf-8 from flask import g from mongoengine.connection import get_db from .model_document import ModelDocument, ModelQuerySet ################################################################################ __all__ = ('MultipleDatabaseModelDocument',) #######################################################...
SlideAtlas/SlideAtlas-Server
slideatlas/models/common/multiple_database_model_document.py
Python
apache-2.0
5,469
0.002377
"""Checks import order rule""" # pylint: disable=unused-import,relative-import,ungrouped-imports,wrong-import-order # pylint: disable=import-error, too-few-public-methods, missing-docstring,using-constant-test import os.path if True: from astroid import are_exclusive try: import sys except ImportError: cla...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/test/functional/wrong_import_position.py
Python
apache-2.0
777
0.006435
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2018 Jonathan Peirce # Distributed under the terms of the GNU General Public License (GPL). """Utility functions to support Experiment classes """ import re # this needs to be accessed from __str__ method of Param scriptTarg...
hoechenberger/psychopy
psychopy/experiment/utils.py
Python
gpl-3.0
1,018
0