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
import argparse import sys import traceback as tb from datetime import datetime from cfme.utils.path import log_path from cfme.utils.providers import list_provider_keys, get_mgmt def parse_cmd_line(): parser = argparse.ArgumentParser(argument_default=None) parser.add_argument('--nic-template', ...
jkandasa/integration_tests
scripts/azure_cleanup.py
Python
gpl-2.0
3,453
0.003186
# Generated by Django 3.2.4 on 2021-07-05 13:56 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("bibliography", "0002_move_json_data"), ] operations = [ migrations.AlterModelOptions( name="entry", options={"verbose_name_p...
fiduswriter/fiduswriter
fiduswriter/bibliography/migrations/0003_alter_entry_options.py
Python
agpl-3.0
357
0
#Parsing program to sort through Investopedia import urllib2 import re #This is the code to parse the List of Terms def get_glossary(res_num): html_lowered = res_num.lower(); begin = html_lowered.find('<!-- .alphabet -->') end = html_lowered.find('<!-- .idx-1 -->') if begin == -1 or end == -1: return None else:...
secondfoundation/Second-Foundation-Src
src/haruspex/python/echelon/investopedia_generator.py
Python
lgpl-2.1
2,630
0.031179
# -*- coding: utf-8 -*- from django.utils.encoding import smart_str class Menu(object): namespace = None def __init__(self, renderer): self.renderer = renderer if not self.namespace: self.namespace = self.__class__.__name__ def get_nodes(self, request): """ s...
nimbis/django-cms
menus/base.py
Python
bsd-3-clause
1,763
0.001134
# # Copyright (c) 2014 Piston Cloud Computing, 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 # # ...
dlenwell/refstack-client
tests/unit/tests.py
Python
apache-2.0
909
0.0011
""" This contains all the constants needed for the daemons to run """ LOGGING_CONSTANTS = { 'LOGFILE' : 'summer.log', 'MAX_LOG_SIZE' : 1048576, # 1 MEG 'BACKUP_COUNT' : 5 } def getLoggingConstants(constant): """ Returns various constants needing by the logging module """ return ...
DIVERSIFY-project/SMART-GH
sensor_processing/constants.py
Python
apache-2.0
359
0.013928
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [email protected], All rights reserved. # LLNL-CODE-64...
tmerrick1/spack
var/spack/repos/builtin/packages/py-psyclone/package.py
Python
lgpl-2.1
2,637
0.000758
import praw import requests from env import env from twitch import twitch class reddit: def __init__(self): self.r = praw.Reddit(user_agent='Heroes of the Storm Sidebar by /u/Hermes13') self.env = env() self.access_information = None def setup(self): # self.r.set_oauth_app_info( client_id=self.env.redditC...
rhots/automation
heroes-sidebar-master/reddit.py
Python
isc
1,603
0.029944
# -*- coding: utf-8 -*- """ Created on Mon Jun 22 15:32:58 2015 @author: hanbre """ from __future__ import print_function import sys import numpy as np import pandas as pd import xray import datetime import netCDF4 from mpl_toolkits.basemap import Basemap import matplotlib from matplotlib.pylab import * import matplo...
hansbrenna/NetCDF_postprocessor
plotter3.py
Python
gpl-3.0
4,021
0.034071
# 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...
naturali/tensorflow
tensorflow/models/rnn/ptb/ptb_word_lm.py
Python
apache-2.0
10,545
0.010906
import logging import logging.config import sys import threading import os from amberclient.collision_avoidance.collision_avoidance_proxy import CollisionAvoidanceProxy from amberclient.common.amber_client import AmberClient from amberclient.location.location import LocationProxy from amberclient.roboclaw.roboclaw imp...
showmen15/testEEE
src/amberdriver/drive_to_point/drive_to_point_controller.py
Python
mit
7,564
0.003173
"""Models for Zeroconf.""" import asyncio from typing import Any from zeroconf import DNSPointer, DNSRecord, ServiceBrowser, Zeroconf from zeroconf.asyncio import AsyncZeroconf class HaZeroconf(Zeroconf): """Zeroconf that cannot be closed.""" def close(self) -> None: """Fake method to avoid integra...
kennedyshead/home-assistant
homeassistant/components/zeroconf/models.py
Python
apache-2.0
1,697
0.001179
issues=[ dict(name='Habit',number=5,season='Winter 2012', description='commit to a change, experience it, and record'), dict(name='Interview', number=4, season='Autumn 2011', description="this is your opportunity to inhabit another's mind"), dict(name= 'Digital Presence', number= 3, season= ...
adamgreenhall/openreviewquarterly
builder/config.py
Python
mit
879
0.025028
"""Spyse OODA behaviour module""" import time # http://www.mindsim.com/MindSim/Corporate/OODA.html # http://www.d-n-i.net/second_level/boyd_military.htm # http://www.belisarius.com/modern_business_strategy/boyd/essence/eowl_frameset.htm # http://www.valuebasedmanagement.net/methods_boyd_ooda_loop.html # http:...
davidko/evolspyse
core/behaviours/ooda.py
Python
lgpl-2.1
1,291
0.000775
# -*- coding: utf-8 -*- from odoo import fields, models class CustomSurvey(models.Model): _inherit = 'survey.survey' auth_required = fields.Boolean('Login required', help="Users with a public link will be requested to login before taking part to the survey", oldname="authenticate", default=True) ...
hgsoft/hgsoft-addons
custom_survey_multi_emails_and_portal/models/custom_survey.py
Python
gpl-3.0
454
0.015419
# -*- coding: utf-8 -*- # # pybgpstream documentation build configuration file, created by # sphinx-quickstart on Mon Jan 19 11:07:23 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. #...
CAIDA/bgpstream
pybgpstream/docs/conf.py
Python
gpl-2.0
8,420
0.005819
import unittest class ATest(unittest.TestCase): def setUp(self): print("setup") pass def test_a(self): self.assertTrue(True) def tearDown(self): print("tear down") if __name__ == "__main__": print("masher_test.py") unittest.main()
bonattt/name-masher
tests/masher_test.py
Python
mit
289
0.00346
# Copyright (c) 2010, 2011 Timothy Lovorn # # 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, modify, merge, publish...
tflovorn/scSuperSolver
src/RunInterface.py
Python
mit
4,820
0.002905
# Copyright 2019 Virgil Dupras # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html import datetime from collections import defaultdict from core.util import ...
hsoft/moneyguru
core/gui/import_window.py
Python
gpl-3.0
15,326
0.002088
from .base import configure_app, create_app import re find_urls = re.compile('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+') class MailTemplatesAuthControllerTests(object): def setup(self): self.app = create_app(self.app_config, True) class TestMailTemplatesAuthControll...
axant/tgapp-mailtemplates
tests/test_controller_auth.py
Python
mit
626
0.007987
# $Id$ # # Copyright (C) 2001-2008 Greg Landrum and Rational Discovery LLC # All Rights Reserved # """ Automatic search for quantization bounds This uses the expected informational gain to determine where quantization bounds should lie. **Notes**: - bounds are less than, so if the bounds are [1.,2.], [0.9...
strets123/rdkit
rdkit/ML/Data/Quantize.py
Python
bsd-3-clause
10,583
0.02882
import errno import signal import os import socket import time SERVER_ADDRESS = (HOST, PORT) = '', 8888 REQUEST_QUEUE_SIZE = 1024 def grim_reaper(signum, frame): while True: try: pid, status = os.waitpid( -1, os.WNOHANG, ) except OSError: ...
zenanhu/pluto
hydra/server1.py
Python
apache-2.0
1,675
0.001194
#!/usr/bin/env python #::::::::::::::::::::::::::::::::::::::::::::::::::::: #Author: Damiano Barboni <[email protected]> #Version: 0.1 #Description: Script used to test bandsharing.py #Changelog: Wed Jun 11 12:07:33 CEST 2014 # First test version # #::::::::...
beardbig/bandsharing
tests/bandsharing_tests.py
Python
gpl-2.0
1,065
0.030047
import scrapy import re from research.items import ResearchItem import sys reload(sys) sys.setdefaultencoding('utf-8') class CaltechSpider(scrapy.Spider): name = "WISC" allowed_domains = ["cs.wisc.edu"] start_urls = ["https://www.cs.wisc.edu/research/groups"] def parse(self, response): item = ResearchItem() f...
doge-search/webdoge
liqian/WISC/research/research/spiders/WISCSpider.py
Python
unlicense
678
0.022124
#!/usr/bin/python # -*- coding: utf-8 -*- from flask import Flask, jsonify, request app = Flask(__name__) from charge.chargeManager import ChargeManager from data.dataProvider import DataProvider @app.route('/') def hello_world(): return jsonify(testPreMa(['棉花'],20)) @app.route('/result') def get_result(): na...
AlexYang1949/FuturesMeasure
restful/restfulApi.py
Python
mit
837
0.012063
from annoying.functions import get_object_or_None from django.contrib import messages from django.core.urlresolvers import reverse from django.db import transaction from django.db.models import Q from django.http.response import JsonResponse from django.http import HttpResponseRedirect from django.shortcuts import get_...
zurfyx/simple
simple/projects/views.py
Python
mit
17,984
0.001335
import numpy as np from scipy import sparse import statistics def metrics(data_file): output_str = '' dsms = [] # the first thing we do is load the csv file (file #,from,to) # into a DSM; we do this by converting the triples to a sparse matrix # dsm is the first-order DSM of dependencies dsm_initial = loa...
almossawi/firefox-code-quality
scripts/codequality.py
Python
mpl-2.0
4,809
0.02121
import os DEBUG = True SITE_ID = 1 APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '')) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } STATIC_URL = '/static/' # STATIC_ROOT = os.path.join(APP_ROOT, '../app_static') STATICFILE...
kitsunde/jack-bower
bower/tests/test_settings.py
Python
mit
783
0
""" Python script to create a new article in a given section id. """ import os import sys from zdesk import Zendesk from scripts import file_constants from colorama import init from colorama import Fore init() def _create_shell(section_id): # Get subdomain. try: subdomain = os.environ["ZENDESK_SU...
aerofs/zendesk-help-center-backer
zendesk/create_new_post_shell.py
Python
bsd-3-clause
2,438
0.006563
import sys import matplotlib.pyplot as plt import numpy as np import sklearn.gaussian_process import sklearn.kernel_approximation import splitter from appx_gaussian_processes import appx_gp TRAINING_NUM = 1500 TESTING_NUM = 50000 ALPHA = .003 LENGTH_SCALE = 1 GAMMA = .5 / (LENGTH_SCALE ** 2) COMPONENTS = 100 def...
alasdairtran/mclearn
projects/jakub/test_appx_gp.py
Python
bsd-3-clause
3,431
0.002332
"""Test interact and interactive.""" #----------------------------------------------------------------------------- # Copyright (C) 2014 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #---------------...
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/IPython/html/widgets/tests/test_interaction.py
Python
bsd-3-clause
13,235
0.013827
# 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 a...
mlperf/training_results_v0.5
v0.5.0/google/cloud_v3.8/resnet-tpuv3-8/code/resnet/model/staging/models/rough/nmt_gpu/nmt.py
Python
apache-2.0
46,513
0.007095
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon # # 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, version 3 of the License. # # This program is distributed in the hope that it will b...
jocelynj/weboob
weboob/applications/webcontentedit/webcontentedit.py
Python
gpl-3.0
3,817
0.00131
# -*- 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): pass def backwards(self, orm): pass models = { } ...
thejeshgn/quest
quest/migrations/0001_initial.py
Python
gpl-3.0
349
0.005731
import os from django.conf.urls import url, include urlpatterns = [ url(r'^misc/', include('misc.urls')), url(r'^qualification/', include('qualification.urls')), ] if os.environ.get('DJANGO_SETTINGS_MODULE') == 'etrack.settings.dev': import debug_toolbar urlpatterns += [ url(r'^__debug__/', i...
jmoreman/eTrack
etrack/urls.py
Python
mit
355
0
# run with https://codepen.io/sjdv1982/pen/MzNvJv # copy-paste seamless-client.js from seamless.highlevel import Context ctx = Context() ctx.cell1 = "test!" ctx.cell1.share() ctx.translate() ctx.compute() from seamless import shareserver print(shareserver.namespaces["ctx"].shares) print(shareserver.namespaces["ctx"]....
sjdv1982/seamless
tests/lowlevel/codepen-seamless-client.py
Python
mit
643
0.001555
''' forms, mostly used for simple tastypie validation ''' from django.contrib.gis import forms class MeetingForm(forms.Form): ''' form for meetings ''' day_of_week = forms.IntegerField(min_value=1, max_value=7) start_time = forms.TimeField() end_time = forms.TimeField() name = forms.CharField(max_...
mcjug2015/mfserver2
django_app/forms.py
Python
gpl-3.0
444
0
# -*- coding: utf-8 -*- # Copyright (c) 2015, imageio contributors # imageio is distributed under the terms of the (new) BSD License. """ .. note:: imageio is under construction, some details with regard to the Reader and Writer classes may change. These are the main classes of imageio. They expose an int...
blink1073/imageio
imageio/core/format.py
Python
bsd-2-clause
21,404
0.006634
"""Serialization of geometries for use in pyIEM.plot mapping We use a pickled protocol=2, which is compat binary. """ from pandas import read_sql from pyiem.util import get_dbconnstr PATH = "../src/pyiem/data/ramps/" # Be annoying print("Be sure to run this against Mesonet database and not laptop!") def do(ramp): ...
akrherz/pyIEM
util/make_ramps.py
Python
mit
848
0
"""Tests for the RunTaskCommand class""" from cumulusci.cli.runtime import CliRuntime from cumulusci.cli.cci import RunTaskCommand import click import pytest from unittest.mock import Mock, patch from cumulusci.cli import cci from cumulusci.core.exceptions import CumulusCIUsageError from cumulusci.cli.tests.utils imp...
SalesforceFoundation/CumulusCI
cumulusci/cli/tests/test_run_task.py
Python
bsd-3-clause
4,367
0.000458
import base64 import httplib import json import os import re import ssl import urllib from urlparse import urlunsplit from exceptions import CloudPassageAuthentication class HaloSession(object): """All Halo API session management happens in this object. Args: key(str): Halo API key secret(str...
ashmastaflash/cloudpassage_slim
cloudpassage_slim/halo_session.py
Python
bsd-2-clause
3,951
0
# This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'RandomArray', 'prod', 'std', 'hamming', 'flipud', ...
beiko-lab/gengis
bin/Lib/site-packages/numpy/oldnumeric/mlab.py
Python
gpl-3.0
3,566
0.009534
#TSTOP # #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 program is distributed in the hope that it will be useful, ...
gpersistence/tstop
python/persistence/PAMAPSegments.py
Python
gpl-3.0
4,400
0.009091
from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^kipa/', include('tupa.urls')), (r'^admin/', include(admin.site.urls)), ) if settings.DEBUG : urlpatterns += patterns('', ...
siimeon/Kipa
web/urls.py
Python
gpl-3.0
485
0.010309
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals """ This package provides the modules to perform FEFF IO. FEFF: http://feffproject.org/feffproject-feff.html """ from .inputs import * from .outputs import *
johnson1228/pymatgen
pymatgen/io/feff/__init__.py
Python
mit
311
0
from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from . import models class WPSiteAdmin(admin.ModelAdmin): list_display = ('name', 'url', 'hook') readonly_fields = ('name', 'description') def save_model(self, request, obj, form, change): # TODO do this sync as...
texastribune/wjordpress
wjordpress/admin.py
Python
apache-2.0
1,830
0.003825
#-*- coding: utf-8 -*- ''' Created on 24 дек. 20%0 @author: ivan ''' import random all_agents = """ Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3 Mozilla/5.0 (Windows; U; Windows NT 6.1; en; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) Mozilla/5.0 (Windows; U; Win...
sitexa/foobnix
foobnix/util/agent.py
Python
gpl-3.0
1,349
0.007429
#!/usr/bin/evn python # Start a network import time import os import re import sys import commands import libvirt from libvirt import libvirtError from src import sharedmod required_params = ('networkname',) optional_params = {} def start(params): """activate a defined network""" global logger logger ...
ryanmiao/libvirt-test-API
repos/network/start.py
Python
gpl-2.0
1,786
0.003919
#!/usr/bin/python import os, sys from termcolor import colored try: import requests except: print "[!]Requests module not found. Try to (re)install it.\n[!]pip install requests" oks = [] print("EASY DIRBUSTER!") def parser(): #URL flag = False while ( flag == False ): url = raw_input("Ins...
remiotore/Python-Tools
DirBuster.py
Python
mit
1,875
0.011733
''' Created on 10/mar/2014 @author: sectumsempra ''' import sys ''' from variab_conc import errbox from PyQt4 import QtGui, QtCore, Qt from PyQt4.QtCore import pyqtSignal, SLOT from PyQt4.QtCore import pyqtSlot, SIGNAL from PyQt4.QtGui import QPushButton, QTextEdit, QTableWidgetItem ''' from PyQt4 import QtGui, QtCor...
Roma2Lug-Projects/BEST_App
src/config.py
Python
apache-2.0
8,273
0.003747
from __future__ import with_statement import os from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file ...
paultag/moxie
migrations/env.py
Python
mit
2,125
0.002353
#@ { #@ "targets": #@ [{ #@ "name":"versioninfo.txt" #@ ,"status_check":"dynamic" #@ ,"dependencies":[{"ref":"maike","rel":"tool"}] #@ }] #@ } import sys import subprocess import shutil import os def modified_time(filename): try: return (os.path.getmtime(filename),True) except (KeyboardInterrupt, Sys...
milasudril/anja
versioninfo.py
Python
gpl-3.0
2,158
0.056534
from django.conf.urls import patterns, url from manoseimas.lobbyists import views urlpatterns = patterns( '', url(r'^lobbyists/?$', views.lobbyists_json, name='lobbyists_json'), url(r'^law_projects/(?P<lobbyist_slug>[^/]+)/?$', views.law_projects_json, name='law_projects_json'), )
ManoSeimas/manoseimas.lt
manoseimas/lobbyists/json_urls.py
Python
agpl-3.0
304
0
# Beedraw/Hive network capable client and server allowing collaboration on a single image # Copyright (C) 2009 Thomas Becker # # 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; eith...
skitzycat/beedraw
beenetwork.py
Python
gpl-2.0
14,234
0.039834
#!/usr/bin/python # encoding: utf-8 import subprocess from config import Config applescript_name_tem = "osascript/open_%s.scpt" arg_tem = { "calendar": "%s %s %s", "fantastical": "%s-%s-%s", "busycal": "%s-%s-%s", "google": "%s%s%s" } SOFTWARE = 'software' def open_cal(arg): arg = arg.strip() ...
owenwater/alfred-cal
src/open.py
Python
mit
1,042
0.003839
# -*- coding: utf-8 -*- from behave import given, then from nose.tools import assert_true, assert_regexp_matches import pexpect import re @then(u'I should see how many entries were found') def see_number_of_entries_found(context): expected_text = 'Found total number of \d+ entries.' context.trove.expect(expec...
purepitch/trove
features/steps/file_command_line_option.py
Python
gpl-3.0
1,396
0.003582
# Django settings for imageuploads project. import os PROJECT_DIR = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql...
archatas/imageuploads
imageuploads/settings.py
Python
gpl-2.0
4,670
0.001285
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # pylint: ...
Azure/azure-sdk-for-python
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_upload_helper.py
Python
mit
4,443
0.001576
# Lior Hirschfeld # JargonBot # -- Imports -- import re import pickle import random import praw from custombot import RedditBot from time import sleep from define import getDefinition from collections import Counter from nltk.stem import * from sklearn import linear_model # -- Setup Variables -- jargonBot = RedditBo...
lhirschfeld/JargonBot
jargonbot.py
Python
mit
5,805
0.002756
# 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/keras/python/keras/layers/merge.py
Python
bsd-2-clause
18,999
0.007158
#!/usr/bin/env python # Copyright 2021 - Gustavo Montamat # # 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 applicabl...
gmontamat/pyaw-reporting
awreporting/awreporting.py
Python
apache-2.0
4,023
0.000249
#!/usr/bin/env python # # Released under the BSD license. See LICENSE file for details. """ This program basically does face detection an blurs the face out. """ print __doc__ from SimpleCV import Camera, Display, HaarCascade # Initialize the camera cam = Camera() # Create the display to show the image display = Di...
nils-werner/SimpleCV
SimpleCV/examples/detection/facetrack.py
Python
bsd-3-clause
849
0.002356
"""SCons.Tool.gcc Tool-specific initialization for gcc. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2017 The SCons Foundation # # Permission is hereby granted, free of charge, to...
mapycz/mapnik
scons/scons-local-3.0.1/SCons/Tool/gcc.py
Python
lgpl-2.1
3,530
0.003966
# -*- coding: utf-8 -*- ############################################################################### # # InitializeOAuth # Generates an authorization URL that an application can use to complete the first step in the OAuth process. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under ...
jordanemedlock/psychtruths
temboo/core/Library/Bitly/OAuth/InitializeOAuth.py
Python
apache-2.0
5,111
0.005087
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPC calls related to net. Tests correspond to code in rpc/net.cpp. """ import time from test_framewo...
Exgibichi/statusquo
test/functional/net.py
Python
mit
4,228
0.001419
def tryprint(): return ('it will be oke')
cherylyli/stress-aid
env/lib/python3.5/site-packages/helowrld/__init__.py
Python
mit
45
0.022222
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
ytsarev/rally
rally/exceptions.py
Python
apache-2.0
6,154
0
import pytest import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_allclose from sklearn.datasets import load_linnerud from sklearn.cross_decomposition._pls import ( _center_scale_xy, _get_first_singular_vectors_power_method, _get_first_singular_vectors_svd, ...
manhhomienbienthuy/scikit-learn
sklearn/cross_decomposition/tests/test_pls.py
Python
bsd-3-clause
20,619
0.001261
from __future__ import unicode_literals from datetime import date from django.conf import settings from django.contrib.auth.models import User, Group, Permission, AnonymousUser from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.auth.tests.custom_user import ExtensionUser, CustomPermission...
mammique/django
django/contrib/auth/tests/auth_backends.py
Python
bsd-3-clause
15,671
0.002106
# 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("+16502530000...
teoreteetik/api-snippets
lookups/lookup-get-cname-example-1/lookup-get-cname-example-1.6.x.py
Python
mit
417
0
from chainer.iterators import multiprocess_iterator from chainer.iterators import serial_iterator MultiprocessIterator = multiprocess_iterator.MultiprocessIterator SerialIterator = serial_iterator.SerialIterator
kikusu/chainer
chainer/iterators/__init__.py
Python
mit
214
0
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-01-03 10:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0026_auto_20161215_2204'), ] operations = [ migrations.AddField( ...
bomjacob/htxaarhuslan
main/migrations/0027_auto_20170103_1130.py
Python
mit
977
0.001028
# Copyright (C) 2016 Deloitte Argentina. # This file is part of CodexGigas - https://github.com/codexgigassys/ # See the file 'LICENSE' for copying permission. from PlugIns.PlugIn import PlugIn class CypherPlug(PlugIn): def __init__(self, sample=None): PlugIn.__init__(self, sample) def getPath(self)...
codexgigassys/codex-backend
src/PlugIns/PE/CypherPlug.py
Python
mit
513
0
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Windows constants for IOCP """ # this stuff should really be gotten from Windows headers via pyrex, but it # probably is not going to change ERROR_PORT_UNREACHABLE = 1234 ERROR_NETWORK_UNREACHABLE = 1231 ERROR_CONNECTION_REFU...
hlzz/dotfiles
graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/internet/iocpreactor/const.py
Python
bsd-3-clause
550
0.001818
from sklearn2sql_heroku.tests.regression import generic as reg_gen reg_gen.test_model("LGBMRegressor" , "boston" , "postgresql")
antoinecarme/sklearn2sql_heroku
tests/regression/boston/ws_boston_LGBMRegressor_postgresql_code_gen.py
Python
bsd-3-clause
131
0.015267
# run scripts/jobslave-nodatabase.py import os os.environ["SEAMLESS_COMMUNION_ID"] = "simple-remote" os.environ["SEAMLESS_COMMUNION_INCOMING"] = "localhost:8602" import seamless seamless.set_ncores(0) from seamless import communion_server communion_server.configure_master( buffer=True, transformation_job=Tru...
sjdv1982/seamless
tests/lowlevel/simple-remote.py
Python
mit
1,438
0.002086
import pkg_resources from string import Template model_template = Template(pkg_resources.resource_string(__name__, "model_template.C")) lorentz_calc_template = Template(pkg_resources.resource_string(__name__, "lorentz_calc_template.C")) sconstruct_template = Template(pkg_resources.resource_string(__name__, "sconstru...
cms-externals/sherpa
MODEL/UFO/templates.py
Python
gpl-3.0
427
0.009368
"""Clean an input BAM file to work with downstream pipelines. GATK and Picard based pipelines have specific requirements for chromosome order, run group information and other BAM formatting. This provides a pipeline to prepare and resort an input. """ import os import sys import pysam from bcbio import bam, broad, u...
a113n/bcbio-nextgen
bcbio/pipeline/cleanbam.py
Python
mit
8,337
0.003958
# -*- coding: utf-8 -*- """ pgp_import command Import keys and signatures from a given GPG keyring. Usage: ./manage.py pgp_import <keyring_path> """ from collections import namedtuple, OrderedDict from datetime import datetime import logging from pytz import utc import subprocess import sys from django.core.managem...
brain0/archweb
devel/management/commands/pgp_import.py
Python
gpl-2.0
8,172
0.000734
""" Qxf2 Services: A plug-n-play class for logging. This class wraps around Python's loguru module. """ import os, inspect import pytest,logging from loguru import logger from pytest_reportportal import RPLogger, RPLogHandler class Base_Logging(): "A plug-n-play class for logging" def __init__(self,log_file_na...
qxf2/qxf2-page-object-model
utils/Base_Logging.py
Python
mit
4,369
0.013733
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') C...
rvmoura96/projeto-almoxarifado
mysite/urls.py
Python
mit
838
0
# Generated by Django 2.1.3 on 2018-11-09 18:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('proposals', '0016_auto_20180405_2116'), ] operations = [ migrations.AlterField( model_name='timeallocation', name='i...
LCOGT/valhalla
valhalla/proposals/migrations/0017_auto_20181109_1828.py
Python
gpl-3.0
1,094
0.001828
"""Support for Transport NSW (AU) to query next leave event.""" from datetime import timedelta from TransportNSW import TransportNSW import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_MODE, CONF_API_KE...
lukas-hetzenecker/home-assistant
homeassistant/components/transport_nsw/sensor.py
Python
apache-2.0
4,474
0
# Copyright (c) 2019 Guangwang Huang # # 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, modify, merge, publish, dis...
qtile/qtile
test/layouts/test_treetab.py
Python
mit
6,060
0.001155
"""Tests for vumi.middleware.tagger.""" import re from vumi.middleware.tagger import TaggingMiddleware from vumi.message import TransportUserMessage from vumi.tests.helpers import VumiTestCase class TestTaggingMiddleware(VumiTestCase): DEFAULT_CONFIG = { 'incoming': { 'addr_pattern': r'^\d+...
TouK/vumi
vumi/middleware/tests/test_tagger.py
Python
bsd-3-clause
5,053
0
"""Tests for tools and arithmetics for monomials of distributed polynomials. """ from sympy.polys.monomialtools import ( monomials, monomial_count, monomial_lex_cmp, monomial_grlex_cmp, monomial_grevlex_cmp, monomial_cmp, monomial_mul, monomial_div, monomial_gcd, monomial_lcm, monomial_max, monomial_min, )...
tarballs-are-good/sympy
sympy/polys/tests/test_monomialtools.py
Python
bsd-3-clause
3,561
0.048301
# Copyright 2011 OpenStack Foundation # # 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...
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/api/openstack/compute/contrib/extended_status.py
Python
gpl-2.0
3,926
0
# # pyconsole.py # # Copyright (C) 2004-2006 by Yevgen Muntyan <[email protected]> # Portions of code by Geoffrey French. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public version 2.1 as # published by the Free Software Foundat...
jdburton/gimp-osx
src/gimp-2.6.12/plug-ins/pygimp/plug-ins/pyconsole.py
Python
gpl-2.0
20,993
0.00181
# Copyright 2015 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 a...
sachinpro/sachinpro.github.io
tensorflow/python/framework/docs.py
Python
apache-2.0
21,127
0.008425
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <[email protected]> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at h...
muet/Espruino
boards/OLIMEXINO_STM32_RE.py
Python
mpl-2.0
4,169
0.015112
from urllib.parse import urljoin import pytest from adhocracy4.comments import models as comments_models from adhocracy4.ratings import models as rating_models @pytest.mark.django_db def test_delete_comment(comment_factory, rating_factory): comment = comment_factory() for i in range(5): comment_fac...
liqd/adhocracy4
tests/comments/test_model.py
Python
agpl-3.0
2,973
0
#!/usr/bin/env python """ A unittest script for the SampleAttribute module. """ import unittest import json from cutlass import SampleAttribute from CutlassTestConfig import CutlassTestConfig from CutlassTestUtil import CutlassTestUtil # pylint: disable=W0703, C1801 class SampleAttributeTest(unittest.TestCase): ...
ihmpdcc/cutlass
tests/test_sample_attr.py
Python
mit
10,454
0.001148
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models from ..utils.pypi import normalize_name class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." for package in orm['folivora.Package'...
rocketDuck/folivora
folivora/migrations/0007_normalize_names.py
Python
isc
9,029
0.007864
__author__ = "Steffen Vogel" __copyright__ = "Copyright 2015, Steffen Vogel" __license__ = "GPLv3" __maintainer__ = "Steffen Vogel" __email__ = "[email protected]" """ This file is part of transWhat transWhat is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Li...
NeoBelerophon/transwhat
buddy.py
Python
gpl-3.0
5,903
0.027444
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.textfont", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotly/plotly.py
packages/python/plotly/plotly/validators/histogram2dcontour/textfont/_color.py
Python
mit
424
0.002358
#!/usr/bin/python # -*- coding: utf-8 -*- from gobspy import main main()
arypbatista/gobspy
gobspy.py
Python
gpl-3.0
75
0
# -*- coding: utf-8 -*- import time class Timer(object): ''' Simple timer control ''' def __init__(self, delay): self.current_time = 0 self.set_delay(delay) def pause(self, pause): if pause >= self.delay: self.current_time = time.clock() ...
pantuza/art-gallery
src/timer.py
Python
gpl-2.0
1,202
0.003328
import random def say_thing(): return random.choice([ "dude", "sup", "yo mama" ])
foolwealth/django_multi_deployable_template
lib/lib_a/helper.py
Python
mit
115
0.008696
VERSION = '0.1.3.0' PROGRAM = 'dsame' DESCRIPTION = 'dsame is a program to decode EAS/SAME alert messages' COPYRIGHT = 'Copyright (C) 2016 Joseph W. Metcalf' TEST_STRING = 'EAS: ZCZC-WXR-RWT-055027-055039-055047-055117-055131-055137-055139-055015-055071+0030-0771800-KMKX/NWS-' MSG__TEXT={ 'EN' : {'MSG1' ...
cuppa-joe/dsame
defs.py
Python
isc
274,490
0.029815
# ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publi...
pyfa-org/eos
eos/restriction/restriction/resource.py
Python
lgpl-3.0
4,071
0