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
# Copyright 2015 StackHut Ltd. # # 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, so...
StackHut/stackhut-toolkit
stackhut_toolkit/common/runtime/rpc.py
Python
apache-2.0
9,386
# 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...
Huyuwei/tvm
tests/python/relay/test_cpp_build_module.py
Python
apache-2.0
4,614
''' Implements the targetcli root UI. This file is part of targetcli. Copyright (c) 2011-2013 by Datera, 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/LICE...
cloud4life/targetcli-fb
targetcli/ui_root.py
Python
apache-2.0
7,712
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # Copyright 2013 IBM Corp. # # 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/LIC...
danielmellado/tempest
tempest/api/image/v2/test_images_negative.py
Python
apache-2.0
3,822
# -*- coding: utf-8 -*- """This file contains utility functions.""" import logging import re # Illegal Unicode characters for XML. ILLEGAL_XML_RE = re.compile( ur'[\x00-\x08\x0b-\x1f\x7f-\x84\x86-\x9f' ur'\ud800-\udfff\ufdd0-\ufddf\ufffe-\uffff]') def IsText(bytes_in, encoding=None): """Examine the bytes...
ostree/plaso
plaso/lib/utils.py
Python
apache-2.0
3,494
import re import sqlite3 import csv import ast import os import sys import fnmatch import datetime import xlrd import win32com.client def question_marks(st): question_marks = '?' for i in range(0, len(st.split(','))-1): question_marks = question_marks + ",?" return question_marks def xlsx_to_arr(xlsx_file, works...
frederick623/pb
deltaone/d1_sbl_recon.py
Python
apache-2.0
7,739
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
jtopjian/st2
st2common/tests/unit/test_isotime.py
Python
apache-2.0
5,334
# -*- coding: utf-8 -*- from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse import json from intranet.models import User, Project, Part, STATE_CREATED class Test(TestCase): @classmethod def setUpClass(self): self.c = Client() Use...
fatihzkaratana/intranet
backend/intranet/tests/api.py
Python
apache-2.0
7,125
from rest_framework.routers import SimpleRouter from api.formattedmetadatarecords import views router = SimpleRouter() router.register(r'formattedmetadatarecords', views.FormattedMetadataRecordViewSet, basename='formattedmetadatarecord') urlpatterns = router.urls
CenterForOpenScience/SHARE
api/formattedmetadatarecords/urls.py
Python
apache-2.0
266
# -*- coding: utf-8 -*- # # Copyright 2015 Thomas Amland # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
tamland/python-actors
actors/internal/messages.py
Python
apache-2.0
995
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
cloudera/hue
apps/sqoop/src/sqoop/sqoop_properties.py
Python
apache-2.0
1,837
from a10sdk.common.A10BaseClass import A10BaseClass class Udp(A10BaseClass): """Class Description:: Set UDP STUN timeout. Class udp supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param port_start: {"description": "Port...
amwelch/a10sdk-python
a10sdk/core/cgnv6/cgnv6_lsn_stun_timeout_udp.py
Python
apache-2.0
1,644
#!/usr/bin/env python3 import sys import os import argparse parser = argparse.ArgumentParser() parser.add_argument('--input', dest='input', help='the input file') parser.add_argument('--output', dest='output', help='the output file') parser.add_argument('--upper', dest='upper',...
germandiagogomez/meson
test cases/common/98 gen extra/srcgen.py
Python
apache-2.0
650
from typing import Any, Dict, Mapping, Optional, Tuple from .exceptions import UnknownUpdateCardAction SUPPORTED_CARD_ACTIONS = [ u'updateCard', u'createCard', u'addLabelToCard', u'removeLabelFromCard', u'addMemberToCard', u'removeMemberFromCard', u'addAttachmentToCard', u'addChecklist...
tommyip/zulip
zerver/webhooks/trello/view/card_actions.py
Python
apache-2.0
10,437
#!/usr/bin/env python from __future__ import print_function import argparse import array import math import os import random import sys import subprocess def create_graph(nodes, edges, verbose): if verbose: print('Creating random graph with {} nodes and {} edges...'.format(nodes, edges)) n1 = [ random.randin...
chuckatkins/legion
language/examples/mssp/gen_graph.py
Python
apache-2.0
8,232
#------------------------------------------------------------------------------ # type_converter.py (Section 6.2) #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # Copyright 2017, 2018, Oracle and/or its aff...
cloudera/hue
desktop/core/ext-py/cx_Oracle-6.4.1/samples/tutorial/solutions/type_converter.py
Python
apache-2.0
959
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Chrome Cache files parser.""" import unittest from plaso.parsers import chrome_cache from tests.parsers import test_lib class ChromeCacheParserTest(test_lib.ParserTestCase): """Tests for the Chrome Cache files parser.""" def testParse(self): ...
joachimmetz/plaso
tests/parsers/chrome_cache.py
Python
apache-2.0
1,283
# Copyright 2015 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...
with-git/tensorflow
tensorflow/python/kernel_tests/variables_test.py
Python
apache-2.0
25,860
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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 applicabl...
briancurtin/rpc-maas
playbooks/files/rax-maas/plugins/cinder_service_check.py
Python
apache-2.0
4,635
import unittest, time, sys, random sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_glm, h2o_hosts, h2o_import as h2i, h2o_jobs, h2o_exec as h2e DO_POLL = False class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): lo...
woobe/h2o
py/testdir_single_jvm/test_frame_split_iris.py
Python
apache-2.0
1,612
# 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 use ...
apache/libcloud
libcloud/common/gandi_live.py
Python
apache-2.0
7,334
import json import pytest class TestNFSs(object): @pytest.mark.no_docker def test_nfs_ganesha_is_installed(self, node, host): assert host.package("nfs-ganesha").is_installed @pytest.mark.no_docker def test_nfs_ganesha_rgw_package_is_installed(self, node, host): assert host.package("nf...
font/ceph-ansible
tests/functional/tests/nfs/test_nfs_ganesha.py
Python
apache-2.0
1,987
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
queria/my-tempest
tempest/api/compute/v3/servers/test_server_rescue.py
Python
apache-2.0
1,828
URL = { 3304557: { "production": "https://notacarioca.rio.gov.br/WSNacional/nfse.asmx?wsdl", "sandbox": "https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx?wsdl" } } TEMPLATES = { 'send_rps': "GerarNfseEnvio.xml", 'status': "ConsultarNfseEnvio.xml", 'get_nfse': "Consult...
adrianomargarin/py-notacarioca
notacarioca/settings.py
Python
apache-2.0
377
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
Peddle/hue
desktop/libs/notebook/src/notebook/connectors/base.py
Python
apache-2.0
5,042
# Copyright 2015 Nervana 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-2.0 # # Unless required by applicable law or agreed to in w...
jfsantos/neon
tests/test_costs.py
Python
apache-2.0
5,749
""" Switches on Zigbee Home Automation networks. For more details on this platform, please refer to the documentation at https://home-assistant.io/components/switch.zha/ """ import logging from homeassistant.components.switch import DOMAIN, SwitchDevice from homeassistant.const import STATE_ON from homeassistant.core...
nugget/home-assistant
homeassistant/components/zha/switch.py
Python
apache-2.0
3,817
import asyncio import functools import io import unittest import zlib from unittest import mock import pytest import aiohttp.multipart from aiohttp import helpers, payload from aiohttp.hdrs import (CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE) from aiohttp.h...
juliatem/aiohttp
tests/test_multipart.py
Python
apache-2.0
67,357
from __future__ import absolute_import from .telegram import TelegramService
brantje/telegram-github-bot
captain_hook/services/telegram/__init__.py
Python
apache-2.0
77
"""Home Assistant command line scripts.""" from __future__ import annotations import argparse import asyncio import importlib import logging import os import sys from typing import Sequence from homeassistant import runner from homeassistant.bootstrap import async_mount_local_lib_path from homeassistant.config import...
w1ll1am23/home-assistant
homeassistant/scripts/__init__.py
Python
apache-2.0
2,358
DVC_CHECKPOINT = "DVC_CHECKPOINT" DVC_DAEMON = "DVC_DAEMON" DVC_PAGER = "DVC_PAGER" DVC_ROOT = "DVC_ROOT" DVCLIVE_PATH = "DVCLIVE_PATH" DVCLIVE_SUMMARY = "DVCLIVE_SUMMARY" DVCLIVE_HTML = "DVCLIVE_HTML" DVCLIVE_RESUME = "DVCLIVE_RESUME" DVC_IGNORE_ISATTY = "DVC_IGNORE_ISATTY" DVC_EXP_GIT_REMOTE = "DVC_EXP_GIT_REMOTE" DV...
dmpetrov/dataversioncontrol
dvc/env.py
Python
apache-2.0
396
import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from urllib import urlencode import hashlib import csv from product_spiders.item...
0--key/lib
portfolio/Python/scrapy/naturebest/naturesbest.py
Python
apache-2.0
2,587
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.tasks_v2beta2.proto import ( cloudtasks_pb2 as google_dot_cloud_dot_tasks__v2beta2_dot_proto_dot_cloudtasks__pb2, ) from google.cloud.tasks_v2beta2.proto import ( queue_pb2 as google_dot_cloud_dot_tasks__v2beta2...
tseaver/google-cloud-python
tasks/google/cloud/tasks_v2beta2/proto/cloudtasks_pb2_grpc.py
Python
apache-2.0
29,408
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from django.db.models import Count, QuerySet from zerver.models import UserActivity, UserProfile, Realm, \ get_realm, get_use...
calvinleenyc/zulip
analytics/management/commands/client_activity.py
Python
apache-2.0
3,040
#!/usr/bin/env python # Copyright (c) 2014, Alessandro Gatti - frob.it # 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...
arthurpro/HopperPlugins
tools/dumpbinary.py
Python
bsd-2-clause
5,539
import os import errno def delete_file(file_name, dry=False): if dry: print(' DRY DELETED: {}'.format(file_name)) else: os.remove(file_name) try: dirname = os.path.dirname(file_name) os.rmdir(dirname) print(' DELETED DIR: {}'.format(dirname)) ...
logston/python-dircmp
dircmppy/dircmpdel.py
Python
bsd-2-clause
2,648
# -*- coding: UTF-8 -*- # Copyright 2009-2019 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) from django.conf import settings from django.utils.encoding import force_str from django.db import models from django.utils.translation import gettext_lazy as _ from django.apps...
lino-framework/lino
lino/modlib/system/models.py
Python
bsd-2-clause
4,683
# -*- coding: utf-8 -*- """ /******************************************************************************* * Copyright (c) cortical.io GmbH. All rights reserved. * * This software is confidential and proprietary information. * You shall use it only in accordance with the terms of the * license agreement you en...
cortical-io/python-client-sdk
tests/unit/testExpressionsApi.py
Python
bsd-2-clause
3,216
#!/usr/bin/env python # reflect input bytes to output, printing as it goes import serial, sys, optparse, time parser = optparse.OptionParser("davis_log") parser.add_option("--baudrate", type='int', default=57600, help='baud rate') opts, args = parser.parse_args() if len(args) != 2: print("usage: reflector.py <D...
tridge/DavisSi1000
Firmware/tools/davis_log.py
Python
bsd-2-clause
715
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Eric Larson <larson.eric.d@gmail.com> # Oleh Kozynets <ok7mailbox@gmail.com> # Guillaume Favelier <guillaume.favelier@gmail.com> # jona-sassenhagen <jona.sassenhagen@gmail.com> # Joan Massich <mailsik@gmail.com> #...
drammock/mne-python
mne/viz/_brain/_brain.py
Python
bsd-3-clause
151,930
#!/usr/bin/env python # Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import sys from stix.core import STIXPackage def parse_stix(pkg): print("== MALWARE ==") for fam in pkg.ttps: print("---") print("Title : " + fam.title) print(...
jburns12/stixproject.github.io
documentation/idioms/malware-hash/malware-indicator-for-file-hash_consumer.py
Python
bsd-3-clause
1,039
from openstatesapi.jurisdiction import make_jurisdiction J = make_jurisdiction('ga') J.url = 'http://georgia.gov'
openstates/billy
billy2pupa/ga.py
Python
bsd-3-clause
115
"""Must be kept even empty. That makes a Django app."""
jgsogo/django-generic-filters
django_genericfilters/models.py
Python
bsd-3-clause
56
#!/usr/bin/env python """Execute the tests for bs_tools. The golden test outputs are generated by the script generate_outputs.sh. You have to give the root paths to the source and the binaries as arguments to the program. These are the paths to the directory that contains the 'projects' directory. Usage: run_tests...
xp3i4/seqan
apps/bs_tools/tests/run_tests.py
Python
bsd-3-clause
10,973
# Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ). # This software may be distributed under the terms of the # Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt """ na_to_nc.py =========== Contains the NAToNC class for converting a NASA...
eufarn7sp/egads-eufar
egads/thirdparty/nappy/nc_interface/na_to_nc.py
Python
bsd-3-clause
3,191
from django.contrib.sitemaps import Sitemap from events.models import Event class EventsSitemap(Sitemap): changefreq = "never" priority = 1.0 def items(self): return Event.objects.public() def lastmod(self, obj): return obj.date_modified
asgardproject/asgard-calendar
events/sitemaps.py
Python
bsd-3-clause
251
# # This file is part of GreatFET # # # FIXME: rewrite to be a compliant GreatFET JTAGDevice. # from itertools import chain from ..interface import GreatFETInterface from ..programmer import GreatFETProgrammer class JTAG_MSP430(GreatFETProgrammer): MSP430_ident = 0x00 def __init__(self, board): ""...
dominicgs/GreatFET-experimental
host/greatfet/programmers/msp430.py
Python
bsd-3-clause
5,615
import os from django.conf import settings class BorgConfiguration(): @staticmethod def initialize(): setattr(BorgConfiguration,"DEBUG",getattr(settings,"DEBUG",False)) config = getattr(settings,"HARVEST_CONFIG") if not config: config = {} for name, value in config....
rockychen-dpaw/borgcollector
borg_utils/borg_config.py
Python
bsd-3-clause
890
import locale from atom.ext.guardian.views import RaisePermissionRequiredMixin from braces.views import ( FormValidMessageMixin, LoginRequiredMixin, SelectRelatedMixin, UserFormKwargsMixin, ) from cached_property import cached_property from dateutil.relativedelta import relativedelta from django.conf i...
watchdogpolska/poradnia.siecobywatelska.pl
poradnia/events/views.py
Python
bsd-3-clause
5,142
import sys from rpython.rlib.unroll import unrolling_iterable SEND_EFFECT = 0xFF ARRAY_EFFECT = 0xFE BLOCK_EFFECT = 0xFD UNPACK_EFFECT = 0xFC # Name, number of arguments, stack effect BYTECODES = [ ("LOAD_SELF", 0, +1), ("LOAD_SCOPE", 0, +1), ("LOAD_BLOCK", 0, +1), ("LOAD_CODE", 0, +1), ("LOAD_C...
kachick/topaz
topaz/consts.py
Python
bsd-3-clause
2,843
# -*- coding: utf-8 -*- # Authors: Teon Brooks <teon.brooks@gmail.com> # Martin Billinger <martin.billinger@tugraz.at> # Alan Leggitt <alan.leggitt@ucsf.edu> # Alexandre Barachant <alexandre.barachant@gmail.com> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # Joan Massic...
Teekuningas/mne-python
mne/io/edf/tests/test_edf.py
Python
bsd-3-clause
16,927
# -*- coding: utf-8 -*- """ tests.templating ~~~~~~~~~~~~~~~~ Template functionality :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask import logging from jinja2 import TemplateNotFound def test_context_processing(): app = f...
iFighting/flask
tests/test_templating.py
Python
bsd-3-clause
11,202
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # A script to test the vtkROIStencilSource reader = vtk.vtkPNGReader() reader.SetDataSpacing(0.8,0.8,1.5) reader.SetDataOrigin(0.0,0.0,0.0) reader.SetFileName("" + str(VTK_D...
hlzz/dotfiles
graphics/VTK-7.0.0/Imaging/Core/Testing/Python/TestROIStencil.py
Python
bsd-3-clause
3,470
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import os import unittest from datetime import timedelta from decimal import Decimal from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from django.utils...
antonyr/django-haystack
test_haystack/whoosh_tests/test_whoosh_backend.py
Python
bsd-3-clause
45,377
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
VisTrails/VisTrails
vistrails/packages/pipelineEdit/__init__.py
Python
bsd-3-clause
2,254
import base64 import json import os import pickle from Crypto import Random from Crypto.Cipher import AES from cumulusci.core.config import BaseConfig from cumulusci.core.config import ConnectedAppOAuthConfig from cumulusci.core.config import OrgConfig from cumulusci.core.config import ScratchOrgConfig from cumulusci...
Joble/CumulusCI
cumulusci/core/keychain.py
Python
bsd-3-clause
12,877
# encoding: utf-8 """ Admin interface for the sphinxdoc app. """ from django.contrib import admin from sphinxdoc.models import Project, Document class ProjectAdmin(admin.ModelAdmin): """Admin interface for :class:`~sphinxdoc.models.Project`.""" list_display = ('name', 'path',) prepopulated_fields = {'sl...
yawd/django-sphinxdoc
sphinxdoc/admin.py
Python
bsd-3-clause
659
# -*- coding:utf-8 -*- import sys import config ,util ,logging ,log,downloader import xiami as xm import netease import re from threadpool import ThreadPool from time import sleep from os import path from threadpool import Terminate_Watcher from proxypool import ProxyPool LOG = log.get_logger("zxLogger") dl_songs = ...
yosef-gao/zhuaxia
zhuaxia/commander.py
Python
mit
7,171
"""Parsimonious's public API. Import from here. Things may move around in modules deeper than this one. """ from parsimonious.exceptions import (ParseError, IncompleteParseError, VisitationError, UndefinedLabel, BadGrammar) from parsimonious.gr...
erikrose/parsimonious
parsimonious/__init__.py
Python
mit
421
import autocomplete_light from cities_light.models import City autocomplete_light.register(City, search_fields=('search_names',), autocomplete_js_attributes={'placeholder': 'city name ..'})
spookylukey/django-autocomplete-light
test_project/fk_autocomplete/autocomplete_light_registry.py
Python
mit
196
import io import shutil import pytest from unittest import mock from mitmproxy.test import tflow from mitmproxy.test import taddons from mitmproxy.test import tutils from mitmproxy.addons import dumper from mitmproxy import exceptions from mitmproxy import http def test_configure(): d = dumper.Dumper() with...
ujjwal96/mitmproxy
test/mitmproxy/addons/test_dumper.py
Python
mit
5,783
#!/usr/bin/env python # coding=utf-8 """ The `META-INF/container.xml` file, storing: 1. the Rendition objects 2. the Rendition Mapping Document """ from yael.element import Element from yael.jsonable import JSONAble from yael.mediatype import MediaType from yael.namespace import Namespace from yael.rendition import ...
takuan-osho/yael
yael/container.py
Python
mit
6,350
import renderdoc as rd import rdtest class VK_SPIRV_13_Shaders(rdtest.TestCase): demos_test_name = 'VK_SPIRV_13_Shaders' def check_capture(self): action = self.find_action("Draw") self.check(action is not None) self.controller.SetFrameEvent(action.eventId, False) pipe: rd.P...
moradin/renderdoc
util/test/tests/Vulkan/VK_SPIRV_13_Shaders.py
Python
mit
3,571
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import os import subprocess import sys from ....tests.helper import pytest def test_wcsapi_extension(tmpdir): # Test that we can build a simple C extension with the...
piotroxp/scibibscan
scib/lib/python3.5/site-packages/astropy/wcs/tests/extension/test_extension.py
Python
mit
2,891
class WordDistance(object): def __init__(self, words): """ initialize your data structure here. :type words: List[str] """ self.word_dict = {} for idx, w in enumerate(words): self.word_dict[w] = self.word_dict.get(w, []) + [idx] def shortest...
Mlieou/leetcode_python
leetcode/python/ex_244.py
Python
mit
791
import requests from allauth.socialaccount import app_settings from allauth.socialaccount.providers.jupyterhub.provider import ( JupyterHubProvider, ) from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) class JupyterHubAdapter(OAuth2Adapter...
AltSchool/django-allauth
allauth/socialaccount/providers/jupyterhub/views.py
Python
mit
1,219
# 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 sqlalchemy.ext.declarative import declared_attr from indico.core.db import db from indico.core.db.sq...
pferreir/indico
indico/modules/categories/models/principals.py
Python
mit
1,366
#!/usr/bin/env python # $Id: tkhello2.py,v 1.1 2000/02/21 09:04:25 wesc Exp $ # # tkhello2.py -- "Hello World!" 2 in Tkinter: # - "Hello World!" with just a button (which quits the app) # # created by wesc 00/02/20 # # import Tkinter module import Tkinter # create toplevel window top = Tkinter.Tk() # create b...
opensvn/test
src/study/python/cpp/ch19/alt/tkhello2.py
Python
gpl-2.0
457
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('blocks', '0004_auto_20160305_2025'), ] operations = [ migrations.AddField( model_name='blockmodel', ...
effa/flocs
blocks/migrations/0005_blockmodel_difficulty.py
Python
gpl-2.0
475
# -*- coding: utf-8 -*- import struct class GGZChessFeedback: def onSeat(self, seatNum, version): pass def onPlayers(self, whiteType, whiteName, blackType, blackName): pass def onClockRequest(self): pass def onClock(self, mode, sec...
gfunkmonk2/mate-games
glchess/src/lib/ggz/chess.py
Python
gpl-2.0
5,544
import Image import numpy import pylab import vlfeat from vlfeat.plotop.vl_plotframe import vl_plotframe if __name__ == '__main__': """ VL_DEMO_SIFT_EDGE Demo: SIFT: edge treshold """ I = numpy.zeros([100, 500]) for i in 10 * (1+numpy.arange(9)): d = numpy.round(i / 3.0) I[50-d-1:50+d-1, i * 5-1] = 1 I = n...
mmmikael/vlfeat
python/vlfeat/demo/vl_demo_sift_edge.py
Python
gpl-2.0
733
# -*- coding: utf-8 -*- """ *************************************************************************** SelectByAttribute.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com *******************...
nirvn/QGIS
python/plugins/processing/algs/qgis/SelectByAttribute.py
Python
gpl-2.0
5,528
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2013 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 yo...
labordoc/labordoc-next
modules/bibformat/lib/bibformat_utils_unit_tests.py
Python
gpl-2.0
6,733
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
YuepengGuo/backtrader
backtrader/indicators/__init__.py
Python
gpl-3.0
2,021
import boto,sys,euca_admin from boto.exception import EC2ResponseError from euca_admin.generic import BooleanResponse from euca_admin import EucaAdmin from optparse import OptionParser SERVICE_PATH = '/services/Configuration' class Walrus(): def __init__(self, walrus_name=None, host_name=None, port=None): ...
Shebella/HIPPO
clc/tools/src/euca_admin/walruses.py
Python
gpl-3.0
2,284
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'SocialAccount.uid' db.alter_column(u'socialaccount_soc...
Alexander-M-Waldman/local_currency_site
lib/python2.7/site-packages/allauth/socialaccount/south_migrations/0013_auto__chg_field_socialaccount_uid__chg_field_socialapp_secret__chg_fie.py
Python
gpl-3.0
7,605
# -*- coding: utf-8 -*- # # This file is part of Linux Show Player # # Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com> # # Linux Show Player 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 ...
FrancescoCeruti/linux-show-player
lisp/modules/midi/midi_output.py
Python
gpl-3.0
1,339
# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE.GPL.txt, distributed with # this software. # # SPD...
etherkit/OpenBeacon2
macos/venv/lib/python3.8/site-packages/_pyinstaller_hooks_contrib/tests/conftest.py
Python
gpl-3.0
524
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
mcus/SickRage
sickbeard/providers/thepiratebay.py
Python
gpl-3.0
5,726
# # Copyright 2003,2004 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # # misc utilities from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import types class seq_with_cursor (object): ...
jdemel/gnuradio
gnuradio-runtime/python/gnuradio/gru/seq_with_cursor.py
Python
gpl-3.0
1,933
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
partp/gtg-services
GTG/gtk/backends_dialog/parameters_ui/passwordui.py
Python
gpl-3.0
3,286
#!/usr/bin/env python "Module to aggregate all pdf figures of a directory \ into a single latex file, and compile it." from __future__ import division, print_function import os import sys import re from optparse import OptionParser _VERSION = '1.0' def latex_dir(outfile_name, directory, column=2, eps=False): "Pr...
LouisPlisso/analysis_tools
latex_directory_1_2.py
Python
gpl-3.0
5,070
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.7.2", "llvm": "6.0.0", "moztools": "0.0.1-5", "ninja": "1.7.1", "openss...
dati91/servo
python/servo/packages.py
Python
mpl-2.0
343
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2014 Didotech SRL (info at didotech.com) # All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole re...
iw3hxn/LibrERP
export_customers/__openerp__.py
Python
agpl-3.0
2,043
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
mrcslws/nupic.research
src/nupic/research/frameworks/pytorch/hooks/hook_manager.py
Python
agpl-3.0
5,818
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
sysadminmatmoz/odoo-clearcorp
account_name_extended/account_name_extended.py
Python
agpl-3.0
17,555
# -*- 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...
Jgarcia-IAS/SAT
openerp/addons-extra/odoo-pruebas/odoo-server/addons/stock_landed_costs/stock_landed_costs.py
Python
agpl-3.0
19,099
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/astroid/tests/unittest_utils.py
Python
agpl-3.0
3,313
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Voropp(MakefilePackage): """Voro++ is a open source software library for the computation o...
iulian787/spack
var/spack/repos/builtin/packages/voropp/package.py
Python
lgpl-2.1
1,349
############################################################################## # Copyright (c) 2013-2017, 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...
TheTimmy/spack
var/spack/repos/builtin.mock/packages/dtbuild2/package.py
Python
lgpl-2.1
1,542
#!/usr/bin/python from pyparsing import * from charm.toolbox.node import * import string objStack = [] def createAttribute(s, loc, toks): if toks[0] == '!': newtoks = "" for i in toks: newtoks += i return BinNode(newtoks) return BinNode(toks[0]) # create # convert 'attr <...
lferr/charm
charm/toolbox/policytree.py
Python
lgpl-3.0
6,070
#!/usr/bin/env python2 # Extractor for Excel files. # Mso-dumper is not compatible with Python3. We use sys.executable to # start the actual extractor, so we need to use python2 too. import rclexecm import rclexec1 import xlsxmltocsv import re import sys import os import xml.sax class XLSProcessData: def __init_...
CellulaProject/icc.cellula
src/icc/data/recoll/filters/rclxls.py
Python
lgpl-3.0
2,469
# Copyright 2011 Gilt Groupe, 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 or agreed to in writing,...
downneck/mothership
mothership/idrac6/__init__.py
Python
apache-2.0
8,163
# 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...
madjam/mxnet
python/mxnet/ndarray/sparse.py
Python
apache-2.0
50,947
from __future__ import absolute_import from django.db import models from django.test import TestCase from django.utils import timezone from analytics.lib.counts import CountStat, COUNT_STATS, process_count_stat, \ zerver_count_user_by_realm, zerver_count_message_by_user, \ zerver_count_message_by_stream, zerv...
sonali0901/zulip
analytics/tests/test_counts.py
Python
apache-2.0
20,711
# Copyright 2012 OpenStack 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 l...
zhangg/trove
trove/tests/unittests/secgroups/test_security_group.py
Python
apache-2.0
6,773
# Copyright 2020 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
brianrodri/oppia
scripts/run_lighthouse_tests.py
Python
apache-2.0
7,645
# 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...
Laurawly/tvm-1
python/tvm/relay/backend/contrib/ethosu/te/identity.py
Python
apache-2.0
2,862
from mongoengine import * class Class(Document): name = StringField(required = True) meta = { "allow_inheritance": False }
ucrcsedept/galah
galah/db/models/classes.py
Python
apache-2.0
145
# Copyright 2016 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 requ...
bigswitch/nova
nova/conf/mks.py
Python
apache-2.0
1,253