hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a10aa61d182fa8b7ff2a8ca41ba9f91223510ef | 11,862 | py | Python | spyne/protocol/json.py | lemanyk/spyne | 12bea0be357ceebec1cf877270ce240424357c7b | [
"BSD-3-Clause"
] | 1 | 2021-06-07T16:19:41.000Z | 2021-06-07T16:19:41.000Z | spyne/protocol/json.py | lemanyk/spyne | 12bea0be357ceebec1cf877270ce240424357c7b | [
"BSD-3-Clause"
] | null | null | null | spyne/protocol/json.py | lemanyk/spyne | 12bea0be357ceebec1cf877270ce240424357c7b | [
"BSD-3-Clause"
] | null | null | null |
#
# spyne - Copyright (C) Spyne contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This libra... | 35.836858 | 80 | 0.625695 |
4a10aadfa445e3668041d60b8476b9edf02f69ea | 1,292 | py | Python | venv/lib/python3.8/site-packages/vsts/git/v4_1/models/git_user_date.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/git/v4_1/models/git_user_date.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/git/v4_1/models/git_user_date.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 38 | 95 | 0.487616 |
4a10ab7e3ec05ac3c50d0a5eae98410fcd8c8911 | 9,258 | py | Python | eb-archive/eb6.py | SBC-Collaboration/SBC-EventBuilder | 0ee90774b5b8f1e15ccc1847677254641aab7676 | [
"MIT"
] | null | null | null | eb-archive/eb6.py | SBC-Collaboration/SBC-EventBuilder | 0ee90774b5b8f1e15ccc1847677254641aab7676 | [
"MIT"
] | null | null | null | eb-archive/eb6.py | SBC-Collaboration/SBC-EventBuilder | 0ee90774b5b8f1e15ccc1847677254641aab7676 | [
"MIT"
] | null | null | null | from tkinter.constants import DISABLED
from tkinter import ttk
import RPi.GPIO as GPIO
import tkinter as tk
from datetime import datetime
from PIL import ImageTk, Image
from pathlib import Path
import time
import os
# GPIO Setup
SimOut = [11, 13, 15]
InPins = [18, 36, 40]
OutPins = [16, 32, 38]
Error_LED =... | 33.543478 | 100 | 0.626485 |
4a10abb8c632263e60fe9a15ba965c9beb0fb718 | 2,462 | py | Python | gnes/encoder/text/bert.py | awesome-archive/gnes | 21311f05747303d0acdc303f2ade830ef971f47d | [
"Apache-2.0"
] | null | null | null | gnes/encoder/text/bert.py | awesome-archive/gnes | 21311f05747303d0acdc303f2ade830ef971f47d | [
"Apache-2.0"
] | null | null | null | gnes/encoder/text/bert.py | awesome-archive/gnes | 21311f05747303d0acdc303f2ade830ef971f47d | [
"Apache-2.0"
] | null | null | null | # Tencent is pleased to support the open source community by making GNES available.
#
# Copyright (C) 2019 THL A29 Limited, a Tencent company. 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... | 32.394737 | 87 | 0.692526 |
4a10ad912b303fd2a335fbfb64e3b2dc5e6acf98 | 4,882 | py | Python | src/dewloosh/math/interval.py | dewloosh/dewloosh-math | 41e2e4a9a92b567a7ef93f7414a1e439bf7dd9f4 | [
"MIT"
] | 2 | 2021-12-11T17:25:53.000Z | 2022-01-06T15:36:22.000Z | src/dewloosh/math/interval.py | dewloosh/dewloosh-math | 41e2e4a9a92b567a7ef93f7414a1e439bf7dd9f4 | [
"MIT"
] | null | null | null | src/dewloosh/math/interval.py | dewloosh/dewloosh-math | 41e2e4a9a92b567a7ef93f7414a1e439bf7dd9f4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from numba.extending import unbox, NativeValue
from numba.extending import box
from numba.core import cgutils
from numba.extending import lower_builtin
from numba.extending import overload_attribute, overload
from numba.extending import make_attribute_wrapper
from numba.extending import models, ... | 27.581921 | 86 | 0.683736 |
4a10ae0991118915cad50e8d1b6ca582b7b49588 | 43,308 | py | Python | pcdet/models/detectors/detector3d_template.py | SunshengGu/XC_eval_pcdet | 616f3baf05ba81bdf6461c6b814079a81b55ae68 | [
"Apache-2.0"
] | 1 | 2022-01-17T20:06:27.000Z | 2022-01-17T20:06:27.000Z | pcdet/models/detectors/detector3d_template.py | SunshengGu/XC_eval_pcdet | 616f3baf05ba81bdf6461c6b814079a81b55ae68 | [
"Apache-2.0"
] | null | null | null | pcdet/models/detectors/detector3d_template.py | SunshengGu/XC_eval_pcdet | 616f3baf05ba81bdf6461c6b814079a81b55ae68 | [
"Apache-2.0"
] | null | null | null | import os
import torch
import torch.nn as nn
import copy
from ...ops.iou3d_nms import iou3d_nms_utils
from .. import backbones_2d, backbones_3d, dense_heads, roi_heads
from ..backbones_2d import map_to_bev
from ..backbones_3d import pfe, vfe
from ..model_utils import model_nms_utils
class Detector3DTemplate(nn.Modu... | 49.102041 | 113 | 0.604484 |
4a10af0f8ef8cb76c9d82d62fcc1d2e32da883b5 | 3,942 | py | Python | tests/functional/desktop/test_rewrites.py | navgurukul-shivani18/kitsune | a7cf49ab1bfcf4e770938116968824b2b0fa5bb1 | [
"BSD-3-Clause"
] | 4 | 2021-05-17T11:38:08.000Z | 2021-08-19T06:42:39.000Z | tests/functional/desktop/test_rewrites.py | navgurukul-shivani18/kitsune | a7cf49ab1bfcf4e770938116968824b2b0fa5bb1 | [
"BSD-3-Clause"
] | 32 | 2021-04-15T22:35:58.000Z | 2022-01-04T21:30:05.000Z | tests/functional/desktop/test_rewrites.py | navgurukul-shivani18/kitsune | a7cf49ab1bfcf4e770938116968824b2b0fa5bb1 | [
"BSD-3-Clause"
] | 3 | 2020-06-14T06:59:46.000Z | 2020-06-15T14:45:56.000Z | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
import requests
import urllib
@pytest.mark.nondestructive
class TestRedirects:
_user_agent_firefox ... | 46.928571 | 99 | 0.643582 |
4a10af1f74245a1d6e19961d51179b0d95c79e44 | 18,095 | py | Python | gammapy/modeling/models/temporal.py | AtreyeeS/gammapy | a3b47c3da08900a833f0360e0374203e054cadfc | [
"BSD-3-Clause"
] | null | null | null | gammapy/modeling/models/temporal.py | AtreyeeS/gammapy | a3b47c3da08900a833f0360e0374203e054cadfc | [
"BSD-3-Clause"
] | null | null | null | gammapy/modeling/models/temporal.py | AtreyeeS/gammapy | a3b47c3da08900a833f0360e0374203e054cadfc | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Time-dependent models."""
import numpy as np
import scipy.interpolate
from astropy import units as u
from astropy.table import Table
from astropy.time import Time
from astropy.utils import lazyproperty
from gammapy.modeling import Parameter
from gammapy... | 31.252159 | 116 | 0.596795 |
4a10af957a1bdf1d3d44d6ce183d3e93f9043d12 | 1,468 | py | Python | scripts/tests/chiptest/__init__.py | hakanjansson/connectedhomeip | 980e1770075e5209d719693bb2e70d1966e4949f | [
"Apache-2.0"
] | 1 | 2022-02-21T08:33:37.000Z | 2022-02-21T08:33:37.000Z | scripts/tests/chiptest/__init__.py | hakanjansson/connectedhomeip | 980e1770075e5209d719693bb2e70d1966e4949f | [
"Apache-2.0"
] | null | null | null | scripts/tests/chiptest/__init__.py | hakanjansson/connectedhomeip | 980e1770075e5209d719693bb2e70d1966e4949f | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021 Project CHIP 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 applica... | 29.36 | 78 | 0.694823 |
4a10afc4e66c8e49bc1f1709cf665ad65fb185dc | 4,754 | py | Python | migrate.py | afit/rimworld-save-migrator | a142dcef807e58a471b8bd840e4c4416ced73173 | [
"MIT"
] | 3 | 2018-07-02T23:36:52.000Z | 2019-01-21T17:16:35.000Z | migrate.py | afit/rimworld-save-migrator | a142dcef807e58a471b8bd840e4c4416ced73173 | [
"MIT"
] | null | null | null | migrate.py | afit/rimworld-save-migrator | a142dcef807e58a471b8bd840e4c4416ced73173 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
from os.path import exists, join, dirname
from importlib import import_module
from util.exceptions import MisformedSaveError
from util.filesystem import get_saves, get_save_path, get_path_from_name
from util.saves import Save
def migrate():
if len(sys.argv) > 1:
save_name = ... | 34.449275 | 163 | 0.57846 |
4a10b18ff44a90fb0309537e2f4e5bc34eed3cbd | 3,916 | py | Python | main_test.py | msaperst/photobooth | 120147f50b802df84b59caf7729976202b90191e | [
"Apache-2.0"
] | null | null | null | main_test.py | msaperst/photobooth | 120147f50b802df84b59caf7729976202b90191e | [
"Apache-2.0"
] | null | null | null | main_test.py | msaperst/photobooth | 120147f50b802df84b59caf7729976202b90191e | [
"Apache-2.0"
] | null | null | null | import unittest
from main import *
def clean_up():
if os.path.exists(imageQueue):
shutil.rmtree(imageQueue)
if os.path.exists(imageStore):
shutil.rmtree(imageStore)
if os.path.exists(imageBackup):
shutil.rmtree(imageBackup)
class MainTest(unittest.TestCase):
def setUp(self)... | 33.186441 | 89 | 0.621808 |
4a10b24b84675989de5888c4c9dcead1440562b9 | 11,853 | py | Python | virtual/lib/python3.6/site-packages/PIL/IcnsImagePlugin.py | kenmutuma001/galleria | 1bbb9fbd3ca8bf7a030dbcbcbd1674d392055d72 | [
"Unlicense"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | venv/lib/python3.7/site-packages/PIL/IcnsImagePlugin.py | haideraltahan/CropMe | 75a111b9d3b2c50c6f2a9a36d21432053f02284d | [
"MIT"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | virtual/lib/python3.6/site-packages/PIL/IcnsImagePlugin.py | ngishjonathan/gallery | dd67f28887316d6277927c667f6641d26317b0b8 | [
"MIT"
] | 64 | 2018-04-25T08:51:57.000Z | 2022-01-29T14:13:57.000Z | #
# The Python Imaging Library.
# $Id$
#
# macOS icns file decoder, based on icns.py by Bob Ippolito.
#
# history:
# 2004-10-09 fl Turned into a PIL plugin; removed 2.3 dependencies.
#
# Copyright (c) 2004 by Bob Ippolito.
# Copyright (c) 2004 by Secret Labs.
# Copyright (c) 2004 by Fredrik Lundh.
# Copyright (c) 201... | 29.781407 | 78 | 0.545347 |
4a10b439da4a083603296fd82c22cba3cdc76b7f | 430 | py | Python | lib/MotifEnsemble/Utils/MakeNewReport.py | arwyer/MotifEnsemble | 9a003d8a874ecaa9b9cc492495c2f29d09266535 | [
"MIT"
] | 1 | 2019-07-20T05:53:22.000Z | 2019-07-20T05:53:22.000Z | lib/MotifEnsemble/Utils/MakeNewReport.py | man4ish/MotifEnsemble | cf68e01a82bd3b1fa524ca5370763c82b222d0d3 | [
"MIT"
] | 1 | 2019-07-08T17:48:12.000Z | 2019-07-08T17:48:49.000Z | lib/MotifEnsemble/Utils/MakeNewReport.py | man4ish/MotifEnsemble | cf68e01a82bd3b1fa524ca5370763c82b222d0d3 | [
"MIT"
] | 1 | 2019-01-08T15:48:11.000Z | 2019-01-08T15:48:11.000Z | import json
import sys
import os
class MakeNewReport:
def __init__(self):
pass
def MakeReport(self, htmlDir, motifSet):
reportPath = '/kb/module/lib/MotifEnsemble/Utils/Report/*'
CopyCommand = 'cp -r ' + reportPath + ' ' + htmlDir
os.system(CopyCommand)
jsonFName = htmlDir + '/Report... | 25.294118 | 64 | 0.655814 |
4a10b483abececa748eda7041a0e19fe8a0b1fac | 706 | py | Python | music_library/migrations/0002_instrument.py | loictessier/weborchestra | 80a7d8e3d94b84df65e8ecc52ea8b5cd200204e0 | [
"MIT"
] | null | null | null | music_library/migrations/0002_instrument.py | loictessier/weborchestra | 80a7d8e3d94b84df65e8ecc52ea8b5cd200204e0 | [
"MIT"
] | 4 | 2020-12-15T11:13:59.000Z | 2021-06-10T20:28:54.000Z | music_library/migrations/0002_instrument.py | loictessier/weborchestra | 80a7d8e3d94b84df65e8ecc52ea8b5cd200204e0 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.9 on 2020-12-12 15:15
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('music_library', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Instrument',
... | 30.695652 | 127 | 0.621813 |
4a10b5ec7d423a992575382378affffbcc16125d | 21,402 | py | Python | infoblox_client/object_manager.py | Maciejzzzz/infoblox-client | 2efaf4b92fb077af28a2f5e44b88b6083efaa084 | [
"Apache-2.0"
] | 108 | 2015-11-13T14:39:00.000Z | 2022-03-29T15:47:35.000Z | infoblox_client/object_manager.py | Maciejzzzz/infoblox-client | 2efaf4b92fb077af28a2f5e44b88b6083efaa084 | [
"Apache-2.0"
] | 286 | 2015-10-24T07:29:44.000Z | 2022-03-22T01:09:55.000Z | infoblox_client/object_manager.py | Maciejzzzz/infoblox-client | 2efaf4b92fb077af28a2f5e44b88b6083efaa084 | [
"Apache-2.0"
] | 98 | 2015-09-24T14:34:53.000Z | 2022-03-16T14:00:13.000Z | # Copyright 2015 Infoblox Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 44.310559 | 79 | 0.517382 |
4a10b63b4e8a9efbada0c30c59be8b75c9e0b918 | 2,568 | py | Python | shellstreaming/core/partitioned_batch_queue.py | laysakura/shellstreaming | a1e34af507b94d51ba588ad4a039ce0115b46475 | [
"Apache-2.0"
] | 1 | 2015-10-04T10:03:27.000Z | 2015-10-04T10:03:27.000Z | shellstreaming/core/partitioned_batch_queue.py | laysakura/shellstreaming | a1e34af507b94d51ba588ad4a039ce0115b46475 | [
"Apache-2.0"
] | null | null | null | shellstreaming/core/partitioned_batch_queue.py | laysakura/shellstreaming | a1e34af507b94d51ba588ad4a039ce0115b46475 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
shellstreaming.core.partitioned_batch_queue
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:synopsis:
"""
# standard modules
import threading
# 3rd party modules
import pyhashxx
# my modules
from shellstreaming.core.batch import Batch
from shellstreaming.core.batch_queue import B... | 28.533333 | 95 | 0.574377 |
4a10b672d508b3e1d0a09ba2042522ddeae35724 | 3,001 | py | Python | old/qt/ml.py | blanpa/Machine_Learning_Demonstrator | d0bce6e55e0ee879fae05c2bced93ec19ecda028 | [
"MIT"
] | null | null | null | old/qt/ml.py | blanpa/Machine_Learning_Demonstrator | d0bce6e55e0ee879fae05c2bced93ec19ecda028 | [
"MIT"
] | null | null | null | old/qt/ml.py | blanpa/Machine_Learning_Demonstrator | d0bce6e55e0ee879fae05c2bced93ec19ecda028 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'qt\ml.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_machinelearning(object):
def setupUi(self, machinelearning):
m... | 45.469697 | 83 | 0.710763 |
4a10b86615ed0ae9282aba7bc0b2cd719879f5d9 | 8,009 | py | Python | deps/v8/tools/push-to-trunk/bump_up_version.py | dberesford/io.js | 560c82fb8340903d958d99175aa206e826d04df6 | [
"Artistic-2.0"
] | 78 | 2016-03-03T02:27:35.000Z | 2022-01-18T14:11:25.000Z | tools/push-to-trunk/bump_up_version.py | realjade/v8 | f0c9cc0bbfd461c7f516799d9a58e9a7395f737e | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 479 | 2016-02-10T00:21:41.000Z | 2020-11-26T09:40:03.000Z | tools/push-to-trunk/bump_up_version.py | realjade/v8 | f0c9cc0bbfd461c7f516799d9a58e9a7395f737e | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 16 | 2016-04-15T05:02:23.000Z | 2020-03-04T16:26:01.000Z | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Script for auto-increasing the version on bleeding_edge.
The script can be run regularly by a cron job. It will increase the bui... | 31.908367 | 79 | 0.677613 |
4a10b8d7fe8f97292e24927f64fd8083704d17e2 | 1,916 | py | Python | synth.py | vam-google/python-texttospeech | 5d5f6b4f408958b5602e72030ebb4d05fde5a968 | [
"Apache-2.0"
] | null | null | null | synth.py | vam-google/python-texttospeech | 5d5f6b4f408958b5602e72030ebb4d05fde5a968 | [
"Apache-2.0"
] | null | null | null | synth.py | vam-google/python-texttospeech | 5d5f6b4f408958b5602e72030ebb4d05fde5a968 | [
"Apache-2.0"
] | null | null | null | # 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 36.846154 | 88 | 0.600731 |
4a10b940d175d8ae292a4891f4eff6576a17e131 | 1,233 | py | Python | docs/conf.py | jdhodges/trackfilter | fff52cc2a99392519846340a30992da2c5de4a80 | [
"MIT"
] | null | null | null | docs/conf.py | jdhodges/trackfilter | fff52cc2a99392519846340a30992da2c5de4a80 | [
"MIT"
] | null | null | null | docs/conf.py | jdhodges/trackfilter | fff52cc2a99392519846340a30992da2c5de4a80 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.... | 25.6875 | 72 | 0.67721 |
4a10b9ad1182ad6c90ea8b3cc58f6803341e6990 | 5,015 | py | Python | pyocd/target/builtin/target_HC32L07x.py | Kris-b50122/pyOCD | df605c7aa04d72c5187ab652445063cc232cf378 | [
"Apache-2.0"
] | 3 | 2019-06-05T01:32:06.000Z | 2020-05-20T08:55:46.000Z | pyocd/target/builtin/target_HC32L07x.py | Kris-b50122/pyOCD | df605c7aa04d72c5187ab652445063cc232cf378 | [
"Apache-2.0"
] | 1 | 2019-07-05T10:13:09.000Z | 2019-07-05T10:51:43.000Z | pyocd/target/builtin/target_HC32L07x.py | Kris-b50122/pyOCD | df605c7aa04d72c5187ab652445063cc232cf378 | [
"Apache-2.0"
] | 1 | 2019-01-21T03:01:53.000Z | 2019-01-21T03:01:53.000Z | # pyOCD debugger
# Copyright (c) 2019 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# ... | 40.443548 | 99 | 0.722632 |
4a10ba7b3b184f9369d3ba3bc47ae150b33cb234 | 2,650 | py | Python | gamedb/settings.py | mammawhy9/gamedb | bc9945dece1f3eb53157fc95c031a8da6425c546 | [
"MIT"
] | 1 | 2016-10-13T16:47:08.000Z | 2016-10-13T16:47:08.000Z | gamedb/settings.py | mammawhy9/gamedb | bc9945dece1f3eb53157fc95c031a8da6425c546 | [
"MIT"
] | null | null | null | gamedb/settings.py | mammawhy9/gamedb | bc9945dece1f3eb53157fc95c031a8da6425c546 | [
"MIT"
] | null | null | null | """
Django settings for gamedb project.
Generated by 'django-admin startproject' using Django 1.8.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths... | 25.480769 | 71 | 0.698113 |
4a10ba858c26a3d757443b16c303d30676591b21 | 159 | py | Python | compiled/construct/process_custom_no_args.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 4 | 2017-04-08T12:55:11.000Z | 2020-12-05T21:09:31.000Z | compiled/construct/process_custom_no_args.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 7 | 2018-04-23T01:30:33.000Z | 2020-10-30T23:56:14.000Z | compiled/construct/process_custom_no_args.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 6 | 2017-04-08T11:41:14.000Z | 2020-10-30T22:47:31.000Z | from construct import *
from construct.lib import *
process_custom_no_args = Struct(
'buf' / FixedSized(5, GreedyBytes),
)
_schema = process_custom_no_args
| 17.666667 | 36 | 0.773585 |
4a10bafbcd65b5a1d2aec273f60fde29a7d7ab8c | 7,734 | py | Python | tests/test_esrgan.py | drcut/mmediting | e7f13f16dc63f1698d819248ed045983b35c0dbe | [
"Apache-2.0"
] | 1 | 2021-04-30T23:08:16.000Z | 2021-04-30T23:08:16.000Z | tests/test_esrgan.py | drcut/mmediting | e7f13f16dc63f1698d819248ed045983b35c0dbe | [
"Apache-2.0"
] | null | null | null | tests/test_esrgan.py | drcut/mmediting | e7f13f16dc63f1698d819248ed045983b35c0dbe | [
"Apache-2.0"
] | null | null | null | from unittest.mock import patch
import torch
from mmcv.runner import obj_from_dict
from mmedit.models import build_model
from mmedit.models.backbones import MSRResNet
from mmedit.models.components import ModifiedVGG
from mmedit.models.losses import GANLoss, L1Loss
def test_esrgan():
model_cfg = dict(
ty... | 40.705263 | 78 | 0.600853 |
4a10bb7b3a4603395fed238c01d27660517b83af | 5,764 | py | Python | flink-python/pyflink/datastream/tests/test_check_point_config.py | sbairos/flink | 0799b5c20a127110e47439668cf8f8db2e4ecbf3 | [
"Apache-2.0"
] | 4 | 2020-05-28T03:36:05.000Z | 2022-02-22T13:46:05.000Z | flink-python/pyflink/datastream/tests/test_check_point_config.py | sbairos/flink | 0799b5c20a127110e47439668cf8f8db2e4ecbf3 | [
"Apache-2.0"
] | 37 | 2020-06-25T08:23:56.000Z | 2020-12-28T02:18:37.000Z | flink-python/pyflink/datastream/tests/test_check_point_config.py | sbairos/flink | 0799b5c20a127110e47439668cf8f8db2e4ecbf3 | [
"Apache-2.0"
] | 5 | 2019-11-11T01:22:27.000Z | 2021-11-22T08:37:30.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... | 41.768116 | 99 | 0.740285 |
4a10bb921a624f8d331590a97ace6627aae79f17 | 103 | py | Python | Grid/__init__.py | Jack12xl/a-toy-fluid-engine | 45ce4007ce6e804dcfdee8da307e131c9c3e7c7d | [
"MIT"
] | 21 | 2020-09-17T10:51:55.000Z | 2022-03-15T20:27:00.000Z | Grid/__init__.py | Jack12xl/a-toy-fluid-engine | 45ce4007ce6e804dcfdee8da307e131c9c3e7c7d | [
"MIT"
] | 8 | 2020-09-18T08:52:34.000Z | 2021-02-07T09:27:49.000Z | Grid/__init__.py | Jack12xl/myFluid | 45ce4007ce6e804dcfdee8da307e131c9c3e7c7d | [
"MIT"
] | 1 | 2020-09-20T11:10:35.000Z | 2020-09-20T11:10:35.000Z | from .Grid import GRIDTYPE, Grid
from .FaceGrid import *
from .CellGrid import *
from .Sampler import * | 25.75 | 32 | 0.76699 |
4a10bbeb47f4cc557828209f99ea00462c6eaa00 | 309 | py | Python | sdk/identity/azure-identity/tests/perfstress_tests/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/identity/azure-identity/tests/perfstress_tests/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/identity/azure-identity/tests/perfstress_tests/__init__.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for
# license information.
# -------------------------------------------------------------------------
| 51.5 | 75 | 0.398058 |
4a10bc10d49e9905ae56e8a2967e0d350dd4ed32 | 1,692 | py | Python | boto3_type_annotations/boto3_type_annotations/resource_groups/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 119 | 2018-12-01T18:20:57.000Z | 2022-02-02T10:31:29.000Z | boto3_type_annotations/boto3_type_annotations/resource_groups/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 15 | 2018-11-16T00:16:44.000Z | 2021-11-13T03:44:18.000Z | boto3_type_annotations/boto3_type_annotations/resource_groups/client.py | cowboygneox/boto3_type_annotations | 450dce1de4e066b939de7eac2ec560ed1a7ddaa2 | [
"MIT"
] | 11 | 2019-05-06T05:26:51.000Z | 2021-09-28T15:27:59.000Z | from typing import Optional
from botocore.client import BaseClient
from typing import Dict
from typing import Union
from botocore.paginate import Paginator
from botocore.waiter import Waiter
from typing import List
class Client(BaseClient):
def can_paginate(self, operation_name: str = None):
pass
def... | 29.172414 | 131 | 0.655437 |
4a10bd9cf8eb9eba28cce625ed9c1fe59245238a | 1,389 | py | Python | python.py | LiamJHealy/LiamJHealy.github.io | 8a8b6e524f3c5ff2895e7141dee9dccab3358849 | [
"MIT"
] | null | null | null | python.py | LiamJHealy/LiamJHealy.github.io | 8a8b6e524f3c5ff2895e7141dee9dccab3358849 | [
"MIT"
] | null | null | null | python.py | LiamJHealy/LiamJHealy.github.io | 8a8b6e524f3c5ff2895e7141dee9dccab3358849 | [
"MIT"
] | null | null | null | graph = {
'A' : ['B','C'],
'B' : ['D', 'E'],
'C' : ['F'],
'D' : [],
'E' : [],
'F' : []
}
visited = set()
def dfs_no_recursive(visited, graph, node):
stack = [node]
while(len(stack) > 0):
s = stack.pop()
if s not in visited:
print(s)
visited.a... | 19.027397 | 62 | 0.550756 |
4a10be6f71f49441bab403caab4143460bf9a84b | 6,396 | py | Python | tests/sparseml/pytorch/sparsification/pruning/test_modifier_pruning_movement.py | anmarques/sparseml | c8352f1d896bfb1258add4e563d8163d3702b5ef | [
"Apache-2.0"
] | null | null | null | tests/sparseml/pytorch/sparsification/pruning/test_modifier_pruning_movement.py | anmarques/sparseml | c8352f1d896bfb1258add4e563d8163d3702b5ef | [
"Apache-2.0"
] | null | null | null | tests/sparseml/pytorch/sparsification/pruning/test_modifier_pruning_movement.py | anmarques/sparseml | c8352f1d896bfb1258add4e563d8163d3702b5ef | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 33.84127 | 86 | 0.678862 |
4a10be719a72df5beb4e7571367c2983db8ff7a2 | 4,920 | py | Python | Layer.py | NCTUMLlab/Si-Xun-Luo-Self-Supervised_Learning_for_Online_SpeakerDiarization | d4b22d55ab8d366235675a54c508c86d5eb28cd5 | [
"MIT"
] | null | null | null | Layer.py | NCTUMLlab/Si-Xun-Luo-Self-Supervised_Learning_for_Online_SpeakerDiarization | d4b22d55ab8d366235675a54c508c86d5eb28cd5 | [
"MIT"
] | 1 | 2021-04-09T09:38:24.000Z | 2021-04-09T09:38:24.000Z | Layer.py | NCTUMLlab/Si-Xun-Luo-Self-Supervised_Learning_for_Online_SpeakerDiarization | d4b22d55ab8d366235675a54c508c86d5eb28cd5 | [
"MIT"
] | 2 | 2021-07-07T15:54:06.000Z | 2022-02-01T20:36:59.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
class TDNN(nn.Module):
def __init__(
self,
input_dim=23,
output_dim=512,
context_size=5,
stride=1,
dilation=1,
... | 30.37037 | 116 | 0.564024 |
4a10bf985c80ef2033b7946b6ff0c5cf143f1254 | 3,483 | py | Python | salt/returners/mongo_future_return.py | d--j/salt | 579f900be67a80e1a77674bc6aa21fec836c1c4c | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:56.000Z | 2021-03-08T18:59:46.000Z | salt/returners/mongo_future_return.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | salt/returners/mongo_future_return.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | 1 | 2020-03-07T07:04:55.000Z | 2020-03-07T07:04:55.000Z | '''
Return data to a mongodb server
Required python modules: pymongo
This returner will send data from the minions to a MongoDB server. To
configure the settings for your MongoDB server, add the following lines
to the minion config files::
mongo.db: <database name>
mongo.host: <server ip address>
mongo.... | 21.63354 | 78 | 0.589147 |
4a10c0369302d3bdcfc5b8393f2e2f10c95309ab | 3,286 | py | Python | monai/metrics/compute_meandice.py | HastingsGreer/MONAI | 5e12c5d52638b2e434e212819452775f67cbb0de | [
"Apache-2.0"
] | 1 | 2020-11-05T09:53:14.000Z | 2020-11-05T09:53:14.000Z | monai/metrics/compute_meandice.py | HastingsGreer/MONAI | 5e12c5d52638b2e434e212819452775f67cbb0de | [
"Apache-2.0"
] | null | null | null | monai/metrics/compute_meandice.py | HastingsGreer/MONAI | 5e12c5d52638b2e434e212819452775f67cbb0de | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 MONAI Consortium
# 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, s... | 43.813333 | 113 | 0.66829 |
4a10c1ad3b41682eb2e8eacd5ecb932f5d79530a | 403 | py | Python | lims/addressbook/migrations/0002_auto_20180301_0958.py | sqilz/LIMS-Backend | b64e1fa512f89e4492803d44c6b8c35e4d4724cc | [
"MIT"
] | 12 | 2017-03-01T10:39:36.000Z | 2022-01-04T06:17:19.000Z | lims/addressbook/migrations/0002_auto_20180301_0958.py | sqilz/LIMS-Backend | b64e1fa512f89e4492803d44c6b8c35e4d4724cc | [
"MIT"
] | 29 | 2017-04-25T14:05:08.000Z | 2021-06-21T14:41:53.000Z | lims/addressbook/migrations/0002_auto_20180301_0958.py | sqilz/LIMS-Backend | b64e1fa512f89e4492803d44c6b8c35e4d4724cc | [
"MIT"
] | 4 | 2017-10-11T16:22:53.000Z | 2021-02-23T15:45:21.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2018-03-01 09:58
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('addressbook', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
... | 20.15 | 48 | 0.600496 |
4a10c21fc321cdc23bea718de7ef2a5d7a901504 | 5,764 | py | Python | torchgeo/datasets/resisc45.py | GIShkl/GAOFEN2021_CHANGEDETECTION | 5b7251cb1e951a04c7effacab6c1233232158472 | [
"MIT"
] | 3 | 2021-12-12T09:45:41.000Z | 2022-03-10T08:34:22.000Z | torchgeo/datasets/resisc45.py | lyp19/GAOFEN2021_CHANGEDETECTION | 5b7251cb1e951a04c7effacab6c1233232158472 | [
"MIT"
] | null | null | null | torchgeo/datasets/resisc45.py | lyp19/GAOFEN2021_CHANGEDETECTION | 5b7251cb1e951a04c7effacab6c1233232158472 | [
"MIT"
] | 1 | 2021-11-13T05:40:18.000Z | 2021-11-13T05:40:18.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""RESISC45 dataset."""
import os
from typing import Callable, Dict, Optional, Tuple
import numpy as np
import torch
from torch import Tensor
from torchvision.datasets import ImageFolder
from .geo import VisionDataset
from... | 27.578947 | 86 | 0.618668 |
4a10c462dc41d8922eab29aeb8642f8546f9f6ab | 3,687 | py | Python | language-modeling/fast_transformers/attention/local_attention.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 5 | 2021-11-06T16:10:31.000Z | 2021-12-25T19:47:42.000Z | language-modeling/fast_transformers/attention/.ipynb_checkpoints/local_attention-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | null | null | null | language-modeling/fast_transformers/attention/.ipynb_checkpoints/local_attention-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 2 | 2021-11-30T03:36:54.000Z | 2021-12-25T19:49:58.000Z | """Implement local context attention."""
from math import sqrt
import torch
from torch.nn import Module, Dropout
from torch.nn import functional as F
from ..attention_registry import AttentionRegistry, Optional, Int, Float, \
EventDispatcherInstance
from ..events import EventDispatcher
from ..local_product impor... | 38.010309 | 79 | 0.635476 |
4a10c4b902df028cdc6778cd5f4a39f7ff67add0 | 1,942 | py | Python | IOT/RaspberryPi/watch.py | syureu/Hellog2 | f61524ffe6f2a3836d13085e9e29e2015bba9f87 | [
"Apache-2.0"
] | null | null | null | IOT/RaspberryPi/watch.py | syureu/Hellog2 | f61524ffe6f2a3836d13085e9e29e2015bba9f87 | [
"Apache-2.0"
] | null | null | null | IOT/RaspberryPi/watch.py | syureu/Hellog2 | f61524ffe6f2a3836d13085e9e29e2015bba9f87 | [
"Apache-2.0"
] | null | null | null | import time
import os
import requests
try:
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
except ModuleNotFoundError as e:
print (e)
os.system("pip install watchdog")
class Handler(FileSystemEventHandler):
def on_created(self, event):
print (f'ev... | 30.34375 | 89 | 0.571061 |
4a10c5a608972d4f28a7e37b6d725af299a900e0 | 474 | py | Python | website/migrations/0005_about_us_video.py | munisisazade/demo_programs | ec80b6f7eb0161c124d0512f5075779714726b2d | [
"MIT"
] | null | null | null | website/migrations/0005_about_us_video.py | munisisazade/demo_programs | ec80b6f7eb0161c124d0512f5075779714726b2d | [
"MIT"
] | null | null | null | website/migrations/0005_about_us_video.py | munisisazade/demo_programs | ec80b6f7eb0161c124d0512f5075779714726b2d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-13 22:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('website', '0004_auto_20170414_0230'),
]
operations = [
migrations.AddField(... | 22.571429 | 74 | 0.622363 |
4a10c5ca70a1c93a79e13deb6132b6702bb8053a | 14,191 | py | Python | feature_examples/pytorch/octconv/octconv_example.py | Paperspace/tutorials | 8e20ffb687080c44e75dabea594d2b57acc53713 | [
"MIT"
] | null | null | null | feature_examples/pytorch/octconv/octconv_example.py | Paperspace/tutorials | 8e20ffb687080c44e75dabea594d2b57acc53713 | [
"MIT"
] | null | null | null | feature_examples/pytorch/octconv/octconv_example.py | Paperspace/tutorials | 8e20ffb687080c44e75dabea594d2b57acc53713 | [
"MIT"
] | 1 | 2022-02-25T12:07:16.000Z | 2022-02-25T12:07:16.000Z | # Copyright (c) 2021 Graphcore Ltd. All rights reserved.
import argparse
from tqdm import tqdm
import os
import sys
import json
import torch
import torch.nn as nn
import torchvision
import poptorch
import popart
import torch.optim as optim
import octconv
def cifar10(data_dir, train=True):
"""
Get the normali... | 34.360775 | 155 | 0.599817 |
4a10c6a238c303fca6befe8bef7a66675db39977 | 29,361 | py | Python | chb/simulation/SimulationState.py | sipma/CodeHawk-Binary | 3d4a0c2958266571f8f660cb48f29339b253c07f | [
"MIT"
] | null | null | null | chb/simulation/SimulationState.py | sipma/CodeHawk-Binary | 3d4a0c2958266571f8f660cb48f29339b253c07f | [
"MIT"
] | null | null | null | chb/simulation/SimulationState.py | sipma/CodeHawk-Binary | 3d4a0c2958266571f8f660cb48f29339b253c07f | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# CodeHawk Binary Analyzer
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2016-2020 Kestrel Technology LLC
# Copyright (c) 2020 Henny Si... | 33.904157 | 93 | 0.565274 |
4a10c6af6f00d1fbef221397bb0f2553d1e966c5 | 4,251 | py | Python | server/catgenome/demo_scripts/reg_file.py | ismael-dev88/NGB | 7d5e74489968d3ec6edfbf65e1599b982d49141c | [
"MIT"
] | 1 | 2017-08-22T09:42:22.000Z | 2017-08-22T09:42:22.000Z | server/catgenome/demo_scripts/reg_file.py | react-dev26/NGB-master | b3646f92d7d9802d5bb83ac4b7a59031b2fe71a7 | [
"MIT"
] | null | null | null | server/catgenome/demo_scripts/reg_file.py | react-dev26/NGB-master | b3646f92d7d9802d5bb83ac4b7a59031b2fe71a7 | [
"MIT"
] | null | null | null | import requests
import json
import argparse
import sys
import os.path
import urlparse
import urllib
base_url = "http://localhost:8080/catgenome/restapi/{0}/register"
file_types = {
'vcf': "vcf",
'vcf.gz': "vcf",
'gff': "gene",
'gtf': "gene",
'gff.gz': "gene",
'gtf.gz': "gene",
'gff3': "gene",
'gff3.gz': "gene"... | 28.530201 | 133 | 0.677252 |
4a10c85975d5f31fb10a2d9a2829f3c553104c4a | 8,214 | py | Python | registry.py | oleksandr-k12/ua-ownership-registry-parser | 0110d5180e24f2ea5a7673b2dbfccd4abd615083 | [
"MIT"
] | null | null | null | registry.py | oleksandr-k12/ua-ownership-registry-parser | 0110d5180e24f2ea5a7673b2dbfccd4abd615083 | [
"MIT"
] | null | null | null | registry.py | oleksandr-k12/ua-ownership-registry-parser | 0110d5180e24f2ea5a7673b2dbfccd4abd615083 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyparsing import *
import os.path
import re,sys
import csv
import settings
unicodePrintables = ''.join(chr(c) for c in range(sys.maxunicode) if not chr(c).isspace())
area_regex = r"Загальна площа \(кв\.м\)\: (\d{1,2}[\.,]?\d?)"
apart_num_regex=r"квартира... | 41.276382 | 244 | 0.711833 |
4a10c91ca2e0e2b0f075142f066f9d1fbb2339cf | 141 | py | Python | pattern/7.py | itspuneet/itspuneet | d44f78afcff275aa56f03bba738ac3e4f2c30843 | [
"bzip2-1.0.6"
] | null | null | null | pattern/7.py | itspuneet/itspuneet | d44f78afcff275aa56f03bba738ac3e4f2c30843 | [
"bzip2-1.0.6"
] | null | null | null | pattern/7.py | itspuneet/itspuneet | d44f78afcff275aa56f03bba738ac3e4f2c30843 | [
"bzip2-1.0.6"
] | null | null | null | for i in range(5):
for j in range(4-i):
print(' ',end='')
for j in range(2*i+1):
print('*',end='')
print()
| 20.142857 | 27 | 0.425532 |
4a10c9733d178760c0444b0a93779322fc838422 | 23,329 | py | Python | exemplos/exemplo1/blockly/build.py | danihalls/propesq | 77fb62896215ffa4a2500e1fc6d53feeb004f03d | [
"MIT"
] | null | null | null | exemplos/exemplo1/blockly/build.py | danihalls/propesq | 77fb62896215ffa4a2500e1fc6d53feeb004f03d | [
"MIT"
] | null | null | null | exemplos/exemplo1/blockly/build.py | danihalls/propesq | 77fb62896215ffa4a2500e1fc6d53feeb004f03d | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
# Compresses the core Blockly files into a single JavaScript file.
#
# Copyright 2012 Google Inc.
# https://developers.google.com/blockly/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy o... | 37.08903 | 158 | 0.646277 |
4a10ca83bd67f685eee9e2eae6116527b2664310 | 24,426 | py | Python | src/issues/migrations/0027_auto__add_field_proposalvoteargumentranking_user.py | ofirr/OpenCommunity | 7786ac2996530af8f545f4398c071793c73634c8 | [
"BSD-3-Clause"
] | null | null | null | src/issues/migrations/0027_auto__add_field_proposalvoteargumentranking_user.py | ofirr/OpenCommunity | 7786ac2996530af8f545f4398c071793c73634c8 | [
"BSD-3-Clause"
] | null | null | null | src/issues/migrations/0027_auto__add_field_proposalvoteargumentranking_user.py | ofirr/OpenCommunity | 7786ac2996530af8f545f4398c071793c73634c8 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'ProposalVoteArgumentRanking.user'
db.add_column(u'issues_proposalvoteargumentranking', 'user... | 89.472527 | 235 | 0.580406 |
4a10cb201725257dc5b5bb2c60ab6aa2c699f5c0 | 3,255 | py | Python | app/views.py | DFilyushin/librusec | fd6d7a99037aac4c1112f648397830284f4165f9 | [
"Apache-2.0"
] | 2 | 2017-12-14T11:50:16.000Z | 2021-12-27T13:42:16.000Z | app/views.py | DFilyushin/librusec | fd6d7a99037aac4c1112f648397830284f4165f9 | [
"Apache-2.0"
] | null | null | null | app/views.py | DFilyushin/librusec | fd6d7a99037aac4c1112f648397830284f4165f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import time
from app import librusec
from flask import render_template, request, abort, send_file, g
from models import Authors, Books, Genre
from readlib import extract_book
RUSSIAN_LETTERS = u'АБВГДЕЖЗИКЛМНОПРСТУФХЦЧШЩЭЮЯ'
def get_author_by_id(id_author):
author = Authors.quer... | 28.304348 | 112 | 0.642089 |
4a10cb46f6c287d3fd6044431f36648f16095773 | 3,204 | py | Python | train_emotion.py | cuciureansergiu/facial_emotion | 944416d1c2958c1e44fec2337acaf8e495ba8923 | [
"MIT"
] | null | null | null | train_emotion.py | cuciureansergiu/facial_emotion | 944416d1c2958c1e44fec2337acaf8e495ba8923 | [
"MIT"
] | null | null | null | train_emotion.py | cuciureansergiu/facial_emotion | 944416d1c2958c1e44fec2337acaf8e495ba8923 | [
"MIT"
] | 1 | 2021-01-15T14:12:02.000Z | 2021-01-15T14:12:02.000Z | from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
from sklearn import datasets, svm, metrics
from matplotlib.pyplot import imread
from fnmatch import fnmatch as match
from zipfile import ZipFile
from util import rgb2gray
from cv2 import resize
import wget, os, re
from hog... | 31.411765 | 97 | 0.662921 |
4a10cc7d02edddd296b56c9e78aaa00d6401fcc4 | 3,423 | py | Python | rcsb/exdb/seq/LigandNeighborMappingExtractor.py | rcsb/py-rcsb_exdb | 79fc3fd7d3c5909d9e138eb633378f9f8bf0ee5d | [
"Apache-2.0"
] | null | null | null | rcsb/exdb/seq/LigandNeighborMappingExtractor.py | rcsb/py-rcsb_exdb | 79fc3fd7d3c5909d9e138eb633378f9f8bf0ee5d | [
"Apache-2.0"
] | 1 | 2022-02-10T14:31:03.000Z | 2022-02-21T22:06:42.000Z | rcsb/exdb/seq/LigandNeighborMappingExtractor.py | rcsb/py-rcsb_exdb | 79fc3fd7d3c5909d9e138eb633378f9f8bf0ee5d | [
"Apache-2.0"
] | 3 | 2020-12-03T17:26:23.000Z | 2020-12-03T17:26:48.000Z | ##
# File: LigandNeighborMappingExtractor.py
# Date: 28-Jun-2021 jdw
#
# Utilities to extract ligand neighbor mapping details from the exchange collections.
#
# Updates:
#
##
__docformat__ = "google en"
__author__ = "John Westbrook"
__email__ = "jwest@rcsb.rutgers.edu"
__license__ = "Apache 2.0"
import logging
from ... | 40.270588 | 105 | 0.595968 |
4a10ccf7354625e6145ca9834092f260db3077a2 | 139 | py | Python | src/_data/data_generator.py | aerotog/sorts | a9ccc8425cf6d155d16cf275bf7e4e5512e68e49 | [
"MIT"
] | null | null | null | src/_data/data_generator.py | aerotog/sorts | a9ccc8425cf6d155d16cf275bf7e4e5512e68e49 | [
"MIT"
] | null | null | null | src/_data/data_generator.py | aerotog/sorts | a9ccc8425cf6d155d16cf275bf7e4e5512e68e49 | [
"MIT"
] | null | null | null | def main():
# TODO Create autogenerated unsorted and sorted int list?
print('HELLO WORLD')
if __name__ == "__main__":
main()
| 17.375 | 61 | 0.654676 |
4a10cd0b6f9d47984a88105bee275f06fbac7cf9 | 2,253 | py | Python | cvxpy/expressions/variables/semidef_var.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | 5 | 2017-08-31T01:37:00.000Z | 2022-03-24T04:23:09.000Z | cvxpy/expressions/variables/semidef_var.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | null | null | null | cvxpy/expressions/variables/semidef_var.py | quantopian/cvxpy | 7deee4d172470aa8f629dab7fead50467afa75ff | [
"Apache-2.0"
] | 6 | 2017-02-09T19:37:07.000Z | 2021-01-07T00:17:54.000Z | """
Copyright 2013 Steven Diamond, Eric Chu
This file is part of CVXPY.
CVXPY is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
CVXPY is dis... | 35.761905 | 79 | 0.699512 |
4a10cd352a9478cc5e60f5aab1ae65098dd621fb | 1,071 | py | Python | bims/tests/test_fish_form_views.py | Christiaanvdm/django-bims | f92a63156c711b2d53c5f8ea06867cd64cee9eb9 | [
"MIT"
] | null | null | null | bims/tests/test_fish_form_views.py | Christiaanvdm/django-bims | f92a63156c711b2d53c5f8ea06867cd64cee9eb9 | [
"MIT"
] | null | null | null | bims/tests/test_fish_form_views.py | Christiaanvdm/django-bims | f92a63156c711b2d53c5f8ea06867cd64cee9eb9 | [
"MIT"
] | null | null | null | # coding=utf-8
"""Tests for models."""
from django.test import TestCase, Client
from allauth.utils import get_user_model
from bims.tests.model_factories import (
LocationSiteF,
)
class TestFishFormView(TestCase):
""" Tests Fish Form View.
"""
def setUp(self):
"""
Sets up before each ... | 23.282609 | 51 | 0.549953 |
4a10cef7146700cd4cfba96bb2f8759dac74f298 | 1,374 | py | Python | tests/python/mkl/test_subgraph.py | leeesangwon/incubator-mxnet | 0514233103baff5e1581cf2057f561f7a36616c2 | [
"Apache-2.0"
] | 211 | 2016-06-06T08:32:36.000Z | 2021-07-03T16:50:16.000Z | tests/python/mkl/test_subgraph.py | leeesangwon/incubator-mxnet | 0514233103baff5e1581cf2057f561f7a36616c2 | [
"Apache-2.0"
] | 42 | 2017-01-05T02:45:13.000Z | 2020-08-11T23:45:27.000Z | tests/python/mkl/test_subgraph.py | leeesangwon/incubator-mxnet | 0514233103baff5e1581cf2057f561f7a36616c2 | [
"Apache-2.0"
] | 58 | 2016-10-27T07:37:08.000Z | 2021-07-03T16:50:17.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.35 | 68 | 0.695779 |
4a10cf34b8408dd29fb37942c42c5c24d8047da8 | 567 | py | Python | encoding/models/sseg/__init__.py | ruijieren98/DANet | e38d61e371179833c08888fd5a1ee444cf5bd875 | [
"MIT"
] | 2,190 | 2018-09-11T11:44:50.000Z | 2022-03-30T15:20:11.000Z | encoding/models/sseg/__init__.py | haoah316/DANet | 56a612ec1ed5c2573ebc8df04ad08475fbf13a52 | [
"MIT"
] | 138 | 2018-09-12T21:51:15.000Z | 2022-03-22T13:24:51.000Z | encoding/models/sseg/__init__.py | haoah316/DANet | 56a612ec1ed5c2573ebc8df04ad08475fbf13a52 | [
"MIT"
] | 531 | 2018-09-12T06:46:10.000Z | 2022-03-30T13:14:28.000Z | from .base import *
from .fcn import *
from .psp import *
from .fcfpn import *
from .atten import *
from .encnet import *
from .deeplab import *
from .upernet import *
from .dran import *
from .danet import *
def get_segmentation_model(name, **kwargs):
models = {
'fcn': get_fcn,
'psp': get_psp,
... | 22.68 | 43 | 0.604938 |
4a10d0244c55a7f931e4acdd8292b76cf230eaf4 | 4,901 | py | Python | lib/ansible/modules/network/solace/solace_topic.py | streetster/ansible-solace | ed802eee2b37a50e34973d89c420ed58f105d493 | [
"MIT"
] | 5 | 2019-07-02T10:58:51.000Z | 2020-05-28T21:23:47.000Z | lib/ansible/modules/network/solace/solace_topic.py | mkst/ansible-solace | ed802eee2b37a50e34973d89c420ed58f105d493 | [
"MIT"
] | 3 | 2019-07-14T10:06:32.000Z | 2020-05-25T09:42:49.000Z | lib/ansible/modules/network/solace/solace_topic.py | mkst/ansible-solace | ed802eee2b37a50e34973d89c420ed58f105d493 | [
"MIT"
] | 2 | 2019-07-02T11:34:19.000Z | 2020-04-06T15:54:15.000Z | #!/usr/bin/env python
# Copyright (c) 2019, Mark Street <mkst@protonmail.com>
# MIT License
"""Ansible-Solace Module for configuring Topics"""
import ansible.module_utils.network.solace.solace_utils as su
from ansible.module_utils.basic import AnsibleModule
ANSIBLE_METADATA = {
'metadata_version': '0.1.0',
'... | 29.70303 | 112 | 0.652316 |
4a10d1958299ef6601cfdc9c5f32d3e54839d185 | 311 | py | Python | automol/mult/_mult.py | snelliott/automol | d1f7d51c1bbe06ba7569ea7c75304618cebee198 | [
"Apache-2.0"
] | 2 | 2021-03-01T14:23:25.000Z | 2021-11-28T19:17:08.000Z | automol/mult/_mult.py | avcopan/autochem | 19d9b0402568170ae5ca0adecb460d36f258a9bd | [
"Apache-2.0"
] | 1 | 2021-02-12T21:02:22.000Z | 2021-02-12T21:35:33.000Z | automol/mult/_mult.py | avcopan/autochem | 19d9b0402568170ae5ca0adecb460d36f258a9bd | [
"Apache-2.0"
] | 7 | 2019-12-18T20:11:06.000Z | 2020-10-14T08:54:16.000Z | """ Calculate spins (2S) from spin multiplicities.
"""
def spin(mult):
""" Calculate the spin (2Ms) from using the spin multiplicity
which is equivalent to the number of unpaired electrons.
:param mult: multiplicity
:type mult: int
:rtype: int
"""
return mult - 1
| 22.214286 | 65 | 0.623794 |
4a10d1f7105b97c9f63dd46bb838943530fb62d3 | 3,136 | py | Python | generic_api/generics/client.py | guestready/generic_api | 4830995ec2f6ea77b1b3bff1d86d4152530b0942 | [
"BSD-2-Clause"
] | 1 | 2020-11-24T07:49:37.000Z | 2020-11-24T07:49:37.000Z | generic_api/generics/client.py | guestready/generic_api | 4830995ec2f6ea77b1b3bff1d86d4152530b0942 | [
"BSD-2-Clause"
] | null | null | null | generic_api/generics/client.py | guestready/generic_api | 4830995ec2f6ea77b1b3bff1d86d4152530b0942 | [
"BSD-2-Clause"
] | null | null | null | import json
import requests
class GenericClient:
session_class = None
errors_handler_class = None
retries_handler_class = None
def __init__(self, *args, **kwargs):
pass
def get_session_class(self, *args, **kwargs):
assert self.session_class is not None, (
"'%s' shoul... | 33.361702 | 94 | 0.651148 |
4a10d28c852a0f22b6e89ee68f58c481f59f9262 | 42,445 | py | Python | sdk/python/pulumi_aws/acmpca/certificate_authority.py | RafalSumislawski/pulumi-aws | 7c8a335d327c173aa32c8b3d98816e760db329fa | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-10T16:33:40.000Z | 2021-11-10T16:33:40.000Z | sdk/python/pulumi_aws/acmpca/certificate_authority.py | RafalSumislawski/pulumi-aws | 7c8a335d327c173aa32c8b3d98816e760db329fa | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/acmpca/certificate_authority.py | RafalSumislawski/pulumi-aws | 7c8a335d327c173aa32c8b3d98816e760db329fa | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 54.277494 | 456 | 0.693886 |
4a10d494acf3644366a1c341e0c6f706046f7c05 | 166 | py | Python | hlso/__init__.py | holtgrewe/clsify | ad5efecd1d0114898e10498434bded32840d9a4b | [
"MIT"
] | 19 | 2019-07-25T17:36:16.000Z | 2021-12-24T06:52:40.000Z | hlso/__init__.py | holtgrewe/clsify | ad5efecd1d0114898e10498434bded32840d9a4b | [
"MIT"
] | 31 | 2019-05-13T11:21:50.000Z | 2020-06-19T09:33:16.000Z | hlso/__init__.py | holtgrewe/clsify | ad5efecd1d0114898e10498434bded32840d9a4b | [
"MIT"
] | 2 | 2020-03-05T15:36:30.000Z | 2021-12-22T04:48:36.000Z | from ._version import get_versions as _get_versions
#: The application's version from versioneer.
__version__ = _get_versions()["version"]
del _get_versions # noqa
| 27.666667 | 51 | 0.795181 |
4a10d506cbc6f4894dd9ef097012de3ae6f88e18 | 33,718 | py | Python | stix_shifter_modules/darktrace/test/stix_translation/test_darktrace_stix_to_query.py | lakshmi51974368/stix-shifter | 36d71c172a5fc5b97d872e623753b0dd1bf4fe6c | [
"Apache-2.0"
] | 33 | 2018-05-25T17:07:28.000Z | 2019-09-30T10:08:53.000Z | stix_shifter_modules/darktrace/test/stix_translation/test_darktrace_stix_to_query.py | lakshmi51974368/stix-shifter | 36d71c172a5fc5b97d872e623753b0dd1bf4fe6c | [
"Apache-2.0"
] | 54 | 2018-06-01T18:17:24.000Z | 2019-09-30T18:36:15.000Z | stix_shifter_modules/darktrace/test/stix_translation/test_darktrace_stix_to_query.py | subbyte/stix-shifter | 36d71c172a5fc5b97d872e623753b0dd1bf4fe6c | [
"Apache-2.0"
] | 37 | 2018-07-24T13:29:46.000Z | 2019-09-29T19:06:27.000Z | from stix_shifter.stix_translation import stix_translation
import unittest
import re
translation = stix_translation.StixTranslation()
def _remove_timestamp_from_query(expected_query):
pattern1 = r"@fields.epochdate\s:>\d{0,10}.\d{0,3}\s*AND\s*@fields.epochdate\s:<\d{0,10}.\d{0,3}"
pattern2 = r"\,\s*\'timefra... | 51.635528 | 120 | 0.582508 |
4a10d56a59d038b94acf72e4f0b3196ce70495dc | 380 | py | Python | pyfortified_cache/utils.py | jeff00seattle/pyfortified-cache | 60a20721b382c21c17868efd79a5c4870829a765 | [
"MIT"
] | null | null | null | pyfortified_cache/utils.py | jeff00seattle/pyfortified-cache | 60a20721b382c21c17868efd79a5c4870829a765 | [
"MIT"
] | null | null | null | pyfortified_cache/utils.py | jeff00seattle/pyfortified-cache | 60a20721b382c21c17868efd79a5c4870829a765 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import hashlib
import ujson as json
def create_hash_key(key):
if key is None:
raise ValueError("Parameter 'key' not defined.")
if isinstance(key, str):
key_str = key
if isinstance(key, dict):
key_str = json.dumps(key, sort_keys=True)
... | 23.75 | 59 | 0.647368 |
4a10d67e41b295daab125dcfa1c00b343a498edf | 722 | py | Python | tests/test_02_cmd.py | MichaelKim0407/ini-to-env | aee310f31b2ba2077b081be2327a2cba45dd9f65 | [
"MIT"
] | null | null | null | tests/test_02_cmd.py | MichaelKim0407/ini-to-env | aee310f31b2ba2077b081be2327a2cba45dd9f65 | [
"MIT"
] | null | null | null | tests/test_02_cmd.py | MichaelKim0407/ini-to-env | aee310f31b2ba2077b081be2327a2cba45dd9f65 | [
"MIT"
] | null | null | null | import sys
from ini2env import cmd
def test_cmd_direct(ini_file_name, capsys, monkeypatch):
monkeypatch.setattr(sys.stdout, 'isatty', lambda: True)
cmd([ini_file_name()])
captured = capsys.readouterr()
assert captured.err == '''\
# source this output to export environment variables
'''
assert cap... | 24.896552 | 59 | 0.646814 |
4a10d6b040d37b5c6fce93e090aa5bd286524778 | 21 | py | Python | project_name/__init__.py | oskarmenrus/empty_project_template | 3985a5221387759f1949e09ca36faa9cca4dc2c3 | [
"MIT"
] | 18 | 2017-11-30T15:36:13.000Z | 2021-12-19T11:19:56.000Z | clean/datazoo/__init__.py | ahhuisg/ML-Data-Prep-Zoo | 195733b5767d69c9992456f1380e6c646e30a5ae | [
"Apache-2.0"
] | 2 | 2020-02-07T06:52:45.000Z | 2021-04-26T20:24:58.000Z | clean/datazoo/__init__.py | ahhuisg/ML-Data-Prep-Zoo | 195733b5767d69c9992456f1380e6c646e30a5ae | [
"Apache-2.0"
] | 6 | 2018-01-30T15:03:29.000Z | 2021-12-12T08:37:50.000Z | __version__ = '0.1'
| 10.5 | 20 | 0.619048 |
4a10d946a2ebb028f4f842ada64418181e3233d6 | 54,251 | py | Python | wsi/filter.py | steermomo/WSI_extract | 9db3bca2e59617a244c0f09d05146bfb44fb96e7 | [
"Apache-2.0"
] | null | null | null | wsi/filter.py | steermomo/WSI_extract | 9db3bca2e59617a244c0f09d05146bfb44fb96e7 | [
"Apache-2.0"
] | null | null | null | wsi/filter.py | steermomo/WSI_extract | 9db3bca2e59617a244c0f09d05146bfb44fb96e7 | [
"Apache-2.0"
] | null | null | null | # ------------------------------------------------------------------------
#
# 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... | 35.644547 | 123 | 0.651435 |
4a10d98ded44ebfbdb2cf0610bcbeb6426d83afc | 9,974 | py | Python | python/foglamp/plugins/south/roxtec/roxtec.py | foglamp/foglamp-south-roxtec | 7978d13a89e4727e1720e6cdd756d59974f1f180 | [
"Apache-2.0"
] | null | null | null | python/foglamp/plugins/south/roxtec/roxtec.py | foglamp/foglamp-south-roxtec | 7978d13a89e4727e1720e6cdd756d59974f1f180 | [
"Apache-2.0"
] | null | null | null | python/foglamp/plugins/south/roxtec/roxtec.py | foglamp/foglamp-south-roxtec | 7978d13a89e4727e1720e6cdd756d59974f1f180 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# FOGLAMP_BEGIN
# See: http://foglamp.readthedocs.io/
# FOGLAMP_END
"""HTTP Listener handler for Roxtec transit data"""
import asyncio
import copy
import os
import ssl
import logging
import datetime
from threading import Thread
from aiohttp import web
from foglamp.common import logger
from f... | 32.07074 | 240 | 0.593042 |
4a10da36514cd9855df971a413996b3b8fa4d981 | 347 | py | Python | tests/trace_test.py | al-fontes-jr/bardolph | 209bba49765c729d8f1479903593043cef274aab | [
"Apache-2.0"
] | null | null | null | tests/trace_test.py | al-fontes-jr/bardolph | 209bba49765c729d8f1479903593043cef274aab | [
"Apache-2.0"
] | 16 | 2020-06-15T11:04:10.000Z | 2022-03-28T05:39:10.000Z | tests/trace_test.py | al-fontes-jr/bardolph | 209bba49765c729d8f1479903593043cef274aab | [
"Apache-2.0"
] | 1 | 2020-06-24T02:01:04.000Z | 2020-06-24T02:01:04.000Z | #!/usr/bin/env python
from bardolph.lib.trace import trace_call, trace_call_enable
_output = ""
def test_callback(msg):
_output += msg
class TraceTest:
@trace_call
def fn1(self, x, y):
print("This is fn1:", x, y)
def main():
trace_call_enable(True)
TraceTest().fn1("a", "b")
if __name__... | 16.52381 | 60 | 0.634006 |
4a10db97dd8920532b664b998f47af70e87fac24 | 7,506 | py | Python | schwarz/mailqueue/testutils.py | FelixSchwarz/mailqueue-runner | 8e1a53ac4b363ced55636b1dda042c605386fc81 | [
"0BSD"
] | 3 | 2019-12-15T18:17:16.000Z | 2022-03-18T23:00:49.000Z | schwarz/mailqueue/testutils.py | FelixSchwarz/mailqueue-runner | 8e1a53ac4b363ced55636b1dda042c605386fc81 | [
"0BSD"
] | 24 | 2018-10-12T21:13:00.000Z | 2020-11-12T23:03:31.000Z | schwarz/mailqueue/testutils.py | FelixSchwarz/mailqueue-runner | 8e1a53ac4b363ced55636b1dda042c605386fc81 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
from __future__ import absolute_import, print_function, unicode_literals
from email.message import Message
from io import BytesIO
import logging
import os
from pymta import SMTPCommandParser
from pymta.test_util import BlackholeDeliverer
from schwarz.log_utils i... | 34.589862 | 154 | 0.66307 |
4a10dc092692424bb5fc29241e84b3add6a70fbc | 5,748 | py | Python | src/Constrained_PG_CartPole.py | bva-bme/Constrained_Policy_Gradient | 2331f55ff3bf06e2276662517c34cc45d5a51da8 | [
"MIT"
] | null | null | null | src/Constrained_PG_CartPole.py | bva-bme/Constrained_Policy_Gradient | 2331f55ff3bf06e2276662517c34cc45d5a51da8 | [
"MIT"
] | null | null | null | src/Constrained_PG_CartPole.py | bva-bme/Constrained_Policy_Gradient | 2331f55ff3bf06e2276662517c34cc45d5a51da8 | [
"MIT"
] | null | null | null | from PolicyNet import NeuralNet
from Functions import select_action, compute_gain, compute_logprobs, compute_policy_evolution_safety_region_simplified,\
compute_policy_evolution_safety_eq, compute_policy_evolution_safety_ineq, safe_states_cartpole, \
safe_triangle_cartpole, compute_learning_stats, plot_data
... | 38.837838 | 121 | 0.573417 |
4a10dc4faa01b920bf8ee6df80d057f69429037d | 1,053 | py | Python | projects/practice/main.py | jeongroseok/person-reid-research | f70463c6f55bb72d7c6376811d002c9d48d490f6 | [
"MIT"
] | null | null | null | projects/practice/main.py | jeongroseok/person-reid-research | f70463c6f55bb72d7c6376811d002c9d48d490f6 | [
"MIT"
] | null | null | null | projects/practice/main.py | jeongroseok/person-reid-research | f70463c6f55bb72d7c6376811d002c9d48d490f6 | [
"MIT"
] | null | null | null | from torchreid.data import datamanager
import torchreid
import torch
if __name__ == '__main__':
data_manager = torchreid.data.ImageDataManager(
root='data',
sources='grid',
targets='grid',
batch_size_train=64,
workers=0,
transforms=['random_flip', 'random_crop'],
... | 27.710526 | 79 | 0.666667 |
4a10dd1aae146b4ddfb4671a643932da8343ad81 | 19,732 | py | Python | libcpab/libcpab/core/tesselation.py | BGU-CS-VIL/CDTNCA | f46c490811c57d27dda196e64330c002d42e3824 | [
"MIT"
] | null | null | null | libcpab/libcpab/core/tesselation.py | BGU-CS-VIL/CDTNCA | f46c490811c57d27dda196e64330c002d42e3824 | [
"MIT"
] | null | null | null | libcpab/libcpab/core/tesselation.py | BGU-CS-VIL/CDTNCA | f46c490811c57d27dda196e64330c002d42e3824 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 18 14:23:25 2018
@author: nsde
"""
# %%
import numpy as np
from .utility import make_hashable, check_if_file_exist, null, save_obj, load_obj
# %%
class Tesselation(object):
""" Base tesselation class. This function is not meant to be called,
but descripes t... | 42.434409 | 109 | 0.507399 |
4a10dd850fcb379c931cf638ca4c95ea63f3e146 | 10,335 | py | Python | tools/mutation.py | 12yuens2/reconfigurable_organisms | af4b011b04918cedcb863b9f26d02bfac3b0d4ef | [
"CC0-1.0"
] | 788 | 2019-05-07T22:09:16.000Z | 2022-03-24T13:14:17.000Z | tools/mutation.py | 12yuens2/reconfigurable_organisms | af4b011b04918cedcb863b9f26d02bfac3b0d4ef | [
"CC0-1.0"
] | 8 | 2020-01-15T09:02:02.000Z | 2021-02-18T05:10:11.000Z | tools/mutation.py | 12yuens2/reconfigurable_organisms | af4b011b04918cedcb863b9f26d02bfac3b0d4ef | [
"CC0-1.0"
] | 179 | 2020-01-13T21:23:18.000Z | 2022-03-24T13:24:03.000Z | import numpy as np
import random
import copy
import inspect
def create_new_children_through_mutation(pop, print_log, new_children=None, mutate_network_probs=None,
prob_generating_func=None, max_mutation_attempts=1500):
"""Create copies, with modification, of existing indiv... | 46.764706 | 122 | 0.553169 |
4a10e12ddde3b97e766f0ac674090cab99a7459a | 4,848 | py | Python | alipay/aop/api/domain/Invoice.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/Invoice.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/Invoice.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class Invoice(object):
def __init__(self):
self._email = None
self._invoice_content = None
self._invoice_fee = None
self._invoice_title = None
self._invoice_type... | 30.111801 | 81 | 0.582096 |
4a10e1dd5a83344bfe2902553a93ab1276d8addd | 1,463 | py | Python | scripts/dummygridmeter.py | stevepbyrne/dbus-systemcalc-py | 4d50ca36af51bbe1e3040cb63f60ef262da5d397 | [
"MIT"
] | null | null | null | scripts/dummygridmeter.py | stevepbyrne/dbus-systemcalc-py | 4d50ca36af51bbe1e3040cb63f60ef262da5d397 | [
"MIT"
] | null | null | null | scripts/dummygridmeter.py | stevepbyrne/dbus-systemcalc-py | 4d50ca36af51bbe1e3040cb63f60ef262da5d397 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# takes data from the dbus, does calculations with it, and puts it back on
from dbus.mainloop.glib import DBusGMainLoop
import gobject
import argparse
import logging
import sys
import os
# our own packages
sys.path.insert(1, os.path.join(os.path.dirname(__file__), '../ext/velib_python'))
from db... | 29.26 | 93 | 0.710185 |
4a10e28bf724205e3717136bb70eb2ff28b86cde | 1,967 | py | Python | 14 - Convolutional Neural Network/train.py | rendywijayaa/Deep_Learning | ee87064030ec0649d7ff3ea1e78113f7315e9684 | [
"MIT"
] | 12 | 2020-04-16T03:02:33.000Z | 2021-10-16T12:05:47.000Z | 14 - Convolutional Neural Network/train.py | rendywijayaa/Deep_Learning | ee87064030ec0649d7ff3ea1e78113f7315e9684 | [
"MIT"
] | null | null | null | 14 - Convolutional Neural Network/train.py | rendywijayaa/Deep_Learning | ee87064030ec0649d7ff3ea1e78113f7315e9684 | [
"MIT"
] | 14 | 2020-03-07T02:44:46.000Z | 2022-03-23T06:39:32.000Z | import torch
from torch import nn, optim
from torch.utils.data import DataLoader
from torchvision import datasets, transforms
from jcopdl.callback import Callback, set_config
from src.model import CNN
from src.train_utils import loop_fn
import config as cfg
device = torch.device("cuda:0" if torch.cuda.is_available()... | 32.245902 | 111 | 0.691408 |
4a10e4ac1198a337389355d249341bca56cfca4b | 1,317 | py | Python | model/lstm_model.py | FFTYYY/Poem | 8836a32d21997afef5381c6ff8fd71c8adeebb75 | [
"MIT"
] | 7 | 2020-02-07T06:08:36.000Z | 2022-03-15T07:27:01.000Z | model/lstm_model.py | FFTYYY/Poem | 8836a32d21997afef5381c6ff8fd71c8adeebb75 | [
"MIT"
] | 2 | 2020-02-07T06:15:13.000Z | 2020-12-08T02:33:36.000Z | model/lstm_model.py | FFTYYY/Poem | 8836a32d21997afef5381c6ff8fd71c8adeebb75 | [
"MIT"
] | null | null | null | import torch as tc
import torch.nn as nn
import torch.nn.functional as F
from .lstm import LSTM
import pdb
import fitlog
fitlog.commit(__file__)
class Model(nn.Module):
def __init__(self , vocab , d_model = 512 , dropout = 0.0):
super().__init__()
self.embedding = nn.Embedding(len(vocab) , d_model , padding_idx... | 22.322034 | 86 | 0.629461 |
4a10e565e95ce8c4f8d22d7f5e1e8d946da8de30 | 1,126 | py | Python | molecule/java-min/tests/test_role.py | dedayoa/ansible-role-java | af984f8b977915564df50fc87e10cd1e06114420 | [
"MIT"
] | null | null | null | molecule/java-min/tests/test_role.py | dedayoa/ansible-role-java | af984f8b977915564df50fc87e10cd1e06114420 | [
"MIT"
] | null | null | null | molecule/java-min/tests/test_role.py | dedayoa/ansible-role-java | af984f8b977915564df50fc87e10cd1e06114420 | [
"MIT"
] | null | null | null | import pytest
@pytest.mark.parametrize('command', [
'java',
'javac'
])
def test_java_tools(host, command):
cmd = host.run('. /etc/profile && ' + command + ' -version')
assert cmd.rc == 0
assert ' 1.8.0_' in cmd.stderr
@pytest.mark.parametrize('version_dir_pattern', [
'jdk8u[0-9b-]+$'
])
def ... | 26.186047 | 78 | 0.62611 |
4a10e573301df9c973a16c6bd9fcbbcdd11c21bd | 2,490 | py | Python | src/collectors/nvidia_gpu/test/testnvidia_gpu.py | fasrc/Diamond | cd0270a53de2ea9d4fccd63c14b4ecef3e75f741 | [
"MIT"
] | null | null | null | src/collectors/nvidia_gpu/test/testnvidia_gpu.py | fasrc/Diamond | cd0270a53de2ea9d4fccd63c14b4ecef3e75f741 | [
"MIT"
] | null | null | null | src/collectors/nvidia_gpu/test/testnvidia_gpu.py | fasrc/Diamond | cd0270a53de2ea9d4fccd63c14b4ecef3e75f741 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding=utf-8
##########################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from test import patch
from test import Mock
from diamond.collector import Collector
from nvidia_gpu import Nvi... | 31.518987 | 74 | 0.536546 |
4a10e600359b6bd0bdbb2a2e65603e10484878a3 | 1,051 | py | Python | ddtrace/internal/runtime/constants.py | dchengrove/dd-trace-py | 549e8d532679c2a7dd0c572ac0a0eb520f6e4d49 | [
"BSD-3-Clause"
] | 1 | 2020-03-10T01:45:56.000Z | 2020-03-10T01:45:56.000Z | ddtrace/internal/runtime/constants.py | dchengrove/dd-trace-py | 549e8d532679c2a7dd0c572ac0a0eb520f6e4d49 | [
"BSD-3-Clause"
] | null | null | null | ddtrace/internal/runtime/constants.py | dchengrove/dd-trace-py | 549e8d532679c2a7dd0c572ac0a0eb520f6e4d49 | [
"BSD-3-Clause"
] | null | null | null | GC_COUNT_GEN0 = 'runtime.python.gc.count.gen0'
GC_COUNT_GEN1 = 'runtime.python.gc.count.gen1'
GC_COUNT_GEN2 = 'runtime.python.gc.count.gen2'
THREAD_COUNT = 'runtime.python.thread_count'
MEM_RSS = 'runtime.python.mem.rss'
CPU_TIME_SYS = 'runtime.python.cpu.time.sys'
CPU_TIME_USER = 'runtime.python.cpu.time.user'
CPU_PE... | 23.355556 | 69 | 0.765937 |
4a10e61a1019e510eace17bf367128f30d23ba14 | 48 | py | Python | First_Test_File.py | technicSupFan/Network_Scanner_Python | 0d4a64209835c98cf28ca301abf493101f1c7898 | [
"CC0-1.0"
] | null | null | null | First_Test_File.py | technicSupFan/Network_Scanner_Python | 0d4a64209835c98cf28ca301abf493101f1c7898 | [
"CC0-1.0"
] | null | null | null | First_Test_File.py | technicSupFan/Network_Scanner_Python | 0d4a64209835c98cf28ca301abf493101f1c7898 | [
"CC0-1.0"
] | null | null | null | import time
print("Hello World")
time.sleep(1)
| 9.6 | 20 | 0.729167 |
4a10e6e3533437efca93a19b05fe3b7086706f53 | 146 | py | Python | src/hogpong/constants.py | SarunasAzna/hogpong | bd4a7aca0ec4ffa25a691721dc4088f2a96874d2 | [
"MIT"
] | null | null | null | src/hogpong/constants.py | SarunasAzna/hogpong | bd4a7aca0ec4ffa25a691721dc4088f2a96874d2 | [
"MIT"
] | null | null | null | src/hogpong/constants.py | SarunasAzna/hogpong | bd4a7aca0ec4ffa25a691721dc4088f2a96874d2 | [
"MIT"
] | null | null | null | RIGTH_SIDE = "right"
LEFT_SIDE = "left"
TOP_SIDE = "top"
BOTTOM_SIDE = "botton"
SIDE_ENUMERATION = (LEFT_SIDE, RIGTH_SIDE, TOP_SIDE, BOTTOM_SIDE)
| 24.333333 | 65 | 0.753425 |
4a10e8682e7754b8e9172b1ac1537363f9a6ae10 | 1,569 | py | Python | Jumpscale/tutorials/base/tutorials/cache/example_class.py | threefoldtech/JumpscaleX | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 2 | 2019-05-09T07:21:25.000Z | 2019-08-05T06:37:53.000Z | Jumpscale/tutorials/base/tutorials/cache/example_class.py | threefoldtech/JumpscaleX | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 664 | 2018-12-19T12:43:44.000Z | 2019-08-23T04:24:42.000Z | Jumpscale/tutorials/base/tutorials/cache/example_class.py | threefoldtech/jumpscale10 | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 7 | 2019-05-03T07:14:37.000Z | 2019-08-05T12:36:52.000Z | from Jumpscale import j
import time
JSBASE = j.application.JSBaseClass
class TutorialCacheClass(j.application.JSBaseClass):
"""
"""
def __init__(self):
JSBASE.__init__(self)
self.value = 1
#
def amounts_servers_active(self, reload=False):
def do(me=None):
... | 29.603774 | 108 | 0.599745 |
4a10e9c65192b606e3bef9d9976acbb93fb42f72 | 6,836 | py | Python | regularfrynance/utils.py | regularfry/regularfrynance | 38b6e6a0d20b9e3d06c31f2856f79309727fe15b | [
"Apache-2.0"
] | null | null | null | regularfrynance/utils.py | regularfry/regularfrynance | 38b6e6a0d20b9e3d06c31f2856f79309727fe15b | [
"Apache-2.0"
] | null | null | null | regularfrynance/utils.py | regularfry/regularfrynance | 38b6e6a0d20b9e3d06c31f2856f79309727fe15b | [
"Apache-2.0"
] | 1 | 2020-09-03T01:38:35.000Z | 2020-09-03T01:38:35.000Z | #!/usr/bin/env python
#
# Yahoo! Finance market data downloader (+fix for Pandas Datareader)
# https://github.com/regularfry/regularfrynance
#
# Copyright 2020 Alex Young
# Copyright 2017-2019 Ran Aroussi
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 29.465517 | 88 | 0.587624 |
4a10e9e9f20fea6ca41d6978196a0a2e1af6d489 | 6,712 | py | Python | scripts/lib/xpedite/util/__init__.py | dhruvshekhawat/Xpedite | e857cb623e22a4384265dafa8e8437f038f77b95 | [
"Apache-2.0"
] | null | null | null | scripts/lib/xpedite/util/__init__.py | dhruvshekhawat/Xpedite | e857cb623e22a4384265dafa8e8437f038f77b95 | [
"Apache-2.0"
] | null | null | null | scripts/lib/xpedite/util/__init__.py | dhruvshekhawat/Xpedite | e857cb623e22a4384265dafa8e8437f038f77b95 | [
"Apache-2.0"
] | null | null | null | """
Utility methods
This module provides utility methods for
1. file system operations - make or clean up directories, touch files etc
2. formating and normalizing strings
3. collecting cpu and memory info
4. etc ...
Author: Manikandan Dhamodharan, Morgan Stanley
"""
from __future__ import division... | 25.716475 | 115 | 0.694875 |
4a10ea30e1b34f88cd907a10183816999b7d38d7 | 975 | py | Python | serenity_pypeline/task.py | Bplotka/serenity-pypeline | 7f355d95e21a0832d5c812e4a8a1055bc26267d4 | [
"Apache-2.0"
] | 1 | 2016-01-16T22:56:07.000Z | 2016-01-16T22:56:07.000Z | serenity_pypeline/task.py | Bplotka/serenity-pypeline | 7f355d95e21a0832d5c812e4a8a1055bc26267d4 | [
"Apache-2.0"
] | null | null | null | serenity_pypeline/task.py | Bplotka/serenity-pypeline | 7f355d95e21a0832d5c812e4a8a1055bc26267d4 | [
"Apache-2.0"
] | null | null | null | from serenity_pypeline.logger import log
class NotInitializedError(Exception):
pass
class Task(object):
def __init__(self, classpath):
self._klass = self._get_class(classpath)
self._obj = None
self.next_success = []
self.next_error = []
self.input = None
def _get... | 25.657895 | 65 | 0.635897 |
4a10ea877694ab083a823406c63feef271d35c2d | 138 | py | Python | examples/dio_test.py | willdickson/panel_comm | 4a770fa8ecc7db644b9bdb918dce2e39f5913dbf | [
"BSD-3-Clause"
] | 1 | 2021-06-23T06:07:49.000Z | 2021-06-23T06:07:49.000Z | examples/dio_test.py | willdickson/panel_comm | 4a770fa8ecc7db644b9bdb918dce2e39f5913dbf | [
"BSD-3-Clause"
] | null | null | null | examples/dio_test.py | willdickson/panel_comm | 4a770fa8ecc7db644b9bdb918dce2e39f5913dbf | [
"BSD-3-Clause"
] | 1 | 2021-05-21T23:46:10.000Z | 2021-05-21T23:46:10.000Z | import sys
import time
from panel_comm import PanelComm
chan = int(sys.argv[1])
ctlr = PanelComm(baudrate=921600)
ctlr.dio_test(chan)
| 12.545455 | 33 | 0.768116 |
4a10eabab3f7cffcb62ebfcac28aac57f096b74b | 297 | py | Python | decorators.py | KenjiEmura/django-REST-framework | 544a187ebf5f0314e8b9ccf5c26c95c43eec15ca | [
"MIT"
] | null | null | null | decorators.py | KenjiEmura/django-REST-framework | 544a187ebf5f0314e8b9ccf5c26c95c43eec15ca | [
"MIT"
] | null | null | null | decorators.py | KenjiEmura/django-REST-framework | 544a187ebf5f0314e8b9ccf5c26c95c43eec15ca | [
"MIT"
] | null | null | null | def f1(func):
def wrapper(*args, **kwargs):
print("Started")
val = func(*args, **kwargs)
print("Ended")
return val
return wrapper
@f1
def f(a, b=9):
print(a, b)
@f1
def add(x, y):
print("Inside add function")
return x + y
print(add(4, 5))
| 13.5 | 35 | 0.525253 |
4a10eb1a87395eb9a37acc6bd062eb65680644b4 | 2,436 | py | Python | SRC/experiment.py | cyrilgalitzine/SDE_inference | e64e9c5cdf4c13bf3ba67071949c71b0a1b6d8fe | [
"Apache-2.0"
] | 1 | 2019-07-28T19:17:36.000Z | 2019-07-28T19:17:36.000Z | SRC/experiment.py | cyrilgalitzine/SDE_inference | e64e9c5cdf4c13bf3ba67071949c71b0a1b6d8fe | [
"Apache-2.0"
] | null | null | null | SRC/experiment.py | cyrilgalitzine/SDE_inference | e64e9c5cdf4c13bf3ba67071949c71b0a1b6d8fe | [
"Apache-2.0"
] | null | null | null | from control import *
from time_series import *
from equation import *
from error_model import *
import numpy as np
class Experiment():
def __init__(self,Nrep,Type,Name):
self.Nrep= Nrep #Number of replicates
self.Type = Type #Type of experiment
self.Name = Name
class TimeSeriesExperiment(Experiment):
de... | 24.857143 | 140 | 0.720443 |
4a10eb4e07bba24797020c7ff05a43bdc754b47b | 4,351 | py | Python | brunch-recsys-flask.py | goodvc78/brunch-recsys | 0b322db92bc97d14c7327e32e993fd16c3a3c5e9 | [
"Apache-2.0"
] | 4 | 2016-05-02T03:08:02.000Z | 2020-04-26T09:02:51.000Z | brunch-recsys-flask.py | goodvc78/brunch-recsys | 0b322db92bc97d14c7327e32e993fd16c3a3c5e9 | [
"Apache-2.0"
] | null | null | null | brunch-recsys-flask.py | goodvc78/brunch-recsys | 0b322db92bc97d14c7327e32e993fd16c3a3c5e9 | [
"Apache-2.0"
] | 2 | 2017-12-21T03:41:24.000Z | 2018-04-01T15:50:58.000Z | #!/usr/local/bin/python3
from flask import Flask, request
from flask_restful import Resource, Api
from json import dumps
import gensim.models.word2vec as word2vec
import pprint, pickle
from scipy.spatial import distance
from flask.ext.cors import CORS
## word2vec model path
model_path = '/Users/goodvc/Data/brunch-re... | 29.80137 | 88 | 0.571823 |
4a10ed6e7402ccca2cae69d82c015606e8c21259 | 8,824 | py | Python | pandas/tests/api/test_api.py | jess010/pandas | 9872d6757e5117dce070981141cee562f675694e | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/api/test_api.py | jess010/pandas | 9872d6757e5117dce070981141cee562f675694e | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/api/test_api.py | jess010/pandas | 9872d6757e5117dce070981141cee562f675694e | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from warnings import catch_warnings
import pytest
import pandas as pd
from pandas import api
from pandas.util import testing as tm
class Base(object):
def check(self, namespace, expected, ignored=None):
# see which names are in the namespace, minus optional
# i... | 33.679389 | 78 | 0.579102 |
4a10ed6ee4b64cb95b94c25085ffc029731a83ab | 1,124 | py | Python | thingsboard_gateway/connectors/connector.py | pticaTor/thingsboard-gateway | c56e9bd382693d6fb8b48135fd095b254ade56ec | [
"Apache-2.0"
] | null | null | null | thingsboard_gateway/connectors/connector.py | pticaTor/thingsboard-gateway | c56e9bd382693d6fb8b48135fd095b254ade56ec | [
"Apache-2.0"
] | null | null | null | thingsboard_gateway/connectors/connector.py | pticaTor/thingsboard-gateway | c56e9bd382693d6fb8b48135fd095b254ade56ec | [
"Apache-2.0"
] | null | null | null | # Copyright 2020. ThingsBoard
#
# 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 ... | 24.434783 | 78 | 0.679715 |
4a10ed72ceb8835b23c3c3344ff19988b0aa7f61 | 1,190 | py | Python | setup.py | Bogdanp/fargate_scraper | 6c94e531bfb88b9aa5b530490b4bae94e91f346b | [
"Apache-2.0"
] | 6 | 2018-07-18T09:59:17.000Z | 2021-07-05T05:45:26.000Z | setup.py | Bogdanp/fargate_scraper | 6c94e531bfb88b9aa5b530490b4bae94e91f346b | [
"Apache-2.0"
] | 2 | 2018-08-22T18:59:58.000Z | 2019-08-19T13:58:25.000Z | setup.py | Bogdanp/fargate_scraper | 6c94e531bfb88b9aa5b530490b4bae94e91f346b | [
"Apache-2.0"
] | null | null | null | import os
from setuptools import setup
def rel(*xs):
return os.path.join(os.path.abspath(os.path.dirname(__file__)), *xs)
with open(rel("fargate_scraper.py"), "r") as f:
version_marker = "__version__ = "
for line in f:
if line.startswith(version_marker):
_, version = line.split(vers... | 24.791667 | 94 | 0.583193 |
4a10ed88cf61f6261892c41625306b4123a8c336 | 2,947 | py | Python | dilema.py | DevAlek/PrisionDilemma | 447872b491df6b6be4b069f73abe76781665a946 | [
"MIT"
] | null | null | null | dilema.py | DevAlek/PrisionDilemma | 447872b491df6b6be4b069f73abe76781665a946 | [
"MIT"
] | null | null | null | dilema.py | DevAlek/PrisionDilemma | 447872b491df6b6be4b069f73abe76781665a946 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from types import MethodType as method
from __init__ import loadStrategies
def align(string: str) -> str:
return string.replace(': ', ':\t')
class Tournament:
class Battle:
def __init__(self, strategy1: method, strategy2: method, duration: int = 30, price: int = 5, cost: int = 1) -> object:... | 31.688172 | 120 | 0.638276 |
4a10ee2d453fafc02e338f73f4d7a90d27cbed01 | 549 | py | Python | setup.py | LucasAlegre/rl-visualization | b20506c3417190576156e77a9dac5d872b99ffa3 | [
"MIT"
] | null | null | null | setup.py | LucasAlegre/rl-visualization | b20506c3417190576156e77a9dac5d872b99ffa3 | [
"MIT"
] | null | null | null | setup.py | LucasAlegre/rl-visualization | b20506c3417190576156e77a9dac5d872b99ffa3 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
REQUIRED = ['gym', 'numpy', 'pandas', 'matplotlib', 'seaborn', 'flask']
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='rl-visualization',
version='0.1',
packages=['rl_visualization',],
install_requires=REQUIRED,
author=... | 28.894737 | 71 | 0.695811 |
4a10eea9ab8a30e4cb9cffae378036bcb87eaf95 | 3,969 | py | Python | ucsmsdk/mometa/cimcvmedia/CimcvmediaMountConfigPolicy.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/cimcvmedia/CimcvmediaMountConfigPolicy.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/cimcvmedia/CimcvmediaMountConfigPolicy.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for CimcvmediaMountConfigPolicy ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class CimcvmediaMountConfigPolicyConsts():
INT_ID_NONE = "none"
... | 58.367647 | 363 | 0.654825 |
4a10eefbc0876c134c10d3843b87112c1b06ee27 | 8,153 | py | Python | contrib/devtools/update-translations.py | we-conceived-the/ball | e313455fdcb5b3a06076fbe5053bef9a57f4483f | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | we-conceived-the/ball | e313455fdcb5b3a06076fbe5053bef9a57f4483f | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | we-conceived-the/ball | e313455fdcb5b3a06076fbe5053bef9a57f4483f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... | 38.457547 | 124 | 0.633509 |
4a10efe7ea780bc2be077d29259028ecaf97d542 | 6,458 | py | Python | zaqar/tests/tempest_plugin/api_schema/response/v2/queues.py | ISCAS-VDI/zaqar | 5c1aedbef1930565a46cc60b1a9d5d5e238f174d | [
"Apache-2.0"
] | null | null | null | zaqar/tests/tempest_plugin/api_schema/response/v2/queues.py | ISCAS-VDI/zaqar | 5c1aedbef1930565a46cc60b1a9d5d5e238f174d | [
"Apache-2.0"
] | null | null | null | zaqar/tests/tempest_plugin/api_schema/response/v2/queues.py | ISCAS-VDI/zaqar | 5c1aedbef1930565a46cc60b1a9d5d5e238f174d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 HuaWei, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 21.671141 | 69 | 0.452152 |
4a10f0a0c900cff2098af22630589997685d8475 | 6,571 | py | Python | pynucastro/nucdata/elements.py | zingale/pynucastro | 85b027c0d584046e749888e79e78c611bbf69cb4 | [
"BSD-3-Clause"
] | 6 | 2016-03-31T20:51:07.000Z | 2018-01-04T19:30:41.000Z | pynucastro/nucdata/elements.py | zingale/pynucastro | 85b027c0d584046e749888e79e78c611bbf69cb4 | [
"BSD-3-Clause"
] | 19 | 2016-03-16T10:03:18.000Z | 2018-01-18T18:30:36.000Z | pynucastro/nucdata/elements.py | zingale/pynucastro | 85b027c0d584046e749888e79e78c611bbf69cb4 | [
"BSD-3-Clause"
] | 2 | 2016-03-29T14:42:27.000Z | 2017-03-27T20:19:11.000Z | class Element(object):
def __init__(self, abbreviation=None, name=None, Z=None):
self.abbreviation = abbreviation
self.name = name
self.Z = Z
class UnidentifiedElement(BaseException):
def __init__(self):
return
class PeriodicTable(object):
table = {'h': Element('h', 'hy... | 44.100671 | 61 | 0.433876 |
4a10f0b157c713a6c404c0ae1af6a87eea21b300 | 1,026 | py | Python | manage.py | krnr/appointments | 3f132be1dd895b2aa9c07c5a8ebdebbd47ddfbf2 | [
"MIT"
] | null | null | null | manage.py | krnr/appointments | 3f132be1dd895b2aa9c07c5a8ebdebbd47ddfbf2 | [
"MIT"
] | null | null | null | manage.py | krnr/appointments | 3f132be1dd895b2aa9c07c5a8ebdebbd47ddfbf2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local')
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure tha... | 34.2 | 77 | 0.655945 |
4a10f0c1061677b54fd864956da113105ebc690a | 18,279 | py | Python | utils/sparse_image_warp.py | iwaterxt/sparse_image_warp_pytorch | 399848cf7c6bca0af33fc0e139ca426208d84c70 | [
"MIT"
] | null | null | null | utils/sparse_image_warp.py | iwaterxt/sparse_image_warp_pytorch | 399848cf7c6bca0af33fc0e139ca426208d84c70 | [
"MIT"
] | null | null | null | utils/sparse_image_warp.py | iwaterxt/sparse_image_warp_pytorch | 399848cf7c6bca0af33fc0e139ca426208d84c70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This implementation is modified from https://github.com/zcaceres/spec_augment
MIT License
Copyright (c) 2019 Zach Caceres
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 Soft... | 39.736957 | 184 | 0.678538 |
4a10f3533496f5730c2c86f6c2512b9c32f79355 | 6,995 | py | Python | capnpy/compiler/structor.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 1 | 2019-05-29T19:47:53.000Z | 2019-05-29T19:47:53.000Z | capnpy/compiler/structor.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | null | null | null | capnpy/compiler/structor.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 4 | 2018-01-28T23:44:41.000Z | 2019-09-28T17:50:14.000Z | """
Structor -> struct ctor -> struct construtor :)
"""
import struct
from capnpy.type import Types
from capnpy.schema import Field, Type, Value
from capnpy.compiler.fieldtree import FieldTree, Node
class Structor(object):
"""
Create a struct constructor.
Some terminology:
- argnames: the name of a... | 36.056701 | 85 | 0.549535 |
4a10f43766e2bb42fecde58283be694f01683338 | 4,278 | py | Python | simpleml/datasets/__init__.py | aolopez/SimpleML | 9e3237c243863400372a493164a107b74f770ef0 | [
"BSD-3-Clause"
] | 15 | 2018-08-19T19:36:23.000Z | 2021-11-09T17:47:18.000Z | simpleml/datasets/__init__.py | aolopez/SimpleML | 9e3237c243863400372a493164a107b74f770ef0 | [
"BSD-3-Clause"
] | 75 | 2020-10-11T17:58:59.000Z | 2022-03-29T22:34:54.000Z | simpleml/datasets/__init__.py | aolopez/SimpleML | 9e3237c243863400372a493164a107b74f770ef0 | [
"BSD-3-Clause"
] | 4 | 2018-04-30T23:09:42.000Z | 2022-01-19T08:03:18.000Z | '''
Import modules to register class names in global registry
Define convenience classes composed of different mixins
'''
__author__ = 'Elisha Yadgaran'
import pandas as pd
import logging
from .base_dataset import Dataset
from .pandas_mixin import BasePandasDatasetMixin, SingleLabelPandasDatasetMixin, MultiLabelPan... | 35.94958 | 165 | 0.710846 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.