code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
from __future__ import absolute_import, division, print_function import numpy as np from matplotlib.colors import Normalize from matplotlib.collections import LineCollection from mpl_scatter_density import ScatterDensityArtist from astropy.visualization import (ImageNormalize, LinearStretch, SqrtStretch, ...
stscieisenhamer/glue
glue/viewers/scatter/layer_artist.py
Python
bsd-3-clause
18,014
# This script calculates how many error reports are in each subdirectory # and how many error reports are in total. # Edit in_dir and out_file parameters as you need. import os in_dir = "D:/Projects/CrashRpt/valid_reports" out_file = "stats.txt" f = open(out_file, "w") def get_txt_file_count(dirname): count = 0...
BeamNG/crashrpt
processing/scripts/basic_stats.py
Python
bsd-3-clause
1,335
import json from datetime import datetime from dojo.models import Finding class MeterianParser(object): def get_scan_types(self): return ["Meterian Scan"] def get_label_for_scan_types(self, scan_type): return scan_type def get_description_for_scan_types(self, scan_type): return...
rackerlabs/django-DefectDojo
dojo/tools/meterian/parser.py
Python
bsd-3-clause
5,223
#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import time output = sys.argv[1] persistoutput = "%s.persist" % sys.argv[1] count = 0 try: count = open(persist...
Jet-Streaming/gyp
test/actions/src/subdir1/counter.py
Python
bsd-3-clause
1,151
from setuptools import setup, find_packages import os import cms CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independ...
nimbis/django-cms
setup.py
Python
bsd-3-clause
1,639
#----------------------------------------------------------------------------- # Copyright (c) 2014, HFTools Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------------------------------...
hftools/hftools
hftools/networks/tests/test_spar_functions.py
Python
bsd-3-clause
3,696
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "django-pressroom", version = "0.4.2.1", url = 'https://github.com/petry/django-pressroom', license = 'BSD', description = "A pressroom applic...
petry/django-pressroom-googlecode
setup.py
Python
bsd-3-clause
1,034
# This file is part of Viper - https://github.com/botherder/viper # See the file 'LICENSE' for copying permission. import getopt try: import pyclamd HAVE_CLAMD = True except ImportError: HAVE_CLAMD = False from viper.common.out import * from viper.common.abstracts import Module from viper.core.session im...
LMSlay/wiper
modules/clamav.py
Python
bsd-3-clause
2,875
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models from sentry.utils.query import RangeQuerySetWrapperWithProgressBar class Migration(DataMigration): # Flag to indicate if this migration is too risky ...
mvaled/sentry
src/sentry/south_migrations/0408_identity_provider_external_id.py
Python
bsd-3-clause
105,752
# Import the Evernote client from evernote.api.client import EvernoteClient # Import the Evernote note storetypes to get note datatypes # to properly get note/tag counts (note filter) import evernote.edam.notestore.ttypes as NoteStoreTypes # Define access token either: # Developer Tokens (https://dev.evernote.com/do...
matthewayne/evernote-sdk-python
sample/all_methods/findNoteCounts.py
Python
bsd-3-clause
2,735
import datetime import re from django.http import HttpResponse from django.utils.http import urlencode import smsgateway from smsgateway.models import SMS from smsgateway.backends.base import SMSBackend from smsgateway.utils import check_cell_phone_number class MobileWebBackend(SMSBackend): def get_send_url(self...
peterayeni/django-smsgateway
smsgateway/backends/mobileweb.py
Python
bsd-3-clause
2,600
# -*-coding:Utf-8 -* # Copyright (c) 2013 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 # lis...
stormi/tsunami
src/secondaires/navigation/equipage/ordres/virer.py
Python
bsd-3-clause
3,807
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Handling of the <message> element. ''' from __future__ import print_function import re import six from grit.node import base from grit import cli...
endlessm/chromium-browser
tools/grit/grit/node/message.py
Python
bsd-3-clause
12,578
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'trainergui.ui' # # Created: Tue May 24 14:29:31 2016 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Att...
MatthewVerbryke/inmoov_ros
inmoov_tools/trainer/trainergui.py
Python
bsd-3-clause
13,132
#!/usr/bin/env python # Copyright (c) 2014, Bo Tian <tianbo@gmail.com> # 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 copyright notice, ...
btian/market_correlator
extract_symbols.py
Python
bsd-3-clause
2,097
# -*- coding: utf-8 -*- # Copyright (c) 2016, Germán Fuentes Capella <development@fuentescapella.com> # BSD 3-Clause License # # Copyright (c) 2017, Germán Fuentes Capella # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
germfue/vps-tools
tests/console_tests.py
Python
bsd-3-clause
2,784
__author__ = 'Tom Schaul, tom@idsia.ch' from random import choice from scipy import zeros from twoplayergame import TwoPlayerGame # TODO: undo operation class CaptureGame(TwoPlayerGame): """ the capture game is a simplified version of the Go game: the first player to capture a stone wins! Pass moves are f...
daanwierstra/pybrain
pybrain/rl/environments/twoplayergames/capturegame.py
Python
bsd-3-clause
9,101
"""Two different implementations of merge sort. First one is the standard sort that creates the result to new list on each level. Second one is an in-place sort that uses two alternating buffers and offsets to limit memory usage to O(2n). """ def sort(lst): """Standard merge sort. Args: lst: List to ...
niemmi/algolib
algolib/sort/merge_sort.py
Python
bsd-3-clause
2,137
import os import unittest import vtk, qt, ctk, slicer import math import sys # # AstroMomentMapsSelfTest # class AstroMomentMapsSelfTest: def __init__(self, parent): parent.title = "Astro MomentMaps SelfTest" parent.categories = ["Testing.TestCases"] parent.dependencies = ["AstroVolume"] parent.cont...
Punzo/SlicerAstro
AstroMomentMaps/Testing/Python/AstroMomentMapsSelfTest.py
Python
bsd-3-clause
6,817
# -*- coding: utf-8 -*- """ Display network speed and bandwidth usage. Configuration parameters: cache_timeout: refresh interval for this module (default 2) format: display format for this module *(default '{nic} [\?color=down LAN(Kb): {down}↓ {up}↑] [\?color=total T(Mb): {download}↓ {upload}↑ ...
alexoneill/py3status
py3status/modules/netdata.py
Python
bsd-3-clause
5,963
# django imports from django.db import models from django.utils.translation import ugettext_lazy as _ # lfs imports from lfs.catalog.models import Product from lfs.order.models import Order class Topseller(models.Model): """Selected products are in any case among topsellers. """ product = models.ForeignK...
lichong012245/django-lfs-0.7.8
lfs/marketing/models.py
Python
bsd-3-clause
1,567
from collections import namedtuple from corehq.apps.change_feed.consumer.feed import KafkaChangeFeed from corehq.apps.change_feed.document_types import GROUP from corehq.apps.groups.models import Group from corehq.elastic import stream_es_query, get_es_new, ES_META from corehq.pillows.mappings.user_mapping import USER_...
qedsoftware/commcare-hq
corehq/pillows/groups_to_user.py
Python
bsd-3-clause
4,115
# Created By: Virgil Dupras # Created On: 2004/12/20 # Copyright 2011 Hardcoded Software (http://www.hardcoded.net) # This software is licensed under the "BSD" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licenses...
hsoft/jobprogress
jobprogress/job.py
Python
bsd-3-clause
6,167
from sympy import symbols, Symbol, sinh, nan, oo, zoo, pi, asinh, acosh, log, sqrt, \ coth, I, cot, E, tanh, tan, cosh, cos, S, sin, Rational, atanh, acoth, \ Integer, O, exp, sech, sec, csch from sympy.utilities.pytest import raises def test_sinh(): x, y = symbols('x,y') k = Symbol('k', integer=Tru...
Mitchkoens/sympy
sympy/functions/elementary/tests/test_hyperbolic.py
Python
bsd-3-clause
22,379
# -*- coding: utf-8 -*- DEBUG = True TESTING = True SECRET_KEY = 'SECRET_KEY' DATABASE_URI = 'mysql+pymysql://root:root@127.0.0.1/git_webhook' CELERY_BROKER_URL = 'redis://:@127.0.0.1:6379/0' CELERY_RESULT_BACKEND = 'redis://:@127.0.0.1:6379/0' SOCKET_MESSAGE_QUEUE = 'redis://:@127.0.0.1:6379/0' GITHUB_CLIENT_ID = '...
NetEaseGame/git-webhook
app/config_test.py
Python
mit
357
# References: # # https://www.tensorflow.org/guide/low_level_intro # # only needed for python 2.7 # from __future__ import absolute_import # from __future__ import division # from __future__ import print_function import numpy as np from numpy import array from numpy import float32 # a complete input set on 7 bits # ...
WmHHooper/aima-python
submissions/aardvark/myNN.py
Python
mit
8,182
from sqlalchemy.orm import create_session, relationship, mapper, \ contains_eager, joinedload, subqueryload, subqueryload_all,\ Session, aliased, with_polymorphic from sqlalchemy import Integer, String, ForeignKey from sqlalchemy.engine import default from sqlalchemy.testing import AssertsCompiledSQL, fixture...
michaelBenin/sqlalchemy
test/orm/inheritance/test_relationship.py
Python
mit
53,676
from flappy.display3d.vertexbuffer3d import VertexBuffer3D, VertexBuffer3DFormat from flappy.display3d.indexbuffer3d import IndexBuffer3D from flappy.display3d.program3d import Program3D from flappy.display3d.texture import Texture from flappy.display3d.scene3d import Scene3D
wannaphongcom/flappy
flappy/display3d/__init__.py
Python
mit
279
#!/usr/bin/env python # =================================== # Copyright (c) Microsoft Corporation. All rights reserved. # See license.txt for license information. # =================================== import socket import os import sys import imp import md5 import sha import codecs import base64 import platform import...
MSFTOSSMgmt/WPSDSCLinux
Providers/Scripts/2.4x-2.5x/Scripts/nxOMSAgentNPMConfig.py
Python
mit
15,607
from bitfinex.client import Client, TradeClient
laisee/bitfinex
bitfinex/__init__.py
Python
mit
48
from . import tests from . import defaults from .scripting import ( registeredTests, testGlyph, testLayer, testFont, formatGlyphReport, formatLayerReport, formatFontReport )
typesupply/glyph-nanny
source/code/glyphNanny/__init__.py
Python
mit
201
import unittest from frappe.model.base_document import BaseDocument class TestBaseDocument(unittest.TestCase): def test_docstatus(self): doc = BaseDocument({"docstatus": 0}) self.assertTrue(doc.docstatus.is_draft()) self.assertEquals(doc.docstatus, 0) doc.docstatus = 1 self.assertTrue(doc.docstatus.is_su...
frappe/frappe
frappe/tests/test_base_document.py
Python
mit
476
#### 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 = Tangible() result.template = "object/tangible/ship/components/engine/shared_eng_moncal_ifs32.iff" result.attribut...
anhstudios/swganh
data/scripts/templates/object/tangible/ship/components/engine/shared_eng_moncal_ifs32.py
Python
mit
477
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
tkelman/utf8rewind
tools/gyp/pylib/gyp/mac_tool.py
Python
mit
26,881
EXCEPTION_INFO = 'exception_info' MESSAGE = 'message' PAYLOAD = 'payload' _event_handlers = { EXCEPTION_INFO: [], MESSAGE: [], PAYLOAD: [] } def _check_type(typ): if typ not in _event_handlers: raise ValueError('Unknown type: %s. Must be one of %s' % (typ, _event_handlers.keys())) def _add_...
rollbar/pyrollbar
rollbar/lib/events.py
Python
mit
1,970
def bigdigits(line_splitted): line_splitted = list(line_splitted) string_row_one = '-**----*--***--***---*---****--**--****--**---**--' list_row_one = list(string_row_one) string_row_two = '*--*--**-----*----*-*--*-*----*-------*-*--*-*--*-' list_row_two = list(string_row_two) string_row_three = '*--*---*---...
Lhedzv/Coding_Wednesdays
bigdigits.py
Python
mit
1,512
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models faq_en = ''' <p> <b>Why statistics on the site does not coincide with the statistics in the game?</b> </p> <p> Algorithms collection statistics IL2 stats differs from statistics in-game. As a consequence of these...
Flyingfox646/flyingfox
src/chunks/migrations/0004_faq_fairplay.py
Python
mit
5,970
# AnalogClock's font selector for setup dialog # E. A. Tacao <e.a.tacao |at| estadao.com.br> # http://j.domaindlx.com/elements28/wxpython/ # 15 Fev 2006, 22:00 GMT-03:00 # Distributed under the wxWidgets license. import wx from wx.lib.newevent import NewEvent from wx.lib.buttons import GenButton #----...
ktan2020/legacy-automation
win/Lib/site-packages/wx-3.0-msw/wx/lib/analogclock/lib_setup/fontselect.py
Python
mit
1,713
from sofi.ui import TableRow def test_basic(): assert(str(TableRow()) == "<tr></tr>") def test_text(): assert(str(TableRow("text")) == "<tr>text</tr>") def test_custom_class_ident_style_and_attrs(): assert(str(TableRow("text", cl='abclass', ident='123', style="font-size:0.9em;", attrs={"data-test": 'abc'...
tryexceptpass/sofi
test/tablerow_test.py
Python
mit
429
#!/usr/bin/env python # -*- coding: utf-8 -*- import os SITE_ROOT = os.path.dirname(os.path.abspath(__file__)) DEBUG = True # 调试模式 TEMPLATE_DIR = os.path.join(SITE_ROOT, 'templates') # 模板目录 BASE_TEMPLATE = 'base' # 基础模板 # URL 映射 URLS = ( '/', 'Index', '(/j)?/shorten', 'Shorten', '/([0-9a-zA-Z]{5,})',...
mozillazg/ShortURL
shorturl/settings.py
Python
mit
569
import csv from meerkat_abacus.config import config def data_types(param_config=config): with open(param_config.config_directory + param_config.country_config["types_file"], "r", encoding='utf-8', errors="replace") as f: DATA_TYPES_DICT = [_dict for _dict in csv.DictReader(f)]...
who-emro/meerkat_abacus
meerkat_abacus/util/data_types.py
Python
mit
555
class Options: instance = None def __init__(self,options): self.options = options @classmethod def set(cls,options): """Create an Options instance with the provided dictionary of options""" cls.instance = Options(options) @classmethod def inst(cls): ...
sumyfly/vdebug
plugin/python/vdebug/opts.py
Python
mit
1,365
from __future__ import absolute_import import logging import warnings from pip.basecommand import Command from pip.exceptions import DistributionNotFound from pip.index import PackageFinder from pip.req import InstallRequirement from pip.utils import get_installed_distributions, dist_is_editable from pip.utils.deprec...
Carreau/pip
pip/commands/list.py
Python
mit
7,507
""" homeassistant.components.graphite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Component that records all events and state changes and feeds the data to a graphite installation. For more details about this component, please refer to the documentation at https://home-assistant.io/components/graphite/ """ import logging import...
coteyr/home-assistant
homeassistant/components/graphite.py
Python
mit
5,000
# Time: O(n) # Space: O(n) # Given a binary tree, return the tilt of the whole tree. # # The tilt of a tree node is defined as the absolute difference # between the sum of all left subtree node values and # the sum of all right subtree node values. Null node has tilt 0. # # The tilt of the whole tree is defined as th...
kamyu104/LeetCode
Python/binary-tree-tilt.py
Python
mit
1,289
""" discovery and running of std-library "unittest" style tests. """ from __future__ import absolute_import, division, print_function import sys import traceback # for transferring markers import _pytest._code from _pytest.config import hookimpl from _pytest.outcomes import fail, skip, xfail from _pytest.python impor...
ddboline/pytest
src/_pytest/unittest.py
Python
mit
8,619
#### 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 = Static() result.template = "object/static/structure/tatooine/shared_planter_hanging_style_01.iff" result.attribut...
anhstudios/swganh
data/scripts/templates/object/static/structure/tatooine/shared_planter_hanging_style_01.py
Python
mit
463
# -*- coding: utf-8 -*- """ Project Bluebox Copyright (C) <2015> <University of Stuttgart> This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details. """ from mcm.Bluebox import app from mcm.Bluebox import configuration # socketio.run( # app, app.run...
timwaizenegger/swift-bluebox
_runApp_Development_nodebug.py
Python
mit
442
import subprocess from genes.mac.traits import only_osx @only_osx def systemsetup(*args): subprocess.call(['systemsetup'] + list(args))
hatchery/Genepool2
genes/systemsetup/commands.py
Python
mit
143
import os import sys import yaml import argparse from code import interact def parse_options(argv): parser = argparse.ArgumentParser(description='Macumba Shell', prog='macumba-shell') parser.add_argument('--v1', action='store_true', dest='v1', help=...
battlemidget/conjure-up
macumba/cli.py
Python
mit
2,432
''' TODO: Init package docs ''' import logging import uuid from grader.models import Grader from grader.utils.config import is_grader_dir logger = logging.getLogger(__name__) help = 'Initialize grader by creating grader.yml' def setup_parser(parser): parser.add_argument('--course-id', default=str(uuid.uuid4()...
grade-it/grader
redkyn-grader/grader/commands/init.py
Python
mit
1,386
#### 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 = Tangible() result.template = "object/tangible/powerup/weapon/fs_quest_sad/shared_melee_speed_quest.iff" result.at...
anhstudios/swganh
data/scripts/templates/object/tangible/powerup/weapon/fs_quest_sad/shared_melee_speed_quest.py
Python
mit
483
#### 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_dressed_sean_trenwell.iff" result.attribute_template_id = 9 r...
anhstudios/swganh
data/scripts/templates/object/mobile/shared_dressed_sean_trenwell.py
Python
mit
444
#### 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 = Tangible() result.template = "object/tangible/ship/attachment/weapon/shared_hutt_medium_weapon1_s02.iff" result.a...
obi-two/Rebelion
data/scripts/templates/object/tangible/ship/attachment/weapon/shared_hutt_medium_weapon1_s02.py
Python
mit
471
# -*- coding: utf-8 -*- import pytest from bottle import Bottle, debug, request, response from webtest import TestApp from webargs import ValidationError, fields from webargs.bottleparser import BottleParser hello_args = { 'name': fields.Str(missing='World', validate=lambda n: len(n) >= 3), } hello_multiple = { ...
hyunchel/webargs
tests/test_bottleparser.py
Python
mit
4,813
#!/usr/bin/env python # Ben Jones # Georgia Tech # Spring 2014 # # htpt-socks.py: this file builds upon the work of Zavier Lagraula's # PySocks code to create a SOCKS server for our HTTP circumvention tool import socks """SOCKS 4 proxy server class. Copyright (C) 2001 Xavier Lagraula See COPYRIGHT.txt an...
gsathya/htpt
htpt/socks4a/htptProxy.py
Python
mit
40,287
#### 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 = Static() result.template = "object/static/structure/general/shared_fountain_generic_style_1.iff" result.attribute...
anhstudios/swganh
data/scripts/templates/object/static/structure/general/shared_fountain_generic_style_1.py
Python
mit
462
#!/usr/bin/env python """ Copyright (c) 2019 Alex Forencich 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, merg...
alexforencich/verilog-ethernet
tb/test_ptp_clock_cdc_64.py
Python
mit
5,957
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "collegeassist.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure tha...
Avinash-Yadav/collegeassist
manage.py
Python
mit
811
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
Lyleo/OmniMarkupPreviewer
OmniMarkupLib/Renderers/libs/python3/genshi/builder.py
Python
mit
11,729
from .utils import PyKEArgumentHelpFormatter import numpy as np from astropy.io import fits as pyfits from matplotlib import pyplot as plt from tqdm import tqdm from . import kepio, kepmsg, kepkey, kepfit, kepstat, kepfunc __all__ = ['kepoutlier'] def kepoutlier(infile, outfile=None, datacol='SAP_FLUX', nsig=3.0, s...
gully/PyKE
pyke/kepoutlier.py
Python
mit
14,393
#!/usr/bin/python # -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progra...
0vercl0k/rp
src/third_party/beaengine/tests/0f383d.py
Python
mit
4,045
# -*- coding: utf-8 -*- import json from django import template from django.conf import settings register = template.Library() from django_iceberg.auth_utils import init_iceberg @register.inclusion_tag('django_iceberg/javascript_sdk.html', takes_context=True) def iceberg_javascript_sdk(context): """ To Fi...
izberg-marketplace/django-izberg
django_iceberg/templatetags/iceberg.py
Python
mit
1,539
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import jsonify, session from marshmallow import INCLUDE, fields from marshmallow_enum import En...
pferreir/indico
indico/modules/search/controllers.py
Python
mit
2,694
"""Tests for documenteer.sphinext.mockcoderefs.""" from shutil import rmtree from tempfile import mkdtemp import pytest from sphinx.application import Sphinx import documenteer.sphinxext.mockcoderefs as mockcoderefs try: from unittest.mock import Mock except ImportError: from mock import Mock @pytest.fix...
lsst-sqre/sphinxkit
tests/test_sphinxext_mockcoderefs.py
Python
mit
1,652
#!/usr/bin/env python from utils import load_data, save_data def run(): # load in members, orient by bioguide ID print("Loading current legislators...") current = load_data("legislators-current.yaml") current_bioguide = { } for m in current: if "bioguide" in m["id"]: current_bioguid...
hugovk/congress-legislators
scripts/sweep.py
Python
cc0-1.0
1,432
############################################################################### # Copyright (C) 2008 Johann Haarhoff <johann.haarhoff@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of Version 2 of the GNU General Public License as # published by the Free Softwar...
Jaden-J/shape2ge
src/shapeobjects.py
Python
gpl-2.0
10,069
#!/usr/bin/env python # -*- coding: utf-8 -*- u""" Основной скрипт запуска ДЗ. Данный скрипт призван запускать на выполнение домашнее задание #6. """ __author__ = "Elena Sharovar" __date__ = "2014-11-23" from hw6_solution1 import modifier def runner(): u"""Запускает выполнение всех задач""" print "Modify...
pybursa/homeworks
e_tverdokhleboff/hw6/hw6_starter.py
Python
gpl-2.0
540
from PyQt5.QtCore import pyqtSlot, QThread, pyqtSignal import os from PyQt5.QtWidgets import QFileDialog, QProgressDialog, QMessageBox from PyQt5.QtCore import pyqtSlot, QObject from books.soldiers import processData import route_gui from lxml import etree import multiprocessing import math class XmlImport(QObject): ...
Learning-from-our-past/Kaira
qtgui/xmlImport.py
Python
gpl-2.0
4,469
"""GIFImage by Matthew Roe""" import Image import pygame from pygame.locals import * import time class GIFImage(object): def __init__(self, filename): self.filename = filename self.image = Image.open(filename) self.frames = [] self.get_frames() self.cur = 0 self.p...
drfreemayn/ml-testing
sex-dice/GIFImage.py
Python
gpl-2.0
5,891
import string __version__ = string.split('$Revision: 1.6 $')[1] __date__ = string.join(string.split('$Date: 2001/11/17 14:12:34 $')[1:3], ' ') __author__ = 'Tarn Weisner Burton <twburton@users.sourceforge.net>' __doc__ = 'http://oss.sgi.com/projects/ogl-sample/registry/SUN/convolution_border_modes.txt' __api_versi...
fxia22/ASM_xf
PythonD/site_python/OpenGL/GL/SUN/convolution_border_modes.py
Python
gpl-2.0
585
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2018 CERN. # # Zenodo 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 ...
slint/zenodo
zenodo/modules/records/httpretty_mock.py
Python
gpl-2.0
2,498
import struct import os from sys import maxint from enigma import eTimer, eHdmiCEC, eActionMap from config import config, ConfigSelection, ConfigYesNo, ConfigSubsection, ConfigText from Tools.StbHardware import getFPWasTimerWakeup from Tools.Directories import fileExists config.hdmicec = ConfigSubsection() config.hdm...
popazerty/enigma2
lib/python/Components/HdmiCec.py
Python
gpl-2.0
12,328
from wrappers import * from inspect import getdoc @plugin class Help: @command("list") def list(self, message): """list the loaded plugins""" return message.reply(list(self.bot.plugins.keys()), "loaded plugins: " + ", ".join(self.bot.plugins.keys())) @command("commands") d...
ellxc/piperbot
plugins/help.py
Python
gpl-2.0
2,390
# Copyright (C) 2008-2010 Adam Olsen # # 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, or (at your option) # any later version. # # This program is distributed in the hope that...
virtuald/exaile
xl/plugins.py
Python
gpl-2.0
9,679
import code import unittest import os import pcbnew import pdb import tempfile from pcbnew import * class TestBoardClass(unittest.TestCase): def setUp(self): self.pcb = LoadBoard("data/complex_hierarchy.kicad_pcb") self.TITLE="Test Board" self.COMMENT1="For load/save test" self.F...
johnbeard/kicad-git
qa/testcases/test_002_board_class.py
Python
gpl-2.0
2,834
# -*- coding: utf-8 -*- # Copyright 2008-2014 Jaap Karssenberg <jaap.karssenberg@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 Software Foundation; either version 2 of the License, or # (at your optio...
fabricehong/zim-desktop
zim/__init__.py
Python
gpl-2.0
7,256
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE # PyQt4 includes for python bindings to QT from PyQt4.QtCore import Qt, QString from PyQt4.QtGui import QFont, QFontMetrics, QColor, QIcon, QLabel, QWidget, QVBoxLayout from PyQt4.Qsci import QsciScin...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/opus_gui/util/editorbase.py
Python
gpl-2.0
3,269
SD_PROTO_VER = 0x02 SD_SHEEP_PROTO_VER = 0x0a SD_EC_MAX_STRIP = 16 SD_MAX_COPIES = SD_EC_MAX_STRIP * 2 - 1 SD_OP_CREATE_AND_WRITE_OBJ = 0x01 SD_OP_READ_OBJ = 0x02 SD_OP_WRITE_OBJ = 0x03 SD_OP_REMOVE_OBJ = 0x04 SD_OP_DISCARD_OBJ = 0x05 SD_OP_NEW_VDI = 0x11 SD_OP_LOCK_VDI = 0x12 SD_OP_R...
matsu777/sheepdog
tests/operation/proto.py
Python
gpl-2.0
3,562
## # Copyright 2009-2018 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
bartoldeman/easybuild-easyblocks
easybuild/easyblocks/s/snphylo.py
Python
gpl-2.0
3,939
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
mitchcapper/mythbox
resources/lib/mysql-connector-python/python2/mysql/connector/cursor.py
Python
gpl-2.0
24,598
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2011 Carlos Abalde <carlos.abalde@gmail.com> # # This file is part of duplicity. # # Duplicity 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...
nils-tekampe/duplicity
duplicity/backends/gdocsbackend.py
Python
gpl-2.0
8,939
import pytest from cfme.infrastructure import repositories from utils.update import update from utils.wait import TimedOutError, wait_for @pytest.mark.tier(2) @pytest.mark.meta(blockers=[1188427]) def test_repository_crud(soft_assert, random_string, request): repo_name = 'Test Repo {}'.format(random_string) ...
lehinevych/cfme_tests
cfme/tests/infrastructure/test_repositories.py
Python
gpl-2.0
962
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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...
harwee/electrum-xvg-tor
gui/qt/transaction_dialog.py
Python
gpl-3.0
10,558
""" Support for plotting vector fields. Presently this contains Quiver and Barb. Quiver plots an arrow in the direction of the vector, with the size of the arrow related to the magnitude of the vector. Barbs are like quiver in that they point along a vector, but the magnitude of the vector is given schematically by t...
jonyroda97/redbot-amigosprovaveis
lib/matplotlib/quiver.py
Python
gpl-3.0
46,115
#!/usr/bin/env python3.6 # -*- coding: utf-8 -*- """ Application ... """ # Copyright (C) 2017 by # Emmanuel Desmontils <emmanuel.desmontils@univ-nantes.fr> # Patricia Serrano-Alvarado <patricia.serrano-alvarado@univ-nantes.fr> # All rights reserved. # GPL v 2.0 license. from queue import Empty import mu...
edesmontils/Linked-Data-Query-Profiler
archive/sweep copie.py
Python
gpl-3.0
37,290
#!/usr/bin/env python # # euclid graphics maths module # # Copyright (c) 2006 Alex Holkner # Alex.Holkner@mail.google.com # # 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 ...
pokemon4ik2008/py-airfoil
euclid.py
Python
gpl-3.0
70,054
# Dict'O'nator - A dictation plugin for gedit. # Copyright (C) <2016> <Abhinav Singh> # # This file is part of Dict'O'nator. # # Dict'O'nator 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 o...
theawless/Dict-O-nator
dictonator/setlog.py
Python
gpl-3.0
1,573
# Copyright (C) 2008-2009 Mark A. Matienzo # # This file is part of worldcat, the Python WorldCat API module. # # worldcat 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 # ...
anarchivist/worldcat
worldcat/request/xid.py
Python
gpl-3.0
4,907
__author__ = "Steffen Vogel" __copyright__ = "Copyright 2015, Steffen Vogel" __license__ = "GPLv3" __maintainer__ = "Steffen Vogel" __email__ = "post@steffenvogel.de" """ This file is part of transWhat transWhat is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Li...
NeoBelerophon/transwhat
buddy.py
Python
gpl-3.0
5,903
class Solution(object): def longestPalindrome(self, s): max_len = 0 max_str = '' if len(s) <= 2: return s for i, ch in enumerate(s): delta = 1 count = 0 # center is ch while (i - delta) >= 0 and (i + delta) < len(s): ...
cosven/pat_play
leetcode/005_tle_error.py
Python
gpl-3.0
1,580
import logging import os import math from collections import defaultdict from gensim import corpora # 引入斷詞與停用詞的配置 from .Matcher.matcher import Matcher class Evaluator(Matcher): """ 讀入一串推文串列,計算出當中可靠度最高的推文 """ def __init__(self,segLib="Taiba"): #FIXME 若「線上版本」受記憶體容量限制,需考慮更換為 jieba! sup...
zake7749/Chatbot
Chatbot/QuestionAnswering/responsesEvaluate.py
Python
gpl-3.0
5,244
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'Customer', fields ['company_name', 'contact_name', 'contact_mail'] db.delet...
sibsibsib/pressureNET-server
readings/migrations/0021_auto__del_customer__del_unique_customer_company_name_contact_name_cont.py
Python
gpl-3.0
5,747
# This file is part of the Minecraft Overviewer. # # Minecraft Overviewer 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...
aheadley/Minecraft-Overviewer
overviewer_core/textures.py
Python
gpl-3.0
193,926
""" Plotting Service generates graphs according to the client specifications and data """ __RCSID__ = "$Id$" import os import hashlib from types import DictType, ListType from DIRAC import S_OK, S_ERROR, rootPath, gConfig, gLogger, gMonitor from DIRAC.ConfigurationSystem.Client import PathFinder from DIRAC.Core....
coberger/DIRAC
FrameworkSystem/Service/PlottingHandler.py
Python
gpl-3.0
2,415
# Copyright 2015 Adam Greenstein <adamgreenstein@comcast.net> # # Switcharoo Cartographer 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 versio...
admgrn/Switcharoo
scraper/scraper/entryqueue.py
Python
gpl-3.0
2,041
from config import Prefix from sigma.core.blacklist import check_black async def custom_command_detection(ev, message, args): if message.guild: if message.content.startswith(Prefix): cmd = message.content[len(Prefix):].lower() if cmd not in ev.bot.plugin_manager.commands: ...
aurora-pro/apex-sigma
sigma/plugins/moderation/other/custom_command_detection.py
Python
gpl-3.0
805
"""This sample demonstrates some very simple lightning effects.""" import math import d3d11 import d3d11x from d3d11c import * def heightCallback(x, z, byteIndex, data): return data[byteIndex] * 0.03 class SampleLights(d3d11x.Frame): def onCreate(self): #Heightmap. #self.heightmap = d3d11x....
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/directpy11/Samples/SampleLights.py
Python
gpl-3.0
2,818
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # 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_...
tdtrask/ansible
lib/ansible/modules/network/aci/aci_switch_leaf_selector.py
Python
gpl-3.0
10,067
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 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 versio...
douggeiger/gnuradio
gr-blocks/python/blocks/qa_multiply_matrix_ff.py
Python
gpl-3.0
4,810