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
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014-2015 # # STIC - Universidad de La Laguna (ULL) <gesinv@ull.edu.es> # # This file is part of Modelado de Servicios TIC. # # Modelado de Servicios TIC is free software: you can redistribute it and/or modify it under # the terms of the GNU Affe...
RocioDSI/Carta-Servicios-STIC
servicios/GeneraNagios.py
Python
agpl-3.0
2,787
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Adriano Monteiro Marques # # Author: Piotrek Wasilewski <wasilewski.piotrek@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 Sof...
umitproject/network-admin
netadmin/events/search_indexes.py
Python
agpl-3.0
1,285
from django.urls.base import reverse import mock from seqr.views.react_app import main_app, no_login_main_app from seqr.views.utils.test_utils import AuthenticationTestCase, USER_FIELDS class DashboardPageTest(AuthenticationTestCase): databases = '__all__' fixtures = ['users'] def _check_page_html(self,...
ssadedin/seqr
seqr/views/react_app_tests.py
Python
agpl-3.0
3,332
""" Provides full versioning CRUD and representation for collections of xblocks (e.g., courses, modules, etc). Representation: * course_index: a dictionary: ** '_id': a unique id which cannot change, ** 'org': the org's id. Only used for searching not identity, ** 'course': the course's catalog number ...
longmen21/edx-platform
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
Python
agpl-3.0
158,905
# # Copyright (C) 2000 Stephen Davies # Copyright (C) 2000 Stefan Seefeld # All rights reserved. # Licensed to the public under the terms of the GNU LGPL (>= 2), # see the file COPYING for details. # from Synopsis.Processor import Parameter from Synopsis import FileTree from Synopsis.Formatters.HTML.View import View f...
stefanseefeld/synopsis
Synopsis/Formatters/HTML/Views/FileListing.py
Python
lgpl-2.1
2,722
##################################################################### # u1.py # # (c) Copyright 2021, Benjamin Parzella. All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundat...
bparzella/secsgem
secsgem/secs/variables/u1.py
Python
lgpl-2.1
1,183
# -*- coding: utf-8 -*- # copyright 2013 CEA (Saclay, FRANCE), all rights reserved. # copyright 2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://brainomics.cea.fr -- mailto:localizer94@cea.fr # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU...
neurospin/localizer
entities.py
Python
lgpl-2.1
916
#!/usr/bin/env python3 # # specparser.py # # Reads in a spec document and generates pretty data structures from it. # # Copyright (C) 2009-2010 Collabora Ltd. # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free...
TelepathyIM/telepathy-spec
tools/specparser.py
Python
lgpl-2.1
49,305
# Copyright 2009 - 2014 Insight Centre for Data Analytics, UCC UNSAT, SAT, UNKNOWN, LIMITOUT = 0, 1, 2, 3 LUBY, GEOMETRIC = 0, 1 MAXCOST = 100000000 from .solvers import available_solvers import weakref import exceptions import datetime import types import sys #SDG: extend recursive limit for predicate decomposition...
JElchison/Numberjack
Numberjack/__init__.py
Python
lgpl-2.1
148,044
# -*- coding: utf-8 -*- # # Teres documentation build configuration file, created by # sphinx-quickstart on Fri Apr 15 09:40:37 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
tlamer/teres
docs/conf.py
Python
lgpl-2.1
8,173
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """Сorpus in Blei's LDA-C format.""" from __future__ import with_statement from os import path import logging from gensim import uti...
mattilyra/gensim
gensim/corpora/bleicorpus.py
Python
lgpl-2.1
5,756
############################################################################## # 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...
skosukhin/spack
var/spack/repos/builtin/packages/r-reportingtools/package.py
Python
lgpl-2.1
3,429
############################################################################## # 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...
skosukhin/spack
var/spack/repos/builtin/packages/r-genomicfeatures/package.py
Python
lgpl-2.1
2,974
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-14 01:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import storage.models.labels class Migration(migrations.Migration): dependencies = [ ('storage', '0014_auto_20170914_...
MartinPaulo/resplat
storage/migrations/0015_auto_20170914_0154.py
Python
lgpl-3.0
1,300
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it ...
obsoleter/suds
suds/mx/typer.py
Python
lgpl-3.0
4,234
#!/usr/bin/python import bluetooth print("performing inquiry...") nearby_devices = bluetooth.discover_devices(lookup_names = True) print("found %d devices" % len(nearby_devices)) for addr, name in nearby_devices: print(" %s - %s" % (addr, name))
fabienroyer/Bluetooth
inquiry.py
Python
lgpl-3.0
255
from unittest import TestCase from mock import patch from nose.tools import assert_equal, assert_true from kalibro_client.configurations import Reading from tests.factories import ReadingFactory from tests.helpers import not_raises class TestReading(TestCase): def setUp(self): self.subject = ReadingFa...
mezuro/kalibro_client_py
tests/configurations/test_reading.py
Python
lgpl-3.0
1,601
#!/usr/bin/python # -*- coding: utf-8 -*- """ utils ===== Utility functions for matching.py. """ import datetime import json import os #testme def parse_timestamp(t): """Parse MediaWiki-style timestamps and return a datetime.""" if t == '0000-00-00T00:00:00Z': return None else: return ...
fhocutt/grantsbot-matching
matching/utils.py
Python
lgpl-3.0
2,104
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Math.Vector import Vector class Ray: def __init__(self, origin = Vector(), direction = Vector()): self._origin = origin self._direction = direction self._inverse_direction = 1.0 / di...
thopiekar/Uranium
UM/Math/Ray.py
Python
lgpl-3.0
767
""" This is the boilerplate default configuration file. Changes and additions to settings should be done in the config module located in the application root rather than this config. """ config = { # webapp2 sessions 'webapp2_extras.sessions' : {'secret_key': 'Force_be_with'}, # webapp2 authentication 'webapp2_extras...
LuckDragon82/demo
config/localhost.py
Python
lgpl-3.0
4,151
# -*- coding: utf-8 -*- # 2014-11-24 22:43 line_number = 0 with open('favorite-people.txt', encoding = 'utf-8') as a_file: # To read a file one line at a time, use a for loop. That’s it. # Besides having explicit methods like read() , the stream object # is also an iterator which spits out a single line ev...
myd7349/DiveIntoPython3Practices
chapter_11_Files/read_line.py
Python
lgpl-3.0
804
""" The main command-line entry point. """ import os import sys import subprocess from rez.vendor.argparse import _StoreTrueAction, SUPPRESS, ArgumentParser from rez.cli._util import subcommands, LazyArgumentParser, _env_var_true from rez.utils.logging_ import print_error from rez.exceptions import RezError, RezSystemE...
LumaPictures/rez
src/rez/cli/_main.py
Python
lgpl-3.0
7,331
VERSION_MAJOR = 2 VERSION_MINOR = 1 VERSION_PATCH = 10 version_info = (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH) version = '%i.%i.%i' % version_info __version__ = version __all__ = ['version', 'version_info', '__version__']
pyblish/pyblish-maya
pyblish_maya/version.py
Python
lgpl-3.0
230
from PySide2.QtWidgets import * from PySide2 import QtCore from enum import Enum class SomeEnum(Enum): A = 'A' B = 'B' C = 'C' class EnumModel(QtCore.QAbstractListModel): def __init__(self, list_of_enums): """ Enumeration model :param list_of_enums: list of enumeration value...
SanPen/GridCal
src/research/qt_related/pyside_enums.py
Python
lgpl-3.0
963
#!/usr/bin/python # This file is part of tcollector. # Copyright (C) 2010 The tcollector Authors. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or (a...
optimizely/tcollector
tcollector.py
Python
lgpl-3.0
53,880
APPS = [ "schodfupload", ] APPS_EXT = [] PUBLIC = False MAIN_PRJ = False
Splawik/pytigon
pytigon/prj/schodf/apps.py
Python
lgpl-3.0
77
#!/usr/bin/env python """ Embeds web videos using URLs. For instance, if a URL to an youtube video is found in the text submitted to markdown and it isn't enclosed in parenthesis like a normal link in markdown, then the URL will be swapped with a embedded youtube video. All resulting HTML is XHTML Strict compatible....
sandino/python-markdown-video
mdx_video.py
Python
lgpl-3.0
15,167
try: from . import i18n from . import connect_core from . import screens from . import exceptions from . import command except ModuleNotFoundError: import i18n import connect_core import screens import exceptions import command def fast_post_step0( api: object, ...
Truth0906/PTTCrawlerLibrary
PyPtt/_api_post.py
Python
lgpl-3.0
6,653
""" This is a simple script that verifies several ways of accessing numpy arrays and ensures that their memory is properly cleaned. """ import pytest from .addons import using import numpy as np import psi4 pytestmark = pytest.mark.quick # If it's too small, something odd happens with the memory manager mat_size =...
ashutoshvt/psi4
tests/pytests/test_np_views.py
Python
lgpl-3.0
2,472
version = (2, 0, 0) VERSION = "%d.%d.%d" % version
KlausPopp/Moddy
src/moddy/version.py
Python
lgpl-3.0
51
# -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. import sys import time import numpy import struct import logging import threading # tango imports import tango from tango import GreenMod...
tiagocoutinho/bliss
bliss/tango/servers/nanobpm_ds.py
Python
lgpl-3.0
19,010
#!/usr/bin/env py.test import pytest import numpy from dolfin import * def test_manifold_point_search(): # Simple two-triangle surface in 3d vertices = [ (0.0, 0.0, 1.0), (1.0, 1.0, 1.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0), ] cells = [ (0, 1, 2), (0, 1...
FEniCS/dolfin
test/unit/python/mesh/test_manifold_point_search.py
Python
lgpl-3.0
971
import os, re, sys import unittest """ Greatly imspired from Dive into Python chap. 16.7 """ sys.path = [os.path.dirname(os.path.dirname(os.path.abspath(__file__)))] + sys.path def allTests(): path = os.path.abspath(os.path.dirname(__file__)) files = os.listdir(path) print(files) test = re.compile("^...
benallard/pythoncard
test/runtests.py
Python
lgpl-3.0
783
# # This file is part of CasADi. # # CasADi -- A symbolic framework for dynamic optimization. # Copyright (C) 2010 by Joel Andersson, Moritz Diehl, K.U.Leuven. All rights reserved. # # CasADi is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Pub...
jgillis/casadi
documentation/examples/solvers/exacthessian.py
Python
lgpl-3.0
2,328
import select, logging, threading, sys, ssl, errno, socket, platform, time from threadly import Scheduler, Clock from .stats import Stats from .stats import noExcept from .client import Client from .server import Server from .tcp import TCPClient, TCPServer from .udp import UDPServer try: xrange(1) except: xra...
lwahlmeier/python-litesockets
litesockets/socketexecuter.py
Python
unlicense
21,816
# -*- coding: utf-8 -*- import os.path from django.conf import settings from pybb.util import filter_blanks, rstrip_str PYBB_TOPIC_PAGE_SIZE = getattr(settings, 'PYBB_TOPIC_PAGE_SIZE', 10) PYBB_FORUM_PAGE_SIZE = getattr(settings, 'PYBB_FORUM_PAGE_SIZE', 20) PYBB_AVATAR_WIDTH = getattr(settings, 'PYBB_AVATAR_WIDTH'...
orlenko/bccf
src/pybb/defaults.py
Python
unlicense
3,811
"""Timetable of buses operated by Uttar Pradesh State Road Transport Corporation (UPSRTC) """ from datetime import datetime import re import scraperwiki import lxml.html base_url = 'http://www.upsrtc.com/online/query/' services = dict() def find_by_text(element, selector, text): for a in element.cssselect(select...
sramana/rtc-schedule
uttar_pradesh.py
Python
unlicense
2,884
# This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or distribute # this software, either in source code form or as a compiled binary, for any # purpose, commercial or non-commercial, and by any means. # # In jurisdictions that recog...
riceissa/static-site-generator
tags.py
Python
unlicense
7,669
import unittest from typing import List import utils # O(n) time. O(n) space. DFS, hash set. class Solution: def circularArrayLoop(self, nums: List[int]) -> bool: n = len(nums) for start, move in enumerate(nums): if move == 0: continue forward = move > 0 ...
chrisxue815/leetcode_python
problems/test_0457_dfs_hashset.py
Python
unlicense
1,180
class Solution: def exist(self, board, word): """ :type board: List[List[str]] :type word: str :rtype: bool """ for i in range(0, len(board)): if not board: return False for j in range(0, len(board[0])): ...
MingfeiPan/leetcode
backtracking/79.py
Python
apache-2.0
1,039
from .data_asset import DataAsset from .file_data_asset import FileDataAsset
great-expectations/great_expectations
great_expectations/data_asset/__init__.py
Python
apache-2.0
77
# vim: set ts=4:et import os import uuid import socket from charmhelpers.core.hookenv import ( config, relation_ids, related_units, relation_get, unit_get, cached, ) from charmhelpers.fetch import ( apt_install, ) from charmhelpers.contrib.openstack.context import ( OSContextGenerator, ...
CiscoSystems/jujucharm-n1k
charms/precise/quantum-gateway/hooks/quantum_contexts.py
Python
apache-2.0
6,598
from argparse import ArgumentParser from typing import Any, List from zerver.lib.actions import do_create_multiuse_invite_link, ensure_stream from zerver.lib.management import ZulipBaseCommand from zerver.models import PreregistrationUser, Stream class Command(ZulipBaseCommand): help = "Generates invite link tha...
brainwane/zulip
zerver/management/commands/generate_multiuse_invite_link.py
Python
apache-2.0
1,624
from playSounds import play BEAT = 500 HALF = int(BEAT/2) QUART = int(BEAT/4) def playSong(): play('C4' ,BEAT*2) play('E4', BEAT) play('G4', BEAT) play('A4', BEAT + 3*QUART) play('E4', QUART) play('A4', 2*BEAT) play('C5', BEAT*2) play('D5', BEAT) play('G4', BEAT) play('C5', BEA...
awhittle3/pyBattleship
playAnchors.py
Python
apache-2.0
325
""" ietf_ipv6_unicast_routing This YANG module augments the 'ietf\-routing' module with basic configuration and state data for IPv6 unicast routing. Copyright (c) 2014 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or withou...
111pontes/ydk-py
ietf/ydk/models/ietf/ietf_ipv6_unicast_routing.py
Python
apache-2.0
1,614
"""Training script for DLRM model.""" import functools import REDACTED from absl import app as absl_app from absl import flags import numpy as np import tensorflow.compat.v1 as tf from REDACTED.tensorflow.python.tpu import tpu_embedding from REDACTED.tensorflow_models.mlperf.models.rough.dlrm import dataloader from ...
mlperf/training_results_v0.7
Google/benchmarks/dlrm/implementations/dlrm-research-TF-tpu-v4-16/dlrm_main.py
Python
apache-2.0
8,831
import errno import os from flask import current_app, abort import ujson import werkzeug.utils def safe_mkdirs(path): if os.path.exists(path): return try: os.mkdir(path) except OSError as e: # Check for race conditions. If for some reason two threads/greenlets/whatever # tries to create the sam...
shuhaowu/projecto
projecto/utils.py
Python
apache-2.0
5,402
from django import forms from .models import Post from django.contrib.auth import ( authenticate, get_user_model, login, logout, ) class PostForm(forms.ModelForm): # Post Thread View class Meta: model = Post fields = ['title','image', 'user','country','guide'] widgets = { 'guide' : forms.Textarea(attrs = ...
lemarcudal/sha_thedivision
test/mysite/webapp/forms.py
Python
apache-2.0
1,935
# Copyright 2020 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
quantumlib/Cirq
cirq-core/cirq/work/observable_grouping.py
Python
apache-2.0
3,492
from __future__ import absolute_import, division, print_function, with_statement import collections from contextlib import closing import errno import gzip import logging import os import re import socket import sys from tornado import gen from tornado.httpclient import AsyncHTTPClient from tornado.httputil import HT...
yuyangit/tornado
tornado/test/simple_httpclient_test.py
Python
apache-2.0
22,936
#!/usr/bin/env python # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") from bpf import BPF from pyroute2 import IPRoute ipr = IPRoute() text = """ int hello(struct __sk_buff *skb) { return 1; } """ try: b = BPF(text=text, debug=0) fn = b.load_func("hello", BP...
hgn/bcc
examples/simple_tc.py
Python
apache-2.0
804
# 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 (t...
lym/allura-git
ForgeSVN/forgesvn/model/svn.py
Python
apache-2.0
31,966
def myAssertDictEqual(a, b): dictAInB(a, b) dictAInB(b, a) def dictAInB(a, b): for akey, avalue in a.items(): bvalue = b.get(akey) if akey in b: if avalue == bvalue: continue raise Exception("%s[%s] != [%s]" % (akey, avalue, bvalue))
netkraken/analyzer
src/unittest/python/testhelper.py
Python
apache-2.0
299
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2019) Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licen...
HewlettPackard/oneview-ansible
test/test_oneview_sas_logical_interconnect_group_facts.py
Python
apache-2.0
2,046
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse from onnx import load, checker, NodeProto def check_model(): # type: () -> None parser = argparse.ArgumentParser('check-model') parser.add_arg...
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/bin/checker.py
Python
apache-2.0
749
from datetime import datetime from ... search import get_results, phone_hits, both_hits from ... run_cli import Arguments from multiprocessing.dummy import Pool as ThreadPool pool = ThreadPool(16) def unique_features(feature, data): features = set() for v in data.values(): try: if isins...
qadium-memex/linkalytics
linkalytics/factor_validator/coincidence/coincidence.py
Python
apache-2.0
1,870
# Copyright (c) 2013 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 ...
igor-toga/local-snat
neutron/tests/unit/scheduler/test_l3_agent_scheduler.py
Python
apache-2.0
92,873
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.postgres.fields.hstore class Migration(migrations.Migration): dependencies = [ ('core', '0007_auto_20150508_0617'), ] operations = [ migrations.AddField( ...
AjabWorld/ajabsacco
ajabsacco/core/migrations/0008_auto_20150508_0631.py
Python
apache-2.0
2,861
# Copyright 2015-2017 Capital One Services, 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 agreed ...
taohungyang/cloud-custodian
c7n/output.py
Python
apache-2.0
9,658
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gotapi.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the ...
kushsharma/GotAPI
manage.py
Python
apache-2.0
804
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Cisco Systems, Inc. # Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use...
sandvine/horizon
openstack_dashboard/api/neutron.py
Python
apache-2.0
50,711
# Copyright 2018 DeepMind Technologies Limited. 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 ...
deepmind/acme
acme/jax/losses/impala.py
Python
apache-2.0
3,849
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "jabbs.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Santiago-vdk/jabbs
manage.py
Python
apache-2.0
248
# -*- 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-datalabeling
samples/generated_samples/datalabeling_v1beta1_generated_data_labeling_service_update_evaluation_job_sync.py
Python
apache-2.0
1,524
# Copyright (c) 2011-2012 OpenStack Foundation # Copyright (c) 2012 Canonical Ltd # Copyright (c) 2012 SUSE LINUX Products GmbH # 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 o...
windskyer/k_nova
paxes_nova/scheduler/filters/image_props_filter.py
Python
apache-2.0
5,086
#!/usr/bin/env python3 # Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 r"""Converts mubi mako templates """ from mubi import prim_mubi from secded_gen import format_c_files def main(): prim_mubi.gen() c_path = pr...
lowRISC/opentitan
util/design/gen-mubi.py
Python
apache-2.0
416
from django.contrib.auth.decorators import user_passes_test, login_required from profiles.models import Musician, NonMusician from django.core.exceptions import ObjectDoesNotExist from django.shortcuts import redirect # import login_required user_passes_test # these functions are made to be passed into user_passes_tes...
lancekrogers/music-network
cleff/custom_wrappers.py
Python
apache-2.0
1,287
''' Intuition ---- Intuition is an engine, some building bricks and a set of tools meant to let you efficiently and intuitively make your own automated quantitative trading system. It is designed to let traders, developers and scientists explore, improve and deploy market technical hacks. :copyright (c)...
intuition-io/intuition
intuition/__init__.py
Python
apache-2.0
541
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Train an Auxiliary Classifier Generative Adversarial Network (ACGAN) on the MNIST dataset. See https://arxiv.org/abs/1610.09585 for more details. You should start to see reasonable images after ~5 epochs, and good images by ~15 epochs. You should use a GPU, as the conv...
kitstar/DNNConvert
example/keras/mnist_acgan.py
Python
apache-2.0
11,426
# -*- coding: utf-8 -*- # auxilium # -------- # Python project for an automated test and deploy toolkit. # # Author: sonntagsgesicht # Version: 0.1.8, copyright Saturday, 02 October 2021 # Website: https://github.com/sonntagsgesicht/auxilium # License: Apache License 2.0 (see LICENSE file) from datetime import ...
sonntagsgesicht/regtest
.aux/venv/lib/python3.9/site-packages/auxilium/tools/setup_tools.py
Python
apache-2.0
3,576
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
google-research/google-research
schema_guided_dst/baseline/pred_utils.py
Python
apache-2.0
6,649
#!/cshome/pranjali/410/CMPUT410-Lab6-Django/v1/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
pranner/CMPUT410-Lab6-Django
v1/bin/django-admin.py
Python
apache-2.0
164
# Copyright 2012 OpenStack Foundation # All Rights Reserved # Copyright (c) 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lic...
raildo/nova
nova/network/neutronv2/api.py
Python
apache-2.0
88,749
from rx import Observable from rx.testing import TestScheduler, ReactiveTest, is_prime, MockDisposable from rx.disposables import Disposable, SerialDisposable on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_error subscribe = ReactiveTest.subscribe subscribed = Reactiv...
Reactive-Extensions/RxPy
tests/test_observable_creation.py
Python
apache-2.0
34,022
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013, 2014 Intel Corporation. # Copyright 2013, 2014 Isaku Yamahata <isaku.yamahata at intel com> # <isaku.yamahata at gmail com> # All Rights Reserved. # # # Licensed under the Apache License, Version 2.0 (the "License"); ...
yamahata/tacker
tacker/vm/drivers/nova/nova.py
Python
apache-2.0
9,504
from citrination_client.models.columns.base import BaseColumn from citrination_client.base.errors import CitrinationClientError from six import string_types class CategoricalColumn(BaseColumn): """ A categorical column configuration for a data view. Parameterized with the basic column options and a list o...
CitrineInformatics/python-citrination-client
citrination_client/models/columns/categorical.py
Python
apache-2.0
2,304
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleads/google-ads-python
google/ads/googleads/v10/enums/types/payment_mode.py
Python
apache-2.0
1,172
"""HTTP Client for asyncio.""" import asyncio import base64 import hashlib import os import sys import traceback import warnings from multidict import CIMultiDict, MultiDict, MultiDictProxy, istr from yarl import URL import aiohttp from . import hdrs, helpers from ._ws_impl import WS_KEY, WebSocketParser, WebSocket...
esaezgil/aiohttp
aiohttp/client.py
Python
apache-2.0
26,142
from __future__ import absolute_import from __future__ import unicode_literals import sys from .version import ComposeVersion DEFAULT_TIMEOUT = 10 HTTP_TIMEOUT = 60 IMAGE_EVENTS = ['delete', 'import', 'load', 'pull', 'push', 'save', 'tag', 'untag'] IS_WINDOWS_PLATFORM = (sys.platform == "win32") LABEL_CONTAINER_NUMB...
dnephin/compose
compose/const.py
Python
apache-2.0
2,457
# Daniel Fernandez Rodriguez <danielfr@cern.ch> from argparse import ArgumentParser from collections import defaultdict from requests_kerberos import HTTPKerberosAuth import json import requests import subprocess import logging import sys class PuppetDBNodes(object): def __init__(self, args): for k, v ...
ak0ska/rundeck-puppetdb-nodes
rundeck-puppetdb-nodes-plugin/contents/rundeck_puppetdb_nodes.py
Python
apache-2.0
5,881
#!/usr/bin/env python # -*- coding: utf-8 -*- # # mongo-mockup-db documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in th...
ajdavis/mongo-mockup-db
docs/conf.py
Python
apache-2.0
8,880
"""The tests for the utility_meter sensor platform.""" import logging from datetime import timedelta from unittest.mock import patch from contextlib import contextmanager from tests.common import async_fire_time_changed from homeassistant.const import EVENT_HOMEASSISTANT_START from homeassistant.setup import async_se...
HydrelioxGitHub/home-assistant
tests/components/utility_meter/test_sensor.py
Python
apache-2.0
6,632
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
hanlind/nova
nova/tests/unit/volume/encryptors/test_luks.py
Python
apache-2.0
10,988
#file : InMoov2.full3.byGael.Langevin.1.py # this script is provided as a basic guide # most parts can be run by uncommenting them # InMoov now can be started in modular pieces import random import threading import itertools leftPort = "COM20" rightPort = "COM7" i01 = Runtime.createAndStart("i01", "InMoov") #inmoov...
MyRobotLab/pyrobotlab
home/hairygael/InMoov2.full3.byGael.Langevin.1.py
Python
apache-2.0
138,420
#!/usr/bin/env python # -*- coding: utf-8 -*- #copyRight by heibanke def test(callback): print 'test func begin' callback() def test1(callback): print 'test1 func begin' for func in callback: func() def cb1(): print 'callback 1' def cb2(): print 'callback 2' if __name__ ==...
heibanke/python_do_something
Code/Chapter4/func_callback1.py
Python
apache-2.0
383
"""Smoke test step that mutates context.""" def run_step(context): """Mutate context inside step.""" context['inside_step'] = 'arb'
pypyr/pypyr-cli
tests/arbpack/arbmutatingstep.py
Python
apache-2.0
142
"""Test for letsencrypt_apache.dvsni.""" import unittest import shutil import mock from acme import challenges from letsencrypt.plugins import common from letsencrypt.plugins import common_test from letsencrypt_apache.tests import util class DvsniPerformTest(util.ApacheTest): """Test the ApacheDVSNI challenge...
digideskio/lets-encrypt-preview
letsencrypt_apache/tests/dvsni_test.py
Python
apache-2.0
4,161
# Copyright (c) 2014 Bull. # # 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, sof...
frossigneux/python-kwrankingclient
kwrankingclient/v1/shell_commands/nodes.py
Python
apache-2.0
1,816
# 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...
jiaphuan/models
tutorials/image/cifar10/cifar10.py
Python
apache-2.0
14,665
class Solution: def evalRPN(self, tokens: List[str]) -> int: stack = [] result = 0 for c in tokens: if c in ['+', '-', '*', '/']: op2 = stack.pop() op1 = stack.pop() if c == '+': stack.append(op1+op2) ...
stuti-rastogi/leetcodesolutions
150_reversePolishNotation.py
Python
apache-2.0
602
from OpenGL.GL import * from .geometric import * from ..spaces.objectives import * from ..spaces.statespace import * from ..spaces.configurationspace import * from ..spaces.edgechecker import * from ..spaces.metric import * from ..spaces.biassets import InfiniteBiasSet from ..planners.problem import PlanningProblem imp...
krishauser/pyOptimalMotionPlanning
pomp/example_problems/lqr.py
Python
apache-2.0
1,843
"""Helper for aiohttp webclient stuff.""" from __future__ import annotations import asyncio from contextlib import suppress from ssl import SSLContext import sys from typing import Any, Awaitable, cast import aiohttp from aiohttp import web from aiohttp.hdrs import CONTENT_TYPE, USER_AGENT from aiohttp.web_exceptions...
adrienbrault/home-assistant
homeassistant/helpers/aiohttp_client.py
Python
apache-2.0
5,482
import pprint from stellar_sdk import ( Asset, Keypair, MuxedAccount, Network, Server, TransactionBuilder, ) horizon_url = "https://horizon-testnet.stellar.org/" network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE alice_secret = "SAHN2RCKC5I7NFDCIUKA3BG4H4T6WMLLGSAZVDKUHF7PQXHMYWD7UAIH" b...
StellarCN/py-stellar-base
examples/payment_muxed_account.py
Python
apache-2.0
1,168
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
sasha-gitg/python-aiplatform
google/cloud/aiplatform_v1/types/dataset_service.py
Python
apache-2.0
14,664
__author__ = 'thawes' from S3Functions import S3Functions
timotheosh/DynamoDbBackup
src/main/resources/Lib/S3Storage/__init__.py
Python
apache-2.0
57
import re import sys import struct import codecs class REMatcher(object): def __init__(self, matchstring): self.matchstring = matchstring def match(self,regexp): self.rematch = re.match(regexp, self.matchstring, re.IGNORECASE) return bool(self.rematch) def group(self,i): ...
MoebiuZ/OpcodeOne
oldfiles/oldcode/tools/assemblerold/functions.py
Python
apache-2.0
5,835
#!/usr/bin/python2 from fabric.api import * from fabric.tasks import execute import sys import os import argparse import ntpath import fnmatch """ Author: mtask@github.com """ class multissh(object): def manage_servers(self, add=False, delete=False, param=None): if add: self.server = param....
mtask/multissh
multissh.py
Python
apache-2.0
8,206
"""Collect Treadmill node information after a crash. """ from __future__ import absolute_import import os import glob import logging import shutil import tempfile from treadmill import fs from treadmill import subproc _LOGGER = logging.getLogger(__name__) _IFCONFIG = 'ifconfig' _SYSCTL = 'sysctl' _DMESG = 'dmesg' ...
toenuff/treadmill
lib/python/treadmill/postmortem.py
Python
apache-2.0
4,780
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-06-08 05:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Reward...
guanxiLi/django_check
d3jscluster/cluster/migrations/0001_initial.py
Python
apache-2.0
2,142
#!/usr/bin/env python import tornado import socket import maproxy.proxyserver class Session(object): """ The Session class if the heart of the system. - We create the session when a client connects to the server (proxy). this connection is "c2p" - We create a connection to the server (p2s) - Ea...
zferentz/maproxy
maproxy/session.py
Python
apache-2.0
16,890