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 fabric.api import * # start with the default server def run(): """ Start with the default server """ local('python runserver.py') # start with unicorn server. def grun(): """ Start with gunicorn server """ local('gunicorn -c gunicorn.conf runserver:app') # run tests def tests(): """ Run u...
fert89/prueba-3-heroku-flask
fabfile.py
Python
bsd-3-clause
534
0
# # 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...
Acehaidrey/incubator-airflow
airflow/providers/jdbc/hooks/jdbc.py
Python
apache-2.0
3,656
0.001915
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_tanc_mite_hue.iff" result.attribute_template_id = 9 result.st...
anhstudios/swganh
data/scripts/templates/object/mobile/shared_tanc_mite_hue.py
Python
mit
582
0.041237
""" This module contains signals related to enterprise. """ import logging import six from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from ent...
stvstnfrd/edx-platform
openedx/features/enterprise_support/signals.py
Python
agpl-3.0
5,796
0.004141
from datetime import date from django.contrib.contenttypes.models import ContentType from django.test import TestCase from django.urls import reverse from rest_framework import status from dcim.models import Site from extras.constants import CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE, CF_TYPE_SELECT...
lampwins/netbox
netbox/extras/tests/test_customfields.py
Python
apache-2.0
13,178
0.003035
# -*- coding: utf-8 -*- """ Created on Sat Dec 6 17:01:05 2014 @author: remi @TODO : in the function train_RForest_with_kfold we should keep all result proba for each class, this could be very intersting. """ import numpy as np ; #efficient arrays import pandas as pd; # data frame to do sql like operation im...
Remi-C/LOD_ordering_for_patches_of_points
script/loading benchmark/rforest_on_patch_lean.py
Python
lgpl-3.0
8,121
0.046915
import os.path from common.base import INGIniousConfiguration from common.task_file_managers.yaml_manager import TaskYAMLFileManager _task_file_managers = [TaskYAMLFileManager] def get_readable_tasks(courseid): """ Returns the list of all available tasks in a course """ tasks = [ task for task in os...
GuillaumeDerval/INGInious
common/task_file_managers/manage.py
Python
agpl-3.0
1,952
0.004098
from couchpotato.core.downloaders.base import Downloader from couchpotato.core.helpers.encoding import isInt from couchpotato.core.logger import CPLog import httplib import json import urllib import urllib2 log = CPLog(__name__) class Synology(Downloader): type = ['torrent_magnet'] log = CPLog(__name__) ...
jayme-github/CouchPotatoServer
couchpotato/core/downloaders/synology/main.py
Python
gpl-3.0
3,961
0.009089
from app.util import ElasticSearchUtil from app.util import JsonUtil, RequestUtil, ResponseUtil from app.util.AuthUtil import * import os @app.route('/user/article/<string:article_id>', methods=['GET']) @authorized_required def get_article(user, article_id): """ @api {get} /user/article/:id Get a article in p...
TeamGhostBuster/restful-api
app/api/article/controller.py
Python
apache-2.0
8,039
0.000373
from __future__ import absolute_import from hamcrest.library import * from hamcrest.core import *
eve-basil/common
tests/__init__.py
Python
apache-2.0
98
0
from omgeo.processor import _Processor import re class _PreProcessor(_Processor): """Takes, processes, and returns a geocoding.places.PlaceQuery object.""" def process(self, pq): raise NotImplementedError( 'PreProcessor subclasses must implement process().') class ReplaceRangeWithNumber(_P...
lliss/python-omgeo
omgeo/preprocessors.py
Python
mit
11,304
0.006723
# 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/network/azure-mgmt-network/tests/test_cli_mgmt_network_endpoint.py
Python
mit
15,915
0.004147
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 = "MovingAverage", cycle_length = 12, transform = "Difference", sigma = 0.0, exog_count = 100, ar_order = 12);
antoinecarme/pyaf
tests/artificial/transf_Difference/trend_MovingAverage/cycle_12/ar_12/test_artificial_1024_Difference_MovingAverage_12_12_100.py
Python
bsd-3-clause
273
0.084249
### # Copyright (c) 2005, Ali Afshar # 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 list of conditions, a...
kg-bot/SupyBot
plugins/Sshd/__init__.py
Python
gpl-3.0
2,534
0.000395
# Copyright 2012 OpenStack Foundation. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
cboling/SDNdbg
docs/old-stuff/pydzcvr/doc/neutronclient/v2_0/client.py
Python
apache-2.0
54,103
0
# damm.py - functions for performing the Damm checksum algorithm # # Copyright (C) 2016-2021 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the L...
arthurdejong/python-stdnum
stdnum/damm.py
Python
lgpl-2.1
3,297
0
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2021 Timothée Lecomte # This file is part of Friture. # # Friture is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # Friture is distri...
tlecomte/friture
friture/level_view_model.py
Python
gpl-3.0
2,390
0.00879
import pytest import sys from inspect import isgeneratorfunction from logging import getLogger from subprocess import Popen, PIPE from re import search from input_generation import user_input_generator DELIMITER = "; " def get_input_generator_from_list(lst): def _generator(): for line in lst: ...
asnorkin/shad_testing_script
conftest.py
Python
gpl-3.0
8,688
0.002532
__author__ = 'lisa_stillwell' from unittest import TestCase from hs_core.hydroshare import resource from hs_core.hydroshare import users from hs_core.models import GenericResource from django.contrib.auth.models import User import datetime as dt class TestSetAccessRules(TestCase): def setUp(self): # cre...
hydroshare/hydroshare_temp
hs_core/tests/api/native/test_set_access_rules.py
Python
bsd-3-clause
5,046
0.003171
#! /usr/bin/env python # -*- codes: utf-8 -*- print 'Starting ...' #Basic imports from ctypes import * import sys import time import threading import logging #Phidget specific imports from Phidgets.PhidgetException import PhidgetErrorCodes, PhidgetException from Phidgets.Events.Events import AttachEventA...
RoasterBot/roasterbot-analytics
python/threaded_temp.py
Python
cc0-1.0
7,664
0.014875
from hashlib import sha1 import shutil import re import json import time from dateutil.parser import parse from datetime import datetime as dtime from datetime import timedelta as tdelta from flask.ext.testing import TestCase from app import db, app import hactar.models class BaseTest(TestCase): _multiprocess_...
findgriffin/hactar
test/base.py
Python
gpl-2.0
6,991
0.004291
from .nanoplotter_main import *
wdecoster/NanoPlot
nanoplotter/__init__.py
Python
gpl-3.0
32
0
import pandas as pd from larray.core.array import Array from larray.inout.pandas import from_frame __all__ = ['read_stata'] def read_stata(filepath_or_buffer, index_col=None, sort_rows=False, sort_columns=False, **kwargs) -> Array: r""" Reads Stata .dta file and returns an Array with the contents Param...
gdementen/larray
larray/inout/stata.py
Python
gpl-3.0
1,657
0.002414
# Copyright 2017 BrainPad 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...
BrainPad/FindYourCandy
robot-arm/dobot/command.py
Python
apache-2.0
6,883
0.001453
""" Copyright (c) 2013 Clarinova. This file is licensed under the terms of the Revised BSD License, included in this distribution as LICENSE.txt """ from __future__ import absolute_import import unicodecsv from . import DatabaseInterface import anydbm import os from ..partitions import Partitions from .inserter imp...
kball/ambry
ambry/database/csv.py
Python
bsd-2-clause
6,934
0.010816
# -*- coding: utf-8 -*- # Copyright 2019 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import ( stock_inventory, )
open-synergy/opnsynid-stock-logistics-warehouse
stock_inventory_by_moving_product/models/__init__.py
Python
agpl-3.0
167
0
import datetime from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin...
edmorley/django
tests/admin_changelist/tests.py
Python
bsd-3-clause
38,622
0.001139
from .module import FakeShopModule __all__ = ['FakeShopModule']
hinance/www
hinance-www/weboob/modules/fakeshop/__init__.py
Python
mit
64
0
#!/usr/bin/env python # This document is part of Acronym # https://github.com/geowurster/Acronym # =================================================================================== # # # New BSD License # # Copyright (c) 2014, Kevin D. Wurster # All rights reserved. # # Redistribution and use in source and bi...
geowurster/Acronym
acronym/tests/test_vector_transform.py
Python
bsd-3-clause
4,230
0.003783
#!/usr/bin/python # -*- coding: utf-8 -*- import cv2 from Tkinter import * from PIL import Image, ImageTk import tkFileDialog appname = "example" class App(object): def __init__(self, root=None): if not root: root = Tk() self.root = root self.initUI() def initUI(self): ...
zrafa/ev
python+tk+opencv/ejemplo-funciona.py
Python
gpl-2.0
2,626
0.011805
#!/usr/bin/env python """ This script is copied from pylearn2/scripts/train.py, so that we can put this LocateReLU folder on PYTHON_PATH automatically, so that we can import local modules without extra work Script implementing the logic for training pylearn2 models. This is a "driver" that we recommend using for all ...
hyqneuron/pylearn2-maxsom
pylearn2/scripts/papers/LocateReLU/mytrain.py
Python
bsd-3-clause
8,524
0
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google 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 2 of the License, or # (at your option) any later...
badp/ganeti
lib/client/gnt_node.py
Python
gpl-2.0
38,700
0.008191
"""Auto-generated file, do not edit by hand. BS metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_BS = PhoneMetadata(id='BS', country_code=1, international_prefix='011', general_desc=PhoneNumberDesc(national_number_pattern='[2589]\\d{9}', possible_number_pattern='\...
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/phonenumbers/data/region_BS.py
Python
bsd-3-clause
1,927
0.007265
import re import sys import xbmc import xbmcaddon import xbmcplugin import xbmcgui import http try: import StorageServer except: import storageserverdummy as StorageServer HANDLE=int(sys.argv[1]) ADDON_NAME = re.findall('plugin:\/\/([\w\d\.]+)\/', sys.argv[0])[0] __settings__ = xbmcaddon.Addon(ADDON_NAME) __l...
LordCorellon/plugin.video.9anime
resources/lib/ui/control.py
Python
gpl-3.0
3,032
0.014512
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
Fewbytes/cosmo-manager-rest-client
cosmo_manager_rest_client/swagger/DeploymentsApi.py
Python
apache-2.0
6,880
0
from cStringIO import StringIO from email.utils import parsedate import gzip import logging import re import time from urlparse import urljoin from django.conf import settings from django.http import HttpResponse from django.middleware.gzip import GZipMiddleware from django.utils.cache import cc_delim_re from django.u...
armstrong/armstrong.esi
armstrong/esi/utils.py
Python
bsd-3-clause
5,702
0.00228
#!/usr/bin/env python3 from argparse import ArgumentParser from bottle import abort, route, run, static_file import MySQLdb import calendar import datetime import dateutil.parser import json import logging import os import pathlib import sqlite3 import sys import threading import time APIVER = 0 BACKEND_URL = 'https:...
BunsenLabs/fluxbb-activity
fluxbbactivity/__init__.py
Python
gpl-3.0
6,198
0.01081
import unittest import numpy as np from Orange.data import Table, Domain, DiscreteVariable from Orange.preprocess import score from Orange import preprocess class FeatureScoringTest(unittest.TestCase): def setUp(self): self.zoo = Table("zoo") # disc. features, disc. class self.housing = Table(...
PythonCharmers/orange3
Orange/tests/test_score_feature.py
Python
gpl-3.0
4,389
0.000456
#!/usr/bin/env python """ Project-wide application configuration. DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE. They will be exposed to users. Use environment variables instead. See get_secrets() below for a fast way to access them. """ import os """ NAMES """ # Project name to be used in urls # Use dashes, n...
NathanLawrence/lunchbox
app_config.py
Python
mit
2,936
0.003065
from collections import defaultdict from datetime import date from itertools import count, product from string import ascii_uppercase from urllib.parse import urlparse from github import Github from slacker import Error from src import settings from src.utils import slack from src.utils.google_api import get_service ...
beproud/bp-cron
src/handlers/github_reminder.py
Python
mit
4,990
0.000213
from __future__ import print_function import pandas as pd import os #This program will find all the compound words in a long list of words, by #taking the lexicon of all half-as-many-letters words and checking them against #the long list. print(os.getcwd()) #os.chdir() If using within psychopy, might start out in wr...
alexholcombe/words-calculate
anagramsCalculate.py
Python
mit
3,348
0.020012
''' Online link spider test ''' from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import next import unittest from unittest import TestCase import time import sys from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__...
istresearch/scrapy-cluster
crawler/tests/online.py
Python
mit
3,708
0.005394
# parsing the dump to get all the keys for the current players import json dic={} with open('currentPlayerDump.json','r') as f: data=json.load(f) print data["resultSets"][0]["headers"] print len(data["resultSets"][0]["rowSet"]) for obj in data["resultSets"][0]["rowSet"]: if obj[0] not in dic: dic[obj[0]]=obj[1...
bam2332g/proj1part3
rahulCode_redo/project1Part3/nba/parseCurrentPlayers.py
Python
mit
422
0.037915
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt import unittest test_dependencies = ["Product Bundle"] class TestQuotation(unittest.TestCase): def test_ma...
Aptitudetech/ERPNext
erpnext/selling/doctype/quotation/test_quotation.py
Python
cc0-1.0
2,733
0.02232
# -*- coding: utf-8 -*- # # 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 #...
CloverHealth/airflow
airflow/hooks/mysql_hook.py
Python
apache-2.0
4,635
0.000216
# this is a virtual module that is entirely implemented server side DOCUMENTATION = ''' --- module: raw version_added: historical short_description: Executes a low-down and dirty SSH command options: free_form: description: - the raw module takes a free form command to run required: true executable: ...
amandolo/ansible-modules-core
commands/raw.py
Python
gpl-3.0
1,845
0.001626
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Jan 2018 do metropolis sampling to estimate PDF of chessboard calibration. this involves intrinsic and extrinsic parameters, so it's a very high dimensional search space (before it was only intrinsic) @author: sebalander """ # %% # import glob import os i...
sebalander/sebaPhD
dev/intrinsicCalibFullPyMC3.py
Python
bsd-3-clause
80,011
0.005601
"""URI API This file contains the part of the blaze API dealing with URIs. The "URI API". In Blaze persistence is provided by the means of this URI API, that allows specifying a "location" for an array as an URI. The URI API allows: - saving existing arrays to an URI. - loading an array into memory from an URI. - ...
mwiebe/blaze
blaze/io/storage.py
Python
bsd-3-clause
7,420
0.000809
# -*- coding: utf-8 -*- from __future__ import absolute_import from .base import BaseElasticsearchQuery class AllElasticsearchQuery(BaseElasticsearchQuery): """ This is an Elasticsearch query class that is meant to query all of the document types in a given index. """ # Class Members # Inst...
lavalamp-/ws-backend-community
wselasticsearch/query/all.py
Python
gpl-3.0
754
0.001326
from .context import singlesample as s import unittest, os, subprocess HERE = os.path.dirname(__file__) in_vcf = os.path.join(HERE, "data/example.vcf") in_bam = os.path.join(HERE, "data/NA12878.target_loci.sorted.bam") lib_info_json = os.path.join(HERE, "data/NA12878.bam.json") out_vcf = os.path.join(HERE, "data/out....
hall-lab/svtyper
tests/test_singlesample.py
Python
mit
3,138
0.001912
# -*- coding: utf-8 -*- import argparse import ast import functools import io import sys from . import ast as ecma_ast from . import compiler from . import translator from . import utils def parse(data:str) -> object: """ Given a string with python source code, returns a python ast tree. """ re...
niwinz/cobrascript
cobra/base.py
Python
bsd-3-clause
3,602
0.003054
"""Collection of functions to train the hierarchical model.""" from __future__ import print_function import numpy as np from keras.optimizers import RMSprop, Adagrad, Adam import models2 as models import batch_utils import plot_utils import matplotlib.pyplot as plt def clip_weights(model, weight_constraint): ...
RoozbehFarhoodi/McNeuron
train2.py
Python
mit
16,582
0.000422
# TLS-SAK - TLS Swiss Army Knife # https://github.com/RBT-itsec/TLS-SAK # Copyright (C) 2016 by Mirko Hansen / ARGE Rundfunk-Betriebstechnik # # 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, eit...
RBT-itsec/TLS-SAK
lib/tls/tlsconnection.py
Python
gpl-3.0
5,605
0.002319
import sys def main(args=None): if args is None: args = sys.argv[1:] print('entry point - it worked') if __name__ == "__main__": sys.exit(main())
johnathanvidu/ppman
ppman/cli.py
Python
apache-2.0
181
0.005525
from JupyROOT import cppcompleter, utils if '__IPYTHON__' in __builtins__ and __IPYTHON__: cppcompleter.load_ipython_extension(get_ipython()) utils.iPythonize()
mhuwiler/rootauto
bindings/pyroot/JupyROOT/__init__.py
Python
lgpl-2.1
170
0
class Accounts(object): """ A class to query and use Pardot accounts. Account field reference: http://developer.pardot.com/kb/object-field-references/#account """ def __init__(self, client): self.client = client def read(self, **kwargs): """ Returns the data for the ac...
mneedham91/PyPardot4
pypardot/objects/accounts.py
Python
mit
1,042
0.003839
# 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...
jhseu/tensorflow
tensorflow/python/ops/clip_ops.py
Python
apache-2.0
15,309
0.003789
# Copyright (C) 2013 ABRT Team # Copyright (C) 2013 Red Hat, Inc. # # This file is part of faf. # # faf 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) ...
patriczek/faf
src/pyfaf/actions/pull_components.py
Python
gpl-3.0
6,262
0.00016
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
mcgonagle/ansible_f5
library/bigip_device_dns.py
Python
apache-2.0
11,184
0.000715
# 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 ag...
android/android-test
tools/android/emulator/resources.py
Python
apache-2.0
2,873
0.004873
# 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 http://mozilla.org/MPL/2.0/. """ Rudimentary system stats collection using ``psutil``. """ import time from switchy import event_callback, utils def...
sangoma/switchy
switchy/apps/measure/sys.py
Python
mpl-2.0
3,923
0
from django.db import models, migrations def update_last_modify_timestamp(apps, schema_editor): Chat = apps.get_model('chat', 'Chat') for chat in Chat.objects.all(): if not chat.last_modify_timestamp: last_msg = chat.message_set.all().order_by('-timestamp').first() if last_msg:...
cjlee112/socraticqs2
mysite/chat/migrations/0011_auto_20170614_0341.py
Python
apache-2.0
636
0.001572
# AUTOMATICALLY GENERATED FILE # DO NOT EDIT # Generated from outputs.png icon_outputs = b'iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAA'\ b'BHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAA'\ b'CuNJREFUaIHVmltsXcd1hr+Z2ftceZVoi4xFS6KdSlHkooGr'\ b'JgpyqWQEKFwkqNvaemrhINV...
gion86/awlsim
awlsim/gui/icons/outputs.py
Python
gpl-2.0
5,539
0
import boto3 import sure # noqa from moto import mock_kinesis, mock_cloudformation @mock_cloudformation def test_kinesis_cloudformation_create_stream(): cf_conn = boto3.client("cloudformation", region_name="us-east-1") stack_name = "MyStack" template = '{"Resources":{"MyStream":{"Type":"AWS::Kinesis::...
william-richard/moto
tests/test_kinesis/test_kinesis_cloudformation.py
Python
apache-2.0
5,255
0.000761
# coding=utf-8 from __future__ import absolute_import import flask import threading import os import yaml import codecs import time from binascii import hexlify from collections import defaultdict from flask_babel import gettext import octoprint.plugin from octoprint.settings import valid_boolean_trues from octoprint...
Jaesin/OctoPrint
src/octoprint/plugins/appkeys/__init__.py
Python
agpl-3.0
13,069
0.028469
# Generated by Django 2.2.10 on 2021-06-08 14:37 import django.db.models.deletion from django.db import ( migrations, models, ) from accelerator.utils import copy_m2m_fields def migrate_member_profile_data(apps, schema_editor): MemberProfile = apps.get_model('accelerator', 'MemberProfile') MemberPro...
masschallenge/django-accelerator
accelerator/migrations/0058_memberprofile1.py
Python
mit
1,918
0
#!/usr/bin/env python import sys import copy import rospy,sys import moveit_commander import actionlib import roslib; roslib.load_manifest('ur_modern_driver') import tf from control_msgs.msg import * from trajectory_msgs.msg import * from sensor_msgs.msg import JointState from geometry_msgs.msg import PoseStamped,Pos...
robotic-ultrasound-image-system/ur5
universal_robot-kinetic-devel/ur_modern_driver-master/planvios.py
Python
apache-2.0
3,473
0.031097
# This file is part of cloud-init. See LICENSE file for license information. """Base LXD instance.""" import os import shutil import time from tempfile import mkdtemp from cloudinit.util import load_yaml, subp, ProcessExecutionError, which from tests.cloud_tests import LOG from tests.cloud_tests.util import Platform...
larsks/cloud-init
tests/cloud_tests/platforms/lxd/instance.py
Python
gpl-3.0
9,690
0
from __future__ import print_function __author__ = "Alaleh Azhir,Peter Kerpedjiev" import collections as col import sys import argparse class GeneInfo: def __init__(self): pass def merge_gene_info(gene_infos, gene_info): """ Add a new gene_info. If it's txStart and txEnd overlap with a previou...
hms-dbmi/clodius
scripts/exonU.py
Python
mit
4,383
0.001825
import threading from datetime import datetime from tilequeue.queue import MessageHandle from tilequeue.utils import grouper class VisibilityState(object): def __init__(self, last, total): # the datetime when the message was last extended self.last = last # the total amount of time curre...
tilezen/tilequeue
tilequeue/queue/sqs.py
Python
mit
6,744
0
import ckan.plugins.toolkit as toolkit import ckan.model as model from ckanext.project.model import projectAdmin import logging log = logging.getLogger(__name__) def _is_project_admin(context): ''' Determines whether user in context is in the project admin list. ''' user = context.get('user', '') ...
Cadasta/ckanext-project
ckanext/project/logic/auth.py
Python
agpl-3.0
2,564
0
from __future__ import annotations # standard libraries import asyncio import typing # third party libraries import numpy.typing # local libraries from nion.data import Image from nion.swift import MimeTypes from nion.swift import Thumbnails from nion.swift.model import DisplayItem from nion.swift.model import Docum...
nion-software/nionswift
nion/swift/DataItemThumbnailWidget.py
Python
gpl-3.0
19,101
0.003508
import random import time import multiprocessing # This could be a consumer function, which is invoked when a new RabbitMQ message arrives. def busy_process(id): print("Processing message ID: " + str(id)) loop_count = 1000 for outer in range(0, loop_count): for inner in range(0, loop_count): ...
afaquejam/Grok-Python
MultiProcessing/multi_process.py
Python
gpl-2.0
947
0.004224
from __future__ import unicode_literals from .responses import ResourceGroupsTaggingAPIResponse url_bases = ["https?://tagging.(.+).amazonaws.com"] url_paths = {"{0}/$": ResourceGroupsTaggingAPIResponse.dispatch}
william-richard/moto
moto/resourcegroupstaggingapi/urls.py
Python
apache-2.0
215
0
#!/usr/bin/env python # encoding: utf-8 def run(whatweb, pluginname): whatweb.recog_from_header(pluginname, "Webluker")
cflq3/getcms
plugins/Webluker_cdn.py
Python
mit
127
0.007874
#!/usr/bin/env python from time import ctime from urllib2 import urlopen TICKs = ('yhoo', 'dell', 'cost', 'adbe', 'intc') URL = 'http://quote.yahoo.com/d/quotes.csv?s=%s&f=sl1c1p2' print '\nPrices quoted as of: %s\n' % ctime() print 'TICKER', 'PRICE', 'CHANGE', '%AGE' print '------', '-----', '------', '--...
YuxuanLing/trunk
trunk/code/study/python/core_python_appilication/ch13/stock.py
Python
gpl-3.0
485
0
import FFPopSim as h import numpy as np from matplotlib import pyplot as plt import random as rd from Bio import Phylo print "This script is meant to illustrate and explore the effect of\n\ positive selection on genealogies in asexual and sexual populations. \n\n\ Simulations are performed using an infinite sites mode...
wrshoemaker/ffpopsim
examples/genealogies_with_selection.py
Python
gpl-3.0
2,468
0.029173
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-30 01:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0008_report_photo'), ] operations = [ migrations.AlterField( ...
henriquenogueira/aedes
aedes_server/core/migrations/0009_auto_20160329_2208.py
Python
mit
490
0.002041
# -*- coding: utf-8 -*- from __future__ import unicode_literals import wx import widgetUtils class audio_album(widgetUtils.BaseDialog): def __init__(self, *args, **kwargs): super(audio_album, self).__init__(title=_("Create a new album"), parent=None) panel = wx.Panel(self) sizer = wx.BoxSi...
manuelcortez/socializer
src/wxUI/dialogs/creation.py
Python
gpl-2.0
975
0.002051
import re from django import template from django.core.exceptions import ImproperlyConfigured from django.urls import NoReverseMatch from django.utils.functional import cached_property from wagtail.images.models import Filter from wagtail.images.shortcuts import get_rendition_or_not_found from wagtail.images.views.se...
jnns/wagtail
wagtail/images/templatetags/wagtailimages_tags.py
Python
bsd-3-clause
4,585
0.002181
""" You are given an array of positive integers w where w[i] describes the weight of ith index (0-indexed). We need to call the function pickIndex() which randomly returns an integer in the range [0, w.length - 1]. pickIndex() should return the integer proportional to its weight in the w array. For example, for w = [1...
franklingu/leetcode-solutions
questions/random-pick-with-weight/Solution.py
Python
mit
1,988
0.003541
# Autodetecting setup.py script for building the Python extensions # # Modified for BeOS build. Donn Cave, March 27 2001. __version__ = "special BeOS after 1.37" import sys, os from distutils import sysconfig from distutils import text_file from distutils.errors import * from distutils.core import Extension, setup f...
teeple/pns_server
work/install/Python-2.7.4/Misc/BeOS-setup.py
Python
gpl-2.0
23,664
0.008959
import re import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): """ Handle incoming GET requests. We will only handle one request and an authorization_code GET parameter must be present. We don't really care about the path being requ...
kristinn/casanova
casanova/http.py
Python
mit
956
0.004184
# coding:utf-8 ''' created on 2018/8/22 @author:sunyihuan ''' from __future__ import print_function import os import sys # This is a placeholder for a Google-internal import. import tensorflow as tf import mnist_input_data tf.app.flags.DEFINE_integer('training_iteration', 1000, 'numbe...
sunyihuan326/DeltaLab
daily_learning/serving_learning/save_model.py
Python
mit
4,825
0.001658
# -*- coding: utf8 -*- """ @author: Matthias Feys (matthiasfeys@gmail.com) @date: %(date) """ import theano class Layer(object): def __init__(self,name, params=None): self.name=name self.input = input self.params = [] if params!=None: self.setParams(params=params...
codeAshu/nn_ner
nn/interfaces.py
Python
mit
939
0.01065
from collections.abc import Sequence import pytest from regolith.schemas import SCHEMAS, validate, EXEMPLARS from pprint import pprint @pytest.mark.parametrize("key", SCHEMAS.keys()) def test_validation(key): if isinstance(EXEMPLARS[key], Sequence): for e in EXEMPLARS[key]: validate(key, e, ...
scopatz/regolith
tests/test_validators.py
Python
cc0-1.0
876
0
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.elastix.registration import Registration def test_Registration_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), fixed_image=dict...
grlee77/nipype
nipype/interfaces/elastix/tests/test_auto_Registration.py
Python
bsd-3-clause
1,483
0.024275
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
danielfm/pydozeoff
ez_setup.py
Python
bsd-3-clause
10,286
0.004667
from xml.dom import minidom import os import shutil import process_atlas import process_font import process_starling_atlas import oxygine_helper class XmlWalker: def __init__(self, src, folder, scale_factor, node, meta_node, scale_quality): self.base = folder self.path = folder self.scale_f...
unitpoint/oxygine-objectscript
tools/src2/xml_processor.py
Python
mit
9,313
0.01267
#!/usr/bin/env python # # # autohint math table builder # # Copyright 1996-2000 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. By cont...
coringao/capitan
dependencies/alfont/freetype/src/autohint/mather.py
Python
gpl-3.0
1,699
0.021189
import os import logging import ConfigParser from optparse import OptionParser from pyconfluence import __version__, Confluence, ConfluenceException USAGE = """%prog [options] get_server_info:\t Retrieve some basic information about the server connected to. get_spaces:\t\t All Space Summaries that the current user c...
myles/pyconfluence
src/pyconfluence/confluence.py
Python
bsd-3-clause
2,731
0.034053
""" Script for building NodeBox Usage: python setup.py py2app """ from distutils.core import setup from setuptools.extension import Extension import py2app import nodebox NAME = 'NodeBox extended' VERSION = nodebox.__version__ AUTHOR = "Frederik De Bleser", AUTHOR_EMAIL = "frederik@pandora.be", URL = "http://...
karstenw/nodebox-pyobjc
setup_large.py
Python
mit
4,542
0.007266
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.23 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
kubernetes-client/python
kubernetes/client/models/v1beta1_limited_priority_level_configuration.py
Python
apache-2.0
6,329
0
''' Created on 5/03/2014 @author: Alex Montes Barrios ''' import sys import os import Tkinter as tk import tkMessageBox import tkFileDialog import tkSimpleDialog import ttk import tkFont import keyword import pickle import re NORM_PROMPT = '>>> ' CELL_PROMPT = '... ' class PythonEditor(tk.Frame): def __init__(se...
pybquillast/xkAddonIDE
toRecycle/baseUI.py
Python
gpl-3.0
32,423
0.018444
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
skosukhin/spack
var/spack/repos/builtin/packages/fastphase/package.py
Python
lgpl-2.1
1,682
0.000595
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ import logging import unittest import os import t...
duyet-website/api.duyet.net
lib/gensim/test/test_word2vec.py
Python
mit
34,696
0.003603
import copy import logging from datetime import datetime import six from sqlalchemy.orm import ( class_mapper, object_session, properties, attributes) from sqlalchemy.orm.collections import InstrumentedList from sqlalchemy.exc import InvalidRequestError, IntegrityError from sqlalchemy.orm.exc import MultipleResult...
postatum/nefertari-sqla
nefertari_sqla/documents.py
Python
apache-2.0
28,898
0.000069
""" unittests for xmodule Run like this: rake test_common/lib/xmodule """ import json import os import unittest import fs import fs.osfs import numpy from mock import Mock from path import path import calc from xblock.field_data import DictFieldData from xmodule.x_module import ModuleSystem, XModuleDescriptor...
morpheby/levelup-by
common/lib/xmodule/xmodule/tests/__init__.py
Python
agpl-3.0
3,708
0.002157
"""MayaVi test related utilities. """ # Author: Prabhu Ramachandran <prabhu@aero.iitb.ac.in> # Copyright (c) 2005-2015, Enthought, Inc. # License: BSD Style. from __future__ import print_function # Standard library imports import gc import os import os.path import sys import logging import traceback from optparse imp...
dmsurti/mayavi
integrationtests/mayavi/common.py
Python
bsd-3-clause
25,780
0.001241
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 OpenStack, LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
rcbops/glance-buildpackage
glance/api/policy.py
Python
apache-2.0
3,392
0