hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
88ba5c31c311e6ee1b48bcee4d08a7206501b01d | 2,745 | py | Python | opendis/PduFactory.py | DMOC-C/DIS-PDU | af5c93b2081298e0c453592f62c8cc9484e3ded0 | [
"BSD-2-Clause"
] | null | null | null | opendis/PduFactory.py | DMOC-C/DIS-PDU | af5c93b2081298e0c453592f62c8cc9484e3ded0 | [
"BSD-2-Clause"
] | null | null | null | opendis/PduFactory.py | DMOC-C/DIS-PDU | af5c93b2081298e0c453592f62c8cc9484e3ded0 | [
"BSD-2-Clause"
] | null | null | null | __author__ = "mcgredo"
__date__ = "$Jun 25, 2015 11:31:42 AM$"
from .DataInputStream import DataInputStream
from .dis7 import *
from io import BytesIO
import binascii
import io
PduTypeDecoders = {
1 : EntityStatePdu
, 2 : FirePdu
, 3 : DetonationPdu
, 4 : CollisionPdu
, 5 : ServiceRequestPd... | 27.45 | 79 | 0.669945 |
ee2e4f3bb64ab994c78bb6465ce8c4ca5d85cfc0 | 6,553 | py | Python | player.py | PTNobel/musicctl | c311d025176564dc1ed09d5143519bbdf1b0f2a5 | [
"MIT"
] | 1 | 2017-09-01T06:28:36.000Z | 2017-09-01T06:28:36.000Z | player.py | PTNobel/musicctl | c311d025176564dc1ed09d5143519bbdf1b0f2a5 | [
"MIT"
] | null | null | null | player.py | PTNobel/musicctl | c311d025176564dc1ed09d5143519bbdf1b0f2a5 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# A python3 port of musicctl.sh.
import time
import os
import sys
import re
import subprocess
import process
# warning() functions like print, except it prefixes everything and prints to
# stderr.
def warning(*objs, prefix='WARNING: '):
printed_list = str(prefix)
for i in objs:
pr... | 25.901186 | 77 | 0.573783 |
4a09b3ea6cd563a8a426c8fdec82bda8183d1960 | 7,546 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_lib_keychain_act.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 177 | 2016-03-15T17:03:51.000Z | 2022-03-18T16:48:44.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_lib_keychain_act.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2016-03-30T10:45:22.000Z | 2020-07-14T16:28:13.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_lib_keychain_act.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 85 | 2016-03-16T20:38:57.000Z | 2022-02-22T04:26:02.000Z | """ Cisco_IOS_XR_lib_keychain_act
This module contains a collection of YANG definitions
for Cisco IOS\-XR action package configuration.
Copyright (c) 2017 by Cisco Systems, Inc.
All rights reserved.
"""
import sys
from collections import OrderedDict
from ydk.types import Entity as _Entity_
from ydk.types import En... | 29.476563 | 126 | 0.601246 |
361449cb9e4ab14c2dcab058a8171bafbbff0ef7 | 2,813 | py | Python | data/external/repositories_2to3/132160/kaggle-ndsb-master/configurations/featharalick_cr4_ds_4stage_big.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/132160/kaggle-ndsb-master/configurations/featharalick_cr4_ds_4stage_big.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/132160/kaggle-ndsb-master/configurations/featharalick_cr4_ds_4stage_big.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | import numpy as np
import theano
import theano.tensor as T
import lasagne as nn
import data
import load
import nn_plankton
import dihedral
import tmp_dnn
import tta
features = [
# "hu",
# "tutorial",
"haralick",
# "aaronmoments",
# "lbp",
# "pftas",
# "zernike_momen... | 31.255556 | 144 | 0.696765 |
127882f86e77326c95d91949f4aec66e2c1fd88e | 2,068 | py | Python | lens/flags.py | POFK/LensFinder | 56a8cb3f99a68b5922e0a8c76e1cee27ef75a09e | [
"MIT"
] | null | null | null | lens/flags.py | POFK/LensFinder | 56a8cb3f99a68b5922e0a8c76e1cee27ef75a09e | [
"MIT"
] | 4 | 2019-06-25T08:37:45.000Z | 2019-07-17T03:09:26.000Z | lens/flags.py | POFK/LensFinder | 56a8cb3f99a68b5922e0a8c76e1cee27ef75a09e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
import argparse
import os
import torch
parser = argparse.ArgumentParser(description='PyTorch Example')
parser.add_argument('--num_class', type=int, default=2, metavar='N')
parser.add_argument('--crop_range', type=int, default=84, metavar='N')
parser.add_argument('--batch_size', type... | 51.7 | 95 | 0.64265 |
7469a35bb02445e469a3fff6c46a32d2ac364f1b | 23,155 | py | Python | backend/AXIOME3_app/datahandle/views.py | neufeld/AXIOME3-GUI | 80b87753b47fab116324b4f0e4151c21ab3b1725 | [
"BSD-3-Clause"
] | 2 | 2021-02-25T16:59:12.000Z | 2021-02-25T20:06:15.000Z | backend/AXIOME3_app/datahandle/views.py | neufeld/AXIOME3-GUI | 80b87753b47fab116324b4f0e4151c21ab3b1725 | [
"BSD-3-Clause"
] | 7 | 2020-11-18T08:05:52.000Z | 2022-02-17T20:45:10.000Z | backend/AXIOME3_app/datahandle/views.py | neufeld/AXIOME3-GUI | 80b87753b47fab116324b4f0e4151c21ab3b1725 | [
"BSD-3-Clause"
] | null | null | null | from flask import Blueprint, request, Response, current_app
import uuid
import os
#from werkzeug import secure_filename
# For console debugging
import sys
# Custom modules
from AXIOME3_app.datahandle import config_generator
from AXIOME3_app.datahandle import (
luigi_prep_helper,
input_upload_helper,
denoise_helper,... | 32.890625 | 122 | 0.745843 |
49555d1bd088095fa77b169753a272f7fd6bd0c9 | 5,624 | py | Python | homeassistant/components/deconz/alarm_control_panel.py | jlmaners/core | 9d016dd4346ec776da40f816764a5be441e34a3b | [
"Apache-2.0"
] | null | null | null | homeassistant/components/deconz/alarm_control_panel.py | jlmaners/core | 9d016dd4346ec776da40f816764a5be441e34a3b | [
"Apache-2.0"
] | 25 | 2021-10-02T10:01:14.000Z | 2022-03-31T06:11:49.000Z | homeassistant/components/deconz/alarm_control_panel.py | jlmaners/core | 9d016dd4346ec776da40f816764a5be441e34a3b | [
"Apache-2.0"
] | 1 | 2021-12-10T10:33:28.000Z | 2021-12-10T10:33:28.000Z | """Support for deCONZ alarm control panel devices."""
from __future__ import annotations
from pydeconz.alarm_system import AlarmSystem
from pydeconz.sensor import (
ANCILLARY_CONTROL_ARMED_AWAY,
ANCILLARY_CONTROL_ARMED_NIGHT,
ANCILLARY_CONTROL_ARMED_STAY,
ANCILLARY_CONTROL_ARMING_AWAY,
ANCILLARY_CO... | 31.954545 | 87 | 0.694346 |
d0ea84c0083dcad37b3ab6f8b1881e32ae8c6268 | 34,346 | py | Python | pysnmp-with-texts/ADTRAN-MEF-PER-COS-PER-UNI-PERF-HISTORY-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/ADTRAN-MEF-PER-COS-PER-UNI-PERF-HISTORY-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/ADTRAN-MEF-PER-COS-PER-UNI-PERF-HISTORY-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module ADTRAN-MEF-PER-COS-PER-UNI-PERF-HISTORY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADTRAN-MEF-PER-COS-PER-UNI-PERF-HISTORY-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:14:57 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by use... | 175.234694 | 5,171 | 0.830897 |
315e02522b31b8427a8825b26fa4a86383d84926 | 117,207 | py | Python | sympy/printing/tests/test_latex.py | skieffer/sympy | 23ab5c14881aef21409918939e0c8b78b7fcb06f | [
"BSD-3-Clause"
] | 1 | 2021-09-21T11:50:43.000Z | 2021-09-21T11:50:43.000Z | sympy/printing/tests/test_latex.py | Nbede/sympy | 2ead5bfe4716c36e1c0839c25aa6dc87cd85b0f2 | [
"BSD-3-Clause"
] | null | null | null | sympy/printing/tests/test_latex.py | Nbede/sympy | 2ead5bfe4716c36e1c0839c25aa6dc87cd85b0f2 | [
"BSD-3-Clause"
] | null | null | null | from sympy.tensor.array.expressions.array_expressions import ArraySymbol, ArrayElement
from sympy.tensor.toperators import PartialDerivative
from sympy import (
Abs, Chi, Ci, CosineTransform, Dict, Ei, Eq, FallingFactorial,
FiniteSet, Float, FourierTransform, Function, Indexed, IndexedBase, Integral,
Inter... | 41.799929 | 186 | 0.559275 |
dc9057963a90bad055d5587d41633ebdec41fcf6 | 80,958 | py | Python | psutil/tests/test_linux.py | alexfurtunato/psutil | 81ef4c9185650213c03122c95856ad3991b5656d | [
"BSD-3-Clause"
] | null | null | null | psutil/tests/test_linux.py | alexfurtunato/psutil | 81ef4c9185650213c03122c95856ad3991b5656d | [
"BSD-3-Clause"
] | null | null | null | psutil/tests/test_linux.py | alexfurtunato/psutil | 81ef4c9185650213c03122c95856ad3991b5656d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Linux specific tests."""
from __future__ import division
import collections
import contextlib
import errno
import glob
import io... | 40.929221 | 79 | 0.550261 |
d8bb778d5dcc2fcd12e69a8030c8d1be119f118c | 2,326 | py | Python | src/function.py | kylerlmy/pythonpractice | 6bdd329ac9adfc98c1cc4c37cc8581adad6018ad | [
"MIT"
] | null | null | null | src/function.py | kylerlmy/pythonpractice | 6bdd329ac9adfc98c1cc4c37cc8581adad6018ad | [
"MIT"
] | null | null | null | src/function.py | kylerlmy/pythonpractice | 6bdd329ac9adfc98c1cc4c37cc8581adad6018ad | [
"MIT"
] | null | null | null | #----------------------------------函数----------------------------------
def say_hello():
#function body block start
print('hello world')
#function body block end
say_hello() #call function
say_hello() #call function again
#-----------------函数参数-----------------
def print_max(a,b):
if a>b:
print(... | 19.546218 | 71 | 0.546862 |
d7ecacc9353dc3d9a786dec7e2914e00d88577e7 | 1,128 | py | Python | wordgen/cli/__main__.py | snsinfu/web-wordgen | 118b7e8ae59b9a314e52c88a0807dbb67cd69894 | [
"MIT"
] | 1 | 2020-09-08T21:50:14.000Z | 2020-09-08T21:50:14.000Z | wordgen/cli/__main__.py | snsinfu/web-wordgen | 118b7e8ae59b9a314e52c88a0807dbb67cd69894 | [
"MIT"
] | null | null | null | wordgen/cli/__main__.py | snsinfu/web-wordgen | 118b7e8ae59b9a314e52c88a0807dbb67cd69894 | [
"MIT"
] | 1 | 2020-09-08T21:50:15.000Z | 2020-09-08T21:50:15.000Z | import argparse
import signal
import sys
from .command import Train, Generate
def main():
signal.signal(signal.SIGINT, signal.SIG_DFL)
signal.signal(signal.SIGTERM, signal.SIG_DFL)
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
args = parse_args()
mode = args.pop("mode")
if mode == "train":
... | 25.636364 | 59 | 0.68883 |
9e3ff65f31860192666d67cfa6d30c254f22cdf4 | 3,618 | py | Python | tests/superset_test_config.py | piyush-singhal/incubator-superset | cf4edf73a6ad1a61e7a65f05b6e4201db3a4b6e4 | [
"Apache-2.0"
] | 2 | 2020-07-27T04:07:50.000Z | 2020-10-13T19:49:10.000Z | tests/superset_test_config.py | piyush-singhal/incubator-superset | cf4edf73a6ad1a61e7a65f05b6e4201db3a4b6e4 | [
"Apache-2.0"
] | 1 | 2021-02-23T16:45:47.000Z | 2021-04-24T23:15:03.000Z | tests/superset_test_config.py | piyush-singhal/incubator-superset | cf4edf73a6ad1a61e7a65f05b6e4201db3a4b6e4 | [
"Apache-2.0"
] | null | null | null | # 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... | 32.890909 | 95 | 0.758983 |
c5651a9d524f758f01142f52d7ed41c5e0f241bb | 282 | py | Python | src/config.py | facundoic/Data-Science-Projects | a9af7546cdcbbef3c9fcad5ea8ffce1f16d1d059 | [
"MIT"
] | null | null | null | src/config.py | facundoic/Data-Science-Projects | a9af7546cdcbbef3c9fcad5ea8ffce1f16d1d059 | [
"MIT"
] | null | null | null | src/config.py | facundoic/Data-Science-Projects | a9af7546cdcbbef3c9fcad5ea8ffce1f16d1d059 | [
"MIT"
] | null | null | null | link = 'http://deis.msal.gov.ar:8097/pentaho/api/repos/%3Apublic%3Adeis%3AdefuncSegunGrupoEdadxPeriodoAgrupCausaMuerteProvResSexo.wcdf/generatedContent?userid=deis&password=deis2016'
driver_path = '/home/facundoic/Desktop/GitHub/Repositories/Data-Science-Projects/src/chromedriver'
| 94 | 182 | 0.851064 |
214a7e36ee63f0081c7c8f6bff9f48ce7db094ba | 1,729 | py | Python | packager/version/generate_version_string.py | ivanvgdev/shaka-packager | 5bf8ad5ed5e6adeed63a264dd43ebb9d649f6621 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 4 | 2018-11-08T21:37:13.000Z | 2019-03-18T18:56:51.000Z | packager/version/generate_version_string.py | ivanvgdev/shaka-packager | 5bf8ad5ed5e6adeed63a264dd43ebb9d649f6621 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2022-02-10T12:40:20.000Z | 2022-02-10T12:40:20.000Z | packager/version/generate_version_string.py | aminyazdanpanah/shaka-packager | ea2b192b92ce24c68e48d9f29f7aa176e40ef875 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2018-10-26T20:40:52.000Z | 2020-04-01T12:05:42.000Z | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""This script is used to generate version string for packager."""
import subproces... | 32.622642 | 78 | 0.699248 |
6dba7235559b527ae6144e9183f3168a214b5e1e | 775 | py | Python | var/spack/repos/builtin/packages/memaxes/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/memaxes/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/memaxes/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 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 Memaxes(Package):
"""MemAxes is a visualizer for sampled memory trace data."""
homepa... | 31 | 93 | 0.672258 |
a3e257ead45310e20d610bc606baca00f7fbf48a | 8,008 | py | Python | temp_old/20201231/lamp_setup_pair_pipette.py | yangqinwhu/opentron | 653db54d5f8461ebbfd58818fee5f055f61dc7eb | [
"MIT"
] | null | null | null | temp_old/20201231/lamp_setup_pair_pipette.py | yangqinwhu/opentron | 653db54d5f8461ebbfd58818fee5f055f61dc7eb | [
"MIT"
] | null | null | null | temp_old/20201231/lamp_setup_pair_pipette.py | yangqinwhu/opentron | 653db54d5f8461ebbfd58818fee5f055f61dc7eb | [
"MIT"
] | 1 | 2021-06-04T05:21:59.000Z | 2021-06-04T05:21:59.000Z | """Use lamp_setup_app.py to calibrate all labware first"""
from opentrons import protocol_api
import opentrons.execute # This returns the same kind of object - a ProtocolContext - that is passed into your protocol’s run function when you upload your protocol in the Opentrons App
import json,timeit,time
def heating(t... | 59.318519 | 3,347 | 0.692308 |
69afe0f32666652b9b51f1bb3656dbc5102875b0 | 1,872 | py | Python | nature/bricks/graph/_task.py | bionicles/neuromax | a53a17a1c033c11ac607a9e28f43b1f906e58aad | [
"MIT"
] | null | null | null | nature/bricks/graph/_task.py | bionicles/neuromax | a53a17a1c033c11ac607a9e28f43b1f906e58aad | [
"MIT"
] | null | null | null | nature/bricks/graph/_task.py | bionicles/neuromax | a53a17a1c033c11ac607a9e28f43b1f906e58aad | [
"MIT"
] | null | null | null | import tensorflow as tf
import networkx as nx
from nature import add_node, get_output, screenshot_graph
from tools import plot_model, log
K, L = tf.keras, tf.keras.layers
MIN_STACKS, MAX_STACKS = 0, 8
def TaskGraph(AI, in_specs, out_specs):
G = nx.MultiDiGraph()
add_node(G, "critic", "red", "triangle", "crit... | 37.44 | 77 | 0.615919 |
29007449f8cb2d48f3ef3710be74033753056d1b | 37,325 | py | Python | tests/test_tf.py | AkashNarayanan/pennylane-sf | f2dbd0c2d7346effcbd0b82793f4dd7fc6de2a8f | [
"Apache-2.0"
] | 14 | 2018-11-13T15:40:08.000Z | 2020-07-18T02:33:18.000Z | tests/test_tf.py | AkashNarayanan/pennylane-sf | f2dbd0c2d7346effcbd0b82793f4dd7fc6de2a8f | [
"Apache-2.0"
] | 30 | 2018-11-30T20:11:06.000Z | 2020-07-08T20:39:21.000Z | tests/test_tf.py | AkashNarayanan/pennylane-sf | f2dbd0c2d7346effcbd0b82793f4dd7fc6de2a8f | [
"Apache-2.0"
] | 3 | 2019-03-15T03:34:06.000Z | 2020-01-07T12:26:18.000Z | # Copyright 2018-2020 Xanadu Quantum Technologies 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... | 36.062802 | 101 | 0.579156 |
e3b990ff98d25a57bb06931932cccb083cae5304 | 1,498 | py | Python | sdk/core/azure-core/azure/core/common.py | kushan2018/azure-sdk-for-python | 08a9296207281f4e90e23cf7a30173863accc867 | [
"MIT"
] | null | null | null | sdk/core/azure-core/azure/core/common.py | kushan2018/azure-sdk-for-python | 08a9296207281f4e90e23cf7a30173863accc867 | [
"MIT"
] | 1 | 2019-06-04T18:12:16.000Z | 2019-06-04T18:12:16.000Z | sdk/core/azure-core/azure/core/common.py | kushan2018/azure-sdk-for-python | 08a9296207281f4e90e23cf7a30173863accc867 | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... | 45.393939 | 78 | 0.698932 |
f4317ed285dfbc7f14f2f9ebe37da9c022c9230c | 5,779 | py | Python | engine/classes.py | underground-lab/zelezobeton | 5afd96c3123b3d8accca107c6e60a3f6fdecdf27 | [
"MIT"
] | 2 | 2022-01-10T11:46:46.000Z | 2022-01-11T08:32:54.000Z | engine/classes.py | underground-lab/zelezobeton | 5afd96c3123b3d8accca107c6e60a3f6fdecdf27 | [
"MIT"
] | 1 | 2022-01-13T09:16:25.000Z | 2022-01-14T08:39:12.000Z | engine/classes.py | underground-lab/zelezobeton | 5afd96c3123b3d8accca107c6e60a3f6fdecdf27 | [
"MIT"
] | null | null | null | from copy import deepcopy
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class Room:
description: str
exits: dict = field(default_factory=dict)
class Object:
def __init__(self, name, location='undiscovered', actions=None, **kwargs):
self.name = name
self.... | 29.78866 | 88 | 0.625022 |
c13588ce53e7b272af716cd94f859f996d0c1c1e | 711 | py | Python | mars/services/storage/api/__init__.py | haijohn/mars | 672b3a33a70565f01b1a3f508908445491d85acf | [
"Apache-2.0"
] | 1 | 2021-06-10T02:43:01.000Z | 2021-06-10T02:43:01.000Z | mars/services/storage/api/__init__.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | mars/services/storage/api/__init__.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding 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 a... | 39.5 | 74 | 0.776371 |
6e54807d107b35f02d37c67d735409bd204e2a02 | 200 | py | Python | bot/cogs/moderation.py | Spaxly/Starter-Dashboard | 93d4039a441275c74da80c6942e622362a09bec7 | [
"Apache-2.0"
] | 3 | 2021-05-28T06:46:41.000Z | 2021-07-22T12:47:54.000Z | bot/cogs/moderation.py | Spaxly/Starter-Dashboard | 93d4039a441275c74da80c6942e622362a09bec7 | [
"Apache-2.0"
] | null | null | null | bot/cogs/moderation.py | Spaxly/Starter-Dashboard | 93d4039a441275c74da80c6942e622362a09bec7 | [
"Apache-2.0"
] | 3 | 2021-05-12T14:35:54.000Z | 2021-11-15T19:02:34.000Z | import discord
from discord.ext import commands
class Moderation(commands.Cog):
def __init__(self, client):
self.client = client
def setup(client):
client.add_cog(Moderation(client)) | 22.222222 | 38 | 0.735 |
92322af496a864ed5ebaaa1f80b1ce1bb0c04b4d | 3,371 | py | Python | lib/modules/situational_awareness/network/powerview/get_domain_trust.py | asmc/Empire-Win | af27f437ee919c9b65e3c2dd7c006f11ff5d5b2a | [
"BSD-3-Clause"
] | 3 | 2019-08-12T01:46:51.000Z | 2020-09-12T12:00:16.000Z | lib/modules/situational_awareness/network/powerview/get_domain_trust.py | ninj4c0d3r/Empire | e07e7ca5398dce82f9ce10028355f909d102838b | [
"BSD-3-Clause"
] | null | null | null | lib/modules/situational_awareness/network/powerview/get_domain_trust.py | ninj4c0d3r/Empire | e07e7ca5398dce82f9ce10028355f909d102838b | [
"BSD-3-Clause"
] | 5 | 2017-10-17T08:16:13.000Z | 2021-04-30T02:41:02.000Z | from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Get-NetDomainTrust',
'Author': ['@harmj0y'],
'Description': ('Return all domain trusts for the current domain or '
'a specified do... | 33.71 | 125 | 0.484129 |
4dd78d536a740b3441bd4416dd1c301f9a51e503 | 2,420 | py | Python | docs/conf.py | monotropauniflora/PartSeg | 68ccf8df4162174056028cbb677ab729e4c31994 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | monotropauniflora/PartSeg | 68ccf8df4162174056028cbb677ab729e4c31994 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | monotropauniflora/PartSeg | 68ccf8df4162174056028cbb677ab729e4c31994 | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... | 33.150685 | 79 | 0.667769 |
8a91f2f48d59fec92dc4fc869f5dc04e9cc53e39 | 3,321 | py | Python | tests/test_falconx_sandbox.py | kra-ts/falconpy | c7c4ed93cb3b56cdfd86757f573fde57e4ccf857 | [
"Unlicense"
] | null | null | null | tests/test_falconx_sandbox.py | kra-ts/falconpy | c7c4ed93cb3b56cdfd86757f573fde57e4ccf857 | [
"Unlicense"
] | null | null | null | tests/test_falconx_sandbox.py | kra-ts/falconpy | c7c4ed93cb3b56cdfd86757f573fde57e4ccf857 | [
"Unlicense"
] | null | null | null | """
test_falconx_sandbox.py - This class tests the falconx_sandbox service class
"""
import os
import sys
import pytest
# Authentication via the test_authorization.py
from tests import test_authorization as Authorization
# Import our sibling src folder into the path
sys.path.append(os.path.abspath('src'))
# Classes to... | 41 | 124 | 0.628425 |
9a19be8040981a73bfe71311bc242e1730dbdf9f | 208 | py | Python | primer/auth/urls.py | jamesmfriedman/django-primer | 83dfc516212741d7593d1f6adeb774f4d30a4ad7 | [
"Apache-2.0"
] | 2 | 2018-04-23T06:44:20.000Z | 2019-02-05T16:43:17.000Z | primer/auth/urls.py | jamesmfriedman/django-primer | 83dfc516212741d7593d1f6adeb774f4d30a4ad7 | [
"Apache-2.0"
] | null | null | null | primer/auth/urls.py | jamesmfriedman/django-primer | 83dfc516212741d7593d1f6adeb774f4d30a4ad7 | [
"Apache-2.0"
] | 2 | 2020-10-27T05:26:11.000Z | 2021-03-24T18:10:20.000Z | from django.conf.urls import patterns, include, url
urlpatterns = patterns('primer.auth.views',
# accounts
url(r'^login/$', 'login', name='login'),
url(r'^logout/$', 'logout', name='logout'),
) | 23.111111 | 51 | 0.639423 |
0a30a951d662eb3ccfd1fcb973a09688823053bb | 1,447 | py | Python | shortener/views.py | videetssinghai/URL_Shortner | 14872c3c512c86b95491195e829b2148bb5b41c0 | [
"MIT"
] | null | null | null | shortener/views.py | videetssinghai/URL_Shortner | 14872c3c512c86b95491195e829b2148bb5b41c0 | [
"MIT"
] | null | null | null | shortener/views.py | videetssinghai/URL_Shortner | 14872c3c512c86b95491195e829b2148bb5b41c0 | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from django.http import request
from django.http import HttpResponse, HttpResponseRedirect
from .forms import urlForm
from .models import getBit
from django.views import View
class BasicView(View):
def get(self,request,*args,**kwargs):
form = urlForm()... | 28.372549 | 64 | 0.577747 |
b938266bd543a34027a698925fb555f726fcb856 | 16,306 | py | Python | InvenTree/company/models.py | pmburu/InvenTree | 2c1d585f8bcc6a961e323e0249755bb3968a4b5a | [
"MIT"
] | null | null | null | InvenTree/company/models.py | pmburu/InvenTree | 2c1d585f8bcc6a961e323e0249755bb3968a4b5a | [
"MIT"
] | null | null | null | InvenTree/company/models.py | pmburu/InvenTree | 2c1d585f8bcc6a961e323e0249755bb3968a4b5a | [
"MIT"
] | null | null | null | """
Company database model definitions
"""
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import math
from decimal import Decimal
from django.utils.translation import gettext_lazy as _
from django.core.validators import MinValueValidator
from django.db import models
from django.db.models ... | 34.112971 | 165 | 0.644855 |
e31ce9749adc905c2d892c375863b55d51643cad | 2,860 | py | Python | invoicing/crud/job_crud.py | dnegreira/Invoicing | 0bc8133e989f095c10151f67482e249416274947 | [
"MIT"
] | null | null | null | invoicing/crud/job_crud.py | dnegreira/Invoicing | 0bc8133e989f095c10151f67482e249416274947 | [
"MIT"
] | null | null | null | invoicing/crud/job_crud.py | dnegreira/Invoicing | 0bc8133e989f095c10151f67482e249416274947 | [
"MIT"
] | null | null | null | from invoicing.actions.action_collection import ActionCollection
from invoicing.crud.base_crud import BaseCrud
from invoicing.models.job_model import JobModel
from invoicing.repository.job_repository import JobRepository
from invoicing.repository.status_repository import StatusRepository
from invoicing.ui.menu import M... | 39.178082 | 106 | 0.669231 |
358f602b7443b9c2cfc585ae6a93b0b483df5251 | 12,979 | py | Python | bitfield/__init__.py | mattcaldwell/django-bitfield | c7fbbfa79a61e68a7bce246a62b65ca5a4edf27f | [
"Apache-2.0"
] | 1 | 2015-11-04T16:24:57.000Z | 2015-11-04T16:24:57.000Z | bitfield/__init__.py | mattcaldwell/django-bitfield | c7fbbfa79a61e68a7bce246a62b65ca5a4edf27f | [
"Apache-2.0"
] | null | null | null | bitfield/__init__.py | mattcaldwell/django-bitfield | c7fbbfa79a61e68a7bce246a62b65ca5a4edf27f | [
"Apache-2.0"
] | null | null | null | """
django-bitfield
~~~~~~~~~~~~~~~
"""
try:
VERSION = __import__('pkg_resources') \
.get_distribution('bitfield').version
except Exception, e:
VERSION = 'unknown'
from django import forms
from django.db.models.sql.expressions import SQLEvaluator
from django.db.models.fields import Field, BigIntegerFi... | 31.350242 | 138 | 0.608367 |
6bab7798f0876b96b83cb9947c420e6c6293ea7b | 8,775 | py | Python | KDEBoundaries1D.py | jabamar/KernelDensityBoundaries1D | 5016ab240a06c0c5ac9ff2ce335481053b40445d | [
"BSD-3-Clause"
] | null | null | null | KDEBoundaries1D.py | jabamar/KernelDensityBoundaries1D | 5016ab240a06c0c5ac9ff2ce335481053b40445d | [
"BSD-3-Clause"
] | null | null | null | KDEBoundaries1D.py | jabamar/KernelDensityBoundaries1D | 5016ab240a06c0c5ac9ff2ce335481053b40445d | [
"BSD-3-Clause"
] | null | null | null | """
Kernel Density Estimation (only 1D)
-------------------------
"""
from sklearn.base import BaseEstimator
from scipy.interpolate import interp1d
import numpy as np
from scipy import stats
KERNELS = ['gaussian', 'tophat', 'epanechnikov', 'expo', 'linear']
BOUNDARY = ['reflection', 'CowlingHall']
MINIMUM_VALUE = 1e-... | 30.154639 | 97 | 0.57641 |
1fd43303ee0209f20c60ceb3f6c1efa66ea53d7f | 8,302 | py | Python | src/daain/data/datasets/labels/bdd100k.py | merantix/mxlabs-daain | 0e87df5dd6e678939374dfadf44fc360d34425bb | [
"Apache-2.0"
] | 14 | 2021-06-01T08:34:09.000Z | 2022-02-01T15:45:27.000Z | src/daain/data/datasets/labels/bdd100k.py | merantix/mxlabs-daain | 0e87df5dd6e678939374dfadf44fc360d34425bb | [
"Apache-2.0"
] | null | null | null | src/daain/data/datasets/labels/bdd100k.py | merantix/mxlabs-daain | 0e87df5dd6e678939374dfadf44fc360d34425bb | [
"Apache-2.0"
] | 2 | 2021-07-31T01:58:40.000Z | 2022-01-24T14:04:26.000Z | """Label definition.
Taken from https://raw.githubusercontent.com/bdd100k/bdd100k/master/bdd100k/label/label.py on the 2021-02-03
"""
from collections import namedtuple
# a label and all meta information
# Code inspired by Cityscapes https://github.com/mcordts/cityscapesScripts
Label = namedtuple(
"Label",
[... | 46.379888 | 114 | 0.581908 |
c603b28f1d8b84176ecc82fd6eb472a0104bf3dc | 2,053 | py | Python | python/tvm/relax/__init__.py | jwfromm/relax | f120282007778706199243ee88b50697c2b9550c | [
"Apache-2.0"
] | null | null | null | python/tvm/relax/__init__.py | jwfromm/relax | f120282007778706199243ee88b50697c2b9550c | [
"Apache-2.0"
] | null | null | null | python/tvm/relax/__init__.py | jwfromm/relax | f120282007778706199243ee88b50697c2b9550c | [
"Apache-2.0"
] | null | null | null | # 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... | 28.513889 | 76 | 0.783244 |
ba0a26999c3f9d297560212a7a23dd90183bc511 | 781 | py | Python | dialogos/quotes/models.py | bertucho/epic-movie-quotes-quiz | 09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250 | [
"MIT"
] | null | null | null | dialogos/quotes/models.py | bertucho/epic-movie-quotes-quiz | 09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250 | [
"MIT"
] | null | null | null | dialogos/quotes/models.py | bertucho/epic-movie-quotes-quiz | 09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250 | [
"MIT"
] | null | null | null | # Stdlib imports
from django.db import models
# Create your models here.
class Movie(models.Model):
title = models.CharField(max_length=200)
original_title = models.CharField(max_length=200,default="")
year = models.IntegerField()
imdb_score = models.DecimalField(max_digits = 3, decimal_places = 1)
votes = models... | 31.24 | 74 | 0.768246 |
5d875fbe12335e40ce998b3093d4a4ee930a278c | 3,910 | py | Python | tools/android/aar_resources_extractor.py | FengRillian/bazel-0.10-dist | 67b66fa37dad709340d676feef0b655774bad5f6 | [
"Apache-2.0"
] | null | null | null | tools/android/aar_resources_extractor.py | FengRillian/bazel-0.10-dist | 67b66fa37dad709340d676feef0b655774bad5f6 | [
"Apache-2.0"
] | null | null | null | tools/android/aar_resources_extractor.py | FengRillian/bazel-0.10-dist | 67b66fa37dad709340d676feef0b655774bad5f6 | [
"Apache-2.0"
] | 1 | 2021-05-15T20:45:59.000Z | 2021-05-15T20:45:59.000Z | # pylint: disable=g-direct-third-party-import
# Copyright 2017 The Bazel 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/LI... | 41.157895 | 80 | 0.702558 |
8451af28a5abee0f1ff3a1c465c0ba6734ea0421 | 10,108 | py | Python | core/plugins/kickban.py | TheArchives/Nexus | 5482def8b50562fdbae980cda9b1708bfad8bffb | [
"BSD-2-Clause"
] | 1 | 2021-04-06T18:54:31.000Z | 2021-04-06T18:54:31.000Z | core/plugins/kickban.py | TheArchives/Nexus | 5482def8b50562fdbae980cda9b1708bfad8bffb | [
"BSD-2-Clause"
] | null | null | null | core/plugins/kickban.py | TheArchives/Nexus | 5482def8b50562fdbae980cda9b1708bfad8bffb | [
"BSD-2-Clause"
] | 1 | 2021-12-20T18:11:25.000Z | 2021-12-20T18:11:25.000Z | # The Nexus software is licensed under the BSD 2-Clause license.
#
# You should have recieved a copy of this license with the software.
# If you did not, you can find one at the following link.
#
# http://opensource.org/licenses/bsd-license.php
import logging
from core.plugins import ProtocolPlugin
from core.decorato... | 42.292887 | 135 | 0.626731 |
df3476e93e18c7bf312ee47e5dc84704f8526171 | 10,624 | py | Python | convai_evaluation.py | BSlience/end2end-conversational-ai | 30d17f8f9b439bd77e9593e99b9de47b4475aa7f | [
"MIT"
] | 4 | 2021-03-13T09:26:20.000Z | 2022-03-29T12:38:40.000Z | convai_evaluation.py | BSlience/end2end-conversational-ai | 30d17f8f9b439bd77e9593e99b9de47b4475aa7f | [
"MIT"
] | 1 | 2020-12-20T11:07:11.000Z | 2020-12-20T11:07:11.000Z | convai_evaluation.py | BSlience/end2end-conversational-ai | 30d17f8f9b439bd77e9593e99b9de47b4475aa7f | [
"MIT"
] | 3 | 2021-03-16T12:49:40.000Z | 2021-06-29T17:15:52.000Z | # # Copyright (c) 2019-present, HuggingFace Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import random
import logging
from pprint import pformat
from collections import defaultdict
from functools import part... | 43.363265 | 119 | 0.641566 |
123ee185ef9425a9e7f9993853380084fdb54c9a | 3,005 | py | Python | isi_sdk_8_1_1/isi_sdk_8_1_1/models/providers_ads.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/providers_ads.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/providers_ads.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_1_1.models.provide... | 26.130435 | 94 | 0.557404 |
9dafdd9cdeac4bee1b653d307fc577355a1f55e9 | 113 | py | Python | Exercise81.py | JBCFurtado/Rabiscos_Em_Python | a1a5be9391e1bbbb301b8a7776043f7ea77e24da | [
"MIT"
] | null | null | null | Exercise81.py | JBCFurtado/Rabiscos_Em_Python | a1a5be9391e1bbbb301b8a7776043f7ea77e24da | [
"MIT"
] | null | null | null | Exercise81.py | JBCFurtado/Rabiscos_Em_Python | a1a5be9391e1bbbb301b8a7776043f7ea77e24da | [
"MIT"
] | null | null | null | #import random
#print(random.randrange(1, 7))
import random
for i in range(5):
print(random.randint(1, 7))
| 14.125 | 31 | 0.690265 |
b98d0536459fe3bd039757a69d1a760f52ff1608 | 2,079 | py | Python | tests/integration/exception_test.py | gglin001/popart | 3225214343f6d98550b6620e809a3544e8bcbfc6 | [
"MIT"
] | null | null | null | tests/integration/exception_test.py | gglin001/popart | 3225214343f6d98550b6620e809a3544e8bcbfc6 | [
"MIT"
] | null | null | null | tests/integration/exception_test.py | gglin001/popart | 3225214343f6d98550b6620e809a3544e8bcbfc6 | [
"MIT"
] | null | null | null | # Copyright (c) 2019 Graphcore Ltd. All rights reserved.
import numpy as np
import popart
import pytest
import tempfile
# `import test_util` requires adding to sys.path
import sys
from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parent.parent))
import test_util as tu
# test that we can get the g... | 31.5 | 85 | 0.702742 |
32a4d6a8b771d002f1c1fd3a8e57bf56b207b891 | 3,375 | py | Python | scripts/ntrip_ros.py | LORD-MicroStrain/ntrip_client | 3c30cbd9be25c26963b84b370be09405f194fb9c | [
"MIT"
] | 6 | 2021-12-07T18:25:31.000Z | 2022-01-25T09:39:34.000Z | scripts/ntrip_ros.py | LORD-MicroStrain/ntrip_client-release | 2106bc9079c3ff940309661d91c109f93a61767f | [
"MIT"
] | 2 | 2022-01-14T09:29:05.000Z | 2022-03-24T15:45:06.000Z | scripts/ntrip_ros.py | LORD-MicroStrain/ntrip_client-release | 2106bc9079c3ff940309661d91c109f93a61767f | [
"MIT"
] | 1 | 2022-02-23T10:35:31.000Z | 2022-02-23T10:35:31.000Z | #!/usr/bin/env python
import os
import sys
import json
import rospy
from std_msgs.msg import Header
from mavros_msgs.msg import RTCM
from nmea_msgs.msg import Sentence
from ntrip_client.ntrip_client import NTRIPClient
class NTRIPRos:
def __init__(self):
# Read a debug flag from the environment that should ha... | 28.601695 | 91 | 0.674074 |
cc8288f3ac70982060639f63208bccdcdd12aa32 | 7,703 | gyp | Python | media/cast/cast.gyp | iplo/Chain | 8bc8943d66285d5258fffc41bed7c840516c4422 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | media/cast/cast.gyp | JasonEric/chromium | c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2017-02-14T21:55:58.000Z | 2017-02-14T21:55:58.000Z | media/cast/cast.gyp | JasonEric/chromium | c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'include_tests%': 1,
'chromium_code': 1,
},
'targets': [
{
'target_name': 'cast_config',
'type': 'static_libra... | 36.856459 | 78 | 0.565754 |
ae0a5a6ff059833d19e9c48dfd717206242a964a | 1,281 | py | Python | oldp/apps/courts/tests/test_views.py | docsuleman/oldp | 8dcaa8e6e435794c872346b5014945ace885adb4 | [
"MIT"
] | 66 | 2018-05-07T12:34:39.000Z | 2022-02-23T20:14:24.000Z | oldp/apps/courts/tests/test_views.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 68 | 2018-06-11T16:13:17.000Z | 2022-02-10T08:03:26.000Z | oldp/apps/courts/tests/test_views.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 15 | 2018-06-23T19:41:13.000Z | 2021-08-18T08:21:49.000Z | from django.test import tag
from django.urls import reverse
from oldp.apps.lib.tests import ExtendedLiveServerTestCase
@tag('views')
class CourtsViewsTestCase(ExtendedLiveServerTestCase):
fixtures = [
'locations/countries.json',
'locations/states.json',
'locations/cities.json',
'c... | 29.113636 | 75 | 0.649493 |
7a8833f6dc5fd9d77887f3cd959c279383421cf8 | 530 | py | Python | packages/python/plotly/plotly/validators/layout/ternary/baxis/_exponentformat.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/ternary/baxis/_exponentformat.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/ternary/baxis/_exponentformat.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="exponentformat", parent_name="layout.ternary.baxis", **kwargs
):
super(ExponentformatValidator, self).__init__(
plotly_name=plotly_n... | 35.333333 | 88 | 0.637736 |
95f5cac22f687f2045a8abc780aec1946e8685be | 7,914 | py | Python | api-ref/source/conf.py | mail2nsrajesh/networking-sfc | 065ead63fbda222ffd12e8d7c9db197c39daac98 | [
"Apache-2.0"
] | null | null | null | api-ref/source/conf.py | mail2nsrajesh/networking-sfc | 065ead63fbda222ffd12e8d7c9db197c39daac98 | [
"Apache-2.0"
] | null | null | null | api-ref/source/conf.py | mail2nsrajesh/networking-sfc | 065ead63fbda222ffd12e8d7c9db197c39daac98 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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, softwa... | 32.838174 | 79 | 0.710892 |
0e7a1937bb02cca435727ab5769b08a4781661e7 | 2,489 | py | Python | gpxpy/xmlutil.py | joelcarranza/gpxpy | ad76ae90afa2457b34c836cc1708f2994e381ab7 | [
"MIT"
] | 2 | 2017-04-26T16:45:44.000Z | 2017-08-08T16:29:43.000Z | gpxpy/xmlutil.py | joelcarranza/gpxpy | ad76ae90afa2457b34c836cc1708f2994e381ab7 | [
"MIT"
] | null | null | null | gpxpy/xmlutil.py | joelcarranza/gpxpy | ad76ae90afa2457b34c836cc1708f2994e381ab7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
xmlutil.py
Some simple utilities for working with xml
Created by Joel Carranza on 2011-06-12.
Copyright (c) 2011 __MyCompanyName__. All rights reserved.
"""
from xml.etree.cElementTree import Element
import pytz
# this is going to fail on 2.5???
import isodate
# Taken fro... | 25.397959 | 67 | 0.609482 |
222e37a39a4c7178d18936ba6d96af72444b0000 | 5,060 | py | Python | ee/api/app.py | thundermiracle/openreplay | b3c9a80a8c55b46c90070d63a4510d0ecdb19fbc | [
"MIT"
] | 1 | 2021-09-28T15:24:31.000Z | 2021-09-28T15:24:31.000Z | ee/api/app.py | aayushgautam/openreplay | 3298230c3a04fe537794bf396bdaf695c81301c6 | [
"MIT"
] | 2 | 2022-02-15T00:07:39.000Z | 2022-02-27T22:54:49.000Z | ee/api/app.py | aayushgautam/openreplay | 3298230c3a04fe537794bf396bdaf695c81301c6 | [
"MIT"
] | null | null | null | import sentry_sdk
from chalice import Chalice, Response
from sentry_sdk import configure_scope
from chalicelib import _overrides
from chalicelib.blueprints import bp_authorizers
from chalicelib.blueprints import bp_core, bp_core_crons
from chalicelib.blueprints import bp_core_dynamic, bp_core_dynamic_crons
from chalic... | 39.224806 | 129 | 0.674704 |
329b83135fb5f32db85a25cc6edebdf84609b601 | 59,476 | py | Python | ts2pythonParser.py | jecki/ts2python | 938267e48d8f7ff9620c36e7c9ab871cc2d6daab | [
"Apache-2.0"
] | 3 | 2021-10-16T14:27:40.000Z | 2022-03-04T17:41:14.000Z | ts2pythonParser.py | jecki/ts2python | 938267e48d8f7ff9620c36e7c9ab871cc2d6daab | [
"Apache-2.0"
] | 1 | 2022-02-03T01:19:57.000Z | 2022-02-21T10:35:52.000Z | ts2pythonParser.py | jecki/ts2python | 938267e48d8f7ff9620c36e7c9ab871cc2d6daab | [
"Apache-2.0"
] | 1 | 2021-10-16T07:07:34.000Z | 2021-10-16T07:07:34.000Z | #!/usr/bin/env python3
"""ts2python.py - compiles typescript dataclasses to Python
TypedDicts <https://www.python.org/dev/peps/pep-0589/>
Copyright 2021 by Eckhart Arnold (arnold@badw.de)
Bavarian Academy of Sciences and Humanities (badw.de)
Licensed under the Apache License, Version 2.0 (th... | 46.034056 | 458 | 0.602613 |
232d604c0918f480ded5b757ba50b2a407cf8919 | 17,728 | py | Python | knowledgerepr/fieldnetwork.py | svdwoude/aurum-datadiscovery | 2e569f6886065819a63e0b55561b94bccd4a078a | [
"MIT"
] | null | null | null | knowledgerepr/fieldnetwork.py | svdwoude/aurum-datadiscovery | 2e569f6886065819a63e0b55561b94bccd4a078a | [
"MIT"
] | null | null | null | knowledgerepr/fieldnetwork.py | svdwoude/aurum-datadiscovery | 2e569f6886065819a63e0b55561b94bccd4a078a | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import operator
import networkx as nx
import os
from collections import defaultdict
from api.apiutils import DRS
from api.apiutils import Operation
from api.apiutils import OP
from api.apiutils import Hit
from api.apiutils import Relation
from api.apiutils import compute_field_id
from a... | 37.479915 | 115 | 0.583822 |
2c7f5e18a11989d09c2561974fbf09c8c4de43d7 | 2,730 | py | Python | tests/test_rpc/test_torrent_methods.py | SickChill/rtorrent-python | 5edd34814d86a473274c4846b311d69ab1641d90 | [
"MIT"
] | 3 | 2021-01-04T00:34:04.000Z | 2021-03-31T18:17:08.000Z | tests/test_rpc/test_torrent_methods.py | SickChill/new-rtorrent-python | 5edd34814d86a473274c4846b311d69ab1641d90 | [
"MIT"
] | null | null | null | tests/test_rpc/test_torrent_methods.py | SickChill/new-rtorrent-python | 5edd34814d86a473274c4846b311d69ab1641d90 | [
"MIT"
] | 1 | 2021-03-31T18:23:35.000Z | 2021-03-31T18:23:35.000Z | import unittest
from .torrent import Torrent
INFO_HASH = '1D226C20D67F8F2DDEE4FD99A880974B3F2B6F1E'
t = Torrent(None, INFO_HASH)
class TestGetInfoHash(unittest.TestCase):
def setUp(self):
self.call = t.rpc_call('get_info_hash')
def test_pre_processing(self):
self.call.do_pre_processing()
... | 29.354839 | 59 | 0.678388 |
3c349585851d33f938671be036da7ece93d573cf | 146 | py | Python | stimuli/Python/one_file_per_item/jap/29_# math_for 11.py | ALFA-group/neural_program_comprehension | 0253911f376cf282af5a5627e38e0a591ad38860 | [
"MIT"
] | 6 | 2020-04-24T08:16:51.000Z | 2021-11-01T09:50:46.000Z | stimuli/Python/one_file_per_item/jap/29_# math_for 11.py | ALFA-group/neural_program_comprehension | 0253911f376cf282af5a5627e38e0a591ad38860 | [
"MIT"
] | null | null | null | stimuli/Python/one_file_per_item/jap/29_# math_for 11.py | ALFA-group/neural_program_comprehension | 0253911f376cf282af5a5627e38e0a591ad38860 | [
"MIT"
] | 4 | 2021-02-17T20:21:31.000Z | 2022-02-14T12:43:23.000Z | risto1 = [4, 4, 6]
risto2 = [1, 2, 4]
risto3 = [3, 2, 1]
for ai in range(len(risto1)):
risto3[ai] += risto1[ai] + risto2[ai]
print(risto3)
| 14.6 | 41 | 0.568493 |
48f7c20c5eb5b0b753fa87fbabe1148407d33223 | 2,911 | py | Python | codes/test_rule.py | soumyadip1995/Outlier-detection-Data-Exploration-Tutorial | 57c058ffc02e613c8447551f7c8a34b369bc69c3 | [
"MIT"
] | null | null | null | codes/test_rule.py | soumyadip1995/Outlier-detection-Data-Exploration-Tutorial | 57c058ffc02e613c8447551f7c8a34b369bc69c3 | [
"MIT"
] | null | null | null | codes/test_rule.py | soumyadip1995/Outlier-detection-Data-Exploration-Tutorial | 57c058ffc02e613c8447551f7c8a34b369bc69c3 | [
"MIT"
] | null | null | null | import crcf.rule
import numpy as np
class TestAxisAlignedRule:
def test_init(self):
""" make sure the rule initializes and stores the correct values"""
rule = crcf.rule.AxisAlignedRule(5, 0)
assert rule.dimension == 5
assert rule.value == 0
def test_evaluate(self):
"""... | 37.805195 | 107 | 0.587771 |
d24688500c71aae0d4139a4ebadb821cd82bf287 | 8,615 | py | Python | common.py | dstreev/hive_llap_calculator | 5630d55a8bda182996388dc976ee97e2b6cb58b2 | [
"Apache-2.0"
] | 15 | 2019-06-13T00:02:15.000Z | 2021-02-08T03:13:23.000Z | common.py | dstreev/hive_llap_calculator | 5630d55a8bda182996388dc976ee97e2b6cb58b2 | [
"Apache-2.0"
] | 21 | 2019-08-14T18:46:40.000Z | 2021-02-18T20:56:46.000Z | common.py | dstreev/hive_llap_calculator | 5630d55a8bda182996388dc976ee97e2b6cb58b2 | [
"Apache-2.0"
] | 4 | 2019-06-21T15:26:36.000Z | 2020-07-10T13:22:14.000Z | def left(field, length):
diff = length - len(str(field))
return str(field) + " " * diff
def center(field, length):
if isinstance(field, list):
diff = length - len(str(field[0]))
return " " * (diff / 2) + str(field[0]) + " " * (length - len(str(field[0])) - (diff / 2))
else:
dif... | 37.951542 | 122 | 0.427974 |
ffa8940736078b56c3817877ca10bc8c08d6324e | 7,512 | py | Python | Fuzzy_clustering/version2/feature_selection_manager/feature_selection_permutation.py | joesider9/forecasting_library | db07ff8f0f2693983058d49004f2fc6f8849d197 | [
"Apache-2.0"
] | null | null | null | Fuzzy_clustering/version2/feature_selection_manager/feature_selection_permutation.py | joesider9/forecasting_library | db07ff8f0f2693983058d49004f2fc6f8849d197 | [
"Apache-2.0"
] | null | null | null | Fuzzy_clustering/version2/feature_selection_manager/feature_selection_permutation.py | joesider9/forecasting_library | db07ff8f0f2693983058d49004f2fc6f8849d197 | [
"Apache-2.0"
] | null | null | null | import copy
import joblib
import os
import numpy as np
from sklearn.decomposition import PCA
from Fuzzy_clustering.version2.sklearn_models.sklearn_models_optuna import sklearn_model
class FS(object):
def __init__(self, static_data, model_path, njobs, inner_jobs, path_group=None):
self.static_data = stat... | 39.329843 | 120 | 0.594515 |
a57b0b6819eeed9fe1ac961f65d10a4b3d65bcc1 | 1,146 | py | Python | tests/test_parser.py | kmlee78/django-ninja | ae543f2d43ff4fbc0aa22713942be77d25e1bca3 | [
"MIT"
] | 2,809 | 2020-06-21T08:48:40.000Z | 2022-03-30T16:42:11.000Z | tests/test_parser.py | kmlee78/django-ninja | ae543f2d43ff4fbc0aa22713942be77d25e1bca3 | [
"MIT"
] | 311 | 2020-06-22T07:59:27.000Z | 2022-03-31T18:01:23.000Z | tests/test_parser.py | kmlee78/django-ninja | ae543f2d43ff4fbc0aa22713942be77d25e1bca3 | [
"MIT"
] | 178 | 2020-07-08T00:40:43.000Z | 2022-03-29T02:05:20.000Z | from typing import List
from django.http import HttpRequest, QueryDict
from ninja import NinjaAPI
from ninja.parser import Parser
from ninja.testing import TestClient
class MyParser(Parser):
"Default json parser"
def parse_body(self, request: HttpRequest):
"just splitting body to lines"
ret... | 27.95122 | 75 | 0.667539 |
2fcd4d558768664c6931c2078ea7f1d57381baf0 | 863 | py | Python | increase_inodes.py | arcapix/gpfsapi-examples | 15bff7fda7b0a576209253dee48eb44e4c0d565f | [
"MIT"
] | 10 | 2016-05-17T12:58:35.000Z | 2022-01-10T05:23:45.000Z | increase_inodes.py | arcapix/gpfsapi-examples | 15bff7fda7b0a576209253dee48eb44e4c0d565f | [
"MIT"
] | null | null | null | increase_inodes.py | arcapix/gpfsapi-examples | 15bff7fda7b0a576209253dee48eb44e4c0d565f | [
"MIT"
] | 1 | 2016-09-12T09:07:00.000Z | 2016-09-12T09:07:00.000Z | from arcapix.fs.gpfs import Cluster
threshold_pct = 80 # watermark for inode increasing
incr_pct = 20 # increase by pct
max_inode_incr = 50000 # do not increase by more than max_inode_incr
for fset in Cluster().filesystems['mmfs1'].filesets.independent().values():
# Check if the fileset has breached its inode... | 35.958333 | 84 | 0.734647 |
d8ca0971017be590616446e8539418be6606468b | 34,622 | py | Python | middleware/venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py | gregorypothier/pothier-website | 7aac5bffa9e0dda29d031783a3c16e3f3e26a945 | [
"CNRI-Python"
] | 1 | 2020-01-10T04:22:33.000Z | 2020-01-10T04:22:33.000Z | middleware/venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py | gregorypothier/pothier-website | 7aac5bffa9e0dda29d031783a3c16e3f3e26a945 | [
"CNRI-Python"
] | null | null | null | middleware/venv/lib/python3.6/site-packages/sqlalchemy/pool/base.py | gregorypothier/pothier-website | 7aac5bffa9e0dda29d031783a3c16e3f3e26a945 | [
"CNRI-Python"
] | null | null | null | # sqlalchemy/pool.py
# Copyright (C) 2005-2019 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Base constructs for connection pools.
"""
from collections import deque
imp... | 34.622 | 84 | 0.610248 |
bb7fa601749d283e8e82f295a0483d616134fa6b | 18,261 | py | Python | nemo/collections/tts/models/hifigan.py | mlgill/NeMo | 078a09a248e57883952960df4eae1039976635bc | [
"Apache-2.0"
] | null | null | null | nemo/collections/tts/models/hifigan.py | mlgill/NeMo | 078a09a248e57883952960df4eae1039976635bc | [
"Apache-2.0"
] | null | null | null | nemo/collections/tts/models/hifigan.py | mlgill/NeMo | 078a09a248e57883952960df4eae1039976635bc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, NVIDIA 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 by appli... | 44.00241 | 244 | 0.628826 |
e58ff600ac85499ff08e0800e03e0a11db2aa4c3 | 657 | py | Python | backend/products/migrations/0001_initial.py | mahmoudabuelnaga/drf | 320526a5b6a9f86bf0b76315a28076d11dfd4966 | [
"MIT"
] | null | null | null | backend/products/migrations/0001_initial.py | mahmoudabuelnaga/drf | 320526a5b6a9f86bf0b76315a28076d11dfd4966 | [
"MIT"
] | null | null | null | backend/products/migrations/0001_initial.py | mahmoudabuelnaga/drf | 320526a5b6a9f86bf0b76315a28076d11dfd4966 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-27 17:19
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Product',
fields=[
('id', models.BigAutoFie... | 27.375 | 117 | 0.584475 |
20fe8612c5b16bb526b0d763c1174f10b31f9383 | 5,171 | py | Python | todb.py | georgetown-analytics/triptomizer | 3401ec4ff612407e68429eac9a57a08af7fbeaf3 | [
"MIT"
] | 1 | 2017-02-24T01:57:03.000Z | 2017-02-24T01:57:03.000Z | todb.py | georgetown-analytics/triptomizer | 3401ec4ff612407e68429eac9a57a08af7fbeaf3 | [
"MIT"
] | null | null | null | todb.py | georgetown-analytics/triptomizer | 3401ec4ff612407e68429eac9a57a08af7fbeaf3 | [
"MIT"
] | 5 | 2015-10-03T19:52:14.000Z | 2020-03-04T01:21:24.000Z | #!/usr/bin/env python
##########################################################################
## Imports
##########################################################################
import json #required to read and parse json files
import os #required for file path function
import psycopg2 #required for postgres
i... | 44.965217 | 220 | 0.574744 |
148461e4e09dfd461d226c42ed1fb05855ad6fd8 | 1,875 | py | Python | board_parse.py | Christina0310/ECON900_ps1 | de44f7dfb91abb23f6c85ae3d6bd3a4f305b43c6 | [
"MIT"
] | null | null | null | board_parse.py | Christina0310/ECON900_ps1 | de44f7dfb91abb23f6c85ae3d6bd3a4f305b43c6 | [
"MIT"
] | null | null | null | board_parse.py | Christina0310/ECON900_ps1 | de44f7dfb91abb23f6c85ae3d6bd3a4f305b43c6 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import os
import glob
import pandas as pd
if not os.path.exists("parsed_files"):
os.mkdir("parsed_files")
df = pd.DataFrame()
for i in range(1,161):#one_file_name in glob.glob("html_files/*.html"):
current_page = str(i)
one_file_name ="html_files/boardgamegeek" + cur... | 38.265306 | 139 | 0.638933 |
6f9f5e69c63141793a6c4287d2c87d66c89c2c97 | 6,781 | py | Python | salt/cache/mysql_cache.py | tschmittni/salt | ccfcd5ed1272576799797ec7f259b676fd130585 | [
"Apache-2.0"
] | 2 | 2018-11-08T02:59:24.000Z | 2021-01-04T00:30:50.000Z | salt/cache/mysql_cache.py | The-Loeki/salt | 8ff8212cc1eacfe409eb9cc017b21250f28dd305 | [
"Apache-2.0"
] | 4 | 2020-09-04T10:19:34.000Z | 2020-11-09T12:55:59.000Z | salt/cache/mysql_cache.py | The-Loeki/salt | 8ff8212cc1eacfe409eb9cc017b21250f28dd305 | [
"Apache-2.0"
] | 5 | 2017-06-16T23:48:13.000Z | 2021-04-08T17:43:48.000Z | # -*- coding: utf-8 -*-
'''
Minion data cache plugin for MySQL database.
.. versionadded:: develop
It is up to the system administrator to set up and configure the MySQL
infrastructure. All is needed for this plugin is a working MySQL server.
The module requires the `salt_cache` database to exists but creates its ow... | 28.020661 | 80 | 0.633977 |
cc148316594c8d23db47c3224a49c737dae893a3 | 1,430 | py | Python | www/models.py | wolfworld/python-webapp | dcc57632b59bb3c5517f157c484702f17f29179a | [
"Apache-2.0"
] | 2 | 2017-07-28T02:27:37.000Z | 2017-07-31T08:43:05.000Z | www/models.py | wolfworld/python-webapp | dcc57632b59bb3c5517f157c484702f17f29179a | [
"Apache-2.0"
] | null | null | null | www/models.py | wolfworld/python-webapp | dcc57632b59bb3c5517f157c484702f17f29179a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time,uuid
from www.static.orm import Model,IntegerField,StringField,BooleanField,FloatField,TextField
def next_id():
return '%015d%s000' % (int(time.time() * 1000), uuid.uuid4().hex)
# 用户Model
class User(Model):
__table__ = "users"
id = StringField(pri... | 33.255814 | 91 | 0.686014 |
9b4887df5c411afa5461063f1a769d68318bff1a | 31,496 | py | Python | plaso/parsers/mac_keychain.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | 2 | 2019-10-23T03:37:59.000Z | 2020-08-14T17:09:26.000Z | plaso/parsers/mac_keychain.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | null | null | null | plaso/parsers/mac_keychain.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Parser for MacOS keychain database files."""
import codecs
import collections
from dfdatetime import time_elements as dfdatetime_time_elements
from dtfabric.runtime import data_maps as dtfabric_data_maps
from plaso.containers import events
from plaso.containers import time_events
from pla... | 35.628959 | 80 | 0.721234 |
a7c72e2763e3bf5a90650d063b50352d8a7f785c | 4,188 | py | Python | model_zoo/official/cv/googlenet/train.py | Gavin-Hoang/mindspore | f745ae0799a0840ebba18021c250f0089325a414 | [
"Apache-2.0"
] | 2 | 2020-08-12T16:14:40.000Z | 2020-12-04T03:05:57.000Z | model_zoo/official/cv/googlenet/train.py | Gavin-Hoang/mindspore | f745ae0799a0840ebba18021c250f0089325a414 | [
"Apache-2.0"
] | null | null | null | model_zoo/official/cv/googlenet/train.py | Gavin-Hoang/mindspore | f745ae0799a0840ebba18021c250f0089325a414 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., 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... | 41.058824 | 114 | 0.713706 |
0a44a6b97d4ee6fcc7098a419071cd15a2d73f28 | 3,142 | py | Python | aries_cloudagent/config/tests/test_injection_context.py | ldej/aries-cloudagent-python | 25b7a9c08921e67b0962c434102489884ac403b2 | [
"Apache-2.0"
] | 1 | 2021-01-15T01:04:43.000Z | 2021-01-15T01:04:43.000Z | aries_cloudagent/config/tests/test_injection_context.py | ldej/aries-cloudagent-python | 25b7a9c08921e67b0962c434102489884ac403b2 | [
"Apache-2.0"
] | 1 | 2020-06-16T20:20:55.000Z | 2020-06-16T20:20:55.000Z | aries_cloudagent/config/tests/test_injection_context.py | ldej/aries-cloudagent-python | 25b7a9c08921e67b0962c434102489884ac403b2 | [
"Apache-2.0"
] | 1 | 2020-04-30T08:22:22.000Z | 2020-04-30T08:22:22.000Z | from asynctest import TestCase as AsyncTestCase
from ..base import BaseInjector, InjectorError
from ..injection_context import InjectionContext, InjectionContextError
class TestInjectionContext(AsyncTestCase):
def setUp(self):
self.test_key = "TEST"
self.test_value = "VALUE"
self.test_sco... | 46.205882 | 87 | 0.710694 |
182aa284decccae02a6fb64c7bacd9a5b5f4488e | 11,396 | py | Python | app/viz.py | tigju/PT17_cityspire-b-ds | 488ef2c7e11ff37574e88f5d41434509020c7439 | [
"MIT"
] | 1 | 2021-04-09T18:44:01.000Z | 2021-04-09T18:44:01.000Z | app/viz.py | tigju/PT17_cityspire-b-ds | 488ef2c7e11ff37574e88f5d41434509020c7439 | [
"MIT"
] | 3 | 2021-04-07T03:48:08.000Z | 2021-04-19T14:21:36.000Z | app/viz.py | tigju/PT17_cityspire-b-ds | 488ef2c7e11ff37574e88f5d41434509020c7439 | [
"MIT"
] | 5 | 2021-03-11T04:20:27.000Z | 2021-05-01T20:03:05.000Z | """Data visualization functions"""
from fastapi import APIRouter, HTTPException, Depends
from pydantic import BaseModel
import pandas as pd
import plotly.express as px
from plotly.subplots import make_subplots
import plotly.graph_objects as go
from app.ml import City, validate_city
from app.state_abbr import us_state_... | 36.880259 | 300 | 0.635574 |
43852d78b0355ffe3117e5f898779fd88f4f8df0 | 1,105 | py | Python | register/views.py | crackcraft/pyreg | 719e673cd694cd2dd76d2a1016c1177c752c098f | [
"CC0-1.0"
] | null | null | null | register/views.py | crackcraft/pyreg | 719e673cd694cd2dd76d2a1016c1177c752c098f | [
"CC0-1.0"
] | null | null | null | register/views.py | crackcraft/pyreg | 719e673cd694cd2dd76d2a1016c1177c752c098f | [
"CC0-1.0"
] | null | null | null | import os
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from . import database
from .models import PageView, Record
# Create your views here.
def get_client_ip(request):
x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
if x_forwarded_for:
... | 26.95122 | 85 | 0.681448 |
5a6099150b79dfea01744e3ca91c206621319f79 | 1,848 | py | Python | plot_uhlmann_convergence.py | mhauru/uhlmann-fidelities-from-tensor-networks | cc30882db529fcc787418b172550ae91bd34dcba | [
"MIT"
] | 3 | 2018-10-07T03:16:12.000Z | 2020-11-19T01:22:36.000Z | plot_uhlmann_convergence.py | mhauru/uhlmann-fidelities-from-tensor-networks | cc30882db529fcc787418b172550ae91bd34dcba | [
"MIT"
] | null | null | null | plot_uhlmann_convergence.py | mhauru/uhlmann-fidelities-from-tensor-networks | cc30882db529fcc787418b172550ae91bd34dcba | [
"MIT"
] | null | null | null | import numpy as np
import scipy.integrate as integrate
import pickle
import warnings
import datetime
import sys
import matplotlib.cm as cm
import matplotlib.colors as colors
import matplotlib.gridspec as gridspec
from matplotlib import pyplot as plt
from ncon import ncon
from tntools import datadispenser
noshow = "nos... | 25.315068 | 87 | 0.617965 |
2299e0e3bca86887febc08be7ec43d085813376a | 3,677 | py | Python | Code/FlashWriter/client.py | ctag-fh-kiel/troll-8 | 18b872b5b0290dbb0e9f514edea392601a896346 | [
"CC-BY-4.0"
] | 11 | 2017-11-01T14:47:33.000Z | 2022-01-31T09:04:44.000Z | Code/FlashWriter/client.py | ctag-fh-kiel/troll-8 | 18b872b5b0290dbb0e9f514edea392601a896346 | [
"CC-BY-4.0"
] | null | null | null | Code/FlashWriter/client.py | ctag-fh-kiel/troll-8 | 18b872b5b0290dbb0e9f514edea392601a896346 | [
"CC-BY-4.0"
] | 3 | 2017-11-20T17:22:12.000Z | 2021-11-08T23:23:13.000Z | # Flash client with automatic resampling for Troll8
# Duration of inputfile should be integers (in seconds)
#
# Dependencies:
# - pyserial (pip install pyserial)
# - Python Audio Tools (http://audiotools.sourceforge.net/install.html)
import struct
import sys
import getopt
import wave
import audioop
import array
import... | 30.139344 | 101 | 0.616263 |
c0c2c3dedeab23919a5e9e8ea605c1bc6c71020e | 515 | py | Python | tests/test_set_where_x_greater_than_y.py | tlambert-forks/pyclesperanto_prototype | aea964a75e691f19b7753040daa8b276d57ccf36 | [
"BSD-3-Clause"
] | 64 | 2020-03-18T12:11:22.000Z | 2022-03-31T08:19:18.000Z | tests/test_set_where_x_greater_than_y.py | haesleinhuepf/pyclesperanto_prototype | 65bc3035d3b2b61a2722c93b95bae310bfbd190e | [
"BSD-3-Clause"
] | 148 | 2020-05-14T06:14:11.000Z | 2022-03-26T15:02:31.000Z | tests/test_set_where_x_greater_than_y.py | haesleinhuepf/pyclesperanto_prototype | 65bc3035d3b2b61a2722c93b95bae310bfbd190e | [
"BSD-3-Clause"
] | 16 | 2020-05-31T00:53:44.000Z | 2022-03-23T13:20:57.000Z | import pyclesperanto_prototype as cle
import numpy as np
def test_set_where_x_greater_than_y():
result = cle.push(np.asarray([
[0, 0, 0, 1],
[0, 0, 3, 1],
[0, 0, 3, 1],
[1, 1, 1, 1]
]).T)
reference = cle.push(np.asarray([
[0, 0, 0, 1],
[3, 0, 3, 1],
... | 19.074074 | 45 | 0.500971 |
bcc51590aad25540dcebd720e0c46dfaca29c1ab | 1,651 | py | Python | setup.py | PandaWhoCodes/torstream | a619b382677cf70e7eae3bff8800741f84da475b | [
"MIT"
] | 3 | 2018-04-03T04:13:22.000Z | 2021-11-10T09:03:29.000Z | setup.py | PandaWhoCodes/torstream | a619b382677cf70e7eae3bff8800741f84da475b | [
"MIT"
] | null | null | null | setup.py | PandaWhoCodes/torstream | a619b382677cf70e7eae3bff8800741f84da475b | [
"MIT"
] | null | null | null | """
Stream any media content using console
"""
from setuptools import setup
dependencies = ['bs4', 'lxml', 'requests', 'argparse']
setup(
name='torstream',
version='0.1.6',
url='https://github.com/PandaWhoCodes/torstream',
license='MIT',
author='Thomas Ashish Cherian',
author_email='ufoundashi... | 32.372549 | 72 | 0.608116 |
6c38b0173dc5e7d77f515b7907cd4178ccaab7dd | 3,665 | py | Python | code/mrubis_controller/component_utility_predictor.py | hpi-classroom/Adversarial-Digital-Twins | f997466834df26adce29bea97115450fe4dcf4f7 | [
"MIT"
] | null | null | null | code/mrubis_controller/component_utility_predictor.py | hpi-classroom/Adversarial-Digital-Twins | f997466834df26adce29bea97115450fe4dcf4f7 | [
"MIT"
] | 1 | 2021-07-14T12:50:20.000Z | 2021-07-14T12:50:20.000Z | code/mrubis_controller/component_utility_predictor.py | hpi-classroom/Adversarial-Digital-Twins | f997466834df26adce29bea97115450fe4dcf4f7 | [
"MIT"
] | 2 | 2021-05-06T15:30:48.000Z | 2021-12-08T11:06:24.000Z | from os import stat
import pandas as pd
import numpy as np
from pathlib import Path
from sklearn.linear_model import Ridge
class RidgeUtilityPredictor():
def __init__(self) -> None:
self.train_cols = {
'features': [
'CRITICALITY',
'CONNECTIVITY',
... | 45.246914 | 240 | 0.584993 |
60a3e6408d6f407536334adf5626e3416bc28dc2 | 1,219 | py | Python | examples/SimpleTiledTiffConverter.py | NHPatterson/bfio | 0891721b316ccaef6d4bb434e1c80c93fa8fcd69 | [
"MIT"
] | 6 | 2021-09-09T01:27:13.000Z | 2021-12-16T13:52:15.000Z | examples/SimpleTiledTiffConverter.py | NHPatterson/bfio | 0891721b316ccaef6d4bb434e1c80c93fa8fcd69 | [
"MIT"
] | 15 | 2021-07-20T13:16:34.000Z | 2022-03-04T13:34:16.000Z | examples/SimpleTiledTiffConverter.py | NHPatterson/bfio | 0891721b316ccaef6d4bb434e1c80c93fa8fcd69 | [
"MIT"
] | 2 | 2021-11-01T18:08:18.000Z | 2022-01-26T19:23:12.000Z | from bfio import BioReader, BioWriter
from pathlib import Path
import requests
import numpy as np
""" Get an example image """
# Set up the directories
PATH = Path("data")
PATH.mkdir(parents=True, exist_ok=True)
# Download the data if it doesn't exist
URL = "https://github.com/usnistgov/WIPP/raw/master/data/PyramidBu... | 31.25641 | 101 | 0.7137 |
9722b326730ac93fc748319faa8820589fb2052d | 44,928 | py | Python | autotest/gcore/cog.py | vincentschut/gdal | 91daf084c245b31a2d6d06fb4b12e2a3229effa1 | [
"MIT"
] | 7 | 2019-07-18T17:00:22.000Z | 2021-09-12T19:06:41.000Z | autotest/gcore/cog.py | vincentschut/gdal | 91daf084c245b31a2d6d06fb4b12e2a3229effa1 | [
"MIT"
] | 4 | 2019-07-18T15:49:23.000Z | 2021-10-19T22:56:50.000Z | autotest/gcore/cog.py | vincentschut/gdal | 91daf084c245b31a2d6d06fb4b12e2a3229effa1 | [
"MIT"
] | 2 | 2019-12-20T07:43:13.000Z | 2021-04-16T22:45:29.000Z | #!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: COG driver testing
# Author: Even Rouault <even.rouault at spatialys.com>
#
###############################################################... | 41.910448 | 159 | 0.611801 |
8ac908fac0023aedda966a7be120c41a2f515451 | 17,066 | py | Python | iotas/devices/moorescloud/holiday/driver.py | cheshrkat/holideck | 4ee6e11d728ef24c32670e6b15a16de27c8f7406 | [
"MIT"
] | 2 | 2018-01-03T09:58:00.000Z | 2019-05-15T07:26:33.000Z | iotas/devices/moorescloud/holiday/driver.py | cheshrkat/holideck | 4ee6e11d728ef24c32670e6b15a16de27c8f7406 | [
"MIT"
] | null | null | null | iotas/devices/moorescloud/holiday/driver.py | cheshrkat/holideck | 4ee6e11d728ef24c32670e6b15a16de27c8f7406 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
"""
Device-specific implementation for Holiday by MooresCloud
Homepage and documentation: http://dev.moorescloud.com/
Copyright (c) 2013, Mark Pesce.
License: MIT (see LICENSE for details)
"""
__author__ = 'Mark Pesce'
__version__ = '1.0b3'
__license__ = 'MIT'
import subprocess, time, os
import ... | 28.73064 | 110 | 0.629966 |
6a2a1735247eedda01f0b7c2570fa2e4655934e6 | 40 | py | Python | 00-basics/09-string_formatters_01.py | ralexrivero/python_fundation | 34a855db7380d3d91db6a8f02d97f287d038ef5f | [
"Apache-2.0"
] | 1 | 2021-09-19T04:09:48.000Z | 2021-09-19T04:09:48.000Z | 00-basics/09-string_formatters_01.py | ralexrivero/python_fundation | 34a855db7380d3d91db6a8f02d97f287d038ef5f | [
"Apache-2.0"
] | null | null | null | 00-basics/09-string_formatters_01.py | ralexrivero/python_fundation | 34a855db7380d3d91db6a8f02d97f287d038ef5f | [
"Apache-2.0"
] | null | null | null | print("Sammy has {} ballons.".format(5)) | 40 | 40 | 0.675 |
a085b6557592cff670c7bc6251f09356ad82a7f0 | 71 | py | Python | pytgraph/types/traits.py | intv0id/pytgraph | 0e42357e28fc32c478dfad610f331ea0b3d5d735 | [
"BSD-3-Clause"
] | 1 | 2019-06-21T15:35:11.000Z | 2019-06-21T15:35:11.000Z | pytgraph/types/traits.py | intv0id/pytgraph | 0e42357e28fc32c478dfad610f331ea0b3d5d735 | [
"BSD-3-Clause"
] | 1 | 2019-12-21T14:23:43.000Z | 2019-12-21T14:23:43.000Z | pytgraph/types/traits.py | intv0id/pytgraph | 0e42357e28fc32c478dfad610f331ea0b3d5d735 | [
"BSD-3-Clause"
] | null | null | null | from traitlets import TraitType
class GraphData(TraitType):
pass
| 11.833333 | 31 | 0.774648 |
793c86f73a4d55821ca6cb2b6b8686ce149599d7 | 8,853 | py | Python | aioouimeaux/__main__.py | frawau/aioouimeaux | ea473ded95e41e350793b0e289944a359049c501 | [
"BSD-3-Clause"
] | 2 | 2019-01-26T02:44:14.000Z | 2019-08-06T00:40:56.000Z | aioouimeaux/__main__.py | frawau/aioouimeaux | ea473ded95e41e350793b0e289944a359049c501 | [
"BSD-3-Clause"
] | 1 | 2019-05-23T22:35:27.000Z | 2019-05-25T20:23:50.000Z | aioouimeaux/__main__.py | frawau/aioouimeaux | ea473ded95e41e350793b0e289944a359049c501 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
#
# This application is an example on how to use aioouimeaux
#
# Copyright (c) 2016 François Wautier
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Sof... | 40.797235 | 104 | 0.495312 |
e24dc1d51069f46e528280ff2eb58115dda49bfc | 178 | py | Python | kungfucms/themes/__init__.py | kungfusoft/kungfucms | 03a4c322f3d074dba47fd512c638556059ac6565 | [
"MIT"
] | null | null | null | kungfucms/themes/__init__.py | kungfusoft/kungfucms | 03a4c322f3d074dba47fd512c638556059ac6565 | [
"MIT"
] | null | null | null | kungfucms/themes/__init__.py | kungfusoft/kungfucms | 03a4c322f3d074dba47fd512c638556059ac6565 | [
"MIT"
] | null | null | null | # PROJECT : kungfucms
# TIME : 19-2-14 下午2:12
# AUTHOR : Younger Shen
# EMAIL : younger.x.shen@gmail.com
# CELL : 13811754531
# WECHAT : 13811754531
# WEB : https://punkcoder.cn
| 22.25 | 34 | 0.691011 |
c23f42eb6cfc2377825bb84dd15c19b33c9c4027 | 417 | py | Python | backend/summer_thunder_30013/wsgi.py | crowdbotics-apps/summer-thunder-30013 | 998a1d4ae8f40f8bd09994e194424698f0a2f905 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/summer_thunder_30013/wsgi.py | crowdbotics-apps/summer-thunder-30013 | 998a1d4ae8f40f8bd09994e194424698f0a2f905 | [
"FTL",
"AML",
"RSA-MD"
] | 27 | 2021-08-21T22:42:39.000Z | 2021-10-04T15:41:12.000Z | backend/summer_thunder_30013/wsgi.py | crowdbotics-apps/summer-thunder-30013 | 998a1d4ae8f40f8bd09994e194424698f0a2f905 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for summer_thunder_30013 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault(... | 24.529412 | 80 | 0.798561 |
ba79c942b34df054f0d551e5e500a386f9366159 | 9,290 | py | Python | elegantrl/train/config.py | shengrenhou/ElegantRL | a99ad3336410eb4ae632211d4b8b8c35acfeef6d | [
"Apache-2.0"
] | 752 | 2021-02-10T09:23:00.000Z | 2021-09-02T18:04:46.000Z | elegantrl/train/config.py | ashishsengupta/ElegantRL | a29c58e39ea9fd2936f2c3434de4a7a8cc201739 | [
"Apache-2.0"
] | 34 | 2021-02-10T14:18:25.000Z | 2021-08-25T12:10:48.000Z | elegantrl/train/config.py | ashishsengupta/ElegantRL | a29c58e39ea9fd2936f2c3434de4a7a8cc201739 | [
"Apache-2.0"
] | 141 | 2021-02-15T21:12:01.000Z | 2021-09-02T09:08:45.000Z | import os
import torch
import numpy as np
class Arguments: # [ElegantRL.2021.10.21]
"""
Configuration map.
:param env[object]: the environment object in ElegantRL.
:param agent[object]: the agent object in ElegantRL.
**Attributes for environment setup**
Attributes
... | 45.990099 | 107 | 0.602476 |
b127f3604a1ebc218255f1aed4f1b7449c2d2fda | 708 | py | Python | ip_addresses/admin.py | rytis/IP-address-management-tool | 35531adf85eef369c3ce23ff1e9f9e9fc4e1fb38 | [
"Apache-2.0"
] | 7 | 2016-04-26T00:51:49.000Z | 2022-01-18T15:57:24.000Z | ip_addresses/admin.py | rytis/IP-address-management-tool | 35531adf85eef369c3ce23ff1e9f9e9fc4e1fb38 | [
"Apache-2.0"
] | 2 | 2017-12-18T05:50:07.000Z | 2019-07-10T09:06:23.000Z | ip_addresses/admin.py | rytis/IP-address-management-tool | 35531adf85eef369c3ce23ff1e9f9e9fc4e1fb38 | [
"Apache-2.0"
] | 7 | 2015-09-15T11:19:15.000Z | 2022-03-17T00:43:29.000Z | from www_example_com.ip_addresses.models import *
from django.contrib import admin
class NetworkAddressAdmin(admin.ModelAdmin):
pass
class DHCPNetworkAdmin(admin.ModelAdmin):
pass
class DNSServerAdmin(admin.ModelAdmin):
pass
class DomainNameAdmin(admin.ModelAdmin):
pass
class DHCPAddressPoolAdmin(a... | 25.285714 | 58 | 0.820621 |
d4ae3b6549cb3e6e43a5f986ec76d6e1d4e09704 | 2,358 | py | Python | hummingbird/ml/operator_converters/__init__.py | kernc/hummingbird | 8c9d5b1f19054d521b22ad7fcffa8ee10e405ac3 | [
"MIT"
] | null | null | null | hummingbird/ml/operator_converters/__init__.py | kernc/hummingbird | 8c9d5b1f19054d521b22ad7fcffa8ee10e405ac3 | [
"MIT"
] | null | null | null | hummingbird/ml/operator_converters/__init__.py | kernc/hummingbird | 8c9d5b1f19054d521b22ad7fcffa8ee10e405ac3 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
All o... | 48.122449 | 91 | 0.751484 |
4c8f4350dfa188275a813fac7a94391a7bfd5e1f | 6,664 | py | Python | code/switch-watcher/src/switch-watch.py | CC-Digital-Innovation/devops-workshop | 1498d4382b2cff408856bd049c2b2cdf37cac4e7 | [
"MIT"
] | null | null | null | code/switch-watcher/src/switch-watch.py | CC-Digital-Innovation/devops-workshop | 1498d4382b2cff408856bd049c2b2cdf37cac4e7 | [
"MIT"
] | null | null | null | code/switch-watcher/src/switch-watch.py | CC-Digital-Innovation/devops-workshop | 1498d4382b2cff408856bd049c2b2cdf37cac4e7 | [
"MIT"
] | 1 | 2021-04-09T20:53:33.000Z | 2021-04-09T20:53:33.000Z | # libs/modules
import configparser
import difflib
import time
import smtplib
import yaml
from datetime import datetime
from configparser import ExtendedInterpolation
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from netmiko import ConnectHandler
# owned
__author__ = 'Rich Bocch... | 42.993548 | 149 | 0.634604 |
0994dd14991120cebab69729cbe93f34a64330e2 | 4,233 | py | Python | samples/lab4_5_samples/AgI_sample.py | bkoz37/3320labs | 8314237587548f06bf6816abf7c9103e06ea4e58 | [
"MIT"
] | 7 | 2017-02-22T17:17:25.000Z | 2022-03-28T03:38:46.000Z | samples/lab4_5_samples/AgI_sample.py | bkoz37/3320labs | 8314237587548f06bf6816abf7c9103e06ea4e58 | [
"MIT"
] | null | null | null | samples/lab4_5_samples/AgI_sample.py | bkoz37/3320labs | 8314237587548f06bf6816abf7c9103e06ea4e58 | [
"MIT"
] | 5 | 2018-09-18T14:15:14.000Z | 2022-01-25T09:19:11.000Z | import numpy, os
import matplotlib.pyplot as plt
from labutil.plugins.lammps import lammps_run, parse_lammps_rdf, parse_lammps_thermo, get_rdf
from labutil.objects import File, Struc, Dir, ase2struc, ClassicalPotential
from ase.spacegroup import crystal
from ase.build import make_supercell
from ase import Atoms
intemp... | 35.571429 | 119 | 0.660524 |
a14401c642d0cde3d760cfcf88f05fccc59c9a6b | 456 | py | Python | L1TriggerConfig/GMTConfigProducers/python/L1MuGMTParametersOnlineProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | L1TriggerConfig/GMTConfigProducers/python/L1MuGMTParametersOnlineProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | L1TriggerConfig/GMTConfigProducers/python/L1MuGMTParametersOnlineProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
L1MuGMTParametersOnlineProducer = cms.ESProducer("L1MuGMTParametersOnlineProducer",
onlineDB = cms.string("oracle://CMS_OMDS_LB/CMS_TRG_R"),
onlineAuthentication = cms.string("."),
... | 50.666667 | 95 | 0.530702 |
8cf69f5e3dd744e63398bad0dba62d70b506fb91 | 4,755 | py | Python | kube_hunter/modules/discovery/apiserver.py | austinhuntinghpe/kube-hunter | 81ba0bf52781fe44f650aa90837416a15174d46b | [
"Apache-2.0"
] | 1 | 2021-09-13T21:52:52.000Z | 2021-09-13T21:52:52.000Z | kube_hunter/modules/discovery/apiserver.py | austinhuntinghpe/kube-hunter | 81ba0bf52781fe44f650aa90837416a15174d46b | [
"Apache-2.0"
] | 2 | 2021-05-20T20:17:17.000Z | 2022-02-26T09:20:16.000Z | kube_hunter/modules/discovery/apiserver.py | austinhuntinghpe/kube-hunter | 81ba0bf52781fe44f650aa90837416a15174d46b | [
"Apache-2.0"
] | 1 | 2020-07-29T07:50:10.000Z | 2020-07-29T07:50:10.000Z | import json
import requests
import logging
from kube_hunter.core.types import Discovery
from kube_hunter.core.events import handler
from kube_hunter.core.events.types import OpenPortEvent, Service, Event, EventFilterBase
KNOWN_API_PORTS = [443, 6443, 8080]
class K8sApiService(Service, Event):
"""A Kubernetes API... | 41.347826 | 116 | 0.659096 |
aa8c60e9e0dfdbab2e7fe42a967da58d82cf86a8 | 324 | py | Python | owtf/plugins/network/active/smb@PTES-009.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/plugins/network/active/smb@PTES-009.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/plugins/network/active/smb@PTES-009.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | """
Plugin for probing SMB
"""
from owtf.managers.resource import get_resources
from owtf.plugin.plugin_helper import plugin_helper
DESCRIPTION = " SMB Probing "
def run(PluginInfo):
resource = get_resources('SmbProbeMethods')
return plugin_helper.CommandDump('Test Command', 'Output', resource, PluginInfo, ... | 23.142857 | 88 | 0.759259 |
a7e992e2831e2f244380457fb13b077ec1ae2ffe | 2,425 | py | Python | src/example.py | RedSpiderMkV/FinanceMarketDataGrabber | f6dc916471a73a6dd86aac0776c6dfa56fa1f6f5 | [
"MIT"
] | 46 | 2015-10-15T21:34:40.000Z | 2022-03-27T13:42:43.000Z | src/example.py | RedSpiderMkV/FinanceMarketDataGrabber | f6dc916471a73a6dd86aac0776c6dfa56fa1f6f5 | [
"MIT"
] | null | null | null | src/example.py | RedSpiderMkV/FinanceMarketDataGrabber | f6dc916471a73a6dd86aac0776c6dfa56fa1f6f5 | [
"MIT"
] | 19 | 2015-10-15T21:35:52.000Z | 2020-02-26T15:08:54.000Z | #!/usr/bin/python
#-------------------------------------------------------------------------------
# Name: ..
# Purpose:
#
# Author: RedSpiderMkV
#
# Created: 15/10/2015
# Copyright: (c) RedSpiderMkV 2015
# Licence: <your licence>
#-----------------------------------------------------------------... | 29.938272 | 81 | 0.629691 |
7b9385e7a59d2677a3ef6851a572001312b36886 | 9,933 | py | Python | qiskit/aqua/components/uncertainty_problems/multivariate_problem.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/components/uncertainty_problems/multivariate_problem.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/components/uncertainty_problems/multivariate_problem.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | 2 | 2020-02-13T02:17:58.000Z | 2020-08-09T07:56:25.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 39.891566 | 98 | 0.574852 |
08ec0e6b34b934e46714352153db85486079466b | 554 | py | Python | waespk/core/migrations/0027_auto_20160603_1718.py | spketoundi/CamODI | f5df22bf6a771278294e7af21147d61e5cd19bf5 | [
"MIT"
] | null | null | null | waespk/core/migrations/0027_auto_20160603_1718.py | spketoundi/CamODI | f5df22bf6a771278294e7af21147d61e5cd19bf5 | [
"MIT"
] | null | null | null | waespk/core/migrations/0027_auto_20160603_1718.py | spketoundi/CamODI | f5df22bf6a771278294e7af21147d61e5cd19bf5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-06-03 16:18
from __future__ import unicode_literals
from django.db import migrations
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('ossuo', '0026_merge'),
]
operations = [
migrations... | 25.181818 | 142 | 0.65343 |
77339469ac06ead22cde86065cd53b1258155a50 | 243 | py | Python | tests/test_hello.py | SweptSource/python-example | 720656b15fa57472b885feb32d3735c336398411 | [
"MIT"
] | null | null | null | tests/test_hello.py | SweptSource/python-example | 720656b15fa57472b885feb32d3735c336398411 | [
"MIT"
] | null | null | null | tests/test_hello.py | SweptSource/python-example | 720656b15fa57472b885feb32d3735c336398411 | [
"MIT"
] | null | null | null | import hello
def test_says_world():
assert hello.say_what() == 'world'
def test_empty():
assert len(hello.say_what()) != ''
def test_1():
assert 1==1
def test_2():
assert 2+2==4
def test_null():
assert 2+2!=None
| 13.5 | 38 | 0.604938 |
415071f9c2019fbe30136c3fdb5edbee585d2b54 | 823 | py | Python | table.py | misterpah/ldtp_adapter | df9cd0186cf51174ea131943f8547a9df079035b | [
"MIT"
] | null | null | null | table.py | misterpah/ldtp_adapter | df9cd0186cf51174ea131943f8547a9df079035b | [
"MIT"
] | null | null | null | table.py | misterpah/ldtp_adapter | df9cd0186cf51174ea131943f8547a9df079035b | [
"MIT"
] | null | null | null | def checkrow(window,object):
log("{} :not implemented yet".format(sys._getframe().f_code.co_name))
handle = getobjecthandle(window,object)
if pyacc.checkObjectState(handle['handle'],pyatspi.STATE_CHECKED) == False:
click(window,object)
else:
mousemove(window,object)
return pyacc.chec... | 37.409091 | 79 | 0.696233 |
6b0fc7b692eaef756ba08b61762d7575c855d5d2 | 29,696 | py | Python | homeassistant/components/zwave_js/config_flow.py | switschel/core | 0ecca246bdc3028c30bf8ccbf2b4c7f2a8b3f9aa | [
"Apache-2.0"
] | null | null | null | homeassistant/components/zwave_js/config_flow.py | switschel/core | 0ecca246bdc3028c30bf8ccbf2b4c7f2a8b3f9aa | [
"Apache-2.0"
] | 36 | 2020-07-19T13:24:30.000Z | 2022-03-31T06:02:01.000Z | homeassistant/components/zwave_js/config_flow.py | switschel/core | 0ecca246bdc3028c30bf8ccbf2b4c7f2a8b3f9aa | [
"Apache-2.0"
] | 1 | 2020-12-13T08:27:33.000Z | 2020-12-13T08:27:33.000Z | """Config flow for Z-Wave JS integration."""
from __future__ import annotations
from abc import abstractmethod
import asyncio
import logging
from typing import Any
import aiohttp
from async_timeout import timeout
import voluptuous as vol
from zwave_js_server.version import VersionInfo, get_server_version
from homeas... | 37.447667 | 88 | 0.63096 |
5bf61ac30ffe7734c8cd119953ff1f8a2324405d | 21 | py | Python | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/Units/Volume/One fluid ounce (US) in cubic meters.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/Units/Volume/One fluid ounce (US) in cubic meters.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/Units/Volume/One fluid ounce (US) in cubic meters.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | 1 | 2021-02-04T04:51:48.000Z | 2021-02-04T04:51:48.000Z | constants.fluid_ounce | 21 | 21 | 0.952381 |
33ab89acdf761f5254a978ba6feb7370c20865cb | 1,271 | py | Python | Easy/429.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 6 | 2017-09-25T18:05:50.000Z | 2019-03-27T00:23:15.000Z | Easy/429.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 1 | 2017-10-29T12:04:41.000Z | 2018-08-16T18:00:37.000Z | Easy/429.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | null | null | null | # ------------------------------
# 429. N-ary Tree Level Order Traversal
#
# Description:
# Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
# For example, given a 3-ary tree:
# [
# [1],
# [3,2,4],
# [5,6]
# ]
#
# Note:
# The depth of... | 22.298246 | 119 | 0.483871 |
b8ab1ae75a55771cb48c813c01490912466d5fb1 | 347 | py | Python | OpenGLCffi/EGL/EXT/NV/native_query.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | OpenGLCffi/EGL/EXT/NV/native_query.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | OpenGLCffi/EGL/EXT/NV/native_query.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | from OpenGLCffi.EGL import params
@params(api='egl', prms=['dpy', 'display_id'])
def eglQueryNativeDisplayNV(dpy, display_id):
pass
@params(api='egl', prms=['dpy', 'surf', 'window'])
def eglQueryNativeWindowNV(dpy, surf, window):
pass
@params(api='egl', prms=['dpy', 'surf', 'pixmap'])
def eglQueryNativePixmapNV(d... | 20.411765 | 50 | 0.700288 |
0a670a2e75f50aa4d41f996f2a0bc52056552c53 | 1,000 | py | Python | python-cim/samples/dump_class_layout.py | pombredanne/flare-wmi | fdde184b7bf98e1043f8246e0c75a7a1316c48c9 | [
"Apache-2.0"
] | 390 | 2015-08-06T20:33:01.000Z | 2021-09-11T21:43:34.000Z | python-cim/samples/dump_class_layout.py | pombredanne/flare-wmi | fdde184b7bf98e1043f8246e0c75a7a1316c48c9 | [
"Apache-2.0"
] | 15 | 2015-08-11T18:02:10.000Z | 2019-08-11T10:16:49.000Z | python-cim/samples/dump_class_layout.py | pombredanne/flare-wmi | fdde184b7bf98e1043f8246e0c75a7a1316c48c9 | [
"Apache-2.0"
] | 106 | 2015-08-08T22:44:50.000Z | 2021-08-25T09:20:57.000Z | import logging
import traceback
from cim import CIM
from cim import Index
from cim.objects import ObjectResolver
from cim.formatters import dump_layout
def main(type_, path, namespaceName, className):
if type_ not in ("xp", "win7"):
raise RuntimeError("Invalid mapping type: {:s}".format(type_))
c = ... | 25.641026 | 70 | 0.658 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.