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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f2dc9c8f81fd859ce36519bc756351f8b799bc62 | 6,504 | py | Python | git_tree.py | google/git-rebaser | 741d5139653b9668b141e6b4eed0cdab1996a1e6 | [
"Apache-2.0"
] | 10 | 2020-01-07T01:44:25.000Z | 2021-04-20T20:38:20.000Z | git_tree.py | google/git-rebaser | 741d5139653b9668b141e6b4eed0cdab1996a1e6 | [
"Apache-2.0"
] | null | null | null | git_tree.py | google/git-rebaser | 741d5139653b9668b141e6b4eed0cdab1996a1e6 | [
"Apache-2.0"
] | 3 | 2020-04-07T00:35:53.000Z | 2021-10-16T23:17:34.000Z | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 29.563636 | 77 | 0.654059 |
b40c9197f4ad183c68f86821e3103421cfcac1d3 | 3,955 | py | Python | sdks/python/appcenter_sdk/models/TestGDPRPipelineTest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/TestGDPRPipelineTest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/TestGDPRPipelineTest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class TestGDPRPipeli... | 29.296296 | 95 | 0.6 |
a39e20b86c8b41968d259fb4752c130ea46c91ad | 2,630 | py | Python | day2/day2.py | martinpeck/advent-of-code-2019 | 12e80432b17a6ff695a38316245268f6c70d07d5 | [
"MIT"
] | null | null | null | day2/day2.py | martinpeck/advent-of-code-2019 | 12e80432b17a6ff695a38316245268f6c70d07d5 | [
"MIT"
] | null | null | null | day2/day2.py | martinpeck/advent-of-code-2019 | 12e80432b17a6ff695a38316245268f6c70d07d5 | [
"MIT"
] | null | null | null | from itertools import product
def load_instructions(filename):
with open(filename, "r") as file:
line = file.readline()
return parse_instructions(line)
def parse_instructions(instructions_as_string):
return list(map(int, instructions_as_string.split(",")))
def get_next_instruction(instruction... | 26.3 | 77 | 0.652471 |
aafda4a33e755323044a25fe1f62a19bc058e5c1 | 916 | py | Python | src/data/98.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/98.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/98.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | from queue import Queue
from collections import deque
import collections
import math
import sys
sys.setrecursionlimit(10000)
def comb(n, r):
comb = 1
r = min(r, n - r)
for i in range(r):
comb = comb * (n - i) // (i + 1)
return comb
N, Q = map(int, input().split())
paths = [[] for i in range... | 19.083333 | 46 | 0.526201 |
ebf44daef09d1d7855fe776e2921015edc4ac07f | 6,979 | py | Python | tinycord/api/webhook.py | tinycord/tinycord | 9e817452c1f2357878f07f8622f6240687470cad | [
"MIT"
] | 8 | 2022-01-08T20:04:29.000Z | 2022-03-21T19:12:19.000Z | tinycord/api/webhook.py | tinycord/tinycord | 9e817452c1f2357878f07f8622f6240687470cad | [
"MIT"
] | null | null | null | tinycord/api/webhook.py | tinycord/tinycord | 9e817452c1f2357878f07f8622f6240687470cad | [
"MIT"
] | 1 | 2022-01-02T21:42:53.000Z | 2022-01-02T21:42:53.000Z | import aiohttp
import typing
import json
if typing.TYPE_CHECKING:
from ..client import Client
from ..core import Router
from ..models import *
class WebhookAPI:
def __init__(self, client: "Client") -> None:
self.client = client
"""The client."""
async def create_webhook(self, channel_id:... | 29.572034 | 104 | 0.489039 |
563716fa9ee4efa000726e7b19c26b7815fd36c4 | 206 | py | Python | py_tdlib/constructors/input_message_sticker.py | Mr-TelegramBot/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 24 | 2018-10-05T13:04:30.000Z | 2020-05-12T08:45:34.000Z | py_tdlib/constructors/input_message_sticker.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 3 | 2019-06-26T07:20:20.000Z | 2021-05-24T13:06:56.000Z | py_tdlib/constructors/input_message_sticker.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 5 | 2018-10-05T14:29:28.000Z | 2020-08-11T15:04:10.000Z | from ..factory import Type
class inputMessageSticker(Type):
sticker = None # type: "InputFile"
thumbnail = None # type: "inputThumbnail"
width = None # type: "int32"
height = None # type: "int32"
| 22.888889 | 43 | 0.684466 |
f51202bd23fec37f570ae5e3ca4d768c8f4716e4 | 4,437 | py | Python | python/ambassador/envoy/v2/v2config.py | xlanor/ambassador | 273faad5999d453323c151c9ce4da28965da82dd | [
"Apache-2.0"
] | null | null | null | python/ambassador/envoy/v2/v2config.py | xlanor/ambassador | 273faad5999d453323c151c9ce4da28965da82dd | [
"Apache-2.0"
] | null | null | null | python/ambassador/envoy/v2/v2config.py | xlanor/ambassador | 273faad5999d453323c151c9ce4da28965da82dd | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Datawire. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 41.083333 | 123 | 0.619788 |
d01ad26abb4051e39c9af150aba505a4ece3387b | 467 | py | Python | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/ParamDTO.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 128 | 2018-10-29T04:11:47.000Z | 2022-03-07T02:19:14.000Z | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/ParamDTO.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 40 | 2018-11-02T00:40:48.000Z | 2021-12-07T09:33:56.000Z | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/ParamDTO.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 118 | 2018-10-29T08:43:57.000Z | 2022-01-07T06:49:25.000Z | from com.huawei.iotplatform.client.dto.CommandDTOV4 import CommandDTOV4
class ParamDTO(object):
# command = "command "
command = CommandDTOV4
fileId = "fileId"
deviceList = "deviceList"
type = "type"
def __init__(self):
self.deviceType = str
self.manufacturerId = str
... | 23.35 | 71 | 0.635974 |
49b5bb5cb9737f24e9debff841d26a65fb96eb8d | 782 | py | Python | tasks.py | shipci/pythondotorg | eab6421261174c5f9040a4b50654e54e2ce90c9c | [
"Apache-2.0"
] | null | null | null | tasks.py | shipci/pythondotorg | eab6421261174c5f9040a4b50654e54e2ce90c9c | [
"Apache-2.0"
] | null | null | null | tasks.py | shipci/pythondotorg | eab6421261174c5f9040a4b50654e54e2ce90c9c | [
"Apache-2.0"
] | null | null | null | import invoke
env = {
'host': 'virt-l4es2w.psf.osuosl.org',
'python': '/srv/redesign.python.org/shared/env/bin/python',
'deploydir': '/srv/redesign.python.org/current',
}
def run(cmd, **kwargs):
"""
Wrapper around invoke.run to automatically interpolate env.
"""
return invoke.run(cmd.forma... | 26.965517 | 103 | 0.66624 |
8da4dd81dc2523754577125f6a0ddb9ebb2e4f96 | 2,588 | py | Python | tests/plugin/testplugin.py | kueken/streamlink-27 | 0761a6bad2c2332cd25d9ad96e7d1e375a30dcf2 | [
"BSD-2-Clause"
] | 5 | 2020-12-26T18:57:59.000Z | 2022-03-09T15:10:39.000Z | tests/plugin/testplugin.py | kueken/streamlink-27 | 0761a6bad2c2332cd25d9ad96e7d1e375a30dcf2 | [
"BSD-2-Clause"
] | null | null | null | tests/plugin/testplugin.py | kueken/streamlink-27 | 0761a6bad2c2332cd25d9ad96e7d1e375a30dcf2 | [
"BSD-2-Clause"
] | 6 | 2021-02-12T10:24:25.000Z | 2022-01-01T13:08:49.000Z | # -*- coding: utf-8 -*-
import re
from io import BytesIO
from streamlink import NoStreamsError
from streamlink.options import Options
from streamlink.plugin import PluginArgument, PluginArguments, pluginmatcher
from streamlink.plugins import Plugin
from streamlink.stream.akamaihd import AkamaiHDStream
from streamlink.... | 30.809524 | 83 | 0.624807 |
7fc3e71f6aaabca03eb7363ab4378e7918588d69 | 8,433 | py | Python | contrib/heat_zaqar/heat_zaqar/tests/test_queue.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"Apache-2.0"
] | null | null | null | contrib/heat_zaqar/heat_zaqar/tests/test_queue.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"Apache-2.0"
] | null | null | null | contrib/heat_zaqar/heat_zaqar/tests/test_queue.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"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 required by applicable law or agreed to in writing, software
# ... | 34.991701 | 78 | 0.626112 |
a360f254a3ecd082fb11438c30e4f97a98d40bf3 | 58 | py | Python | miphy_resources/__init__.py | dave-the-scientist/miphy | 24150a89fbcda18e77660cb983126e196c991609 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-10-17T02:55:03.000Z | 2018-10-17T02:55:03.000Z | miphy_resources/__init__.py | dave-the-scientist/miphy | 24150a89fbcda18e77660cb983126e196c991609 | [
"BSD-2-Clause-FreeBSD"
] | 5 | 2018-04-05T19:05:50.000Z | 2021-12-09T17:54:00.000Z | miphy_resources/__init__.py | dave-the-scientist/miphy | 24150a89fbcda18e77660cb983126e196c991609 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-07-01T02:48:27.000Z | 2018-07-01T02:48:27.000Z | """ init file for miphy scripts."""
__version__ = '1.1.2'
| 19.333333 | 35 | 0.637931 |
72b43cd7a753c6e68317298c703c1d04dee13364 | 3,811 | py | Python | tests/test_clusters.py | mike10004/smatterscripts | d1fc9c0a3b85b5f30a0b170508a4cd789665e820 | [
"MIT"
] | null | null | null | tests/test_clusters.py | mike10004/smatterscripts | d1fc9c0a3b85b5f30a0b170508a4cd789665e820 | [
"MIT"
] | null | null | null | tests/test_clusters.py | mike10004/smatterscripts | d1fc9c0a3b85b5f30a0b170508a4cd789665e820 | [
"MIT"
] | null | null | null | from unittest import TestCase
import io
from shelltools.clusters import UndirectedEdge, UndirectedAdjacencySetGraph, EdgeParser
import logging
_log = logging.getLogger(__name__)
class UndirectedEdgeTest(TestCase):
def test_create(self):
edge = UndirectedEdge('a', 'b', 3.0)
self.assertIsInstance(... | 33.13913 | 91 | 0.50433 |
c956e1bc2ef81a259fb5ec17fc6bf0450e3864a8 | 6,974 | py | Python | example.py | kstaniek/pampio | 91b4246d6d350f4051d4baf6f900c9918663d737 | [
"Apache-2.0"
] | 2 | 2019-02-07T14:33:45.000Z | 2020-09-26T08:43:32.000Z | example.py | kstaniek/pampio | 91b4246d6d350f4051d4baf6f900c9918663d737 | [
"Apache-2.0"
] | null | null | null | example.py | kstaniek/pampio | 91b4246d6d350f4051d4baf6f900c9918663d737 | [
"Apache-2.0"
] | null | null | null | """
To test Ampio Client
"""
import asyncio
import logging
import multiprocessing
from pampio.ampioip import AmpioIPClient
from pampio.frame import CAN
HOST = '172.31.20.1'
PORT = 1234
logging.basicConfig(format='%(asctime)-15s %(levelname)8s: %(message)s', level=logging.INFO)
def mask_to_indices(mask):
"""... | 32.437209 | 122 | 0.605248 |
ea9d9229ddfea0e901b73a5c374b6c2166c7c9fd | 2,563 | py | Python | src/pretalx/common/templatetags/rich_text.py | wjwoodson/pretalx | 935d0295e408a3518bf472147cc16722c44fe3fb | [
"Apache-2.0"
] | 1 | 2021-06-19T02:33:29.000Z | 2021-06-19T02:33:29.000Z | src/pretalx/common/templatetags/rich_text.py | AKJK-Internet-32002/pretalx | 062177a8a361dd57a8889e2dd422beec505881a9 | [
"Apache-2.0"
] | null | null | null | src/pretalx/common/templatetags/rich_text.py | AKJK-Internet-32002/pretalx | 062177a8a361dd57a8889e2dd422beec505881a9 | [
"Apache-2.0"
] | null | null | null | from copy import copy
from functools import partial
import bleach
import markdown
from django import template
from django.utils.safestring import mark_safe
from publicsuffixlist import PublicSuffixList
register = template.Library()
ALLOWED_TAGS = [
"a", # Keep in first position for link_cleaner
"abbr",
... | 21.537815 | 147 | 0.619977 |
42e7e0e47cf914387ddac55266775da5b68a5515 | 31,769 | py | Python | RunBenchmarks.py | jyoung3131/BarrierPoint | 04c0727b93da60651f049f44746562386d94929c | [
"Apache-2.0",
"MIT"
] | 8 | 2020-05-21T18:49:37.000Z | 2022-02-08T00:54:09.000Z | RunBenchmarks.py | jyoung3131/BarrierPoint | 04c0727b93da60651f049f44746562386d94929c | [
"Apache-2.0",
"MIT"
] | null | null | null | RunBenchmarks.py | jyoung3131/BarrierPoint | 04c0727b93da60651f049f44746562386d94929c | [
"Apache-2.0",
"MIT"
] | 7 | 2020-11-16T21:35:58.000Z | 2021-07-31T09:34:08.000Z | #!/usr/bin/env python
# Copyright (c) 2020, Arm Limited and Contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 43.519178 | 137 | 0.56275 |
c7499c4fce75d94717f8958b2e99e3affcd5ab7d | 824 | py | Python | src/perusatproc/util.py | dymaxionlabs/perusatproc | ce2acc62e53905af8215a6d8821f284792342f2b | [
"MIT"
] | 3 | 2021-02-18T20:11:26.000Z | 2021-12-08T15:36:46.000Z | src/perusatproc/util.py | dymaxionlabs/perusatproc | ce2acc62e53905af8215a6d8821f284792342f2b | [
"MIT"
] | null | null | null | src/perusatproc/util.py | dymaxionlabs/perusatproc | ce2acc62e53905af8215a6d8821f284792342f2b | [
"MIT"
] | 2 | 2020-05-08T20:17:31.000Z | 2020-06-20T14:31:09.000Z | # -*- coding: utf-8 -*-
import logging
import os
import subprocess
import sys
__author__ = "Damián Silvani"
__copyright__ = "Dymaxion Labs"
__license__ = "mit"
_logger = logging.getLogger(__name__)
def run_command(cmd):
_logger.info(cmd)
subprocess.run(cmd, shell=True, check=True)
def run_otb_command(cmd... | 26.580645 | 75 | 0.662621 |
a3d7b08883771e9d99c1dd4b89bd280140ca30c6 | 3,230 | py | Python | Lib/test/json_tests/test_decode.py | deadsnakes/python3.2 | c0deccc710b5c1c8dd40a1c6d46a8271b60617f1 | [
"PSF-2.0"
] | null | null | null | Lib/test/json_tests/test_decode.py | deadsnakes/python3.2 | c0deccc710b5c1c8dd40a1c6d46a8271b60617f1 | [
"PSF-2.0"
] | null | null | null | Lib/test/json_tests/test_decode.py | deadsnakes/python3.2 | c0deccc710b5c1c8dd40a1c6d46a8271b60617f1 | [
"PSF-2.0"
] | null | null | null | import decimal
from io import StringIO
from collections import OrderedDict
from test.json_tests import PyTest, CTest
class TestDecode:
def test_decimal(self):
rval = self.loads('1.1', parse_float=decimal.Decimal)
self.assertTrue(isinstance(rval, decimal.Decimal))
self.assertEqual(rval, dec... | 40.886076 | 77 | 0.587926 |
0d46ae3e8e42a6430a353c8ba328334b2c1f2a46 | 4,290 | py | Python | powerline/setup.py | codeprimate/arid | d121dc74b9d611e07e0fa1077de3c070c142c0df | [
"BSD-2-Clause"
] | null | null | null | powerline/setup.py | codeprimate/arid | d121dc74b9d611e07e0fa1077de3c070c142c0df | [
"BSD-2-Clause"
] | null | null | null | powerline/setup.py | codeprimate/arid | d121dc74b9d611e07e0fa1077de3c070c142c0df | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import os
import sys
import subprocess
import logging
import shlex
from traceback import print_exc
from setuptools import setup, find_packages
CURRENT_DIR = os.path.abspath(os.pat... | 31.544118 | 107 | 0.708858 |
1d9ae3db0ee35b5ad048bfd8c66b22ced3961bdc | 6,534 | py | Python | depth2mesh/utils/sdf_meshing.py | taconite/MetaAvatar-release | c9403a478ee82232633d25f65f108befd21d04e9 | [
"MIT"
] | 60 | 2021-12-06T03:28:26.000Z | 2022-03-23T20:45:11.000Z | depth2mesh/utils/sdf_meshing.py | taconite/MetaAvatar-release | c9403a478ee82232633d25f65f108befd21d04e9 | [
"MIT"
] | 2 | 2022-01-13T14:27:51.000Z | 2022-03-03T05:17:45.000Z | depth2mesh/utils/sdf_meshing.py | taconite/MetaAvatar-release | c9403a478ee82232633d25f65f108befd21d04e9 | [
"MIT"
] | 7 | 2021-12-07T09:25:06.000Z | 2022-02-25T04:53:41.000Z | '''From the DeepSDF repository https://github.com/facebookresearch/DeepSDF
'''
#!/usr/bin/env python3
import logging
import numpy as np
import plyfile
import skimage.measure
import time
import torch
import torch.nn.functional as F
import depth2mesh.utils.diff_operators as diff_operators
logger = logging.getLogger(__... | 35.129032 | 152 | 0.602694 |
ad0fc4e8ed02f3b59644637687926f01800a17b5 | 1,297 | py | Python | parse_config.py | Siddhant021295/Gesture-Recognation-IPN-Hands | cd9bff56b88daa8c9d4397974e96baa599851d59 | [
"MIT"
] | 3 | 2021-07-07T10:49:44.000Z | 2021-11-26T09:50:19.000Z | parse_config.py | Siddhant021295/Gesture-Recognation-IPN-Hands | cd9bff56b88daa8c9d4397974e96baa599851d59 | [
"MIT"
] | null | null | null | parse_config.py | Siddhant021295/Gesture-Recognation-IPN-Hands | cd9bff56b88daa8c9d4397974e96baa599851d59 | [
"MIT"
] | 2 | 2021-07-11T04:58:31.000Z | 2021-07-22T17:33:16.000Z |
def parse_model_config(path):
"""Parses the yolo-v3 layer configuration file and returns module definitions"""
file = open(path, 'r')
lines = file.read().split('\n')
lines = [x for x in lines if x and not x.startswith('#')]
lines = [x.rstrip().lstrip() for x in lines] # get rid of fringe wh... | 35.054054 | 85 | 0.550501 |
929ceb3e13a99f34dca68254875914a8f809639a | 1,249 | py | Python | scripts/lbplot/src/parser.py | andy-yoo/lbann-andy | 237c45c392e7a5548796ac29537ab0a374e7e825 | [
"Apache-2.0"
] | null | null | null | scripts/lbplot/src/parser.py | andy-yoo/lbann-andy | 237c45c392e7a5548796ac29537ab0a374e7e825 | [
"Apache-2.0"
] | null | null | null | scripts/lbplot/src/parser.py | andy-yoo/lbann-andy | 237c45c392e7a5548796ac29537ab0a374e7e825 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import re
_parse_list = [
('train_loss', 'training epoch ([0-9]+) objective function : ([0-9.]+)', lambda r: float(r.group(2))),
('train_acc', 'training epoch ([0-9]+) categorical accuracy : ([0-9.]+)', lambda r: float(r.group(2))/100.0),
('train_time', 'training epoch ([0-9]+) run ... | 46.259259 | 113 | 0.598078 |
b038ec0be5dbbf4f128458b9263eb17733359f05 | 849 | py | Python | fairseq/data/audio_reader.py | carlosep93/LANGSPEC | 8c8f55d999d79628a56f48d4e1a8918f8c426f72 | [
"BSD-3-Clause"
] | 26 | 2019-11-01T09:26:17.000Z | 2022-03-31T14:35:19.000Z | fairseq/data/audio_reader.py | carlosep93/LANGSPEC | 8c8f55d999d79628a56f48d4e1a8918f8c426f72 | [
"BSD-3-Clause"
] | 12 | 2019-12-27T02:38:37.000Z | 2021-03-09T14:03:25.000Z | fairseq/data/audio_reader.py | carlosep93/LANGSPEC | 8c8f55d999d79628a56f48d4e1a8918f8c426f72 | [
"BSD-3-Clause"
] | 14 | 2019-10-11T14:17:15.000Z | 2021-05-05T17:49:06.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import h5py
import numpy as np
imp... | 28.3 | 78 | 0.644287 |
7f1a93ec5da6f110e01ce57bf91b699cd68294b4 | 13,598 | py | Python | V2RaycSpider1225/src/BusinessLogicLayer/cluster/slavers/actions.py | yzjmxy/V2RayCloudSpider | 3d04d8bbeb57b26ff6efda4d1ed1f382f72bd757 | [
"MIT"
] | null | null | null | V2RaycSpider1225/src/BusinessLogicLayer/cluster/slavers/actions.py | yzjmxy/V2RayCloudSpider | 3d04d8bbeb57b26ff6efda4d1ed1f382f72bd757 | [
"MIT"
] | null | null | null | V2RaycSpider1225/src/BusinessLogicLayer/cluster/slavers/actions.py | yzjmxy/V2RayCloudSpider | 3d04d8bbeb57b26ff6efda4d1ed1f382f72bd757 | [
"MIT"
] | null | null | null | # =============================================
# ActionOhrCloud
# - change log:
# - 2021-06-16 [停用]无免费节点
# =============================================
ActionOhrCloud = {
"name": "ActionOhrCloud",
"register_url": "https://www.ssr99.xyz/auth/register",
"life_cycle": 2,
"anti_slider": False,
"hype... | 29.625272 | 69 | 0.472643 |
8456a54bf093bfb33837589fe99ceac7d2840394 | 4,137 | py | Python | sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py | ujjwalsh/katib | eb4207af3688210e783e3b0aafa826014f897c4e | [
"Apache-2.0"
] | 2 | 2021-06-24T13:21:01.000Z | 2021-06-24T13:29:28.000Z | sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py | ujjwalsh/katib | eb4207af3688210e783e3b0aafa826014f897c4e | [
"Apache-2.0"
] | 669 | 2021-01-25T10:26:46.000Z | 2022-03-31T22:01:58.000Z | sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py | ujjwalsh/katib | eb4207af3688210e783e3b0aafa826014f897c4e | [
"Apache-2.0"
] | 1 | 2021-09-10T06:56:10.000Z | 2021-09-10T06:56:10.000Z | # coding: utf-8
"""
Katib
Swagger description for Katib # noqa: E501
OpenAPI spec version: v1beta1-0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from kubeflow.katib.models.v1beta1_graph_config import V1beta1GraphCon... | 28.531034 | 92 | 0.595117 |
fd4fe4661596ff19b39e8764c54ab8a16618833a | 270 | py | Python | mvlearn/__init__.py | akoul1/mvlearn | 177d391bb12c6e94335720d9af3608bd719d8be1 | [
"Apache-2.0"
] | null | null | null | mvlearn/__init__.py | akoul1/mvlearn | 177d391bb12c6e94335720d9af3608bd719d8be1 | [
"Apache-2.0"
] | null | null | null | mvlearn/__init__.py | akoul1/mvlearn | 177d391bb12c6e94335720d9af3608bd719d8be1 | [
"Apache-2.0"
] | null | null | null | """
Multiview Learning module for Python
==================================
multiview is a Python module for various multiview learning functionalities.
TODO: add better summary once MVP is determined
"""
# Put top level functionalities in here
__version__ = "0.0.1"
| 22.5 | 76 | 0.677778 |
579c6359ac760c05ce780af8c98d86c866a6d35d | 16 | py | Python | code.py | csagar131/pytasks | 65cd6464de3614b8b4a83f94402644b19aa82f1d | [
"Apache-2.0"
] | null | null | null | code.py | csagar131/pytasks | 65cd6464de3614b8b4a83f94402644b19aa82f1d | [
"Apache-2.0"
] | null | null | null | code.py | csagar131/pytasks | 65cd6464de3614b8b4a83f94402644b19aa82f1d | [
"Apache-2.0"
] | null | null | null | print("task 1")
| 8 | 15 | 0.625 |
af9e5bea0acaddf89c6462b065bf1667ff375b3a | 2,100 | py | Python | operators/knative-kafka-operator/python/pulumi_pulumi_kubernetes_crds_operators_knative_kafka_operator/provider.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | null | null | null | operators/knative-kafka-operator/python/pulumi_pulumi_kubernetes_crds_operators_knative_kafka_operator/provider.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | 2 | 2020-09-18T17:12:23.000Z | 2020-12-30T19:40:56.000Z | operators/knative-kafka-operator/python/pulumi_pulumi_kubernetes_crds_operators_knative_kafka_operator/provider.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by crd2pulumi. ***
# *** 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
from . import _utilities, _tables
__all__ = ['Provide... | 38.181818 | 134 | 0.647619 |
183170778a8b01da01b70eeb36296ad0b5d82619 | 3,355 | py | Python | src/deeplab/datasets/pascal_voc_seg/VOCdevkit/VOCevalseg.py | abdullah-zaiter/Semantic-Segmentation | 6d48575ce958a13bd653c76c343fb789328ea295 | [
"MIT"
] | 1 | 2019-09-13T18:10:18.000Z | 2019-09-13T18:10:18.000Z | src/deeplab/datasets/pascal_voc_seg/VOCdevkit/VOCevalseg.py | abdullah-zaiter/Semantic-Segmentation | 6d48575ce958a13bd653c76c343fb789328ea295 | [
"MIT"
] | null | null | null | src/deeplab/datasets/pascal_voc_seg/VOCdevkit/VOCevalseg.py | abdullah-zaiter/Semantic-Segmentation | 6d48575ce958a13bd653c76c343fb789328ea295 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
def eval_seg(exp_id, tset):
'''
Retorna acurácia de cada classe, acurácia média e matriz de confusão.
exp_id: nome do experimento a ser avaliado
tset: "train", "val" ou "test" set
'''
classes = [
'aeropla... | 32.572816 | 153 | 0.539195 |
f00404e3a69eb03d807de0f800b0b6f0d5de6f2a | 116,671 | py | Python | Lib/site-packages/phonenumbers/tzdata/data0.py | MasterVictor/Portafolio | 4bd59d19de41fbea5317d4f2b9e6219ea0359945 | [
"bzip2-1.0.6"
] | 3 | 2020-03-30T13:11:57.000Z | 2020-04-22T13:55:31.000Z | Lib/site-packages/phonenumbers/tzdata/data0.py | MasterVictor/Portafolio | 4bd59d19de41fbea5317d4f2b9e6219ea0359945 | [
"bzip2-1.0.6"
] | 12 | 2020-06-05T23:59:38.000Z | 2022-03-12T00:02:08.000Z | Lib/site-packages/phonenumbers/tzdata/data0.py | PsychedVic/Portafolio | 4bd59d19de41fbea5317d4f2b9e6219ea0359945 | [
"bzip2-1.0.6"
] | 2 | 2018-02-09T13:52:15.000Z | 2019-09-10T08:36:25.000Z | """Per-prefix data, mapping each prefix to a name.
Auto-generated file, do not edit by hand.
"""
from ..util import u
# Copyright (C) 2011-2019 The Libphonenumber 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 ob... | 34.610205 | 842 | 0.64147 |
ddd39314303bca9828c70f5ec0ca2d1fb81b733b | 500 | py | Python | images/notebook/base-jupyter-config.py | hillstreetblues/nrelabs-curriculum | eb8594f9243947cbffa9f113d7e0cb1cf715f20a | [
"Apache-2.0"
] | null | null | null | images/notebook/base-jupyter-config.py | hillstreetblues/nrelabs-curriculum | eb8594f9243947cbffa9f113d7e0cb1cf715f20a | [
"Apache-2.0"
] | null | null | null | images/notebook/base-jupyter-config.py | hillstreetblues/nrelabs-curriculum | eb8594f9243947cbffa9f113d7e0cb1cf715f20a | [
"Apache-2.0"
] | null | null | null | # Disabling all security for now (NEED TO REMEMBER TO RE ENABLE THIS)
c.NotebookApp.token = ''
c.NotebookApp.password = ''
# hash is "juniper"
# c.NotebookApp.password = 'sha1:9fd6b8a45182:3cdeb2d4e19729e0bbb6504c5c3ebc98de5d23b1'
# c.NotebookApp.password_required = False
c.NotebookApp.notebook_dir = '/antidote'
# F... | 41.666667 | 148 | 0.772 |
8f78d10575dc2f976322caa0c0f247e2d0c23c25 | 768 | py | Python | scripts/build_fixtures.py | pnsn/squac_api | 7b1741cd32dbc32972f75ac53958468fdf7d04ee | [
"MIT"
] | 6 | 2019-11-07T09:32:43.000Z | 2021-09-02T22:37:14.000Z | scripts/build_fixtures.py | pnsn/squacapi | e330a925aff38937656983841e495ba3824c11e1 | [
"MIT"
] | 196 | 2019-10-04T17:03:36.000Z | 2022-03-31T17:54:59.000Z | scripts/build_fixtures.py | pnsn/squac_api | 7b1741cd32dbc32972f75ac53958468fdf7d04ee | [
"MIT"
] | null | null | null | import json
'''assemble individual fixture files into single fixture. This 'should' be a
one-off. Future fixture updates can be added by hand, either by hand, as
would be easiest for permission, or by directly editing fixtures/all.json
'''
with open('./app/fixtures/base.json') as f:
base = json.load(f)
# c... | 36.571429 | 77 | 0.692708 |
1c403e410b2f69d84e79c61035f85fe8687ac95e | 2,162 | py | Python | models/user.py | Leaniz/gordologo | fcd8b8a3bfea1fb6e597dfd1701884ddd07db107 | [
"MIT"
] | 1 | 2021-08-03T20:06:42.000Z | 2021-08-03T20:06:42.000Z | models/user.py | Leaniz/gordologo | fcd8b8a3bfea1fb6e597dfd1701884ddd07db107 | [
"MIT"
] | null | null | null | models/user.py | Leaniz/gordologo | fcd8b8a3bfea1fb6e597dfd1701884ddd07db107 | [
"MIT"
] | null | null | null | from elasticsearch import Elasticsearch
class UserModel:
elast = Elasticsearch('localhost', port=9200)
elast_idx = "gordologo-users"
def __init__(self, _id, username, email, password_hash):
self.id = _id
self.username = username
self.email = email
self.password_hash = pass... | 27.717949 | 64 | 0.440796 |
3fb715446193732f61f679732d1e56529a233307 | 513 | py | Python | plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name='ticksuffix',
parent_name='scatterpolargl.marker.colorbar',
**kwargs
):
super(TicksuffixValidator, self).__init__(
p... | 27 | 72 | 0.621832 |
00b3b358a792b621fd617b610de0e87bc0d1306f | 1,068 | py | Python | awwards_app/migrations/0002_profile.py | ngetichnicholas/Django-Awwards | be3879ef55ac54831dd317e066de68011c74c094 | [
"MIT"
] | null | null | null | awwards_app/migrations/0002_profile.py | ngetichnicholas/Django-Awwards | be3879ef55ac54831dd317e066de68011c74c094 | [
"MIT"
] | null | null | null | awwards_app/migrations/0002_profile.py | ngetichnicholas/Django-Awwards | be3879ef55ac54831dd317e066de68011c74c094 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-07-17 10:59
import cloudinary.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('a... | 35.6 | 121 | 0.63015 |
7be29f7071748518a876afc36b3feb122ae39043 | 1,436 | py | Python | xlsxwriter/test/comparison/test_textbox05.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-07-01T07:24:37.000Z | 2020-07-01T07:24:37.000Z | xlsxwriter/test/comparison/test_textbox05.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_textbox05.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 26.592593 | 79 | 0.568942 |
1d8dd79ca93d9bebcc162fcd41205759b51f8744 | 118 | py | Python | translatable/__init__.py | artscoop/django-translatable | 5b5c818120bb7afe1f7639fa3181991307fbb3e8 | [
"BSD-3-Clause"
] | null | null | null | translatable/__init__.py | artscoop/django-translatable | 5b5c818120bb7afe1f7639fa3181991307fbb3e8 | [
"BSD-3-Clause"
] | null | null | null | translatable/__init__.py | artscoop/django-translatable | 5b5c818120bb7afe1f7639fa3181991307fbb3e8 | [
"BSD-3-Clause"
] | 1 | 2021-01-05T15:16:46.000Z | 2021-01-05T15:16:46.000Z | __import__('pkg_resources').declare_namespace(__name__)
VERSION = (0, 9, 0)
__version__ = '%d.%d.%d' % VERSION[:3]
| 16.857143 | 55 | 0.677966 |
7d51b093fef108a3e3f76aac64332e939039150b | 2,581 | py | Python | dataspace/charts/bokeh.py | Sam-prog-sudo/dataspace | 2bab85c4dfa713deb835a46e9214c43a3a674082 | [
"MIT"
] | 3 | 2021-06-28T09:45:51.000Z | 2022-01-10T15:38:07.000Z | dataspace/charts/bokeh.py | Sam-prog-sudo/dataspace | 2bab85c4dfa713deb835a46e9214c43a3a674082 | [
"MIT"
] | null | null | null | dataspace/charts/bokeh.py | Sam-prog-sudo/dataspace | 2bab85c4dfa713deb835a46e9214c43a3a674082 | [
"MIT"
] | 1 | 2021-07-01T08:50:32.000Z | 2021-07-01T08:50:32.000Z | from typing import Dict
import pandas as pd
import holoviews as hv
from holoviews.core.data.interface import DataError
from dataspace.core.env import is_notebook
hv.extension("bokeh")
class BokehChart:
x = None
y = None
default_width: int = None
def __init__(self, default_width: int) -> None:
... | 31.864198 | 79 | 0.518404 |
3cf56a4294cc99e9d56be3b6040e28ee740b20ad | 5,774 | py | Python | web/transiq/driver/mahindra.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | null | null | null | web/transiq/driver/mahindra.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | 14 | 2020-06-05T23:06:45.000Z | 2022-03-12T00:00:18.000Z | web/transiq/driver/mahindra.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | null | null | null | import datetime
import requests
from bs4 import BeautifulSoup
from lxml import etree
from api.utils import get_or_none
from driver.models import MahindraGPSDeviceLog, MahindraGPSDevice
from owner.models import Vehicle
from owner.vehicle_util import compare_format
def login():
session = requests.session()
log... | 41.84058 | 111 | 0.623138 |
3cd86b99e572ea45b1525e46033dd21ab0994640 | 39 | py | Python | excript/aulas/aula41_excecao.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | excript/aulas/aula41_excecao.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | excript/aulas/aula41_excecao.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | print("1")
#raise
print("2")
print(3) | 6.5 | 10 | 0.589744 |
e736673029e04c2c8297ac9ed789feb06a43e094 | 46,705 | py | Python | skyline/custom_algorithms/adtk_level_shift.py | datastreaming/skyline-1 | b02de2f40f8deb6ed1fddd0eace5b19a9b59d0de | [
"MIT-0",
"MIT"
] | 396 | 2015-01-08T12:47:53.000Z | 2022-03-23T10:46:50.000Z | skyline/custom_algorithms/adtk_level_shift.py | datastreaming/skyline-1 | b02de2f40f8deb6ed1fddd0eace5b19a9b59d0de | [
"MIT-0",
"MIT"
] | 68 | 2015-03-16T13:42:36.000Z | 2022-01-07T10:10:45.000Z | skyline/custom_algorithms/adtk_level_shift.py | datastreaming/skyline-1 | b02de2f40f8deb6ed1fddd0eace5b19a9b59d0de | [
"MIT-0",
"MIT"
] | 70 | 2015-01-28T13:03:19.000Z | 2022-02-11T03:31:04.000Z | # @added 20210223 - Feature #3970: custom_algorithm - adtk_level_shift
# Task #3664:: POC with adtk
# Feature #3642: Anomaly type classification
# Info #3324: adtk
# REQUIRED Skyline imports. All custom algorithms MUST have the following two
# imports. These are r... | 50.711183 | 170 | 0.580794 |
7debc8536ecacd073c0290c0eb343e6a3b1816a5 | 1,162 | py | Python | src/Webpage.py | ender-titan1/SnapBoltUI | 6c42a12e7dd635cab9f2fe28439aacb748e4ace9 | [
"MIT"
] | null | null | null | src/Webpage.py | ender-titan1/SnapBoltUI | 6c42a12e7dd635cab9f2fe28439aacb748e4ace9 | [
"MIT"
] | 3 | 2021-09-06T12:35:01.000Z | 2021-09-08T06:24:52.000Z | src/Webpage.py | ender-titan1/SnapBoltUI | 6c42a12e7dd635cab9f2fe28439aacb748e4ace9 | [
"MIT"
] | null | null | null | import string
import random
HtmlTagConverter = {
"Text": "p",
"Main": "div"
}
class HtmlTags:
def __init__(self):
self.tags = {
"root": []
}
class CssTags:
def __init__(self):
self.tags = {
"*": [],
"body": [],
"html": []
... | 22.346154 | 161 | 0.524957 |
1a6c576be5ba23b34354d81cad3895fe27a40a5c | 7,575 | py | Python | acq4/drivers/SerialDevice.py | ablot/acq4 | ba7cd340d9d0282640adb501d3788f8c0837e4c4 | [
"MIT"
] | null | null | null | acq4/drivers/SerialDevice.py | ablot/acq4 | ba7cd340d9d0282640adb501d3788f8c0837e4c4 | [
"MIT"
] | null | null | null | acq4/drivers/SerialDevice.py | ablot/acq4 | ba7cd340d9d0282640adb501d3788f8c0837e4c4 | [
"MIT"
] | null | null | null | import serial, time, sys
import logging
class TimeoutError(Exception):
"""Raised when a serial communication times out.
*data* attribute contains any data received so far.
"""
def __init__(self, msg, data):
self.data = data
Exception.__init__(self, msg)
class DataError(Exception):
... | 36.418269 | 112 | 0.588911 |
dd14091285eab6e6066748779708dfbe0a51551c | 4,792 | py | Python | scripts/log_evaluation/GraphicalThreadProfiler.py | malte-storm/Savu | 16291e8a22464c50c511af01fbc648860c1236e6 | [
"Apache-2.0"
] | 1 | 2021-04-18T09:30:54.000Z | 2021-04-18T09:30:54.000Z | scripts/log_evaluation/GraphicalThreadProfiler.py | malte-storm/Savu | 16291e8a22464c50c511af01fbc648860c1236e6 | [
"Apache-2.0"
] | 1 | 2019-07-30T12:31:51.000Z | 2019-07-30T12:31:51.000Z | scripts/log_evaluation/GraphicalThreadProfiler.py | malte-storm/Savu | 16291e8a22464c50c511af01fbc648860c1236e6 | [
"Apache-2.0"
] | 1 | 2021-05-20T16:31:29.000Z | 2021-05-20T16:31:29.000Z | import pandas as pd
import argparse
import tempfile
import os
def convert(log_file_list, path, log_level):
for log_file in log_file_list:
the_key = ""
the_interval = 0 # millisecs
frame = get_frame(log_file, the_key, 'DEBUG')
machine_names = get_machine_names(frame)
if lo... | 33.985816 | 79 | 0.616653 |
c6d35ee731943232d954a8647aaa64e88f3d4da2 | 1,718 | py | Python | examples/07_gashlycrumb/gashlycrumb.py | michaelandrewblum/be434-fall-2021 | 5c2281a99ece283e7ee7d1873708efbef473f3d3 | [
"MIT"
] | null | null | null | examples/07_gashlycrumb/gashlycrumb.py | michaelandrewblum/be434-fall-2021 | 5c2281a99ece283e7ee7d1873708efbef473f3d3 | [
"MIT"
] | null | null | null | examples/07_gashlycrumb/gashlycrumb.py | michaelandrewblum/be434-fall-2021 | 5c2281a99ece283e7ee7d1873708efbef473f3d3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : michaelblum <michaelblum@localhost>
Date : 2021-09-29
Purpose: Gashlycrumb
"""
import argparse
from collections import defaultdict
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
... | 26.84375 | 71 | 0.512224 |
0ea49ef32e87caee2680ecaaa2470a5439b8d105 | 13,446 | py | Python | psdash/node.py | zebulon75018/psdash | bb12d6916d4dad6152638e3e0baf791cea65faf4 | [
"CC0-1.0"
] | null | null | null | psdash/node.py | zebulon75018/psdash | bb12d6916d4dad6152638e3e0baf791cea65faf4 | [
"CC0-1.0"
] | null | null | null | psdash/node.py | zebulon75018/psdash | bb12d6916d4dad6152638e3e0baf791cea65faf4 | [
"CC0-1.0"
] | null | null | null | # coding=UTF-8
import logging
import os
import platform
import psutil
import socket
import time
import zerorpc
from psdash.log import Logs
from psdash.helpers import socket_families, socket_types
from psdash.net import get_interface_addresses, NetIOCounters
logger = logging.getLogger("psdash.node")
class Node(objec... | 33.282178 | 115 | 0.525063 |
f8dd547d819441a7c2e35372a167c705a52503b2 | 7,570 | py | Python | lib/python3.8/site-packages/ansible_collections/community/azure/plugins/modules/azure_rm_applicationsecuritygroup_info.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/community/azure/plugins/modules/azure_rm_applicationsecuritygroup_info.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/community/azure/plugins/modules/azure_rm_applicationsecuritygroup_info.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | #!/usr/bin/python
#
# Copyright (c) 2019 Yunge Zhu, <yungez@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 32.913043 | 160 | 0.625627 |
f394adc9bd58c66394c5847df7efa54b380f30bf | 2,378 | py | Python | ucscentralsdk/mometa/domain/DomainFamilyCapProvider.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/domain/DomainFamilyCapProvider.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/domain/DomainFamilyCapProvider.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for DomainFamilyCapProvider ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class DomainFamilyCapProviderConsts():
FAMILY_UCS_CLASSIC =... | 48.530612 | 249 | 0.66905 |
80b7fbf17d24c7fbfa46a3f3d5b65257351d48ac | 38,090 | py | Python | tests/execution_engine/test_sparkdf_execution_engine.py | balexander/great_expectations | 5b2e02bb0c36c7058e3658e6389510857a10d8b3 | [
"Apache-2.0"
] | 2 | 2020-01-28T13:51:53.000Z | 2020-01-28T23:13:06.000Z | tests/execution_engine/test_sparkdf_execution_engine.py | balexander/great_expectations | 5b2e02bb0c36c7058e3658e6389510857a10d8b3 | [
"Apache-2.0"
] | null | null | null | tests/execution_engine/test_sparkdf_execution_engine.py | balexander/great_expectations | 5b2e02bb0c36c7058e3658e6389510857a10d8b3 | [
"Apache-2.0"
] | 1 | 2021-01-29T01:57:21.000Z | 2021-01-29T01:57:21.000Z | import datetime
import logging
import os
import random
import numpy as np
import pandas as pd
import pytest
import great_expectations.exceptions.exceptions as ge_exceptions
from great_expectations.core.batch_spec import (
PathBatchSpec,
RuntimeDataBatchSpec,
S3BatchSpec,
)
from great_expectations.exceptio... | 34.533092 | 120 | 0.606537 |
f8024ad968495f44ea8b98344f473484138a71c4 | 2,519 | py | Python | tuples.py | arc-arnob/256131 | 645437d7607f186967e0f84c80e6ca976f266622 | [
"Apache-2.0"
] | null | null | null | tuples.py | arc-arnob/256131 | 645437d7607f186967e0f84c80e6ca976f266622 | [
"Apache-2.0"
] | 1 | 2021-04-17T02:47:03.000Z | 2021-04-17T02:47:03.000Z | tuples.py | arc-arnob/256131 | 645437d7607f186967e0f84c80e6ca976f266622 | [
"Apache-2.0"
] | null | null | null | # Empty tuple
my_tuple = ()
print(my_tuple)
# Tuple having integers
my_tuple = (1, 2, 3)
print(my_tuple)
# tuple with mixed datatypes
my_tuple = (1, "Hello", 3.4)
print(my_tuple)
# nested tuple
my_tuple = ("mouse", [8, 4, 6], (1, 2, 3))
print(my_tuple)
my_tuple = 3, 4.6, "dog"
print(my_tuple)
# tuple unpacking is ... | 20.314516 | 60 | 0.608972 |
3fad114bbcd9f9aacdd1fc299355da088b50a649 | 8,454 | py | Python | nets/ssd.py | AugustMe/ssd-tf2 | ce52aa9fcaa21f8f73aabe072c7c1346a5e26291 | [
"MIT"
] | null | null | null | nets/ssd.py | AugustMe/ssd-tf2 | ce52aa9fcaa21f8f73aabe072c7c1346a5e26291 | [
"MIT"
] | null | null | null | nets/ssd.py | AugustMe/ssd-tf2 | ce52aa9fcaa21f8f73aabe072c7c1346a5e26291 | [
"MIT"
] | null | null | null | import tensorflow.keras.backend as K
#from keras.layers import AtrousConvolution2D
from tensorflow.keras.layers import (Activation, Concatenate, Conv2D, Dense,
Flatten, GlobalAveragePooling2D, Input,
MaxPooling2D, Reshape, ZeroPadding2D)
fro... | 51.865031 | 155 | 0.606813 |
ec9f795358a317e7d09f09956d55e77ee805c859 | 1,232 | py | Python | tile_types.py | BarbaAlGhul/advanced-calaboucos-e-cachorros | 66dbc7c903d130b533680eb2afea876af83db29e | [
"MIT"
] | null | null | null | tile_types.py | BarbaAlGhul/advanced-calaboucos-e-cachorros | 66dbc7c903d130b533680eb2afea876af83db29e | [
"MIT"
] | null | null | null | tile_types.py | BarbaAlGhul/advanced-calaboucos-e-cachorros | 66dbc7c903d130b533680eb2afea876af83db29e | [
"MIT"
] | null | null | null | from typing import Tuple
import numpy as np
graphic_dt = np.dtype(
[
("ch", np.int32),
("fg", "3B"),
("bg", "3B")
]
)
tile_dt = np.dtype(
[
("walkable", np.bool8),
("transparent", np.bool8),
("dark", graphic_dt),
("light", graphic_dt)
]
)
def... | 22.814815 | 75 | 0.534903 |
92d1f8cc8208fbe2e3219c92bf7de9b3b9098f6e | 3,278 | py | Python | tools/make_sxp.py | hisahi/malpinx | 3fd3630073d5abc6e53aa18e6672fb3265f5da94 | [
"MIT"
] | null | null | null | tools/make_sxp.py | hisahi/malpinx | 3fd3630073d5abc6e53aa18e6672fb3265f5da94 | [
"MIT"
] | null | null | null | tools/make_sxp.py | hisahi/malpinx | 3fd3630073d5abc6e53aa18e6672fb3265f5da94 | [
"MIT"
] | null | null | null | import sys
import os.path
import struct
import array
import wave
import decimal
def make_8bit_mono(frame, width, channels):
candidates = []
for c in range(channels):
if width > 1:
candidates.append(unpack_sample(frame[((c + 1) * width) - 1]))
else:
candida... | 29.8 | 78 | 0.555827 |
8976e5ee56462e9a6f4d76eda87f965f39238b73 | 7,170 | py | Python | models/Conformer_encoder/convolution.py | llxcn/conformer_Informer | 4d39683f9e42d88474e47d02ecb9a872ecf2fa42 | [
"Apache-2.0"
] | null | null | null | models/Conformer_encoder/convolution.py | llxcn/conformer_Informer | 4d39683f9e42d88474e47d02ecb9a872ecf2fa42 | [
"Apache-2.0"
] | null | null | null | models/Conformer_encoder/convolution.py | llxcn/conformer_Informer | 4d39683f9e42d88474e47d02ecb9a872ecf2fa42 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, Soohwan Kim. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 37.736842 | 115 | 0.645607 |
cabac653d3eed77b70fcacc2fe69d58bbf300154 | 354 | py | Python | src/pytest_zebrunner/utils.py | p4m-dev/pytest_zebrunner | ceb5cc92727061dd461ad68fad65d29ff1dc9c94 | [
"Apache-2.0"
] | null | null | null | src/pytest_zebrunner/utils.py | p4m-dev/pytest_zebrunner | ceb5cc92727061dd461ad68fad65d29ff1dc9c94 | [
"Apache-2.0"
] | 7 | 2020-11-24T12:19:38.000Z | 2021-03-23T11:53:57.000Z | src/pytest_zebrunner/utils.py | p4m-dev/pytest_zebrunner | ceb5cc92727061dd461ad68fad65d29ff1dc9c94 | [
"Apache-2.0"
] | null | null | null | class Singleton(type):
"""
A class that inherit form 'type' and allows to implement Singleton Pattern.
"""
__instance = None
def __call__(cls, *args, **kwargs): # type: ignore
if not isinstance(cls.__instance, cls):
cls.__instance = super(Singleton, cls).__call__(*args, **kwarg... | 29.5 | 79 | 0.635593 |
20242c4eb70003a9cfb0330ef06302a11337ec5b | 4,776 | py | Python | test/functional/rpc_deriveaddresses.py | cruro/cruro | 80aa93365db5e6653bb8235fb61914ee4aa087e8 | [
"MIT"
] | null | null | null | test/functional/rpc_deriveaddresses.py | cruro/cruro | 80aa93365db5e6653bb8235fb61914ee4aa087e8 | [
"MIT"
] | null | null | null | test/functional/rpc_deriveaddresses.py | cruro/cruro | 80aa93365db5e6653bb8235fb61914ee4aa087e8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2019 The Cruro Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the deriveaddresses rpc call."""
from test_framework.test_framework import BitcoinTestFramework
from... | 85.285714 | 297 | 0.820561 |
4eff3beae85a07e3d0246d4055daef5ba412cab0 | 316 | py | Python | rosplan_demos_interfaces/rosplan_interface_kbs/setup.py | knowledge-based-systems-course/rosplan_demos | 2e3d79a0f78ef8e1c553428f28dce669e772da1e | [
"BSD-2-Clause"
] | null | null | null | rosplan_demos_interfaces/rosplan_interface_kbs/setup.py | knowledge-based-systems-course/rosplan_demos | 2e3d79a0f78ef8e1c553428f28dce669e772da1e | [
"BSD-2-Clause"
] | null | null | null | rosplan_demos_interfaces/rosplan_interface_kbs/setup.py | knowledge-based-systems-course/rosplan_demos | 2e3d79a0f78ef8e1c553428f28dce669e772da1e | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# for your packages to be recognized by python
d = generate_distutils_setup(
packages=['rosplan_interface_kbs'],
package_dir={'rosplan_interface_kbs': 'src/rosplan_interface_kbs'}
)
setup(**d)
| 24.307692 | 68 | 0.797468 |
98ca10689524516aabd0e248d767bf4a27d42e92 | 67,804 | py | Python | release/scripts/addons/archipack/archipack_door.py | noorbeast/BlenderSource | 65ebecc5108388965678b04b43463b85f6c69c1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/addons/archipack/archipack_door.py | noorbeast/BlenderSource | 65ebecc5108388965678b04b43463b85f6c69c1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/addons/archipack/archipack_door.py | noorbeast/BlenderSource | 65ebecc5108388965678b04b43463b85f6c69c1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # -*- coding:utf-8 -*-
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# ... | 35.705108 | 117 | 0.508716 |
3f99007eb0c49acf2e25aac621a583c7bcb1719b | 1,766 | py | Python | Remark/TagParsers/Remark_TagParser.py | kaba2/remark | 42a0f91f1f6da49f09dcdfa272542c63c87932e0 | [
"MIT"
] | null | null | null | Remark/TagParsers/Remark_TagParser.py | kaba2/remark | 42a0f91f1f6da49f09dcdfa272542c63c87932e0 | [
"MIT"
] | null | null | null | Remark/TagParsers/Remark_TagParser.py | kaba2/remark | 42a0f91f1f6da49f09dcdfa272542c63c87932e0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Description: Remark tag parser
# Detail: Parses the description-tag from the header, and tags based on names.
# Documentation: tag_parsers.txt
from Remark.TagParsers.Dictionary_TagParser import Dictionary_TagParser
from Remark.FileSystem import openFileUtf8, globalOptions
import string
impo... | 36.791667 | 78 | 0.575878 |
760449b763270b00e827ffafaae4e4f183a7eb5f | 598 | py | Python | objax/_version.py | jmarrietar/objax | 3d7e115603c218bd23d6feb4f3a3415780835aed | [
"Apache-2.0"
] | null | null | null | objax/_version.py | jmarrietar/objax | 3d7e115603c218bd23d6feb4f3a3415780835aed | [
"Apache-2.0"
] | null | null | null | objax/_version.py | jmarrietar/objax | 3d7e115603c218bd23d6feb4f3a3415780835aed | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.375 | 74 | 0.757525 |
185630e811154125736b724fd834e15596853a48 | 686 | py | Python | app/core/migrations/0003_ingredient.py | nikinsaw/recipe-app-api | 9815654cd1a5c9195625527facde55820f055867 | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | nikinsaw/recipe-app-api | 9815654cd1a5c9195625527facde55820f055867 | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | nikinsaw/recipe-app-api | 9815654cd1a5c9195625527facde55820f055867 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-10-06 01:37
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_tag'),
]
operations = [
migrations.CreateModel(
... | 28.583333 | 118 | 0.618076 |
b08e135412be468422e98623abac309341b5fbd5 | 4,644 | py | Python | model_lib.py | mad-lab/mismatch_crispri | dc6929a6512f0fa68130a56ff81539bd3c316f10 | [
"MIT"
] | 1 | 2020-10-22T00:32:53.000Z | 2020-10-22T00:32:53.000Z | model_lib.py | mad-lab/mismatch_crispri | dc6929a6512f0fa68130a56ff81539bd3c316f10 | [
"MIT"
] | 1 | 2019-10-21T18:20:24.000Z | 2019-10-21T18:20:24.000Z | model_lib.py | mad-lab/mismatch_crispri | dc6929a6512f0fa68130a56ff81539bd3c316f10 | [
"MIT"
] | 1 | 2019-10-21T15:30:44.000Z | 2019-10-21T15:30:44.000Z | #!/usr/bin/env python
# Author: John Hawkins (jsh) [really@gmail.com]
import itertools
import joblib
import logging
import os.path
import pathlib
import random
import shutil
import sys
import numpy as np
import pandas as pd
from pandas.api.types import CategoricalDtype
from sklearn import preprocessing as skpreproc
f... | 33.89781 | 79 | 0.708441 |
cb4a354ee4d38bba8fd3d9a9bf4f6862b8a88bb8 | 1,679 | py | Python | click-filter-3.py | no-such-anthony/nornir3_play | 80f01e07dfdb3dd84b8842f28fd21490f695e219 | [
"Apache-2.0"
] | 1 | 2021-05-04T14:03:58.000Z | 2021-05-04T14:03:58.000Z | click-filter-3.py | no-such-anthony/nornir3_play | 80f01e07dfdb3dd84b8842f28fd21490f695e219 | [
"Apache-2.0"
] | null | null | null | click-filter-3.py | no-such-anthony/nornir3_play | 80f01e07dfdb3dd84b8842f28fd21490f695e219 | [
"Apache-2.0"
] | 2 | 2020-11-01T04:53:53.000Z | 2021-01-01T19:49:50.000Z | #!/usr/bin/env python
from nornir import InitNornir
import click
import re
#
#uses custom filter with regex
#single search key, multiple search values
#
#examples
#python <script> name host1 host4
#python <script> name "host1|host2"
#python <script> name host[12]
#python <script> groups wil.* barn.*
#p... | 23.985714 | 109 | 0.614056 |
5221cf0e9130d58a395cd518313183a7984a1937 | 11,241 | py | Python | xarray/backends/rasterio_.py | plogerais/xarray | 0f70a876759197388d32d6d9f0317f0fe63e0336 | [
"Apache-2.0"
] | 2 | 2019-03-11T12:37:15.000Z | 2021-07-16T15:09:41.000Z | xarray/backends/rasterio_.py | plogerais/xarray | 0f70a876759197388d32d6d9f0317f0fe63e0336 | [
"Apache-2.0"
] | 2 | 2018-10-04T06:56:42.000Z | 2018-10-04T07:11:13.000Z | xarray/backends/rasterio_.py | plogerais/xarray | 0f70a876759197388d32d6d9f0317f0fe63e0336 | [
"Apache-2.0"
] | 1 | 2019-12-02T09:29:55.000Z | 2019-12-02T09:29:55.000Z | import os
from collections import OrderedDict
from distutils.version import LooseVersion
import warnings
import numpy as np
from .. import DataArray
from ..core import indexing
from ..core.utils import is_scalar
from .common import BackendArray, PickleByReconstructionWrapper
try:
from dask.utils import Serializa... | 36.028846 | 109 | 0.611245 |
b46ef9fd274278e513a244774daa8af53f3c8eff | 1,213 | py | Python | neutron/db/allowed_address_pairs/models.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | null | null | null | neutron/db/allowed_address_pairs/models.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-27T00:48:55.000Z | 2015-04-21T05:29:37.000Z | neutron/db/allowed_address_pairs/models.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-26T00:55:17.000Z | 2020-03-01T17:05:40.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
# d... | 39.129032 | 78 | 0.688376 |
4c521a61da566011e1eda33af7670c65f7964785 | 4,650 | py | Python | src/probnum/linalg/solvers/policies/_conjugate_gradient.py | NDOWAH/probnum | 91a5cf920fe0793d01f3d7dae4b3909c4a74d201 | [
"MIT"
] | null | null | null | src/probnum/linalg/solvers/policies/_conjugate_gradient.py | NDOWAH/probnum | 91a5cf920fe0793d01f3d7dae4b3909c4a74d201 | [
"MIT"
] | null | null | null | src/probnum/linalg/solvers/policies/_conjugate_gradient.py | NDOWAH/probnum | 91a5cf920fe0793d01f3d7dae4b3909c4a74d201 | [
"MIT"
] | null | null | null | """Policy returning :math:`A`-conjugate actions."""
from typing import Callable, Iterable, Optional, Tuple
import numpy as np
import probnum # pylint: disable="unused-import"
from probnum import linops, randvars
from . import _linear_solver_policy
class ConjugateGradientPolicy(_linear_solver_policy.LinearSolverP... | 38.429752 | 122 | 0.646237 |
6ca06875a059380a3c72c60f4c7147a6a1d9173c | 782 | py | Python | infrared/common/filter_plugins/absolute_path.py | asyedham/infrared | cf5984ffe8d4b05be1e6fd70bd1726834be2f372 | [
"Apache-2.0"
] | 80 | 2017-03-16T14:25:03.000Z | 2021-12-26T05:38:40.000Z | infrared/common/filter_plugins/absolute_path.py | asyedham/infrared | cf5984ffe8d4b05be1e6fd70bd1726834be2f372 | [
"Apache-2.0"
] | 120 | 2017-02-06T12:47:47.000Z | 2021-12-27T21:35:55.000Z | infrared/common/filter_plugins/absolute_path.py | asyedham/infrared | cf5984ffe8d4b05be1e6fd70bd1726834be2f372 | [
"Apache-2.0"
] | 82 | 2017-02-21T12:22:54.000Z | 2022-01-17T15:36:07.000Z | import os
def absolute_path(target_path, rel_dir=None):
"""Returns an absolute path for a given target path
If target_path is empty, rel_dir or cwd will be returned
:param target_path: Target path to be "absolutized"
:param rel_dir: A path to a base relative dir
:return: (str) Absolute path of th... | 25.225806 | 64 | 0.675192 |
fe7878b64a95fee915bc902e66bd5d5169e5dc57 | 3,336 | py | Python | src/data_processing.py | JaredSplinter/dsci_532_group23 | 328e4d876b1c5e432c5bdbc2e0e43e8ba5237896 | [
"MIT"
] | null | null | null | src/data_processing.py | JaredSplinter/dsci_532_group23 | 328e4d876b1c5e432c5bdbc2e0e43e8ba5237896 | [
"MIT"
] | 15 | 2021-01-15T22:12:32.000Z | 2021-02-07T06:56:53.000Z | src/data_processing.py | JaredSplinter/dsci_532_group23 | 328e4d876b1c5e432c5bdbc2e0e43e8ba5237896 | [
"MIT"
] | 5 | 2021-01-12T21:33:33.000Z | 2021-08-16T02:25:10.000Z | from pathlib import Path
import pandas as pd
from .__init__ import getlog
# TODO Need to find data for world country population per year from 1980 ->
log = getlog(__name__)
p_data = Path(__file__).parents[1] / 'data'
name = 'world_energy'
p_raw = p_data / f'{name}_raw.csv'
p_clean = p_data / f'{name}.csv'
def df_... | 32.38835 | 94 | 0.583933 |
95098d4dab6a41173c366b7e1817984e45fa75e1 | 3,569 | py | Python | PC/layout/support/options.py | Krrishdhaneja/cpython | 9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578 | [
"0BSD"
] | 1 | 2020-10-25T16:33:22.000Z | 2020-10-25T16:33:22.000Z | PC/layout/support/options.py | Krrishdhaneja/cpython | 9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578 | [
"0BSD"
] | null | null | null | PC/layout/support/options.py | Krrishdhaneja/cpython | 9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578 | [
"0BSD"
] | null | null | null | """
List of optional components.
"""
__author__ = "Steve Dower <steve.dower@python.org>"
__version__ = "3.8"
__all__ = []
def public(f):
__all__.append(f.__name__)
return f
OPTIONS = {
"stable": {"help": "stable ABI stub"},
"pip": {"help": "pip"},
"pip-user": {"help": "pip.... | 26.242647 | 86 | 0.465677 |
acf3c6d564cc91f7be0b9f642a05a30d4d8d0d01 | 674 | py | Python | WebMirror/management/rss_parser_funcs/feed_parse_extractUminovelBlogspotCom.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 193 | 2016-08-02T22:04:35.000Z | 2022-03-09T20:45:41.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractUminovelBlogspotCom.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 533 | 2016-08-23T20:48:23.000Z | 2022-03-28T15:55:13.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractUminovelBlogspotCom.py | rrosajp/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 19 | 2015-08-13T18:01:08.000Z | 2021-07-12T17:13:09.000Z | def extractUminovelBlogspotCom(item):
'''
Parser for 'uminovel.blogspot.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('With contract Skill many Brides!', 'With contract Skill many Br... | 33.7 | 116 | 0.623145 |
401ea07fe2615dbbcf0b672a0bcddd78b8b1792a | 2,289 | py | Python | bill/getGmailData.py | Veblin/pythonDemo | d2ae7aab3addaf1e0cb6594c82c3b1d334ba209f | [
"MIT"
] | null | null | null | bill/getGmailData.py | Veblin/pythonDemo | d2ae7aab3addaf1e0cb6594c82c3b1d334ba209f | [
"MIT"
] | null | null | null | bill/getGmailData.py | Veblin/pythonDemo | d2ae7aab3addaf1e0cb6594c82c3b1d334ba209f | [
"MIT"
] | null | null | null | from __future__ import print_function
import httplib2
import os
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
except ImportError:
... | 31.356164 | 75 | 0.692442 |
8d2bd092705d8e4281c5450c132bc66091441e72 | 663 | py | Python | Algorithms/Implementation/Breaking_the_record.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Breaking_the_record.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Breaking_the_record.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/breaking-best-and-worst-records/problem?h_r=internal-search
def breakingRecords(scores):
l, h = scores[0], scores[0]
b, w = 0, 0
lowest = []
highest = []
for i in scores:
if i > h:
h = i
b += 1
if i < l:
l = ... | 25.5 | 99 | 0.508296 |
8d975652c02e73068bfe6a87855eb0902f2d8978 | 2,324 | py | Python | tests/integration/test_datadog.py | tordenist/cf-mendix-buildpack | 5258e53244a9b4d9f81832588124700ca4cf7d6e | [
"Apache-2.0"
] | null | null | null | tests/integration/test_datadog.py | tordenist/cf-mendix-buildpack | 5258e53244a9b4d9f81832588124700ca4cf7d6e | [
"Apache-2.0"
] | null | null | null | tests/integration/test_datadog.py | tordenist/cf-mendix-buildpack | 5258e53244a9b4d9f81832588124700ca4cf7d6e | [
"Apache-2.0"
] | null | null | null | import json
from tests.integration import basetest
class TestCaseDeployWithDatadog(basetest.BaseTest):
def _deploy_app(self, mda_file):
super().setUp()
self.setUpCF(
mda_file,
env_vars={
"DD_API_KEY": "NON-VALID-TEST-KEY",
"DD_TRACE_ENABLED"... | 30.578947 | 77 | 0.601119 |
01532c5e95c38c5c0c26e73798ac759d55c40748 | 12,813 | py | Python | neutron/db/quota/driver.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | neutron/db/quota/driver.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | neutron/db/quota/driver.py | p0i0/openstack-neutron | df2ee28ae9a43cc511482bd6ece5396eb1288814 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 46.423913 | 79 | 0.64138 |
8805d7eaa3217f955c133efc048967ed1fc34e64 | 32,688 | py | Python | angr/procedures/definitions/win32_mpr.py | r4b3rt/angr | c133cfd4f83ffea2a1d9e064241e9459eaabc55f | [
"BSD-2-Clause"
] | null | null | null | angr/procedures/definitions/win32_mpr.py | r4b3rt/angr | c133cfd4f83ffea2a1d9e064241e9459eaabc55f | [
"BSD-2-Clause"
] | null | null | null | angr/procedures/definitions/win32_mpr.py | r4b3rt/angr | c133cfd4f83ffea2a1d9e064241e9459eaabc55f | [
"BSD-2-Clause"
] | null | null | null | # pylint:disable=line-too-long
import logging
from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool
from ...calling... | 281.793103 | 1,365 | 0.743882 |
629e8f01dd74f78994271481693d3944141e2279 | 3,006 | py | Python | ttt_util.py | pauloue/tictactoe-turtle | 017127dee455828ed355dac29c9b9be4439d5cdb | [
"MIT"
] | 1 | 2021-02-12T03:08:27.000Z | 2021-02-12T03:08:27.000Z | ttt_util.py | pauloue/tictactoe-turtle | 017127dee455828ed355dac29c9b9be4439d5cdb | [
"MIT"
] | null | null | null | ttt_util.py | pauloue/tictactoe-turtle | 017127dee455828ed355dac29c9b9be4439d5cdb | [
"MIT"
] | 1 | 2018-05-23T09:29:24.000Z | 2018-05-23T09:29:24.000Z | """TicTacToeUI, HumanPlayer, and BotPlayer classes to handle the user
interface and players."""
import turtle as t
class TicTacToeUI:
"""Methods for drawing the playing grid and marks and writing text
implemented with the turtle module.
"""
def __init__(self):
self.wn = t.Screen()
sel... | 32.673913 | 79 | 0.570193 |
1a454b1987031e5ea2e44d9beb576b91b6d8cd44 | 1,747 | py | Python | tests/unit/test_lfulib.py | m03/lfucache | 0bc21836cc127a411488fe8537766071be4b4b84 | [
"BSD-2-Clause"
] | 1 | 2021-11-01T05:48:08.000Z | 2021-11-01T05:48:08.000Z | tests/unit/test_lfulib.py | m03/lfucache | 0bc21836cc127a411488fe8537766071be4b4b84 | [
"BSD-2-Clause"
] | null | null | null | tests/unit/test_lfulib.py | m03/lfucache | 0bc21836cc127a411488fe8537766071be4b4b84 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# vim: ft=python
"""
tests.unit.test_lfulib
"""
from __future__ import absolute_import
# Import 3rd party libs.
import pytest
# Import from local project.
from lfucache.exceptions import InvalidItemException
from lfucache.lfulib import LFUCache
# Import test scaffolding.
from tests.unit.fixt... | 19.629213 | 67 | 0.629078 |
9c8e9cd484a545e07fdca3d55916c6fd9bb53574 | 13,178 | py | Python | scipy/linalg/decomp_qr.py | jiffyclub/scipy | e346aa55c0416b915148c35cc200a0ed74f85c0a | [
"BSD-3-Clause"
] | null | null | null | scipy/linalg/decomp_qr.py | jiffyclub/scipy | e346aa55c0416b915148c35cc200a0ed74f85c0a | [
"BSD-3-Clause"
] | null | null | null | scipy/linalg/decomp_qr.py | jiffyclub/scipy | e346aa55c0416b915148c35cc200a0ed74f85c0a | [
"BSD-3-Clause"
] | null | null | null | """QR decomposition functions."""
from __future__ import division, print_function, absolute_import
import numpy
# Local imports
from .blas import get_blas_funcs
from .lapack import get_lapack_funcs
from .misc import _datacopied
__all__ = ['qr', 'qr_multiply', 'rq']
def safecall(f, name, *args, **kwargs):
"""Ca... | 32.29902 | 83 | 0.560707 |
e0577e688f2f1efd851bb45bc8bfc443d2e15843 | 4,794 | py | Python | DMSC/mtAttnFE/model.py | tshi04/DMSC_FEDA | 4ca989e45c16aa39ea041c55a414ccd6917d940e | [
"MIT"
] | 1 | 2020-12-16T15:50:08.000Z | 2020-12-16T15:50:08.000Z | DMSC/mtAttnFE/model.py | tshi04/DMSC_FEDA | 4ca989e45c16aa39ea041c55a414ccd6917d940e | [
"MIT"
] | null | null | null | DMSC/mtAttnFE/model.py | tshi04/DMSC_FEDA | 4ca989e45c16aa39ea041c55a414ccd6917d940e | [
"MIT"
] | null | null | null | '''
@author Tian Shi
Please contact tshi@vt.edu
'''
import torch
import torch.nn.functional as F
from torch.autograd import Variable
from DMSC.model_base_pre_emb import modelDMSCBasePreEmb
from LeafNATS.modules.encoder.encoder_rnn import EncoderRNN
from LeafNATS.modules.utils.CompressionFM import CompressionFM
class... | 40.285714 | 86 | 0.636212 |
980a41258d6861cac0389b7d8cbc19d2139e7ab9 | 4,986 | py | Python | Tests/test_EmbossPrimer.py | eoc21/biopython | c0f8db8f55a506837c320459957a0ce99b0618b6 | [
"PostgreSQL"
] | 3 | 2017-10-23T21:53:57.000Z | 2019-09-23T05:14:12.000Z | Tests/test_EmbossPrimer.py | eoc21/biopython | c0f8db8f55a506837c320459957a0ce99b0618b6 | [
"PostgreSQL"
] | null | null | null | Tests/test_EmbossPrimer.py | eoc21/biopython | c0f8db8f55a506837c320459957a0ce99b0618b6 | [
"PostgreSQL"
] | 6 | 2020-02-26T16:34:20.000Z | 2020-03-04T15:34:00.000Z | #!/usr/bin/env python
"""Tests for Primer-based programs in the Emboss suite.
"""
# standard library
import sys
import os
import unittest
# local stuff
from Bio.Emboss import PrimerSearch, Primer3
class Primer3ParseTest(unittest.TestCase):
def setUp(self):
self.test_files = \
[os.path.join("Emb... | 35.112676 | 78 | 0.619535 |
ca9aedca716723648e431f0ca0d7ffe5e3b70552 | 1,141 | py | Python | commands/developer_commands/get_guild_data.py | HedTB/OutDashRewrite | ec05fa4c8be93dd57bb94023f103d28ae9285f54 | [
"MIT"
] | 1 | 2022-03-12T07:20:55.000Z | 2022-03-12T07:20:55.000Z | commands/developer_commands/get_guild_data.py | HedTB/OutDashRewrite | ec05fa4c8be93dd57bb94023f103d28ae9285f54 | [
"MIT"
] | 2 | 2022-03-25T08:24:18.000Z | 2022-03-25T08:28:58.000Z | commands/developer_commands/get_guild_data.py | HedTB/OutDashRewrite | ec05fa4c8be93dd57bb94023f103d28ae9285f54 | [
"MIT"
] | null | null | null | ## -- IMPORTING -- ##
# MODULES
import disnake
import os
import random
import asyncio
import datetime
import certifi
import json
import requests
from disnake.ext import commands
from disnake.errors import Forbidden, HTTPException
from disnake.ext.commands import errors
from pymongo import MongoClient
from dotenv impo... | 22.82 | 92 | 0.702892 |
38783e5257b32e77e6e17b7a93162eafeb15db0b | 2,874 | py | Python | encoder_preprocess.py | bumshmyak/Real-Time-Voice-Cloning | 8589df7bd0b7c1ff9217eaa7dc0d52d9fc8fa650 | [
"MIT"
] | null | null | null | encoder_preprocess.py | bumshmyak/Real-Time-Voice-Cloning | 8589df7bd0b7c1ff9217eaa7dc0d52d9fc8fa650 | [
"MIT"
] | null | null | null | encoder_preprocess.py | bumshmyak/Real-Time-Voice-Cloning | 8589df7bd0b7c1ff9217eaa7dc0d52d9fc8fa650 | [
"MIT"
] | null | null | null | from encoder.preprocess import preprocess_librispeech, preprocess_voxceleb1, preprocess_voxceleb2, preprocess_youtube
from utils.argutils import print_args
from pathlib import Path
import argparse
if __name__ == "__main__":
class MyFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpForma... | 47.114754 | 117 | 0.639179 |
bcea4f8121ed48e20da2313726428ea71ae21f3b | 1,599 | py | Python | penduduk/kecamatan/hitungjeniskelamin.py | bowo-anakdesa/count-sidekem | 8737d6cc788ba51ec6f919dbc2cedcced76ea139 | [
"MIT"
] | 1 | 2019-06-28T02:02:51.000Z | 2019-06-28T02:02:51.000Z | penduduk/kecamatan/hitungjeniskelamin.py | bowo-anakdesa/count-sidekem | 8737d6cc788ba51ec6f919dbc2cedcced76ea139 | [
"MIT"
] | 1 | 2019-08-03T18:39:33.000Z | 2019-08-03T18:39:33.000Z | penduduk/kecamatan/hitungjeniskelamin.py | bowo-anakdesa/count-sidekem | 8737d6cc788ba51ec6f919dbc2cedcced76ea139 | [
"MIT"
] | null | null | null | import pymysql
db = pymysql.connect(host="localhost",user="root",passwd="12345678", db="sidekem")
cur = db.cursor()
cur.execute("SELECT id FROM `statistik_jk_kec` WHERE id LIKE '%3327%' ")
kecamatan=cur.fetchall()
for a in kecamatan:
#Kepala Keluarga Laki-laki
cur.execute("SELECT COUNT(*) FROM `datapenduduk-33`... | 59.222222 | 183 | 0.652908 |
6bdc9fe969dc2582299486134fbc096e48980e12 | 5,605 | py | Python | authors/apps/articles/models.py | andela/Ah-backend-guardians | cc84c18f7c222bc69cf4a263a1c2296b6d335c8b | [
"BSD-3-Clause"
] | null | null | null | authors/apps/articles/models.py | andela/Ah-backend-guardians | cc84c18f7c222bc69cf4a263a1c2296b6d335c8b | [
"BSD-3-Clause"
] | 32 | 2019-01-09T07:52:32.000Z | 2022-01-13T01:01:55.000Z | authors/apps/articles/models.py | andela/Ah-backend-guardians | cc84c18f7c222bc69cf4a263a1c2296b6d335c8b | [
"BSD-3-Clause"
] | 3 | 2019-01-03T12:05:53.000Z | 2019-09-24T11:41:14.000Z | from django.db import models
from datetime import datetime, timedelta
from ..authentication.models import User
from django.db.models import Avg
from django.template.defaultfilters import slugify
from django.utils.text import slugify
from django.contrib.postgres.fields import ArrayField
from django.conf import settings... | 32.398844 | 77 | 0.657092 |
ba31ae36456df02fc542286e5bbf305b961f4075 | 1,557 | py | Python | tests/test_utils/test_utils.py | badal-io/gcp-airflow-foundations | 7b8cb2bb487c85a382b7381e4ff9824018e4cc1e | [
"Apache-2.0"
] | 3 | 2021-11-11T23:16:19.000Z | 2022-03-23T21:53:50.000Z | tests/test_utils/test_utils.py | badal-io/gcp-airflow-foundations | 7b8cb2bb487c85a382b7381e4ff9824018e4cc1e | [
"Apache-2.0"
] | 9 | 2021-10-18T20:32:58.000Z | 2022-03-30T22:08:59.000Z | tests/test_utils/test_utils.py | badal-io/gcp-airflow-foundations | 7b8cb2bb487c85a382b7381e4ff9824018e4cc1e | [
"Apache-2.0"
] | 1 | 2022-03-23T21:53:53.000Z | 2022-03-23T21:53:53.000Z | from airflow.utils.session import create_session, provide_session
from airflow.models import DAG, TaskInstance, XCom, DagBag, DagRun, DagTag, DagModel
import pytz
from airflow.utils.state import State
from datetime import datetime
from airflow.operators.dummy import DummyOperator
import logging
DEFAULT_DATE = pytz.u... | 27.803571 | 84 | 0.714836 |
2f2e83e0a23126457c82625d1f6041075d8f5142 | 1,326 | py | Python | examples/smi/manager/configure-mib-viewer-and-resolve-pdu-varbinds.py | RKinsey/pysnmp | 96b5cf31e2f5d19f34d0dd1075014c488f6a5789 | [
"BSD-2-Clause"
] | 492 | 2016-03-13T11:03:13.000Z | 2022-03-21T02:52:57.000Z | examples/smi/manager/configure-mib-viewer-and-resolve-pdu-varbinds.py | bartomo/pysnmp | becd15c79c9a6b5696928ecd50bf5cca8b1770a1 | [
"BSD-2-Clause"
] | 372 | 2016-03-29T22:42:05.000Z | 2022-03-26T10:28:25.000Z | examples/smi/manager/configure-mib-viewer-and-resolve-pdu-varbinds.py | bartomo/pysnmp | becd15c79c9a6b5696928ecd50bf5cca8b1770a1 | [
"BSD-2-Clause"
] | 197 | 2016-03-13T11:01:54.000Z | 2022-03-07T19:52:15.000Z | """
PDU var-binds to MIB objects
++++++++++++++++++++++++++++
This script explains how Python application could turn SNMP PDU
variable-bindings into MIB objects or the other way around.
The code that configures MIB compiler is similar to what
happens inside the pysnmp.hlapi API.
"""#
from pysnmp.smi import builder, v... | 34 | 100 | 0.647813 |
a91adb626f507952a8aa3a6bf1d4bf545356a45e | 1,179 | py | Python | dndme/new_content.py | brianb72/dndme | 45d2c571e91bfdfe72df569a1d217a8d3e3db5bd | [
"MIT"
] | 1 | 2020-03-12T09:08:31.000Z | 2020-03-12T09:08:31.000Z | dndme/new_content.py | brianb72/dndme | 45d2c571e91bfdfe72df569a1d217a8d3e3db5bd | [
"MIT"
] | null | null | null | dndme/new_content.py | brianb72/dndme | 45d2c571e91bfdfe72df569a1d217a8d3e3db5bd | [
"MIT"
] | null | null | null | import os
import shutil
import sys
import click
import pytoml as toml
base_dir = os.path.normpath(os.path.join( os.path.dirname(__file__), '..'))
@click.command()
@click.argument("name")
def main(name):
content_dir = create_content_dir(name)
create_encounters_dir(content_dir)
create_monsters_dir(content_... | 25.085106 | 75 | 0.73028 |
a7c73747897a91db2e9326fdc65829e01aa7fd6a | 3,385 | py | Python | u08410006/Week2/ch4/ch4-5.py | txya900619/Intern-Training | 76cac20ac988609f313765ebeb72d20da9dcc05e | [
"MIT"
] | 1 | 2021-08-24T12:14:46.000Z | 2021-08-24T12:14:46.000Z | u08410006/Week2/ch4/ch4-5.py | txya900619/Intern-Training | 76cac20ac988609f313765ebeb72d20da9dcc05e | [
"MIT"
] | 14 | 2021-07-09T07:48:35.000Z | 2021-08-19T03:06:31.000Z | u08410006/Week2/ch4/ch4-5.py | txya900619/Intern-Training | 76cac20ac988609f313765ebeb72d20da9dcc05e | [
"MIT"
] | 11 | 2021-07-09T07:35:24.000Z | 2021-08-15T07:19:43.000Z | import torch
from torch import nn
from d2l import torch as d2l
NUM_INPUTS, BATCH_SIZE = 200, 5
def init_params(num_input: int = NUM_INPUTS):
"""
randomly initialize our model parameters
"""
w = torch.normal(0, 1, size=(num_input, 1), requires_grad=True)
b = torch.zeros(1, requires_gra... | 29.955752 | 107 | 0.545052 |
61fa34bb42f92d032427c0945f48156793ae490f | 11,197 | py | Python | process_file.py | jie1789/smartbugs | 9b39ea674192df79eda305fb40e5146bb196dfb5 | [
"Apache-2.0"
] | null | null | null | process_file.py | jie1789/smartbugs | 9b39ea674192df79eda305fb40e5146bb196dfb5 | [
"Apache-2.0"
] | null | null | null | process_file.py | jie1789/smartbugs | 9b39ea674192df79eda305fb40e5146bb196dfb5 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import re
re_pragma1 = re.compile(r"pragma solidity \^?0.[0-9].[0-9]{1,2};")
re_pragma2 = re.compile(r"pragma solidity >=0.[0-9].[0-9]{1,2};")
re_pragma3 = re.compile(r"pragma solidity >=0.[0-9].[0-9]{1,2} <0.[0-9].[0-9]{1,2};")
re_sol_version = re.compile(r"0.[0-9].[0-9]{1,2}")
re_license = ... | 41.93633 | 126 | 0.620345 |
86922d94740986b2a79a0e3bb44ae6fb8866a124 | 52,885 | py | Python | experiment_manager/ibmfl_cli_automator/run.py | imec-int/federated-learning-lib | 1b2dc964de01cd23f357edbce7527ec1bcfc2cd3 | [
"IBM-pibs"
] | 294 | 2020-06-30T17:59:06.000Z | 2022-03-29T11:09:46.000Z | experiment_manager/ibmfl_cli_automator/run.py | imec-int/federated-learning-lib | 1b2dc964de01cd23f357edbce7527ec1bcfc2cd3 | [
"IBM-pibs"
] | 48 | 2020-06-30T23:40:48.000Z | 2022-03-24T18:38:40.000Z | experiment_manager/ibmfl_cli_automator/run.py | imec-int/federated-learning-lib | 1b2dc964de01cd23f357edbce7527ec1bcfc2cd3 | [
"IBM-pibs"
] | 96 | 2020-06-29T15:31:12.000Z | 2022-03-29T11:09:46.000Z | """
Licensed Materials - Property of IBM
Restricted Materials of IBM
20190891
© Copyright IBM Corp. 2021 All Rights Reserved.
"""
#!/usr/bin/env python3
from copy import deepcopy
from datetime import datetime, timezone
from io import BytesIO, TextIOWrapper
import os
from pathlib import Path
import pprint as pp
import ... | 44.218227 | 145 | 0.585648 |
947c0d9bd2253c701d17ff1d3ed7101988338e0a | 256 | py | Python | server/__init__.py | CostaDiego/charging-distributed-system | 2e5d20a063c2c2df25af7ca8640077647f981037 | [
"MIT"
] | null | null | null | server/__init__.py | CostaDiego/charging-distributed-system | 2e5d20a063c2c2df25af7ca8640077647f981037 | [
"MIT"
] | null | null | null | server/__init__.py | CostaDiego/charging-distributed-system | 2e5d20a063c2c2df25af7ca8640077647f981037 | [
"MIT"
] | null | null | null | __all__ = ['transaction_server']
from os import path
import sys
root = path.abspath('..')
if root not in sys.path:
sys.path.append(root)
from server.transaction_server import run as run_server
from server.transaction_server import TransactionServer | 21.333333 | 55 | 0.78125 |
87c126b96bd492a842659cab02576b4cad8d3c2f | 2,492 | py | Python | pydl/examples/mnist_dropout_example.py | nash911/PyDL | b0b6f599184c0046f503b9ee1703dc3dfe9a89f2 | [
"MIT"
] | null | null | null | pydl/examples/mnist_dropout_example.py | nash911/PyDL | b0b6f599184c0046f503b9ee1703dc3dfe9a89f2 | [
"MIT"
] | null | null | null | pydl/examples/mnist_dropout_example.py | nash911/PyDL | b0b6f599184c0046f503b9ee1703dc3dfe9a89f2 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------
# MIT License
#
# Copyright (c) [2021] [Avinash Ranganath]
#
# This code is part of the library PyDL <https://github.com/nash911/PyDL>
# This code is licensed under MIT license (see LICENSE.txt for details)
# ------------------------------------... | 37.19403 | 96 | 0.613162 |
6634d4b37260df13e6ba63bcb8b3c8ad370b6f05 | 17,421 | py | Python | timm/models/inception_v3.py | xren1982/pytorch-image-models | 8c9814e3f500e8b37aae86dd4db10aba2c295bd2 | [
"Apache-2.0"
] | null | null | null | timm/models/inception_v3.py | xren1982/pytorch-image-models | 8c9814e3f500e8b37aae86dd4db10aba2c295bd2 | [
"Apache-2.0"
] | null | null | null | timm/models/inception_v3.py | xren1982/pytorch-image-models | 8c9814e3f500e8b37aae86dd4db10aba2c295bd2 | [
"Apache-2.0"
] | null | null | null | """ Inception-V3
Originally from torchvision Inception3 model
Licensed BSD-Clause 3 https://github.com/pytorch/vision/blob/master/LICENSE
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
from timm.data import IMAGENET_DEFAULT_STD, IMAGENET_DEFAULT_MEAN, IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTIO... | 37.144989 | 127 | 0.653809 |
9f281cc810f68619c57364c67bc160d53953c6d0 | 4,383 | py | Python | examples/expert_section/opl/oil_blend/oil_blend.py | adampkehoe/ticdat | bc9c9f6f407de0312f87e0e8aa8b247caa92ef3e | [
"BSD-2-Clause"
] | 15 | 2019-05-16T13:22:50.000Z | 2022-02-18T08:07:10.000Z | examples/expert_section/opl/oil_blend/oil_blend.py | adampkehoe/ticdat | bc9c9f6f407de0312f87e0e8aa8b247caa92ef3e | [
"BSD-2-Clause"
] | 86 | 2019-03-13T16:18:07.000Z | 2022-02-07T22:13:15.000Z | examples/expert_section/opl/oil_blend/oil_blend.py | adampkehoe/ticdat | bc9c9f6f407de0312f87e0e8aa8b247caa92ef3e | [
"BSD-2-Clause"
] | 9 | 2020-05-06T15:13:32.000Z | 2022-01-26T15:30:44.000Z | # Solves the oil blending problem defined at https://goo.gl/kqXmQE
# Implement core functionality needed to achieve modularity.
# 1. Define the input data schema
# 2. Define the output data schema
# 3. Create a solve function that accepts a data set consistent with the input
# schema and (if possible) returns a dat... | 52.178571 | 95 | 0.591376 |
eb59bde686644d006076352330c1e8211f7a1402 | 190 | py | Python | sentence.py | Comp-Sci-Principles-2018-19/chapter-2-exercises-JohnMcL12 | ff8157b9f2dae520a84191c0e89236fe1a3fe6d8 | [
"MIT"
] | null | null | null | sentence.py | Comp-Sci-Principles-2018-19/chapter-2-exercises-JohnMcL12 | ff8157b9f2dae520a84191c0e89236fe1a3fe6d8 | [
"MIT"
] | null | null | null | sentence.py | Comp-Sci-Principles-2018-19/chapter-2-exercises-JohnMcL12 | ff8157b9f2dae520a84191c0e89236fe1a3fe6d8 | [
"MIT"
] | null | null | null | #All work and no play makes Jack a dull boy
w1='all '
w2='work '
w3='and '
w4='no '
#w5='play '
w6='makes '
w7='Jack '
w8='a '
w9='dull '
w10='boy'
print(w1+w2+w3+w4+w5+w6+w7+w8+w9+w10)
| 11.176471 | 43 | 0.594737 |
5fddf531e10e53b1740886d466061d0cea1d2280 | 6,026 | py | Python | tasks/speech/text2speech/baseline/local/acoustic_modeling/baseline_am.py | APMplusplus/falkon | 95708ed0b28c4ec0f611446a478e9c3445eb3508 | [
"Apache-2.0"
] | 2 | 2019-04-20T05:25:25.000Z | 2020-04-11T20:42:46.000Z | tasks/speech/text2speech/baseline/local/acoustic_modeling/baseline_am.py | saikrishnarallabandi/falkon | 95708ed0b28c4ec0f611446a478e9c3445eb3508 | [
"Apache-2.0"
] | 12 | 2019-01-07T00:17:04.000Z | 2019-01-20T20:22:24.000Z | tasks/speech/text2speech/baseline/local/acoustic_modeling/baseline_am.py | APMplusplus/falkon | 95708ed0b28c4ec0f611446a478e9c3445eb3508 | [
"Apache-2.0"
] | 2 | 2019-03-26T14:09:05.000Z | 2019-04-20T05:25:37.000Z | import numpy as np
import os, sys
import torch
import torch.nn as nn
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
from torch.autograd import Variable
from model import *
import time
from collections import defaultdict
from utils import *
## Locations
FALCON_DIR = os.environ.get('FALCON_... | 30.588832 | 126 | 0.64454 |
26b9ce7ebd9b35a9b65fef4c9b51eca02c734126 | 2,791 | py | Python | mtcnn_example.py | penolove/insightface | 643a8acc0418804dfad2656a10178586d825f230 | [
"MIT"
] | 4 | 2019-11-13T10:49:40.000Z | 2021-01-08T04:45:11.000Z | mtcnn_example.py | penolove/insightface | 643a8acc0418804dfad2656a10178586d825f230 | [
"MIT"
] | null | null | null | mtcnn_example.py | penolove/insightface | 643a8acc0418804dfad2656a10178586d825f230 | [
"MIT"
] | 1 | 2020-04-01T06:11:54.000Z | 2020-04-01T06:11:54.000Z | import argparse
import glob
import os
from pathlib import Path
import mxnet as mx
from bistiming import SimpleTimer
from eyewitness.image_utils import Image, ImageHandler
from eyewitness.image_id import ImageId
from eyewitness.result_handler.db_writer import (BboxPeeweeDbWriter, FalseAlertPeeweeDbWriter)
from eyewitne... | 38.763889 | 94 | 0.701541 |
b82214e9e86a6ff0ed2b19b53a1fa008914eb19b | 18,114 | py | Python | srunner/tools/route_parser.py | wnklmx/scenario_runner | 017746b09b3cdafd393320fa9018aab1d429ab2e | [
"MIT"
] | null | null | null | srunner/tools/route_parser.py | wnklmx/scenario_runner | 017746b09b3cdafd393320fa9018aab1d429ab2e | [
"MIT"
] | null | null | null | srunner/tools/route_parser.py | wnklmx/scenario_runner | 017746b09b3cdafd393320fa9018aab1d429ab2e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Module used to parse all the route and scenario configuration parameters.
"""
import json
import math
import xml.etree.ElementTree as ET
import carla
from agents.navigation.... | 43.438849 | 145 | 0.579552 |
a29b914aa63a48458f9ca85c08f63efecf55e6ef | 751 | py | Python | examples/horizontal_boxplot.py | danyal-s/seaborn | e07c1f17a4a8c3cd1483616e68185f81f27dbc96 | [
"BSD-3-Clause"
] | 2 | 2019-05-27T04:32:12.000Z | 2019-06-10T15:28:22.000Z | examples/horizontal_boxplot.py | danyal-s/seaborn | e07c1f17a4a8c3cd1483616e68185f81f27dbc96 | [
"BSD-3-Clause"
] | 2 | 2020-03-15T22:17:11.000Z | 2020-03-16T13:47:04.000Z | examples/horizontal_boxplot.py | danyal-s/seaborn | e07c1f17a4a8c3cd1483616e68185f81f27dbc96 | [
"BSD-3-Clause"
] | 2 | 2018-10-27T05:35:26.000Z | 2018-10-27T06:39:05.000Z | """
Horizontal boxplot with observations
====================================
_thumb: .7, .37
"""
import seaborn as sns
import matplotlib.pyplot as plt
sns.set(style="ticks")
# Initialize the figure with a logarithmic x axis
f, ax = plt.subplots(figsize=(7, 6))
ax.set_xscale("log")
# Load the example planets datase... | 24.225806 | 53 | 0.671105 |
5cde15ba21c37f246bb51cc4bd3c674ace8c5a36 | 3,779 | py | Python | sdf/text.py | pachacamac/sdf | ba39c99fc047ccb8518df3796ddf62cdbb7533c5 | [
"MIT"
] | null | null | null | sdf/text.py | pachacamac/sdf | ba39c99fc047ccb8518df3796ddf62cdbb7533c5 | [
"MIT"
] | null | null | null | sdf/text.py | pachacamac/sdf | ba39c99fc047ccb8518df3796ddf62cdbb7533c5 | [
"MIT"
] | 1 | 2021-05-25T08:33:52.000Z | 2021-05-25T08:33:52.000Z | from PIL import Image, ImageFont, ImageDraw
import scipy.ndimage as nd
import numpy as np
from . import d2
# TODO: add support for newlines?
PIXELS = 2 ** 22
def measure_text(name, text, width=None, height=None):
font = ImageFont.truetype(name, 96)
x0, y0, x1, y1 = font.getbbox(text)
aspect = (x1 - x0) ... | 26.612676 | 78 | 0.540619 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.