repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
rocktavious/DevToolsLib
DTL/maya/vertexColorUtils.py
1
8982
import os, sys, traceback import maya.cmds as cmds from functools import partial #Needs refactoring from ..utils.funcs import selection from DTL.api import Safe """ #------------------------------------------------------------ def buildChannelMatrixFromUI(): '''Helper Function to build the channel matrix from th...
mit
5,149,193,529,652,118,000
42.606796
181
0.599978
false
MapofLife/MOL
earthengine/google-api-python-client/samples/oauth2/dailymotion/main.py
1
3069
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
bsd-3-clause
-1,209,884,518,423,326,000
27.95283
74
0.706419
false
danakj/chromium
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
1
11415
# Copyright (C) 2010, 2012 Google Inc. 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 an...
bsd-3-clause
-3,636,279,563,733,310,500
43.073359
127
0.657556
false
fmetzger/videostreaming-bufferemulation
ytdl.py
1
15813
#!/usr/bin/python # -*- coding: utf-8 -*- """ ytdl_refactored.py Required python packages: python-gdata python-matplotlib python-numpy """ import urllib2 import urllib import os import subprocess import sys import string import re import socket import datetime from datetime import datetime import gdata.youtube im...
unlicense
7,069,916,604,199,555,000
34.450673
201
0.537411
false
atheiste/django-bit-category
bitcategory/tests.py
1
6753
from __future__ import absolute_import from django.test import TestCase from .models import Category class UnitTests(TestCase): def test_bit_mask(self): """We can't use HierarchicalModel here. Since django 1.6. one can't instantiate an abstract model with foreign key. """ hm = C...
bsd-3-clause
3,041,693,801,767,563,300
44.322148
117
0.651118
false
quisas/albus
cli_tools/openpyxl/reader/comments.py
1
3069
# Copyright (c) 2010-2014 openpyxl # # 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, distr...
agpl-3.0
6,218,087,853,442,427,000
44.132353
88
0.69306
false
wimglenn/argboss
test_override_kwargs.py
1
1470
from override_kwargs import override_kwargs from other_module import delegating_function, function from datetime import datetime from unittest import TestCase def function_in_this_module(x=123): """hello I'm a docstring""" return x def MyClass(object): def method_in_this_module(x=123): return x w...
mit
6,979,320,661,274,152,000
34.853659
84
0.662585
false
mckinseyacademy/xblock-poll
tests/integration/test_functions.py
1
8200
# -*- coding: utf-8 -*- # # Copyright (C) 2015 McKinsey Academy # # Authors: # Jonathan Piacenti <jonathan@opencraft.com> # # This software's license gives you freedom; you can copy, convey, # propagate, redistribute and/or modify this program under the terms of # the GNU Affero General Public License (AGPL) a...
agpl-3.0
5,463,858,232,789,444,000
34.964912
110
0.630732
false
Fluent-networks/floranet
floranet/models/application.py
1
1851
from twisted.internet.defer import inlineCallbacks, returnValue from floranet.models.model import Model from floranet.models.appinterface import AppInterface class Application(Model): """LoRa application class Model representing a LoRa application. Attributes: name (str): a user friendly...
mit
-2,307,838,893,648,743,000
35.313725
86
0.593193
false
collective/collective.anonfeedback
src/collective/anonfeedback/tests/test_views.py
1
2732
import unittest2 as unittest from plone.testing.z2 import Browser from Products.CMFCore.utils import getToolByName from plone.app.testing import SITE_OWNER_NAME from plone.app.testing import SITE_OWNER_PASSWORD from plone.app.testing import login from collective.anonfeedback.testing import\ COLLECTIVE_ANONFEEDBAC...
mit
-8,225,146,587,051,691,000
36.438356
91
0.639092
false
elliterate/capybara.py
capybara/tests/session/test_has_text.py
1
10818
# coding=utf-8 from __future__ import unicode_literals import pytest import re import capybara class TestHasText: def test_is_true_if_the_given_text_is_on_the_page_at_least_once(self, session): session.visit("/with_html") assert session.has_text("est") assert session.has_text("Lorem") ...
mit
-3,833,025,502,180,976,600
41.727273
103
0.655412
false
jgrillo/zoonomia
test/test_solution.py
1
1543
import unittest from zoonomia.solution import ( verify_closure_property, BasisOperator, TerminalOperator, OperatorSet, Objective, Fitness, Solution ) class TestVerifyClosureProperty(unittest.TestCase): def test_verify_closure_property(self): def add(left, right): return left + right int...
mit
-1,835,718,517,750,096,600
23.109375
76
0.685029
false
kylef/goji
goji/client.py
1
7210
import datetime import mimetypes import os import pickle from typing import Any, List, Optional import click import requests from requests.auth import AuthBase, HTTPBasicAuth from requests.compat import urljoin from goji.models import Attachment, Comment, Issue, Sprint, Transition, User class JIRAException(click.Cl...
bsd-2-clause
8,375,053,474,429,902,000
33.663462
88
0.603745
false
tomazc/orange-bio
orangecontrib/bio/widgets/OWGeneNetwork.py
1
16713
from collections import namedtuple from PyQt4.QtCore import QTimer, QThread, pyqtSlot as Slot import Orange.data import Orange.feature import Orange.network from Orange.orng.orngDataCaching import data_hints from Orange.OrangeWidgets import OWWidget from Orange.OrangeWidgets import OWGUI from Orange.OrangeWidgets im...
gpl-3.0
4,020,125,862,851,062,000
31.389535
90
0.579609
false
SkyTruth/pelagos-data
setup.py
1
2925
#!/usr/bin/env python # This document is part of FS_Nav # https://github.com/geowurster/FS_Nav # =================================================================================== # # # New BSD License # # Copyright (c) 2014, Kevin D. Wurster # All rights reserved. # # Redistribution and use in source and binary f...
mit
-8,811,666,424,475,370,000
35.5625
87
0.674188
false
openstack/designate
designate/tests/unit/producer/test_service.py
1
2947
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Federico Ceratto <federico.ceratto@hpe.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.o...
apache-2.0
-7,713,076,138,659,402,000
32.11236
77
0.686121
false
KRHS-GameProgramming-2016/Memefinity
Wall.py
1
1721
import pygame, sys, math class Wall(pygame.sprite.Sprite): def __init__(self, pos=[0,0], size=None): pygame.sprite.Sprite.__init__(self, self.containers) self.image = pygame.image.load("rsc/wall/wall.png") if size: self.image = pygame.transform.scale(self.image, [size,size]) ...
mit
727,751,280,407,669,500
35.617021
76
0.595003
false
project-generator/project_generator
project_generator/commands/build.py
1
3506
# Copyright 2015 0xc0170 # # 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, soft...
apache-2.0
-4,970,498,958,962,731,000
45.746667
142
0.653451
false
kfarr2/django-local-settings
local_settings/__init__.py
1
3356
import json import os import sys from .color_printer import ColorPrinter from .checker import Checker from .exc import LocalSettingsError, SettingsFileNotFoundError from .loader import Loader from .types import LocalSetting, SecretSetting from .util import NO_DEFAULT, get_file_name from .__main__ import make_local_set...
mit
-7,191,827,870,245,881,000
38.023256
89
0.666865
false
emilybache/texttest-runner
src/main/python/lib/default/gtkgui/testtree.py
1
37187
""" Code associated with the left-hand tree view for tests """ import gtk, gobject, pango, guiutils, plugins, logging from ordereddict import OrderedDict class TestColumnGUI(guiutils.SubGUI): def __init__(self, dynamic, testCount): guiutils.SubGUI.__init__(self) self.addedCount = 0 self....
mit
-9,205,779,399,166,659,000
41.066742
157
0.624708
false
line/line-bot-sdk-python
tests/models/test_base.py
1
2959
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
4,919,719,617,394,605,000
33.406977
76
0.560324
false
brianlions/python-nebula
nebula/log.py
1
13537
#!/usr/bin/env python3 # # Copyright (c) 2012 Brian Yi ZHANG <brianlions at gmail dot com> # # This file is part of pynebula. # # pynebula 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...
gpl-3.0
-4,693,924,603,498,929,000
35.292225
114
0.540149
false
tommo/gii
lib/mock/asset/AnimatorAsset.py
1
1686
import os.path import json from gii.core import * from gii.qt.dialogs import requestString, alertMessage from mock import _MOCK ##----------------------------------------------------------------## class AnimatorDataCreator(AssetCreator): def getAssetType( self ): return 'animator_data' def getLabel( self ): ...
mit
-5,049,870,976,723,200,000
29.107143
83
0.641756
false
happyleavesaoc/home-assistant
homeassistant/components/notify/smtp.py
1
9080
""" Mail (SMTP) notification service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.smtp/ """ import logging import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.image import MIMEImage...
apache-2.0
7,774,232,293,811,562,000
34.748031
79
0.601322
false
lutraconsulting/qgis-constraint-checker-plugin
ConstraintChecker/constraintcheckerdialog.py
1
1610
# -*- coding: utf-8 -*- """ /*************************************************************************** Constraint Checker A QGIS plugin Generate reports of constraints (e.g. planning constraints) applicable to an area of interest. ------------------- ...
gpl-2.0
-157,576,542,083,008,830
47.787879
100
0.42236
false
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/from_thesis/HMM8_then1_ConnectedLHS.py
1
2650
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HMM8_then1_ConnectedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMM8_then1_ConnectedLHS. """ #...
mit
4,038,207,856,086,871,600
42.442623
125
0.47434
false
weka511/bioinformatics
phylogeny.py
1
34566
# Copyright (C) 2020-2021 Greenweaves Software Limited # 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. # Th...
gpl-3.0
-8,262,652,753,592,696,000
35.424658
149
0.549615
false
lebek/reversible-raytracer
util.py
1
1864
import numpy as np import theano import theano.tensor as T import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt from scipy.misc import imsave def initialize_weight(n_vis, n_hid, W_name, numpy_rng, rng_dist): if 'uniform' in rng_dist: W = numpy_rng.uniform(low=-np.sqrt(6. / (n_vis ...
mit
-7,149,291,079,279,311,000
32.285714
88
0.551502
false
macrman/PyramidScheme
PyramidScheme/GeneratedParser.py
1
11482
from .Nodes import * # Begin -- grammar generated by Yapps import sys, re from yapps import runtime class R7RSScanner(runtime.Scanner): patterns = [ ('"do"', re.compile('do')), ('"if"', re.compile('if')), ('"set!"', re.compile('set!')), ('""', re.compile('')), ('"\\."', re....
bsd-2-clause
-5,070,462,504,728,422,000
41.058608
178
0.57159
false
srinath-chakravarthy/ovito
tests/scripts/test_suite/cluster_analysis_modifier.py
1
1067
from ovito import * from ovito.io import * from ovito.modifiers import * import numpy as np node = import_file("../../files/CFG/shear.void.120.cfg") node.add_to_scene() node.modifiers.append(SliceModifier( distance = -12, inverse = True, slice_width = 18.0 )) node.modifiers.append(SliceModifier( dist...
gpl-3.0
5,575,231,833,728,878,000
24.428571
95
0.730084
false
tensorflow/lucid
lucid/modelzoo/caffe_models/others.py
1
5766
# Copyright 2018 The Lucid 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 applicable l...
apache-2.0
5,251,851,677,240,020,000
45.5
91
0.626084
false
Joergen/zamboni
apps/market/tests/test_cron.py
1
1471
from datetime import datetime, timedelta import time import mock from nose.tools import eq_ import amo import amo.tests from devhub.models import ActivityLog from market.cron import mkt_gc from users.models import UserProfile class TestGarbage(amo.tests.TestCase): def setUp(self): self.user = UserProfi...
bsd-3-clause
24,974,685,451,685,576
27.288462
63
0.626105
false
seoweon/narajangteo
narajangteo_crawling.py
1
9596
# coding: utf-8 # # <center> 나라장터 입찰공고 크롤링 with Python3</center> # # 나라장터에 올라오는 입찰공고를 모니터링하기 위해 개발된 간단한 프로그램으로, 검색어 리스트를 설정하면 그에 따라 최근 7일간 공고된 입찰공고 리스트를 가져와 엑셀파일로 정리해줍니다. 크롤링 프로그램이지만, BeautifulSoup을 사용하지 않습니다. # In[18]: import pandas as pd import numpy as np import requests import os import datetime, time import s...
mit
7,930,596,444,500,421,000
32.516245
285
0.588216
false
lahosken/pants
contrib/go/src/python/pants/contrib/go/tasks/go_checkstyle.py
1
1900
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sub...
apache-2.0
7,952,592,629,862,693,000
36.254902
98
0.678947
false
lucidfrontier45/RethinkPool
tests/test_pool.py
1
1063
import rethinkdb as r from future.moves.queue import Empty from nose.tools import assert_raises from rethinkpool import RethinkPool def test_pool_create(): max_conns = 50 initial_conns = 10 rp = RethinkPool(max_conns=max_conns, initial_conns=initial_conns) assert rp.current_conns == initial_conns de...
apache-2.0
2,208,437,086,947,595,500
24.309524
79
0.672625
false
dmanatunga/uAMP-sim
trace_reader.py
1
4325
import dateutil import events from sim_interface import TraceReader import json import pickle import gzip class JsonTraceReader(TraceReader): def __init__(self, filename): self.trace_filename = filename self.trace_logs = None self.trace_pos = 0 self.start_time = None self....
mit
-3,759,522,340,739,681,000
27.833333
81
0.578497
false
bt3gl/Numerical-Methods-for-Physics
homework3_linear_algebra_FFT/condition_number/gaussElimination.py
1
2113
""" This module calculates a linear system by Gaussian elimination with pivoting. Almost a copy of on Mike Zingale's code, spring 2013. """ import numpy as npy def gaussElim(A, b): """ perform gaussian elimination with pivoting, solving A x = b A is an NxN matrix, x and b are an N-element vector...
apache-2.0
-48,295,339,072,040,350
26.802632
81
0.550402
false
seem-sky/newspaper
newspaper/nlp.py
1
5105
# -*- coding: utf-8 -*- """ Anything natural language related should be abstracted into this file. """ __title__ = 'newspaper' __author__ = 'Lucas Ou-Yang' __license__ = 'MIT' __copyright__ = 'Copyright 2014, Lucas Ou-Yang' import re import math import operator from collections import Counter from . import settings ...
mit
8,296,216,312,425,050,000
26.446237
77
0.59667
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/idlelib/MultiCall.py
1
14654
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: MultiCall.py """ MultiCall - a class which inherits its methods from a Tkinter widget (Text, for example), but enables multiple calls of functions pe...
unlicense
1,765,385,453,857,526,300
33.64539
152
0.556435
false
d3QUone/wmfe_backend
blueprints/tests.py
1
1650
# TODO: """ # register curl -v -X POST -d 'vkid=3sfddd&recovery_code=12o_pda_iod' http://127.0.0.1:8080/register_user # register with list of vk-friends curl -v -X POST -d 'vkid=id0013j&recovery_code=abc-check-reg&fr=id9616&&fr=id7987&fr=id6530' http://127.0.0.1:8080/register_user # create post curl -v -X POST --coo...
mit
-2,636,871,834,832,690,700
47.529412
190
0.724848
false
ilveroluca/seal
seal/dist_bcl2qseq.py
1
9909
# Copyright (C) 2011-2012 CRS4. # # This file is part of Seal. # # Seal 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. # # Seal is dis...
gpl-3.0
-2,729,236,264,081,831,000
43.635135
136
0.610455
false
vessemer/concept-to-clinic
interface/config/settings/base.py
1
3697
""" Adapted from pydanny/django-cookiecutter Generated by 'django-admin startproject' using Django 1.11.2. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import...
mit
3,250,317,145,646,073,000
25.219858
98
0.675412
false
nicoboss/Floatmotion
OpenGLLibrary/glLibOBJLoad.py
1
3861
import pygame, os from OpenGL.GL import * def MTL(filename): contents = {} mtl = None for line in open(filename, "r"): if line.startswith('#'): continue values = line.split() if not values: continue if values[0] == 'newmtl': mtl = contents[values[1]] = {} ...
agpl-3.0
-8,005,413,216,815,216,000
36.125
79
0.465682
false
akshaybabloo/Python-QT-5-Tutorial
2_QTDesigner/2_8_SimpleFormDesigner/SimpleFormDesigner.py
1
1647
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'SimpleFormDesigner.ui' # # Created by: PyQt5 UI code generator 5.4.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog...
mit
-401,647,907,074,165,570
39.170732
76
0.695811
false
michael-christen/repo-monitor
repo_monitor/python/parsers.py
1
3438
import argparse from .deserializers import CoverageDeserializer from .deserializers import NosetestDeserializer from .deserializers import RadonDeserializer class CoverageParser(object): def __init__(self): self.base_parser = argparse.ArgumentParser( description='Get Python Coverage', ...
mit
3,296,597,069,242,023,400
33.38
77
0.57039
false
aleperno/labotpfinal
src/labo.py
1
1051
#!/usr/bin/python import RPi.GPIO as GPIO import time import sys,os import serial import socket dir = "./log.txt" port = '/dev/ttyACM0' ser = serial.Serial(port,9600) def getTime(): return time.strftime("%Y;%m;%d;%H;%M;%S") def is_valid_number(number): """In this case numbers higher than 100 will be considered s...
gpl-2.0
-4,666,988,098,183,961,000
17.12069
59
0.644148
false
catsop/CATMAID
django/applications/catmaid/tests/apis/test_treenodes.py
1
48018
import json from django.shortcuts import get_object_or_404 from catmaid.control.common import get_relation_to_id_map, get_class_to_id_map from catmaid.models import ClassInstance, ClassInstanceClassInstance, Log from catmaid.models import Treenode, TreenodeClassInstance, TreenodeConnector from catmaid.models import U...
gpl-3.0
4,589,188,642,307,267,000
43.33795
131
0.579887
false
mnestis/advent2015
18/part1.py
1
1208
#!/usr/bin/python import numpy as np import re import itertools def animated_lights(input_string): other_chars = re.compile("[^#\.]") lights = [] for row in input_string.split("\n"): if row == "": continue row = other_chars.sub("", row) row = row.replace("#", "1") ...
mit
-8,158,571,688,017,475,000
22.230769
83
0.56043
false
mozilla-metrics/socorro-toolbox
src/main/python/checkimprovedskiplist.py
1
1764
import sys, os file, = sys.argv[1:] oldsignaturemap = {} newsignaturemap = {} for line in open(file): line = line.rstrip('\n') try: oldsignature, newsignature, count, example = line.split('\t') except ValueError: print >>sys.stderr, "Questionable line: %r" % (line,) continue c...
apache-2.0
-5,036,359,242,503,436,000
29.947368
97
0.663265
false
hjoliver/cylc
tests/unit/test_task_id.py
1
2507
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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 Licen...
gpl-3.0
4,325,459,664,491,436,500
34.309859
78
0.564819
false
arseneyr/essentia
src/examples/python/streaming_extractor/highlevel.py
1
4041
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation ...
agpl-3.0
-1,231,980,796,570,652,200
34.080357
103
0.690423
false
sepol/bp-neural-net
python/runner.py
1
1182
import sys import numpy as np from neuralNet import neuralNet with open('input.txt') as f: inputs = [] for line in f: line = line.split() if line: line = [float(i) for i in line] inputs.append(line) with open('output.txt') as f: outputs = [] for line in f: line = line.split() if line: line = [int...
mit
2,482,796,611,280,662,500
21.301887
78
0.63198
false
idlesign/django-sitemessage
sitemessage/tests/test_messengers.py
1
12035
import pytest from sitemessage.messengers.base import MessengerBase from sitemessage.models import Subscription, DispatchError from sitemessage.toolbox import recipients, schedule_messages, send_scheduled_messages from sitemessage.utils import get_registered_messenger_objects from .testapp.sitemessages import ( WO...
bsd-3-clause
-6,108,604,954,456,369,000
32.901408
111
0.637059
false
plockaby/dart
agent/lib/dart/agent/cli.py
1
1572
""" This is a supervisord event listener. """ import sys import argparse import logging import traceback def main(): parser = argparse.ArgumentParser( prog="dart-agent", formatter_class=argparse.RawTextHelpFormatter, description=__doc__, ) parser.add_argument("--write-configuratio...
artistic-2.0
2,599,248,250,923,130,000
31.081633
140
0.666031
false
hipikat/scow
scow/__main__.py
1
1947
from os import path from fabric.api import env, run, sudo, prefix from fabric.contrib import files as fabric_files import fabtools from . import scow_task, pkgs, users, python, web, db @scow_task def init_droplet(*args, **kwargs): """Set up admin users and a web stack on the droplet""" pkgs.upgrade_packages(...
bsd-2-clause
-1,971,765,330,369,858,600
38.734694
92
0.687211
false
red-hood/calendarserver
contrib/performance/benchmarks/bounded_recurrence.py
1
1816
## # Copyright (c) 2011-2015 Apple 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 applicab...
apache-2.0
3,689,230,688,405,523,000
33.264151
84
0.720815
false
vialectrum/vialectrum
electrum_ltc/gui/kivy/uix/dialogs/lightning_tx_dialog.py
1
3445
import copy from datetime import datetime from decimal import Decimal from typing import NamedTuple, Callable, TYPE_CHECKING from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from kivy.clock import Clock from kivy.uix.label import Label f...
mit
6,040,807,483,877,699,000
30.036036
88
0.520464
false
mbudiu-vmw/hiero
bin/upload-data.py
1
3589
#!/usr/bin/env python # We attempted to make this program work with both python2 and python3 """This script takes a set of files and a cluster configuration describing a set of machines. It uploads the files to the given machines in round-robin fashion. The script can also be given an optional schema file. Th...
apache-2.0
-5,015,177,832,050,948,000
40.732558
102
0.670382
false
reviewboard/reviewboard
reviewboard/reviews/tests/test_review_request_manager.py
2
38511
from __future__ import unicode_literals from django.contrib.auth.models import User from djblets.testing.decorators import add_fixtures from reviewboard.diffviewer.models import DiffSetHistory from reviewboard.reviews.models import (DefaultReviewer, ReviewRequest, ReviewRequest...
mit
-6,242,167,966,362,509,000
39.709302
79
0.540287
false
mpi-sws-rse/thingflow-python
tests/test_linq.py
1
2060
# Copyright 2016 by MPI-SWS and Data-Ken Research. # Licensed under the Apache 2.0 License. """Tests of the linq apis. Pretty much still manually verified, although running it as a part of the automated test suite makes a decent regression test. """ import asyncio import unittest from thingflow.base import * from util...
apache-2.0
7,569,400,810,597,433,000
27.611111
80
0.615534
false
kernevil/samba
python/samba/tests/blackbox/smbcontrol_process.py
1
4652
# Blackbox tests for the smbcontrol fault injection commands # # Copyright (C) Andrew Bartlett <abartlet@samba.org> 2018 # # 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...
gpl-3.0
2,958,449,365,037,097,500
34.242424
79
0.595658
false
zaironne/SnippetDetector
SD_AddSnippet.py
1
4637
""" SD_AddSnippet Add a snippet to local/global database. A new snippet is defined by: - snippet name: directly taken from the name of the function - snippet description: taken from the comment (if there's one) of the function - syntactic and semantic by...
gpl-3.0
6,602,680,185,730,456,000
47.302083
138
0.614622
false
kubeflow/kfp-tekton-backend
components/aws/sagemaker/tests/integration_tests/conftest.py
1
2737
import pytest import boto3 import kfp import os import utils from datetime import datetime def pytest_addoption(parser): parser.addoption( "--region", default="us-west-2", required=False, help="AWS region where test will run", ) parser.addoption( "--role-arn", requ...
apache-2.0
3,486,290,735,644,155,000
27.216495
87
0.685787
false
johngrantuk/piupdue
piupdue/ArduinoFlashEefc.py
1
7591
""" Handles main processor operations. WriteFileToFlash() LoadBuffer() WritePage() EraseFlash() SetBootFlash() Reset() Not sure what all are doing but tests have worked. """ import ArduinoFlashSerial, ArduinoFlashHardValues import ctypes, time, os def WriteFileToFlash(SerialPort, Log, File, IsNativePort): ...
mit
-2,672,416,731,614,591,000
37.538071
247
0.577658
false
zenefits/sentry
src/sentry/web/frontend/debug/mail.py
1
19243
from __future__ import absolute_import, print_function import itertools import logging import time import traceback import uuid from datetime import datetime, timedelta from random import Random import six from django.contrib.webdesign.lorem_ipsum import WORDS from django.core.urlresolvers import reverse from django....
bsd-3-clause
-3,899,513,468,241,302,000
27.298529
115
0.543938
false
sabajt/Dinos-In-Space
endMessage.py
1
25058
""" EndMessage.py message / menu that appears upon completion or failure of puzzle EndMessage.win is where puzzle profile data is modified after completion """ import pygame import dinosInSpace import static56 import infoGraphic56 import tween import soundFx56 import dino56 import dataStorage56 import sna...
mit
-114,837,720,802,108,850
33.997207
143
0.559901
false
DMSalesman/Nemris
nemris.py
1
6514
"""Core of the Nemris tool, APK extractor.""" import argparse import os # Custom modules necessary for Nemris to work from modules import apkutils from modules import configutils from modules import dirutils from modules import pkgutils from modules import utils ########## # Path of the configuratipn file and defau...
unlicense
-1,698,508,673,163,878,700
30.317308
166
0.618514
false
Chiheb-Nexus/Calculatrice-PyGtk
pango_fonts.py
1
3186
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Calculatrice PyGtk # # Copyright 2014 Chiheb Nexus # # 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. #...
gpl-3.0
2,591,903,167,614,648,300
35.895349
106
0.624645
false
pavel-paulau/perfrunner
perfrunner/tests/dcp.py
1
1670
from perfrunner.helpers import local from perfrunner.helpers.cbmonitor import timeit, with_stats from perfrunner.tests import PerfTest class DCPThroughputTest(PerfTest): def _report_kpi(self, time_elapsed: float): self.reporter.post( *self.metrics.dcp_throughput(time_elapsed) ) @...
apache-2.0
-4,941,375,111,631,714,000
28.298246
78
0.610778
false
ToonTownInfiniteRepo/ToontownInfinite
toontown/suit/DistributedSuitBaseAI.py
1
4836
from otp.ai.AIBaseGlobal import * from otp.avatar import DistributedAvatarAI import SuitPlannerBase import SuitBase import SuitDNA from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals class DistributedSuitBaseAI(DistributedAvatarAI.DistributedAvatarAI, SuitBase.SuitBase): ...
mit
-5,873,388,987,407,674,000
25.431694
88
0.605873
false
JMoravec/unkRadnet
fitToCurve/pyeq2/Models_3D/Trigonometric.py
1
38712
# pyeq2 is a collection of equations expressed as Python classes # # Copyright (C) 2012 James R. Phillips # 2548 Vera Cruz Drive # Birmingham, AL 35235 USA # # email: zunzun@zunzun.com # web: http://zunzun.com # # License: BSD-style (see LICENSE.txt in main source directory) # Version info: $Id:...
bsd-3-clause
-6,684,742,983,431,546,000
35.624409
184
0.692524
false
lukaszb/django-guardian
example_project/articles/models.py
2
1851
from django.db import models from django.urls import reverse from guardian.models import GroupObjectPermissionBase, UserObjectPermissionBase class Article(models.Model): title = models.CharField('title', max_length=64) slug = models.SlugField(max_length=64) content = models.TextField('content') crea...
bsd-2-clause
-4,053,829,553,794,031,000
32.053571
87
0.705024
false
joshfriend/sqlalchemy-utils
tests/types/test_weekdays.py
1
1526
from babel import Locale import sqlalchemy as sa from sqlalchemy_utils.types import WeekDaysType from sqlalchemy_utils.primitives import WeekDays from sqlalchemy_utils import i18n from tests import TestCase class WeekDaysTypeTestCase(TestCase): def setup_method(self, method): TestCase.setup_method(self, ...
bsd-3-clause
-6,210,199,919,171,764,000
28.921569
66
0.686107
false
nitely/Spirit
spirit/category/migrations/0001_initial.py
1
1333
# -*- coding: utf-8 -*- from django.db import models, migrations import spirit.core.utils.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(primary_key=...
mit
-5,217,428,606,251,673,000
43.433333
158
0.582146
false
ganeti-github-testing/ganeti-test-1
lib/rpc_defs.py
1
31147
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyri...
bsd-2-clause
-4,034,353,141,925,082,600
43.180142
80
0.654477
false
iproduct/course-social-robotics
11-dnn-keras/venv/Lib/site-packages/pandas/core/dtypes/base.py
1
13190
""" Extend pandas with custom array types. """ from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Type, Union import numpy as np from pandas._typing import DtypeObj from pandas.errors import AbstractMethodError from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries if TYPE_CHECKIN...
gpl-2.0
-4,566,161,597,726,716,000
28.909297
86
0.59022
false
miguelinux/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py
1
10522
## @file # This file is used to define class objects of INF file [LibraryClasses] section. # It will consumed by InfParser. # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the B...
gpl-2.0
-620,824,427,983,713,900
40.588933
114
0.519958
false
atztogo/phonopy
example/Si-gruneisen/Si-gruneisen.py
1
2004
import numpy as np from phonopy import Phonopy, PhonopyGruneisen from phonopy.interface.vasp import read_vasp from phonopy.file_IO import parse_FORCE_SETS def append_band(bands, q_start, q_end): band = [] for i in range(51): band.append(np.array(q_start) + (np.array(q_end) - np.arra...
bsd-3-clause
-4,193,420,619,038,875,000
39.08
76
0.505988
false
danpozmanter/monitor_requests
monitor_requests/__init__.py
1
4730
"""Monitor Requests.""" import datetime import re import sys import traceback import mock from requests.utils import urlparse from .data import DataHandler from .output import OutputHandler __version__ = '2.1.1' class Monitor(object): """Monitor class to handle patching.""" # Libraries which mock requests b...
bsd-3-clause
4,755,888,305,894,752,000
34.56391
86
0.611628
false
gameduell/pysupplies
tests/test_descr.py
1
1053
from supplies.annotate import attr, delay, refer __author__ = 'dwae' class Test: def __init__(self, cnt=0): self.cnt = cnt @attr def foo(self): cnt = self.cnt self.cnt += 1 return cnt @delay def bar(self): cnt = self.cnt self.cnt += 1 retu...
mit
-216,468,087,574,851,420
14.042857
48
0.503324
false
moskytw/mosql
setup.py
2
1363
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages import mosql with open('README.rst', 'rb') as f: README = f.read() # We want README to be a str, no matter it is byte or text. 'rb' reads bytes, # so we need extra conversion on Python 3. On Python 2 bytes is synonym to s...
mit
-8,485,311,383,154,085,000
29.977273
79
0.623624
false
gbrammer/grizli
grizli/fake_image.py
1
17610
""" Tools for generating *very* basic fake images for HST/JWST/Roman simulations """ import os import numpy as np import astropy.io.fits as pyfits import astropy.wcs as pywcs from . import GRIZLI_PATH def rotate_CD_matrix(cd, pa_aper): """Rotate CD matrix Parameters ---------- cd : (2,2) array ...
mit
-2,853,333,402,354,187,300
26.99841
125
0.559966
false
spcui/virt-test
virttest/libvirt_xml/nodedev_xml.py
1
10435
""" Module simplifying manipulation of XML described at http://libvirt.org/formatnode.html """ import os from virttest.libvirt_xml import base, xcepts, accessors class CAPXML(base.LibvirtXMLBase): """ The base class for capability. """ def get_sysfs_sub_path(self): """ return the su...
gpl-2.0
-8,236,994,242,723,432,000
30.717325
79
0.530331
false
galactose/wviews
program/program.py
1
13353
""" program.py: Program structures for worldview solving Copyright (C) 2014 Michael Kelly 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 ...
gpl-3.0
-5,458,440,010,236,815,000
42.353896
95
0.609002
false
reubano/hdxscraper-undp-climate
config.py
1
2244
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ config ~~~~~~ Provides app configuration settings """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from os import path as p BASEDIR = p.dirname(__file__) PARENTDIR = p.dirname(BASEDIR) DB_NAME = ...
mit
-7,815,678,056,294,117,000
28.92
79
0.610517
false
wtpayne/hiai
a3_src/h70_internal/da/lwc/discover.py
1
8741
# -*- coding: utf-8 -*- """ Local working copy path aliasing. --- type: python_module validation_level: v00_minimum protection: k00_public copyright: "Copyright 2016 High Integrity Artificial Intelligence Systems" license: "Licensed under the Apache License, Version 2.0 (the License); you m...
apache-2.0
-1,385,293,988,689,755,400
37.170306
79
0.467795
false
bolkedebruin/airflow
tests/providers/google/cloud/hooks/test_video_intelligence.py
1
4133
# -*- 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 #...
apache-2.0
474,879,580,294,383,170
38.361905
110
0.689814
false
tholum/PiBunny
system.d/library/tools_installer/tools_to_install/responder/Report.py
1
3980
#!/usr/bin/env python # This file is part of Responder, a network take-over set of tools # created and maintained by Laurent Gaffie. # email: laurent.gaffie@gmail.com # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
mit
-430,646,472,000,770,940
40.894737
170
0.691457
false
thriuin/ckan_client_demo
create_open_data.py
1
1540
__author__ = 'Statistics Canada' __copyright__ = 'Crown Copyright, Canada 2014' import urllib2 import simplejson as json # Add a new data set. For this example, we will use the NAICS 2012 dataset from Statistics Canada # Ensure the data set does not already exist. Exit if it does query_data = urllib2.quote(json.dump...
mit
-5,844,206,824,841,157,000
31.083333
97
0.687013
false
android-art-intel/marshmallow
art-extension/tools/perf_analysis/find_hottest.py
1
3556
#!/usr/bin/python import os, sys, csv, operator, heapq def GetMethodName(filename): with open(filename, 'rb') as csvfile: spamreader = csv.reader(csvfile, delimiter=';', quotechar='"') for row in spamreader: for cell in row: return cell def AppendData(filename, data): data[filename] = {} ...
apache-2.0
-1,728,301,882,559,878,000
28.38843
93
0.61108
false
gazhay/kodikast
lukecast.py
1
12945
#!/usr/bin/env python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GLib, GdkPixbuf try: gi.require_version('AppIndicator3', '0.1') from gi.repository import AppIndicator3 as AppIndicator except: from gi.repository import AppIndicator import re,subprocess,socket import urllib....
gpl-3.0
-4,870,596,901,379,037,000
34.368852
178
0.588335
false
angryrancor/kivy
kivy/uix/behaviors.py
1
56965
''' Behaviors ========= .. versionadded:: 1.8.0 This module implements behaviors that can be mixed with existing base widgets. For example, if you want to add a "button" capability to an :class:`~kivy.uix.image.Image`, you could do:: class IconButton(ButtonBehavior, Image): pass This would give you an...
mit
289,419,205,945,449,800
36.926099
79
0.616238
false
hpcc-systems/nagios-monitoring
hpcc-nagios-tools/hpcc_centralized_nagios.py
1
24447
#!/usr/bin/env python3 ############################################################################## # HPCC SYSTEMS software Copyright (C) 2015 HPCC Systems. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtai...
apache-2.0
1,601,087,806,931,783,200
37.804762
166
0.553565
false
dellysunnymtech/bitbake
lib/bb/server/xmlrpc.py
1
13251
# # BitBake XMLRPC Server # # Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer # Copyright (C) 2006 - 2008 Richard Purdie # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This p...
gpl-2.0
-5,845,057,423,331,369,000
33.871053
117
0.622066
false
bplancher/odoo
addons/stock/stock.py
1
300413
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date, datetime from dateutil import relativedelta import json import time import sets import openerp from openerp.osv import fields, osv from openerp.tools.float_utils import float_compare, float_ro...
agpl-3.0
-7,653,917,894,173,250,000
58.807486
420
0.595567
false
TheDSCPL/SSRE_2017-2018_group8
Projeto/Python/cryptopy/crypto/passwords/passwordfactory.py
1
3751
# -*- coding: utf-8 -*- """ crypto.passwords.passwordfactory Python classes to create and recover passwords. Currently contains simple password generation. <need to merge the dictionary based pws> Copyright © (c) 2002 by Paul A. Lambert Read LICENSE.txt for license information. August 14, 2002 ...
mit
-202,067,140,215,519,550
38.484211
94
0.647561
false
mirjalil/ml-visual-recognition
codes/logisticRegression.py
1
3262
import numpy as np import pandas import scipy, scipy.spatial import sklearn import sys from sklearn import linear_model from sklearn.metrics import precision_score, recall_score, f1_score import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('train', help='Training Data') p...
apache-2.0
-325,843,194,361,663,000
28.926606
107
0.598712
false
mitodl/bootcamp-ecommerce
cms/migrations/0025_add_resource_pages_settings.py
1
2756
# Generated by Django 2.2.13 on 2020-06-29 18:27 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("wagtailcore", "0045_assign_unlock_grouppagepermission"), ("cms", "0024_lettertemplatepage"), ] operations ...
bsd-3-clause
-725,346,538,183,442,300
32.204819
69
0.359216
false
cedadev/ndg_security_common
ndg/security/common/openssl.py
1
20390
"""OpenSSL utilities module - contains OpenSSLConfig class for parsing OpenSSL configuration files NERC Data Grid Project """ __author__ = "P J Kershaw" __date__ = "08/02/07" __copyright__ = "(C) 2009 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ =...
bsd-3-clause
2,092,539,897,944,614,100
33.444257
89
0.53384
false
churchlab/millstone
genome_designer/conf/global_settings.py
1
16756
# Django settings for genome_designer project. import logging import os from django.conf import global_settings # EntrezGene wants an email to use it's API. EMAIL = "millstone_user@gmail.com" # The absolute path of the settings.py file's directory. # Useful for settings that require absolute paths like templates. ...
mit
-2,014,074,534,081,506,600
30.795066
107
0.612855
false