code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
""" (c) 2013 LinkedIn Corp. 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 law or agreed to in writing...
GoUbiq/pyexchange
pyexchange/__init__.py
Python
apache-2.0
853
from cool_commits.parsers import all_parsers from cool_commits.utils import git_all_commits def find(path): commits_list = git_all_commits(path) for parser in all_parsers: yield str(parser(commits_list, path)) def info(path): commits_list = git_all_commits(path) for parser in all_parsers: ...
OrDuan/cool_commits
cool_commits/api.py
Python
apache-2.0
368
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
polyaxon/polyaxon
core/tests/test_polypod/test_contexts.py
Python
apache-2.0
14,317
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 ...
kdart/pycopia
SNMP/bin/show_neighbors.py
Python
apache-2.0
888
from unittest import TestCase from unittest.mock import patch from sys import modules from json import loads devices_data = [""" {"identifier":"192.168.56.101:5555", "displayName":"vbox86p", "model":"Nexus_6P_API_23", "version":"6.0", "ven...
Mitko-Kerezov/ns-sublime-plugin
tests/test_select_device.py
Python
apache-2.0
6,735
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="gabriel-server", version="2.0.2", author="Roger Iyengar", author_email="ri@rogeriyengar.com", description="Server for Wearable Cognitive Assistance Applications", long_description=lo...
cmusatyalab/gabriel
server/setup.py
Python
apache-2.0
996
#!/usr/bin/env python # -*- coding: utf-8 -*- APPNAME = 'desktop-mirror' DEFAULT_PORT = 47767 VERSION = 'v0.8-7-g2038d52'
fcwu/desktop-mirror
lib/common.py
Python
apache-2.0
123
# Copyright 2016 Matthias Gazzari # # 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 writ...
qtux/instmatcher
tests/test_parser.py
Python
apache-2.0
21,291
# 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...
mufaddalq/cloudstack-datera-driver
test/integration/smoke/test_loadbalance.py
Python
apache-2.0
25,268
''' An implementation of the `Annotation store API <http://docs.annotatorjs.org/en/v1.2.x/storage.html.>`_ for `Annotator.js <http://annotatorjs.org/>`_. '''
emory-libraries/readux
readux/annotations/__init__.py
Python
apache-2.0
157
# Copyright 2013 NEC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
ntymtsiv/tempest
tempest/services/compute/v3/json/aggregates_client.py
Python
apache-2.0
3,750
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 Cloudbase Solutions Srl # # 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/LICEN...
cernops/cloudbase-init
cloudbaseinit/tests/metadata/services/test_ec2service.py
Python
apache-2.0
5,279
#!/usr/bin/env python import os import sys import string import random def id_generator(size=6, chars=string.ascii_uppercase + string.digits): return ''.join(random.choice(chars) for _ in range(size)) kernels = { 'aes-aes' : 'gf_alog,gf_log,gf_mulinv,rj_sbox,rj_xtime,aes_subBytes,aes_addRoundKey,aes_addRoundKey...
giosalv/526-aladdin
MachSuite/script/llvm_compile.py
Python
apache-2.0
3,257
#!/usr/bin/env python # neighbors # a/b < c/d # need bc - ad = 1 # The converse is also true. If # bc - ad = 1 # for positive integers a,b,c and d with a < b and c < d then a/b and c/d # will be neighbours in the Farey sequence of order max(b,d). # By listing the set of reduced proper fractions for D <= 1,000,000 i...
dhermes/project-euler
python/complete/no071.py
Python
apache-2.0
971
# # author: Cosmin Basca # # Copyright 2010 University of Zurich # # 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 a...
cosminbasca/rdftools
rdftools/tools/jvmrdftools/__init__.py
Python
apache-2.0
3,224
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apach...
kogotko/carburetor
openstack_dashboard/api/nova.py
Python
apache-2.0
42,564
# -*- coding: utf-8 -*- """ Data preprocessing for ORCHID corpus """ from typing import List, Tuple # defined strings for special characters, # from Table 4 in ORCHID paper CHAR_TO_ESCAPE = { " ": "<space>", "+": "<plus>", "-": "<minus>", "=": "<equal>", ",": "<comma>", "$": "<dollar>", "."...
PyThaiNLP/pythainlp
pythainlp/tag/orchid.py
Python
apache-2.0
3,490
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('let_me_app', '0007_auto_20150723_2238'), ] operations = [ migrations.AlterField( model_name='event', ...
oleg-chubin/let_me_play
let_me_app/migrations/0008_auto_20150809_1341.py
Python
apache-2.0
474
# -*- coding: utf-8 -*- # Scrapy settings for miner project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'miner' SPIDER_MODULES = ['miner.spiders'] NEWSPIDER_...
CharlesZhong/hupu_miner
miner/miner/settings.py
Python
apache-2.0
821
# -*- coding: utf-8 -*- """ This module returns stats about the DynamoDB table """ import math from datetime import datetime, timedelta from boto.exception import JSONResponseError, BotoServerError from retrying import retry from dynamic_dynamodb.aws import dynamodb from dynamic_dynamodb.log_handler import LOGGER as ...
tellybug/dynamic-dynamodb
dynamic_dynamodb/statistics/gsi.py
Python
apache-2.0
6,518
SAMPLE_POLICIES = [ { 'resources': { 'indices': ['kibana-int', ], }, 'users': ['*'], 'permissions': ['index_write', 'index_read'] }, { 'resources': { 'cluster': True }, 'users': ['alan'], 'permissions': ['kibana_admin',...
HatPull/tornado-elasticsearch-proxy
es_proxy/tests/constants.py
Python
apache-2.0
648
from kinds import lowercase_first_word class Token(object): """ Represents the specification for a Token in the TokenSyntax file. """ def __init__(self, name, kind, text=None, is_keyword=False): self.name = name self.kind = kind self.text = text or "" self.is_keyword =...
frootloops/swift
utils/gyb_syntax_support/Token.py
Python
apache-2.0
5,109
# 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, software # d...
Mirantis/tempest
tempest/api/orchestration/stacks/test_neutron_resources.py
Python
apache-2.0
7,913
# # Copyright 2019 The FATE 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 appli...
FederatedAI/FATE
examples/pipeline/hetero_logistic_regression/pipeline-hetero-lr-normal.py
Python
apache-2.0
2,733
# pylint: disable=missing-docstring from rest_framework import mixins, serializers, viewsets from resolwe.elastic.viewsets import ElasticSearchBaseViewSet, ElasticSearchCombinedViewSet from .elastic_indexes import TestSearchDocument from .models import TestModel class TestSerializer(serializers.Serializer): # pyli...
jberci/resolwe
resolwe/elastic/tests/test_app/viewsets.py
Python
apache-2.0
1,866
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from dataclasses import dataclass from typing import Optional from pants.backend.python.rules.pex import Pex from pants.backend.python.rules.pex_from_target_closure import CreatePexFromTa...
wisechengyi/pants
src/python/pants/backend/python/rules/python_create_binary.py
Python
apache-2.0
4,021
# Copyright 2015 Google 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 required by applicable law or a...
ajessup/appstart
setup.py
Python
apache-2.0
2,381
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Big Switch Networks, 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.a...
kaiweifan/vse-lbaas-plugin-poc
quantum/plugins/bigswitch/plugin.py
Python
apache-2.0
52,432
# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Modifications made by Cloudera are: # Copyright (c) 2016 Cloudera, 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. A cop...
jayceyxc/hue
desktop/core/ext-py/navoptapi-0.1.0/navoptapi/old_serialize.py
Python
apache-2.0
3,364
import os, sys from datetime import datetime from typing import List import boto3 import botocore.exceptions from . import register_parser from .util import ThreadPoolExecutor from .util.printing import format_table, page_output def get_stats_for_region(region): try: session = boto3.Session(region_name=r...
kislyuk/aegea
aegea/top.py
Python
apache-2.0
1,383
# Copyright 2021 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 agreed to i...
GoogleCloudPlatform/professional-services
tools/pubsub2inbox/processors/groups.py
Python
apache-2.0
5,644
import numpy as np from sklearn import cluster, datasets, preprocessing import pickle import gensim import time import re import tokenize from scipy import spatial def save_obj(obj, name ): with open( name + '.pkl', 'wb') as f: pickle.dump(obj, f, protocol=2) def load_obj(name ): with open( name + '....
tpsatish95/Topic-Modeling-Social-Network-Text-Data
Kseeds/modifiedCluster.py
Python
apache-2.0
4,434
import re import string_example """ One small letter, surrounded by EXACTLY three big bodyguards on each of its sides. """ class StingMatch(object): """String match """ def __init__(self): self.msg = string_example.string def match(self): Pattern = '[^A-Z][A-Z]{3}[a-z][A-Z]{3}[^A...
muzixing/python_challenge
l3_match.py
Python
apache-2.0
515
# -*- coding:utf-8 -*- import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib vm = test_lib.lib_get_specific_stub('e2e_mini/vm', 'vm') vm_ops = None vm_name = 'vm-' + vm.get_time_postfix() backup_list = ['backup-' + vm.get_time_postfix() for _ in range(2)] def test(): global...
zstackio/zstack-woodpecker
integrationtest/vm/e2e_mini/vm/test_running_vm_backup_ops.py
Python
apache-2.0
1,138
import contextlib import functools import warnings import numpy as np import pandas as pd from ..plot.plot import _PlotMethods from . import indexing from . import groupby from . import ops from . import utils from . import variable from .alignment import align from .common import AbstractArray, BaseDataObject from ...
cpaulik/xray
xray/core/dataarray.py
Python
apache-2.0
41,458
# coding=utf-8 # Copyright 2013 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
ramineni/myironic
ironic/tests/drivers/test_ipminative.py
Python
apache-2.0
20,240
# 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, software # distribu...
jarrodmcc/OpenFermion
src/openfermion/utils/__init__.py
Python
apache-2.0
5,551
# coding: utf-8 # # Copyright 2014 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 requi...
miyucy/oppia
core/domain/dependency_registry_test.py
Python
apache-2.0
4,450
# Original topological sort code written by Ofer Faigon (www.bitformation.com) and used with permission # Permission is hereby granted to copy, modify and use this source code for any purpose as long as the above comment line is included with it. """ Loop detection and depth calculation added by Zhenlei Cai (c) 2010...
jerryzhenleicai/lattice
lattice/topo_sort.py
Python
apache-2.0
3,768
import logging import server.util.tags as tag_utl from server.cache import cache from server.auth import user_admin_mediacloud_client import server.views.sources.apicache as apicache from server.views.stories import QUERY_LAST_MONTH, QUERY_ENGLISH_LANGUAGE logger = logging.getLogger(__name__) @cache.cache_on_argume...
mitmedialab/MediaCloud-Web-Tools
server/views/sources/geocount.py
Python
apache-2.0
733
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # 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...
yamateh/robotframework
src/robot/utils/robotinspect.py
Python
apache-2.0
1,085
""" Caching utilities for zipline """ from collections import MutableMapping import errno import os import pickle from distutils import dir_util from shutil import rmtree, move from tempfile import mkdtemp, NamedTemporaryFile import pandas as pd from .context_tricks import nop_context from .paths import ensure_direct...
humdings/zipline
zipline/utils/cache.py
Python
apache-2.0
10,994
"""Provides a class for managing BIG-IP L7 Rule Action resources.""" # coding=utf-8 # # Copyright (c) 2017-2021 F5 Networks, 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:/...
f5devcentral/f5-cccl
f5_cccl/resource/ltm/policy/action.py
Python
apache-2.0
5,095
# 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...
openstack/glance
glance/version.py
Python
apache-2.0
731
try: from collections import Counter except: from Counter import Counter # For Python < 2.7 import traceback import wordList import anagram import random import math import re # Allows channel members to play an acronym-based word game. # !jumble [min [max]] -- starts a new round, optionally setting the min and max le...
iogf/candocabot
plugins/jumble/jumble.py
Python
apache-2.0
5,167
import tensorflow as tf, sys image_path = sys.argv[1] # Read in the image_data image_data = tf.gfile.FastGFile(image_path, 'rb').read() # Loads label file, strips off carriage return label_lines = [line.rstrip() for line in tf.gfile.GFile("/cellule/retrained_labels.txt")] # Unpersists graph from ...
sharanramjee/TensorFlow-plant-and-animal-cell-image-classifier
label_image.py
Python
apache-2.0
1,364
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('portal', '0017_auto_20171214_1138'), ] operations = [ migrations.AlterField( model_name='ensemblinsdcmapping', ...
RNAcentral/rnacentral-webcode
rnacentral/portal/migrations/0018_auto_20171214_1524.py
Python
apache-2.0
511
"""(Re)builds feeds for categories""" import os import datetime import jinja2 from google.appengine.api import app_identity import dao import util def build_and_save_for_category(cat, store, prefix): """Build and save feeds for category""" feed = build_feed(cat) save_feeds(store, feed, prefix, cat.key.id...
notapresent/rutracker_rss
feeds.py
Python
apache-2.0
2,363
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
geokala/cloudify-agent
cloudify_agent/api/utils.py
Python
apache-2.0
10,561
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
armpc/repo
subcmds/init.py
Python
apache-2.0
7,741
from twisted.trial import unittest from minerstat.service import MinerStatService from minerstat.rig import Rig from minerstat.remote import MinerStatRemoteProtocol, Command from minerstat.utils import Config from minerstat.miners.claymore import EthClaymoreMiner from twisted.internet import task, defer from mock impor...
dpnova/pynerstat
minerstat/tests/test_minerstat.py
Python
apache-2.0
2,307
import scipy.ndimage as ndi class BBox(object): def __init__(self, x1, y1, x2, y2): ''' (x1, y1) is the upper left corner, (x2, y2) is the lower right corner, with (0, 0) being in the upper left corner. ''' if x1 > x2: x1, x2 = x2, x1 if y1 > y2: y1, y2 = y2, y1 self....
lquirosd/TFM
ILA/code/bbox.py
Python
apache-2.0
2,024
# # Copyright 2017 the original author or 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 applicable law or...
opencord/voltha
voltha/adapters/simulated_onu/simulated_onu.py
Python
apache-2.0
17,381
from vt_manager_kvm.communication.sfa.util.xrn import urn_to_hrn from vt_manager_kvm.communication.sfa.trust.credential import Credential from vt_manager_kvm.communication.sfa.trust.auth import Auth class Start: def __init__(self, xrn, creds, **kwargs): hrn, type = urn_to_hrn(xrn) valid_creds ...
ict-felix/stack
vt_manager_kvm/src/python/vt_manager_kvm/communication/sfa/methods/Start.py
Python
apache-2.0
471
""" Special purpose k - medoids algorithm """ import numpy as np def fit(sim_mat, D_len, cidx): """ Algorithm maximizes energy between clusters, which is distinction in this algorithm. Distance matrix contains mostly 0, which are overlooked due to search of maximal distances. Algorithm does not try to retai...
romanorac/discomll
discomll/ensemble/core/k_medoids.py
Python
apache-2.0
1,504
# Copyright (c) 2014 Rackspace, 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 wr...
obulpathi/cdn1
cdn/manager/default/v1.py
Python
apache-2.0
1,291
# -*- coding: utf-8 -*- # # envoy documentation build configuration file, created by # sphinx-quickstart on Sat May 28 10:51:27 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...
jrajahalme/envoy
docs/conf.py
Python
apache-2.0
9,203
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
kayhayen/Nuitka
tests/programs/absolute_import/foobar/foobar.py
Python
apache-2.0
1,043
# -*- 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
google/turbinia
turbinia/jobs/partitions.py
Python
apache-2.0
1,678
# Copyright 2022 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...
keras-team/keras
keras/models/__init__.py
Python
apache-2.0
1,704
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Grid Dynamics # 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/l...
TieWei/nova
nova/virt/libvirt/imagebackend.py
Python
apache-2.0
23,315
import settings import mysql.connector from domain.domain import Article from domain.domain import Project from domain.domain import User from domain.domain import Tag import service.database as db # 文章管理 class ArticleService: # 查询最近发表的文章 def query_most_published_article(self): conn = d...
hwangsyin/cbrc-devteam-blog
service/service.py
Python
apache-2.0
5,715
import collections import json import os class Settings(collections.MutableMapping): def __init__(self, filename): self.filename = filename self.store = {} self.read() def read(self): if os.path.exists(self.filename): with open(self.filename, 'r') as f: ...
silly-wacky-3-town-toon/SOURCE-COD
otp/otpbase/Settings.py
Python
apache-2.0
893
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
datacommonsorg/data
scripts/eurostat/regional_statistics_by_nuts/population_density/PopulationDensity_preprocess_gen_tmcf.py
Python
apache-2.0
3,311
# Generated by Django 2.2 on 2020-06-20 15:23 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="A", fields=[ ( "id", ...
3YOURMIND/django-migration-linter
tests/test_project/app_make_not_null_with_lib_default/migrations/0001_initial.py
Python
apache-2.0
661
import numpy as np import scipy.io as io dataStructure = io.loadmat('starfish.mat') receiverPoints = dataStructure['receivers'] sourcePoints = dataStructure['receivers'] scattererPoints = dataStructure['scatterer'] scatteredData = dataStructure['scatteredData'] recordingTimes = dataStructure['recordTimes'] recordingT...
aaronprunty/starfish
vezda/examples/starfish-tutorial/data/extractData.py
Python
apache-2.0
609
""" Auto Configuration Helper """ import logging import os import requests from urlparse import urlparse from constants import InsightsConstants as constants from cert_auth import rhsmCertificate from connection import InsightsConnection from config import CONFIG as config logger = logging.getLogger(__name__) APP_NAM...
wcmitchell/insights-core
insights/client/auto_config.py
Python
apache-2.0
7,561
import re from markdown import Markdown, TextPreprocessor from smartypants import smartyPants from pygments import highlight from pygments.formatters import HtmlFormatter from pygments.lexers import get_lexer_by_name, TextLexer class CodeBlockPreprocessor(TextPreprocessor): """ The Pygments Markdown Pre...
taylanpince/django-doc-wiki
doc_wiki/parsers.py
Python
apache-2.0
2,666
# # 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...
hortonworks-spark/spark-llap
python/pyspark_llap/sql/__init__.py
Python
apache-2.0
879
# Copyright 2012 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...
afrolov1/nova
nova/openstack/common/network_utils.py
Python
apache-2.0
5,553
### Type Utilisateur # username : string # password : string # import EnsUtilisateurs import EnsAdmins import EnsReservation import EnsEmprunt class Utilisateur: def __init__(self,user_id=None,username="",password="",abonnementValide=False,empruntEnCours = False,reservationEnCours = False,nbRetard ...
Darkyler/Piscine
Utilisateur.py
Python
apache-2.0
3,028
# Copyright 2015 Infoblox 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 required by...
infobloxopen/heat-infoblox
heat_infoblox/tests/test_ha_pair.py
Python
apache-2.0
6,180
import os from pyjs import linker from pyjs import translator from pyjs import util from optparse import OptionParser import pyjs PLATFORM='spidermonkey' APP_TEMPLATE = """ var $wnd = new Object(); $wnd.document = new Object(); var $doc = $wnd.document; var $moduleName = "%(app_name)s"; var $pyjs = new Object(); $pyj...
andreyvit/pyjamas
pyjs/src/pyjs/sm.py
Python
apache-2.0
5,725
#!/usr/bin/python # # Copyright 2015 Google 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 required by...
Roshan2017/spinnaker
dev/dev_runner.py
Python
apache-2.0
10,050
# Copyright (c) 2016 PaddlePaddle 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 applic...
chengduoZH/Paddle
python/paddle/dataset/imdb.py
Python
apache-2.0
4,280
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
huggingface/transformers
src/transformers/models/squeezebert/__init__.py
Python
apache-2.0
2,532
######## # Copyright (c) 2014-2020 Cloudify Platform Ltd. 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 ...
cloudify-cosmo/cloudify-gcp-plugin
cloudify_gcp/gcp.py
Python
apache-2.0
7,178
# Copyright 2014-present, Apstra, Inc. All rights reserved. # # This source code is licensed under End User License Agreement found in the # LICENSE file at http://www.apstra.com/community/eula from collections import namedtuple import time import logging from functools import partial from aeon.nxos.exceptions import ...
Apstra/aeon-venos
pylib/aeon/nxos/autoload/guestshell.py
Python
apache-2.0
7,748
# # Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U # # 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 unde...
ging/fiware-keystone-scim
keystone_scim/contrib/scim/converter.py
Python
apache-2.0
6,230
def main(i): ins = i.split("\n") arr = [int(i) for i in ins] index =0 iterations = 0 while (index>=0 and index < len(arr)): arr[index], index = arr[index] + 1, index + arr[index]; iterations = iterations+1 print(iterations) def main2(i): ins = i.split("\n") arr = [int(i) for i in ins] inde...
stanzheng/advent-of-code
2017/day5/main.py
Python
apache-2.0
5,444
# -*- encoding: utf-8 -*- import argparse import os import sys import yaml from . import VERSION import actions import core import exception from utils import log def error(errtype, msg, code=42): sys.stderr.write("{t.red}[ERROR] {t.yellow}{er}: {msg}" "{t.normal}\n".format(er=errtype, msg=...
yac/rdoupdate
rdoupdate/shell.py
Python
apache-2.0
5,901
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
datacommonsorg/data
scripts/eurostat/regional_statistics_by_nuts/fertility_rate_mother_age/fertility_rate_preprocess_gen_tmcf.py
Python
apache-2.0
3,789
#MenuTitle: Show next instance # -*- coding: utf-8 -*- __doc__=""" Jumps to next instance shown in the preview field of the current Edit tab. """ import GlyphsApp Doc = Glyphs.currentDocument numberOfInstances = len( Glyphs.font.instances ) try: currentInstanceNumber = Doc.windowController().activeEditViewControlle...
weiweihuanghuang/Glyphs-Scripts
Masters/Show next instance.py
Python
apache-2.0
623
"""All constants related to the ZHA component.""" import enum import logging from typing import List import bellows.zigbee.application from zigpy.config import CONF_DEVICE_PATH # noqa: F401 # pylint: disable=unused-import import zigpy_cc.zigbee.application import zigpy_deconz.zigbee.application import zigpy_xbee.zigb...
partofthething/home-assistant
homeassistant/components/zha/core/const.py
Python
apache-2.0
10,279
# # Copyright (c) SAS Institute 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...
sassoftware/catalog-service
catalogService_test/mockedModules/mint/db/schema.py
Python
apache-2.0
8,225
import BaseHTTPServer import logging import os import sys import threading import time from chirp.common.conf import (BARIX_STATUS_HOST, BARIX_STATUS_PORT, BARIX_HOST, BARIX_PORT) from chirp.stream import barix _TIMEOUT_S = 2 _POLLING_FREQUENCY_S = 5 _STATUS_PAGE = """<html><head...
chirpradio/chirpradio-machine
chirp/stream/do_proxy_barix_status.py
Python
apache-2.0
4,423
# 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 applica...
cshallue/models
research/object_detection/utils/object_detection_evaluation.py
Python
apache-2.0
40,753
import sqlalchemy as sa from oslo_db.sqlalchemy import types as db_types from nca47.db.sqlalchemy.models import base as model_base from nca47.objects import attributes as attr HasTenant = model_base.HasTenant HasId = model_base.HasId HasStatus = model_base.HasStatus HasOperationMode = model_base.HasOperationMode c...
willowd878/nca47
nca47/db/sqlalchemy/models/dns.py
Python
apache-2.0
1,680
# 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 ...
Kami/libcloud
libcloud/common/types.py
Python
apache-2.0
6,989
#!/usr/bin/env python # # Copyright 2016 Google 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 requir...
Aloomaio/googleads-python-lib
examples/ad_manager/v201808/custom_field_service/get_custom_fields_for_line_items.py
Python
apache-2.0
1,972
# This file is part of Androguard. # # Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # 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://...
0x0mar/androguard
androguard/decompiler/dad/graph.py
Python
apache-2.0
17,086
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google/jax
tests/linalg_test.py
Python
apache-2.0
64,375
#!/usr/bin/env python import webapp2 import logging from google.appengine.ext.webapp.mail_handlers import InboundMailHandler from google.appengine.ext import ndb from MailMessage import MailMessage # the email domain of this app is @pomis-newsletterman.appspotmail.com class EmailHandlerV1(InboundMailHandler): ...
Dudy/newsletterman
src/EmailHandlerV1.py
Python
apache-2.0
1,058
import re from keystonemiddleware import auth_token from oslo_log import log from nca47.common import exception from nca47.common.i18n import _ from nca47.common import utils LOG = log.getLogger(__name__) class AuthTokenMiddleware(auth_token.AuthProtocol): """A wrapper on Keystone auth_token middleware. D...
willowd878/nca47
nca47/api/hooks/auth_token.py
Python
apache-2.0
1,716
from django.conf.urls import url from cobra.core.application import Application from cobra.core.loading import get_class class AutoCheckDashboardApplication(Application): name = None index_view = get_class('dashboard.autocheck.views', 'IndexView') def get_urls(self): urls = [ url(r'...
lyoniionly/django-cobra
src/cobra/apps/dashboard/autocheck/app.py
Python
apache-2.0
480
from setuptools import setup, Extension import numpy as np import platform version = '0.1.3' ext_modules = [] setup (name = 'droneapi', zip_safe=True, version = version, description = 'Python language bindings for the DroneApi', long_description = '''Python language bindings for the Drone...
Blackflappybird/droneapi-python
setup.py
Python
apache-2.0
1,271
#!/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...
vmax-feihu/hue
apps/useradmin/src/useradmin/ldap_access.py
Python
apache-2.0
14,369
# -*- coding: utf-8 *-* import os import subprocess import sys try: from setuptools import setup except ImportError: from distribute_setup import use_setuptools use_setuptools() from setuptools import setup from distutils.cmd import Command with open('README.rst') as f: readme_content = f.read()...
puentesarrin/asyncflux
setup.py
Python
apache-2.0
2,548
#!/usr/bin/python3 import os import sys from shutil import copy2 PLATFORM = sys.platform if PLATFORM == 'linux' or PLATFORM == 'linux2': user = os.getenv("SUDO_USER") if user is None: print("This program need \'Superuser Privileges\'") exit() NAME = 'MissionText' FILE_NA...
daviaws/missionText
app/setup.py
Python
apache-2.0
2,858
# Copyright 2016-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 ...
Sutto/cloud-custodian
c7n/resources/iam.py
Python
apache-2.0
66,755