hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73f41e962d7a55a59322097fde1cd0ce63ddfc5c | 10,855 | py | Python | py_search/uninformed.py | ctonic/py_search | 4635616e174dadba049c6a68799df7ea92d78c4c | [
"MIT"
] | 4 | 2019-02-04T14:20:40.000Z | 2021-02-08T21:25:03.000Z | py_search/uninformed.py | ctonic/py_search | 4635616e174dadba049c6a68799df7ea92d78c4c | [
"MIT"
] | 6 | 2016-07-10T20:01:20.000Z | 2018-02-25T15:06:14.000Z | py_search/uninformed.py | ctonic/py_search | 4635616e174dadba049c6a68799df7ea92d78c4c | [
"MIT"
] | 3 | 2018-06-23T13:31:42.000Z | 2021-06-17T11:23:02.000Z | """
This module includes the core search methods :func:`tree_search` and
`graph_search` and the primary uninformed search techniques:
:func:`depth_first_search`, :func:`breadth_first_search`, and
:func:`iterative_deepening_search`.
"""
from __future__ import print_function
from __future__ import unicode_literals
from _... | 40.808271 | 79 | 0.646154 |
73f4453c8a3a71d52b5faa9d704a8dee7f583164 | 716 | py | Python | tryalgo/three_partition.py | xcarcelle/tryalgo | c159fbffbea0a4e8b70e8898c31c62c7e08a3865 | [
"MIT"
] | null | null | null | tryalgo/three_partition.py | xcarcelle/tryalgo | c159fbffbea0a4e8b70e8898c31c62c7e08a3865 | [
"MIT"
] | null | null | null | tryalgo/three_partition.py | xcarcelle/tryalgo | c159fbffbea0a4e8b70e8898c31c62c7e08a3865 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# subsetsum
# jill-jenn vie et christoph durr - 2015-2018
# snip{
def three_partition(x):
"""partition a set of integers in 3 parts of same total value
:param x: table of non negative values
:returns: triplet of the integers encoding the sets, or None otherw... | 28.64 | 74 | 0.515363 |
73f4979a7b7e3ba72f5360a563593b2d132feeed | 151 | py | Python | testappsimple/__init__.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | 61 | 2016-12-05T09:09:49.000Z | 2022-03-09T13:23:06.000Z | testappsimple/__init__.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | 51 | 2016-12-07T10:19:52.000Z | 2022-03-11T23:35:23.000Z | testappsimple/__init__.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | 18 | 2017-03-11T18:07:17.000Z | 2022-03-09T13:14:40.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import, print_function
import logging
logger = logging.getLogger(__name__)
| 21.571429 | 72 | 0.781457 |
73f4a65834d6cdebfd2bb5c144f0d102e7d46c18 | 1,298 | py | Python | ufora/scripts/testRepeater.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/scripts/testRepeater.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/scripts/testRepeater.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | #!/usr/bin/env python
# Copyright 2015 Ufora 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 applic... | 35.081081 | 144 | 0.602465 |
73f4fd23e3d586423658a72ad9c6419b3bb73426 | 1,931 | py | Python | test/selenium/src/lib/page/export_page.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/selenium/src/lib/page/export_page.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/selenium/src/lib/page/export_page.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Export page with Export Panels."""
from lib import base
from lib.constants import locator, element
from lib.utils import selenium_utils
class ExportPanel(base.Component):
"""Export Panel on Export Pag... | 35.759259 | 78 | 0.745728 |
73f50605473028478d146f65df67fd08f94b11a3 | 4,699 | py | Python | posetrigger/frame_view.py | gwappa/python-posetrigger | 3d9619160b5ed97e52ba2aae99d5eec663834a06 | [
"MIT"
] | null | null | null | posetrigger/frame_view.py | gwappa/python-posetrigger | 3d9619160b5ed97e52ba2aae99d5eec663834a06 | [
"MIT"
] | null | null | null | posetrigger/frame_view.py | gwappa/python-posetrigger | 3d9619160b5ed97e52ba2aae99d5eec663834a06 | [
"MIT"
] | null | null | null | #
# MIT License
#
# Copyright (c) 2020 Keisuke Sehara
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, me... | 39.487395 | 90 | 0.641626 |
73f53747ce26e9f1512b865f39b903ca976a167e | 11,334 | py | Python | core/python/spirit/simulation.py | bck2302000/spirit | 14ed7782bd23f4828bf23ab8136ae31a21037bb3 | [
"MIT"
] | 92 | 2016-10-02T16:17:27.000Z | 2022-02-22T11:23:49.000Z | core/python/spirit/simulation.py | bck2302000/spirit | 14ed7782bd23f4828bf23ab8136ae31a21037bb3 | [
"MIT"
] | 590 | 2016-09-24T12:46:36.000Z | 2022-03-24T18:27:18.000Z | core/python/spirit/simulation.py | bck2302000/spirit | 14ed7782bd23f4828bf23ab8136ae31a21037bb3 | [
"MIT"
] | 46 | 2016-09-26T07:20:17.000Z | 2022-02-17T19:55:17.000Z | """
Simulation
====================
This module of Spirit is used to run and monitor iterative calculation methods.
If many iterations are called individually, one should use the single shot simulation functionality.
It avoids the allocations etc. involved when a simulation is started and ended and behaves like a
reg... | 45.155378 | 130 | 0.691106 |
73f53d41d9fd066cda1100b889a61084b4360912 | 6,122 | py | Python | RRTStar.py | Abeilles14/Velocity-Obstacle-and-Motion-Planning | 4509abeb589d6f11046103422f70f8ddde397d63 | [
"MIT"
] | 7 | 2021-11-17T01:39:02.000Z | 2022-01-23T17:40:29.000Z | RRTStar.py | Abeilles14/Velocity-Obstacle-and-Motion-Planning | 4509abeb589d6f11046103422f70f8ddde397d63 | [
"MIT"
] | null | null | null | RRTStar.py | Abeilles14/Velocity-Obstacle-and-Motion-Planning | 4509abeb589d6f11046103422f70f8ddde397d63 | [
"MIT"
] | null | null | null | # STATE MACHINE FOR 3D PICK AND PLACE SIMULATION
import numpy as np
from numpy.linalg import norm
from math import *
from matplotlib import pyplot as plt
from matplotlib.patches import Polygon
from random import random
from scipy.spatial import ConvexHull
from matplotlib import path
import time
from mpl_toolkits import... | 32.737968 | 149 | 0.615322 |
73f5793c77d9680533092951eeb07914297d9595 | 308 | py | Python | tests/test_hline.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | null | null | null | tests/test_hline.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | 17 | 2021-09-22T12:21:46.000Z | 2022-02-26T12:26:40.000Z | tests/test_hline.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | null | null | null | import platform
from PyQt5 import QtWidgets
from podcastista.HLine import HLine
if platform.system() == "Darwin":
def test_init(main_window):
widget = HLine(main_window)
assert widget.frameShape() == QtWidgets.QFrame.HLine
assert widget.frameShadow() == QtWidgets.QFrame.Plain
| 25.666667 | 61 | 0.717532 |
73f5c9fc90a2c15afa50a2cd14c536cb68b5bff0 | 777 | py | Python | fv3config/config/_serialization.py | VulcanClimateModeling/fv3config | 544eaf1bc6f1c4617cd8ee6bd3298136ed180f4c | [
"BSD-2-Clause"
] | 2 | 2019-11-12T21:05:09.000Z | 2019-11-17T18:08:34.000Z | fv3config/config/_serialization.py | VulcanClimateModeling/fv3config | 544eaf1bc6f1c4617cd8ee6bd3298136ed180f4c | [
"BSD-2-Clause"
] | 77 | 2019-11-12T21:15:38.000Z | 2021-05-07T22:39:36.000Z | fv3config/config/_serialization.py | VulcanClimateModeling/fv3config | 544eaf1bc6f1c4617cd8ee6bd3298136ed180f4c | [
"BSD-2-Clause"
] | null | null | null | from copy import deepcopy
import yaml
from typing import TextIO
from .types import Config
from .diag_table import DiagTable
def load(f: TextIO) -> Config:
"""Load a configuration from a file-like object f"""
config = yaml.safe_load(f)
if isinstance(config["diag_table"], dict):
config["diag_table"... | 26.793103 | 72 | 0.688546 |
73f5ce109bb9e529c6a80dafa98b6327492e54b5 | 1,377 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/domain_model_results.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/domain_model_results.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/domain_model_results.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.307692 | 82 | 0.604938 |
73f5cf11274cc48a028fda75ab8be5fc6359d93a | 24,718 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/protocols/amqp/controller.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/protocols/amqp/controller.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/protocols/amqp/controller.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2014, Red Hat, 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 ... | 41.894915 | 79 | 0.630512 |
73f61ae6b18810bac15c1ec7bd89dbd640f65e8d | 328 | py | Python | joern2sarif/lib/config.py | joernio/joern2sarif | 3b443981f3ec86ed47330b583b4b319f19d5b5a6 | [
"Apache-2.0"
] | 1 | 2021-05-12T21:53:48.000Z | 2021-05-12T21:53:48.000Z | joern2sarif/lib/config.py | joernio/joern2sarif | 3b443981f3ec86ed47330b583b4b319f19d5b5a6 | [
"Apache-2.0"
] | 1 | 2021-04-02T17:17:49.000Z | 2021-04-09T17:52:56.000Z | joern2sarif/lib/config.py | joernio/joern2sarif | 3b443981f3ec86ed47330b583b4b319f19d5b5a6 | [
"Apache-2.0"
] | 1 | 2021-11-29T15:50:08.000Z | 2021-11-29T15:50:08.000Z | default_driver_name = "Joern"
tool_drivers = {
"joern": "Joern",
"ocular": "ShiftLeft Ocular",
"ng-sast": "ShiftLeft NextGen Analysis",
"ngsast": "ShiftLeft NextGen Analysis",
"core": "ShiftLeft CORE Analysis",
}
# URL for viewing reports online
hosted_viewer_uri = "https://sarifviewer.azurewebsit... | 25.230769 | 59 | 0.692073 |
73f6348a357ce4198f9ac6aa325af70ef22531e7 | 3,210 | py | Python | tests/splits/test_splits_splits.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | tests/splits/test_splits_splits.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | tests/splits/test_splits_splits.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | import pytest
import os
import torch
import numpy as np
import atom3d.datasets as da
import atom3d.splits.splits as spl
# -- Test the general split function. --
def test_split():
# Load LMDB dataset
dataset = da.load_dataset('tests/test_data/lmdb', 'lmdb')
# Split with defined indices
indices_train,... | 36.067416 | 97 | 0.613084 |
73f641686287246a45d44a960965d908218bfc55 | 1,079 | py | Python | test_editor.py | Yajo/editor | f83e15cdf68ce5890240545fb39e1dcf8eda7045 | [
"MIT"
] | null | null | null | test_editor.py | Yajo/editor | f83e15cdf68ce5890240545fb39e1dcf8eda7045 | [
"MIT"
] | null | null | null | test_editor.py | Yajo/editor | f83e15cdf68ce5890240545fb39e1dcf8eda7045 | [
"MIT"
] | null | null | null | from unittest import mock
import editor
import tdir
import unittest
FILENAME = 'a_file.txt'
EDITOR = editor.default_editor()
@mock.patch('editor.subprocess.call', autospec=True)
class TestEditor(unittest.TestCase):
@tdir(FILENAME)
def test_existing(self, call):
actual = editor(filename=FILENAME)
... | 24.522727 | 56 | 0.63392 |
73f67f26cc6f4ddfe730b0b7599a04972d3e1a5f | 15,592 | py | Python | marchena/desk.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | marchena/desk.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | marchena/desk.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
from copy import deepcopy
from functools import update_wrapper
from django import VERSION as DJANGO_VERSION
from django.conf.urls import url, include
from django.contrib.admin.utils import quote
from django.contrib.admin.views.main import ChangeList
from... | 36.344988 | 95 | 0.593702 |
73f693d6e93c81bd7c0f415015ece7e7063a0132 | 549 | py | Python | vegapy/imshow.py | scivision/vegapy | db095f790c7e86b3dd273fdd260c83fcb2550772 | [
"MIT"
] | 2 | 2021-03-21T22:16:04.000Z | 2022-03-24T22:38:40.000Z | vegapy/imshow.py | scivision/vegapy | db095f790c7e86b3dd273fdd260c83fcb2550772 | [
"MIT"
] | null | null | null | vegapy/imshow.py | scivision/vegapy | db095f790c7e86b3dd273fdd260c83fcb2550772 | [
"MIT"
] | 2 | 2018-11-16T12:14:03.000Z | 2019-03-03T03:58:49.000Z | import numpy as np
import matplotlib.pyplot as plt
def imshow(image, scale='lin', **kwargs):
if scale == 'log':
try:
image = np.log10(image)
except TypeError as e:
image = np.log10(image.value)
elif scale == 'ln':
image = np.log(image)
if 'imshow' in kwargs:
... | 26.142857 | 45 | 0.559199 |
73f69e2378064a9b2a77ecef28a8d5c4ab61f27c | 3,401 | py | Python | tests/unit/modules/rvm_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2018-02-03T17:30:56.000Z | 2018-02-03T17:30:56.000Z | tests/unit/modules/rvm_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/rvm_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Import Salt Testing libs
from salttesting import skipIf, TestCase
from salttesting.helpers import ensure_in_syspath
from salttesting.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch
ensure_in_syspath('../../')
# Import salt libs
import salt.modules.rvm as rvm
rvm.__salt__ = {
'cmd... | 27.650407 | 78 | 0.572479 |
73f6b0534f6f72d2b80f3bae29e1d5fbed82e70e | 5,794 | py | Python | train_DL_model/train_models.py | 98k-bot/model_differential_privacy | f72dc6800402575f518c40cd4a6e66d00db3e38a | [
"Apache-2.0"
] | null | null | null | train_DL_model/train_models.py | 98k-bot/model_differential_privacy | f72dc6800402575f518c40cd4a6e66d00db3e38a | [
"Apache-2.0"
] | null | null | null | train_DL_model/train_models.py | 98k-bot/model_differential_privacy | f72dc6800402575f518c40cd4a6e66d00db3e38a | [
"Apache-2.0"
] | null | null | null | '''
Traning as baseline models (Densenet121) on dataset
Change the build_model() function to use your custom deep learning model
This function should written a valid keras or tf.keras Model object
'''
import sys
sys.path.append("..")
from train_DL_model import model_params
from utils import util_functions as utils
imp... | 44.229008 | 198 | 0.691405 |
73f6b34ac317aec9a5d725b4dcf90189ee0b3ada | 1,428 | py | Python | python/lib/dcoscli/tests/integrations/test_help.py | isabella232/dcos-core-cli | 11f2a26fd568b5e1501057a62ad013eb79acfd92 | [
"Apache-2.0",
"MIT"
] | 3 | 2019-04-23T05:31:19.000Z | 2021-11-15T19:18:23.000Z | python/lib/dcoscli/tests/integrations/test_help.py | dcos/dcos-core-cli | 11f2a26fd568b5e1501057a62ad013eb79acfd92 | [
"Apache-2.0",
"MIT"
] | 356 | 2018-07-26T15:17:56.000Z | 2022-03-29T21:06:06.000Z | python/lib/dcoscli/tests/integrations/test_help.py | isabella232/dcos-core-cli | 11f2a26fd568b5e1501057a62ad013eb79acfd92 | [
"Apache-2.0",
"MIT"
] | 22 | 2018-07-24T13:20:51.000Z | 2021-11-15T19:18:26.000Z | from dcoscli.test.common import assert_command
def test_help_calico():
with open('tests/data/calico/help.txt') as content:
assert_command(['dcos', 'help', 'calico'],
stdout=content.read().encode('utf-8'))
def test_help_job():
with open('dcoscli/data/help/job.txt') as content:
... | 33.209302 | 63 | 0.583333 |
73f6f6b5681e373a90b596e24f6836841b60bd9a | 2,208 | py | Python | docs/conf.py | caltech-netlab/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | caltech-netlab/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | 3 | 2021-04-28T14:43:32.000Z | 2021-04-28T14:58:04.000Z | docs/conf.py | caltech-netlab/gym-acnportal | cacd2e4aa9159a3bf7f0b8e3db2dbb0832d76e46 | [
"BSD-3-Clause"
] | 1 | 2021-02-22T03:43:44.000Z | 2021-02-22T03:43:44.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.454545 | 79 | 0.676178 |
73f7047cca2c620cd662fd1a9a4023ccd7ee9afb | 3,938 | py | Python | mitmproxy/utils/arg_check.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | null | null | null | mitmproxy/utils/arg_check.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | null | null | null | mitmproxy/utils/arg_check.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | null | null | null | import sys
DEPRECATED = """
--cadir
-Z
--body-size-limit
--stream
--palette
--palette-transparent
--follow
--order
--no-mouse
--reverse
--socks
--http2-priority
--no-http2-priority
--no-websocket
--websocket
--spoof-source-address
--upstream-bind-address
--ciphers-client
--ciphers-server
--client-certs
--no-upstream-c... | 26.42953 | 92 | 0.57999 |
73f720859589d7051a2b7f3ac8be62d431469183 | 6,990 | py | Python | configs/example/fs.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | configs/example/fs.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | configs/example/fs.py | pnkfb9/gem5_priority | fbf766277df78a470758cf7d798d12fb1e7c51c4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2010-2012 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | 36.984127 | 129 | 0.739056 |
73f72eef8e307eded5a16d3708e44139462caf7d | 2,138 | py | Python | python/tests/test_parameter_mapping.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | null | null | null | python/tests/test_parameter_mapping.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | null | null | null | python/tests/test_parameter_mapping.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | null | null | null | """Test for ``amici.parameter_mapping``"""
import os
import pytest
from amici.parameter_mapping import (ParameterMapping,
ParameterMappingForCondition)
@pytest.mark.skipif(os.environ.get('GITHUB_JOB') == 'valgrind',
reason="Python-only")
def test_parameter_ma... | 36.862069 | 71 | 0.702058 |
73f73d9ea76d780eb34827589821d0ebfc6ba257 | 27 | py | Python | newsroom/evaluate/__init__.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 82 | 2018-05-01T16:32:38.000Z | 2019-05-18T01:43:15.000Z | newsroom/evaluate/__init__.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 20 | 2018-05-01T19:32:48.000Z | 2019-04-12T07:57:48.000Z | newsroom/evaluate/__init__.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 15 | 2018-05-01T17:34:11.000Z | 2019-05-07T09:28:21.000Z | from .read import readiter
| 13.5 | 26 | 0.814815 |
73f7560df916fd96100dd4a83283eda472bb15a6 | 3,274 | py | Python | hatchet/util/profiler.py | TauferLab/llnl-hatchet | c7d12888d71d2b23058facd3025e7dcfa12cbb39 | [
"MIT"
] | null | null | null | hatchet/util/profiler.py | TauferLab/llnl-hatchet | c7d12888d71d2b23058facd3025e7dcfa12cbb39 | [
"MIT"
] | null | null | null | hatchet/util/profiler.py | TauferLab/llnl-hatchet | c7d12888d71d2b23058facd3025e7dcfa12cbb39 | [
"MIT"
] | null | null | null | # Copyright 2017-2022 Lawrence Livermore National Security, LLC and other
# Hatchet Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: MIT
import cProfile
import traceback
import sys
import os
from datetime import datetime
try:
from StringIO import StringIO # python2
ex... | 28.719298 | 123 | 0.57697 |
73f782685038d2cd750e41a555509344e9e47c66 | 14,230 | py | Python | lung_segmentation/generators.py | TransRadOnc-HIT/lung_segmentation | 1637709936dd0172fb6151902f4e9bede7a66e79 | [
"Apache-2.0"
] | 2 | 2020-06-12T13:32:31.000Z | 2021-07-30T16:11:50.000Z | lung_segmentation/generators.py | TransRadOnc-HIT/lung_segmentation | 1637709936dd0172fb6151902f4e9bede7a66e79 | [
"Apache-2.0"
] | null | null | null | lung_segmentation/generators.py | TransRadOnc-HIT/lung_segmentation | 1637709936dd0172fb6151902f4e9bede7a66e79 | [
"Apache-2.0"
] | 2 | 2020-08-04T14:40:33.000Z | 2021-01-22T13:05:22.000Z | import numpy as np
import nibabel as nib
import os
import glob
from lung_segmentation.utils import normalize
import nrrd
import multiprocessing
import collections
import math
import sys
import traceback
import threading
import scipy.misc
if sys.version_info[0] == 2:
import Queue as queue
string_classes = bases... | 34.206731 | 113 | 0.608082 |
73f7906b0d796a1c5e4bd14100a8e8809cc61766 | 2,483 | py | Python | test/test_analysis.py | cslotboom/planesections | fcb2127a38a78b45de44b75f5805efde89adf5d2 | [
"Apache-2.0"
] | 1 | 2021-11-12T08:36:31.000Z | 2021-11-12T08:36:31.000Z | test/test_analysis.py | cslotboom/planesections | fcb2127a38a78b45de44b75f5805efde89adf5d2 | [
"Apache-2.0"
] | null | null | null | test/test_analysis.py | cslotboom/planesections | fcb2127a38a78b45de44b75f5805efde89adf5d2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
R"""
Created on Sun May 23 01:00:41 2021
@author: Christian
"""
from planesections import EulerBeam, OpenSeesAnalyzer, RecordOutput
# from planesections import EulerBeam
import numpy as np
import openseespy.opensees as op
x = np.array([0,5])
fixities = [np.array([1,1,1], int), np.array([1,1,... | 25.336735 | 67 | 0.697946 |
73f7c12bfac2da04fb10d8b5525fbf9e650f88e8 | 25,126 | py | Python | pepperoni/logger.py | t3eHawk/pepperoni | 06b7ff9005bd1b7ed434ae286c2698d9205df718 | [
"MIT"
] | null | null | null | pepperoni/logger.py | t3eHawk/pepperoni | 06b7ff9005bd1b7ed434ae286c2698d9205df718 | [
"MIT"
] | null | null | null | pepperoni/logger.py | t3eHawk/pepperoni | 06b7ff9005bd1b7ed434ae286c2698d9205df718 | [
"MIT"
] | null | null | null | """Logging tools."""
import atexit
import datetime as dt
import os
import sys
import traceback
from .cache import all_loggers
from .formatter import Formatter
from .header import Header
from .output import Root
from .record import Record
class Logger():
"""Represents a particular logger object.
This class ... | 38.243531 | 79 | 0.582584 |
73f7d9e584482b52d1b1c8e06846f57221b6169f | 2,790 | py | Python | optimizers.py | adhirajghosh/RPTM_reid | 27713ef7c7358355641d68a92703cc44b61dba99 | [
"MIT"
] | null | null | null | optimizers.py | adhirajghosh/RPTM_reid | 27713ef7c7358355641d68a92703cc44b61dba99 | [
"MIT"
] | null | null | null | optimizers.py | adhirajghosh/RPTM_reid | 27713ef7c7358355641d68a92703cc44b61dba99 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import torch
import torch.nn as nn
def init_optimizer(model,
optim='adam', # optimizer choices
lr=0.003, # learning rate
weight_decay=5e-4, # weight decay
moment... | 43.59375 | 119 | 0.582437 |
73f7decbcb60963594048cb019f8cb5bf1580fd7 | 1,900 | py | Python | python/training_plots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | 1 | 2020-11-07T12:40:59.000Z | 2020-11-07T12:40:59.000Z | python/training_plots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | null | null | null | python/training_plots.py | Maplenormandy/list-62x | c1731d0610fdf9e58cb2792d706e8904c549fbd6 | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
from statsmodels.stats.weightstats import ttost_paired
import statsmodels.api as sm
import numpy as np
from sklearn import datasets, linear_model
from pylab import *
data = pd.read_csv(open('optimalPointsWmask_16s.csv'), index_col='Num')
# print data['Mean 0']
#Ba... | 27.142857 | 73 | 0.691579 |
73f7ef0f893fe450494e72221573ea321c2f37dd | 8,170 | py | Python | detectron/ops/generate_proposals.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 60 | 2021-08-07T09:16:52.000Z | 2022-03-14T09:09:00.000Z | detectron/ops/generate_proposals.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 4 | 2021-10-14T02:44:49.000Z | 2022-03-14T08:18:20.000Z | detectron/ops/generate_proposals.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 11 | 2021-11-01T00:30:37.000Z | 2021-12-08T10:01:52.000Z |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
##############################################################################
#
# Based on:
# --------------------------... | 42.774869 | 85 | 0.596083 |
73f7ff694be52a3a4fc6904d1ef9506c98697a3e | 3,397 | py | Python | hivwholeseq/sequencing/find_primers.py | neherlab/hivwholeseq | 978ce4060362e4973f92b122ed5340a5314d7844 | [
"MIT"
] | 3 | 2016-09-13T12:15:47.000Z | 2021-07-03T01:28:56.000Z | hivwholeseq/sequencing/find_primers.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | null | null | null | hivwholeseq/sequencing/find_primers.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | 3 | 2016-01-17T03:43:46.000Z | 2020-03-25T07:00:11.000Z | # vim: fdm=indent
'''
author: Fabio Zanini
date: 25/09/13
content: Reconstruct the primers coordinates (approx.) from the edges of the
fragments.
'''
# Modules
import os
import argparse
import pysam
import numpy as np
from Bio import SeqIO
from hivwholeseq.datasets import MiSeq_runs
from hivwh... | 30.330357 | 91 | 0.616426 |
73f8135e5484fe58ee212e3923c10fc842800999 | 8,404 | py | Python | deid/tests/test_clean.py | glebsts/deid | a0c630ee613d358b3c8e936dd539d51dee94a5a7 | [
"MIT"
] | 88 | 2017-10-16T12:47:09.000Z | 2022-03-10T23:08:04.000Z | deid/tests/test_clean.py | glebsts/deid | a0c630ee613d358b3c8e936dd539d51dee94a5a7 | [
"MIT"
] | 180 | 2017-06-15T01:37:00.000Z | 2022-03-23T23:05:57.000Z | deid/tests/test_clean.py | glebsts/deid | a0c630ee613d358b3c8e936dd539d51dee94a5a7 | [
"MIT"
] | 41 | 2017-09-29T00:29:50.000Z | 2022-03-16T02:26:54.000Z | #!/usr/bin/env python
"""
Test DICOM Cleaner
Copyright (c) 2016-2021 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
t... | 35.610169 | 134 | 0.681818 |
73f81a9a27ef429fae584543d6d69c1cc7d4abea | 11,369 | py | Python | datawinners/project/questionnaire_fields.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/project/questionnaire_fields.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/project/questionnaire_fields.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | import re
from string import strip
from django.core.exceptions import ValidationError
from django.forms import ChoiceField, FloatField, TextInput
from django.utils.encoding import force_unicode
from django.utils.translation import ugettext
from django import forms
from django.utils.translation import ugettext_lazy as ... | 43.726923 | 136 | 0.649749 |
73f83ed82935a22f03b30214821745b177f76a7e | 117 | py | Python | app/run.py | Sagargajare/flask-docker-final | 115cf02b7f1ae4fafdfa50a6ce09749a30c2f84a | [
"MIT"
] | null | null | null | app/run.py | Sagargajare/flask-docker-final | 115cf02b7f1ae4fafdfa50a6ce09749a30c2f84a | [
"MIT"
] | null | null | null | app/run.py | Sagargajare/flask-docker-final | 115cf02b7f1ae4fafdfa50a6ce09749a30c2f84a | [
"MIT"
] | null | null | null | from logging import debug
from flaskapp import app
if __name__ == '__main__':
app.run(host="0.0.0.0",debug=True) | 23.4 | 38 | 0.717949 |
73f84452eda43c51020b09bbabac843b7c24966d | 12 | py | Python | by-session/ta-921/j10/a7.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | 2 | 2015-04-29T20:59:35.000Z | 2018-09-26T13:33:43.000Z | by-session/ta-921/j10/a7.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | by-session/ta-921/j10/a7.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | input("xxx") | 12 | 12 | 0.666667 |
73f8501be99f4e1212f046749e0780e89a4bb20c | 8,028 | py | Python | HW2/dbsys-hw2/hw2.py | yliu120/dbsystem | d1b008f411929058a34a1dd2c44c9ee2cf899865 | [
"Apache-2.0"
] | null | null | null | HW2/dbsys-hw2/hw2.py | yliu120/dbsystem | d1b008f411929058a34a1dd2c44c9ee2cf899865 | [
"Apache-2.0"
] | null | null | null | HW2/dbsys-hw2/hw2.py | yliu120/dbsystem | d1b008f411929058a34a1dd2c44c9ee2cf899865 | [
"Apache-2.0"
] | null | null | null | from Database import Database
from Catalog.Schema import DBSchema
from time import time
db = Database(dataDir='./data')
def readResult( query ):
for page in db.processQuery(query):
for tup in page[1]:
yield query.schema().unpack(tup);
'''
SQL Query. Question 1:
select p.name, s.... | 41.169231 | 155 | 0.590932 |
73f873b8cab047d1e3925cb6533bb271a8faca5c | 5,606 | py | Python | asprin/src/program_parser/transitive_closure.py | potassco/asprin | 42e296cdc70cacbbc4d699ef32ec903c83c8208a | [
"MIT"
] | 16 | 2016-11-16T17:24:42.000Z | 2022-01-08T16:19:46.000Z | asprin/src/program_parser/transitive_closure.py | potassco/asprin | 42e296cdc70cacbbc4d699ef32ec903c83c8208a | [
"MIT"
] | 10 | 2018-03-14T14:18:40.000Z | 2022-01-21T13:24:06.000Z | asprin/src/program_parser/transitive_closure.py | potassco/asprin | 42e296cdc70cacbbc4d699ef32ec903c83c8208a | [
"MIT"
] | 4 | 2018-03-10T04:25:45.000Z | 2020-10-20T09:43:08.000Z | # MIT License
#
# Copyright (c) 2017 Javier Romero
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | 31.494382 | 80 | 0.577239 |
73f8767720f28853795aaa590e51a608160a71c2 | 2,420 | py | Python | authentication/wampcra/function/authenticator.py | benmthorn76/crossbar-examples | 1045aeda312c2a820859206a149392eb6c7f6e3f | [
"Apache-2.0"
] | 97 | 2016-12-14T16:48:49.000Z | 2021-09-12T17:48:10.000Z | authentication/wampcra/function/authenticator.py | benmthorn76/crossbar-examples | 1045aeda312c2a820859206a149392eb6c7f6e3f | [
"Apache-2.0"
] | 38 | 2016-12-13T09:42:38.000Z | 2020-07-05T11:58:07.000Z | authentication/wampcra/function/authenticator.py | benmthorn76/crossbar-examples | 1045aeda312c2a820859206a149392eb6c7f6e3f | [
"Apache-2.0"
] | 118 | 2016-12-12T21:36:40.000Z | 2021-11-17T11:49:33.000Z | import os
from pprint import pprint, pformat
import txaio
txaio.use_twisted()
from txaio import make_logger
from twisted.internet.defer import inlineCallbacks
from autobahn.twisted.wamp import ApplicationSession
from autobahn.wamp.exception import ApplicationError
from autobahn.xbr._util import hlval, hlid, hl, hlt... | 29.876543 | 129 | 0.650413 |
73f888b5a23833031b8c9d0c189507a74b1c806b | 3,439 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/maintenance_redeploy_status_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 56.377049 | 313 | 0.742367 |
73f8a3ee684eb058258a44ec653fb481b4d124c2 | 5,061 | py | Python | mcts_AlphaGo.py | Tailen/Alpha_Connect | 56128bbf996d6e95af81ab72b9e6044e2420bfa5 | [
"MIT"
] | 3 | 2018-12-03T13:17:01.000Z | 2019-01-06T13:59:17.000Z | mcts_AlphaGo.py | Tailen/Alpha_Connect | 56128bbf996d6e95af81ab72b9e6044e2420bfa5 | [
"MIT"
] | null | null | null | mcts_AlphaGo.py | Tailen/Alpha_Connect | 56128bbf996d6e95af81ab72b9e6044e2420bfa5 | [
"MIT"
] | null | null | null | import numpy as np
from copy import deepcopy
from simulateGame import simulatedGame
from utils import convertInput
import numpy as np
# Use epsilon to prevent division by zero
epsilon = np.finfo(float).eps
# A list that store depths of every treeNode created
depthList = []
class treeNode(object):
'''
Class fo... | 39.232558 | 108 | 0.617664 |
73f8a9bf48c0d9a7c1698b00dc658f183fe01da1 | 3,255 | py | Python | somaticseq/utilities/variant_annotation.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 159 | 2015-07-26T15:14:44.000Z | 2022-03-31T03:29:25.000Z | somaticseq/utilities/variant_annotation.py | lethalfang/somaticseq | e6f5b1c6b98b324d418407154392778164215a65 | [
"BSD-2-Clause"
] | 77 | 2016-06-12T21:44:43.000Z | 2022-03-31T19:33:49.000Z | somaticseq/utilities/variant_annotation.py | lethalfang/somaticseq | e6f5b1c6b98b324d418407154392778164215a65 | [
"BSD-2-Clause"
] | 64 | 2015-10-26T01:34:32.000Z | 2022-03-14T14:43:08.000Z | #!/usr/bin/env python3
import os
import logging
import re
import itertools
import argparse
import multiprocessing
import gzip
import subprocess
import uuid
import pysam
import tempfile
COSMIC_STRING = 'GENE,CDS,AA,CNT'
DBSNP_STRING = 'RSPOS,GENEINFO,dbSNPBuildID,SAO,SSR,VC,PM,MUT,KGPhase1,KGPhase3,OM,CDA,CAF,COMMON'
... | 36.166667 | 162 | 0.72381 |
73f8b2cc63dcdbb82015dd60b01a72d4546e800a | 13,825 | bzl | Python | tensorflow/workspace.bzl | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/workspace.bzl | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/workspace.bzl | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | null | null | null | # TensorFlow external dependencies that can be loaded in WORKSPACE files.
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure")
load("//third_party/sycl:sycl_configure.bzl", "sycl_configure")
# If TensorFlow is linked as a submodule.
# path_prefix and tf_repo_name are no longer used.
def tf_workspace(path_... | 39.613181 | 159 | 0.689982 |
73f8b7dd04b913e7160dc2a6d1e745fbb25919c8 | 4,253 | py | Python | parlai/agents/tfidf_retriever/tokenizers/tokenizer.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 17 | 2020-03-27T17:25:52.000Z | 2021-11-19T03:46:25.000Z | parlai/agents/tfidf_retriever/tokenizers/tokenizer.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-11-01T10:12:52.000Z | 2021-12-10T09:06:44.000Z | parlai/agents/tfidf_retriever/tokenizers/tokenizer.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-05-04T04:37:42.000Z | 2021-07-19T11:09:37.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Base tokenizer/tokens classes and utilities."""
import copy
class Tokens(object):
"""A class to represent a li... | 29.950704 | 77 | 0.564308 |
73f8be2673a26b406ae907fe783f9e5d7b8ecb90 | 7,258 | py | Python | ubcs_auxiliary/os.py | vstadnytskyi/auxiliary | 3916af3a147f72071388278385d484b9eacbc66b | [
"BSD-3-Clause"
] | null | null | null | ubcs_auxiliary/os.py | vstadnytskyi/auxiliary | 3916af3a147f72071388278385d484b9eacbc66b | [
"BSD-3-Clause"
] | 1 | 2019-10-16T16:40:27.000Z | 2019-10-16T16:40:27.000Z | ubcs_auxiliary/os.py | vstadnytskyi/auxiliary | 3916af3a147f72071388278385d484b9eacbc66b | [
"BSD-3-Clause"
] | 1 | 2020-01-18T05:57:41.000Z | 2020-01-18T05:57:41.000Z | def find(topdir, name=[], exclude=[]):
"""A list of files found starting at 'topdir' that match the patterns given
by 'name', excluding those matching the patterns given by 'exclude'.
Parameters
----------
topdir (string)
name (list)
exclude (list)
Returns
-------
file_list (li... | 30.624473 | 231 | 0.603748 |
73f8e6bca8272dde10cde16dd235d5c50e8c43fe | 22,924 | py | Python | src/post/dialog_post.py | gywukun09/GPS | ce474f4afbcb64d46e85f04675e63343d5b65b47 | [
"MIT"
] | 18 | 2017-08-08T16:46:21.000Z | 2021-11-24T06:43:08.000Z | src/post/dialog_post.py | haoxy97/GPS | 3da6d3a7410b7b7e5340373f206a1833759d5acf | [
"MIT"
] | 1 | 2019-12-24T11:53:18.000Z | 2019-12-24T11:53:18.000Z | src/post/dialog_post.py | haoxy97/GPS | 3da6d3a7410b7b7e5340373f206a1833759d5acf | [
"MIT"
] | 14 | 2017-07-08T03:17:37.000Z | 2022-01-10T12:33:27.000Z |
import sys
import os
import cantera as ct
import json
import time
import copy
import matplotlib.pyplot as plt
from PyQt4 import uic
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from src.core.def_tools import keys_sorted
from src.gui.def_dialog import *
from src.gui.dialog_mech import dialog_mech
from dia... | 24.155954 | 137 | 0.629384 |
73f90478cead28dd565df6aed247e83cf6faf582 | 12,687 | py | Python | nnunet/run/run_training.py | ZXLam/nnUNet | 0cf7c8a857c248d6be171e4945427b405f6ac258 | [
"Apache-2.0"
] | null | null | null | nnunet/run/run_training.py | ZXLam/nnUNet | 0cf7c8a857c248d6be171e4945427b405f6ac258 | [
"Apache-2.0"
] | null | null | null | nnunet/run/run_training.py | ZXLam/nnUNet | 0cf7c8a857c248d6be171e4945427b405f6ac258 | [
"Apache-2.0"
] | 1 | 2022-03-15T03:15:02.000Z | 2022-03-15T03:15:02.000Z | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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://w... | 56.638393 | 132 | 0.632931 |
73f91f8d34d123ff618cd4282535a932616364de | 1,196 | py | Python | MGN/model_utils/local_adapter.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | MGN/model_utils/local_adapter.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | MGN/model_utils/local_adapter.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 29.170732 | 78 | 0.660535 |
73f92335136b06eff8765d10b9e423135fef62df | 3,562 | py | Python | src/meta.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 24 | 2018-12-12T08:54:52.000Z | 2021-12-07T08:45:13.000Z | src/meta.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 3 | 2019-07-18T20:14:41.000Z | 2022-03-12T01:03:28.000Z | src/meta.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 9 | 2018-12-12T16:18:39.000Z | 2022-03-30T16:25:47.000Z | from pathlib import Path
from loguru import logger
from src.utils.loaders import get_env
from src.utils.loaders import load_yaml
from src.utils.loaders import metadata_path
__all__ = [
"DatasetMeta",
"BaseMeta",
"HARMeta",
"ModalityMeta",
"DatasetMeta",
]
class BaseMeta(object):
def __init... | 29.438017 | 120 | 0.591802 |
73f935b7f6ddf1cb5928b09156ada07e5e96fe3a | 1,553 | py | Python | src/visions/core/implementations/types/__init__.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/visions/core/implementations/types/__init__.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/visions/core/implementations/types/__init__.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | from visions.core.model.visions_generic import visions_generic
from visions.core.implementations.types.visions_string import visions_string
from visions.core.implementations.types.visions_bool import visions_bool
from visions.core.implementations.types.visions_categorical import visions_categorical
from visions.core.im... | 67.521739 | 86 | 0.891822 |
73f9584156131577776dd794f58e7d921e0b2aeb | 2,972 | py | Python | app/services/auth.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | 1 | 2021-10-17T13:28:51.000Z | 2021-10-17T13:28:51.000Z | app/services/auth.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | null | null | null | app/services/auth.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from fastapi import HTTPException, status, Depends
from fastapi.security import OAuth2PasswordBearer
from jose import JWTError, jwt
from pydantic import ValidationError
from sqlalchemy import func
from app.schemas import Doctor, Token, DoctorCreate
from app.models import Doct... | 33.772727 | 86 | 0.626851 |
73f965f13d58c10851a43ee66c44df9cdbc2f794 | 3,250 | py | Python | nova/api/openstack/compute/legacy_v2/contrib/assisted_volume_snapshots.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/api/openstack/compute/legacy_v2/contrib/assisted_volume_snapshots.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-07-11T20:59:47.000Z | 2020-07-28T09:56:35.000Z | nova/api/openstack/compute/legacy_v2/contrib/assisted_volume_snapshots.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2020-04-08T20:24:45.000Z | 2020-10-05T19:02:13.000Z | # Copyright 2013 Red Hat, 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 agre... | 33.163265 | 79 | 0.662462 |
73f9684447d70d9be3ef125d3b85662543c99bcb | 2,153 | py | Python | python-daemon/marvin_python_daemon/management/notebook.py | AI-ML-Projects/incubator-marvin | 394eaa729cd4637c2d585f721441819798546667 | [
"Apache-2.0"
] | null | null | null | python-daemon/marvin_python_daemon/management/notebook.py | AI-ML-Projects/incubator-marvin | 394eaa729cd4637c2d585f721441819798546667 | [
"Apache-2.0"
] | null | null | null | python-daemon/marvin_python_daemon/management/notebook.py | AI-ML-Projects/incubator-marvin | 394eaa729cd4637c2d585f721441819798546667 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Copyright [2020] [Apache Software Foundation]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | 32.621212 | 95 | 0.657687 |
73f9ba32ca44f4f80f76ae26ca39735c527102f4 | 4,850 | py | Python | examiner/tests/test_views.py | JakobGM/WikiLinks | 5743b1d4c3fefa66fcaa4d283436d2a3f0490604 | [
"MIT"
] | 6 | 2017-08-12T09:55:06.000Z | 2019-09-03T08:05:21.000Z | examiner/tests/test_views.py | JakobGM/WikiLinks | 5743b1d4c3fefa66fcaa4d283436d2a3f0490604 | [
"MIT"
] | 57 | 2017-08-11T23:05:07.000Z | 2022-03-11T23:32:12.000Z | examiner/tests/test_views.py | JakobGM/WikiLinks | 5743b1d4c3fefa66fcaa4d283436d2a3f0490604 | [
"MIT"
] | 1 | 2017-09-27T15:31:15.000Z | 2017-09-27T15:31:15.000Z | from django.core.files.base import ContentFile
from django.shortcuts import reverse
import pytest
from examiner.forms import VerifyExamForm
from examiner.models import DocumentInfo, DocumentInfoSource, Pdf
from semesterpage.tests.factories import CourseFactory
@pytest.mark.django_db
def test_empty_exams_view(client... | 33.916084 | 78 | 0.702268 |
73f9c6a20bce60704f103fd5a0b786432a81ea15 | 18,931 | py | Python | datacube/drivers/postgres/_fields.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | 2 | 2019-10-24T15:29:54.000Z | 2019-10-24T15:29:58.000Z | datacube/drivers/postgres/_fields.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | 2 | 2021-03-26T00:37:36.000Z | 2021-03-31T20:05:01.000Z | datacube/drivers/postgres/_fields.py | Kirill888/datacube-core | 996b395e15f975decb77c0ca9fa0555177674b2f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# pylint: disable=abstract-method
"""
Build and index fields within documents.
"""
from collections import namedtuple
from datetime import datetime, date
from decimal import Decimal
from dateutil import tz
from psycopg2.extras import NumericRange, DateTimeTZRange
from sqlalchemy import cast, func, and_
... | 30.049206 | 117 | 0.624426 |
73f9e015cdc239626a6062827bf90200e8044554 | 1,719 | py | Python | kairon/data_processor/constant.py | Anitej/kairon | 61d6bd7f230a744303abab42e3b54b0381fee7da | [
"Apache-2.0"
] | null | null | null | kairon/data_processor/constant.py | Anitej/kairon | 61d6bd7f230a744303abab42e3b54b0381fee7da | [
"Apache-2.0"
] | 1 | 2021-01-29T22:20:59.000Z | 2021-01-29T22:20:59.000Z | kairon/data_processor/constant.py | Anitej/kairon | 61d6bd7f230a744303abab42e3b54b0381fee7da | [
"Apache-2.0"
] | null | null | null | from enum import Enum
TRAINING_DATA_GENERATOR_DIR = 'data_generator'
class RESPONSE(str, Enum):
Text = "text"
CUSTOM = "custom"
IMAGE = "image"
CHANNEL = "channel"
BUTTONS = "buttons"
class DOMAIN(str, Enum):
INTENTS = "intents"
ACTIONS = "actions"
SLOTS = "slots"
SESSION_CONFI... | 19.314607 | 55 | 0.656195 |
73f9f97afb4a78054d7be47f49e5ab437499b3c5 | 413 | py | Python | analysis/join.py | rudolfspetrovs/benchml | 896673f387a6bb9b185664ddd54f569a1ba54e51 | [
"Apache-2.0"
] | 3 | 2021-08-12T13:25:31.000Z | 2022-03-21T21:30:22.000Z | analysis/join.py | rudolfspetrovs/benchml | 896673f387a6bb9b185664ddd54f569a1ba54e51 | [
"Apache-2.0"
] | 5 | 2020-12-08T08:59:41.000Z | 2022-01-22T06:46:09.000Z | analysis/join.py | rudolfspetrovs/benchml | 896673f387a6bb9b185664ddd54f569a1ba54e51 | [
"Apache-2.0"
] | 1 | 2021-06-25T11:07:32.000Z | 2021-06-25T11:07:32.000Z | #! /usr/bin/env python
import glob
import gzip
import json
import benchml as bml
bml.log.Connect()
bml.log.AddArg("dataset", str)
args = bml.log.Parse()
js = sorted(glob.glob("%s*.json" % args.dataset))
data = []
for j in js:
data.extend(json.load(open(j)))
with gzip.GzipFile("benchmark_%s.json.gz" % args.datas... | 21.736842 | 74 | 0.68523 |
73fa755990b7f0edabed8fe43f4e908518c1b387 | 408 | py | Python | icoscp/cpb/__init__.py | ICOS-Carbon-Portal/pylib | 3a86c936ee5fa03520384a8e18ed093decdab171 | [
"CC-BY-4.0"
] | 4 | 2020-09-27T09:05:56.000Z | 2022-01-10T18:11:57.000Z | icoscp/cpb/__init__.py | ICOS-Carbon-Portal/pylib | 3a86c936ee5fa03520384a8e18ed093decdab171 | [
"CC-BY-4.0"
] | 26 | 2020-08-03T13:00:56.000Z | 2022-03-31T15:40:26.000Z | icoscp/cpb/__init__.py | ICOS-Carbon-Portal/pylib | 3a86c936ee5fa03520384a8e18ed093decdab171 | [
"CC-BY-4.0"
] | 2 | 2020-07-28T08:35:01.000Z | 2021-02-04T21:11:36.000Z | """
The cpb module gives you access to a binary representatin of
digital data objects hosted at the ICOS CarbonPortal.
Any data column (x,y axis) you can "preview" on the data portal
( https://data.icos-cp.eu/portal/ ) is accessible from this module.
You need to know the digital object ID (URL, per... | 45.333333 | 75 | 0.715686 |
73fa90abd2533b5e3f724341ad9e0b66db45f6e7 | 11,768 | py | Python | tests/common/utils.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | tests/common/utils.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | tests/common/utils.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 28.985222 | 90 | 0.622876 |
73fadbac9bdb79dcb24b025fe37b0d3d77db08ab | 11,192 | py | Python | Lib/site-packages/wx-3.0-msw/wx/lib/pdfwin.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | Lib/site-packages/wx-3.0-msw/wx/lib/pdfwin.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | Lib/site-packages/wx-3.0-msw/wx/lib/pdfwin.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | #----------------------------------------------------------------------
# Name: wx.lib.pdfwin
# Purpose: A class that allows the use of the Acrobat PDF reader
# ActiveX control
#
# Author: Robin Dunn
#
# Created: 22-March-2004
# RCS-ID: $Id$
# Copyright: (c) 2008 by Total Control... | 37.683502 | 91 | 0.527073 |
73faf97fabf739612c3a44d238b084b7bc85bbd0 | 508 | py | Python | Utils/Helpers.py | srinibasmisra97/OAuth-Authorization-Server | a289de5432f271e804d12419305722fd113fa8f4 | [
"MIT"
] | null | null | null | Utils/Helpers.py | srinibasmisra97/OAuth-Authorization-Server | a289de5432f271e804d12419305722fd113fa8f4 | [
"MIT"
] | null | null | null | Utils/Helpers.py | srinibasmisra97/OAuth-Authorization-Server | a289de5432f271e804d12419305722fd113fa8f4 | [
"MIT"
] | null | null | null | import memcache
def memcache_connection():
"""
This returns a memcache connection client.
:return: Memcache client.
"""
from main import MEMCACHE_HOST, MEMCACHE_PORT
client = memcache.Client(servers=[MEMCACHE_HOST + ":" + str(MEMCACHE_PORT)])
return client
def list_to_string(list):
"... | 22.086957 | 80 | 0.63189 |
73fb1156d6bb31eef82b27fb14b455701a81914e | 4,623 | py | Python | server/app/scrapers/ooms.py | damienallen/makelaardij-notify | ea8e37e1b0f867487b90590c5273e7fb25d868cf | [
"MIT"
] | null | null | null | server/app/scrapers/ooms.py | damienallen/makelaardij-notify | ea8e37e1b0f867487b90590c5273e7fb25d868cf | [
"MIT"
] | 15 | 2021-02-13T23:46:28.000Z | 2021-02-25T15:36:08.000Z | server/app/scrapers/ooms.py | damienallen/makelaardij-notify | ea8e37e1b0f867487b90590c5273e7fb25d868cf | [
"MIT"
] | null | null | null | import asyncio
import json
from datetime import datetime
from typing import List, Tuple, Union
import httpx
from app.broadcast import broadcast_apartment
from app.common import MissingListing, SkipListing
from app.models import Apartment
from app.scrapers.base import BaseScraper
from odmantic import AIOEngine
from pyd... | 32.328671 | 84 | 0.595717 |
73fb1e0e8ac45577473966dad62f8bdaebcf5b1f | 35,129 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_disk_encryption_sets_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_disk_encryption_sets_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_disk_encryption_sets_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.584367 | 205 | 0.675539 |
73fb6ddaf6c57935ea47212fd3335479769084c0 | 39 | py | Python | test/lmp/script/__init__.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/script/__init__.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/script/__init__.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | """Test :py:mod:`lmp.script` entry."""
| 19.5 | 38 | 0.589744 |
73fb6e8998cd40aa5719936cf5a6d0e7a46476e8 | 2,882 | py | Python | heap/skyline.py | AnshulPatni/Algorithms | c8bcfb86d50f68041921e5140f01821ac12d9521 | [
"MIT"
] | 2 | 2018-04-30T19:31:04.000Z | 2018-05-05T14:29:45.000Z | heap/skyline.py | AnshulPatni/Algorithms | c8bcfb86d50f68041921e5140f01821ac12d9521 | [
"MIT"
] | null | null | null | heap/skyline.py | AnshulPatni/Algorithms | c8bcfb86d50f68041921e5140f01821ac12d9521 | [
"MIT"
] | 1 | 2020-03-22T08:47:24.000Z | 2020-03-22T08:47:24.000Z | # -*- coding: utf-8 -*-
"""
A city's skyline is the outer contour of the silhouette formed by all the buildings
in that city when viewed from a distance.
Now suppose you are given the locations and height of all the buildings
as shown on a cityscape photo (Figure A),
write a program to output the skyline formed by thes... | 43.666667 | 124 | 0.640527 |
73fb880f050babc58e8794068a3541a90cd62e1e | 5,899 | py | Python | src/speech/plt_spec.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 6 | 2020-08-03T03:13:25.000Z | 2022-02-11T08:32:10.000Z | src/speech/plt_spec.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 1 | 2020-09-08T16:10:38.000Z | 2020-09-08T16:10:38.000Z | src/speech/plt_spec.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 2 | 2020-08-03T21:37:21.000Z | 2021-03-26T02:19:17.000Z | def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
window=None, noverlap=None,
cmap=None, xextent=None, pad_to=None, sides=None,
scale_by_freq=None, mode=None, scale=None,
vmin=None, vmax=None, **kwargs):
"""
Plot a spectr... | 45.376923 | 79 | 0.553314 |
73fba5344bb3cf3b9213e8be0f9f80e2f8f10859 | 1,331 | bzl | Python | third_party/com_google_guava.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/com_google_guava.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/com_google_guava.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load(":import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "com_google_guava_failureaccess",
artifact = "com.google.guava:failureaccess:1.0.1",
artifact_sha256 = "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26",
sr... | 40.333333 | 97 | 0.718257 |
73fbac16b18f9495efe268754072fd2fdd371032 | 234 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_676.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_676.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/alt_format_676.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. 676 metadata"""
from ..phonemetadata import NumberFormat
PHONE_ALT_FORMAT_676 = [NumberFormat(pattern='(\\d{2})(\\d{5})', format='\\1 \\2', leading_digits_pattern=['7[5-9]|8[47-9]'])]
| 46.8 | 127 | 0.675214 |
73fbac3d5069fd09e76979132b6ef9d551a16573 | 819 | py | Python | cartpole/model/__init__.py | hypnosapos/cartpole-rl-remote | 7111c9752cb663c1ef7a3815bd7c9f3c2d199ab9 | [
"MIT"
] | 24 | 2018-04-04T14:41:29.000Z | 2020-12-10T02:01:11.000Z | cartpole/model/__init__.py | davsuacar/cartpole-rl-remote | 7111c9752cb663c1ef7a3815bd7c9f3c2d199ab9 | [
"MIT"
] | 8 | 2018-06-19T15:24:22.000Z | 2022-02-09T23:31:26.000Z | cartpole/model/__init__.py | davsuacar/cartpole-rl-remote | 7111c9752cb663c1ef7a3815bd7c9f3c2d199ab9 | [
"MIT"
] | 2 | 2018-06-19T15:00:48.000Z | 2019-04-10T07:58:39.000Z | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
from tensorflow.keras import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.callbacks import TensorBoard
def get_model(model_type='keras', model_spec={}):
assert model_type... | 30.333333 | 75 | 0.733822 |
73fbafdf2b8120d2d521d122740f59206375b46b | 473 | py | Python | server/mesite/migrations/0003_auto_20210717_1926.py | mezidia/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 6 | 2021-02-10T10:50:18.000Z | 2021-08-21T10:44:37.000Z | server/mesite/migrations/0003_auto_20210717_1926.py | mezgoodle/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 116 | 2021-02-10T08:09:03.000Z | 2022-03-30T01:50:02.000Z | server/mesite/migrations/0003_auto_20210717_1926.py | mezgoodle/song-helper | 059d02f4e5e4758bef04322ee53d1f1e815ba08b | [
"MIT"
] | 1 | 2021-08-16T14:31:13.000Z | 2021-08-16T14:31:13.000Z | # Generated by Django 3.1.8 on 2021-07-17 16:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mesite', '0002_auto_20210312_1318'),
]
operations = [
migrations.AlterField(
model_name='mood',
name='mood',
... | 24.894737 | 142 | 0.581395 |
73fbd245e64810cb5c88c52e89e8b464e913cffa | 24,532 | py | Python | code/translator/hot/syntax/hot_resource.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 8 | 2017-03-13T16:34:28.000Z | 2021-11-16T11:35:56.000Z | code/translator/hot/syntax/hot_resource.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | null | null | null | code/translator/hot/syntax/hot_resource.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 3 | 2017-03-28T09:26:40.000Z | 2020-12-08T14:16:12.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | 43.266314 | 79 | 0.607207 |
73fbe14f727052328e06a871d7924a52a2c8ac3f | 35,186 | py | Python | sdks/python/apache_beam/runners/portability/stager.py | abergmeier/beam | f1360c4dd71d9880bfce7feea415457ac0647c30 | [
"Apache-2.0"
] | null | null | null | sdks/python/apache_beam/runners/portability/stager.py | abergmeier/beam | f1360c4dd71d9880bfce7feea415457ac0647c30 | [
"Apache-2.0"
] | null | null | null | sdks/python/apache_beam/runners/portability/stager.py | abergmeier/beam | f1360c4dd71d9880bfce7feea415457ac0647c30 | [
"Apache-2.0"
] | 1 | 2021-12-26T15:58:25.000Z | 2021-12-26T15:58:25.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 use ... | 41.788599 | 97 | 0.675837 |
73fbe486fdc475dc98eefed89194af2f1f849152 | 5,773 | py | Python | utils/interpolation.py | NIRVANALAN/self-mono-sf | 80ac323099b3ca32802c5d3f91db3e6a5cafca25 | [
"Apache-2.0"
] | 213 | 2020-03-12T07:43:26.000Z | 2022-03-24T05:13:04.000Z | utils/interpolation.py | NIRVANALAN/self-mono-sf | 80ac323099b3ca32802c5d3f91db3e6a5cafca25 | [
"Apache-2.0"
] | 18 | 2020-04-20T12:30:46.000Z | 2022-02-18T09:26:35.000Z | utils/interpolation.py | NIRVANALAN/self-mono-sf | 80ac323099b3ca32802c5d3f91db3e6a5cafca25 | [
"Apache-2.0"
] | 45 | 2020-04-09T01:37:20.000Z | 2022-03-24T05:12:48.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
from torch import nn
import torch.nn.functional as tf
def interpolate2d(inputs, size, mode="bilinear"):
return tf.interpolate(inputs, size, mode=mode, align_corners=True)
def interpolate2d_... | 38.486667 | 101 | 0.593452 |
73fbfdc610ae3f0784d2fc140d8e0d2747ade457 | 3,809 | py | Python | pgbot/emotion.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 77 | 2020-11-16T05:26:49.000Z | 2021-03-08T06:27:06.000Z | pgbot/emotion.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 71 | 2021-03-19T17:51:30.000Z | 2022-02-19T12:42:19.000Z | pgbot/emotion.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 19 | 2021-03-19T12:48:17.000Z | 2021-12-18T04:41:08.000Z | """
This file is a part of the source code for the PygameCommunityBot.
This project has been licensed under the MIT license.
Copyright (c) 2020-present PygameCommunityDiscord
This file defines some utitities and functions for the bots emotion system
"""
import random
import math
import discord
import unidecode
from p... | 27.601449 | 87 | 0.589919 |
73fc34dc87e50a87b1d010f0465f27fd36fe14f1 | 5,023 | py | Python | recipes/recipe_modules/support_3pp/run_script.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipe_modules/support_3pp/run_script.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipe_modules/support_3pp/run_script.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Defines the utility function for running a script; understands how to run
bash scripts on all host platforms (including windows)."""
from contextlib impo... | 36.136691 | 79 | 0.670317 |
73fc55554d03855a25852ef208233705e5a20b67 | 2,835 | py | Python | instructors/course-2015/functions_gens_and_ducks/examples/in_class/parsetext_trade_2015.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/course-2015/functions_gens_and_ducks/examples/in_class/parsetext_trade_2015.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/course-2015/functions_gens_and_ducks/examples/in_class/parsetext_trade_2015.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | # -*- coding: utf-8 -*-
#above helps to declare what encoding we want to use in the module
#note this is copied from the first json lab
#above is used to set the encoding for this module, (unfortunately didn't help that much)
#used for seeing our data in nicest string format possible
import pprint
#again idiom for ... | 28.928571 | 89 | 0.724515 |
73fc6bf7d20cfcd4e4ccc6ea541d1270cc2ae4f5 | 870 | py | Python | nova/api/openstack/compute/schemas/networks_associate.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/api/openstack/compute/schemas/networks_associate.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/api/openstack/compute/schemas/networks_associate.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 34.8 | 78 | 0.712644 |
73fcc339e6fefd60a002c2ec3b49f0f4fc3f89e0 | 3,127 | py | Python | scripts/freesurfer/_01_recon_all.py | mathias-sm/mne-bids-pipeline | 55a8d7c7ca5a254ff7b9af84b818b164692667d5 | [
"BSD-3-Clause"
] | null | null | null | scripts/freesurfer/_01_recon_all.py | mathias-sm/mne-bids-pipeline | 55a8d7c7ca5a254ff7b9af84b818b164692667d5 | [
"BSD-3-Clause"
] | null | null | null | scripts/freesurfer/_01_recon_all.py | mathias-sm/mne-bids-pipeline | 55a8d7c7ca5a254ff7b9af84b818b164692667d5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import shutil
import sys
from pathlib import Path
import logging
from typing import Union
from mne.utils import run_subprocess
from config import parallel_func
import config
PathLike = Union[str, Path]
logger = logging.getLogger('mne-bids-pipeline')
fs_bids_app = Path(__file__).paren... | 29.5 | 79 | 0.654941 |
73fccf655a075cfd1f4448b85d4944bc3d7f534a | 1,309 | py | Python | setup.py | kaiterra/api-python | 102a99b487f328f61f785597d22eee876ddcfcb6 | [
"MIT"
] | 2 | 2019-07-03T16:26:48.000Z | 2021-09-11T18:57:12.000Z | setup.py | kaiterra/api-python | 102a99b487f328f61f785597d22eee876ddcfcb6 | [
"MIT"
] | null | null | null | setup.py | kaiterra/api-python | 102a99b487f328f61f785597d22eee876ddcfcb6 | [
"MIT"
] | 4 | 2019-09-10T19:20:03.000Z | 2019-11-28T02:37:07.000Z | #!/usr/bin/env python3
"""Define the setup options."""
import os
import re
import setuptools
with open('README.rst', 'r') as f:
readme = f.read()
setuptools.setup(
name='kaiterra-client',
version='0.0.1',
description="Kaiterra API Client",
long_description=readme,
long_description_content_typ... | 30.44186 | 74 | 0.627196 |
73fcf1399dc6c9150cb4ed54047914f713bb929a | 22,318 | py | Python | python/jiminy_py/src/jiminy_py/viewer.py | matthieuvigne/jiminy | f893b2254a9e695a4154b941b599536756ea3d8b | [
"MIT"
] | null | null | null | python/jiminy_py/src/jiminy_py/viewer.py | matthieuvigne/jiminy | f893b2254a9e695a4154b941b599536756ea3d8b | [
"MIT"
] | null | null | null | python/jiminy_py/src/jiminy_py/viewer.py | matthieuvigne/jiminy | f893b2254a9e695a4154b941b599536756ea3d8b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
## @file jiminy_py/viewer.py
import os
import re
import time
import shutil
import tempfile
import subprocess
import numpy as np
from bisect import bisect_right
from threading import Thread, Lock
from PIL import Image
import pinocchio as pnc
from pinocchio.robot_wrapper import RobotWrapper
from ... | 44.995968 | 138 | 0.592705 |
73fd15b6311977c3272f370691a734157d4d6666 | 1,923 | py | Python | data/setup_data.py | comath/goko | a58925baf5398f7cca7909eed632dbbd87931827 | [
"Apache-2.0"
] | null | null | null | data/setup_data.py | comath/goko | a58925baf5398f7cca7909eed632dbbd87931827 | [
"Apache-2.0"
] | null | null | null | data/setup_data.py | comath/goko | a58925baf5398f7cca7909eed632dbbd87931827 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
mnist = tf.keras.datasets.mnist
import pandas as pd
from sklearn.neighbors import KDTree
import os
# Base MNIST transform for easy access.
# The Yaml files are often messed with, these are the base files.
mnist_yaml = '''
---
cutoff: 5
resolution: -10
scale_base: 2
data_path... | 23.168675 | 65 | 0.660426 |
73fd4e7f141456a1b7ae053b19716498b95b4ddf | 2,368 | py | Python | exercises/phone-number/phone_number_test.py | jamesmcm/python | 9f1d41da23ff7248e891ee1c8f01d11793e7d3ea | [
"MIT"
] | null | null | null | exercises/phone-number/phone_number_test.py | jamesmcm/python | 9f1d41da23ff7248e891ee1c8f01d11793e7d3ea | [
"MIT"
] | null | null | null | exercises/phone-number/phone_number_test.py | jamesmcm/python | 9f1d41da23ff7248e891ee1c8f01d11793e7d3ea | [
"MIT"
] | 1 | 2021-12-29T19:26:23.000Z | 2021-12-29T19:26:23.000Z | import unittest
from phone_number import Phone
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0
class PhoneTest(unittest.TestCase):
def test_cleans_number(self):
number = Phone("(223) 456-7890").number
self.assertEqual(number, "2234567890")
def test_cleans_number_... | 32.438356 | 75 | 0.681588 |
73fd51265998400557f74bd8bb1975cc8e4cfcdf | 193 | py | Python | testmaster/dummyprograms/fibonacci.py | S-P-A-N-N-E-R-S/Testmaster | e0804b30a6f77c136eca890e692ea54195a31bb9 | [
"BSD-3-Clause"
] | null | null | null | testmaster/dummyprograms/fibonacci.py | S-P-A-N-N-E-R-S/Testmaster | e0804b30a6f77c136eca890e692ea54195a31bb9 | [
"BSD-3-Clause"
] | null | null | null | testmaster/dummyprograms/fibonacci.py | S-P-A-N-N-E-R-S/Testmaster | e0804b30a6f77c136eca890e692ea54195a31bb9 | [
"BSD-3-Clause"
] | null | null | null | import sys
def fibonacci(n):
if n in {0, 1}: # Base case
return n
return fibonacci(n - 1) + fibonacci(n - 2)
x = int(sys.argv[1])
print ("fibonacci von", x, "=", fibonacci(x)) | 24.125 | 46 | 0.580311 |
73fd5872db86dd2a7ef5ebb3ad6fc6b8b122cc52 | 414 | py | Python | components/py_engine/tests/haas/HaaSEdu/pyamp/main.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/py_engine/tests/haas/HaaSEdu/pyamp/main.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/py_engine/tests/haas/HaaSEdu/pyamp/main.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
###
# Filename: /Users/guoliang.wgl/Downloads/aos33_new/components/py_engine/tests/haas/HaaS100/pyamp/main.py
# Path: /Users/guoliang.wgl/Downloads/aos33_new/components/py_engine/tests/haas/HaaS100/pyamp
# Created Date: Monday, July 12th 2021, 4:01:02 pm
# Author: guoliang.w... | 25.875 | 105 | 0.722222 |
73fd67dc5b29f6c43cc1814612ec37af17296684 | 1,317 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/stats/__init__.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/functions/stats/__init__.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/functions/stats/__init__.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram 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... | 43.9 | 75 | 0.689446 |
73fd70d6c54514a287d4f538187f070dab1b978a | 2,444 | py | Python | python/basic/heap/max_heap.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/basic/heap/max_heap.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/basic/heap/max_heap.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class MaxHeap:
def __init__(self):
self.data = []
def root_node(self):
return self.data[0]
def last_node(self):
return self.data[-1]
def left_child_index(self, index):
return 2 * index + 1
def right_child_index(self, index):
return 2 * index + 2
def ... | 22.841121 | 71 | 0.568331 |
73fd8e400ddaf7962e2e4763f4949dde3192c1d3 | 9,253 | py | Python | appengine/findit/handlers/test/collect_tree_closures_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/handlers/test/collect_tree_closures_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/handlers/test/collect_tree_closures_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from datetime import datetime
import json
import mock
from google.appengine.ext import ndb
import webapp2
from gae_libs.testcase import TestCase
from hand... | 40.583333 | 80 | 0.637307 |
73fdbdb3f342779e8a77df41f2a9713a01363db2 | 461 | py | Python | modeling/losses/__init__.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | 46 | 2018-05-29T08:01:10.000Z | 2022-02-14T21:47:40.000Z | modeling/losses/__init__.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | null | null | null | modeling/losses/__init__.py | WenmuZhou/crnn.pytorch | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | [
"Apache-2.0"
] | 17 | 2018-11-14T09:17:00.000Z | 2021-08-06T04:05:07.000Z | # -*- coding: utf-8 -*-
# @Time : 2020/6/17 11:17
# @Author : zhoujun
import copy
from .CTCLoss import CTCLoss
from .AttnLoss import AttnLoss
__all__ = ['build_loss']
support_loss = ['CTCLoss', 'AttnLoss']
def build_loss(config):
copy_config = copy.deepcopy(config)
loss_type = copy_config.pop('type')
... | 25.611111 | 75 | 0.700651 |
73fdc17de9bd3fa68df67ef762fd2326b883f4c2 | 31,855 | py | Python | storm_control/hal4000/hal4000.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | 1 | 2021-03-17T20:25:59.000Z | 2021-03-17T20:25:59.000Z | storm_control/hal4000/hal4000.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | null | null | null | storm_control/hal4000/hal4000.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | 1 | 2021-03-17T21:24:35.000Z | 2021-03-17T21:24:35.000Z | #!/usr/bin/env python
"""
Heuristically programmed ALgorithmic STORM setup control.
This module handles setup, clean up and message passing
between the various sub-modules that define the
behavior. Each of these modules must be a sub-class of
the HalModule class in halLib.halModule. Setup specific
configura... | 40.119647 | 114 | 0.562612 |
73fdc5429d65b6b13fc1ef6008661485d1de3485 | 13,454 | py | Python | src/taxi_in/pipelines/test/nodes.py | nasa/ML-airport-taxi-in | 49d9cb3b4f94320102146a2c12ff1c029cb98879 | [
"NASA-1.3"
] | 1 | 2021-10-11T06:08:59.000Z | 2021-10-11T06:08:59.000Z | src/taxi_in/pipelines/test/nodes.py | nasa/ML-airport-taxi-in | 49d9cb3b4f94320102146a2c12ff1c029cb98879 | [
"NASA-1.3"
] | null | null | null | src/taxi_in/pipelines/test/nodes.py | nasa/ML-airport-taxi-in | 49d9cb3b4f94320102146a2c12ff1c029cb98879 | [
"NASA-1.3"
] | null | null | null | """Testing nodes for unimpeded model development
"""
from typing import Any, Dict, Tuple
import logging
import pandas as pd
import numpy as np
import mlflow
from sklearn.pipeline import Pipeline as sklearn_Pipeline
import random
from copy import deepcopy
from math import isclose
def test_valid_prediction(
mod... | 31.361305 | 122 | 0.615505 |
73fdf4df25f4e96d155b7fe1fd5ea78c4b59ddfc | 14,689 | py | Python | lib/spack/spack/patch.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | lib/spack/spack/patch.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | lib/spack/spack/patch.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2017-01-21T17:19:32.000Z | 2017-01-21T17:19:32.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import hashlib
import os
import os.path
import inspect
import llnl.util.filesystem
import llnl.util.lang
import spack.er... | 34.400468 | 79 | 0.604398 |
73fe153ab1893b363aa19a37f7f3503eb79fb677 | 6,250 | py | Python | tests/platform_tests/mellanox/test_thermal_control.py | vincent201881/sonic-mgmt | 4f02bb5f91600ae5180ace1620a718caf02c63a1 | [
"Apache-2.0"
] | null | null | null | tests/platform_tests/mellanox/test_thermal_control.py | vincent201881/sonic-mgmt | 4f02bb5f91600ae5180ace1620a718caf02c63a1 | [
"Apache-2.0"
] | null | null | null | tests/platform_tests/mellanox/test_thermal_control.py | vincent201881/sonic-mgmt | 4f02bb5f91600ae5180ace1620a718caf02c63a1 | [
"Apache-2.0"
] | null | null | null | import logging
import operator
import pytest
import random
import time
from tests.common.mellanox_data import SWITCH_MODELS
from tests.common.plugins.loganalyzer.loganalyzer import LogAnalyzer
from tests.common.utilities import wait_until
from tests.platform_tests.thermal_control_test_helper import *
from mellanox_ther... | 44.014085 | 144 | 0.7424 |
73fe2d2674710ab418460d116b17185aaf620590 | 15,475 | py | Python | RBC1r/ode_analyzer.py | yuhj1998/OnsagerNet | 32cbb31116cf4244b340497d739a86eb7de9e7a2 | [
"Apache-2.0"
] | 2 | 2021-11-01T07:23:52.000Z | 2022-03-29T03:02:33.000Z | RBC1r/ode_analyzer.py | yuhj1998/OnsagerNet | 32cbb31116cf4244b340497d739a86eb7de9e7a2 | [
"Apache-2.0"
] | null | null | null | RBC1r/ode_analyzer.py | yuhj1998/OnsagerNet | 32cbb31116cf4244b340497d739a86eb7de9e7a2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : ode_analyzer.py
@Time : 2020/07/21
@Author : Haijn Yu <hyu@lsec.cc.ac.cn>
@Desc : Analyze the learned OnsagerNet for Lorenz system
see more descriptions and update on [GitHub](https://github.com/yuhj1998/ode-analyzer)
'''
# %% 1. import libra... | 35.493119 | 96 | 0.524717 |
73fe597755d49c91373e9c4e7a38ac985f6afa8d | 882 | py | Python | Keras_tensorflow_nightly/source2.7/tensorflow/tools/api/generator/api/keras/optimizers/__init__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 3 | 2019-04-01T11:03:04.000Z | 2019-12-31T02:17:15.000Z | Keras_tensorflow_nightly/source2.7/tensorflow/tools/api/generator/api/keras/optimizers/__init__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2021-04-15T18:46:45.000Z | 2021-04-15T18:46:45.000Z | Keras_tensorflow_nightly/source2.7/tensorflow/tools/api/generator/api/keras/optimizers/__init__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2021-09-23T13:43:07.000Z | 2021-09-23T13:43:07.000Z | """Imports for Python API.
This file is MACHINE GENERATED! Do not edit.
Generated by: tensorflow/tools/api/generator/create_python_api.py script.
"""
from tensorflow.python.keras._impl.keras.optimizers import Adadelta
from tensorflow.python.keras._impl.keras.optimizers import Adagrad
from tensorflow.python.keras._impl... | 55.125 | 73 | 0.85034 |
73fe7d1f5be0763c0fd49d1597710bb4f2de7190 | 45,216 | py | Python | vyper/functions/functions.py | daejunpark/viper | a9281385661e95610ec0b1e163fc60ebba4d7f01 | [
"MIT"
] | 1 | 2021-04-23T21:48:20.000Z | 2021-04-23T21:48:20.000Z | vyper/functions/functions.py | iamonuwa/vyper | 4908ae7a671301dd487f9a087e2e7c8e1813879b | [
"MIT"
] | null | null | null | vyper/functions/functions.py | iamonuwa/vyper | 4908ae7a671301dd487f9a087e2e7c8e1813879b | [
"MIT"
] | null | null | null | import hashlib
from vyper import ast
from vyper.exceptions import (
ConstancyViolationException,
InvalidLiteralException,
ParserException,
StructureException,
TypeMismatchException,
)
from vyper.parser.expr import (
Expr,
)
from vyper.parser.keccak256_helper import (
keccak256_helper,
)
fro... | 34.228615 | 133 | 0.526119 |
73fe90c3c23419107aaa718f3bfa707a154534b7 | 2,560 | py | Python | core/kagura.py | AliasPedroKarim/Kagura | 892ee3daab31f0e55e7c810413617e89d5ce1317 | [
"MIT"
] | null | null | null | core/kagura.py | AliasPedroKarim/Kagura | 892ee3daab31f0e55e7c810413617e89d5ce1317 | [
"MIT"
] | null | null | null | core/kagura.py | AliasPedroKarim/Kagura | 892ee3daab31f0e55e7c810413617e89d5ce1317 | [
"MIT"
] | null | null | null | # -*- encoding:utf-8 -*-
import datetime
import json
import logging
import os
import sys
from jishaku.modules import resolve_extensions
from discord.ext import commands
from utils import colored_logger
class Kagura(commands.Bot):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
... | 30.117647 | 108 | 0.605469 |
73ff36a4eb04cedbd20147d8964ba22cddf0ba46 | 1,828 | py | Python | alipay/aop/api/domain/AlipayCommerceDataScenicMappingQueryModel.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/AlipayCommerceDataScenicMappingQueryModel.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/AlipayCommerceDataScenicMappingQueryModel.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 *
from alipay.aop.api.domain.ScenicAuditQueryReq import ScenicAuditQueryReq
class AlipayCommerceDataScenicMappingQueryModel(object):
def __init__(self):
self._scenic_audit_query_req = None
@... | 34.490566 | 96 | 0.649891 |
73ff40a23deeb72ebb64eaa6c46d80c88e486e84 | 2,377 | py | Python | mnsim_noc/utils/registry.py | godfather991/MNSIM_NoC | 402680ad72c46c2a0b040b5fa52232807d554aec | [
"MIT"
] | null | null | null | mnsim_noc/utils/registry.py | godfather991/MNSIM_NoC | 402680ad72c46c2a0b040b5fa52232807d554aec | [
"MIT"
] | 3 | 2021-11-01T15:43:20.000Z | 2021-11-09T03:49:06.000Z | mnsim_noc/utils/registry.py | ILTShade/MNSIM_NoC | 8fa4580cce0ef113b473dd22662748846ec6b45a | [
"MIT"
] | null | null | null | #-*-coding:utf-8-*-
"""
@FileName:
registry.py
@Description:
RegistryMeta
@CreateTime:
2021/10/08 17:32
"""
import abc
import collections
from mnsim_noc.utils.log import getLogger
__all__ = ["RegistryMeta", "RegistryError"]
class RegistryError(Exception):
pass
LOGGER = getLogger("registry")
class Re... | 30.474359 | 120 | 0.55448 |
73ff4925493c215d1a5dc931d0de449af8f21795 | 2,744 | py | Python | leetcode_python/Hash_table/friends-of-appropriate-ages.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Hash_table/friends-of-appropriate-ages.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Hash_table/friends-of-appropriate-ages.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
import collections
class Solution:
"""
@param ages:
@return: nothing
"""
def numFriendRequests(self, ages):
def request(a, b):
return not (b <= 0.5 * a + 7 or b > a or b > 100 and a < 100)
c = collections.Counter(ages)
return sum(request(a, b) * c[a] * (c[b... | 29.505376 | 90 | 0.519679 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.