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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38ebaa096021d9f9b8cf11dc3086737d2c1bba79 | 2,352 | py | Python | ucscsdk/mometa/adaptor/AdaptorEthWorkQueueProfile.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 9 | 2016-12-22T08:39:25.000Z | 2019-09-10T15:36:19.000Z | ucscsdk/mometa/adaptor/AdaptorEthWorkQueueProfile.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 10 | 2017-01-31T06:59:56.000Z | 2021-11-09T09:14:37.000Z | ucscsdk/mometa/adaptor/AdaptorEthWorkQueueProfile.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 13 | 2016-11-14T07:42:58.000Z | 2022-02-10T17:32:05.000Z | """This module contains the general information for AdaptorEthWorkQueueProfile ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class AdaptorEthWorkQueueProfileConsts():
pass
class AdaptorEthWorkQueueProfil... | 50.042553 | 306 | 0.671344 |
38ebb662eeabed1cc49250594e66a4a7121c2673 | 4,147 | py | Python | UI.py | KolbeHuang/OCR-baidu-with-UI | c8cd7fd5849fed5c7667d01d4806d950d237ccc0 | [
"MIT"
] | 1 | 2021-11-19T05:21:23.000Z | 2021-11-19T05:21:23.000Z | UI.py | KolbeHuang/OCR-baidu-with-UI | c8cd7fd5849fed5c7667d01d4806d950d237ccc0 | [
"MIT"
] | null | null | null | UI.py | KolbeHuang/OCR-baidu-with-UI | c8cd7fd5849fed5c7667d01d4806d950d237ccc0 | [
"MIT"
] | null | null | null | import tkinter as tk
import tkinter.filedialog
import OCR_baidu
mode = "general" # default mode is basic general mode
image_path = "" # global variable to store the image path
result = "" # global variable to store the recognition result
def get_path():
"""
This function will obtai... | 30.270073 | 125 | 0.635399 |
38ebe4de9fa658d47e496b59fa374d8aecc45097 | 5,414 | py | Python | tacotron2/learner.py | DashaSerdyuk/tacotron2 | 1a88669670750f8b0e1aff76abc8b1b15300e1dc | [
"BSD-3-Clause"
] | 1 | 2020-03-03T23:04:05.000Z | 2020-03-03T23:04:05.000Z | tacotron2/learner.py | DashaSerdyuk/tacotron2 | 1a88669670750f8b0e1aff76abc8b1b15300e1dc | [
"BSD-3-Clause"
] | null | null | null | tacotron2/learner.py | DashaSerdyuk/tacotron2 | 1a88669670750f8b0e1aff76abc8b1b15300e1dc | [
"BSD-3-Clause"
] | 1 | 2020-03-26T19:37:46.000Z | 2020-03-26T19:37:46.000Z | from typing import List, Tuple, Optional
import numpy as np
import torch
from torch.optim.optimizer import Optimizer
from torch.utils.data.dataloader import DataLoader
from tqdm import tqdm
from tacotron2 import utils
from tacotron2.callbacks._callback import Callback
from tacotron2.models import Tacotron2
class Le... | 35.618421 | 118 | 0.585888 |
38ebea9506bd49c585f670417ea39b16622c7cae | 107 | py | Python | setup.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 5 | 2021-07-14T12:42:32.000Z | 2022-03-02T18:14:48.000Z | setup.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 40 | 2020-01-29T14:44:13.000Z | 2022-02-11T16:14:53.000Z | setup.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 1 | 2021-03-27T20:26:39.000Z | 2021-03-27T20:26:39.000Z | from setuptools import setup, find_packages
setup(name="spineq", version="1.0", packages=find_packages())
| 26.75 | 61 | 0.775701 |
38ebfe66153bba24c7367282152bc8dd1e57bc09 | 1,715 | py | Python | publication_backbone/admin/widgets.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | 6 | 2016-05-19T14:59:51.000Z | 2020-03-19T10:08:29.000Z | publication_backbone/admin/widgets.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | publication_backbone/admin/widgets.py | Excentrics/publication-backbone | 65c9820308b09a6ae1086c265f8d49e36f3724b9 | [
"BSD-3-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
from django import forms
from django.template.loader import render_to_string
from publication_backbone.models import (
Rubric,
)
from publication_backbone.models_bases.rubricator import RubricInfo
class RubricTreeWidget(forms.SelectMultiple):
def __init__(self, attrs=None):
supe... | 38.977273 | 122 | 0.51312 |
38ec0ad2ad1321d6d95fd349c162dcc3c699c99c | 594 | py | Python | core/pipeline.py | ngiambla/nnflex | 7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa | [
"MIT"
] | null | null | null | core/pipeline.py | ngiambla/nnflex | 7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa | [
"MIT"
] | null | null | null | core/pipeline.py | ngiambla/nnflex | 7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa | [
"MIT"
] | null | null | null | ''' pipeline.py
'''
class Stage(object):
''' Stage:
A Stage in a pipeline.
Exposes the necessary state that can be shared when passing
information from stage to stage.
Args:
message: a Message object.
Returns:
a Stage object.
'''
def __init__(self):
self._me... | 19.8 | 99 | 0.62963 |
38ec18c4c2b075c52196b5a0cdacd094567a2474 | 23,277 | py | Python | scapy/scapy/layers/l2.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | scapy/scapy/layers/l2.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | scapy/scapy/layers/l2.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more informations
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
"""
Classes and functions for layer 2 protocols.
"""
from __future__ import absolute_import
from __future__ import print_fun... | 33.15812 | 134 | 0.561584 |
38ec52b300a00530edf0be36e0daf525aa44d4e4 | 7,125 | py | Python | data/level/level1094.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level1094.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level1094.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 1094,
'move_count': 29,
'board_info': {
(0, 1): {
'prev': (0, -1),
'next': (0, 1),
'bg_number': 41,
'base': (2, 1)
},
(7, 1): {
'prev': (0, -1),
'next': (0, 1),
'bg_number': 41... | 22.619048 | 34 | 0.198035 |
38ec55648c3aa0ff7ccc964c887461a94c96ade0 | 6,270 | py | Python | script/gen_term_table.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 1 | 2021-06-07T13:20:04.000Z | 2021-06-07T13:20:04.000Z | script/gen_term_table.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | script/gen_term_table.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Generate the table of all terms for the sphinx documentation.
"""
from __future__ import absolute_import
import os
import sys
from argparse import ArgumentParser
import pyparsing as pp
import numpy as nm
import six
sys.path.append('.')
import sfepy.discrete.fem # Hack: fix circular dependenc... | 27.5 | 79 | 0.554864 |
38ec8c56444b66b40bc0a4a9ea10d2afbbf2fe26 | 44,584 | py | Python | sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_events_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_events_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_live_events_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 may ... | 45.493878 | 295 | 0.666607 |
38eca1d5bc836cf2d630a4a85f1cce572bcafed4 | 4,968 | py | Python | metalibm_core/utility/log_report.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | 2 | 2019-02-18T13:42:04.000Z | 2021-03-12T18:54:53.000Z | metalibm_core/utility/log_report.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | metalibm_core/utility/log_report.py | nibrunie/metalibm | 776b044f5f323ef907a8724d9ce9a27a482f6cc5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of metalibm (https://github.com/kalray/metalibm)
###############################################################################
# MIT License
#
# Copyright (c) 2018 Kalray
#
# Permission is here... | 35.485714 | 84 | 0.611312 |
38ecaccc03a489e4bc082b9b3e21e8ade8a62881 | 19,413 | py | Python | artemis/general/should_be_builtins.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | artemis/general/should_be_builtins.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | artemis/general/should_be_builtins.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-10-16T21:21:59.000Z | 2022-03-07T22:18:44.000Z | import inspect
from collections import OrderedDict
import itertools
import os
import re
import math
from six.moves import xrange, zip_longest
__author__ = 'peter'
all_equal_deprecated = lambda *args: all(a == args[0] for a in args[1:])
def all_equal(elements):
"""
:param elements: A collection of things
... | 35.360656 | 180 | 0.665533 |
38ecc5814bf10e0695ae42d371dd433d97a593f6 | 2,112 | py | Python | tests/test_blog/test_post_navigation.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 4 | 2018-08-17T08:06:06.000Z | 2020-02-20T15:15:56.000Z | tests/test_blog/test_post_navigation.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 2 | 2018-10-08T15:59:58.000Z | 2018-10-20T16:50:13.000Z | tests/test_blog/test_post_navigation.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 1 | 2019-09-14T23:15:10.000Z | 2019-09-14T23:15:10.000Z | """Test navigation between blog posts."""
from datetime import timedelta
from django.utils import timezone
from rest_framework.test import APITestCase
from tests.decorators import authenticated
from blog.factories import PostFactory
from blog.models import Post
class PostNavigationTestMixin:
"""Mixin for testi... | 32 | 75 | 0.721591 |
38ecf34a1cee14925c56b4f036e1c10b1ac2c261 | 1,784 | py | Python | mvl/post.py | andrewjunyoung/3vl | 3b21da975eb6d63d300cfd7ff5e17e79c5d9afd5 | [
"Unlicense"
] | 3 | 2020-02-09T21:56:24.000Z | 2021-11-17T10:41:07.000Z | mvl/post.py | andrewjunyoung/3vl | 3b21da975eb6d63d300cfd7ff5e17e79c5d9afd5 | [
"Unlicense"
] | null | null | null | mvl/post.py | andrewjunyoung/3vl | 3b21da975eb6d63d300cfd7ff5e17e79c5d9afd5 | [
"Unlicense"
] | 1 | 2021-11-27T14:36:40.000Z | 2021-11-27T14:36:40.000Z | """
.. module: post
:synopsis: The operators and objects used in post logics.
.. moduleauthor: Andrew J. Young
"""
# Imports from the local package.
from mvl.lukasiewicz import (
LogicValue,
LogicSystem,
LukasiewiczLogicValue,
PriestLogicValue,
)
from mvl.goedel import and_, or_
class PostLukasie... | 25.126761 | 80 | 0.641256 |
38ecfae36ba057b03db635982b5f506dc69ad60c | 13,234 | py | Python | agents/mutalisk_agent.py | dbelliss/Starcraft2AI | a3044f0eb3c1bb18084fa59265a430ddcdfab80b | [
"MIT"
] | 2 | 2018-04-17T00:37:40.000Z | 2018-04-30T03:04:20.000Z | agents/mutalisk_agent.py | dbelliss/Starcraft2AI | a3044f0eb3c1bb18084fa59265a430ddcdfab80b | [
"MIT"
] | null | null | null | agents/mutalisk_agent.py | dbelliss/Starcraft2AI | a3044f0eb3c1bb18084fa59265a430ddcdfab80b | [
"MIT"
] | null | null | null | from loser_agent import *
class MutaliskAgent(LoserAgent):
def __init__(self, is_logging = False, is_printing_to_console = False, isMainAgent = False, fileName = ""):
super().__init__()
self.num_drones_built = 0
self.num_overlords_built = 0
self.num_zerglings_built = 0
self... | 51.898039 | 149 | 0.611304 |
38ed3121a8a35bd888e5413782aaae8d65de6c98 | 21,684 | py | Python | lib/models/pose_higher_hrnet_o.py | luohuan2uestc/pose-multi | 48d8131aa1736c7d1fb3d4a760e47c6b592dc0bc | [
"MIT"
] | 2 | 2020-05-17T15:38:49.000Z | 2020-07-08T07:35:22.000Z | lib/models/pose_higher_hrnet_o.py | luohuan2uestc/pose-multi | 48d8131aa1736c7d1fb3d4a760e47c6b592dc0bc | [
"MIT"
] | 1 | 2020-07-08T01:47:44.000Z | 2020-07-08T01:47:44.000Z | lib/models/pose_higher_hrnet_o.py | luohuan2uestc/pose-multi | 48d8131aa1736c7d1fb3d4a760e47c6b592dc0bc | [
"MIT"
] | 1 | 2021-08-25T06:47:23.000Z | 2021-08-25T06:47:23.000Z | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Bin Xiao (leoxiaobin@gmail.com)
# Modified by Bowen Cheng (bcheng9@illinois.edu)
# ------------------------------------------------------------------------------
fro... | 37.515571 | 93 | 0.558061 |
38ed37042a5b6337933029e8c50188ed0b5dd533 | 587 | py | Python | office365/onedrive/siteCollectionType.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/onedrive/siteCollectionType.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/onedrive/siteCollectionType.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.runtime.client_value import ClientValue
class SiteCollectionType(ClientValue):
"""The siteCollection resource provides more information about a site collection. """
def __init__(self):
super(SiteCollectionType, self).__init__()
self._hostname = None
self._root = None
... | 27.952381 | 89 | 0.67632 |
38ed38a8a4d17a08dbdf7e99e90ecff9127d19b5 | 1,359 | py | Python | tests/regressiontests/admin_views/customadmin.py | jezdez-archive/django-old | 9e28c4f4e90f8dfcfbb55bb13be437afb4f870e9 | [
"BSD-3-Clause"
] | 1 | 2017-07-08T06:24:07.000Z | 2017-07-08T06:24:07.000Z | tests/regressiontests/admin_views/customadmin.py | cheshire/django | d9c4eacbd95f6a02e67f669f294da2dc8967a630 | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/admin_views/customadmin.py | cheshire/django | d9c4eacbd95f6a02e67f669f294da2dc8967a630 | [
"BSD-3-Clause"
] | 1 | 2020-07-15T05:01:00.000Z | 2020-07-15T05:01:00.000Z | """
A second, custom AdminSite -- see tests.CustomAdminSiteTests.
"""
from __future__ import absolute_import
from django.conf.urls import patterns
from django.contrib import admin
from django.http import HttpResponse
from . import models, forms, admin as base_admin
class Admin2(admin.AdminSite):
login_form = fo... | 33.975 | 76 | 0.74908 |
38ed39f240fc78f2db43fd3b688f9ddf047e38ab | 846 | py | Python | trac/notification/tests/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/notification/tests/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/notification/tests/__init__.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software cons... | 28.2 | 67 | 0.734043 |
38ed42b0353aae4d4136a44e95114b781e271466 | 3,986 | py | Python | alipay/aop/api/request/AlipayInsSceneMobileScreenApplyRequest.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/request/AlipayInsSceneMobileScreenApplyRequest.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/request/AlipayInsSceneMobileScreenApplyRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayInsSceneMobileScreenApplyModel import AlipayInsSceneMobileScreenApplyModel
class AlipayInsSceneMobileScreenApplyRequest(object... | 27.489655 | 148 | 0.64576 |
38ed431b6622e92520dadc64e7eadd5fdef6d1c6 | 142 | py | Python | lewis_emulators/dh2000/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 2 | 2020-10-20T16:49:13.000Z | 2021-02-19T10:41:44.000Z | lewis_emulators/dh2000/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 9 | 2019-03-22T15:35:15.000Z | 2021-07-28T11:05:43.000Z | lewis_emulators/dh2000/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 1 | 2020-10-21T17:02:44.000Z | 2020-10-21T17:02:44.000Z | from .device import SimulatedDh2000
from ..lewis_versions import LEWIS_LATEST
framework_version = LEWIS_LATEST
__all__ = ['SimulatedDh2000']
| 23.666667 | 41 | 0.830986 |
38ed516733f906d4d321b7d85092f91d5f3ab66b | 615 | py | Python | 23-Machine-Learning-for-TimeSeries-Data-in-Python/02-Time Series as Inputs to a Model/7.Spectrograms of heartbeat audio.py | AndreasFerox/DataCamp | 41525d7252f574111f4929158da1498ee1e73a84 | [
"MIT"
] | 1 | 2021-01-31T20:51:10.000Z | 2021-01-31T20:51:10.000Z | 23-Machine-Learning-for-TimeSeries-Data-in-Python/02-Time Series as Inputs to a Model/7.Spectrograms of heartbeat audio.py | AndreasFerox/DataCamp | 41525d7252f574111f4929158da1498ee1e73a84 | [
"MIT"
] | null | null | null | 23-Machine-Learning-for-TimeSeries-Data-in-Python/02-Time Series as Inputs to a Model/7.Spectrograms of heartbeat audio.py | AndreasFerox/DataCamp | 41525d7252f574111f4929158da1498ee1e73a84 | [
"MIT"
] | null | null | null | ## Spectrograms of heartbeat audio
# Import the stft function
from librosa.core import stft
# Prepare the STFT
HOP_LENGTH = 2**4
spec = stft(audio, hop_length=HOP_LENGTH, n_fft=2**7)
_____________________________________________________________
from librosa.core import amplitude_to_db
from librosa.display import spe... | 29.285714 | 78 | 0.78374 |
38ed53dcf882250b55a67dacb92fd5eddaa6dd31 | 9,995 | py | Python | aws/sagemaker/KNN/customUtils/__init__.py | ravi9/csp | 42cc55bf36841514341fc45f17363f287bc70114 | [
"MIT"
] | null | null | null | aws/sagemaker/KNN/customUtils/__init__.py | ravi9/csp | 42cc55bf36841514341fc45f17363f287bc70114 | [
"MIT"
] | null | null | null | aws/sagemaker/KNN/customUtils/__init__.py | ravi9/csp | 42cc55bf36841514341fc45f17363f287bc70114 | [
"MIT"
] | 1 | 2018-11-06T06:16:35.000Z | 2018-11-06T06:16:35.000Z | import numpy as np
import warnings
from daal.data_management import (HomogenNumericTable,convertToHomogen_Float64,readOnly,BlockDescriptor_Float64, MergedNumericTable, \
FileDataSource, DataSource, DataSourceIface, InputDataArchive, OutputDataArchive, \
... | 39.98 | 136 | 0.633817 |
38ed58a17538047e3438c14d24fe5f3011626814 | 12,266 | py | Python | simulation.py | labay11/ideal-gas-simulation | f1b36c345b96718b5f470516bc1282f2df28e221 | [
"Apache-2.0"
] | 5 | 2020-09-23T02:53:24.000Z | 2022-03-16T20:12:57.000Z | simulation.py | labay11/ideal-gas-simulation | f1b36c345b96718b5f470516bc1282f2df28e221 | [
"Apache-2.0"
] | null | null | null | simulation.py | labay11/ideal-gas-simulation | f1b36c345b96718b5f470516bc1282f2df28e221 | [
"Apache-2.0"
] | 8 | 2019-06-04T08:56:32.000Z | 2022-02-17T03:06:37.000Z | """
=================
Ideal gas simulation
=================
Ideal gas simulation in a 3D system at temperature T and volume L^3,
where L is the length of the walls.
The particles that form the system only interact with the wall and
between each other with elastic collisions, no other type of
interaction is concieve... | 34.167131 | 109 | 0.561878 |
38edd0e56198c9281e1f7f3b66009234bf36123a | 1,113 | py | Python | atlas/cric/client.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | null | null | null | atlas/cric/client.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 15 | 2015-01-06T13:41:52.000Z | 2022-03-30T10:37:25.000Z | atlas/cric/client.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 1 | 2017-07-20T08:01:24.000Z | 2017-07-20T08:01:24.000Z | import json
import logging
import os
import requests
from ..settings import cricclient as cric_settings
_logger = logging.getLogger('prodtaskwebui')
class CRICClient(object):
def __init__(self, base_url=cric_settings.CRIC_BASE_URL, cert=cric_settings.CERTIFICAT ):
"""Initializes new instance of CRICCl... | 27.146341 | 93 | 0.681941 |
38ee072b331dedc062aaef3f1084db2fdd27f7e8 | 7,266 | py | Python | apischema/conversions/converters.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | null | null | null | apischema/conversions/converters.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | null | null | null | apischema/conversions/converters.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | null | null | null | import sys
from collections import defaultdict
from dataclasses import replace
from enum import Enum
from functools import partial
from types import new_class
from typing import (
Callable,
List,
MutableMapping,
Optional,
TYPE_CHECKING,
Type,
TypeVar,
Union,
overload,
)
from apische... | 29.298387 | 86 | 0.68621 |
38ee078240108f41ffa6666c5d1683a845ff6139 | 8,943 | py | Python | dependency_plan.py | donofden/execute-workflow-with-networkx | 1b2acbda3714b6a8aefaaebeb0771faf52885e20 | [
"MIT"
] | null | null | null | dependency_plan.py | donofden/execute-workflow-with-networkx | 1b2acbda3714b6a8aefaaebeb0771faf52885e20 | [
"MIT"
] | null | null | null | dependency_plan.py | donofden/execute-workflow-with-networkx | 1b2acbda3714b6a8aefaaebeb0771faf52885e20 | [
"MIT"
] | null | null | null | import networkx as nx
import matplotlib.pyplot as plt
class DependencyPlan:
"""
Class to generate dependency plan for given edge list
Edge List:
edge_list = [
("Report 1", "Report 5"),
("Report 1", "Report 3"),
("Report 8", "Report 10"),
("Report 5", "Report 8"),
]
... | 32.52 | 97 | 0.598345 |
38ee0fe35a0bbe4289dd68033ab0614fa24c92e9 | 7,485 | py | Python | opencadd/structure/superposition/sequences.py | pipaj97/opencadd | 4fcf090bd612a22df9d617473ae458316a4cb4b6 | [
"MIT"
] | 39 | 2020-08-14T07:33:21.000Z | 2022-03-30T02:05:19.000Z | opencadd/structure/superposition/sequences.py | Allend95/opencadd | 1fde238e3cf8e5e47e8266a504d9df0196505e97 | [
"MIT"
] | 94 | 2020-06-29T12:47:46.000Z | 2022-02-13T19:16:25.000Z | opencadd/structure/superposition/sequences.py | Allend95/opencadd | 1fde238e3cf8e5e47e8266a504d9df0196505e97 | [
"MIT"
] | 11 | 2020-11-11T17:12:38.000Z | 2022-03-21T09:23:39.000Z | """
Utilities for sequence alignment
"""
import logging
import numpy as np
import biotite.sequence.align as seq_align
import biotite.sequence as seq
import Bio
logger = logging.getLogger(__name__)
def matrices(name):
"""
A SubstitutionMatrix maps each possible pairing of a symbol of a first alphabet with
... | 35.642857 | 117 | 0.657448 |
38ee461031381997fefdecb23c70c23a5a705ae3 | 4,269 | py | Python | bakman/marker.py | spacelis/bakman | f8fa53f81188831902d404d8229e196bfa687332 | [
"MIT"
] | null | null | null | bakman/marker.py | spacelis/bakman | f8fa53f81188831902d404d8229e196bfa687332 | [
"MIT"
] | null | null | null | bakman/marker.py | spacelis/bakman | f8fa53f81188831902d404d8229e196bfa687332 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
"""
File: marker.py
Author: Wen Li
Email: spacelis@gmail.com
Github: http://github.com/spacelis
Description:
"""
# pylint: disable-msg=too-few-public-methods
import logging
from datetime import datetime
from dateparser import parse as dtparse
from bakman.grouper import MetaGrouper
logger = log... | 24.118644 | 91 | 0.585617 |
38ee4d66cecc628f8ffc5bbb78e898862c2bca52 | 572 | py | Python | src/callosum/exceptions.py | bohblue2/callosum | adb8f6aa2d44cd3c4448f6899027a2964eca380a | [
"MIT"
] | 19 | 2018-08-17T15:58:43.000Z | 2022-03-31T07:12:43.000Z | src/callosum/exceptions.py | bohblue2/callosum | adb8f6aa2d44cd3c4448f6899027a2964eca380a | [
"MIT"
] | 9 | 2018-11-15T15:44:11.000Z | 2019-12-06T15:32:57.000Z | src/callosum/exceptions.py | bohblue2/callosum | adb8f6aa2d44cd3c4448f6899027a2964eca380a | [
"MIT"
] | 2 | 2018-05-16T06:02:39.000Z | 2020-07-24T06:30:58.000Z | class CallosumError(Exception):
pass
class ConfigurationError(CallosumError):
pass
class InvalidAddressError(CallosumError, ValueError):
def __init__(self, invalid_param: str = None):
if invalid_param:
self.message =\
f'''
{invalid_param} either must ... | 19.724138 | 60 | 0.589161 |
38ee549ba79e05de41f38ebaeaf1a93b96db9786 | 3,064 | py | Python | automol/inchi/base/_reac.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/inchi/base/_reac.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/inchi/base/_reac.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | 7 | 2019-12-18T20:11:06.000Z | 2020-10-14T08:54:16.000Z | """ functions operating on reaction InChI tuples
"""
from automol.inchi.base._core import sorted_
from automol.inchi.base._core import standard_form
from automol.inchi.base._core import is_enantiomer
from automol.inchi.base._core import reflect
def filter_enantiomer_reactions(rxn_ichs_lst, spc_prio_lst=None):
"""... | 37.365854 | 79 | 0.664491 |
38ee56e43b8601be126babb2972b416f5efa2e1e | 1,235 | py | Python | onadata/apps/main/forms.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/apps/main/forms.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/apps/main/forms.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
from django import forms
from django.forms import ModelForm
from django.utils.translation import ugettext_lazy
from onadata.apps.main.models import UserProfile
from onadata.libs.utils.logger_tools import publish_xls_form
class UserProfileForm(ModelForm):
class Meta:
model = UserProfile
... | 31.666667 | 74 | 0.663158 |
38ee5de2e8b956677106df5ba66c990449e96a75 | 1,426 | py | Python | mowl/projection/edge.py | bio-ontology-research-group/OntoML | 4cdc17dc7ee26464db96c67838c3e77dba5318f9 | [
"BSD-3-Clause"
] | null | null | null | mowl/projection/edge.py | bio-ontology-research-group/OntoML | 4cdc17dc7ee26464db96c67838c3e77dba5318f9 | [
"BSD-3-Clause"
] | null | null | null | mowl/projection/edge.py | bio-ontology-research-group/OntoML | 4cdc17dc7ee26464db96c67838c3e77dba5318f9 | [
"BSD-3-Clause"
] | null | null | null |
class Edge:
def __init__(self, src, rel, dst, weight = 1):
self._src = src
self._rel = rel
self._dst = "" if dst == "" else dst
self._weight = weight
def src(self):
"""Getter method for _src attribute
:rtype: str
"""
return self._src
... | 21.938462 | 111 | 0.518233 |
38ee5ebcd8da56fa7408154c4806aee79043c452 | 697 | py | Python | atlas/request_pattern/urls.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | null | null | null | atlas/request_pattern/urls.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 15 | 2015-01-06T13:41:52.000Z | 2022-03-30T10:37:25.000Z | atlas/request_pattern/urls.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 1 | 2017-07-20T08:01:24.000Z | 2017-07-20T08:01:24.000Z | from django.conf.urls import url
from atlas.request_pattern.views import *
app_name='request_pattern'
urlpatterns = [
url(r'^pattern_list/$', pattern_list, name='pattern_list'),
url(r'^clone_pattern/$', clone_pattern, name='clone_pattern'),
url(r'^slice_pattern_steps/(?P<slice>\d+)/$', slice_pattern_st... | 38.722222 | 114 | 0.723099 |
38ee7b042bf3943c00745ccfee271f869a3d0826 | 2,603 | py | Python | unitreport/decorators.py | annahadji/unitreport | d2d7e5e7ab641d0245d41e1e3339518d80e40463 | [
"MIT"
] | 1 | 2020-07-05T20:07:17.000Z | 2020-07-05T20:07:17.000Z | unitreport/decorators.py | annahadji/unitreport | d2d7e5e7ab641d0245d41e1e3339518d80e40463 | [
"MIT"
] | null | null | null | unitreport/decorators.py | annahadji/unitreport | d2d7e5e7ab641d0245d41e1e3339518d80e40463 | [
"MIT"
] | null | null | null | """Decorators and global figures for unittest-based data quality and report generation tool."""
import io
import unittest
import logging
from typing import Dict, Callable, Optional, Tuple, TypeVar
import matplotlib
# render matplotlib figures to file, not to window
matplotlib.use("Agg")
import matplotlib.pyplot as pl... | 32.949367 | 95 | 0.650403 |
38eee0b9839500b215f872653acc19c869688375 | 1,084 | py | Python | tests/test_game.py | lukasturcani/snake | 8607cecda1d654b8ff3015007a8cb1a3d53ef7a8 | [
"MIT"
] | null | null | null | tests/test_game.py | lukasturcani/snake | 8607cecda1d654b8ff3015007a8cb1a3d53ef7a8 | [
"MIT"
] | null | null | null | tests/test_game.py | lukasturcani/snake | 8607cecda1d654b8ff3015007a8cb1a3d53ef7a8 | [
"MIT"
] | null | null | null | def test_take_step(snake):
assert False
def test_valid_velocity(snake):
assert False
def test_hit(snake):
assert not snake.hit(frozenset())
walls = frozenset({
})
assert snake.hit(walls)
walls = frozenset({
})
assert not snake.hit(walls)
def test_bite(snake, bit_snake):
... | 14.077922 | 47 | 0.637454 |
38eeefa06dac0f20f85bdb0b1c6450d2d2300c77 | 10,365 | py | Python | speech/ctc.py | NervanaSystems/deepspeech | e55159d56569ff16c75369141a42fd5589d83279 | [
"Apache-2.0"
] | 249 | 2016-12-07T18:29:19.000Z | 2021-07-12T05:10:05.000Z | speech/ctc.py | NervanaSystems/deepspeech | e55159d56569ff16c75369141a42fd5589d83279 | [
"Apache-2.0"
] | 60 | 2016-12-14T15:46:50.000Z | 2018-08-23T11:10:10.000Z | speech/ctc.py | NervanaSystems/deepspeech | e55159d56569ff16c75369141a42fd5589d83279 | [
"Apache-2.0"
] | 80 | 2016-12-08T20:36:48.000Z | 2021-11-25T10:31:59.000Z | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015-2016 Nervana Systems 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
#... | 40.019305 | 97 | 0.469368 |
38ef062a91d0e9189bf00e6dc6abda60971a1c07 | 2,871 | py | Python | flexget/plugins/metainfo/tmdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/metainfo/tmdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/metainfo/tmdb_lookup.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import logging
from flexget import plugin
from flexget.event import event
from flexget.utils import imdb
from flexget.utils.log import log_once
try:
# TODO: Fix this after api_tmdb has module level functions
from flexget.plugins.api_tmdb impor... | 33.383721 | 85 | 0.634274 |
38ef28d6224b33023cd6db22243b46bc10733cb4 | 8,098 | py | Python | sunpy/timeseries/sources/eve.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/timeseries/sources/eve.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/timeseries/sources/eve.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""EVE TimeSeries subclass definitions."""
from __future__ import absolute_import
import os
import codecs
import numpy
from datetime import datetime
from collections import OrderedDict
import matplotlib.pyplot as plt
from pandas.io.parsers import read_csv
from os.path import basename
from sunp... | 39.696078 | 184 | 0.567548 |
38ef2a25866db39ed9cdb5ae466a4ea89f1ab64c | 115 | py | Python | utils/__init__.py | zhizhangxian/PGC | 82403cc6a42bedc7078a586f1dae2f9dbd5f68e1 | [
"MIT"
] | null | null | null | utils/__init__.py | zhizhangxian/PGC | 82403cc6a42bedc7078a586f1dae2f9dbd5f68e1 | [
"MIT"
] | null | null | null | utils/__init__.py | zhizhangxian/PGC | 82403cc6a42bedc7078a586f1dae2f9dbd5f68e1 | [
"MIT"
] | null | null | null | from .utils import *
# from .visualizer import Visualizer
from .scheduler import PolyLR
from .loss import FocalLoss | 28.75 | 36 | 0.808696 |
38ef45400ce997cdd1129b2e398079f5175bf0d5 | 1,586 | py | Python | python/test1.py | brianinnes/pyPlotter | c580c6d33b9c80cb8ec0a3a7a289fa5a2610a8a2 | [
"Apache-2.0"
] | 11 | 2016-05-02T11:17:20.000Z | 2019-03-11T08:49:30.000Z | python/test1.py | brianinnes/pyPlotter | c580c6d33b9c80cb8ec0a3a7a289fa5a2610a8a2 | [
"Apache-2.0"
] | 23 | 2016-04-14T21:25:11.000Z | 2021-08-17T23:01:55.000Z | python/test1.py | brianinnes/pyPlotter | c580c6d33b9c80cb8ec0a3a7a289fa5a2610a8a2 | [
"Apache-2.0"
] | 9 | 2016-11-13T00:59:03.000Z | 2021-07-25T10:05:46.000Z | # Copyright 2016 Brian Innes
#
# 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, ... | 32.367347 | 74 | 0.612863 |
38ef77992c31ba0ffb8fb16942b1ff5de6fd4007 | 12,351 | py | Python | facexlib/alignment/awing_arch.py | spy14414/facexlib | 6be8bdcfe32198374c17588132a72022ad88ae3b | [
"MIT"
] | 164 | 2021-05-15T20:15:42.000Z | 2022-03-25T19:39:24.000Z | facexlib/alignment/awing_arch.py | spy14414/facexlib | 6be8bdcfe32198374c17588132a72022ad88ae3b | [
"MIT"
] | 7 | 2021-08-03T15:56:49.000Z | 2022-02-24T13:50:33.000Z | facexlib/alignment/awing_arch.py | daobook/facexlib | e5768d1722a3fddc6ccd1b91a6a17f432ed149b4 | [
"MIT"
] | 32 | 2021-05-16T03:10:24.000Z | 2022-03-19T12:02:00.000Z | import cv2
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def calculate_points(heatmaps):
# change heatmaps to landmarks
B, N, H, W = heatmaps.shape
HW = H * W
BN_range = np.arange(B * N)
heatline = heatmaps.reshape(B, N, HW)
indexes = np.argmax(heatline... | 32.674603 | 120 | 0.578091 |
38ef7f1be31fcfe895eca4257a37f44b6845fb6e | 1,676 | py | Python | zubhub_backend/zubhub/zubhub/migrations/0004_auto_20220303_0650_squashed_0005_auto_20220310_0447.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | 1 | 2022-01-21T14:15:24.000Z | 2022-01-21T14:15:24.000Z | zubhub_backend/zubhub/zubhub/migrations/0004_auto_20220303_0650_squashed_0005_auto_20220310_0447.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | zubhub_backend/zubhub/zubhub/migrations/0004_auto_20220303_0650_squashed_0005_auto_20220310_0447.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2022-03-13 06:56
import django.core.validators
from django.db import migrations, models
import zubhub.utils
class Migration(migrations.Migration):
replaces = [('zubhub', '0004_auto_20220303_0650'), ('zubhub', '0005_auto_20220310_0447')]
dependencies = [
('zubhub', '0003... | 33.52 | 263 | 0.597255 |
38efca56b40dc8b8bb9d5d015e077c8ea1eb428f | 2,381 | py | Python | mlx/json_to_mako.py | melexis/json-to-mako | 244f99e1ba11001ad74fa76a00f7c5acfcddddde | [
"Apache-2.0"
] | null | null | null | mlx/json_to_mako.py | melexis/json-to-mako | 244f99e1ba11001ad74fa76a00f7c5acfcddddde | [
"Apache-2.0"
] | null | null | null | mlx/json_to_mako.py | melexis/json-to-mako | 244f99e1ba11001ad74fa76a00f7c5acfcddddde | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
'''
Convert any json input to any output format defined by mako template
'''
from argparse import ArgumentParser
from json import loads
from mako.template import Template
import os
import re
import sys
exec(open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "__version__.py")).read(... | 28.011765 | 99 | 0.614028 |
38efca6f3e1d29cff4612881981fe2957dcdd849 | 138 | py | Python | src/spectrabuster/__init__.py | eduardosprp/spectrabuster | bb75c2bc860fd5ade7414b212e63113e6fa22eab | [
"MIT"
] | null | null | null | src/spectrabuster/__init__.py | eduardosprp/spectrabuster | bb75c2bc860fd5ade7414b212e63113e6fa22eab | [
"MIT"
] | 1 | 2020-11-14T16:04:23.000Z | 2020-11-14T16:04:23.000Z | src/spectrabuster/__init__.py | eduardosprp/spectrabuster | bb75c2bc860fd5ade7414b212e63113e6fa22eab | [
"MIT"
] | 3 | 2020-11-14T03:27:09.000Z | 2022-01-14T09:25:22.000Z | __all__ = ["Spectrum", "Saver", "SpecSaver"]
from .Spectrum import Spectrum
from .Saver import Saver, SpecSaver
from .functions import *
| 23 | 44 | 0.746377 |
38f015de8d0a2a79775ec11624fe4a0351505d74 | 806 | py | Python | test/service/test_streamers_service.py | vcwild/Live-Divulgador | c7ef6d3ea7aceb27f086ec18bb9ba4b9ff505f35 | [
"MIT"
] | null | null | null | test/service/test_streamers_service.py | vcwild/Live-Divulgador | c7ef6d3ea7aceb27f086ec18bb9ba4b9ff505f35 | [
"MIT"
] | null | null | null | test/service/test_streamers_service.py | vcwild/Live-Divulgador | c7ef6d3ea7aceb27f086ec18bb9ba4b9ff505f35 | [
"MIT"
] | null | null | null | from live_divulgator.service.streamers_service import StreamersService
from live_divulgator.database.entities.streamer import Streamer
from live_divulgator.service.streamers_service import StreamersService
from pytest import fixture, mark
@fixture(scope="module")
def created_streamer(twitch_id):
streamer = Stream... | 27.793103 | 75 | 0.80397 |
38f018a8b8461d94b23d089ed1c016e62048291b | 14,783 | py | Python | venv/lib/python3.8/site-packages/fido2/hid/macos.py | Nitrokey/nitrokey-app2 | ab66bbceb854e1f18987b0331528e86e3e7ff702 | [
"Apache-2.0"
] | 1 | 2021-11-23T12:54:35.000Z | 2021-11-23T12:54:35.000Z | venv/lib/python3.8/site-packages/fido2/hid/macos.py | Nitrokey/nitrokey-app2 | ab66bbceb854e1f18987b0331528e86e3e7ff702 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/fido2/hid/macos.py | Nitrokey/nitrokey-app2 | ab66bbceb854e1f18987b0331528e86e3e7ff702 | [
"Apache-2.0"
] | null | null | null | # Original work Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 32.067245 | 87 | 0.742745 |
38f025d97e498a9c866e618742b352bea8c2a612 | 454 | py | Python | tlsmate/version.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tlsmate/version.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tlsmate/version.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Module providing the version
"""
# import basic stuff
import sys
# import own stuff
# import other stuff
if sys.version_info >= (3, 8):
from importlib.metadata import version, PackageNotFoundError
else:
from importlib_metadata import version, PackageNotFoundError
try:
__versio... | 21.619048 | 64 | 0.73348 |
38f027fc1d67d2d57f0d6dc090fc1d4a6986679a | 909 | py | Python | main/migrations/0012_application.py | OKThess/website | 3d5a2a125bfb48179937b058aa7180b751eb2b43 | [
"MIT"
] | 5 | 2017-08-25T16:37:18.000Z | 2019-02-25T18:26:37.000Z | main/migrations/0012_application.py | OKThess/website | 3d5a2a125bfb48179937b058aa7180b751eb2b43 | [
"MIT"
] | 43 | 2017-01-22T23:58:43.000Z | 2018-05-17T21:35:16.000Z | main/migrations/0012_application.py | OKThess/website | 3d5a2a125bfb48179937b058aa7180b751eb2b43 | [
"MIT"
] | 2 | 2017-11-05T08:36:02.000Z | 2017-12-22T17:37:19.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-22 13:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0011_event_description'),
]
operations = [
migrations.CreateModel(
... | 31.344828 | 114 | 0.562156 |
38f028ea4331451d7109a2e8cb32699adcf77afe | 414 | py | Python | component/parameter/directory.py | sepal-contrib/se.plan | a534d0f15e371310b6bc483867685f8a21f790c0 | [
"MIT"
] | null | null | null | component/parameter/directory.py | sepal-contrib/se.plan | a534d0f15e371310b6bc483867685f8a21f790c0 | [
"MIT"
] | null | null | null | component/parameter/directory.py | sepal-contrib/se.plan | a534d0f15e371310b6bc483867685f8a21f790c0 | [
"MIT"
] | null | null | null | from pathlib import Path
# this directory is the root directory of all sepal dashboard app.
# please make sure that any result that you produce is embeded inside this folder
# create a folder adapted to your need inside this folder to save anything in sepal
module_dir = Path("~", "module_results").expanduser()
module_... | 37.636364 | 83 | 0.785024 |
38f0304052447822e75df11dae4eb5cece53bfd5 | 3,909 | py | Python | taskflow/examples/buildsystem.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 299 | 2015-01-11T01:36:28.000Z | 2022-03-11T08:56:27.000Z | taskflow/examples/buildsystem.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 4 | 2015-02-06T11:12:58.000Z | 2018-10-19T18:55:58.000Z | taskflow/examples/buildsystem.py | jimbobhickville/taskflow | 6ea991ce94f5be46b7e4726b4c4f014e10407786 | [
"Apache-2.0"
] | 67 | 2015-01-11T14:34:24.000Z | 2022-01-14T02:57:03.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2012-2013 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICE... | 34.901786 | 78 | 0.674853 |
38f032c0478e89781d5e6abc523a2b93d7a14c0d | 14,908 | py | Python | xos/services/hpc/migrations/0001_initial.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/services/hpc/migrations/0001_initial.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/services/hpc/migrations/0001_initial.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import core.models.plcorebase
import django.utils.timezone
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_... | 62.116667 | 193 | 0.60927 |
38f046415ba5386246eef0f3b111ec5142ffbcd9 | 3,649 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/messages/__init__.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/messages/__init__.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/messages/__init__.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # 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... | 46.782051 | 78 | 0.822143 |
38f05942c4b3bc06f7ea02f51343f86534e49079 | 1,249 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/os_disk_image.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/os_disk_image.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/os_disk_image.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 ... | 33.756757 | 87 | 0.623699 |
38f059ee3c79dacbb1b2281b399b75e110c1adee | 32,311 | py | Python | page_summarizer.py | hngi/lucidblog_hng_ml_team | 450105fc8c0562056ce08b313777fa8f9f4f2882 | [
"Apache-2.0"
] | null | null | null | page_summarizer.py | hngi/lucidblog_hng_ml_team | 450105fc8c0562056ce08b313777fa8f9f4f2882 | [
"Apache-2.0"
] | 2 | 2021-03-31T19:28:51.000Z | 2021-06-02T00:36:03.000Z | page_summarizer.py | hngi/lucidblog_hng_ml_team | 450105fc8c0562056ce08b313777fa8f9f4f2882 | [
"Apache-2.0"
] | 1 | 2019-10-30T21:44:30.000Z | 2019-10-30T21:44:30.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 18 02:07:17 2019
@author: lumi
"""
import pandas as pd
import numpy as np
from bs4 import BeautifulSoup
import tensorflow as tf
import re
from nltk.corpus import stopwords
import time
from tensorflow.python.layers.core import Dense
#from tensorflo... | 43.487214 | 124 | 0.552567 |
38f0b64ee863ee797f5b0ae1afb8f32e2eb5a4ef | 36 | py | Python | lights_control_core/constants.py | Godhart/hass-lights-control | e3b5e4c987c7c991260ba41f84944cd9c70c86f2 | [
"Apache-2.0"
] | 4 | 2020-03-14T20:22:42.000Z | 2022-03-13T19:39:36.000Z | lights_control_core/constants.py | Godhart/hass-lights-control | e3b5e4c987c7c991260ba41f84944cd9c70c86f2 | [
"Apache-2.0"
] | null | null | null | lights_control_core/constants.py | Godhart/hass-lights-control | e3b5e4c987c7c991260ba41f84944cd9c70c86f2 | [
"Apache-2.0"
] | null | null | null | STATE_ON = 'on'
STATE_OFF = 'off'
| 12 | 18 | 0.611111 |
38f0c4034f3c5bc879779e7a72effe430317f3d9 | 68 | py | Python | src/olympia/addons/signals.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/addons/signals.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/addons/signals.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | import django.dispatch
version_changed = django.dispatch.Signal()
| 13.6 | 42 | 0.808824 |
38f0d4c47409f444b40edcc0819b944b148d48c9 | 2,048 | py | Python | venv/Lib/site-packages/pyrogram/methods/utilities/stop.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/methods/utilities/stop.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/methods/utilities/stop.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # 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... | 32 | 118 | 0.625 |
38f15082fe60f7c97c2ab572533b03acb8379e70 | 1,829 | py | Python | set_cron.py | alexsilener/task-reminder | 6c2d7ef5ca90bcd88d2962396c23820660571039 | [
"MIT"
] | null | null | null | set_cron.py | alexsilener/task-reminder | 6c2d7ef5ca90bcd88d2962396c23820660571039 | [
"MIT"
] | null | null | null | set_cron.py | alexsilener/task-reminder | 6c2d7ef5ca90bcd88d2962396c23820660571039 | [
"MIT"
] | null | null | null | from crontab import CronTab
import taskr
from datetime import datetime
from loguru import logger
def set_cron_notify(cron, id, time: datetime, repeat, title, message):
remove_cron_job(cron, id)
if repeat == "d":
job = cron.new(command=f'/bin/python3 /home/corven/work/git/task-reminder/remind.py --title... | 35.173077 | 145 | 0.574631 |
38f169c66b11593f78ef9faf8b9635963d105d00 | 791 | py | Python | mtdata/__init__.py | XapaJIaMnu/mtdata | ca6615a422d5ed517292cffb11a331a59b828951 | [
"Apache-2.0"
] | null | null | null | mtdata/__init__.py | XapaJIaMnu/mtdata | ca6615a422d5ed517292cffb11a331a59b828951 | [
"Apache-2.0"
] | null | null | null | mtdata/__init__.py | XapaJIaMnu/mtdata | ca6615a422d5ed517292cffb11a331a59b828951 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Author: Thamme Gowda [tg (at) isi (dot) edu]
# Created: 4/4/20
__version__ = '0.3.2'
__description__ = 'mtdata is a tool to download datasets for machine translation'
__author__ = 'Thamme Gowda'
import logging as log
from pathlib import Path
import os
import enlighten
from ruamel.yaml impor... | 28.25 | 90 | 0.721871 |
38f195d6e58b378376f283d95793ab5448483085 | 6,265 | py | Python | RL_test_ttc_tr.py | Venator43/TTC_RL | 7a6e79347f9b75625b858d785ceb8c3bf135ac5c | [
"MIT"
] | null | null | null | RL_test_ttc_tr.py | Venator43/TTC_RL | 7a6e79347f9b75625b858d785ceb8c3bf135ac5c | [
"MIT"
] | null | null | null | RL_test_ttc_tr.py | Venator43/TTC_RL | 7a6e79347f9b75625b858d785ceb8c3bf135ac5c | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import pickle
from matplotlib import style
import time
style.use("ggplot")
SIZE = 3
HM_EPISODES = 500000
MOVE_PENALTY = 1
LOSE_PENALTY = 350
WON_REWARD = 350
DRAW_REWARD = 175
epsilon = 0
EPS_DECAY = 0.9998 # Every episode will be epsilon*EPS_DECAY
... | 30.560976 | 158 | 0.48731 |
38f1a8e4da8a3320b47b68531ecb727bd0f90578 | 4,357 | py | Python | test/chkdom_4dom.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | test/chkdom_4dom.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | test/chkdom_4dom.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | ##############################################################################
#
# Zope Public License (ZPL) Version 1.0
# -------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# This license has been certified as Open Source(tm).
#
# Redistribution and use in source and bin... | 41.103774 | 78 | 0.71563 |
38f1d815f393b666974eb64cf6899b83b08fb641 | 7,955 | py | Python | pex/vendor/_vendored/pip/pip/_internal/self_outdated_check.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1 | 2020-06-27T23:28:35.000Z | 2020-06-27T23:28:35.000Z | pex/vendor/_vendored/pip/pip/_internal/self_outdated_check.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 7 | 2019-12-27T07:56:50.000Z | 2022-01-25T03:41:39.000Z | src/pip/_internal/self_outdated_check.py | gudonglaile/pip-gui | ac9c49c54b7a882d8091959ba14eec37612a3845 | [
"MIT"
] | 1 | 2020-02-14T16:53:19.000Z | 2020-02-14T16:53:19.000Z | # The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
from __future__ import absolute_import
import datetime
import hashlib
import json
import logging
import os.path
import sys
from pip._vendor import pkg_resources
from pip._vendor.packaging import version as pack... | 32.469388 | 78 | 0.64186 |
38f1f1ec504a9296af3b2329b8b7ac0323422af4 | 865 | py | Python | src/teams/views/guide.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 7 | 2017-04-14T15:28:29.000Z | 2021-09-10T09:45:38.000Z | src/teams/views/guide.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 799 | 2016-04-28T09:31:50.000Z | 2022-03-29T09:05:02.000Z | src/teams/views/guide.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 35 | 2016-04-28T09:23:53.000Z | 2021-05-02T12:36:01.000Z | from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.views.generic import DetailView
from camps.mixins import CampViewMixin
from ..models import Team, TeamMember
class TeamGuideView(LoginRequiredMixin, CampViewMixin, UserPassesTestMixin, DetailView):
template_name = "team_g... | 28.833333 | 88 | 0.698266 |
38f1fd1d1db14419bf5c01a1b92565349272b08f | 606 | py | Python | aoc-2020/day-07/day_7.py | bsamseth/advent-of-code-2018 | bdd3969e61fac3f1543c20983260aa9fda912e99 | [
"MIT"
] | 1 | 2021-01-03T17:09:13.000Z | 2021-01-03T17:09:13.000Z | aoc-2020/day-07/day_7.py | bsamseth/advent-of-code-2018 | bdd3969e61fac3f1543c20983260aa9fda912e99 | [
"MIT"
] | 3 | 2021-06-01T23:09:26.000Z | 2022-03-12T01:08:40.000Z | aoc-2020/day-07/day_7.py | bsamseth/advent-of-code | 65d40548057a86b6fda37aec8e7d5d473d627124 | [
"MIT"
] | null | null | null | import re
with open("input.txt") as f:
rules = {
re.match(r"^\w+ \w+", line).group(0): re.findall(r"(\d+) (\w+ \w+)", line)
for line in f
}
def can_hold(target_color):
for color, contains in rules.items():
if any(sub_color == target_color for _, sub_color in contains):
... | 24.24 | 82 | 0.59571 |
38f1fed962fcc7007649e9600ce11e21446294f8 | 983 | py | Python | bin/template-expand.py | CraigKelly/datasimple | 1458149f789b7aeb0e2d7886bc9ba5fd5600d700 | [
"Apache-2.0"
] | 1 | 2018-05-29T18:12:13.000Z | 2018-05-29T18:12:13.000Z | bin/template-expand.py | CraigKelly/datasimple | 1458149f789b7aeb0e2d7886bc9ba5fd5600d700 | [
"Apache-2.0"
] | null | null | null | bin/template-expand.py | CraigKelly/datasimple | 1458149f789b7aeb0e2d7886bc9ba5fd5600d700 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""Read stdin, transform the text, and write to stdout
All text is treated as a Python string format. Variables are passed on the
command line and taken from environment variables. Command line beats
environment.
For example:
echo "{A:} {B:}" | A=Hello B=World ./template-expand.py B=You
... | 21.369565 | 74 | 0.60529 |
38f21b63a3658f29210b07f6cb86b8983ab5f9ea | 9,146 | py | Python | nova/tests/functional/integrated_helpers.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/integrated_helpers.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/integrated_helpers.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 Justin Santa Barbara
# 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 requ... | 34.383459 | 78 | 0.60059 |
38f21e848341736aad20fed409684d090478ac89 | 3,985 | py | Python | alipay/aop/api/request/AlipayOpenSearchBrandBatchqueryRequest.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/request/AlipayOpenSearchBrandBatchqueryRequest.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/request/AlipayOpenSearchBrandBatchqueryRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenSearchBrandBatchqueryModel import AlipayOpenSearchBrandBatchqueryModel
class AlipayOpenSearchBrandBatchqueryRequest(object... | 27.482759 | 148 | 0.645922 |
38f2258c9986084a94af007d3a3c6532730c876e | 385 | py | Python | examples/print_all_stars.py | zsiciarz/pygcvs | ed5522ab9cf9237592a6af7a0bc8cad079afeb67 | [
"MIT"
] | null | null | null | examples/print_all_stars.py | zsiciarz/pygcvs | ed5522ab9cf9237592a6af7a0bc8cad079afeb67 | [
"MIT"
] | null | null | null | examples/print_all_stars.py | zsiciarz/pygcvs | ed5522ab9cf9237592a6af7a0bc8cad079afeb67 | [
"MIT"
] | null | null | null | """
A simple example of reading GCVS data.
Information for every star is printed on standard output.
"""
import sys
from pygcvs import read_gcvs
if __name__ == '__main__':
try:
gcvs_file = sys.argv[1]
except IndexError:
print('Usage: python print_all_stars.py <path to iii.dat>')
else:
... | 19.25 | 67 | 0.654545 |
38f2480c45fd664deb7053c8d9faf570c28cdc03 | 1,657 | py | Python | src/thresholding.py | leckman/exocode | a88754b889687a268fb140282de1ce8e1b7c8992 | [
"MIT-0"
] | 1 | 2015-08-12T15:52:39.000Z | 2015-08-12T15:52:39.000Z | src/thresholding.py | leckman/exocode | a88754b889687a268fb140282de1ce8e1b7c8992 | [
"MIT-0"
] | null | null | null | src/thresholding.py | leckman/exocode | a88754b889687a268fb140282de1ce8e1b7c8992 | [
"MIT-0"
] | null | null | null | '''
Use Otsu's method to analyze catalog images, keep pixels only above a certain threshold
Copyright (c) 2015, Laura Eckman
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, i... | 36.021739 | 87 | 0.762221 |
38f25f8052656125f75f60ea745fb2396bb51bd4 | 5,021 | py | Python | app/celery/reporting_tasks.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | app/celery/reporting_tasks.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | app/celery/reporting_tasks.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from flask import current_app
from notifications_utils.statsd_decorators import statsd
from notifications_utils.timezones import convert_utc_to_bst
from app import notify_celery
from app.config import QueueNames
from app.cronitor import cronitor
from app.dao.fact_billing_dao i... | 40.491935 | 116 | 0.716391 |
38f280f182418018777aaa9c2bb1af52b9264cef | 5,311 | py | Python | pipeline/local_helpers/cm_helper.py | mayan1394/oculi | 383b3e6747463cca2bfe388111af8c8a5d85082c | [
"Apache-2.0"
] | 1 | 2020-06-11T10:02:53.000Z | 2020-06-11T10:02:53.000Z | pipeline/local_helpers/cm_helper.py | mayan1394/oculi | 383b3e6747463cca2bfe388111af8c8a5d85082c | [
"Apache-2.0"
] | null | null | null | pipeline/local_helpers/cm_helper.py | mayan1394/oculi | 383b3e6747463cca2bfe388111af8c8a5d85082c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 29.505556 | 80 | 0.67765 |
38f2994129c02104cd4155550e43fbcc5cb03ae0 | 40 | py | Python | g2ppy/phonecodes/src/__init__.py | ishine/g2ps | 49083b0ca8a49d094dcbb2c57a0869e05ab320f2 | [
"MIT"
] | 72 | 2018-09-04T07:48:54.000Z | 2022-03-09T16:07:16.000Z | g2ppy/phonecodes/src/__init__.py | shenyileirob/g2ps | 49083b0ca8a49d094dcbb2c57a0869e05ab320f2 | [
"MIT"
] | null | null | null | g2ppy/phonecodes/src/__init__.py | shenyileirob/g2ps | 49083b0ca8a49d094dcbb2c57a0869e05ab320f2 | [
"MIT"
] | 14 | 2019-09-06T22:59:18.000Z | 2022-03-09T14:02:50.000Z | from phonecodes.src.phonecodes import *
| 20 | 39 | 0.825 |
38f2c603c1680dfce3c961ed5d4cffe7b833e31f | 2,103 | py | Python | fine-tune/inference_utils.py | LinHuiqing/nonparaSeq2seqVC_code | d40a0cb9dc11c77b8af56b8510e4ab041f2f2b25 | [
"MIT"
] | 199 | 2019-12-13T03:11:21.000Z | 2022-03-29T15:44:49.000Z | fine-tune/inference_utils.py | LinHuiqing/nonparaSeq2seqVC_code | d40a0cb9dc11c77b8af56b8510e4ab041f2f2b25 | [
"MIT"
] | 39 | 2019-12-16T20:08:45.000Z | 2022-02-10T00:36:40.000Z | fine-tune/inference_utils.py | LinHuiqing/nonparaSeq2seqVC_code | d40a0cb9dc11c77b8af56b8510e4ab041f2f2b25 | [
"MIT"
] | 57 | 2019-12-16T23:25:25.000Z | 2022-03-28T18:04:16.000Z | import matplotlib
matplotlib.use("Agg")
import matplotlib.pylab as plt
import numpy as np
import librosa
import scipy.io.wavfile
def plot_data(data, fn, figsize=(12, 4)):
fig, axes = plt.subplots(1, len(data), figsize=figsize)
for i in range(len(data)):
if len(data) == 1:
ax = axes
... | 30.042857 | 105 | 0.596291 |
38f2c9c6c17f70aa32f663be1c9fcb5e4dac0e67 | 4,581 | py | Python | gender-age/helper.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 18 | 2018-04-13T02:55:03.000Z | 2020-10-12T01:37:52.000Z | gender-age/helper.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 3 | 2020-07-31T02:01:33.000Z | 2021-05-26T02:55:52.000Z | gender-age/helper.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 7 | 2018-08-29T06:41:19.000Z | 2019-09-11T06:10:39.000Z | # coding: utf-8
# YuanYang
import math
import cv2
import numpy as np
def nms(boxes, overlap_threshold, mode='Union'):
"""
non max suppression
Parameters:
----------
box: numpy array n x 5
input bbox array
overlap_threshold: float number
threshold of overlap... | 26.479769 | 103 | 0.555774 |
38f2d01af2a46450b19a613c0b88a61d1cd4d1a3 | 2,202 | py | Python | fabfile/tunnel.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | fabfile/tunnel.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | fabfile/tunnel.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | from fabric.api import task, local, settings, hide
from cloudmesh_base.ConfigDict import ConfigDict
from cloudmesh.config.cm_config import cm_config_server
from sh import sudo
from cloudmesh_base.locations import config_file
def get_server_config():
return ConfigDict(filename=config_file("/cloudmesh_server.yaml")... | 29.36 | 93 | 0.646231 |
38f2ff4fcf470c709b2a17ea0479e2ff5e86f5b5 | 2,636 | py | Python | data_ocean/views.py | Iva-khar/Data_converter | 9e991f479e2bf1c2ab430a9ad1be2da936ea139b | [
"MIT"
] | null | null | null | data_ocean/views.py | Iva-khar/Data_converter | 9e991f479e2bf1c2ab430a9ad1be2da936ea139b | [
"MIT"
] | null | null | null | data_ocean/views.py | Iva-khar/Data_converter | 9e991f479e2bf1c2ab430a9ad1be2da936ea139b | [
"MIT"
] | null | null | null | from django.views.decorators.cache import cache_page
from django.utils.decorators import method_decorator
from drf_yasg.generators import OpenAPISchemaGenerator, EndpointEnumerator
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from rest_framework import permissions, viewsets
from rest_framewor... | 36.109589 | 74 | 0.732549 |
38f323b91c78f3a033a50fefd4bb1f37d3290c20 | 21,654 | py | Python | mkconfig/conf/collectd/jmx.py | mcfongtw/MkConfig | 2015ad46352a1c7b42b510369f410e98c52df53b | [
"MIT"
] | 1 | 2016-11-29T13:41:21.000Z | 2016-11-29T13:41:21.000Z | mkconfig/conf/collectd/jmx.py | mcfongtw/MkConfig | 2015ad46352a1c7b42b510369f410e98c52df53b | [
"MIT"
] | null | null | null | mkconfig/conf/collectd/jmx.py | mcfongtw/MkConfig | 2015ad46352a1c7b42b510369f410e98c52df53b | [
"MIT"
] | null | null | null | import logging
import yaml
from mkconfig.conf.collectd.context import CTX_KEY_COMMON_COLLECTD_JMX_APP_CONF_DIR, \
CTX_KEY_COMMON_COLLECTD_JMX_CONF_YAML_FILE, CTX_KEY_COMMON_COLLECTD_JMX_MBEANS_SET, \
CTX_KEY_COMMON_COLLECTD_JMX_TYPE
from mkconfig.conf.collectd.context import CTX_KEY_COMMON_COLLECTD_JMX_APP_PR... | 41.1673 | 130 | 0.614113 |
38f327b6cca0a7a6f86814ef5528a4c0149ad32b | 1,191 | py | Python | sentences/migrations/0001_initial.py | rukeba/text-analyzer | 56bd4501ba86ea568d8ebdc6ad6857a26c97b290 | [
"MIT"
] | null | null | null | sentences/migrations/0001_initial.py | rukeba/text-analyzer | 56bd4501ba86ea568d8ebdc6ad6857a26c97b290 | [
"MIT"
] | 7 | 2021-03-19T03:14:33.000Z | 2022-02-27T04:42:55.000Z | sentences/migrations/0001_initial.py | rukeba/text-analyzer | 56bd4501ba86ea568d8ebdc6ad6857a26c97b290 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-04-25 20:48
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Text',
fields=[
... | 33.083333 | 114 | 0.566751 |
38f35037cfa407360e5228738a9b0994a5c00e5a | 10,088 | py | Python | tests/format/variables.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/format/variables.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/format/variables.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | # Pylint doesn't play well with fixtures and dependency injection from pytest
# pylint: disable=redefined-outer-name
import os
import sys
import pytest
from buildstream import _yaml
from buildstream.exceptions import ErrorDomain, LoadErrorReason
from buildstream.testing.runcli import cli # pylint: disable=unused-im... | 41.00813 | 119 | 0.66703 |
38f353329d7b53c23180b2553a4ada524c25a8e8 | 78,912 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_managed_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_managed_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_02_01/operations/_managed_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 43.501654 | 253 | 0.67242 |
38f3647bab20fe1c1eaa159098bcd2600135017b | 18,550 | py | Python | lib/modeling/mask_rcnn_heads.py | Musicwire/MyDetectron | 8888dad6ce7adf3ed18465ee98ae23a2ed762eef | [
"Apache-2.0"
] | 1 | 2018-07-26T15:24:30.000Z | 2018-07-26T15:24:30.000Z | lib/modeling/mask_rcnn_heads.py | Musicwire/MyDetectron | 8888dad6ce7adf3ed18465ee98ae23a2ed762eef | [
"Apache-2.0"
] | null | null | null | lib/modeling/mask_rcnn_heads.py | Musicwire/MyDetectron | 8888dad6ce7adf3ed18465ee98ae23a2ed762eef | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 34.608209 | 87 | 0.590728 |
38f36567491df8b6b39711f75adbc3ed82bfeb0d | 282 | py | Python | modules/dbnd-airflow/src/dbnd_airflow/raw_constants.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | modules/dbnd-airflow/src/dbnd_airflow/raw_constants.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | modules/dbnd-airflow/src/dbnd_airflow/raw_constants.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | # Please do not any airflow imports in this file
# We want to allow importing constants from this file without any side effects
# Do not change this name unless you change the same constant in monitor_as_dag.py in dbnd-airflow-monitor
MONITOR_DAG_NAME = "databand_airflow_monitor"
| 47 | 106 | 0.812057 |
38f36dbd3621c6c7bda9945742c155805f180fdd | 461 | py | Python | test/dom/html/test_label.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | test/dom/html/test_label.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | test/dom/html/test_label.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | from util import testAttribute
from util import testIntAttribute
def test():
print 'testing source code syntax'
from xml.dom.html import HTMLLabelElement
from xml.dom import implementation
doc = implementation.createHTMLDocument('Title')
l = doc.createElement('LABEL')
print 'testing get/set at... | 23.05 | 52 | 0.715835 |
38f3862f7b391e16f137e897881aeed13b7849c2 | 35,276 | py | Python | kats/detectors/cusum_detection.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | kats/detectors/cusum_detection.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | kats/detectors/cusum_detection.py | vishalbelsare/Kats | b555e97c84662b8b92b23fd3687c72583e0e9a47 | [
"MIT"
] | null | null | null | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
CUSUM stands for cumulative sum, it is a changepoint detection algorithm.
In the Kats implementation, it has two main components:
1... | 36.593361 | 88 | 0.586943 |
38f38b044c5e626b408c2ffab31096a0efb640e8 | 2,627 | py | Python | transform/albu_based/base.py | lartpang/DL-Utils | 225ae37b863cf0f9f93ee619ef84fa6cc5aac7d4 | [
"MIT"
] | 37 | 2022-03-05T09:19:35.000Z | 2022-03-30T02:16:50.000Z | transform/albu_based/base.py | lartpang/DL-Utils | 225ae37b863cf0f9f93ee619ef84fa6cc5aac7d4 | [
"MIT"
] | 1 | 2022-03-29T18:36:49.000Z | 2022-03-30T04:18:48.000Z | transform/albu_based/base.py | lartpang/DL-Utils | 225ae37b863cf0f9f93ee619ef84fa6cc5aac7d4 | [
"MIT"
] | 4 | 2022-03-08T04:37:04.000Z | 2022-03-22T22:49:43.000Z | import random
import albumentations as A
import cv2
class UniRotate(A.DualTransform):
"""UniRotate the input by an angle selected randomly from the uniform distribution.
Args:
limit ((int, int) or int): range from which a random angle is picked. If limit is a single int
an angle is picke... | 39.80303 | 115 | 0.665778 |
38f38f64c5b828131799844af8bb0f8c510d4a61 | 17,921 | py | Python | modestpy/estim/ga/ga.py | sdu-cfei/modest-py | dc14091fb8c20a8b3fa5ab33bbf597c0b566ba0a | [
"BSD-2-Clause"
] | 37 | 2017-06-21T19:09:11.000Z | 2022-03-13T09:26:07.000Z | modestpy/estim/ga/ga.py | sdu-cfei/modest-py | dc14091fb8c20a8b3fa5ab33bbf597c0b566ba0a | [
"BSD-2-Clause"
] | 51 | 2017-06-21T17:40:42.000Z | 2021-10-31T09:16:21.000Z | modestpy/estim/ga/ga.py | sdu-cfei/modest-py | dc14091fb8c20a8b3fa5ab33bbf597c0b566ba0a | [
"BSD-2-Clause"
] | 12 | 2017-10-02T12:32:50.000Z | 2022-03-13T09:26:15.000Z | """
Copyright (c) 2017, University of Southern Denmark
All rights reserved.
This code is licensed under BSD 2-clause license.
See LICENSE file in the project root for license terms.
"""
import logging
import os
import random
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import pyDOE as doe
from... | 37.10352 | 90 | 0.565872 |
38f3b0953f852d910bc27fa32626e7685d6bcaa5 | 9,185 | py | Python | cemu/emulator.py | MatejKastak/cemu | c6f93239a5901ce00d2f739a3913d0ba7d0ed4e4 | [
"MIT"
] | null | null | null | cemu/emulator.py | MatejKastak/cemu | c6f93239a5901ce00d2f739a3913d0ba7d0ed4e4 | [
"MIT"
] | null | null | null | cemu/emulator.py | MatejKastak/cemu | c6f93239a5901ce00d2f739a3913d0ba7d0ed4e4 | [
"MIT"
] | null | null | null | import os
import unicorn
import keystone
import capstone
from .arch import (
Syntax,
is_x86_16, is_x86_32, is_x86_64, is_x86,
is_arm, is_arm_thumb, is_aarch64,
is_mips, is_mips64,
is_sparc, is_sparc64,
is_ppc
)
from .utils import get_arch_mode, assemble
class Emulator:
EMU = 0
LOG =... | 32.115385 | 124 | 0.593468 |
38f3b927f671ea157479f01e1360a63109ee0d2a | 40,547 | py | Python | brainbox/metrics/single_units.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 38 | 2018-08-07T21:55:29.000Z | 2022-03-21T14:49:03.000Z | brainbox/metrics/single_units.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 207 | 2018-07-25T15:10:48.000Z | 2022-03-08T13:23:08.000Z | brainbox/metrics/single_units.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 35 | 2018-09-04T14:49:56.000Z | 2022-01-06T21:17:51.000Z | """
Computes metrics for assessing quality of single units.
Run the following to set-up the workspace to run the docstring examples:
>>> import brainbox as bb
>>> import alf.io as aio
>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> import ibllib.ephys.spikes as e_spks
# (*Note, if there is no 'alf' dire... | 39.138031 | 99 | 0.642316 |
38f3e6c7acc5dc4b477b990c5c1040f67b493ed4 | 2,139 | py | Python | 8. Telco - Pipelines/src/transformers.py | lordzsolt/Data-Science | 02241b541108f3b8e6031f260ddde0dd733988d0 | [
"MIT"
] | null | null | null | 8. Telco - Pipelines/src/transformers.py | lordzsolt/Data-Science | 02241b541108f3b8e6031f260ddde0dd733988d0 | [
"MIT"
] | null | null | null | 8. Telco - Pipelines/src/transformers.py | lordzsolt/Data-Science | 02241b541108f3b8e6031f260ddde0dd733988d0 | [
"MIT"
] | null | null | null | from sklearn.base import BaseEstimator, TransformerMixin
import pandas as pd
class PandasSelector(BaseEstimator, TransformerMixin):
def __init__(self, columns=None, dtype=None, inverse=False,
return_vector=True):
self.dtype = dtype
self.columns = columns
self.inverse = inv... | 33.421875 | 78 | 0.608228 |
38f3e7d55172334bc6556c30c212229d97b6d970 | 6,450 | py | Python | src/genie/libs/telemetry/plugins/libs/nxos/utils.py | CiscoTestAutomation/genietelemetry | 286cd1d281c7375c3d161955fa3ce52e1da52372 | [
"Apache-2.0"
] | 3 | 2020-05-24T11:47:53.000Z | 2020-09-06T21:22:21.000Z | src/genie/libs/telemetry/plugins/libs/nxos/utils.py | CiscoTestAutomation/genietelemetry | 286cd1d281c7375c3d161955fa3ce52e1da52372 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/telemetry/plugins/libs/nxos/utils.py | CiscoTestAutomation/genietelemetry | 286cd1d281c7375c3d161955fa3ce52e1da52372 | [
"Apache-2.0"
] | null | null | null |
# Python
import time
import logging
from datetime import datetime
# GenieMonitor
from genie.telemetry.status import OK, WARNING, ERRORED, PARTIAL, CRITICAL
# Parsergen
from genie.parsergen import oper_fill_tabular
# abstract
from genie.abstract import Lookup
# Import FileUtils core utilities
from pyats.utils.fileu... | 33.419689 | 88 | 0.551008 |
38f40c4bd518d6e0d18f840bbd62b94a7bf030af | 1,545 | py | Python | axonius_api_client/tests/tests_api/tests_asset_callbacks/test_callbacks_base.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 11 | 2020-01-31T00:28:26.000Z | 2022-03-25T20:27:08.000Z | axonius_api_client/tests/tests_api/tests_asset_callbacks/test_callbacks_base.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 83 | 2020-01-22T12:52:38.000Z | 2022-02-07T16:20:18.000Z | axonius_api_client/tests/tests_api/tests_asset_callbacks/test_callbacks_base.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 16 | 2019-08-23T17:44:31.000Z | 2022-01-06T00:57:34.000Z | # -*- coding: utf-8 -*-
"""Test suite for assets."""
import copy
import pytest
from ...utils import get_rows_exist
from .test_callbacks import Callbacks
class TestCallbacksBase(Callbacks):
@pytest.fixture(params=["api_devices", "api_users"])
def apiobj(self, request):
return request.getfixturevalue(... | 28.611111 | 81 | 0.615534 |
38f428e95a412192ec90e8c1d82e5ddb40cbc2b9 | 2,959 | py | Python | rally/plugins/openstack/context/murano/murano_packages.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/plugins/openstack/context/murano/murano_packages.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/plugins/openstack/context/murano/murano_packages.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | # Copyright 2015: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 38.428571 | 78 | 0.627239 |
38f48316fe6a5de705232180e386303792707117 | 652 | py | Python | charades_preprocess/preprocess.py | hudaAlamri/visdial-bert | 77fee9e49c629bff314397d7ff029389a08a4ec0 | [
"BSD-3-Clause"
] | null | null | null | charades_preprocess/preprocess.py | hudaAlamri/visdial-bert | 77fee9e49c629bff314397d7ff029389a08a4ec0 | [
"BSD-3-Clause"
] | null | null | null | charades_preprocess/preprocess.py | hudaAlamri/visdial-bert | 77fee9e49c629bff314397d7ff029389a08a4ec0 | [
"BSD-3-Clause"
] | 1 | 2022-03-07T15:48:19.000Z | 2022-03-07T15:48:19.000Z | # parse charades datasets to get the actions set
import csv
data_all = {}
input_file = csv.DictReader(open("../data/Charades/Charades_v1_train.csv"))
actions_list = {}
for row in input_file:
id = row['id']
data_all[id] = row
action_list = [v.split(' ')[0] for v in row['actions'].split(';')]
actions_list[id] = ac... | 24.148148 | 77 | 0.711656 |
38f49da6d1b5c00cf2f42a1c7b71f975dcabb486 | 7,199 | py | Python | onadata/apps/main/south_migrations/0007_auto__add_field_metadata_data_file_type.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/main/south_migrations/0007_auto__add_field_metadata_data_file_type.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/main/south_migrations/0007_auto__add_field_metadata_data_file_type.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field ... | 70.578431 | 182 | 0.567023 |
38f4f4c11cc7b75461f4fda1cc0c8090756191ac | 8,004 | py | Python | experiments/ashvin/corl2019/debug/pusher/ccrig_debug1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/debug/pusher/ccrig_debug1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/debug/pusher/ccrig_debug1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
... | 38.296651 | 121 | 0.571464 |
38f500c8098990645a58359aaccdece20b38803a | 5,993 | py | Python | xpctl/xpserver/test/test_xpctl_controller.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 3 | 2019-07-11T17:05:25.000Z | 2020-11-19T08:11:31.000Z | xpctl/xpserver/test/test_xpctl_controller.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 4 | 2019-06-28T01:07:42.000Z | 2020-07-24T15:12:57.000Z | xpctl/xpserver/test/test_xpctl_controller.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 2 | 2019-06-27T19:10:05.000Z | 2019-08-15T20:15:49.000Z | # coding: utf-8
from __future__ import absolute_import
from flask import json
from six import BytesIO
from xpctl.xpserver.models.experiment import Experiment # noqa: E501
from xpctl.xpserver.models.experiment_aggregate import ExperimentAggregate # noqa: E501
from xpctl.xpserver.models.response import Response # n... | 36.321212 | 93 | 0.552645 |
38f51fff80c768444c883881a265e181f638bfa3 | 1,240 | py | Python | leetcode_python/src/algorithms/linked_list/merge_sort_linked_list.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/src/algorithms/linked_list/merge_sort_linked_list.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/src/algorithms/linked_list/merge_sort_linked_list.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | from leetcode_python.src.algorithms.linked_list.ListNode import ListNode
class MergeSortLinkedList:
def sort_list(self, head: ListNode) -> ListNode:
if not head or not head.next_node:
return head
left = head
right = self.get_middle(head)
tmp = right.next_node
... | 25.306122 | 72 | 0.574194 |
38f524331f52b6dd78e0f32084dcd9358c644ea4 | 603 | py | Python | var/spack/repos/builtin/packages/py-cheetah3/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/py-cheetah3/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/py-cheetah3/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyCheetah3(PythonPackage):
"""Cheetah is a template engine and code generation tool."""
... | 33.5 | 95 | 0.736318 |
38f54042c6d34734547e41d38d297a6d321bda56 | 22 | py | Python | btd6_memory_info/generated/UnityEngine/UI/Selectable/selectable.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/UI/Selectable/selectable.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/UI/Selectable/selectable.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class Selectable: pass | 22 | 22 | 0.863636 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.