code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# -*- coding: utf-8 -*- # # Copyright © 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
splice/splice-server
src/splice/entitlement/on_startup.py
Python
gpl-2.0
3,876
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Widiot/simpleblog
venv/lib/python3.5/site-packages/selenium/webdriver/common/actions/key_input.py
Python
mit
1,782
#!/usr/bin/env python # # run_tests.py - run the tests in the regression test suite. # '''usage: python run_tests.py [--url=<base-url>] [--fs-type=<fs-type>] [--verbose] [--cleanup] [--enable-sasl] [--parallel] [--http-library=<http-library>] [--config-file=<...
bdmod/extreme-subversion
BinarySourcce/subversion-1.6.17/build/run_tests.py
Python
gpl-2.0
11,104
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Omero RT Description : Omero plugin Date : August 15, 2010 copyright : (C) 2010 by Giuseppe Sucameli (Faunalia) email : sucameli@faunalia.i...
faunalia/rt_geosisma_offline
Utils.py
Python
gpl-3.0
8,122
from utils.axml import AXML from utils.templates import Obfuscator import os, logging from utils.resourceid import RESOURCE_ID class Manifest(Obfuscator): def __init__(self, path, config): Obfuscator.__init__(self, path, config) self.axml = AXML(os.path.join(path, 'AndroidManifest.xml')) def endianify(self, val...
0x0mar/manifesto
processing/manifest.py
Python
mit
2,362
""" Given the root of a binary tree, return the inorder traversal of its nodes' values.   Example 1: Input: root = [1,null,2,3] Output: [1,3,2] Example 2: Input: root = [] Output: [] Example 3: Input: root = [1] Output: [1] Example 4: Input: root = [1,2] Output: [2,1] Example 5: Input: root = [1,null,2] Ou...
franklingu/leetcode-solutions
questions/binary-tree-inorder-traversal/Solution.py
Python
mit
1,084
# coding=utf-8 """ Collect the elasticsearch stats for the local node #### Dependencies * urlib2 """ import urllib2 import re try: import json json # workaround for pyflakes issue #13 except ImportError: import simplejson as json import diamond.collector RE_LOGSTASH_INDEX = re.compile('^(.*)-\d\d\...
metamx/Diamond
src/collectors/elasticsearch/elasticsearch.py
Python
mit
11,323
import random from unittest import TestCase from hamcrest import * from array_util import get_random_array from chapter16.textbook16_2 import fractional_knapsack from datastructures.array import Array from util import between def part_item_value(item_partial_weight, item_total_weight, item_value): return item_p...
wojtask/CormenPy
test/test_chapter16/test_textbook16_2.py
Python
gpl-3.0
1,705
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
jhseu/tensorflow
tensorflow/python/keras/engine/training_utils.py
Python
apache-2.0
81,705
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus 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 l...
AMOboxTV/AMOBox.LegoBuild
plugin.video.exodus/resources/lib/modules/trakt.py
Python
gpl-2.0
11,621
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
polyaxon/polyaxon
platform/coreapi/polyaxon/apis/versions/views.py
Python
apache-2.0
1,965
from functools import wraps from nose.tools import eq_ from js_helper import TestCase def uses_feature(name): def wrap(func): @wraps(func) def inner(self, *args, **kw): func(self, *args, **kw) self.assert_has_feature(name) return inner return wrap class Feat...
stasm/app-validator
tests/js/test_features.py
Python
bsd-3-clause
4,061
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.mapbox.layer", **kwargs ): super(TemplateitemnameValidator, self).__init__( ...
plotly/plotly.py
packages/python/plotly/plotly/validators/layout/mapbox/layer/_templateitemname.py
Python
mit
473
import os import sys import unittest def setup_django_settings(): os.chdir(os.path.join(os.path.dirname(__file__), '..')) sys.path.insert(0, os.getcwd()) os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' def run_tests(): if not os.environ.get('DJANGO_SETTINGS_MODULE', False): setup_dja...
peterayeni/django-smsgateway
tests/runtests.py
Python
bsd-3-clause
618
# -*- coding: utf-8 -*- # compatible with python2 (main difference: raw_input, read without encoding) #console: # chcp 65001 from io import StringIO from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfp...
tillweinrich/twscraper
twscraper2.py
Python
mit
10,642
# ==--- opt_bug_reducer_test.py ------------------------------------------===# # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
brentdax/swift
utils/bug_reducer/tests/test_optbugreducer.py
Python
apache-2.0
7,709
""" <Abstract Base Class or Interface> !!! Concept of Tangle will be defined here in a machine language Modification with little consideration is not allowed here No library should be used here. Concept should be independent from implementations """ import functools as F from .context import monad from .context i...
ravenSanstete/hako
src/core/tangle/core.py
Python
mit
1,950
import numpy # Transform matrices IDENTITY = numpy.array(((1,0), (0,1))) ROTATE_LEFT = numpy.array(((0,-1), (1, 0))) ROTATE_RIGHT = numpy.array((( 0,1), (-1,0))) def rotate_back_matr...
AntonHerrNilsson/the-dungeon
utils.py
Python
mit
591
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 University of Dundee & Open Microscopy Environment. # All rights reserved. # # This program 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 Foun...
mtbc/openmicroscopy
components/tools/OmeroWeb/omeroweb/webclient/decorators.py
Python
gpl-2.0
6,291
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "Quantization", sigma = 0.0, exog_count = 100, ar_order = 0);
antoinecarme/pyaf
tests/artificial/transf_Quantization/trend_PolyTrend/cycle_7/ar_/test_artificial_128_Quantization_PolyTrend_7__100.py
Python
bsd-3-clause
268
#!/usr/bin/env python import os with open('settings') as f: lines = f.readlines() for s in lines: if s[0] == 'w': w = (str.split(s)[2]) if s[0] == 'h': h = (str.split(s)[2]) #print(w,h) conmmand = "blenderplayer" + " -w " + w + " " + h + "/home/vit/ProjectLTP/blenderLTP/MiniGames/BabylonTower/tube.blend " os...
Acvarium/BabylonTower
start-game.py
Python
gpl-2.0
338
# Список (list) представляет тип данных, который хранит набор или последовательность элементов. Для создания списка # в квадратных скобках ([]) через запятую перечисляются все его элементы. Во многих языках программирования есть # аналогичная структура данных, которая называется массив numbers = [1, 2, 3, 4, 5] numbers...
AlexFortLabs/MyPythonLabs
Sammelsurium/Starter/HelloW9_3.1.Spiski_LISTen.py
Python
gpl-3.0
14,011
import unittest from sandbox.util.PorterTokeniser import PorterTokeniser class PorterTokeniserTest(unittest.TestCase): def setUp(self): pass def testCall(self): tokeniser = PorterTokeniser() doc = "System and human-system engineering testing of EPS." ...
charanpald/sandbox
sandbox/util/test/PorterTokeniserTest.py
Python
gpl-3.0
411
from .main import NZBVortex def start(): return NZBVortex() config = [{ 'name': 'nzbvortex', 'groups': [ { 'tab': 'downloaders', 'name': 'nzbvortex', 'label': 'NZBVortex', 'description': 'Use <a href="http://www.nzbvortex.com/landing/" target="_blank...
jayme-github/CouchPotatoServer
couchpotato/core/downloaders/nzbvortex/__init__.py
Python
gpl-3.0
1,438
# -*- coding: utf-8 -*- from .classification import Classification
sckott/pytaxize
pytaxize/classification/__init__.py
Python
mit
68
""" Example of a simple TCP server that is written in (mostly) coroutine style and uses asyncio.streams.start_server() and asyncio.streams.open_connection(). Note that running this example starts both the TCP server and client in the same process. It listens on port 12345 on 127.0.0.1, so it will fail if this port is...
gvanrossum/asyncio
examples/simple_tcp_server.py
Python
apache-2.0
5,164
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2017 by the Free Software Foundation, Inc. # # This file is part of HyperKitty. # # HyperKitty 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...
systers/hyperkitty
hyperkitty/lib/incoming.py
Python
gpl-3.0
6,213
import socket import client import sys def end_program(): print client.client(sys.argv[1]) end_program()
jayantpatil/rpc_in_python
end_program.py
Python
cc0-1.0
116
# -*- coding: utf-8 -*- # Copyright 2022 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...
googleapis/python-datastore
google/cloud/datastore_v1/services/datastore/transports/__init__.py
Python
apache-2.0
1,149
from addons.models import AddonUpsell def run(): for upsell in list(AddonUpsell.objects.all()): upsell.cleanup()
Prashant-Surya/addons-server
src/olympia/migrations/557-cleanup-upsell.py
Python
bsd-3-clause
127
import math import os import bpy import mathutils from bpy_extras.io_utils import create_derived_objects, free_derived_objects x3d_names_reserved = {'Anchor', 'Appearance', 'Arc2D', 'ArcClose2D', 'AudioClip', 'Background', 'Billboard', 'BooleanFilter', 'BooleanSequencer', 'BooleanToggle', 'Boo...
xxd3vin/spp-sdk
tools/script/blender/io_scene_x3d/export_x3d.py
Python
mit
69,812
#!/usr/bin/env python # REF [site] >> https://gist.github.com/Integralist/3f004c3594bbf8431c15ed6db15809ae import socket import threading def handle_client_connection(client_socket): request = client_socket.recv(1024) print('Received {}'.format(request)) #client_socket.send(bytes('ACK!', 'utf-8')) #client_socket...
sangwook236/SWDT
sw_dev/python/ext/test/networking/simple_tcp_server.py
Python
gpl-3.0
1,082
def length_of_sequence(arr, n): total = [i for i, a in enumerate(arr) if a == n] return 0 if len(total) != 2 else total[1] - total[0] + 1
the-zebulan/CodeWars
katas/kyu_7/length_of_sequence.py
Python
mit
146
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
chenzheng128/ns-3-dev-git
src/dsdv/bindings/modulegen__gcc_LP64.py
Python
gpl-2.0
525,693
# -*- coding: utf-8 -*- # Copyright 2022 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...
googleapis/python-game-servers
samples/generated_samples/gameservices_v1beta_generated_game_server_configs_service_list_game_server_configs_async.py
Python
apache-2.0
1,620
# -*- coding: utf-8 -*- """ Created on Thu Aug 11 19:10:25 2016 @author: pme Contents: - summarize_geometry - bin_by_diameter """ import pandas as pd import numpy as np from scipy import ndimage def summarize_geometry(pyroots_geom, image_name): """ Created: 08/11/2016 @author : PME Summarize the g...
pme1123/pyroots
pyroots/summarize.py
Python
apache-2.0
3,769
""" WSGI config for Big Future project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
NozesNaBrita/bigfuture
config/wsgi.py
Python
mit
1,669
import cv2 import numpy from tkinter import * from PIL import Image, ImageTk import argparse #count=1 def on_mouse(event,x,y,flags,params): #print("getting") if event == cv2.EVENT_LBUTTONDOWN: gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) print("ok\n") name = "calib1.jpg" # save frame as JPEG file #count=...
apoorvarpi/Computer_Vision
vedio.py
Python
mit
1,027
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file.""" from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
eyalev/timee
travis_pypi_setup.py
Python
mit
4,071
# -*- coding: utf-8 -*- config = { "consumer_key": "VALUE", "consumer_secret": "VALUE", "access_token": "VALUE", "access_token_secret": "VALUE", }
henrythor/mannanofn
config.py
Python
mit
164
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
reneploetz/mesos
src/python/src/mesos/__init__.py
Python
apache-2.0
1,029
#MenuTitle: Compare Metrics # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals __doc__=""" Compare widths of two frontmost fonts. """ Font1 = Glyphs.font # frontmost font Font2 = Glyphs.fonts[1] # other font # brings macro window to front and clears its log: Glyphs.clearLog() Gl...
mekkablue/Glyphs-Scripts
Compare Frontmost Fonts/Compare Metrics of Two Frontmost Fonts.py
Python
apache-2.0
827
## # Copyright 2009-2016 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...
hpcleuven/easybuild-framework
easybuild/tools/module_naming_scheme/utilities.py
Python
gpl-2.0
4,299
# Copyright 2013 IBM 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 # # Unless required ...
Juniper/tempest
tempest/api/compute/admin/test_hypervisor.py
Python
apache-2.0
4,991
from ml import * __all__=["ml"]
anfeng/CaffeOnSpark
caffe-grid/src/main/python/com/yahoo/__init__.py
Python
apache-2.0
33
#!/usr/bin/env python import sys, random, os, tempfile from templite import Templite def generate(argv): if len(argv) != 3: print 'Usage: pypy generate.py [seed] [output_file]' sys.exit() seed = argv[1] output_file = argv[2] random.seed(seed) text_tail_modifier0 = 0x15 text_tail_modifier1 = 0x0...
thomashaw/SecGen
modules/utilities/unix/ctf/metactf/files/repository/src_angr/17_angr_arbitrary_jump/generate.py
Python
gpl-3.0
1,336
#!/usr/bin/python2 #------------------------------------------------------------------------------- # Filename: minesweeper.py # # Author: David C. Drake (https://davidcdrake.com) # # Description: A Minesweeper game developed using Python 2.7 and PyGTK 2.24. #---------------------------------------------------...
theDrake/minesweeper-py
minesweeper.py
Python
mit
28,649
from django.conf import settings from django.db.models import Count, F, Q from django_filters.rest_framework.backends import DjangoFilterBackend from geotrek.api.mobile.serializers import trekking as api_serializers_trekking from geotrek.api.mobile.serializers import tourism as api_serializers_tourism from geotrek.a...
GeotrekCE/Geotrek-admin
geotrek/api/mobile/views/trekking.py
Python
bsd-2-clause
4,323
## # This test shall simply spawn random shapes and print them to a svg file. ## from svged import shapes def run(): print(shapes.writeHeader()) print(shapes.line(10,10,200,200)) print(shapes.writeEnd())
pol3waf/svgEd
svged/test/random_draw_test.py
Python
gpl-2.0
213
from os import listdir from os.path import exists, expanduser, isfile import re from subprocess import CalledProcessError, check_call import logging from pyudev import Context, Monitor video_pattern = re.compile('missed-moment.*merged.*mp4') MEDIA_DIR = '/missed_moment_media' USB_MOUNT_DIR = '/missed_moment_usb' USB_...
oudeismetis/missed-moment
export/usb.py
Python
mit
2,456
# -*- coding: utf-8 -*- """ para sacar las barras de error a los parametros de calibracion. se sabe que cuando se proyecta de VCA a Mapa hay un error las coordenadas x,y que tiee dist gaussiana que en pixeles tiene desv estandar s_N-1 = 3.05250940223 la idea es generara aleatoriamente 42 puntos para entrenar ubicado...
sebalander/VisionUNQ
dev/bootstrap.py
Python
bsd-3-clause
4,340
import json import unittest import re from unittest import mock from flask import Response from docker_enforcer import app, judge, config, requests_judge, trigger_handler from dockerenforcer.config import Mode from test.test_helpers import ApiTestHelper, DefaultRulesHelper class ApiContainerTest(unittest.TestCase)...
piontec/docker-enforcer
test/test_api.py
Python
gpl-3.0
9,986
#! /usr/bin/env python # # @BEGIN LICENSE # # versioner.py: defines look-ahead auto-versioning from metadata.py # # Copyright (c) 2017 The Psi4 Developers # # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # @END LICENSE # from __futur...
robertodr/pcmsolver
tools/versioner.py
Python
lgpl-3.0
14,918
""" Helper code for working with Blockstore bundles that contain OLX """ import logging from django.utils.lru_cache import lru_cache from opaque_keys.edx.locator import BundleDefinitionLocator, LibraryUsageLocatorV2 from xblock.core import XBlock from xblock.plugin import PluginMissingError from openedx.core.djangoa...
cpennington/edx-platform
openedx/core/djangoapps/content_libraries/library_bundle.py
Python
agpl-3.0
15,558
""" Support for TPLink lights. For more details about this component, please refer to the documentation at https://home-assistant.io/components/light.tplink/ """ import logging import time from homeassistant.components.light import ( Light, ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, SUPPORT_BRIGHTNESS, ...
HydrelioxGitHub/home-assistant
homeassistant/components/tplink/light.py
Python
apache-2.0
7,614
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt # import frappe import unittest class TestCampaign(unittest.TestCase): pass
mhbu50/erpnext
erpnext/crm/doctype/campaign/test_campaign.py
Python
gpl-3.0
167
# # Cert-related functions # - RHN certificate # - SSL CA certificate # # Copyright (c) 2008--2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTA...
moio/spacewalk
backend/satellite_tools/satCerts.py
Python
gpl-2.0
29,682
# -*- coding: utf-8 -*- from flask.ext.wtf import Form, TextField, BooleanField, PasswordField, SelectField, SubmitField from flask.ext.wtf import Required, NumberRange, IPAddress class LoginForm(Form): password = PasswordField('password', validators = [Required()]) class NewProjectForm(Form): name = TextF...
OpenGrow/OpenGrow
app/forms/interface_forms.py
Python
gpl-3.0
1,020
from setuptools import setup from stab import __version__ proj = 'stab' desc = 'Start blogging with this simple static site generator' deps = ['pyyaml', 'mistune', 'jinja2'] setup( name=proj, packages=[proj], version=__version__, description=desc, long_description='Please visit https://github.com/...
oxalorg/Stab
setup.py
Python
mit
741
# coding=utf-8 # Copyright 2019 Foursquare Labs Inc. All Rights Reserved. from __future__ import ( absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement, ) import os from pkg_resources import Requirement class FilteredPythonRequirements(object): """T...
foursquare/fsqio
src/python/fsqio/pants/python/filtered_python_requirements.py
Python
apache-2.0
3,929
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/aio/operations/_virtual_network_gateways_operations.py
Python
mit
34,596
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 and t...
vasiliykochergin/euca2ools
euca2ools/commands/ec2/copyimage.py
Python
bsd-2-clause
2,469
#!/usr/bin/env python # -*- coding: utf-8 -*- class SwarmBaseException(Exception): pass class SwarmUseException(SwarmBaseException): pass class SwarmNetException(SwarmBaseException): pass class SwarmParseException(SwarmBaseException): pass class SwarmModuleException(SwarmBaseException): pass c...
Arvin-X/swarm
lib/core/exception.py
Python
gpl-3.0
484
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="bar.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
plotly/plotly.py
packages/python/plotly/plotly/validators/bar/hoverlabel/_namelengthsrc.py
Python
mit
432
# -*- coding: utf-8 -*- # # Copyright 2018 Mario Frasca <mario@anche.no>. # Copyright 2018 Tanager Botanical Garden <tanagertourism@gmail.com> # # This file is part of ghini.desktop. # # ghini.desktop is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
Ghini/ghini.desktop
bauble/plugins/garden/pocket_server.py
Python
gpl-2.0
15,251
# boosterMaxVelocityPenalty # # Used by: # Implants named like: Crash Booster (3 of 4) # Items from market group: Implants & Boosters > Booster > Booster Slot 02 (9 of 13) type = "boosterSideEffect" # User-friendly name for the side effect displayName = "Velocity" # Attribute that this effect targets attr = "boosterM...
bsmr-eve/Pyfa
eos/effects/boostermaxvelocitypenalty.py
Python
gpl-3.0
454
#!/usr/bin/env python """Tests for API renderers.""" # pylint: disable=unused-import,g-bad-import-order from grr.lib import server_plugins # pylint: enable=unused-import,g-bad-import-order import json from grr.gui import api_renderers from grr.lib import flags from grr.lib import test_lib from grr.lib import util...
ForensicTools/GRREAT-475_2141-Chaigon-Failey-Siebert
gui/api_renderers_test.py
Python
apache-2.0
3,846
from __future__ import absolute_import from rest_framework.negotiation import DefaultContentNegotiation from rest_framework.parsers import FormParser, MultiPartParser class ConditionalContentNegotiation(DefaultContentNegotiation): """ Overrides the parsers on POST to support file uploads. """ def se...
looker/sentry
src/sentry/api/content_negotiation.py
Python
bsd-3-clause
541
#!/usr/bin/env python import sys from PQTokenize import * from keyword import * from qt import * class PyEdit(QTextEdit): def __init__(self, parent=None): QTextEdit.__init__(self, parent) # user interface setup self.setTextFormat(QTextEdit.PlainText) #self.setWrapPolicy(QTextEdit...
PyQwt/PyQwt
junk/PyEdit.py
Python
gpl-2.0
2,691
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Web Editor', 'category': 'Hidden', 'description': """ Odoo Web Editor widget. ========================== """, 'depends': ['web'], 'data': [ 'security/ir.model.access.csv', ...
jeremiahyan/odoo
addons/web_editor/__manifest__.py
Python
gpl-3.0
5,781
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api class SaleOrder(models.Model): _inherit = "sale.order" @api.onchange('company_id', 'warehouse_id') def l10n_in_onchange_company_id(self): if self.warehouse_id.l...
ddico/odoo
addons/l10n_in_sale_stock/models/sale_order.py
Python
agpl-3.0
491
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
zasdfgbnm/qutip
qutip/entropy.py
Python
bsd-3-clause
10,172
from roetsjbaan.migrator import * from roetsjbaan.versioner import *
mivdnber/roetsjbaan
roetsjbaan/__init__.py
Python
mit
69
#!/usr/bin/python # Google Play Music device ID grabber # Used to get a device ID from the Google Music API to use with the Mobileclient # dan-nixon.com # Date: 04/03/2014 import gmusicapi from getpass import getpass print "Username: ", user = raw_input() passwd = getpass() api = gmusicapi.Webclient() api.login(u...
DanNixon/PlayMusicCL
GetDeviceID.py
Python
apache-2.0
830
<<<<<<< HEAD <<<<<<< HEAD import io import unittest import sys import xml.sax from xml.sax.xmlreader import AttributesImpl from xml.dom import pulldom from test.support import run_unittest, findfile tstfile = findfile("test.xml", subdir="xmltestdata") # A handy XML snippet, containing attributes, a namespace prefi...
ArcherSys/ArcherSys
Lib/test/test_pulldom.py
Python
mit
37,541
from astropy import units as u from poliastro.bodies import Sun from poliastro.twobody.states import ClassicalState, RVState def test_state_has_attractor_given_in_constructor(): _d = 1.0 * u.AU # Unused distance _ = 0.5 * u.one # Unused dimensionless value _a = 1.0 * u.deg # Unused angle ss = Clas...
Juanlu001/poliastro
tests/tests_twobody/test_states.py
Python
mit
1,109
#!/usr/bin/env python2.7 import numpy as np import matplotlib.pyplot as plt DT=np.array([0.5,1,1.5,2,2.5,3,3.5,4,4.5]) t=np.array([0.07,0.10,0.13,0.18,0.24,0.32,0.45,1.01,1.36]) plt.ylabel('$\Delta T$') plt.xlabel('tiempo') plt.title('$Grafica \Delta T \ vs \ tiempo \ a \ 0.3 \ volts$') for i in range(len(DT)): plt.t...
P1R/cinves
TrabajoFinal/tubo350cm/6-DTvst/DTvst-0.3v.py
Python
apache-2.0
461
""" Parser for Aquasecurity trivy (https://github.com/aquasecurity/trivy) Docker images scaner """ import json import logging from dojo.models import Finding logger = logging.getLogger(__name__) TRIVY_SEVERITIES = { "CRITICAL": "Critical", "HIGH": "High", "MEDIUM": "Medium", "LOW": "Low", "UNKN...
rackerlabs/django-DefectDojo
dojo/tools/trivy/parser.py
Python
bsd-3-clause
3,913
import LinAlg as lin # import visual as vis import numpy as np # theta = np.pi/6 # phi = np.pi/3 #Rx = lin.Matrix3([1,0,0,0,np.cos(theta),-np.sin(theta),0,np.sin(theta),np.cos(theta)]) #Ry = lin.Matrix3([np.cos(phi),0,np.sin(phi),0,1,0,-np.sin(phi),0,np.cos(phi)]) # # # F = lin.Vector3(0,0,-1) # # print Rx * F # pri...
Twistedlink07/labryinth
files/ForcesTest.py
Python
mit
1,577
import json from nose.tools import eq_ import mock from funfactory.urlresolvers import reverse from airmozilla.base.tests.test_mozillians import ( Response, GROUPS1, GROUPS2 ) from .base import ManageTestCase class TestCuratedGroups(ManageTestCase): @mock.patch('logging.error') @mock.patch('re...
chirilo/airmozilla
airmozilla/manage/tests/views/test_curatedgroups.py
Python
bsd-3-clause
1,439
from PyQt4.QtGui import QDialog,QApplication, QButtonGroup from PyQt4.QtCore import QTime, Qt, QDateTime from ui_datatimerpicker import Ui_datatimerpicker from qgis.core import * from utils import log class DateTimePickerDialog(QDialog): """ A custom date picker with a time and date picker """ def __i...
NathanW2/qmap
src/qmap/datatimerpickerwidget.py
Python
gpl-2.0
4,232
# License: BSD 3 clause import unittest import numpy as np from tick.prox import ProxEquality from tick.prox.tests.prox import TestProx class ProxEqualityTest(object): def test_ProxEquality(self): """...Test of ProxEquality """ coeffs = self.coeffs.copy() strength = 0.5 ...
X-DataInitiative/tick
tick/prox/tests/prox_equality_test.py
Python
bsd-3-clause
1,976
#!/usr/bin/python2 import sys import threading import errno import random import string import os import shutil import SimpleHTTPServer import SocketServer import socket def getExternalIP(): sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) sock.connect(('google.com', 80)) ip = sock.getsockname()[0] ...
kemus/share.py
share.py
Python
mit
1,565
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/pnfft/package.py
Python
lgpl-2.1
3,461
""" https://github.com/mikedh/trimesh ------------------------------------ Trimesh is a pure Python (2.7- 3.3+) library for loading and using triangular meshes with an emphasis on watertight meshes. The goal of the library is to provide a fully featured Trimesh object which allows for easy manipulation and analysis, i...
dajusc/trimesh
trimesh/__init__.py
Python
mit
1,401
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import mail_invite
Aravinthu/odoo
addons/calendar/wizard/__init__.py
Python
agpl-3.0
126
# -*- test-case-name: twisted.conch.test.test_filetransfer -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from __future__ import division, absolute_import import errno import struct from zope.interface import implementer from twisted.conch.interfaces import ISFTPServer, ISFTPFile from...
Tokyo-Buffalo/tokyosouth
env/lib/python3.6/site-packages/twisted/conch/ssh/filetransfer.py
Python
mit
34,278
from __future__ import absolute_import from __future__ import unicode_literals import random import string import re from copy import copy import requests import time from boto3.session import Session try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import responses f...
william-richard/moto
moto/apigateway/models.py
Python
apache-2.0
48,390
import utils def encrypt_CBC(text, key): """Encrypt CBC per prompt.""" pre = bytearray('comment1=cooking%20MCs;userdata=') post = bytearray(';comment2=%20like%20a%20pound%20of%20bacon') safe_text = text for char in (';='): safe_text = safe_text.replace(char, '"{}"'.format(char)) i...
tkuriyama/cryptopals
set2/python/p16.py
Python
mit
2,147
from urllib3.poolmanager import PoolManager from .connectionpool import ( CeryxTestsHTTPConnectionPool, CeryxTestsHTTPSConnectionPool, ) class CeryxTestsPoolManager(PoolManager): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.pool_classes_by_scheme = { ...
huayl/ceryx
ceryx/tests/client/poolmanager.py
Python
mit
424
try: import constants except ImportError: pass from .connectwise import Connectwise class Agreement: def __init__(self, name, **kwargs): self.name = name for kwarg in kwargs: setattr(self, kwarg, kwargs[kwarg]) def __repr__(self): return "<Agreement {}>".format(sel...
appkabob/connectwise_py
connectwise/agreement.py
Python
mit
731
#!/usr/bin/env python # File created on 10 Nov 2011 from __future__ import division __author__ = "Jesse Stombaugh" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Jesse Stombaugh"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Jesse Stombaugh" __email__ = "jesse.stombaugh@colorado...
josenavas/qiime
scripts/clean_raxml_parsimony_tree.py
Python
gpl-2.0
3,356
# Note # in spring 2010, an attempt was made to use pycurl instead of forking curl # it turned out, however, that after around 10 cycles of the nodemanager, # attempts to call GetSlivers were failing with a curl error 60 # we are thus reverting to the version from tag curlwrapper.py-NodeManager-2.0-8 # the (broken) pyc...
dreibh/planetlab-lxc-nodemanager
curlwrapper.py
Python
bsd-3-clause
1,811
#!/usr/bin/env python # encoding: utf-8 import __init__ import argparse from path import path def extractSummaryLine(line): s = line.split() return s[0][:-4].split('_') + s[-5::2] if __name__ == '__main__': parser = argparse.ArgumentParser(description='Split a long log file into several') parser.add...
pelodelfuego/word2vec-toolbox
toolbox/bin/splitLogFile.py
Python
gpl-3.0
788
#!/usr/bin/env python import linuxcnc import hal import time import sys import subprocess import os import signal import glob import re def print_status(status): status.poll() print "status.axis[0]:", status.axis[0] print "status.axis[1]:", status.axis[1] print "status.joint[0]:", status.joint[0] ...
olsonse/linuxcnc
tests/hard-limits/test-ui.py
Python
gpl-2.0
7,298
#!/usr/bin/env vpython3 # Copyright 2021 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. from logging import exception import os import sys import unittest import breakpad_file_extractor import tempfile import shutil sys...
nwjs/chromium.src
tools/tracing/breakpad_file_extractor_unittest.py
Python
bsd-3-clause
15,393
import datetime from statscache_plugins.volume.utils import VolumePluginMixin, plugin_factory import fedmsg.meta import sqlalchemy as sa class PluginMixin(VolumePluginMixin): name = "volume, by package" summary = "the count of messages, organized by package" description = """ For any given time wind...
fedora-infra/statscache_plugins
statscache_plugins/volume/by_package.py
Python
gpl-2.0
1,047
# Copyright 2013 NEC 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 # # Unless required ...
rahulunair/nova
nova/tests/unit/test_api_validation.py
Python
apache-2.0
47,979
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible 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...
jtyr/ansible
lib/ansible/executor/module_common.py
Python
gpl-3.0
64,084
from django.test import TransactionTestCase from django.contrib.auth.models import Group from django.conf import settings from hs_core import hydroshare from hs_core.models import BaseResource from hs_core.hydroshare.utils import resource_file_add_process, resource_post_create_actions from hs_core.testing import TestC...
RENCI/xDCIShare
hs_composite_resource/tests/test_composite_resource_user_zone.py
Python
bsd-3-clause
9,151