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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
545bb6dbc0cb0bf80cf26b42ce73dc3145d027c2 | 957 | py | Python | sysdescrparser/sun_sunos.py | rlaneyjr/sysdescrparser | 4ebe35a41f26da6ff3b9aaa69ba5a99cbbb4d33f | [
"MIT"
] | null | null | null | sysdescrparser/sun_sunos.py | rlaneyjr/sysdescrparser | 4ebe35a41f26da6ff3b9aaa69ba5a99cbbb4d33f | [
"MIT"
] | null | null | null | sysdescrparser/sun_sunos.py | rlaneyjr/sysdescrparser | 4ebe35a41f26da6ff3b9aaa69ba5a99cbbb4d33f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""sysdescrparser.sun_sunos."""
import re
from sysdescrparser.sun import Sun
# pylint: disable=no-member
class SunSUNOS(Sun):
"""Class SunSUNOS.
SNMP sysDescr for SunSUNOS.
"""
def __init__(self, raw):
"""Constructor."""
super(SunSUNOS, self).__init__(raw... | 21.266667 | 52 | 0.513062 |
a9fe5641942ca26a7764e282bec02aa42282379c | 3,611 | py | Python | il2fb/ds/events/parsing/spawning.py | IL2HorusTeam/il2fb-ds-events-parser | ea13014506166f24909630ea75bcecf810cfbbd8 | [
"MIT"
] | null | null | null | il2fb/ds/events/parsing/spawning.py | IL2HorusTeam/il2fb-ds-events-parser | ea13014506166f24909630ea75bcecf810cfbbd8 | [
"MIT"
] | null | null | null | il2fb/ds/events/parsing/spawning.py | IL2HorusTeam/il2fb-ds-events-parser | ea13014506166f24909630ea75bcecf810cfbbd8 | [
"MIT"
] | null | null | null | import datetime
import re
from typing import Optional
from il2fb.commons.actors import HumanAircraftActor
from il2fb.commons.spatial import Point3D
from il2fb.ds.events.definitions.spawning import DespawningEvent
from il2fb.ds.events.definitions.spawning import HumanAircraftSpawnedEvent
from il2fb.ds.events.defini... | 28.888 | 103 | 0.739961 |
82519af7510a3bba223cfd154d913403de378eb2 | 67,093 | py | Python | systolic_runner/quantization/quantize.py | DeimosXing/onnxruntime-riscv | f1239ed20dc3754a63efe30c5396c655e1265626 | [
"MIT"
] | null | null | null | systolic_runner/quantization/quantize.py | DeimosXing/onnxruntime-riscv | f1239ed20dc3754a63efe30c5396c655e1265626 | [
"MIT"
] | null | null | null | systolic_runner/quantization/quantize.py | DeimosXing/onnxruntime-riscv | f1239ed20dc3754a63efe30c5396c655e1265626 | [
"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.
# --------------------------------------------------------------------------
import os
... | 46.983894 | 127 | 0.627502 |
0cce4522be0b7720e369b30f0b9df71a3989fbf2 | 394 | py | Python | Mundo 1/Ex028.py | FelipeDreissig/Prog-em-Py---CursoEmVideo | 59a85e228b4c7bc0738d1a213e71b0f7fb07d03a | [
"MIT"
] | null | null | null | Mundo 1/Ex028.py | FelipeDreissig/Prog-em-Py---CursoEmVideo | 59a85e228b4c7bc0738d1a213e71b0f7fb07d03a | [
"MIT"
] | null | null | null | Mundo 1/Ex028.py | FelipeDreissig/Prog-em-Py---CursoEmVideo | 59a85e228b4c7bc0738d1a213e71b0f7fb07d03a | [
"MIT"
] | null | null | null | ##### esolhendo o npumero certo
import random
from time import sleep
print('Brincadeira da adivinhação.')
lista = [0, 1, 2, 3, 4, 5]
num = int(input('Escolha um número de 0 a 5:\n'))
escolhapc = random.choice(lista)
print('Pensando')
sleep(3)
if num == escolhapc:
print('Parabéns, você acertou.')
else:
print('Vo... | 26.266667 | 85 | 0.692893 |
39d355e83a6e365933ae66e44c9d02cd0452a23d | 17,240 | py | Python | sysinv/sysinv/sysinv/sysinv/helm/neutron.py | MarioCarrilloA/config | 06a6f142d154970ce658e979822cd84ce447f612 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/helm/neutron.py | MarioCarrilloA/config | 06a6f142d154970ce658e979822cd84ce447f612 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/helm/neutron.py | MarioCarrilloA/config | 06a6f142d154970ce658e979822cd84ce447f612 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018-2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sysinv.common import constants
from sysinv.common import exception
from sysinv.common import utils
from sysinv.openstack.common import log as logging
from sysinv.helm import common
from sysinv.helm import openstack
fro... | 39.450801 | 97 | 0.505336 |
0fc7593ffb99eeceee1f776deed3fd25ca019910 | 4,182 | py | Python | tests/end_to_end/test_oidc.py | dcolligan/ga4gh-server | dd0b00a52de9684609b7f04a9d70946c36afa8a5 | [
"Apache-2.0"
] | 83 | 2015-01-05T22:21:11.000Z | 2017-02-20T01:25:28.000Z | tests/end_to_end/test_oidc.py | dcolligan/ga4gh-server | dd0b00a52de9684609b7f04a9d70946c36afa8a5 | [
"Apache-2.0"
] | 1,508 | 2015-01-02T14:06:12.000Z | 2017-03-08T19:49:18.000Z | tests/end_to_end/test_oidc.py | dcolligan/ga4gh-server | dd0b00a52de9684609b7f04a9d70946c36afa8a5 | [
"Apache-2.0"
] | 99 | 2015-01-14T20:48:56.000Z | 2017-03-08T18:35:06.000Z | """
Performs a request via the client with OpenID Connect enabled,
with a local OP server.
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import requests
import subprocess
from urlparse import urlparse
import shutil
import lxml.html as html
import cl... | 33.725806 | 78 | 0.662841 |
433dd68695d8f78f703517877349000cd9897726 | 5,525 | py | Python | contrib/seeds/makeseeds.py | smartblockscoin/smartblockscoin_src | 13bcb5953998e8a54533ac0a7bbb05a21bfc74d9 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | smartblockscoin/smartblockscoin_src | 13bcb5953998e8a54533ac0a7bbb05a21bfc74d9 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | smartblockscoin/smartblockscoin_src | 13bcb5953998e8a54533ac0a7bbb05a21bfc74d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.122093 | 186 | 0.567783 |
13af40a8c767cd42b486b154d684028240bf9ec8 | 48,297 | py | Python | test/parameter_test.py | rohankumardubey/luigi | f712c49b25c5197768d7c02a6f881effdbb803ea | [
"Apache-2.0"
] | 1 | 2021-12-10T16:44:29.000Z | 2021-12-10T16:44:29.000Z | test/parameter_test.py | bhargavkartik/luigi | f712c49b25c5197768d7c02a6f881effdbb803ea | [
"Apache-2.0"
] | null | null | null | test/parameter_test.py | bhargavkartik/luigi | f712c49b25c5197768d7c02a6f881effdbb803ea | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | 38.422434 | 145 | 0.635422 |
2af7354e6b584b964695f1a0b9bc767ec54e427e | 248 | py | Python | cursoemvideopython/desafio_005.py | edmilsonlibanio/Ola-Mundo-Python | 33fb08da5878f2784983c623df04d2bbdfb30f25 | [
"MIT"
] | null | null | null | cursoemvideopython/desafio_005.py | edmilsonlibanio/Ola-Mundo-Python | 33fb08da5878f2784983c623df04d2bbdfb30f25 | [
"MIT"
] | null | null | null | cursoemvideopython/desafio_005.py | edmilsonlibanio/Ola-Mundo-Python | 33fb08da5878f2784983c623df04d2bbdfb30f25 | [
"MIT"
] | null | null | null | # Desafio nº 5 - Faça um programa que leia um número inteiro e mostre na tela o seu sucessor e seu antecessor.
n = int(input('Insira um número: '))
print('O número {} é precedido pelo número {} e sucedido pelo número {}.'.format(n, (n-1), (n+1)))
| 49.6 | 110 | 0.685484 |
46bb49bffb15c9b3bd8d651c0a54f44d2cfac0de | 3,810 | py | Python | src/hanlendar/gui/widget/taskdetails.py | anetczuk/hanlendar | 940f2ca52f9d2bb601ffd1fa0332c6e31aaf854f | [
"MIT"
] | null | null | null | src/hanlendar/gui/widget/taskdetails.py | anetczuk/hanlendar | 940f2ca52f9d2bb601ffd1fa0332c6e31aaf854f | [
"MIT"
] | null | null | null | src/hanlendar/gui/widget/taskdetails.py | anetczuk/hanlendar | 940f2ca52f9d2bb601ffd1fa0332c6e31aaf854f | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 Arkadiusz Netczuk <dev.arnet@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# t... | 37.352941 | 80 | 0.680052 |
68aca4e143d9bf646fcf2f8b55e36f643127f3a4 | 16,158 | py | Python | Src/Analysis/compare_monte_carlo.py | jomimc/imperfect_fifths | 486608da65816e5ac70a33dbdd659c260905c52e | [
"MIT"
] | null | null | null | Src/Analysis/compare_monte_carlo.py | jomimc/imperfect_fifths | 486608da65816e5ac70a33dbdd659c260905c52e | [
"MIT"
] | null | null | null | Src/Analysis/compare_monte_carlo.py | jomimc/imperfect_fifths | 486608da65816e5ac70a33dbdd659c260905c52e | [
"MIT"
] | null | null | null | import argparse
import glob
import os
import sys
import time
from itertools import product
import matplotlib.pyplot as plt
import multiprocessing as mp
import numpy as np
import pandas as pd
import seaborn as sns
import statsmodels.nonparametric.api as smnp
import swifter
import utils
import graphs
N_PROC = 28
BASE... | 41.537275 | 182 | 0.605644 |
8339e54b94850c7675a8c26b07dd9eb3852812e6 | 1,035 | py | Python | nicos_mlz/mira/setups/gascell.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/mira/setups/gascell.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/mira/setups/gascell.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'alfonso pressure module'
group = 'optional'
tango_base = 'tango://e21-92.mira.frm2:10000/mira/'
devices = dict(
diptron3plus = device('nicos.devices.entangle.AnalogInput',
tangodevice = tango_base + 'alfonsomodule/diptron3',
description = 'Pressure at Diptron 3 Plus',
pollin... | 31.363636 | 79 | 0.598068 |
876c239c544e7cb088c856560b932034aa614fb6 | 8,212 | py | Python | tests/test_geometric_objects.py | ssg-aero/pyvista | 5150b062cf835c6c6a44f6aefa4d53a1ad832ba3 | [
"MIT"
] | null | null | null | tests/test_geometric_objects.py | ssg-aero/pyvista | 5150b062cf835c6c6a44f6aefa4d53a1ad832ba3 | [
"MIT"
] | null | null | null | tests/test_geometric_objects.py | ssg-aero/pyvista | 5150b062cf835c6c6a44f6aefa4d53a1ad832ba3 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import pyvista
def test_cylinder():
surf = pyvista.Cylinder([0, 10, 0], [1, 1, 1], 1, 5)
assert np.any(surf.points)
assert np.any(surf.faces)
def test_cylinder_structured():
cyl = pyvista.CylinderStructured()
assert np.any(cyl.points)
assert np.any(cyl.n_cel... | 25.905363 | 85 | 0.643205 |
665714ba1ff02b120bcd751f2de1e800bc42223a | 27,999 | py | Python | lib/rucio/client/didclient.py | ap9035/rucio | 39bb18bc244ca82c7ba6c942931317d81c3c6e5a | [
"Apache-2.0"
] | null | null | null | lib/rucio/client/didclient.py | ap9035/rucio | 39bb18bc244ca82c7ba6c942931317d81c3c6e5a | [
"Apache-2.0"
] | null | null | null | lib/rucio/client/didclient.py | ap9035/rucio | 39bb18bc244ca82c7ba6c942931317d81c3c6e5a | [
"Apache-2.0"
] | null | null | null | # Copyright 2013-2018 CERN for the benefit of the ATLAS collaboration.
#
# 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... | 40.055794 | 168 | 0.616915 |
ab0919bd0e9207ccfbff12a2745a36c126cb9756 | 6,197 | py | Python | art/estimators/classification/blackbox.py | meghana-sesetti/adversarial-robustness-toolbox | 6a5ce9e4142734ad9004e5c093ef8fa754ea6b39 | [
"MIT"
] | 1 | 2020-12-26T10:02:05.000Z | 2020-12-26T10:02:05.000Z | art/estimators/classification/blackbox.py | Tikquuss/adversarial-robustness-toolbox | 62ffe7c951d8a60d49a9ea6ac7b04aa4432a3fb7 | [
"MIT"
] | 33 | 2021-01-18T08:30:34.000Z | 2022-03-11T07:05:13.000Z | art/estimators/classification/blackbox.py | Tikquuss/adversarial-robustness-toolbox | 62ffe7c951d8a60d49a9ea6ac7b04aa4432a3fb7 | [
"MIT"
] | 1 | 2020-09-28T12:58:01.000Z | 2020-09-28T12:58:01.000Z | # MIT License
#
# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2018
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# r... | 47.305344 | 120 | 0.694046 |
05e80bfb6c8a7e34fa83b2edd83f9e39c958f286 | 5,532 | py | Python | exercises/classifiers_evaluation.py | Tzory/IML.HUJI | 95dd33a69f21c52025f5699ec73ce86e6a797c97 | [
"MIT"
] | null | null | null | exercises/classifiers_evaluation.py | Tzory/IML.HUJI | 95dd33a69f21c52025f5699ec73ce86e6a797c97 | [
"MIT"
] | null | null | null | exercises/classifiers_evaluation.py | Tzory/IML.HUJI | 95dd33a69f21c52025f5699ec73ce86e6a797c97 | [
"MIT"
] | null | null | null | from IMLearn.learners.classifiers import *
import numpy as np
from typing import Tuple
import plotly.io as pio
pio.templates.default = "simple_white"
from IMLearn.metrics import *
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from math import atan2, pi
def load_dataset(filename: str) ->... | 35.235669 | 121 | 0.591829 |
af529069b4b88114b275ca96a02ba194bd0a4db0 | 53,975 | py | Python | src/python/datastore/data_handler.py | tapaswenipathak/clusterfuzz | a5468fc736ee42af9e2dd63e24c22ae2c3ac1662 | [
"Apache-2.0"
] | null | null | null | src/python/datastore/data_handler.py | tapaswenipathak/clusterfuzz | a5468fc736ee42af9e2dd63e24c22ae2c3ac1662 | [
"Apache-2.0"
] | null | null | null | src/python/datastore/data_handler.py | tapaswenipathak/clusterfuzz | a5468fc736ee42af9e2dd63e24c22ae2c3ac1662 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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 in writing, ... | 35.768721 | 80 | 0.699435 |
82e0b56de3fde810156152770e9af8259590d58a | 292 | py | Python | ehmatthes-pcc_2e-078318e/chapter_08/person.py | charliechocho/py-crash-course | b42b8a4c1cb8d76e8316f55c1565ff42d920ee63 | [
"Apache-2.0"
] | 12 | 2020-10-22T14:03:27.000Z | 2022-03-28T08:14:22.000Z | ehmatthes-pcc_2e-078318e/chapter_08/person.py | charliechocho/py-crash-course | b42b8a4c1cb8d76e8316f55c1565ff42d920ee63 | [
"Apache-2.0"
] | 4 | 2020-12-26T15:08:02.000Z | 2021-05-16T13:19:33.000Z | ehmatthes-pcc_2e-078318e/chapter_08/person.py | charliechocho/py-crash-course | b42b8a4c1cb8d76e8316f55c1565ff42d920ee63 | [
"Apache-2.0"
] | 9 | 2020-12-22T10:22:12.000Z | 2022-03-28T08:14:53.000Z | def build_person(first_name, last_name, age=None):
"""Return a dictionary of information about a person."""
person = {'first': first_name, 'last': last_name}
if age:
person['age'] = age
return person
musician = build_person('jimi', 'hendrix', age=27)
print(musician)
| 29.2 | 60 | 0.667808 |
7ff808f72483edc321e8cf3e1dbb1e356a09db02 | 15,517 | py | Python | layers/normalize.py | cainmagi/MDNT | 4affd8a83698ce6786c04dddacdcf7415f8c5f90 | [
"MIT"
] | 14 | 2019-09-24T07:33:13.000Z | 2021-03-04T16:27:29.000Z | layers/normalize.py | cainmagi/MDNT | 4affd8a83698ce6786c04dddacdcf7415f8c5f90 | [
"MIT"
] | 1 | 2020-02-28T04:24:09.000Z | 2020-03-03T08:55:31.000Z | layers/normalize.py | cainmagi/MDNT | 4affd8a83698ce6786c04dddacdcf7415f8c5f90 | [
"MIT"
] | 6 | 2020-08-24T03:35:41.000Z | 2021-02-10T08:02:16.000Z | '''
################################################################
# Layers - Extended normalization layers
# @ Modern Deep Network Toolkits for Tensorflow-Keras
# Yuchen Jin @ cainmagi@gmail.com
# Requirements: (Pay attention to version)
# python 3.6+
# tensorflow r1.13+
# Extend the normalization with instance ... | 42.98338 | 102 | 0.609525 |
f8495f2604200f202912b7633e3a15c0fb0e0a30 | 7,239 | py | Python | tensorflow_model_analysis/api/tfma_unit_test.py | shuaihu1992/model-analysis | 1a1ef8e42bec5c5362268d05936f6dc49c018693 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/api/tfma_unit_test.py | shuaihu1992/model-analysis | 1a1ef8e42bec5c5362268d05936f6dc49c018693 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/api/tfma_unit_test.py | shuaihu1992/model-analysis | 1a1ef8e42bec5c5362268d05936f6dc49c018693 | [
"Apache-2.0"
] | 1 | 2020-06-04T23:26:00.000Z | 2020-06-04T23:26:00.000Z | # Lint as: python3
# 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 agr... | 36.746193 | 111 | 0.662661 |
da3ac34580c314a3bb46c0d7ee593a4c02325e63 | 661 | py | Python | countapi/set.py | BenJetson/pycountapi | fef4b70a5b54cb35f946f2415a4798b630767ea2 | [
"MIT"
] | null | null | null | countapi/set.py | BenJetson/pycountapi | fef4b70a5b54cb35f946f2415a4798b630767ea2 | [
"MIT"
] | null | null | null | countapi/set.py | BenJetson/pycountapi | fef4b70a5b54cb35f946f2415a4798b630767ea2 | [
"MIT"
] | null | null | null | from typing import Optional
import requests
from countapi.common import API_BASE, NotOKError, build_id_path
class SetResponse:
old_value: int
value: int
def __init__(self, old_value: int, value: int) -> None:
self.old_value = old_value
self.value = value
def set_value(
value: int,... | 22.033333 | 81 | 0.667171 |
03b3be4a6aa3785d768c0e3ee06c91dd61d64e45 | 1,142 | py | Python | pycharm2020.1.3/script/core/common/EntityScanner.py | LaudateCorpus1/realtime-server | 25cb1d92dff3eb820e7a38d427538c0397199675 | [
"MIT"
] | 465 | 2018-06-21T02:50:56.000Z | 2022-03-27T11:51:46.000Z | pycharm2020.1.3/script/core/common/EntityScanner.py | Dango1992/realtime-server | 25cb1d92dff3eb820e7a38d427538c0397199675 | [
"MIT"
] | 8 | 2018-08-09T09:25:00.000Z | 2022-03-10T14:54:51.000Z | pycharm2020.1.3/script/core/common/EntityScanner.py | Dango1992/realtime-server | 25cb1d92dff3eb820e7a38d427538c0397199675 | [
"MIT"
] | 113 | 2018-06-25T01:42:20.000Z | 2022-03-23T11:27:56.000Z | import pkgutil
import importlib
from importlib import util
def walk_pkg(path, pkg_name):
for module_loader, name, is_pkg in pkgutil.iter_modules(path):
# importlib.import_module('.' + name, __package__)
# import sys
# isin = "component.puppet.CompPuppetTest" in sys.modules # TODO del
... | 31.722222 | 82 | 0.700525 |
6ffa7fc080bb4eca4e112adb3fbd1ef2fb99663c | 1,570 | py | Python | examples/cce/create_turbo_cluster.py | artem-lifshits/python-otcextensions | 2021da124f393e0429dd5913a3bc635e6143ba1e | [
"Apache-2.0"
] | 10 | 2018-03-03T17:59:59.000Z | 2020-01-08T10:03:00.000Z | examples/cce/create_turbo_cluster.py | artem-lifshits/python-otcextensions | 2021da124f393e0429dd5913a3bc635e6143ba1e | [
"Apache-2.0"
] | 39 | 2018-03-26T14:43:23.000Z | 2020-02-07T16:42:53.000Z | examples/cce/create_turbo_cluster.py | artem-lifshits/python-otcextensions | 2021da124f393e0429dd5913a3bc635e6143ba1e | [
"Apache-2.0"
] | 9 | 2018-03-27T09:17:40.000Z | 2019-08-07T12:53:49.000Z | #!/usr/bin/env python3
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwar... | 28.545455 | 75 | 0.598726 |
a7ac8f3e46b293bbe5a349d0272e8c8217034447 | 44,210 | py | Python | research/bsq/bsq_tracking.py | jacobnzw/SSMToybox | 1e2a8fd0634f6d53a30e24c21465c8e32c88999b | [
"MIT"
] | 9 | 2018-08-10T13:33:40.000Z | 2021-12-01T19:02:21.000Z | research/bsq/bsq_tracking.py | jacobnzw/SSMToybox | 1e2a8fd0634f6d53a30e24c21465c8e32c88999b | [
"MIT"
] | 35 | 2018-03-28T13:03:21.000Z | 2021-08-12T09:23:56.000Z | research/bsq/bsq_tracking.py | jacobnzw/SSMToybox | 1e2a8fd0634f6d53a30e24c21465c8e32c88999b | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from numpy import newaxis as na
from scipy.linalg import cho_factor, cho_solve
from journal_figure import *
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from matplotlib.lines import Line2D
from collections import OrderedDict
from sklearn.externals impor... | 42.550529 | 119 | 0.542253 |
59be92b99bc7c14c89843ac470ca04a3c20602bf | 28,458 | py | Python | rasa/nlu/components.py | Phillammon/rasa | c3d1738e9a9a3d76b37a01258a3813f0fc90d852 | [
"Apache-2.0"
] | null | null | null | rasa/nlu/components.py | Phillammon/rasa | c3d1738e9a9a3d76b37a01258a3813f0fc90d852 | [
"Apache-2.0"
] | null | null | null | rasa/nlu/components.py | Phillammon/rasa | c3d1738e9a9a3d76b37a01258a3813f0fc90d852 | [
"Apache-2.0"
] | 1 | 2020-12-28T20:05:30.000Z | 2020-12-28T20:05:30.000Z | import itertools
import logging
import typing
from typing import Any, Dict, Hashable, List, Optional, Set, Text, Tuple, Type, Iterable
from rasa.constants import DOCS_URL_MIGRATION_GUIDE
from rasa.nlu.constants import TRAINABLE_EXTRACTORS
from rasa.nlu.config import RasaNLUModelConfig, override_defaults, InvalidConfig... | 35.439601 | 88 | 0.648289 |
f6e8ee63c5167ddd5228ca33d7467e9bf803fba3 | 590 | py | Python | rocketgram/api/web_app_data.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 16 | 2019-02-27T20:15:52.000Z | 2019-08-06T10:59:41.000Z | rocketgram/api/web_app_data.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 1 | 2019-04-27T06:51:57.000Z | 2019-05-31T18:09:16.000Z | rocketgram/api/web_app_data.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 3 | 2019-03-19T16:01:22.000Z | 2019-04-05T15:58:12.000Z | # Copyright (C) 2015-2022 by Vd.
# This file is part of Rocketgram, the modern Telegram bot framework.
# Rocketgram is released under the MIT License (see LICENSE).
from dataclasses import dataclass
from typing import Optional
@dataclass(frozen=True)
class WebAppData:
"""\
Represents WebAppData object:
... | 22.692308 | 69 | 0.676271 |
bb625fe068a76f438b2621ee4791eb03eb927c0d | 1,292 | py | Python | testing/rules/run_gradle.py | zhiyangyou/engine | d5adde01dd672ba4f6819d85218beb01142dca27 | [
"BSD-3-Clause"
] | 1 | 2021-08-23T11:38:13.000Z | 2021-08-23T11:38:13.000Z | testing/rules/run_gradle.py | zhiyangyou/engine | d5adde01dd672ba4f6819d85218beb01142dca27 | [
"BSD-3-Clause"
] | null | null | null | testing/rules/run_gradle.py | zhiyangyou/engine | d5adde01dd672ba4f6819d85218beb01142dca27 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Invokes gradlew for building the scenario_app from GN/Ninja.
"""
import os
import sys
import subprocess
import platform
SCRIPT_... | 29.363636 | 75 | 0.671053 |
9ab5793e9d86594b902863828e8100b8de6f205c | 673 | py | Python | higgins/actions/chat_actions.py | bfortuner/higgins | c8ab098c1496ee9b45efc3fc667d894d86031f67 | [
"MIT"
] | null | null | null | higgins/actions/chat_actions.py | bfortuner/higgins | c8ab098c1496ee9b45efc3fc667d894d86031f67 | [
"MIT"
] | null | null | null | higgins/actions/chat_actions.py | bfortuner/higgins | c8ab098c1496ee9b45efc3fc667d894d86031f67 | [
"MIT"
] | null | null | null | from higgins.actions import Action, ActionResult, ActionParamSpec
class DisplayText(Action):
"""Display text to console."""
@classmethod
def param_specs(cls):
return {
"text": ActionParamSpec(name="text", question="What text to display?", required=True),
"data": ActionPara... | 32.047619 | 98 | 0.63893 |
603a6cad9d561e8f988c89ad1c82a8d7e4a873f6 | 885 | py | Python | lhotse/bin/modes/recipes/heroico.py | csukuangfj/lhotse | 9b12055ca75718914c5457b33e498d1c8e8b86d8 | [
"Apache-2.0"
] | 1 | 2020-10-02T02:42:25.000Z | 2020-10-02T02:42:25.000Z | lhotse/bin/modes/recipes/heroico.py | csukuangfj/lhotse | 9b12055ca75718914c5457b33e498d1c8e8b86d8 | [
"Apache-2.0"
] | 2 | 2020-11-05T11:44:17.000Z | 2021-04-08T11:38:48.000Z | lhotse/bin/modes/recipes/heroico.py | csukuangfj/lhotse | 9b12055ca75718914c5457b33e498d1c8e8b86d8 | [
"Apache-2.0"
] | null | null | null | import click
from lhotse.bin.modes import download, prepare
from lhotse.recipes.heroico import download_heroico, prepare_heroico
from lhotse.utils import Pathlike
__all__ = ['heroico']
@prepare.command(context_settings=dict(show_default=True))
@click.argument('speech_dir', type=click.Path(exists=True, dir_okay=True... | 29.5 | 78 | 0.751412 |
a3d065833323a36e3879072486f16ae57ef1b48c | 10,832 | py | Python | lib/location.py | amadeogarcia/wttr.in | b2b8d6d17d7c539a3d830f64ec6b8c4cda6a5ebf | [
"Apache-2.0"
] | 1 | 2021-01-19T15:00:05.000Z | 2021-01-19T15:00:05.000Z | lib/location.py | dominic-dc/wttr.in | 4eedafb81356e62b9f1c8aed726b8890910df634 | [
"Apache-2.0"
] | null | null | null | lib/location.py | dominic-dc/wttr.in | 4eedafb81356e62b9f1c8aed726b8890910df634 | [
"Apache-2.0"
] | null | null | null | """
All location related functions and converters.
The main entry point is `location_processing`
which gets `location` and `source_ip_address`
and basing on this information generates
precise location description.
"""
from __future__ import print_function
import sys
import os
import json
import socket
import request... | 30.088889 | 98 | 0.622323 |
f192f5e8b2d63a1d670e4f14dab880dc9a527107 | 1,851 | py | Python | floranet/models/application.py | chengzhongkai/floranet | add5a1129296dca6db55b7980c0c1091f1ca80aa | [
"MIT"
] | 40 | 2016-10-27T03:10:45.000Z | 2021-10-17T07:59:28.000Z | floranet/models/application.py | chengzhongkai/floranet | add5a1129296dca6db55b7980c0c1091f1ca80aa | [
"MIT"
] | 2 | 2017-01-30T09:04:22.000Z | 2017-06-29T08:44:21.000Z | floranet/models/application.py | chengzhongkai/floranet | add5a1129296dca6db55b7980c0c1091f1ca80aa | [
"MIT"
] | 25 | 2017-01-01T08:37:42.000Z | 2021-11-22T02:03:58.000Z | from twisted.internet.defer import inlineCallbacks, returnValue
from floranet.models.model import Model
from floranet.models.appinterface import AppInterface
class Application(Model):
"""LoRa application class
Model representing a LoRa application.
Attributes:
name (str): a user friendly... | 36.294118 | 86 | 0.596434 |
71e09faab97c2eb261c9784cdd7f4e3e07abbe59 | 1,830 | py | Python | model-optimizer/mo/front/mxnet/extractors/deconvolution.py | mypopydev/dldt | 8cd639116b261adbbc8db860c09807c3be2cc2ca | [
"Apache-2.0"
] | 3 | 2019-07-08T09:03:03.000Z | 2020-09-09T10:34:17.000Z | model-optimizer/mo/front/mxnet/extractors/deconvolution.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 3 | 2020-11-13T18:59:18.000Z | 2022-02-10T02:14:53.000Z | model-optimizer/mo/front/mxnet/extractors/deconvolution.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 1 | 2018-12-05T07:38:25.000Z | 2018-12-05T07:38:25.000Z | """
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 37.346939 | 110 | 0.659016 |
cc5bca39a3f29e69d5896b1ec17bfebdaf53eff8 | 10,529 | py | Python | bayespy/ml.py | morganics/BayesPy | e3211a9ea06d12f93616cf0a6bc12c9da46bad06 | [
"Apache-2.0"
] | 1 | 2018-11-24T12:54:42.000Z | 2018-11-24T12:54:42.000Z | bayespy/ml.py | morganics/BayesPy | e3211a9ea06d12f93616cf0a6bc12c9da46bad06 | [
"Apache-2.0"
] | null | null | null | bayespy/ml.py | morganics/BayesPy | e3211a9ea06d12f93616cf0a6bc12c9da46bad06 | [
"Apache-2.0"
] | null | null | null | from bayespy.network import NetworkFactory
class Selector:
def __init__(self, target, continuous=[], discrete=[]):
self.target = target
self._continuous = list(continuous)
self._discrete = list(discrete)
self._index = -1
self._all_variables = self._continuous + self._discret... | 31.713855 | 160 | 0.635958 |
b697808caea3ea8b09dd55138feb66764ef1591c | 1,552 | py | Python | tests/ext/test_iso3166.py | sobolevn/phantom-types | f9a5fe6ad2cb340a812d644f1c0eb8953deb7bce | [
"MIT"
] | null | null | null | tests/ext/test_iso3166.py | sobolevn/phantom-types | f9a5fe6ad2cb340a812d644f1c0eb8953deb7bce | [
"MIT"
] | null | null | null | tests/ext/test_iso3166.py | sobolevn/phantom-types | f9a5fe6ad2cb340a812d644f1c0eb8953deb7bce | [
"MIT"
] | null | null | null | import pytest
from phantom.ext.iso3166 import Alpha2
from phantom.ext.iso3166 import InvalidCountryCode
from phantom.ext.iso3166 import normalize_alpha2_country_code
class TestNormalizeAlpha2CountryCode:
@pytest.mark.parametrize(
"given, normalized",
(("sE", "SE"), ("dk", "DK"), ("IE", "IE")),
... | 36.952381 | 81 | 0.693299 |
efc172d252641690030c4c6806742166f0fdbcd8 | 2,323 | py | Python | src/oci/logging/models/change_log_group_compartment_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/logging/models/change_log_group_compartment_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/logging/models/change_log_group_compartment_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 32.71831 | 245 | 0.690486 |
f6c21f491cf2041a5552c50acf17662efee74aaf | 539 | py | Python | var/spack/repos/builtin/packages/py-pyyaml/package.py | nkianggiss/spack | 3477d3375142a30f5714bb5966a6d8bb22c33c06 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2018-08-20T06:55:11.000Z | 2018-08-20T06:55:11.000Z | var/spack/repos/builtin/packages/py-pyyaml/package.py | nkianggiss/spack | 3477d3375142a30f5714bb5966a6d8bb22c33c06 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-pyyaml/package.py | nkianggiss/spack | 3477d3375142a30f5714bb5966a6d8bb22c33c06 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-03-12T19:27:17.000Z | 2020-03-12T19:27:17.000Z | # Copyright 2013-2019 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 PyPyyaml(PythonPackage):
"""PyYAML is a YAML parser and emitter for Python."""
homepag... | 33.6875 | 73 | 0.727273 |
fe8c0ec0716aec1a0bc169bb14ab3b3dbeef0596 | 484 | py | Python | containers/http-server/http-server.py | leonardothibes/dockerfiles | 403074968037532643104f1a6d4814538a1f6576 | [
"MIT",
"Unlicense"
] | null | null | null | containers/http-server/http-server.py | leonardothibes/dockerfiles | 403074968037532643104f1a6d4814538a1f6576 | [
"MIT",
"Unlicense"
] | 8 | 2017-11-24T14:03:58.000Z | 2017-12-12T16:36:51.000Z | containers/http-server/http-server.py | leonardothibes/dockerfiles | 403074968037532643104f1a6d4814538a1f6576 | [
"MIT",
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import SimpleHTTPServer
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_my_headers()
SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self)
def send_my_headers(self):
self.send_header("Access-Control-A... | 26.888889 | 70 | 0.741736 |
f66a4be93c4f9be72f2b533d40448346adcbec12 | 1,212 | py | Python | estomagordo-python3/day_7a.py | joelfak/advent_of_code_2019 | d5031078c53c181835b4bf86458b360542f0122e | [
"Apache-2.0"
] | 9 | 2019-12-01T14:52:40.000Z | 2020-12-16T14:24:19.000Z | estomagordo-python3/day_7a.py | joelfak/advent_of_code_2019 | d5031078c53c181835b4bf86458b360542f0122e | [
"Apache-2.0"
] | null | null | null | estomagordo-python3/day_7a.py | joelfak/advent_of_code_2019 | d5031078c53c181835b4bf86458b360542f0122e | [
"Apache-2.0"
] | 51 | 2019-11-26T14:49:05.000Z | 2021-12-01T20:53:41.000Z | import re
from heapq import heappop, heappush
from collections import Counter, defaultdict
from itertools import permutations
from intcode import Computer
def solve(d, lo, hi, ampcount):
best = 0
for perm in permutations(range(lo, hi)):
computers = [Computer(d, perm[pos]) for pos in range(ampcount)]
... | 23.307692 | 71 | 0.525578 |
5f3f87deb4f14df378272af999ec90786e87375e | 17,869 | py | Python | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/mask_rcnn/object_detection/preprocessor.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-07T18:52:33.000Z | 2019-07-06T12:48:18.000Z | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/mask_rcnn/object_detection/preprocessor.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 12 | 2018-12-13T18:04:36.000Z | 2019-06-14T20:49:33.000Z | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/mask_rcnn/object_detection/preprocessor.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-09T21:04:52.000Z | 2019-06-24T07:40:28.000Z | # 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... | 40.065022 | 80 | 0.707538 |
8e78a24d3477b83c06cf17411e027e1537226b43 | 549 | py | Python | openelex/tests/mongo_test_case.py | Mpopoma/oe-core | 860b99e14b9089a56b54cdd00285216a5cf77046 | [
"MIT"
] | 156 | 2015-04-09T02:56:10.000Z | 2022-01-04T12:03:57.000Z | openelex/tests/mongo_test_case.py | Mpopoma/oe-core | 860b99e14b9089a56b54cdd00285216a5cf77046 | [
"MIT"
] | 54 | 2015-01-10T00:09:53.000Z | 2021-11-08T17:37:41.000Z | openelex/tests/mongo_test_case.py | Mpopoma/oe-core | 860b99e14b9089a56b54cdd00285216a5cf77046 | [
"MIT"
] | 94 | 2015-01-10T18:45:15.000Z | 2022-03-24T02:00:09.000Z | from unittest import TestCase
from mongoengine import ConnectionError
from nose.exc import SkipTest
from openelex.db import init_db
class MongoTestCase(TestCase):
def setUp(self):
try:
self.db = init_db('openelex_test')
except ConnectionError:
raise SkipTest('Could not co... | 26.142857 | 69 | 0.663024 |
9bf335608dd29371951fef2c7c1f425d44be0764 | 1,284 | py | Python | 2020/Day10/Adapters.py | dh256/adventofcode | 428eec13f4cbf153333a0e359bcff23070ef6d27 | [
"MIT"
] | null | null | null | 2020/Day10/Adapters.py | dh256/adventofcode | 428eec13f4cbf153333a0e359bcff23070ef6d27 | [
"MIT"
] | null | null | null | 2020/Day10/Adapters.py | dh256/adventofcode | 428eec13f4cbf153333a0e359bcff23070ef6d27 | [
"MIT"
] | null | null | null | class Adapters():
def __init__(self,file_name):
with open(file_name,'r') as adapter_data:
self._adapters = [int(line.strip('\n')) for line in adapter_data]
self._adapters.append(0)
self._adapters.append(max(self._adapters) + 3)
self._adapters.sort()
@property
de... | 34.702703 | 94 | 0.567757 |
1afdc0ce88bb8b5926881bb110e4e21be983b69a | 810 | py | Python | ampel/secret/Secret.py | AmpelProject/Ampel-base | e344e4be31f3c009084cbf285693c77389cafae8 | [
"BSD-3-Clause"
] | 1 | 2019-11-21T11:44:04.000Z | 2019-11-21T11:44:04.000Z | ampel/secret/Secret.py | AmpelProject/Ampel-base | e344e4be31f3c009084cbf285693c77389cafae8 | [
"BSD-3-Clause"
] | 1 | 2019-03-25T19:24:09.000Z | 2019-03-25T19:24:09.000Z | ampel/secret/Secret.py | AmpelProject/Ampel-base | e344e4be31f3c009084cbf285693c77389cafae8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: Ampel-interface/ampel/secret/Secret.py
# License: BSD-3-Clause
# Author: Jakob van Santen <jakob.van.santen@desy.de>
# Date: 14.08.2020
# Last Modified Date: 08.09.2021
# Last Modified By: valery brinnel <fi... | 28.928571 | 77 | 0.62716 |
b25f424a5c9e09afb1a1f156d7f4bc448be51f15 | 16,549 | py | Python | dvc/output/base.py | dudarev/dvc | f51bef040a37deb3f1bca1ece5b1d208e163d31b | [
"Apache-2.0"
] | null | null | null | dvc/output/base.py | dudarev/dvc | f51bef040a37deb3f1bca1ece5b1d208e163d31b | [
"Apache-2.0"
] | null | null | null | dvc/output/base.py | dudarev/dvc | f51bef040a37deb3f1bca1ece5b1d208e163d31b | [
"Apache-2.0"
] | null | null | null | import logging
import os
from copy import copy
from typing import Type
from urllib.parse import urlparse
from voluptuous import Any
import dvc.prompt as prompt
from dvc.cache import NamedCache
from dvc.exceptions import (
CheckoutError,
CollectCacheError,
DvcException,
MergeError,
RemoteCacheRequi... | 28.582038 | 79 | 0.584507 |
9bf4f62b00609741caf344fd91b129994e5bbc81 | 2,499 | py | Python | helperFiles/pynn.py | Marissa4/RPyCA | e3c229361a4cd9ddd53accc5541b7c8b5f8939e0 | [
"MIT"
] | null | null | null | helperFiles/pynn.py | Marissa4/RPyCA | e3c229361a4cd9ddd53accc5541b7c8b5f8939e0 | [
"MIT"
] | null | null | null | helperFiles/pynn.py | Marissa4/RPyCA | e3c229361a4cd9ddd53accc5541b7c8b5f8939e0 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torch.utils.data import TensorDataset
from .logger import *
###
# Goal was to make this model as simplistic as possible to use as a baseline
#
# Basic configuration taken from link below a... | 29.75 | 84 | 0.627851 |
68510142946e3d093d1146cbe606e068de2b5e60 | 518 | py | Python | sci_util/__version__.py | iViolinSolo/python-util | 97a0393b2eb375ad84b9c13104e14678ecf17102 | [
"MIT"
] | null | null | null | sci_util/__version__.py | iViolinSolo/python-util | 97a0393b2eb375ad84b9c13104e14678ecf17102 | [
"MIT"
] | null | null | null | sci_util/__version__.py | iViolinSolo/python-util | 97a0393b2eb375ad84b9c13104e14678ecf17102 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: violinsolo
# Created on 2019/4/11
# | | / (_)___ / (_)___ / ___/____ / /___ / ___// ____/ _/ / / / / /_(_) /
# | | / / / __ \/ / / __ \\__ \/ __ \/ / __ \ ______ \__ \/ / / / / / / / __/ / /
# | |/ / / /_/ / / / / / /__/ / /_/ / / /_/ / /... | 34.533333 | 92 | 0.391892 |
b7469b12e2180352cf6dbe964124a79f7f6d50b2 | 3,664 | py | Python | tests/test_query.py | MaxLeap/SDK-CloudCode-Python | a47ccfe4ed9e184b08280d02dcdb405cb4def6be | [
"CC0-1.0"
] | null | null | null | tests/test_query.py | MaxLeap/SDK-CloudCode-Python | a47ccfe4ed9e184b08280d02dcdb405cb4def6be | [
"CC0-1.0"
] | null | null | null | tests/test_query.py | MaxLeap/SDK-CloudCode-Python | a47ccfe4ed9e184b08280d02dcdb405cb4def6be | [
"CC0-1.0"
] | null | null | null | # coding: utf-8
from datetime import datetime
from nose.tools import eq_
from nose.tools import with_setup
import ML
from ML import Query
from ML import Object
__author__ = 'czhou <czhou@ilegendsoft.com>'
class GameScore(Object):
pass
game_scores = []
def setup_func():
ML.init(
'55d1480960b24301... | 24.92517 | 122 | 0.620633 |
9b7d46ac402294a77f3ef426b80fa43809d119f2 | 102,283 | py | Python | superset/viz.py | apaniagua6/superset | ef0e972809b1f445da8aa3ff9df9accd810a4480 | [
"Apache-2.0"
] | 1 | 2021-01-23T16:48:31.000Z | 2021-01-23T16:48:31.000Z | superset/viz.py | farshadmohammadi77/incubator-superset | 90ed3267e498f7c95a34f6703e534d69c9aed2db | [
"Apache-2.0"
] | 1 | 2020-12-14T09:49:41.000Z | 2020-12-14T09:49:41.000Z | superset/viz.py | farshadmohammadi77/incubator-superset | 90ed3267e498f7c95a34f6703e534d69c9aed2db | [
"Apache-2.0"
] | 1 | 2021-01-29T15:38:42.000Z | 2021-01-29T15:38:42.000Z | # 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... | 34.323154 | 88 | 0.556241 |
3f036ddf57a502bb10da101abff4454d09cc092f | 2,120 | py | Python | patches/LPD8806.py | kbeyer/RPi-LED-SpectrumAnalyzer | f5a5f1210f02188599eb308f5737392ce8c93218 | [
"MIT"
] | 14 | 2015-01-09T12:26:06.000Z | 2021-03-22T22:16:53.000Z | patches/LPD8806.py | kbeyer/RPi-LED-SpectrumAnalyzer | f5a5f1210f02188599eb308f5737392ce8c93218 | [
"MIT"
] | 4 | 2015-07-19T07:20:51.000Z | 2017-02-01T16:11:22.000Z | patches/LPD8806.py | kbeyer/RPi-LED-SpectrumAnalyzer | f5a5f1210f02188599eb308f5737392ce8c93218 | [
"MIT"
] | 4 | 2016-03-07T12:12:08.000Z | 2018-03-04T21:57:13.000Z | class LPD8806(object):
"""Main driver for LPD8806 based LED strips"""
def __init__(self, leds, use_py_spi = False, dev="/dev/spidev0.0"):
self.leds = leds
self.dev = dev
self.use_py_spi = use_py_spi
if self.use_py_spi:
import spidev
self.spi = spidev.Spi... | 35.333333 | 109 | 0.561792 |
ccf99a7a859f19abba010936ed2908134e9a2a85 | 10,336 | py | Python | doc/user-guide/source/conf.py | adityamardikanugraha/openstack-doc | e6b9ac02e69fabbfdf13b64dae64b0cf9209a786 | [
"Apache-2.0"
] | null | null | null | doc/user-guide/source/conf.py | adityamardikanugraha/openstack-doc | e6b9ac02e69fabbfdf13b64dae64b0cf9209a786 | [
"Apache-2.0"
] | null | null | null | doc/user-guide/source/conf.py | adityamardikanugraha/openstack-doc | e6b9ac02e69fabbfdf13b64dae64b0cf9209a786 | [
"Apache-2.0"
] | 1 | 2018-10-09T10:01:57.000Z | 2018-10-09T10:01:57.000Z | # 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
# distributed under the... | 33.667752 | 96 | 0.705012 |
753a8de514317e477b6b685edb8bd1870d1adb46 | 1,091 | py | Python | firmware/unpackbootimg.py | me176c-dev/device | 4d82c24f738588f0f62b99bc2b3927f7e37b3470 | [
"Apache-2.0"
] | 14 | 2018-11-24T06:49:58.000Z | 2021-12-23T14:33:03.000Z | firmware/unpackbootimg.py | me176c-dev/device | 4d82c24f738588f0f62b99bc2b3927f7e37b3470 | [
"Apache-2.0"
] | 44 | 2017-06-28T06:39:04.000Z | 2017-12-28T13:02:59.000Z | firmware/unpackbootimg.py | me176c-dev/device | 4d82c24f738588f0f62b99bc2b3927f7e37b3470 | [
"Apache-2.0"
] | 7 | 2018-11-26T19:15:55.000Z | 2022-01-03T03:59:50.000Z | #!/usr/bin/env python
import sys
import struct
BOOT_MAGIC = 'ANDROID!'.encode()
HEADER_FORMAT = '8s10I16s512s32s1024s'
HEADER_SIZE = struct.calcsize(HEADER_FORMAT)
def extract_file(f, name, pos, size):
f.seek(pos)
with open(name, 'wb') as o:
o.write(f.read(size))
def unpack_image(f):
header = st... | 25.97619 | 100 | 0.659945 |
141bf73ec395d6fc9ec5bac7b5d5e764bcf62a9e | 20,730 | py | Python | onmt/reversible_models/transformers_testing2.py | tuannamnguyen93/NMTGMinor | acde3454343bda7060fae541c110d0ad1a8ac4f4 | [
"MIT"
] | 75 | 2019-05-02T10:37:39.000Z | 2022-02-13T17:53:24.000Z | onmt/reversible_models/transformers_testing2.py | tuannamnguyen93/NMTGMinor | acde3454343bda7060fae541c110d0ad1a8ac4f4 | [
"MIT"
] | 11 | 2018-11-08T16:52:51.000Z | 2021-09-23T15:01:14.000Z | onmt/reversible_models/transformers_testing2.py | tuannamnguyen93/NMTGMinor | acde3454343bda7060fae541c110d0ad1a8ac4f4 | [
"MIT"
] | 34 | 2018-06-04T14:20:01.000Z | 2022-01-26T08:10:05.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from onmt.models.transformer_layers import PrePostProcessing
from onmt.modules.linear import FeedForward as position_wise_feed_forward
from onmt.modules.attention import MultiHeadAttention
from torch.autograd.function import Function
import sys
from tor... | 35.557461 | 117 | 0.578534 |
83f02bc2990a66f62e03edd81a5384a865b84c94 | 813 | py | Python | ddsp/version.py | juanalonso/ddsp_am | f31cc83bdd56a2ea133ebbe54b4bda67929de58b | [
"Apache-2.0"
] | 9 | 2021-03-24T12:47:16.000Z | 2021-12-12T05:50:41.000Z | ddsp/version.py | juanalonso/ddsp_fm | f31cc83bdd56a2ea133ebbe54b4bda67929de58b | [
"Apache-2.0"
] | null | null | null | ddsp/version.py | juanalonso/ddsp_fm | f31cc83bdd56a2ea133ebbe54b4bda67929de58b | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The DDSP 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 agreed to in wri... | 35.347826 | 76 | 0.760148 |
4e88c417a87716e0deb5b2d4bc0ee238d55d2637 | 15,326 | py | Python | pcdet/datasets/nuscenes/nuscenes_dataset.py | fjczx/OpenPCDet-lazurite | e3f17ab17b2c295e1786e34c6feb86adffe84b49 | [
"Apache-2.0"
] | null | null | null | pcdet/datasets/nuscenes/nuscenes_dataset.py | fjczx/OpenPCDet-lazurite | e3f17ab17b2c295e1786e34c6feb86adffe84b49 | [
"Apache-2.0"
] | null | null | null | pcdet/datasets/nuscenes/nuscenes_dataset.py | fjczx/OpenPCDet-lazurite | e3f17ab17b2c295e1786e34c6feb86adffe84b49 | [
"Apache-2.0"
] | null | null | null | import copy
import pickle
from pathlib import Path
import numpy as np
from tqdm import tqdm
from ...ops.roiaware_pool3d import roiaware_pool3d_utils
from ...utils import common_utils
from ..dataset import DatasetTemplate
class NuScenesDataset(DatasetTemplate):
def __init__(self, dataset_cfg, class_names, traini... | 40.97861 | 120 | 0.621754 |
96e6a9f72caaf11cf2c1a3e41074c8413e955e3f | 36,417 | py | Python | k2/python/k2/autograd.py | xiexukang/k2 | 2537a3fa927671faec5e4ca56b8b151806356324 | [
"Apache-2.0"
] | null | null | null | k2/python/k2/autograd.py | xiexukang/k2 | 2537a3fa927671faec5e4ca56b8b151806356324 | [
"Apache-2.0"
] | null | null | null | k2/python/k2/autograd.py | xiexukang/k2 | 2537a3fa927671faec5e4ca56b8b151806356324 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Mobvoi Inc. (authors: Fangjun Kuang)
# Xiaomi Corp. (authors: Daniel Povey
# Haowen Qiu)
# See ../../../LICENSE for clarification regarding multiple authors
#
# Licensed under the Apache License, Version 2.0 (the ... | 42.051963 | 98 | 0.610045 |
3f5989c92a48fc6c737438f1ce2e1f5b4556371d | 990 | py | Python | code/unsorted/3d/bunny.py | geo7/scientific-visualization-book | 71f6bac4db7ee2f26e88052fe7faa800303d8b00 | [
"BSD-2-Clause"
] | 2 | 2021-11-17T15:10:09.000Z | 2021-12-24T13:31:10.000Z | code/unsorted/3d/bunny.py | WuShichao/scientific-visualization-book | 389766215aa6b234ed1cf560a3768437d41d1d37 | [
"BSD-2-Clause"
] | 1 | 2021-12-12T11:37:48.000Z | 2021-12-12T11:39:00.000Z | code/unsorted/3d/bunny.py | WuShichao/scientific-visualization-book | 389766215aa6b234ed1cf560a3768437d41d1d37 | [
"BSD-2-Clause"
] | 2 | 2021-12-30T12:20:07.000Z | 2022-02-24T06:36:41.000Z | import glm
import plot
import numpy as np
import matplotlib.pyplot as plt
# Wavefront loader (only vertices and faces)
def obj_load(filename):
V, Vi = [], []
with open(filename) as f:
for line in f.readlines():
if line.startswith("#"):
continue
values = line.spl... | 22.5 | 71 | 0.539394 |
031904731b27bd5aa3586b8d2c42d4a92e647b7b | 1,463 | py | Python | tests/test_models.py | Borda/kaggle_brain-tumor-3D | 717fe1947c71941554c7ee572d1d6bb924a02538 | [
"MIT"
] | 19 | 2021-08-23T14:02:49.000Z | 2022-03-23T12:25:14.000Z | tests/test_models.py | Borda/kaggle_brain-tumor-3D | 717fe1947c71941554c7ee572d1d6bb924a02538 | [
"MIT"
] | null | null | null | tests/test_models.py | Borda/kaggle_brain-tumor-3D | 717fe1947c71941554c7ee572d1d6bb924a02538 | [
"MIT"
] | 2 | 2021-11-11T01:32:25.000Z | 2022-02-25T20:04:50.000Z | import os
import pytest
from monai.networks.nets import EfficientNetBN, resnet18
from pytorch_lightning import seed_everything, Trainer
from kaggle_brain3d.data import BrainScansDM
from kaggle_brain3d.models import LitBrainMRI, make_submission
from tests.test_data import _generate_synthetic_dataset
_PATH_HERE = os.p... | 32.511111 | 96 | 0.74026 |
cc23434f6ab5c34fdc4dde684b61fd31bd8ce5d0 | 1,375 | py | Python | data/load_power_refs.py | dseuss/pypllon | f9ae6104555837fe0eb7d7c333ebc2ed585d314a | [
"BSD-3-Clause"
] | null | null | null | data/load_power_refs.py | dseuss/pypllon | f9ae6104555837fe0eb7d7c333ebc2ed585d314a | [
"BSD-3-Clause"
] | null | null | null | data/load_power_refs.py | dseuss/pypllon | f9ae6104555837fe0eb7d7c333ebc2ed585d314a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, division, print_function
import click
import h5py
import numpy as np
from os import path
SETUP_LABELS = ['GAUSS', 'RECR', 'RRECR']
def load_power_reference(h5id, key, datadir, fileformat):
key = key.replace('Rad', 'rad')
fname... | 29.255319 | 87 | 0.662545 |
710b39ecbf77c9e287786fc62e3ff72c7c778cf1 | 188 | py | Python | flask_admin/__init__.py | brandoningli/flask-admin | 2cd4263b41c49adbfdba88e8f1e99a4c4ce3705c | [
"BSD-3-Clause"
] | 4,440 | 2015-04-20T20:02:33.000Z | 2022-03-30T15:53:57.000Z | flask_admin/__init__.py | brandoningli/flask-admin | 2cd4263b41c49adbfdba88e8f1e99a4c4ce3705c | [
"BSD-3-Clause"
] | 1,214 | 2015-04-20T15:34:53.000Z | 2022-03-31T15:34:39.000Z | flask_admin/__init__.py | brandoningli/flask-admin | 2cd4263b41c49adbfdba88e8f1e99a4c4ce3705c | [
"BSD-3-Clause"
] | 1,551 | 2015-04-24T09:18:48.000Z | 2022-03-31T01:38:44.000Z | __version__ = '1.5.8'
__author__ = 'Flask-Admin team'
__email__ = 'serge.koval+github@gmail.com'
from .base import expose, expose_plugview, Admin, BaseView, AdminIndexView # noqa: F401
| 26.857143 | 88 | 0.75 |
a2a09012b59eb102e8e0bb0eb5f996da292edbea | 996 | py | Python | phase1/producer-random-xactions.py | ApoorvaShukla88/Kafka3-Data | 67dedd0abbe4756aac6944c4538f5a31e900bc5a | [
"MIT"
] | null | null | null | phase1/producer-random-xactions.py | ApoorvaShukla88/Kafka3-Data | 67dedd0abbe4756aac6944c4538f5a31e900bc5a | [
"MIT"
] | null | null | null | phase1/producer-random-xactions.py | ApoorvaShukla88/Kafka3-Data | 67dedd0abbe4756aac6944c4538f5a31e900bc5a | [
"MIT"
] | null | null | null | from time import sleep
from json import dumps
from kafka import KafkaProducer
import time
import random
class Producer:
def __init__(self):
self.producer = KafkaProducer(bootstrap_servers=['localhost:9092'],
value_serializer=lambda m: dumps(m).encode('ascii'))
de... | 26.210526 | 90 | 0.566265 |
a4508eb2b0a9ef8e8486093ebe7c0eb19791b3de | 1,787 | py | Python | Mini Challenge/GuessTheNumber.py | areriff/pythonlearncanvas | b797887311cafe38030e82cdac2068618ce4d33a | [
"MIT"
] | null | null | null | Mini Challenge/GuessTheNumber.py | areriff/pythonlearncanvas | b797887311cafe38030e82cdac2068618ce4d33a | [
"MIT"
] | null | null | null | Mini Challenge/GuessTheNumber.py | areriff/pythonlearncanvas | b797887311cafe38030e82cdac2068618ce4d33a | [
"MIT"
] | null | null | null | # encoding: utf-8
# The Goal: Similar to the first project, this project also uses the random module in Python.
# The program will first randomly generate a number unknown to the user.
# The user needs to guess what that number is. (In other words, the user needs to be able to input information.)
# If the user’s guess ... | 35.74 | 112 | 0.697818 |
2e501073bdfda18dba5bd09ee558f10a2d5b2357 | 18,245 | py | Python | examples/libtest/LongTypeTest.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 739 | 2015-01-01T02:05:11.000Z | 2022-03-30T15:26:16.000Z | examples/libtest/LongTypeTest.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 33 | 2015-03-25T23:17:04.000Z | 2021-08-19T08:25:22.000Z | examples/libtest/LongTypeTest.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 167 | 2015-01-01T22:27:47.000Z | 2022-03-17T13:29:19.000Z | from UnitTest import UnitTest
import sys
import random
do_minimal_checks = True
do_all_checks = False
#from __pyjamas__ import debugger
class test_support:
have_unicode = False
# Used for lazy formatting of failure messages
class Frm(object):
def __init__(self, format, *args):
self.format = format
... | 40.187225 | 86 | 0.508852 |
e45a3597340d3f7e2f17d736834e37e1bf4a2c5a | 2,709 | py | Python | src/app_engine/constants.py | Arlen-LT/apprtc | 48fe6b432662f88230891c2d1371843beaaf299e | [
"BSD-3-Clause"
] | null | null | null | src/app_engine/constants.py | Arlen-LT/apprtc | 48fe6b432662f88230891c2d1371843beaaf299e | [
"BSD-3-Clause"
] | null | null | null | src/app_engine/constants.py | Arlen-LT/apprtc | 48fe6b432662f88230891c2d1371843beaaf299e | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 Google Inc. All Rights Reserved.
"""AppRTC Constants.
This module contains the constants used in AppRTC Python modules.
"""
import os
# Deprecated domains which we should to redirect to REDIRECT_URL.
REDIRECT_DOMAINS = [
'apprtc.appspot.com', 'apprtc.webrtc.org', 'www.appr.tc'
]
# URL which we sh... | 29.769231 | 90 | 0.754522 |
50f1a935fc342c6cc7f4dadc08f4fbeaca65dfe0 | 98 | py | Python | geometric_vector_perceptron/__init__.py | AspirinCode/geometric-vector-perceptron | 0bb57b6f4bf181c00b3855b81bff8cdd0fdd901d | [
"MIT"
] | null | null | null | geometric_vector_perceptron/__init__.py | AspirinCode/geometric-vector-perceptron | 0bb57b6f4bf181c00b3855b81bff8cdd0fdd901d | [
"MIT"
] | null | null | null | geometric_vector_perceptron/__init__.py | AspirinCode/geometric-vector-perceptron | 0bb57b6f4bf181c00b3855b81bff8cdd0fdd901d | [
"MIT"
] | 1 | 2021-11-28T17:35:44.000Z | 2021-11-28T17:35:44.000Z | from geometric_vector_perceptron.geometric_vector_perceptron import GVP, GVPDropout, GVPLayerNorm
| 49 | 97 | 0.908163 |
b0d5b1a5057a3128c2ff001bbd51196a595057ef | 1,640 | py | Python | deeprelnn/test/test_fol.py | rodrigoazs/DeepRelNN | 8cd46e7d390a28ef8458a47be3e6c3cdec777080 | [
"Apache-2.0"
] | null | null | null | deeprelnn/test/test_fol.py | rodrigoazs/DeepRelNN | 8cd46e7d390a28ef8458a47be3e6c3cdec777080 | [
"Apache-2.0"
] | null | null | null | deeprelnn/test/test_fol.py | rodrigoazs/DeepRelNN | 8cd46e7d390a28ef8458a47be3e6c3cdec777080 | [
"Apache-2.0"
] | null | null | null | from deeprelnn.fol import Atom, Constant, Literal, Predicate, Term, Variable
def test_create_term():
term = Term("Test")
assert term.name == "Test"
def test_create_variable():
variable = Variable("A")
assert variable.name == "A"
assert variable.is_grounded() is False
assert str(variable) == ... | 28.275862 | 84 | 0.666463 |
53f45c17ba36d243efa3677f5f2fbc8582e8b43a | 2,786 | py | Python | cogs/imaging/pet.py | radius2703/Kirby-Pog | cfe50d5f91e986e01032013d9ec381efc8461a05 | [
"MIT"
] | 3 | 2021-01-17T17:31:15.000Z | 2021-01-24T10:01:27.000Z | cogs/imaging/pet.py | radius2703/Kirby-Pog | cfe50d5f91e986e01032013d9ec381efc8461a05 | [
"MIT"
] | null | null | null | cogs/imaging/pet.py | radius2703/Kirby-Pog | cfe50d5f91e986e01032013d9ec381efc8461a05 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 radius
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... | 37.146667 | 93 | 0.663676 |
d042afc54a4007b5abdaefe565a469f22d8468e7 | 1,963 | py | Python | venv/Lib/site-packages/caffe2/python/modeling/compute_statistics_for_blobs.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | 1 | 2022-01-08T12:30:44.000Z | 2022-01-08T12:30:44.000Z | venv/Lib/site-packages/caffe2/python/modeling/compute_statistics_for_blobs.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/caffe2/python/modeling/compute_statistics_for_blobs.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null |
from caffe2.python import core, schema
from caffe2.python.modeling.net_modifier import NetModifier
import numpy as np
class ComputeStatisticsForBlobs(NetModifier):
"""
This class modifies the net passed in by adding ops to compute statistics
for certain blobs. For each blob in the list... | 35.690909 | 135 | 0.612328 |
668148060efc8e8866eb3cc57728936139b13c3e | 1,231 | py | Python | models/lenet.py | jun2tong/Continual-Learning-Benchmark | b6fdcc56ec2821b945105b1a54cdea03b421a6b2 | [
"MIT"
] | null | null | null | models/lenet.py | jun2tong/Continual-Learning-Benchmark | b6fdcc56ec2821b945105b1a54cdea03b421a6b2 | [
"MIT"
] | null | null | null | models/lenet.py | jun2tong/Continual-Learning-Benchmark | b6fdcc56ec2821b945105b1a54cdea03b421a6b2 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class LeNet(nn.Module):
def __init__(self, out_dim=10, in_channel=1, img_sz=32):
super(LeNet, self).__init__()
feat_map_sz = img_sz // 4
self.n_feat = 50 * feat_map_sz * feat_map_sz
self.conv = nn.Sequential(
nn.Conv2d(in_channel, 20... | 26.76087 | 87 | 0.551584 |
419c37980d80dccc7919b29aa39b72162a581f1f | 2,975 | py | Python | pyrca/analysis/beam/test/test_beam_analysis.py | syncsoft-solutions/pyrca | a29984cca269ced8b0c458231a9f5ab912d7ef6b | [
"MIT"
] | null | null | null | pyrca/analysis/beam/test/test_beam_analysis.py | syncsoft-solutions/pyrca | a29984cca269ced8b0c458231a9f5ab912d7ef6b | [
"MIT"
] | 3 | 2019-09-28T13:11:12.000Z | 2019-09-28T15:13:22.000Z | pyrca/analysis/beam/test/test_beam_analysis.py | syncsoft-solutions/pyrca | a29984cca269ced8b0c458231a9f5ab912d7ef6b | [
"MIT"
] | null | null | null | import unittest
from pyrca.properties.beam.node import Node
from pyrca.properties.beam.section import Section
from pyrca.properties.beam.beam_section import BeamSection
from pyrca.properties.beam.steel_tension import SteelTension
from ..beam_analyses import BeamAnalyses
from ..stress_distribution import StressDistribut... | 35 | 108 | 0.671933 |
fc8a2ec605506f630d1a559e670ad23e117311db | 9,165 | py | Python | tensorflow_data_validation/statistics/generators/natural_language_stats_generator.py | Coulbe/data-validation | a2c5e5dd2cc50cce8a7eab5c7e72a0cb11b74b2c | [
"Apache-2.0"
] | 1 | 2020-08-17T21:49:02.000Z | 2020-08-17T21:49:02.000Z | tensorflow_data_validation/statistics/generators/natural_language_stats_generator.py | mitakora/tensorflow-data-validation | 8e43d424a6064e9626a00b2ef9db826baa2ab25d | [
"Apache-2.0"
] | null | null | null | tensorflow_data_validation/statistics/generators/natural_language_stats_generator.py | mitakora/tensorflow-data-validation | 8e43d424a6064e9626a00b2ef9db826baa2ab25d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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 in writing, ... | 37.105263 | 79 | 0.733879 |
fc398f7879f89e035812c58f93e02bc60dae2b65 | 2,151 | py | Python | scr/map_mir_snp/turn-03-multi-snp/01-altmir-fa.py | chunjie-sam-liu/miRNASNP-v3 | 41fab95b496b639674010863895547db0fc108bc | [
"MIT"
] | 1 | 2020-07-02T08:51:37.000Z | 2020-07-02T08:51:37.000Z | scr/map_mir_snp/turn-03-multi-snp/01-altmir-fa.py | chunjie-sam-liu/miRNASNP-v3 | 41fab95b496b639674010863895547db0fc108bc | [
"MIT"
] | null | null | null | scr/map_mir_snp/turn-03-multi-snp/01-altmir-fa.py | chunjie-sam-liu/miRNASNP-v3 | 41fab95b496b639674010863895547db0fc108bc | [
"MIT"
] | null | null | null | import json,sys
#there are 598 snps in seed with multiple alleles, 51 of them are predicted by each allele, 547 are left
def getJson():
with open("/home/fux/fux/miRNASNP3/map_mir_snp/map_seed_02/snp_in_seed_4666.rela.snv.json") as infile:
rela_dict = json.load(infile)
return rela_dict
def getMirs... | 36.457627 | 106 | 0.481172 |
085b169db3c6732208ba1cb194a315d78cdf1e7b | 6,674 | py | Python | nova/tests/unit/virt/test_images.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 1,874 | 2015-01-04T05:18:34.000Z | 2022-03-31T03:30:28.000Z | nova/tests/unit/virt/test_images.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 40 | 2015-04-13T02:32:42.000Z | 2022-02-16T02:28:06.000Z | nova/tests/unit/virt/test_images.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 1,996 | 2015-01-04T15:11:51.000Z | 2022-03-31T11:03:13.000Z | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 48.362319 | 78 | 0.631106 |
be7be585c718377c0da92eb78ac8c2a0a7e6e5a5 | 4,723 | py | Python | create-face-morph-dataset.py | wwwins/OpenCV-Samples | 6a88c411064d5a8d012fbc2299a6d85b4526785e | [
"MIT"
] | null | null | null | create-face-morph-dataset.py | wwwins/OpenCV-Samples | 6a88c411064d5a8d012fbc2299a6d85b4526785e | [
"MIT"
] | null | null | null | create-face-morph-dataset.py | wwwins/OpenCV-Samples | 6a88c411064d5a8d012fbc2299a6d85b4526785e | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# @Author: wwwins
# @Date: 2017-09-11 14:45:16
import cv2
import sys
import os
import time
import argparse
import dlib
import crop_face
import numpy as np
from glob import glob
from crop_face import *
DEBUG = 0
# 依不同的 casca{de} 做調整
# lbpcascade_frontalface: 1.1
# haarcasca... | 30.869281 | 183 | 0.599407 |
c5cf62323df9112e03773c6d6678d1880b6709b1 | 1,828 | py | Python | traffic/genetic_algorithm/Experiments/Hypothesis 1/experiment 1.py | pangpifuta/react-ui-project | dea2ad1b114718f6d034e3afb94c75780d328198 | [
"MIT"
] | null | null | null | traffic/genetic_algorithm/Experiments/Hypothesis 1/experiment 1.py | pangpifuta/react-ui-project | dea2ad1b114718f6d034e3afb94c75780d328198 | [
"MIT"
] | 6 | 2020-06-05T20:28:09.000Z | 2022-01-13T01:10:19.000Z | traffic/genetic_algorithm/Experiments/Hypothesis 1/experiment 1.py | pangpifuta/react-ui-project | dea2ad1b114718f6d034e3afb94c75780d328198 | [
"MIT"
] | null | null | null | from long import GA1
from short1 import GA2
from simulator import Simulator
import time
from deap import tools
import math
import copy
import os.path
import pickle
import numpy as np
class Controller:
def __init__(self, params):
self.params = params
self.timeSteps = params["timeSteps"]
self... | 36.56 | 199 | 0.623632 |
11139e3bf9b74eed0c766d92a92b29a8f96d39ba | 371 | py | Python | scatterplot/scatterplot_iris.py | thefullstackninja/plotly_express_tutorial | 23b706269d997058197db9600c4ec953e89ab5e2 | [
"MIT"
] | null | null | null | scatterplot/scatterplot_iris.py | thefullstackninja/plotly_express_tutorial | 23b706269d997058197db9600c4ec953e89ab5e2 | [
"MIT"
] | null | null | null | scatterplot/scatterplot_iris.py | thefullstackninja/plotly_express_tutorial | 23b706269d997058197db9600c4ec953e89ab5e2 | [
"MIT"
] | 1 | 2022-01-08T08:33:27.000Z | 2022-01-08T08:33:27.000Z | import plotly_express as px
import pandas as pd
df = pd.read_csv("./data/iris.csv")
print(df.head())
iris_scatterplot = px.scatter(data_frame=df, x='SepalLengthCm',
y='SepalWidthCm',
color='Species',
title="Scatterplot of Sep... | 24.733333 | 81 | 0.568733 |
d67a53433e748b3dfe2f8fbd06b9c917a36aef79 | 8,439 | py | Python | Game.py | KRHS-GameProgramming-2015/Manpac | 959bf7f5195a4edb528fbbf25b8896fcb28d5327 | [
"BSD-2-Clause"
] | null | null | null | Game.py | KRHS-GameProgramming-2015/Manpac | 959bf7f5195a4edb528fbbf25b8896fcb28d5327 | [
"BSD-2-Clause"
] | 3 | 2016-01-19T17:26:16.000Z | 2016-02-10T16:59:25.000Z | Game.py | KRHS-GameProgramming-2015/Manpac | 959bf7f5195a4edb528fbbf25b8896fcb28d5327 | [
"BSD-2-Clause"
] | null | null | null | import sys, pygame, math, random
from Wall import *
from Ghost import *
from Manpac import *
from Norb import *
from Score import *
pygame.init()
clock = pygame.time.Clock()
width = 700
height = 700
size = width, height
bgColor = r,g,b = 0, 0, 0
screen = pygame.display.set_mode(size)
while True:
ghosts = [Gh... | 31.371747 | 87 | 0.426472 |
e546c1c0dd55ddb71b7381725b0d82d63d102f27 | 727 | py | Python | chiplet/jenkins/compiler/sing_operator/2conv1bn1relu_2.py | Glacier-program/pytorch | 208b3d1029b465da89e04a95a6c02d1c7fee559b | [
"Intel"
] | null | null | null | chiplet/jenkins/compiler/sing_operator/2conv1bn1relu_2.py | Glacier-program/pytorch | 208b3d1029b465da89e04a95a6c02d1c7fee559b | [
"Intel"
] | null | null | null | chiplet/jenkins/compiler/sing_operator/2conv1bn1relu_2.py | Glacier-program/pytorch | 208b3d1029b465da89e04a95a6c02d1c7fee559b | [
"Intel"
] | null | null | null | import torch
import torch.nn as nn
from quant_layer import QuantLayer
import torch.nn.functional as F
class vgg(nn.Module):
def __init__(self):
super(vgg, self).__init__()
self.conv1 = nn.Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
self.conv2 = nn.Conv2d(64... | 31.608696 | 101 | 0.646492 |
7a7d1646a2dd7569d08098b0b2e909026a3cce5f | 3,502 | py | Python | brian2/tests/test_poissoninput.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | null | null | null | brian2/tests/test_poissoninput.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | null | null | null | brian2/tests/test_poissoninput.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | null | null | null | from numpy.testing import assert_equal
import pytest
from brian2 import *
from brian2.devices.device import reinit_and_delete
from brian2.core.network import schedule_propagation_offset
from brian2.tests.utils import assert_allclose, exc_isinstance
@pytest.mark.standalone_compatible
def test_poissoninput():
# Tes... | 37.655914 | 91 | 0.638492 |
4e6b3c861cce395450230e907af7dcc16866b8c2 | 3,681 | py | Python | main.py | YandrosChaos/BattleOfNumbers | 6a5c82ed5040f1c0fd88ac454053d08a7dd21694 | [
"MIT"
] | null | null | null | main.py | YandrosChaos/BattleOfNumbers | 6a5c82ed5040f1c0fd88ac454053d08a7dd21694 | [
"MIT"
] | null | null | null | main.py | YandrosChaos/BattleOfNumbers | 6a5c82ed5040f1c0fd88ac454053d08a7dd21694 | [
"MIT"
] | null | null | null | import random
import numpy
def mainMenu():
running = True
player_one=Player()
player_two=Player()
player_ai=PlayerAI()
while(running):
print("")
print("<>---<>---<> BATTLE OF NUMBERS <>---<>---<>")
print(" | <>---<> ONE PLAYER <>---<> | ")
print(" | <>---<> TWO PLAYERS <>---<> | ")
... | 27.676692 | 90 | 0.584352 |
8e97d73c07f23016609f22d373b9c63599c97e85 | 2,012 | py | Python | project/fixtures/__init__.py | erayerdin/django-persistent-settings | f65db25b220a84124d0e9f4e13c474af06b7e74b | [
"Apache-2.0"
] | 2 | 2019-12-07T11:50:09.000Z | 2020-02-03T09:21:04.000Z | project/fixtures/__init__.py | erayerdin/django-persistent-settings | f65db25b220a84124d0e9f4e13c474af06b7e74b | [
"Apache-2.0"
] | 16 | 2019-12-08T13:15:58.000Z | 2020-06-21T18:31:15.000Z | project/fixtures/__init__.py | erayerdin/django-persistent-settings | f65db25b220a84124d0e9f4e13c474af06b7e74b | [
"Apache-2.0"
] | null | null | null | import pytest
@pytest.fixture
def variable_factory(db):
"""
Returns a Variable instance.
"""
from persistent_settings.models import Variable
def factory(value, name="FOO"):
return Variable.objects.create(name=name, value=value)
return factory
@pytest.fixture
def request_obj(client)... | 23.952381 | 87 | 0.615308 |
710d0fe1a8ae680cb90fbdba9c3693bf00740cc7 | 2,256 | py | Python | app.py | FirePing32/CNCF-Hackathon | 171483468bc221758aa70add7de631f5115983f2 | [
"MIT"
] | 1 | 2021-12-09T06:57:38.000Z | 2021-12-09T06:57:38.000Z | app.py | FirePing32/CNCF-Hackathon | 171483468bc221758aa70add7de631f5115983f2 | [
"MIT"
] | 2 | 2021-12-09T09:10:18.000Z | 2021-12-12T18:49:31.000Z | app.py | FirePing32/CNCF-Hackathon | 171483468bc221758aa70add7de631f5115983f2 | [
"MIT"
] | null | null | null | import json
from flask import Flask, jsonify, request
from github import Github
from googlesearch import search
from os.path import join, dirname
try:
from dotenv import load_dotenv
except ImportError:
print("No module named 'google' found")
from os import environ as env
dotenv_path = join(dirname(__file__), '... | 28.923077 | 73 | 0.570922 |
27f8f386e3bbbf52203544c3846f08a9314adc27 | 4,218 | py | Python | section13/neural_network_model/neural_network_model/processing/data_management.py | Jeffresh/deployment-of-machine-learning-models | bc4a5ff5713601a1a4b2c73292b1f276f22bf258 | [
"MIT"
] | null | null | null | section13/neural_network_model/neural_network_model/processing/data_management.py | Jeffresh/deployment-of-machine-learning-models | bc4a5ff5713601a1a4b2c73292b1f276f22bf258 | [
"MIT"
] | null | null | null | section13/neural_network_model/neural_network_model/processing/data_management.py | Jeffresh/deployment-of-machine-learning-models | bc4a5ff5713601a1a4b2c73292b1f276f22bf258 | [
"MIT"
] | 1 | 2021-02-10T13:03:04.000Z | 2021-02-10T13:03:04.000Z | import logging
import os
import typing as t
from glob import glob
from pathlib import Path
import pandas as pd
from keras.models import load_model
from keras.wrappers.scikit_learn import KerasClassifier
from sklearn.externals import joblib
from sklearn.model_selection import train_test_split
from sklearn.pipeline impo... | 32.446154 | 77 | 0.653627 |
8350db36a845c1325e3f12dada5511e1d0acd64a | 1,121 | py | Python | test_bibtex_extract.py | jmaslak/resume | a90dc0eeaf93a4f4032dea5d9fef0bdc3a78020c | [
"CC-BY-4.0"
] | null | null | null | test_bibtex_extract.py | jmaslak/resume | a90dc0eeaf93a4f4032dea5d9fef0bdc3a78020c | [
"CC-BY-4.0"
] | null | null | null | test_bibtex_extract.py | jmaslak/resume | a90dc0eeaf93a4f4032dea5d9fef0bdc3a78020c | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (C) 2022 Joelle Maslak
# All Rights Reserved - See License
#
import extract_by_tags
#
# Some unit tests for the bibtex extractor
#
def args():
"""Do nothing but function as holder for attributes."""
pass
args.source = "references.bib"
db = extract_by_tags.read_bibtex(... | 21.557692 | 59 | 0.707404 |
7cff3187e4599604bd1bbce2d3b02322e431f3fd | 1,781 | py | Python | datawarehouse/edw_migrations/versions/886ed324665a_factrequestredactionlayers.py | bcgov/foi-reporting | 25856ce87b668df964ddd16ac7459fae4aa6a7c5 | [
"Apache-2.0"
] | null | null | null | datawarehouse/edw_migrations/versions/886ed324665a_factrequestredactionlayers.py | bcgov/foi-reporting | 25856ce87b668df964ddd16ac7459fae4aa6a7c5 | [
"Apache-2.0"
] | 3 | 2022-01-05T18:01:41.000Z | 2022-02-08T21:51:32.000Z | datawarehouse/edw_migrations/versions/886ed324665a_factrequestredactionlayers.py | bcgov/foi-reporting | 25856ce87b668df964ddd16ac7459fae4aa6a7c5 | [
"Apache-2.0"
] | null | null | null | """factRequestRedactionLayers
Revision ID: 886ed324665a
Revises: 224658c1de31
Create Date: 2022-01-30 16:09:19.702040
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '886ed324665a'
down_revision = '224658c1de31'
branch_labels = None
depends_on = None
def upgr... | 33.603774 | 74 | 0.716451 |
99a5f24148e2428c5c14f29182c366e85a15125d | 2,628 | py | Python | jaitool/annotation/COCO/edit_coco_json.py | Jitesh17/jaitool | bcbb014808045d65c0f5b2bd587b1a418271f61e | [
"MIT"
] | 1 | 2021-01-22T00:38:41.000Z | 2021-01-22T00:38:41.000Z | jaitool/annotation/COCO/edit_coco_json.py | Jitesh17/jaitool | bcbb014808045d65c0f5b2bd587b1a418271f61e | [
"MIT"
] | null | null | null | jaitool/annotation/COCO/edit_coco_json.py | Jitesh17/jaitool | bcbb014808045d65c0f5b2bd587b1a418271f61e | [
"MIT"
] | 1 | 2021-02-26T05:23:23.000Z | 2021-02-26T05:23:23.000Z | import os
import cv2
import numpy as np
# import printj
# from annotation_utils.coco.structs import COCO_Dataset
# from common_utils.common_types.segmentation import Segmentation
from tqdm import tqdm
def merge_categories(json_path :str, output_json_path :str, merge_from :list,
merge_to :int = None):
""... | 38.647059 | 90 | 0.633942 |
4c97377966d0f72771d1e1f893dfc2a65717b083 | 4,252 | py | Python | backend/FlaskAPI/mf_field_analysis_trf.py | steruel/CovalentMFFPrototype | 275ade0fa0a2ce3c80ed3aaac3a861dd0e273622 | [
"MIT"
] | null | null | null | backend/FlaskAPI/mf_field_analysis_trf.py | steruel/CovalentMFFPrototype | 275ade0fa0a2ce3c80ed3aaac3a861dd0e273622 | [
"MIT"
] | null | null | null | backend/FlaskAPI/mf_field_analysis_trf.py | steruel/CovalentMFFPrototype | 275ade0fa0a2ce3c80ed3aaac3a861dd0e273622 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
##Includes
from flask import request, url_for
from flask_api import FlaskAPI, status, exceptions
from flask_cors import CORS, cross_origin
from flask import Blueprint, render_template, abort
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.rea... | 27.973684 | 121 | 0.72413 |
d0e0a686b4abd97d0a614b16185b05bb5dfbf0f0 | 2,821 | py | Python | src/map_generation.py | earthquake-alert/earthquake-alert | 81033d157289b1417ced272b7ae0560da4322ae1 | [
"MIT"
] | 8 | 2020-09-11T19:17:26.000Z | 2022-03-29T06:17:55.000Z | src/map_generation.py | earthquake-alert/earthquake-alert | 81033d157289b1417ced272b7ae0560da4322ae1 | [
"MIT"
] | 25 | 2020-06-05T15:45:15.000Z | 2021-03-20T04:55:58.000Z | src/map_generation.py | earthquake-alert/earthquake-alert | 81033d157289b1417ced272b7ae0560da4322ae1 | [
"MIT"
] | 2 | 2020-12-28T02:09:35.000Z | 2021-05-11T07:03:30.000Z | '''
@author: Yuto Watanabe
@version: 1.0.0
Copyright (c) 2020 Earthquake alert
'''
import datetime
import os
import signal
import time
from typing import Any, Dict, List, Union
from selenium import webdriver
def create_map_info(
areas: Dict[str, Union[Any]],
title: str, date: str, image_file_path: s... | 31 | 111 | 0.633463 |
4902226aadd87a902e00409d0e7f3dcd86f2f173 | 31,772 | py | Python | autotest/ogr/ogr_feature.py | riseofthetigers/GDAL | 918b6939f6be25ac9d36edca3f71c8bf5dd5975e | [
"MIT"
] | null | null | null | autotest/ogr/ogr_feature.py | riseofthetigers/GDAL | 918b6939f6be25ac9d36edca3f71c8bf5dd5975e | [
"MIT"
] | null | null | null | autotest/ogr/ogr_feature.py | riseofthetigers/GDAL | 918b6939f6be25ac9d36edca3f71c8bf5dd5975e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id: ogr_mem.py 23065 2011-09-05 20:41:03Z rouault $
#
# Project: GDAL/OGR Test Suite
# Purpose: Test OGR Feature facilities, particularly SetFrom()
# Author: Frank Warmerdam <warmerdam@po... | 30.876579 | 104 | 0.616486 |
3f1056032ca5104baf4ac56f414952bf9e1c7e1e | 1,695 | py | Python | djangocms_page_meta/migrations/0013_auto_20200821_1457.py | Bernardvdv/djangocms-page-meta | e8c5e2180819341bd7f5afd7ec3ef1046c1a7712 | [
"BSD-3-Clause"
] | 65 | 2015-01-01T18:29:53.000Z | 2022-03-15T07:40:31.000Z | djangocms_page_meta/migrations/0013_auto_20200821_1457.py | Bernardvdv/djangocms-page-meta | e8c5e2180819341bd7f5afd7ec3ef1046c1a7712 | [
"BSD-3-Clause"
] | 109 | 2015-03-30T15:14:36.000Z | 2021-06-25T15:24:06.000Z | djangocms_page_meta/migrations/0013_auto_20200821_1457.py | Bernardvdv/djangocms-page-meta | e8c5e2180819341bd7f5afd7ec3ef1046c1a7712 | [
"BSD-3-Clause"
] | 52 | 2015-01-15T01:48:35.000Z | 2021-11-25T11:21:28.000Z | # Generated by Django 2.2 on 2020-08-21 14:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("djangocms_page_meta", "0012_auto_20200706_1230"),
]
operations = [
migrations.AddField(
model_name="titlemeta",
name="... | 32.596154 | 118 | 0.471386 |
a7593b44b3d06599974bc6e224e22d695aaa9912 | 493 | py | Python | setup.py | rogeriobonatti/mushr_aml | c50ee0c72faaf1bac4511dfdf932efcc3a69f51c | [
"BSD-3-Clause"
] | null | null | null | setup.py | rogeriobonatti/mushr_aml | c50ee0c72faaf1bac4511dfdf932efcc3a69f51c | [
"BSD-3-Clause"
] | null | null | null | setup.py | rogeriobonatti/mushr_aml | c50ee0c72faaf1bac4511dfdf932efcc3a69f51c | [
"BSD-3-Clause"
] | null | null | null |
# setup.py: install script for mushr
'''
to install mushr and its dependencies for development work,
run this cmd from the root directory:
pip install -e .
'''
import setuptools
with open('requirements.txt') as req_file:
requirements = req_file.read().splitlines()
setuptools.setup(
name='mushr_aml',
... | 24.65 | 59 | 0.72211 |
60b05c1157dfc1a9a2ef76b592d5a96e92a9e357 | 2,192 | py | Python | GM2AUTOSAR_MM/Properties/positive/Himesis/HM6IfClauseIsolatedConnectedLHS.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 3 | 2017-06-02T19:26:27.000Z | 2021-06-14T04:25:45.000Z | GM2AUTOSAR_MM/Properties/positive/Himesis/HM6IfClauseIsolatedConnectedLHS.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 8 | 2016-08-24T07:04:07.000Z | 2017-05-26T16:22:47.000Z | GM2AUTOSAR_MM/Properties/positive/Himesis/HM6IfClauseIsolatedConnectedLHS.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 1 | 2019-10-31T06:00:23.000Z | 2019-10-31T06:00:23.000Z |
from core.himesis import Himesis, HimesisPreConditionPatternLHS
class HM6IfClauseIsolatedConnectedLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HM6IfClauseIsolatedConnectedLHS.
"""
# Flag this instance as compile... | 42.153846 | 124 | 0.543339 |
9daa58f14c1c27a536fa8120cbac3e73f0dcbf22 | 43,115 | py | Python | test/integration/test_event_notifications_v1.py | IBM/event-notifications-python-admin-sdk | 44c428423022ec1b158453635d01b9e5339519c5 | [
"Apache-2.0"
] | null | null | null | test/integration/test_event_notifications_v1.py | IBM/event-notifications-python-admin-sdk | 44c428423022ec1b158453635d01b9e5339519c5 | [
"Apache-2.0"
] | 9 | 2021-11-24T07:16:36.000Z | 2022-03-25T07:33:53.000Z | test/integration/test_event_notifications_v1.py | IBM/event-notifications-python-admin-sdk | 44c428423022ec1b158453635d01b9e5339519c5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# (C) Copyright IBM Corp. 2022.
#
# 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... | 32.344336 | 123 | 0.61489 |
ef5376205d7384080af4794a887f1581189b138b | 9,720 | py | Python | core/domain/story_jobs_one_off_test.py | nishcthulhu/oppia | 5e27ae12448f6295899d7d7ea99b08061e2dd784 | [
"Apache-2.0"
] | null | null | null | core/domain/story_jobs_one_off_test.py | nishcthulhu/oppia | 5e27ae12448f6295899d7d7ea99b08061e2dd784 | [
"Apache-2.0"
] | null | null | null | core/domain/story_jobs_one_off_test.py | nishcthulhu/oppia | 5e27ae12448f6295899d7d7ea99b08061e2dd784 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2018 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... | 40.5 | 110 | 0.658745 |
5d7abd7300a909b3fb06c1c6ff77ef36f81a09fb | 401 | py | Python | sdos_project/wsgi.py | SDOS2020/Team_2_Mentoring_Platform | fc016bf24025c237bbd5648391ce7d3d104c8cdb | [
"Apache-2.0"
] | null | null | null | sdos_project/wsgi.py | SDOS2020/Team_2_Mentoring_Platform | fc016bf24025c237bbd5648391ce7d3d104c8cdb | [
"Apache-2.0"
] | 9 | 2021-01-17T14:46:18.000Z | 2021-09-22T19:41:12.000Z | sdos_project/wsgi.py | SDOS2020/Team_2_Mentoring_Platform | fc016bf24025c237bbd5648391ce7d3d104c8cdb | [
"Apache-2.0"
] | null | null | null | """
WSGI config for sdos_project 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/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
e968a59f1a4f20bbdb60382bf19edabd4cade8d8 | 719 | py | Python | userinfo/migrations/0001_initial.py | cuizhenduo/apple | 7701a0664aaf712aa9f855b28d8f19eb8b71645d | [
"Apache-2.0"
] | null | null | null | userinfo/migrations/0001_initial.py | cuizhenduo/apple | 7701a0664aaf712aa9f855b28d8f19eb8b71645d | [
"Apache-2.0"
] | null | null | null | userinfo/migrations/0001_initial.py | cuizhenduo/apple | 7701a0664aaf712aa9f855b28d8f19eb8b71645d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.4 on 2018-05-11 02:09
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='userinfo',
fields=[
('id', models.AutoField... | 26.62963 | 114 | 0.550765 |
e27579831f4b0a25bab6672d46f37987ee4fc551 | 4,274 | py | Python | tests/test_runner/test_parallel.py | KaushikSathvara/django | 3b9fe906bf28d2e748ce4d9a1af5fbcd5df48946 | [
"BSD-3-Clause",
"0BSD"
] | 61,676 | 2015-01-01T00:05:13.000Z | 2022-03-31T20:37:54.000Z | tests/test_runner/test_parallel.py | KaushikSathvara/django | 3b9fe906bf28d2e748ce4d9a1af5fbcd5df48946 | [
"BSD-3-Clause",
"0BSD"
] | 8,884 | 2015-01-01T00:12:05.000Z | 2022-03-31T19:53:11.000Z | tests/test_runner/test_parallel.py | mustafa0x/django | d7394cfa13a4d1a02356e3a83e10ec100fbb9948 | [
"BSD-3-Clause",
"0BSD"
] | 33,143 | 2015-01-01T02:04:52.000Z | 2022-03-31T19:42:46.000Z | import pickle
import sys
import unittest
from django.test import SimpleTestCase
from django.test.runner import RemoteTestResult
try:
import tblib.pickling_support
except ImportError:
tblib = None
class ExceptionThatFailsUnpickling(Exception):
"""
After pickling, this class fails unpickling with an e... | 32.625954 | 112 | 0.67314 |
474fe6b3adaa1ac9708262cd8bc65b15d831e41a | 2,518 | py | Python | tests/test_terminal.py | Nicals/blitsh | 8ed97842e99ddf87c0f9336215255bf446e5db49 | [
"MIT"
] | null | null | null | tests/test_terminal.py | Nicals/blitsh | 8ed97842e99ddf87c0f9336215255bf446e5db49 | [
"MIT"
] | null | null | null | tests/test_terminal.py | Nicals/blitsh | 8ed97842e99ddf87c0f9336215255bf446e5db49 | [
"MIT"
] | null | null | null | from unittest.mock import Mock
import pytest
from blitsh import terminal
from blitsh.commands import Command, NoOpArguments, ArgParseError
def test_parse_empty_line():
term = terminal.Terminal(client=Mock())
assert term.parse_line('') == (None, [])
def test_parse_line_returns_extracts_command_name():
... | 27.075269 | 74 | 0.671565 |
38fe2ef06eac5c3d79c5dcb6086d01ed616ad734 | 13,455 | py | Python | python/pyspark/worker.py | alfozan/spark | e0195e2e7aeeafc5f2a5ecf18fa15b35a43b245b | [
"Apache-2.0"
] | 1 | 2020-04-13T06:22:02.000Z | 2020-04-13T06:22:02.000Z | python/pyspark/worker.py | jeromehj/spark | c7c0b086a0b18424725433ade840d5121ac2b86e | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | null | null | null | python/pyspark/worker.py | jeromehj/spark | c7c0b086a0b18424725433ade840d5121ac2b86e | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | 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 us... | 39.457478 | 94 | 0.666741 |
33106709950256ab323f2dc943b1de70b3238d8b | 8,656 | py | Python | django/contrib/auth/admin.py | bpeschier/django | f54c0ec06e390dc5bce95fdccbcb51d6423da4f9 | [
"BSD-3-Clause"
] | 3 | 2015-09-26T13:33:07.000Z | 2020-03-08T07:34:38.000Z | django/contrib/auth/admin.py | bpeschier/django | f54c0ec06e390dc5bce95fdccbcb51d6423da4f9 | [
"BSD-3-Clause"
] | null | null | null | django/contrib/auth/admin.py | bpeschier/django | f54c0ec06e390dc5bce95fdccbcb51d6423da4f9 | [
"BSD-3-Clause"
] | 15 | 2016-01-08T14:28:41.000Z | 2019-04-19T08:33:31.000Z | from django.conf import settings
from django.conf.urls import url
from django.contrib import admin, messages
from django.contrib.admin.options import IS_POPUP_VAR
from django.contrib.admin.utils import unquote
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.forms import (
AdminPass... | 42.851485 | 126 | 0.624191 |
dd23c18d58cf0f0ade6174b955bba1c8c3d91a12 | 10,805 | py | Python | app/internal/weather_forecast.py | krauson/calendar | 34f3861ec1bb69e7dd81aa10739731cc2ae6c941 | [
"Apache-2.0"
] | null | null | null | app/internal/weather_forecast.py | krauson/calendar | 34f3861ec1bb69e7dd81aa10739731cc2ae6c941 | [
"Apache-2.0"
] | null | null | null | app/internal/weather_forecast.py | krauson/calendar | 34f3861ec1bb69e7dd81aa10739731cc2ae6c941 | [
"Apache-2.0"
] | null | null | null | import datetime
<<<<<<< HEAD
import frozendict
import functools
=======
import functools
import frozendict
>>>>>>> 7f38da98a7122787cdd981344ce2f6a116f96e10
import requests
from app import config
<<<<<<< HEAD
=======
>>>>>>> 7f38da98a7122787cdd981344ce2f6a116f96e10
# This feature requires an API KEY
# get yours fre... | 38.045775 | 79 | 0.630449 |
9581816d83853c12c277497ee29b66a019af3904 | 583 | py | Python | main.py | zmastylo/theasynciosample | 9ca842447e748b1fbd446d27b4785c71a37dae53 | [
"MIT"
] | null | null | null | main.py | zmastylo/theasynciosample | 9ca842447e748b1fbd446d27b4785c71a37dae53 | [
"MIT"
] | null | null | null | main.py | zmastylo/theasynciosample | 9ca842447e748b1fbd446d27b4785c71a37dae53 | [
"MIT"
] | null | null | null | import asyncio
from asyncdatahandler import AsyncDataHandler
from asyncextractor import AsyncExtractor
if __name__ == "__main__":
loop = None
try:
loop = asyncio.get_event_loop()
urls = [
'http://headers.jsontest.com/',
'http://ip.jsontest.com/'
]
extra... | 25.347826 | 51 | 0.608919 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.