repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
ljmanso/AGM2
AGGLPlanner/agglplannerclient.py
1
1406
#sudo apt-get install pypy pypy-setuptools #git clone https://github.com/eleme/thriftpy.git #cd thriftpy #make sudo pypy setup.py install #from thriftpy.protocol.binary import TBinaryProtocolFactory #from thriftpy.transport.buffered import TBufferedTransportFactory #from thriftpy.transport.framed import TFramedTranspo...
gpl-3.0
WeblateOrg/weblate
weblate/addons/management/commands/list_addons.py
1
3032
# # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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 Foundation, either version 3 of the Lice...
gpl-3.0
Antiun/purchase-workflow
mrp_smart_purchase/mrp_smart_purchase.py
27
4265
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
agpl-3.0
OscarPDR/labman_ud
labman_ud/entities/publications/views.py
1
23606
# -*- coding: utf-8 -*- import threading import weakref import re # from django.template.defaultfilters import slugify from django.core import serializers from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse from django.core.paginator import Paginator from django.http import ...
gpl-3.0
b-dollery/testing
lib/ansible/runner/action_plugins/group_by.py
134
4249
# Copyright 2012, Jeroen Hoekx <jeroen@hoekx.be> # # 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 version 3 of the License, or # (at your option) any later ve...
gpl-3.0
oknuutti/visnav-py
visnav/render/stars.py
1
34131
from datetime import datetime from functools import lru_cache import cv2 import math import os import sqlite3 import re import time import numpy as np import quaternion from visnav.algo import tools from visnav.algo.image import ImageProc from visnav.algo.model import SystemModel from visnav.missions...
mit
xkcd1253/Mimi
flask/lib/python2.7/site-packages/whoosh/sorting.py
6
41298
# Copyright 2011 Matt Chaput. 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, # this list of conditions a...
gpl-2.0
open-mmlab/mmdetection
mmdet/models/dense_heads/reppoints_head.py
1
34356
import numpy as np import torch import torch.nn as nn from mmcv.cnn import ConvModule from mmcv.ops import DeformConv2d from mmdet.core import (build_assigner, build_sampler, images_to_levels, multi_apply, multiclass_nms, unmap) from mmdet.core.anchor.point_generator import MlvlPointGenerator f...
apache-2.0
LarryHillyer/PoolHost
PoolHost/env/Lib/site-packages/django/core/handlers/base.py
96
10769
from __future__ import unicode_literals import logging import sys import types import warnings from django.conf import settings from django.core import signals from django.core.exceptions import ImproperlyConfigured, MiddlewareNotUsed from django.db import connections, transaction from django.urls import get_resolver...
gpl-3.0
skirsdeda/django
tests/postgres_tests/test_hstore.py
25
7536
import json import unittest from django.contrib.postgres import forms from django.contrib.postgres.fields import HStoreField from django.contrib.postgres.validators import KeysValidator from django.core import exceptions, serializers from django.db import connection from django.test import TestCase from .models impor...
bsd-3-clause
architecture-building-systems/CityEnergyAnalyst
cea/tests/__init__.py
2
1234
""" Run the CEA scripts and unit tests as part of our CI efforts (cf. The Jenkins) """ import os import shutil import tempfile import cea.config import cea.inputlocator import cea.workflows.workflow __author__ = "Daren Thomas" __copyright__ = "Copyright 2020, Architecture and Building Systems - ETH Zurich" __cred...
mit
jpush/jbox
Server/venv/lib/python3.5/site-packages/requests/packages/chardet/chardetect.py
1786
2504
#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from...
mit
ChienliMa/Blends
blends.py
1
11784
""" Implement different Image blend Mode. Author: Chienli Ma Date: 2015.01.08 Incentive: It's hard to find a image blending tool in python. Some rare tool either have little mode or out_of_dated and hard to install. Therefore I just implement all methods available on in Internet. Recommended usage: ...
gpl-2.0
pabigot/pyxb
tests/trac/trac-0202/check.py
2
1553
# -*- coding: utf-8 -*- import logging if __name__ == '__main__': logging.basicConfig() _log = logging.getLogger(__name__) import unittest import pyxb import sample from pyxb.namespace.builtin import XMLSchema_instance as xsi class TestTrac0202 (unittest.TestCase): def tearDown (self): pyxb.utils.domut...
apache-2.0
canassa/django-rest-framework
tests/test_response.py
68
10811
from __future__ import unicode_literals from django.conf.urls import include, url from django.test import TestCase from django.utils import six from rest_framework import generics, routers, serializers, status, viewsets from rest_framework.renderers import ( BaseRenderer, BrowsableAPIRenderer, JSONRenderer ) from...
bsd-2-clause
cuongnv23/ansible
test/units/plugins/connection/test_ssh.py
25
29424
# -*- coding: utf-8 -*- # (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 version 3 of the License, or # (a...
gpl-3.0
omasanori/gyp
test/subdirectory/gyptest-top-all.py
261
1373
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
bsd-3-clause
InspectorIncognito/visualization
AndroidRequests/migrations/0904_transformation_eventforbusv2_half_hour_period.py
1
2254
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils import timezone from django.db import models, migrations def fill_tables(apps, schema_editor): eventsforbusv2 = apps.get_model('AndroidRequests', 'EventForBusv2') eventsforbusstop = apps.get_model('AndroidRequests', 'EventForBus...
gpl-3.0
Beauhurst/django
django/contrib/gis/gdal/field.py
62
6699
from ctypes import byref, c_int from datetime import date, datetime, time from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils.encoding import force_text # For more information, see the OG...
bsd-3-clause
tjsavage/rototutor_djangononrel
django/core/cache/backends/base.py
15
5118
"Base Cache class." import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): pass # Memcached does not accept keys longer than this. MEMCACHE_MAX_KEY_LENGTH = 250 cl...
bsd-3-clause
GrimDerp/numpy
numpy/f2py/diagnose.py
188
5295
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import os import sys import tempfile def run_command(cmd): print('Running %r:' % (cmd)) os.system(cmd) print('------') def run(): _path = os.getcwd() os.chdir(tempfile.gettempdir()) print('------') pr...
bsd-3-clause
MagazinnikIvan/pywinauto
pywinauto/tests/overlapping.py
1
7707
# GUI Application automation and testing library # Copyright (C) 2006-2017 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
bsd-3-clause
orbitfp7/horizon
openstack_dashboard/dashboards/identity/users/forms.py
5
9681
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
memtoko/django
tests/template_tests/filter_tests/test_chaining.py
345
3940
from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class ChainingTests(SimpleTestCase): """ Chaining safeness-preserving filters should not alter the safe status. """ @setup({'chaining01': '{{ a|capfirst|center:"7" }}.{{ b|capfirst|center:"...
bsd-3-clause
matmutant/sl4a
python/src/Lib/json/tests/test_scanstring.py
50
3738
import sys import decimal from unittest import TestCase import json import json.decoder class TestScanString(TestCase): def test_py_scanstring(self): self._test_scanstring(json.decoder.py_scanstring) def test_c_scanstring(self): self._test_scanstring(json.decoder.c_scanstring) def _test_...
apache-2.0
saiwing-yeung/scikit-learn
examples/calibration/plot_calibration.py
66
4795
""" ====================================== Probability calibration of classifiers ====================================== When performing classification you often want to predict not only the class label, but also the associated probability. This probability gives you some kind of confidence on the prediction. However,...
bsd-3-clause
foss-transportationmodeling/rettina-server
.env/lib/python2.7/site-packages/sqlalchemy/sql/expression.py
21
5668
# sql/expression.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Defines the public namespace for SQL expression constructs. Prior to version 0...
apache-2.0
Bionetbook/bionetbook
bnbapp/bionetbook/wsgi.py
2
1142
""" WSGI config for bionetbook 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...
mit
Hellowlol/plexpy
lib/enum/test_enum.py
95
62283
import enum import sys import unittest from enum import Enum, IntEnum, unique, EnumMeta from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL pyver = float('%s.%s' % sys.version_info[:2]) try: any except NameError: def any(iterable): for element in iterable: if element: ...
gpl-3.0
houlixin/BBB-TISDK
linux-devkit/sysroots/cortexa8t2hf-vfp-neon-linux-gnueabi/usr/lib/python2.7/site-packages/dbus/mainloop/glib.py
10
1773
# Copyright (C) 2004 Anders Carlsson # Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/> # Copyright (C) 2005-2006 Collabora Ltd. <http://www.collabora.co.uk/> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Softw...
gpl-2.0
darkenk/scripts
android/project_creator/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py
320
103230
# coding: utf-8 """ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path opera...
bsd-3-clause
s-gv/rnicu-webapp
ecg/ecg_visualizer_ble_PC/visualizer.py
3
1891
''' This program visualizes ECG waveforms on the PC Copyright (C) 2014 Sagar G V (sagar.writeme@gmail.com) 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 Foundation, either version 3 of the License, or...
agpl-3.0
opencord/xos
scripts/add_copyright.py
2
8212
# Copyright 2017-present Open Networking Foundation # # 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 agr...
apache-2.0
SNAPPETITE/backend
flask/lib/python2.7/site-packages/sqlalchemy/orm/__init__.py
34
8033
# orm/__init__.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Functional constructs for ORM configuration. See the SQLAlchemy object relation...
mit
eXistenZNL/SickRage
lib/sqlalchemy/dialects/firebird/fdb.py
79
4365
# firebird/fdb.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: firebird+fdb :name: fdb :dbapi: pyodbc :connectstring: fi...
gpl-3.0
poffuomo/spark
examples/src/main/python/ml/n_gram_example.py
123
1545
# # 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 us...
apache-2.0
Arquanite/mcshopgen
shopgen.py
1
2584
#!/bin/python3 import os import yaml config = '' subdir = '__output__' with open("shop.yml", 'r') as stream: try: config = yaml.load(stream) except yaml.YAMLError as exc: print(exc) try: os.mkdir(subdir) except Exception: pass for shop in config['shop']: with open(os.path.join(su...
gpl-3.0
VimVincent/three.js
utils/exporters/blender/addons/io_three/exporter/api/material.py
124
7818
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(...
mit
Kismuz/btgym
btgym/research/model_based/datafeed/base.py
1
29953
############################################################################### # # Copyright (C) 2017, 2018 Andrew Muzikin # # 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 ...
lgpl-3.0
hcorg/thrift
contrib/fb303/py/fb303/FacebookBase.py
43
2038
#!/usr/bin/env python # # 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 # "L...
apache-2.0
harshilasu/LinkurApp
y/google-cloud-sdk/.install/.backup/lib/apiclient/channel.py
120
9848
"""Channel notifications support. Classes and functions to support channel subscriptions and notifications on those channels. Notes: - This code is based on experimental APIs and is subject to change. - Notification does not do deduplication of notification ids, that's up to the receiver. - Storing the Chan...
gpl-3.0
daavery/audacity
lib-src/lv2/lilv/waflib/Tools/gnu_dirs.py
329
2796
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Utils,Options,Context _options=[x.split(', ')for x in''' bindir, user executables, ${EXEC_PREFIX}/bin sbindir, system admin executables, ${EXEC_PR...
gpl-2.0
zhangwenyan/three.js
utils/exporters/blender/addons/io_three/exporter/api/mesh.py
124
23228
""" Blender API for querying mesh data. Animation data is also handled here since Three.js associates the animation (skeletal, morph targets) with the geometry nodes. """ import operator from bpy import data, types, context from . import material, texture, animation from . import object as object_ from .. import const...
mit
ad-m/django-avatar
avatar/templatetags/avatar_tags.py
4
3479
from django import template try: from django.urls import reverse except ImportError: # For Django < 1.10 from django.core.urlresolvers import reverse from django.template.loader import render_to_string # Issue 182: six no longer included with Django 3.0 try: from django.utils import six except ImportErr...
bsd-3-clause
40023256/2015cd_midterm-
static/Brython3.1.1-20150328-091302/Lib/binascii.py
620
24585
"""A pure Python implementation of binascii. Rather slow and buggy in corner cases. PyPy provides an RPython version too. """ # borrowed from https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py class Error(Exception): pass class Done(Exception): pass class Incomplete(Exception): pass ...
gpl-3.0
alexforencich/python-ivi
ivi/tektronix/tektronixDPO5104.py
1
1552
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2017 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 righ...
mit
mdworks2016/work_development
Python/05_FirstPython/Chapter9_WebApp/fppython_develop/lib/python3.7/site-packages/pip/_vendor/pep517/check.py
22
5885
"""Check a project and backend by attempting to build using PEP 517 hooks. """ import argparse import logging import os from os.path import isfile, join as pjoin from pip._vendor.pytoml import TomlError, load as toml_load import shutil from subprocess import CalledProcessError import sys import tarfile from tempfile im...
apache-2.0
tfukushima/midonet-kubernetes
midonet_kubernetes/plugin.py
2
25380
#!/usr/bin/env python # 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, softwar...
apache-2.0
tempbottle/Firefly
firefly/dbentrust/mmode.py
8
9318
#coding:utf8 ''' Created on 2013-5-8 @author: lan (www.9miao.com) ''' from memclient import mclient from memobject import MemObject import util import time MMODE_STATE_ORI = 0 #未变更 MMODE_STATE_NEW = 1 #创建 MMODE_STATE_UPDATE = 2 #更新 MMODE_STATE_DEL = 3 #删除 TIMEOUT = 1800 def _insert(args): record,...
mit
FlashGordon95/Financial-Portfolio-Flask
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py
2762
17725
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
yojota/volatility
volatility/plugins/linux/sk_buff_cache.py
58
2810
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
ptisserand/ansible
test/runner/lib/cloud/cs.py
40
8903
"""CloudStack plugin for integration tests.""" from __future__ import absolute_import, print_function import json import os import re import time from lib.cloud import ( CloudProvider, CloudEnvironment, ) from lib.util import ( find_executable, ApplicationError, display, SubprocessError, ...
gpl-3.0
mcgoddard/widgetr
env/Lib/site-packages/jinja2/visitor.py
1401
3316
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
mit
prajesh-ananthan/Tools
income_worksheet_creator/generate_annual_income_worksheet.py
1
3139
import calendar import json import os from datetime import * import xlsxwriter """generate_annual_income_worksheet.py: Automates my personal Income Statement Excel workbook""" __author__ = "Prajesh Ananthan 2016" def create_excel_sheet(year): workbook = None table_position = 'B3:D13' merge_range = 'B2:...
mit
w1ll1am23/home-assistant
homeassistant/components/script/__init__.py
3
12329
"""Support for scripts.""" from __future__ import annotations import asyncio import logging import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_MODE, ATTR_NAME, CONF_ALIAS, CONF_DEFAULT, CONF_DESCRIPTION, CONF_ICON, CONF_MODE, CONF_NAME, CONF_SELECT...
apache-2.0
jumpstarter-io/neutron
neutron/openstack/common/fixture/lockutils.py
34
1890
# Copyright 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
apache-2.0
ogonzalez29/blog
wp-content/plugins/wp-leads-builder-any-crm/lib/vtwsclib/third-party/python/json.py
49
10236
import string import types ## json.py implements a JSON (http://json.org) reader and writer. ## Copyright (C) 2005 Patrick D. Logan ## Contact mailto:patrickdlogan@stardecisions.com ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser Genera...
gpl-2.0
davidhrbac/spacewalk
client/tools/rhncfg/actions/rhn-actions-control.py
7
4440
#!/usr/bin/python # # Copyright (c) 2008--2013 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 MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should...
gpl-2.0
akash1808/nova_test_latest
nova/cmd/compute.py
31
2399
# 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 # not use this file except in compliance with the License. You may obtain # a ...
apache-2.0
coder-han/hugula
Client/tools/site-packages/PIL/BdfFontFile.py
13
3337
# # The Python Imaging Library # $Id: BdfFontFile.py 2134 2004-10-06 08:55:20Z fredrik $ # # bitmap distribution font (bdf) file parser # # history: # 1996-05-16 fl created (as bdf2pil) # 1997-08-25 fl converted to FontFile driver # 2001-05-25 fl removed bogus __init__ call # 2002-11-20 fl robustification (from...
mit
petecummings/django
tests/flatpages_tests/test_views.py
290
6953
from django.conf import settings from django.contrib.auth.models import User from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import TestCase, modify_settings, override_settings from .settings import FLATPAGES_TEMPLATES class TestDataMixin(object): ...
bsd-3-clause
takeshineshiro/django
tests/admin_custom_urls/tests.py
276
6381
from __future__ import unicode_literals import datetime from django.contrib.admin.utils import quote from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.template.response import TemplateResponse from django.test import TestCase, override_settings from .models import A...
bsd-3-clause
openstack/nova-solver-scheduler
nova_solverscheduler/tests/scheduler/solvers/constraints/test_constraints.py
1
3368
# Copyright (c) 2014 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
apache-2.0
trolldbois/python-haystack
haystack/allocators/win32/profiles/win7_32.py
1
36870
# -*- coding: utf-8 -*- # # TARGET arch is: ['-target', 'i386-win'] # WORD_SIZE is: 4 # POINTER_SIZE is: 4 # LONGDOUBLE_SIZE is: 12 # import ctypes c_int128 = ctypes.c_ubyte*16 c_uint128 = c_int128 void = None if ctypes.sizeof(ctypes.c_longdouble) == 12: c_long_double_t = ctypes.c_longdouble else: c_long_doub...
gpl-3.0
fkolacek/FIT-VUT
bp-revok/python/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/debug/repr.py
280
9350
# -*- coding: utf-8 -*- """ werkzeug.debug.repr ~~~~~~~~~~~~~~~~~~~ This module implements object representations for debugging purposes. Unlike the default repr these reprs expose a lot more information and produce HTML instead of ASCII. Together with the CSS and JavaScript files of the debug...
apache-2.0
laurent-george/bokeh
examples/glyphs/trail.py
33
4656
# -*- coding: utf-8 -*- from __future__ import print_function from math import sin, cos, atan2, sqrt, radians import numpy as np import scipy.ndimage as im from bokeh.document import Document from bokeh.embed import file_html from bokeh.resources import INLINE from bokeh.browserlib import view from bokeh.models.gl...
bsd-3-clause
avtoritet/httpie
tests/test_cli.py
46
11737
"""CLI argument parsing related tests.""" import json # noinspection PyCompatibility import argparse import pytest from requests.exceptions import InvalidSchema from httpie import input from httpie.input import KeyValue, KeyValueArgType, DataDict from httpie import ExitStatus from httpie.cli import parser from utils ...
bsd-3-clause
ryanfitch/Python3_Koans_Solutions
python3/koans/about_generators.py
95
4406
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Written in place of AboutBlocks in the Ruby Koans # # Note: Both blocks and generators use a yield keyword, but they behave # a lot differently # from runner.koan import * class AboutGenerators(Koan): def test_generating_values_on_the_fly(self): result =...
mit
teltek/edx-platform
openedx/core/djangoapps/contentserver/middleware.py
4
15575
""" Middleware to serve assets. """ import logging import datetime log = logging.getLogger(__name__) try: import newrelic.agent except ImportError: newrelic = None # pylint: disable=invalid-name from django.http import ( HttpResponse, HttpResponseNotModified, HttpResponseForbidden, HttpResponseBadRequ...
agpl-3.0
osaddon/cimi
cimi/cimi.py
1
6606
# Copyright (c) 2012 IBM # # 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 ...
apache-2.0
stacywsmith/ansible
test/units/executor/test_playbook_executor.py
60
6304
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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 version 3 of the License, or # (at your option) an...
gpl-3.0
jddixon/fieldz
tests/test_reg.py
1
1974
#!/usr/bin/env python3 # test_reg.py # import time import unittest # from rnglib import SimpleRNG from wireops.enum import FieldTypes from fieldz.reg import NodeReg from fieldz.enum import CoreTypes # TESTS -------------------------------------------------------------- class TestReg(unittest.TestCase): def te...
mit
bradparks/sleepy-puppy
sleepypuppy/admin/user/views.py
13
1706
# Copyright 2015 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
lipro/linux-tqs
arch/ia64/scripts/unwcheck.py
916
1718
#!/usr/bin/env python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthe...
gpl-2.0
sosy-lab/benchexec
benchexec/test_cgroups.py
3
2072
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import logging import subprocess import sys import unittest from benchexec import check_c...
apache-2.0
mmagnus/rna-pdb-tools
rna_tools/tools/rna_calc_rmsd/lib/rmsd/calculate_rmsd.py
2
5276
#!/usr/bin/env python """ Calculate RMSD between two XYZ files by: Jimmy Charnley Kromann <jimmy@charnley.dk> and Lars Andersen Bratholm <larsbratholm@gmail.com> project: https://github.com/charnley/rmsd license: https://github.com/charnley/rmsd/blob/master/LICENSE """ import numpy as np import re from rna_tools.too...
gpl-3.0
Kamik423/uni_plan
plan/plan/lib/python3.4/site-packages/pip/_vendor/pyparsing.py
417
224171
# module pyparsing.py # # Copyright (c) 2003-2016 Paul T. McGuire # # 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, cop...
apache-2.0
morelab/appcomposer
alembic/versions/d5126053d47e_delete_english_history_records_over_50.py
3
3289
"""delete English history records over 50 Revision ID: d5126053d47e Revises: bbe219b77366 Create Date: 2019-01-06 18:12:12.357726 """ # revision identifiers, used by Alembic. revision = 'd5126053d47e' down_revision = 'bbe219b77366' import sys import time from alembic import op import sqlalchemy as sa import sqlalch...
bsd-2-clause
kmonsoor/python-for-android
python3-alpha/python3-src/Lib/test/test_sundry.py
55
2275
"""Do a minimal test of all the modules that aren't otherwise tested.""" from test import support import sys import unittest class TestUntestedModules(unittest.TestCase): def test_at_least_import_untested_modules(self): with support.check_warnings(quiet=True): import bdb import cgi...
apache-2.0
vipul-sharma20/oh-mainline
vendor/packages/twisted/twisted/python/test/test_deprecate.py
18
24646
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for Twisted's deprecation framework, L{twisted.python.deprecate}. """ import sys, types import warnings from os.path import normcase from twisted.trial.unittest import TestCase from twisted.python import deprecate from twisted.python....
agpl-3.0
theguardian/headphones
lib/gntp/cli.py
122
4143
# Copyright: 2013 Paul Traylor # These sources are released under the terms of the MIT license: see LICENSE import logging import os import sys from optparse import OptionParser, OptionGroup from gntp.notifier import GrowlNotifier from gntp.shim import RawConfigParser from gntp.version import __version__ DEFAULT_CON...
gpl-3.0
tilenkranjc/cellprofiler-plugins
MeasurementRWC.py
1
20417
'''<b>Measure RWC</b> measures the Rank Weighted Correlation (RWC) between intensities in different images (e.g., different color channels) on a pixel-by-pixel basis, within identified objects or across an entire image <hr> Given two or more images, this module calculates the RWC between the pixel intensities. The RWC...
gpl-2.0
orlandoacevedo/MCGPU
gtest/test/gtest_help_test.py
2968
5856
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
gpl-3.0
mythnc/gbf-bot
gbf_bot/slime_blasting.py
1
1115
import logging import random import time import pyautogui from .constants import slime_blasting_config as config from .components import Button, Mouse logger = logging.getLogger(__name__) start = Button("start.png", config["start"]) character1 = Button("character.png", config["character1"]) skill = Button("skill.p...
mit
birocorneliu/youtube-dl
youtube_dl/extractor/kickstarter.py
111
2654
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class KickStarterIE(InfoExtractor): _VALID_URL = r'https?://www\.kickstarter\.com/projects/(?P<id>[^/]*)/.*' _TESTS = [{ 'url': 'https://www.kickstarter.com/projects/1404461844/intersection-the-story-of-josh-g...
unlicense
xchenum/quantum
quantum/tests/unit/database_stubs.py
7
6968
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011, Cisco Systems, 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-...
apache-2.0
jmacmahon/invenio
modules/websearch/lib/websearch_external_collections_templates.py
3
7238
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2010, 2011 CERN. # # Invenio 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...
gpl-2.0
volatilityfoundation/volatility
volatility/plugins/linux/threads.py
4
3427
# Volatility # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at # your option) any later version. # # This program is distributed in the hope that it will ...
gpl-2.0
mccheung/kbengine
kbe/src/lib/python/Lib/test/test_print.py
96
4258
import unittest from io import StringIO from test import support NotDefined = object() # A dispatch table all 8 combinations of providing # sep, end, and file. # I use this machinery so that I'm not just passing default # values to print, I'm either passing or not passing in the # arguments. dispatch = { (False,...
lgpl-3.0
attilahorvath/phantomjs
src/qt/qtbase/src/3rdparty/freetype/src/tools/docmaker/formatter.py
515
4962
# Formatter (c) 2002, 2004, 2007, 2008 David Turner <david@freetype.org> # from sources import * from content import * from utils import * # This is the base Formatter class. Its purpose is to convert # a content processor's data into specific documents (i.e., table of # contents, global index, and individual API...
bsd-3-clause
indhub/mxnet
tools/caffe_translator/scripts/convert_caffe_model.py
30
5271
# 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...
apache-2.0
thegooglecodearchive/healpy
healpy/fitsfunc.py
2
14186
# # This file is part of Healpy. # # Healpy 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 version. # # Healpy is distributed in the h...
gpl-2.0
orcacoin-project/orcacoin
share/qt/make_spinner.py
4415
1035
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
mit
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/adodbapi.py
80
2493
# mssql/adodbapi.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mssql+adodbapi :name: adodbapi :dbapi: adodbapi :conn...
gpl-2.0
ezrover/pjsip-2.3
tests/pjsua/mod_call.py
22
5288
# $Id$ import time import imp import sys import inc_const as const from inc_cfg import * # Load configuration cfg_file = imp.load_source("cfg_file", ARGS[1]) # Check media flow between ua1 and ua2 def check_media(ua1, ua2): ua1.send("#") ua1.expect("#") ua1.send("1122") ua2.expect(const.RX_DTMF + "1") ua2.expect...
gpl-2.0
DistributedSystemsGroup/zoe
zoe_master/backends/docker/backend.py
1
7197
# Copyright (c) 2017, Daniele Venzano # # 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 w...
apache-2.0
okfn/hashtag-listener
controllers.py
1
1538
from flask import render_template, request, json, send_from_directory from bleach import linkify from app import app, db import models as m @app.route('/') def index(): params = { 'title': 'Hashtag Listener', } return render_template('index.html', **params) @app.route('/api', methods=['POST']) ...
mit
gdetor/SI-RF-Structure
DiCarloProtocol/figure2-dicarlo.py
1
18122
# Copyright (c) 2014, Georgios Is. Detorakis (gdetor@gmail.com) and # Nicolas P. Rougier (nicolas.rougier@inria.fr) # 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. Redis...
gpl-3.0
ccomb/OpenUpgrade
addons/stock/product.py
6
25318
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
jmhsi/justin_tinker
data_science/courses/learning_dl_packages/models/research/pcl_rl/gym_wrapper.py
7
3481
# Copyright 2017 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 applicab...
apache-2.0