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
ianastewart/cwltc-admin
mysite/settings/staging.py
1
3443
from .base import * DEBUG = False LIVE_GO_CARDLESS = False LIVE_MAIL = False SITE_NAME = os.path.basename(__file__).title() env_path = os.path.join(BASE_DIR, ".env") environ.Env.read_env(env_path) INSTALLED_APPS += ["raven.contrib.django.raven_compat"] DATABASES = {"default": env.db_url("DATABASE_URL")} ALLOWED_HO...
mit
1,029,526,716,826,281,500
33.089109
104
0.584084
false
jakevdp/altair
altair/utils/deprecation.py
1
1447
import warnings # import functools class AltairDeprecationWarning(UserWarning): pass def _deprecated(obj, name=None, message=None): """Return a version of a class or function that raises a deprecation warning. Parameters ---------- obj : class or function The object to create a deprecat...
bsd-3-clause
4,549,240,084,075,891,000
29.787234
81
0.583967
false
jamielennox/python-kiteclient
kiteclient/tests/v1/test_esek.py
1
3094
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
-4,911,584,131,548,145,000
34.988372
75
0.621526
false
kd0aij/matrixpilot_old
Tools/MAVLink/MAVProxy/modules/antenna.py
1
2346
#!/usr/bin/env python ''' antenna pointing module Andrew Tridgell June 2012 ''' import sys, os, time sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'cuav', 'lib')) import cuav_util mpstate = None class module_state(object): def __init__(self): self...
gpl-3.0
5,135,345,788,596,944,000
30.583333
104
0.602728
false
AlexV1990/saveall
utils/modconf.py
1
7590
#! /usr/bin/env python3 # coding: utf-8 ''' Fonctions de manipulation et vérifications du fichier de configuration ''' import json import utils.misc as misc CONF_FILE_NAME = "conf/conf.json" ''' check_conf_valid: vérifie que le fichier de conf est bien dans un format json valide entrée: pas d'argument (nom du fich...
mit
-9,037,533,644,414,211,000
25.170139
120
0.655699
false
kubernetes-client/python
kubernetes/client/models/v1alpha1_webhook_throttle_config.py
1
4435
# 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.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
apache-2.0
-7,392,792,150,688,209,000
28.566667
124
0.583089
false
adamcaudill/yawast
yawast/scanner/plugins/http/applications/wordpress.py
1
7344
# Copyright (c) 2013 - 2020 Adam Caudill and Contributors. # This file is part of YAWAST which is released under the MIT license. # See the LICENSE file or go to https://yawast.org/license/ for full license details. import re from typing import Tuple, Union, List, cast from urllib.parse import urljoin from packagi...
mit
6,941,804,610,785,816,000
38.483871
111
0.564134
false
xuru/pyvisdk
pyvisdk/do/cluster_power_on_vm_result.py
1
1098
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def ClusterPowerOnVmResult(vim, *args, **kwargs): '''PowerOnVmResult is the base class of...
mit
4,821,704,323,753,035,000
30.4
124
0.603825
false
cysuncn/python
spark/crm/PROC_M_R_RET_CUST_FLOW.py
1
4734
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_M_R_RET_CUST_FLOW').setMaster(sys.argv[2]) sc = SparkContext(conf = conf) sc....
gpl-3.0
6,747,739,261,989,934,000
42.150943
177
0.580892
false
thomastweets/PythonRSA
GUI_RSA.py
1
15279
############################ ### GUI for RS analysis ### ############################ import wx import rsa import os import webbrowser files_number = 0 class RSA_GUI(wx.Frame): def __init__(self, parent, title): super(RSA_GUI,self).__init__(parent, style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER, title =...
gpl-2.0
8,023,130,351,131,065,000
35.995157
179
0.59729
false
Vijfhoek/oyoyo
oyoyo/cmdhandler.py
1
6875
# Copyright (c) 2008 Duncan Fordyce # 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, distri...
mit
-8,005,940,691,711,680,000
31.429245
85
0.613236
false
RIKSOF/scspell-jenkins
scspell_lib/_util.py
1
1481
############################################################################ # scspell # Copyright (C) 2009 Paul Pelzl # # 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 prog...
gpl-2.0
4,990,107,826,805,204,000
32.659091
76
0.654288
false
robotgear/robotgear
robotgear/settings.py
1
3588
""" Django settings for robotgear project. Generated by 'django-admin startproject' using Django 1.11.7. """ import os INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.static...
mit
421,187,835,858,788,700
21.566038
91
0.62709
false
TheLady/audio-normalize
setup.py
1
1535
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', '') requirements = [ 'docopt', ] test_requirements = [ # '...
mit
-9,072,358,882,392,883,000
25.929825
63
0.605212
false
commonsense/divisi
csc/divisi/flavors.py
1
5345
from csc.divisi.tensor import DictTensor from csc.divisi.ordered_set import OrderedSet from csc.divisi.labeled_view import LabeledView def add_triple_to_matrix(matrix, triple, value=1.0): ''' Adds a triple (left, relation, right) to the matrix in the 2D unfolded format. This is the new add_assertion_tupl...
gpl-3.0
-1,865,229,490,018,606,000
32.198758
82
0.637605
false
moyaproject/moya
moya/elements/registry.py
1
4712
from __future__ import unicode_literals from .. import errors from ..tools import extract_namespace from .. import namespaces from ..compat import itervalues from collections import defaultdict import inspect class Meta(object): logic_skip = False virtual_tag = False is_call = False is_try = False ...
mit
-1,306,243,355,464,368,600
31.951049
82
0.610781
false
cmcqueen/simplerandom
python/python3/simplerandom/iterators/_iterators_py.py
1
40947
from simplerandom._bitcolumnmatrix import BitColumnMatrix __all__ = [ "Cong", "SHR3", "MWC1", "MWC2", "MWC64", "KISS", "KISS2", "LFSR113", "LFSR88", "_traverse_iter", ] def _traverse_iter(o, tree_types=(list, tuple)): """Iterate over nested containers and/or iterators. ...
mit
-5,898,886,228,180,015,000
35.298759
125
0.576945
false
GNOME/gedit-plugins
plugins/commander/modules/align.py
1
8900
# -*- coding: utf-8 -*- # # align.py - align commander module # # Copyright (C) 2010 - Jesse van den Kieboom # # 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 Licens...
gpl-2.0
2,460,157,650,009,915,400
30.448763
190
0.637978
false
Teagan42/home-assistant
homeassistant/components/google_assistant/const.py
1
4660
"""Constants for Google Assistant.""" from homeassistant.components import ( alarm_control_panel, binary_sensor, camera, climate, cover, fan, group, input_boolean, light, lock, media_player, scene, script, sensor, switch, vacuum, ) DOMAIN = "google_assist...
apache-2.0
8,215,510,004,811,099,000
30.486486
80
0.71824
false
LoyolaCSDepartment/LDA-ICPC-2014
topic-models/topic-count/xmlsplit.py
1
1409
#! /usr/bin/env /usr/bin/python3 import os import sys def ensure_dir(f): d = os.path.dirname(f) if not os.path.exists(d): os.makedirs(d) def xmlSplit(infile_name, dest_dir): try: # in_file = open('{0}{1}'.format(folder, filename), 'r', encoding='latin_1') in_file = open(infile_name, 'r', encoding='...
mit
8,342,931,913,768,487,000
25.092593
80
0.582683
false
glennmatthews/cot
COT/vm_description/ovf/hardware.py
1
24156
#!/usr/bin/env python # # hardware.py - OVFHardware class # # June 2016, Glenn F. Matthews # Copyright (c) 2013-2016, 2019 the COT project developers. # See the COPYRIGHT.txt file at the top-level directory of this distribution # and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt. # # This file is pa...
mit
-7,742,814,765,775,915,000
41.603175
79
0.573812
false
vlegoff/tsunami
src/primaires/scripting/config.py
1
2340
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
bsd-3-clause
-3,883,499,589,447,918,600
44.705882
79
0.780352
false
AMOboxTV/AMOBox.LegoBuild
plugin.video.salts/scrapers/izlemeyedeger_scraper.py
1
3982
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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. T...
gpl-2.0
-3,967,336,712,143,353,000
40.479167
165
0.592416
false
jabesq/home-assistant
homeassistant/components/sensibo/climate.py
1
12181
"""Support for Sensibo wifi-enabled home thermostats.""" import asyncio import logging import aiohttp import async_timeout import voluptuous as vol import pysensibo from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice from homeassistant.components.climate.const import ( HVAC_MODE_HEAT_COOL...
apache-2.0
2,443,996,054,491,478,500
33.605114
79
0.605205
false
foyzur/gpdb
gpMgmt/bin/gppylib/test/behave_utils/utils.py
4
64021
#!/usr/bin/env python import re, os, signal, time, filecmp, stat, fileinput import yaml from gppylib.commands.gp import GpStart, chk_local_db_running from gppylib.commands.base import Command, ExecutionError, REMOTE from gppylib.db import dbconn from gppylib.gparray import GpArray, MODE_SYNCHRONIZED from gppylib.operat...
apache-2.0
1,936,188,500,938,947,300
43.489924
246
0.619453
false
nhazekam/cctools
chirp/src/bindings/python/chirp.binding.py
1
22645
## @package ChirpPython # # Python Chirp bindings. # # The objects and methods provided by this package correspond to the native # C API in @ref chirp_reli.h and chirp_swig_wrap.h # # The SWIG-based Python bindings provide a higher-level interface that # revolves around: # # - @ref Chirp.Client # - @ref Chirp.Stat imp...
gpl-2.0
-4,008,700,873,344,837,600
33.678407
118
0.573151
false
kralf/morsel
python/lib/morsel/nodes/ode/solids/mesh.py
1
1092
from morsel.panda import * from morsel.nodes.node import Node from morsel.nodes.ode.object import Object from morsel.nodes.facade import Mesh as _Mesh from morsel.nodes.ode.solid import Solid #------------------------------------------------------------------------------- class Mesh(Solid): def __init__(self, **kar...
gpl-2.0
-6,021,325,268,098,747,000
29.361111
80
0.519231
false
alexhilton/miscellaneous
python/pygrep.py
1
3334
#!/usr/bin/env python """A Python version of grep utility. Search one or more named input files against one ore more given patterns. Print the line containing the match, if there are any. """ from optparse import OptionParser; import re; import fileinput; import os.path; FILENAME = '\033[92m'; LINENO = '\033...
apache-2.0
1,519,449,779,832,885,800
37.321839
118
0.607379
false
tejal29/pants
src/python/pants/base/exceptions.py
1
1226
# coding=utf-8 # Copyright 2014 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) class TaskError(Exc...
apache-2.0
1,081,033,649,883,924,500
31.263158
93
0.692496
false
etkirsch/legends-of-erukar
erukar/content/inventory/weapons/standard/Focus.py
1
1029
import numpy as np from erukar.system.engine.inventory import ArcaneWeapon class Focus(ArcaneWeapon): Probability = 1 BaseName = "Focus" EssentialPart = "devotion" AttackRange = 3 RangePenalty = 3 BaseWeight = 1.0 # Damage DamageRange = [2, 5] DamageType = 'force' DamageModifi...
agpl-3.0
-8,065,563,989,550,132,000
27.583333
138
0.640428
false
agx/git-buildpackage
tests/component/deb/__init__.py
1
1200
# vim: set fileencoding=utf-8 : # # (C) 2012 Intel Corporation <markus.lehtonen@linux.intel.com> # (C) 2013 Guido Günther <agx@sigxcpu.org> # # 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 Foundat...
gpl-2.0
5,091,041,567,779,918,000
37.677419
78
0.731443
false
fishroot/qdeep
lib/qdeep/objects/script/__init__.py
1
6352
# -*- coding: utf-8 -*- __author__ = 'Patrick Michl' __email__ = 'patrick.michl@gmail.com' __license__ = 'GPLv3' import nemoa import qdeep.objects.common from PySide import QtGui, QtCore class Editor(qdeep.objects.common.Editor): objType = 'script' def createCentralWidget(self): self.textArea = Q...
gpl-3.0
-1,445,960,790,410,959,600
37.035928
97
0.614137
false
google-research/language
language/conpono/reconstruct/model_builder.py
1
9078
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
-950,236,350,593,891,800
39.346667
79
0.656753
false
quantosauros/cppyProject
cppy/cybosPlus/cpRqRp/StockOrderCash.py
1
1827
# coding=utf-8 ''' Created on 2016. 8. 14. @author: Jay ''' from cppy.adaptor import CpRqRpClass import win32com.client @CpRqRpClass('CpTrade.CpTd0311') class StockOrderCash(object): ''' 장내주식/코스닥주식/ELW 주문(현금주문) 데이터를 요청하고 수신한다. ''' def __init__(self): self.instCpTdUtil = win32c...
mit
1,099,986,482,034,040,200
26.525424
74
0.544319
false
jieter/f-engrave
application/settings.py
1
9320
import os def cast_boolean(value): if type(value) is bool: return bool(value) elif len(value) > 1: return value == 'True' else: return bool(int(value)) def cast_string(value): value = str(value).strip() value = value.replace('\\n', '\n') # unquote string if value...
gpl-3.0
-4,150,245,928,453,565,400
25.704871
100
0.517275
false
ic-labs/django-icekit
icekit/api/images/serializers.py
1
2783
from django.apps import apps from rest_framework import serializers from rest_framework.settings import api_settings from drf_queryfields import QueryFieldsMixin from icekit.api.base_serializers import WritableSerializerHelperMixin, \ WritableRelatedFieldSettings Image = apps.get_model('icekit_plugins_image.Ima...
mit
2,230,048,733,898,857,700
26.83
78
0.564499
false
rmcauley/rainwave
rainwave/playlist_objects/artist.py
1
5684
from libs import db from libs import config from rainwave.playlist_objects.metadata import ( AssociatedMetadata, MetadataUpdateError, make_searchable_string, ) class Artist(AssociatedMetadata): select_by_name_query = "SELECT artist_id AS id, artist_name AS name FROM r4_artists WHERE lower(artist_name...
gpl-2.0
7,762,295,732,175,003,000
46.764706
257
0.574771
false
roryk/bipy
bipy/toolbox/cutadapt_tool.py
1
5658
"""This module provides an interface to cutadapt with a set of commonly used adapters for trimming """ from bipy.utils import flatten_options, append_stem, flatten, which import subprocess import os from bcbio.utils import safe_makedir, file_exists import sh import yaml import bcbio.provenance.do as do # adapter sequ...
mit
-3,929,628,771,837,746,700
39.705036
77
0.61011
false
dgjnpr/py-junos-eznc
lib/jnpr/junos/factory/view.py
1
8729
import warnings from contextlib import contextmanager from copy import deepcopy from lxml import etree from jnpr.junos.factory.viewfields import ViewFields class View(object): """ View is the base-class that makes extracting values from XML data appear as objects with attributes. """ ITEM_NAME_...
apache-2.0
-8,300,979,280,519,996,000
33.366142
79
0.500745
false
2baOrNot2ba/AntPat
scripts/viewJonespat_dual.py
1
2897
#!/usr/bin/env python """A simple viewer for Jones patterns for dual-polarized representations. """ import argparse import numpy import matplotlib.pyplot as plt from antpat.reps.sphgridfun.pntsonsphere import ZenHemisphGrid from antpat.dualpolelem import DualPolElem, jones2gIXR, IXRJ2IXRM from antpat.reps.hamaker impo...
isc
7,596,389,316,562,434,000
33.488095
78
0.613393
false
bgmerrell/desmod
tests/test_timescale.py
1
1953
import pytest from desmod.timescale import parse_time, scale_time @pytest.mark.parametrize('test_input, expected', [ ('12 s', (12, 's')), ('12s', (12, 's')), ('+12s', (12, 's')), ('-12s', (-12, 's')), ('12.0 s', (12.0, 's')), ('12. s', (12.0, 's')), ('+12.0 s', (12.0, 's')), ('-12.0 s...
mit
-2,659,281,447,644,491,300
24.697368
62
0.453661
false
bourguet/operator_precedence_parsing
operator_precedence.py
1
7999
#! /usr/bin/env python3 import sys import lexer from tree import Node, CompositeNode class SymbolDesc: def __init__(self, symbol, lprio, rprio, evaluator): self.symbol = symbol self.lprio = lprio self.rprio = rprio self.evaluator = evaluator self.value = None def __re...
bsd-2-clause
-1,557,918,058,041,208,000
33.478448
115
0.56182
false
hernandito/SickRage
sickbeard/providers/generic.py
1
26015
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 ...
gpl-3.0
-7,911,745,144,782,687,000
37.944611
189
0.554757
false
diefans/ferment
src/ferment/scripts.py
1
2313
import click import docker from wheezy.template.engine import Engine from wheezy.template.ext.core import CoreExtension from wheezy.template.ext.code import CodeExtension from wheezy.template.loader import DictLoader from . import templates import logging LOG = logging.getLogger(__name__) LOG_LEVELS = { "info...
apache-2.0
-8,682,527,728,291,618,000
22.13
86
0.620406
false
eclee25/flu-SDI-exploratory-age
scripts/create_fluseverity_figs/export_zOR_classif.py
1
10068
#!/usr/bin/python ############################################## ###Python template ###Author: Elizabeth Lee ###Date: 6/18/14 ###Function: Export zOR retrospective and early warning classifications into csv file format (SDI and ILINet, national and regional for SDI) ### Use nation-level peak-based retrospective classi...
mit
-8,794,785,964,571,561,000
58.934524
206
0.698153
false
RoboCupULaval/StrategyIA
ai/GameDomainObjects/ball.py
1
1041
# Under MIT License, see LICENSE.txt from typing import Dict from Util import Position class Ball: def __init__(self, position=Position()): self._position = position self._velocity = Position() def update(self, new_dict: Dict): self.position = new_dict['position'] self.velo...
mit
-1,920,990,554,748,314,000
23.209302
56
0.630163
false
RogerRueegg/lvw-young-talents
src/profiles/views.py
1
2796
from __future__ import unicode_literals from django.views import generic from django.shortcuts import get_object_or_404, redirect from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from . import forms from . import models import datetime class ShowProfile(LoginRequiredMixin,...
mit
7,446,359,648,485,783,000
41.348485
106
0.598927
false
Erotemic/ibeis
super_setup.py
1
26677
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Requirements: pip install gitpython click ubelt """ import re from os.path import exists from os.path import join from os.path import dirname from os.path import abspath import ubelt as ub import functools class ShellException(Exception): """ Raised when s...
apache-2.0
-6,734,773,674,303,073,000
34.009186
125
0.52922
false
ToonTownInfiniteRepo/ToontownInfinite
toontown/toon/GroupPanel.py
1
18189
from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from otp.nametag import NametagGlobals from direct.gui.DirectGui import * from pandac.PandaModules import * from direct.showbase import DirectObject from toontown.toon import ToonAv...
mit
558,389,024,408,593,340
45.164975
415
0.630601
false
nephomaniac/nephoria
nephoria/testcases/boto/ec2/network/net_tests_classic.py
1
95035
#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2009-2011, Eucalyptus Systems, Inc. # All rights reserved. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions # are met: # # Redistri...
bsd-2-clause
1,554,131,369,962,313,500
51.073973
131
0.52729
false
endlessm/chromium-browser
third_party/chromite/scripts/cros_oobe_autoconfig_unittest.py
1
6578
# -*- coding: utf-8 -*- # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for cros_oobe_autoconfig.py""" from __future__ import print_function import json import os import pwd import sys f...
bsd-3-clause
1,724,904,975,207,223,000
36.352273
79
0.65896
false
jonberliner/keras
keras/optimizers.py
1
7022
from __future__ import absolute_import import theano import theano.tensor as T import numpy as np from .utils.theano_utils import shared_zeros, shared_scalar from six.moves import zip def clip_norm(g, c, n): if c > 0: g = T.switch(T.ge(n, c), g * c / n, g) return g def kl_divergence(p, p_hat): ...
mit
6,855,293,725,898,082,000
32.122642
104
0.548277
false
errikos/amtt
amtt/exporter/isograph/__init__.py
1
2915
"""Exporter module for Isograph Availability Workbench.""" import logging import networkx as nx from itertools import count from amtt.translator.ir import component_basename from amtt.exporter import Exporter from amtt.exporter.isograph.emitter.xml import XmlEmitter from amtt.exporter.isograph.rbd import Rbd from amtt...
gpl-3.0
8,075,975,394,118,118,000
39.486111
78
0.64048
false
corredD/upy
autodeskmaya/mayaHelper.py
1
118218
""" Copyright (C) <2010> Autin L. TSRI This file git_upy/autodeskmaya/mayaHelper.py is part of upy. upy 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
-7,838,186,313,154,218,000
39.361557
212
0.542971
false
phenoxim/nova
nova/tests/json_ref.py
1
2271
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
7,998,802,605,201,372,000
35.047619
78
0.625716
false
Insoleet/mirage
example.py
1
1205
import asyncio import logging from duniterpy.documents import BlockUID from mirage import Node, User async def example(lp): node = await Node.start(4444, "testnet", "12356", "123456", lp) alice = User.create("testnet", "alice", "alicesalt", "alicepassword", BlockUID.empty()) bob = User.create("testnet", "b...
gpl-3.0
-2,815,379,753,276,030,000
35.515152
91
0.692946
false
claytantor/coinbase4py
webapp/settings.py
1
4533
import os from ConfigParser import RawConfigParser BASE_DIR = os.path.dirname(os.path.dirname(__file__)) PROJECT_DIR = os.path.dirname(__file__) CONF_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x) # you will need to copy...
apache-2.0
6,435,432,027,036,842,000
33.869231
86
0.701302
false
KeplerGO/kadenza
setup.py
1
1430
#!/usr/bin/env python import os import sys from setuptools import setup # Prepare and send a new release to PyPI if "release" in sys.argv[-1]: os.system("python setup.py sdist") os.system("twine upload dist/*") os.system("rm -rf dist/kadenza*") sys.exit() # Load the __version__ variable without import...
mit
1,101,567,395,859,211,800
31.5
73
0.61049
false
rddim/Notepad-plus-plus
scintilla/qt/ScintillaEdit/WidgetGen.py
5
8222
#!/usr/bin/env python3 # WidgetGen.py - regenerate the ScintillaWidgetCpp.cpp and ScintillaWidgetCpp.h files # Check that API includes all gtkscintilla2 functions import sys import os import getopt scintillaDirectory = "../.." scintillaScriptsDirectory = os.path.join(scintillaDirectory, "scripts") sys.path....
gpl-3.0
-2,808,446,952,764,096,500
28.679104
114
0.610071
false
rdmorganiser/rdmo
rdmo/projects/tests/test_view_project_update_import.py
1
14683
import os import re from pathlib import Path import pytest from django.urls import reverse from rdmo.core.constants import VALUE_TYPE_FILE from ..models import Project, Value users = ( ('owner', 'owner'), ('manager', 'manager'), ('author', 'author'), ('guest', 'guest'), ('user', 'user'), ('s...
apache-2.0
2,661,007,531,408,466,000
37.03886
122
0.643397
false
encukou/freeipa
ipatests/test_cmdline/test_help.py
4
5658
# Authors: Petr Viktorin <pviktori@redhat.com> # # Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information # # 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 vers...
gpl-3.0
-383,832,913,949,688,060
31.147727
79
0.65783
false
neocogent/electrum
setup.py
1
3017
#!/usr/bin/env python3 # python setup.py sdist --format=zip,gztar import os import sys import platform import importlib.util import argparse import subprocess from setuptools import setup, find_packages from setuptools.command.install import install MIN_PYTHON_VERSION = "3.6.1" _min_python_version_tuple = tuple(map...
mit
6,636,443,891,689,976,000
31.095745
94
0.640371
false
M4rtinK/tsubame
core/platform/base_platform_module.py
1
8584
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Base class for Tsubame platform modules. #---------------------------------------------------------------------------- # Copyright 2017, Martin Kolman # # This program is free software: you can redistribute it and/or...
gpl-3.0
-3,431,817,031,588,530,700
33.894309
95
0.612069
false
JazzeYoung/VeryDeepAutoEncoder
theano/tensor/tests/test_extra_ops.py
1
36192
from __future__ import absolute_import, print_function, division import numpy as np import numpy import theano from theano.tests import unittest_tools as utt from theano.tensor.extra_ops import (SearchsortedOp, searchsorted, CumsumOp, cumsum, CumprodOp, cumprod, ...
bsd-3-clause
-2,868,292,713,453,321,000
39.573991
111
0.475851
false
avlach/univbris-ocf
vt_manager/src/python/vt_manager/communication/sfa/util/callids.py
2
2280
#!/usr/bin/python import threading import time #from vt_manager.communication.sfa.util.sfalogging import logger """ Callids: a simple mechanism to remember the call ids served so fas memory-only for now - thread-safe implemented as a (singleton) hash 'callid'->timestamp """ debug=False class _call_ids_impl (dict):...
bsd-3-clause
5,228,022,733,388,344,000
30.666667
115
0.578509
false
openweave/openweave-core
src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_48.py
1
3501
#!/usr/bin/env python3 # # Copyright (c) 2016-2017 Nest Labs, 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/lic...
apache-2.0
-7,304,782,260,674,297,000
45.065789
161
0.628106
false
live-clones/dolfin-adjoint
timestepping/python/timestepping/pre_assembled_equations.py
1
21818
#!/usr/bin/env python2 # Copyright (C) 2011-2012 by Imperial College London # Copyright (C) 2013 University of Oxford # Copyright (C) 2014-2016 University of Edinburgh # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by ...
lgpl-3.0
5,529,168,736,928,071,000
45.619658
189
0.534788
false
trnewman/VT-USRP-daughterboard-drivers_python
gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py
1
3066
#!/bin/env python # -*- python -*- # # Copyright 2003 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
gpl-3.0
2,011,145,555,511,358,200
23.141732
98
0.616765
false
Hiestaa/3D-Lsystem
Vector.py
1
1792
class Vector: """represente un vecteur 3d""" def __init__(self, arg = (0, 0, 0)): self.x = float(arg[0]) self.y = float(arg[1]) self.z = float(arg[2]) def set(self, val): if isinstance(val, self.__class__): self.x = val.x self.y = val.y self.z = val.z else: self.x = val[0] self.y = val[1] ...
mit
-1,565,978,637,445,939,500
24.985507
74
0.582589
false
SymbiFlow/prjxray
minitests/litex/uart_ddr/arty/scripts/arty.py
1
4274
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC # This file is Copyright (c) 2015-20...
isc
-8,789,639,174,733,908,000
32.920635
100
0.535564
false
kapil1garg/eecs338-chris-jones
show_query.py
1
3440
import json import elastic from operator import itemgetter from default_query import DefaultQuery class ShowQuery(DefaultQuery): """ Handles ES queries related to shows """ def __init__(self): DefaultQuery.__init__(self) def generate_response_best_show(self, query, annotated_query): ...
mit
2,222,587,426,113,204,000
34.102041
117
0.386628
false
jakevdp/altair
altair/utils/server.py
1
4035
""" A Simple server used to show altair graphics from a prompt or script. This is adapted from the mpld3 package; see https://github.com/mpld3/mpld3/blob/master/mpld3/_server.py """ import sys import threading import webbrowser import socket import itertools import random from ._py3k_compat import server, IO JUPYTER_...
bsd-3-clause
4,777,088,075,087,904,000
29.11194
78
0.603965
false
CWDoherty/Baseball
Scripts/hashtags.py
1
1999
''' Copyright (c) 2015 Chris Doherty, Oliver Nabavian 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, publi...
mit
-4,705,462,326,985,644,000
26.013514
77
0.722361
false
karesansui/karesansui
karesansui/gadget/hostby1staticroute.py
1
6419
# -*- coding: utf-8 -*- # # This file is part of Karesansui. # # Copyright (C) 2009-2012 HDE, Inc. # # 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 lim...
mit
270,860,576,896,063,070
33.326203
119
0.581087
false
dlu-ch/dlb
test/dlb_contrib/test_git.py
1
21925
# SPDX-License-Identifier: LGPL-3.0-or-later # dlb - a Pythonic build tool # Copyright (C) 2020 Daniel Lutz <dlu-ch@users.noreply.github.com> import testenv # also sets up module search paths import dlb.di import dlb.fs import dlb.ex import dlb_contrib.generic import dlb_contrib.git import dlb_contrib.sh import os.pa...
gpl-3.0
9,056,215,447,418,423,000
42.39604
116
0.592015
false
LCOGT/whatsup
whatsup/urls.py
1
1040
""" WhatsUP: astronomical object suggestions for Las Cumbres Observatory Global Telescope Network Copyright (C) 2014-2015 LCOGT urls.py 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...
gpl-3.0
-5,789,981,566,066,620,000
36.142857
93
0.749038
false
holytortoise/abwreservierung
src/reservierung/views.py
1
19052
from django.shortcuts import render from django.views.generic import TemplateView, ListView, DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView, FormView from django.views.generic.dates import WeekArchiveView from django.urls import reverse_lazy, reverse from django.contrib.auth.mixins ...
mit
3,023,080,012,261,107,700
52.847025
169
0.476378
false
alexhersh/calico
calico/common.py
1
22270
# -*- coding: utf-8 -*- # Copyright (c) 2014, 2015 Metaswitch Networks # 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/licen...
apache-2.0
5,901,292,691,446,355,000
35.094003
106
0.598563
false
sternb0t/django-pandas
django_pandas/io.py
1
3578
import pandas as pd from .utils import update_with_verbose import django def to_fields(qs, fieldnames): for fieldname in fieldnames: model = qs.model for fieldname_part in fieldname.split('__'): try: field = model._meta.get_field(fieldname_part) except djang...
bsd-3-clause
5,211,177,889,404,389,000
36.663158
101
0.602571
false
Urumasi/Flask-Bones
app/data/models/oauth.py
1
5170
from flask_login import UserMixin from app.extensions import cache ,bcrypt import bcrypt as bcr from .. import db from ..mixins import CRUDMixin import datetime from rauth import OAuth1Service, OAuth2Service from flask import current_app, url_for, request, redirect, session class Oauth(CRUDMixin, UserMixin, db.Model)...
mit
-6,923,497,179,262,909,000
37.303704
94
0.589555
false
ResEl-TB/stages
search/tests.py
1
2810
from django.test import TestCase from django.contrib.auth.models import User from django.core.urlresolvers import reverse from post.models import Zone, Duree, Domaine, TypeContrat, Annonce from .forms import SearchForm class SearchForms(TestCase): def setUp(self): zone = Zone.objects.create(nom='île-de-fr...
gpl-2.0
-17,203,318,458,574,098
38.507042
74
0.634451
false
elainenaomi/sciwonc-dataflow-examples
sbbd2016/experiments/1-postgres/3_workflow_full_10files_primary_nosh_nors_annot_with_proj_3s/pegasus.bDkvI/pegasus-4.6.0/lib/python2.7/dist-packages/Pegasus/monitoring/notifications.py
1
34263
""" Class for managing notifications in pegasus-monitord. """ ## # Copyright 2007-2011 University Of Southern California # # 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.a...
gpl-3.0
1,688,029,379,072,213,500
43.096525
118
0.516038
false
amolenaar/gaphor
gaphor/tests/testcase.py
1
5292
""" Basic test case for Gaphor tests. Everything is about services so the TestCase can define it's required services and start off. """ import logging import unittest from io import StringIO from typing import Type, TypeVar from gaphas.aspect import ConnectionSink from gaphas.aspect import Connector as ConnectorAspe...
lgpl-2.1
5,051,515,213,022,079,000
27.605405
85
0.612245
false
xorpaul/shinken
test/test_poller_addition.py
1
10776
#!/usr/bin/env python # Copyright (C) 2009-2010: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken 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 F...
agpl-3.0
-7,498,535,806,700,508,000
32.780564
107
0.62964
false
fintech-circle/edx-platform
lms/djangoapps/instructor_task/tests/test_tasks.py
1
23409
""" Unit tests for LMS instructor-initiated background tasks. Runs tasks on answers to course problems to validate that code paths actually work. """ from functools import partial import json from uuid import uuid4 from celery.states import SUCCESS, FAILURE import ddt from django.utils.translation import ugettext_no...
agpl-3.0
-2,608,810,769,016,951,000
43.167925
133
0.644538
false
asajeffrey/servo
tests/wpt/web-platform-tests/tools/lint/rules.py
3
15945
from __future__ import unicode_literals import abc import inspect import os import re import six MYPY = False if MYPY: # MYPY is set to True when run under Mypy. from typing import Any, List, Match, Optional, Pattern, Text, Tuple, cast Error = Tuple[Text, Text, Text, Optional[int]] def collapse(text): ...
mpl-2.0
8,087,864,830,403,340,000
29.084906
127
0.64804
false
GuillaumeDD/AdventOfCode2016
day08.py
1
5304
from __future__ import print_function # print utilities without systematic '\n' at EOL import io import re # --- Day 8: Two-Factor Authentication --- # # You come across a door implementing what you can only assume is an # implementation of two-factor authentication after a long game of # requirements telephone. # # T...
gpl-3.0
-4,303,923,578,873,608,000
30.760479
113
0.614065
false
nispc/ckanext-data_recommendation
ckanext/data_recommendation/plugin.py
1
2619
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from ckan.plugins.toolkit import asbool import jieba import jieba.analyse from ckan.plugins.toolkit import request, c import pylons.config as config import opencc class Data_RecommendationPlugin(plugins.SingletonPlugin): plugins.implements(plugi...
agpl-3.0
-2,626,176,818,953,822,000
38.104478
127
0.623902
false
tomlepaine/bottle-skeleton
app.py
1
1076
import argparse from bottle import get, run, response, static_file, redirect from jinja2 import Environment, PackageLoader import config parser = argparse.ArgumentParser(prog=config.name, description=config.description) parser.add_argument('--port', type=int, ...
bsd-2-clause
3,597,068,652,393,336,000
19.692308
64
0.620818
false
whiteclover/Breeze
breeze/chatcenter/room.py
1
1148
import time import logging LOGGER = logging.getLogger(__name__) class Room(object): def __init__(self, name): self.name = name self.peers = {} def broadcast(self, msg): if msg: for peer in self.peers.values(): if peer != msg.user: LOGGER.info('peer: %s', peer) peer.send(msg) def add_peer(s...
gpl-2.0
-523,038,310,736,264,300
19.5
50
0.658537
false
mhumeSF/ansible-container
setup.py
1
3215
import os import sys import shlex import shutil from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand from setuptools.command.sdist import sdist as SDistCommand from pip.req import parse_requirements import container class PlaybookAsTests(TestCommand): user_options = ...
lgpl-3.0
496,850,982,274,389,440
33.202128
102
0.602488
false
googleapis/python-dialogflow
tests/unit/gapic/dialogflow_v2beta1/test_entity_types.py
1
136892
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
1,280,790,098,019,071,000
37.659136
118
0.662362
false
blockstack/blockstack-server
integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_stacks_sendtokens_interleaved.py
1
5075
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Blockstack ~~~~~ copyright: (c) 2014-2015 by Halfmoon Labs, Inc. copyright: (c) 2016 by Blockstack.org This file is part of Blockstack Blockstack is free software: you can redistribute it and/or modify it under the terms of the GNU General...
gpl-3.0
-52,505,558,049,126,810
38.96063
203
0.703645
false
ge0rgi/cinder
cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_delete_snapshot.py
1
3977
# Copyright (c) 2013 - 2015 EMC Corporation. # 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 # # Unle...
apache-2.0
8,501,585,848,030,189,000
40.863158
78
0.602967
false
rafafigueroa/compass-gait
hasimpy.py
1
9216
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Rafael Figueroa """ dp = True import numpy as np DEBUG = False class H: """Hybrid Automata Model""" def __init__(self, Q, Init_X, Init_qID, state_names = None): self.q = Q #list of q self.Init_X = Init_X self.Init_qID = Init_q...
gpl-2.0
5,182,060,363,343,078,000
26.927273
73
0.513129
false
scribusproject/scribus-tools
md_import.py
1
1176
run_script = True import scribus from tempfile import NamedTemporaryFile try: import markdown except: scribus.messageBox('python-markdown not installed', 'You need to install python-markdown for this script to work', scribus.ICON_WARNING) run_script = False run_script &= bool(scribus.getSelectedObjec...
gpl-3.0
-3,829,810,779,273,234,400
24.565217
93
0.643707
false
bruderstein/PythonScript
PythonLib/full/distutils/tests/__init__.py
3
1344
"""Test suite for distutils. This test suite consists of a collection of test modules in the distutils.tests package. Each test module has a name starting with 'test' and contains a function test_suite(). The function is expected to return an initialized unittest.TestSuite instance. Tests for the command classes in...
gpl-2.0
7,258,331,073,946,869,000
32.6
79
0.69494
false
tuxerman/cdn-old
cdn/openstack/common/log.py
1
19790
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may ...
apache-2.0
4,749,787,018,201,120,000
34.402504
78
0.595856
false
Code4SA/pmgbilltracker
pmg_scrapers/pmg/scrape_pdf.py
1
2621
import requests import json import os import tempfile import re url = "http://db3sqepoi5n3s.cloudfront.net/files/pmb5_2013.pdf" url = "http://db3sqepoi5n3s.cloudfront.net/files/130416pmb3-2013.pdf" url = "http://db3sqepoi5n3s.cloudfront.net/files/131031b18b-2013.pdf" url = "http://db3sqepoi5n3s.cloudfront.net/files/13...
apache-2.0
1,909,753,005,026,915,800
25.474747
100
0.638688
false
xmdy/ibstats
src/stats/models.py
1
1877
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext as _ import random def get_random_value(start=100, end=100000): def get_random(): return random.randint(start, end) * 0.01 return get_random class Trader(models.Model): name = model...
gpl-3.0
-8,023,529,222,036,301,000
34.433962
105
0.639851
false