hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a71396c8eccbd499f64ee47c8235e9246d3bc275 | 32,867 | py | Python | saber/xbrain/xbrain.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 12 | 2018-05-14T17:43:18.000Z | 2021-11-16T04:03:33.000Z | saber/xbrain/xbrain.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 34 | 2019-05-06T19:13:36.000Z | 2021-05-06T19:12:35.000Z | saber/xbrain/xbrain.py | elenimath/saber | 71acab9798cf3aee1c4d64b09453e5234f8fdf1e | [
"Apache-2.0"
] | 3 | 2019-10-08T17:42:17.000Z | 2021-07-28T05:52:02.000Z | # Copyright 2019 The Johns Hopkins University Applied Physics Laboratory
#
# 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 ... | 37.562286 | 220 | 0.66334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14,643 | 0.445523 |
a71437b5469d3a544e7b8017e8d77b89874193c2 | 2,088 | py | Python | migrations/versions/b846613b404e_.py | python-02/flask-spa-CoopApp | 8ecd9e22847401c6ee18b76a80c68c8ba5d77401 | [
"MIT"
] | 6 | 2021-04-16T06:37:04.000Z | 2021-11-11T23:37:04.000Z | migrations/versions/b846613b404e_.py | python-02/flask-spa-CoopApp | 8ecd9e22847401c6ee18b76a80c68c8ba5d77401 | [
"MIT"
] | null | null | null | migrations/versions/b846613b404e_.py | python-02/flask-spa-CoopApp | 8ecd9e22847401c6ee18b76a80c68c8ba5d77401 | [
"MIT"
] | 2 | 2021-06-01T15:35:17.000Z | 2022-03-05T03:50:57.000Z | """empty message
Revision ID: b846613b404e
Revises: fc25bf71d841
Create Date: 2020-01-06 21:43:28.958558
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'b846613b404e'
down_revision = 'fc25bf71d841'
branch_labels = None... | 36.631579 | 69 | 0.684866 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 651 | 0.311782 |
a7143837d4f1b09881e05cb620fce36372532de7 | 2,010 | py | Python | alipay/aop/api/domain/AlipayEcoCityserviceIndustryEnergySendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayEcoCityserviceIndustryEnergySendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayEcoCityserviceIndustryEnergySendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.EnergyExtRequest import EnergyExtRequest
class AlipayEcoCityserviceIndustryEnergySendModel(object):
def __init__(self):
self._ext_info = None
self._outer_no =... | 26.8 | 69 | 0.584577 | 1,825 | 0.90796 | 0 | 0 | 895 | 0.445274 | 0 | 0 | 200 | 0.099502 |
a715a55b0649d434e3e3db7475617b277a5112ae | 1,657 | py | Python | project_receipt/receipt/urls.py | Guilouf/django-receipt | fb42de12311cd1a20cc28c74a732d818f28ef551 | [
"Apache-2.0"
] | null | null | null | project_receipt/receipt/urls.py | Guilouf/django-receipt | fb42de12311cd1a20cc28c74a732d818f28ef551 | [
"Apache-2.0"
] | 8 | 2021-02-01T12:47:02.000Z | 2021-12-13T09:34:38.000Z | project_receipt/receipt/urls.py | Guilouf/django-receipt | fb42de12311cd1a20cc28c74a732d818f28ef551 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from receipt import views
urlpatterns = [
path('', views.ReceiptList.as_view(), name='home'),
path('receipt/', views.ReceiptList.as_view(), name='receipt_list'),
path('receipt/create', views.ReceiptCreate.as_view(), name='receipt_create'),
path('receipt/<int:pk>/edit', vie... | 61.37037 | 106 | 0.719976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 632 | 0.381412 |
a71e3a4361a99f178927d847326e3096eeaee755 | 4,216 | py | Python | utils/common/_common.py | Pzqqt/Django_Transportation_Management_System | f4f0905d8e007920ae190252eeaefbc6ee67ed85 | [
"MIT"
] | null | null | null | utils/common/_common.py | Pzqqt/Django_Transportation_Management_System | f4f0905d8e007920ae190252eeaefbc6ee67ed85 | [
"MIT"
] | null | null | null | utils/common/_common.py | Pzqqt/Django_Transportation_Management_System | f4f0905d8e007920ae190252eeaefbc6ee67ed85 | [
"MIT"
] | null | null | null | from functools import partial
from itertools import chain
from collections import UserList
import logging
import traceback
from django import forms
from django.db.models import Model
from django.core.validators import validate_comma_separated_integer_list
from django.core.serializers.json import DjangoJSONEncoder
from... | 35.728814 | 101 | 0.708491 | 1,540 | 0.302079 | 51 | 0.010004 | 0 | 0 | 0 | 0 | 2,086 | 0.40918 |
a71f0fb6127bf9b694c0e036c4b163b042f9e29b | 127 | py | Python | landingpage/urls.py | aurphillus/Django-Library-Completed | f46e45f85c888e7694323e22f6e966c291a4a0be | [
"MIT"
] | null | null | null | landingpage/urls.py | aurphillus/Django-Library-Completed | f46e45f85c888e7694323e22f6e966c291a4a0be | [
"MIT"
] | null | null | null | landingpage/urls.py | aurphillus/Django-Library-Completed | f46e45f85c888e7694323e22f6e966c291a4a0be | [
"MIT"
] | null | null | null | from django.urls import path
from landingpage.views import *
urlpatterns = [
path('',landingpage,name="landingpage"),
]
| 14.111111 | 44 | 0.716535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.11811 |
a71fe8e9c812b790a9f8e10c54db7ff385e01808 | 31,509 | py | Python | cloud-v2.0/verify/verify.py | 13242084001/api | 71f57b485d685caae94a84b625d64be832cf8910 | [
"Apache-2.0"
] | null | null | null | cloud-v2.0/verify/verify.py | 13242084001/api | 71f57b485d685caae94a84b625d64be832cf8910 | [
"Apache-2.0"
] | 1 | 2021-03-25T23:58:32.000Z | 2021-03-25T23:58:32.000Z | cloud-v2.0/verify/verify.py | 13242084001/api | 71f57b485d685caae94a84b625d64be832cf8910 | [
"Apache-2.0"
] | null | null | null | from common import sshClient
import time
import eventlet
from .gol import *
import requests
from common.uploadMirror import login
from common.sqlquery import Query
#import pytest
import json
def check_login_response_headers(response):
result = False
if "cloud0" in response.headers.get("Set-Cookie"):
r... | 31.8917 | 180 | 0.564061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,105 | 0.192314 |
a72993531283fe9cd45b23f3481f393933bdc390 | 15,777 | py | Python | main.py | chilipolygon/Amazon-Requests-Module | 20fcfa9b9764e097bc107aa9dc5b0db772ce3ad9 | [
"Apache-2.0"
] | 3 | 2022-01-18T20:54:08.000Z | 2022-02-05T23:27:13.000Z | main.py | chilipolygon/Amazon-Requests-Module | 20fcfa9b9764e097bc107aa9dc5b0db772ce3ad9 | [
"Apache-2.0"
] | null | null | null | main.py | chilipolygon/Amazon-Requests-Module | 20fcfa9b9764e097bc107aa9dc5b0db772ce3ad9 | [
"Apache-2.0"
] | null | null | null | # ---------------------
from bs4 import BeautifulSoup as bs
import requests
import urllib3
import urllib
from urllib.parse import unquote
import re
import os
import sys
import json
import time
from colorama import Fore, init
from pprint import pprint
from datetime import datetime
import uuid
import threading
# --------... | 41.518421 | 272 | 0.548647 | 14,473 | 0.917174 | 0 | 0 | 0 | 0 | 0 | 0 | 7,060 | 0.447402 |
a72b62dfb661d28b942c1bbe2cd44f6d11909efd | 10,504 | py | Python | tests/test_word_distance.py | hasibaasma/alfpy | c8c0c1300108015746320cede2207ac57e630d3e | [
"MIT"
] | 19 | 2017-02-20T17:42:02.000Z | 2021-12-16T19:07:17.000Z | tests/test_word_distance.py | eggleader/alfpy | e0782e9551458ef17ab29df8af13fc0f8925e894 | [
"MIT"
] | 3 | 2018-03-12T23:54:27.000Z | 2020-12-09T21:53:19.000Z | tests/test_word_distance.py | eggleader/alfpy | e0782e9551458ef17ab29df8af13fc0f8925e894 | [
"MIT"
] | 6 | 2016-12-06T09:12:04.000Z | 2021-09-24T14:40:47.000Z | import unittest
from alfpy import word_pattern
from alfpy import word_vector
from alfpy import word_distance
from alfpy.utils import distmatrix
from . import utils
class DistanceTest(unittest.TestCase, utils.ModulesCommonTest):
def __init__(self, *args, **kwargs):
super(DistanceTest, self).__init__(*ar... | 43.949791 | 77 | 0.58035 | 10,286 | 0.979246 | 0 | 0 | 0 | 0 | 0 | 0 | 3,640 | 0.346535 |
a72d7496d5e3f428cdf8342b764e52a9a68ac6a0 | 3,092 | py | Python | cdparser/Features.py | opengulf/nyc-directories-support-scripts | e22582b8f4cb3c365e9aac1d860d9c36831277a5 | [
"MIT"
] | 1 | 2021-09-07T20:41:00.000Z | 2021-09-07T20:41:00.000Z | cdparser/Features.py | opengulf/nyc-directories-support-scripts | e22582b8f4cb3c365e9aac1d860d9c36831277a5 | [
"MIT"
] | null | null | null | cdparser/Features.py | opengulf/nyc-directories-support-scripts | e22582b8f4cb3c365e9aac1d860d9c36831277a5 | [
"MIT"
] | 2 | 2021-09-07T20:49:14.000Z | 2021-11-05T02:03:47.000Z | from functools import partial
class Features:
@staticmethod
def __emit_word_features(rel_pos, word):
features = {}
for f in Features.__word_feature_functions().items():
features.update({str(rel_pos) + ":" + f[0]: f[1](word)})
return features
@staticmethod
def get_w... | 28.366972 | 88 | 0.559185 | 3,061 | 0.989974 | 0 | 0 | 2,956 | 0.956016 | 0 | 0 | 245 | 0.079237 |
a73018c4b01cc941e04ea8bb39a52a6d8c243fb6 | 10,631 | py | Python | IRIS_data_download/IRIS_download_support/obspy/core/tests/test_util_attribdict.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 2 | 2020-03-05T01:03:01.000Z | 2020-12-17T05:04:07.000Z | IRIS_data_download/IRIS_download_support/obspy/core/tests/test_util_attribdict.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 4 | 2021-03-31T19:25:55.000Z | 2021-12-13T20:32:46.000Z | IRIS_data_download/IRIS_download_support/obspy/core/tests/test_util_attribdict.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 2 | 2020-09-08T19:33:40.000Z | 2021-04-05T09:47:50.000Z | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from future.builtins import * # NOQA @UnusedWildImport
import unittest
from obspy.core import AttribDict
class AttribDictTestCase(unittest.TestCase):
"""
Test suite for obspy... | 35.555184 | 77 | 0.577462 | 10,246 | 0.963785 | 0 | 0 | 0 | 0 | 0 | 0 | 2,928 | 0.275421 |
a730e555a53175f843e80e26bb1889169e4678c3 | 458 | py | Python | data/datasetFactory.py | dcsgfl/acceleratefl | 9c928ff06dd4dd02eb27cb71d7d539ba4527ec58 | [
"MIT"
] | null | null | null | data/datasetFactory.py | dcsgfl/acceleratefl | 9c928ff06dd4dd02eb27cb71d7d539ba4527ec58 | [
"MIT"
] | null | null | null | data/datasetFactory.py | dcsgfl/acceleratefl | 9c928ff06dd4dd02eb27cb71d7d539ba4527ec58 | [
"MIT"
] | null | null | null | from cifar10 import CIFAR10
from mnist import MNIST
class DatasetFactory:
factories = {}
def addFactory(id, dftory):
DatasetFactory.factories.put[id] = dftory
addFactory = staticmethod(addFactory)
def getDataset(id):
if id not in DatasetFactory.factories:
DatasetFa... | 28.625 | 66 | 0.676856 | 405 | 0.884279 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.026201 |
a73131170f5bdfaf1161caf237d671d9dbf5663d | 253 | py | Python | jsonresume/__init__.py | kelvintaywl/jsonresume-validator | 73ac162cb30ca70699c942def629188f7dfd4d3c | [
"MIT"
] | 42 | 2016-06-03T18:17:24.000Z | 2021-12-09T04:13:14.000Z | jsonresume/__init__.py | kelvintaywl/jsonresume-validator | 73ac162cb30ca70699c942def629188f7dfd4d3c | [
"MIT"
] | 3 | 2016-04-27T12:32:41.000Z | 2020-09-29T16:43:35.000Z | jsonresume/__init__.py | kelvintaywl/jsonresume-validator | 73ac162cb30ca70699c942def629188f7dfd4d3c | [
"MIT"
] | 9 | 2016-05-08T15:31:53.000Z | 2021-04-28T09:17:47.000Z | # -*- coding: utf-8 -*-
"""
JSON Resume Validator
~~~~~~
JSON Resume Validator helps validate python dictionaries to
ensure they are valid representation of a JSON Resume.
"""
from jsonresume.resume import Resume
__all__ = ['Resume']
| 19.461538 | 63 | 0.675889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.786561 |
a731c3353defbbffeebffba89c597908966a9fbc | 936 | py | Python | Catchphrase.py | YaruKatsaros/Catchphrase | 5d674cc251be226e233fd427f9533a56f1a24284 | [
"MIT"
] | null | null | null | Catchphrase.py | YaruKatsaros/Catchphrase | 5d674cc251be226e233fd427f9533a56f1a24284 | [
"MIT"
] | null | null | null | Catchphrase.py | YaruKatsaros/Catchphrase | 5d674cc251be226e233fd427f9533a56f1a24284 | [
"MIT"
] | null | null | null | import glob
import os
import sys
import re
savedlines = []
def startreading():
if os.path.isdir(sys.argv[1]):
os.chdir(sys.argv[1])
target = sys.argv[2] # TODO: Multiple lines.
for file in glob.glob("*.srt"):
read(sys.argv[1], file, target)
savelines()
print("... | 21.767442 | 96 | 0.573718 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.162393 |
a733182bb7d063e48b371c3b9b8871a0afe48521 | 19,712 | py | Python | dashboard/api/config.py | x3niasweden/fomalhaut-panel | 8b4b3d81e2c91bef8f24ccbaf9cf898a47ac38a6 | [
"MIT"
] | 14 | 2017-08-01T08:28:00.000Z | 2020-08-29T06:55:16.000Z | dashboard/api/config.py | x3niasweden/fomalhaut-panel | 8b4b3d81e2c91bef8f24ccbaf9cf898a47ac38a6 | [
"MIT"
] | 1 | 2021-03-29T06:16:34.000Z | 2021-03-29T06:16:34.000Z | dashboard/api/config.py | x3niasweden/fomalhaut-panel | 8b4b3d81e2c91bef8f24ccbaf9cf898a47ac38a6 | [
"MIT"
] | 12 | 2017-07-18T02:59:03.000Z | 2021-03-23T04:04:58.000Z | # !/usr/bin/env python
# -*- coding: utf-8 -*-
# created by restran on 2016/1/2
from __future__ import unicode_literals, absolute_import
import traceback
from django.views.decorators.http import require_http_methods
from django.views.decorators.csrf import csrf_protect
from django.db import transaction
from cerberu... | 33.241147 | 122 | 0.491985 | 0 | 0 | 0 | 0 | 7,487 | 0.365184 | 0 | 0 | 4,712 | 0.229831 |
a733c76add330a704c87d51a39a3121429990715 | 2,209 | py | Python | WX_BG.py | boristown/WX_BG | c715d1f3ffeef60187be0289f26549204d6b963f | [
"MIT"
] | 1 | 2019-08-17T23:21:28.000Z | 2019-08-17T23:21:28.000Z | WX_BG.py | boristown/WX_BG | c715d1f3ffeef60187be0289f26549204d6b963f | [
"MIT"
] | null | null | null | WX_BG.py | boristown/WX_BG | c715d1f3ffeef60187be0289f26549204d6b963f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# filename: WX_BG.py
import prices
import glob
import prediction
import os
import time
import random
#预测数据文件
prices_file_pattern = "Output\\prices\\*.csv"
#预测数据文件
predict_file_pattern = "Output\\predict\\*.csv"
#预测数据文件
prices_file_second_pattern = "Output\\prices_second\\*.csv"
#预测数据文件
predict_... | 26.939024 | 103 | 0.663649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 599 | 0.249272 |
a734a04a2790536248f0af4b3c7aedde27c72873 | 929 | py | Python | hyppo/d_variate/tests/test_dhsic.py | zdbzdb123123/hyppo | c22dcfb7bdf25c9945e6d4ddd7c6bfe5fcdd0cde | [
"MIT"
] | 116 | 2020-02-28T10:29:22.000Z | 2022-03-22T12:19:39.000Z | hyppo/d_variate/tests/test_dhsic.py | zdbzdb123123/hyppo | c22dcfb7bdf25c9945e6d4ddd7c6bfe5fcdd0cde | [
"MIT"
] | 253 | 2020-02-17T16:18:56.000Z | 2022-03-30T16:55:02.000Z | hyppo/d_variate/tests/test_dhsic.py | zdbzdb123123/hyppo | c22dcfb7bdf25c9945e6d4ddd7c6bfe5fcdd0cde | [
"MIT"
] | 27 | 2020-03-02T21:07:41.000Z | 2022-03-08T08:33:23.000Z | import numpy as np
import pytest
from numpy.testing import assert_almost_equal
from ...tools import linear, power
from .. import dHsic # type: ignore
class TestdHsicStat:
@pytest.mark.parametrize("n, obs_stat", [(100, 0.04561), (200, 0.03911)])
@pytest.mark.parametrize("obs_pvalue", [1 / 1000])
def test... | 27.323529 | 77 | 0.620022 | 771 | 0.829925 | 0 | 0 | 413 | 0.444564 | 0 | 0 | 78 | 0.083961 |
a7351f98fb299d1d929cbe7b4a8c9742f60b725d | 2,844 | py | Python | Pages/showHistory.py | ajaydeepsingh/ATLZoo | ab5ba27dc8602da39ce8bb47c4a050ff09d79b82 | [
"MIT"
] | null | null | null | Pages/showHistory.py | ajaydeepsingh/ATLZoo | ab5ba27dc8602da39ce8bb47c4a050ff09d79b82 | [
"MIT"
] | null | null | null | Pages/showHistory.py | ajaydeepsingh/ATLZoo | ab5ba27dc8602da39ce8bb47c4a050ff09d79b82 | [
"MIT"
] | null | null | null | from tkinter import *
from PIL import ImageTk, Image
import pymysql
from tkinter import messagebox
from tkinter import ttk
from datetime import datetime, timedelta
import decimal
class ATLzooShowHistory:
def __init__(self):
self.createShowHistoryWindow()
self.buildShowHistoryWindow(self.showHistory... | 37.92 | 120 | 0.688819 | 2,637 | 0.927215 | 0 | 0 | 0 | 0 | 0 | 0 | 276 | 0.097046 |
a738885fc845ac09ce24d938e1de039911e09569 | 6,061 | py | Python | python/federatedml/protobuf/generated/sample_weight_model_param_pb2.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 715 | 2019-01-24T10:52:03.000Z | 2019-10-31T12:19:22.000Z | python/federatedml/protobuf/generated/sample_weight_model_param_pb2.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 270 | 2019-02-11T02:57:36.000Z | 2019-08-29T11:22:33.000Z | python/federatedml/protobuf/generated/sample_weight_model_param_pb2.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 200 | 2019-01-26T14:21:35.000Z | 2019-11-01T01:14:36.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: sample-weight-model-param.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
... | 42.985816 | 502 | 0.707144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,907 | 0.314635 |
a739bd10614848db1a73028a77c6c885008e1463 | 63,679 | py | Python | postprocessing/pyplotgen/config/Case_definitions.py | larson-group/clubb_release | b4d671e3e238dbe00752c0dead6a0d4f9897350a | [
"Intel",
"Unlicense",
"NetCDF"
] | null | null | null | postprocessing/pyplotgen/config/Case_definitions.py | larson-group/clubb_release | b4d671e3e238dbe00752c0dead6a0d4f9897350a | [
"Intel",
"Unlicense",
"NetCDF"
] | null | null | null | postprocessing/pyplotgen/config/Case_definitions.py | larson-group/clubb_release | b4d671e3e238dbe00752c0dead6a0d4f9897350a | [
"Intel",
"Unlicense",
"NetCDF"
] | 1 | 2022-01-28T22:22:04.000Z | 2022-01-28T22:22:04.000Z | """
:author: Nicolas Strike
:date: Early 2019
This file is mostly a definition of Cases. Each case is defined in the following format
using python dictionaries (values surrounded with < > must have the < > removed to be valid).
.. code-block:: python
:linenos:
CASENAME = {'name': 'casename',
'descrip... | 55.181109 | 135 | 0.56254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29,881 | 0.469244 |
a739e22b895dd7f5b68d4cbbe585f6f9e1e16131 | 305 | py | Python | docker_sdk_api/domain/services/contracts/abstract_dataset_validator_service.py | BMW-InnovationLab/BMW-Semantic-Segmentation-Training-GUI | 902f35a7e367e635898f687b16a830db892fbaa5 | [
"Apache-2.0"
] | 20 | 2021-07-13T13:08:57.000Z | 2022-03-29T09:38:00.000Z | docker_sdk_api/domain/services/contracts/abstract_dataset_validator_service.py | BMW-InnovationLab/BMW-Semantic-Segmentation-Training-GUI | 902f35a7e367e635898f687b16a830db892fbaa5 | [
"Apache-2.0"
] | null | null | null | docker_sdk_api/domain/services/contracts/abstract_dataset_validator_service.py | BMW-InnovationLab/BMW-Semantic-Segmentation-Training-GUI | 902f35a7e367e635898f687b16a830db892fbaa5 | [
"Apache-2.0"
] | 2 | 2021-07-12T08:42:53.000Z | 2022-03-04T18:41:25.000Z | from abc import ABC, ABCMeta, abstractmethod
from domain.models.datase_information import DatasetInformation
class AbstractDatasetValidatorService(ABC):
__metaclass__ = ABCMeta
@abstractmethod
def validate_dataset(self, dataset_info: DatasetInformation) -> None: raise NotImplementedError
| 27.727273 | 99 | 0.816393 | 192 | 0.629508 | 0 | 0 | 115 | 0.377049 | 0 | 0 | 0 | 0 |
a739f43b0588186a90f5d8f8245209820d58a6a6 | 1,683 | py | Python | setup.py | eltonn/toki | 22efd9ce84414380904e3a5ac84e84de9bdb5bce | [
"Apache-2.0"
] | 1 | 2020-11-30T16:52:50.000Z | 2020-11-30T16:52:50.000Z | setup.py | eltonn/toki | 22efd9ce84414380904e3a5ac84e84de9bdb5bce | [
"Apache-2.0"
] | 7 | 2020-05-29T23:22:21.000Z | 2020-11-30T20:49:37.000Z | setup.py | eltonn/toki | 22efd9ce84414380904e3a5ac84e84de9bdb5bce | [
"Apache-2.0"
] | 1 | 2020-04-29T21:59:25.000Z | 2020-04-29T21:59:25.000Z | """The setup script."""
from setuptools import find_packages, setup
with open('README.md') as readme_file:
readme = readme_file.read()
with open('docs/release-notes.md') as history_file:
history = history_file.read()
requirements = []
dev_requirements = [
# lint and tools
'black',
'flake8',
... | 26.296875 | 61 | 0.616756 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 840 | 0.499109 |
a73aed88b329c068d8782d3c38cdfcf8ff4be7a3 | 3,109 | py | Python | dq0/sdk/estimators/data_handler/csv.py | gradientzero/dq0-sdk | 90856dd5ac56216971ffe33004447fd037a21660 | [
"0BSD"
] | 2 | 2020-09-16T09:28:00.000Z | 2021-03-18T21:26:29.000Z | dq0/sdk/estimators/data_handler/csv.py | gradientzero/dq0-sdk | 90856dd5ac56216971ffe33004447fd037a21660 | [
"0BSD"
] | 22 | 2020-04-15T10:19:33.000Z | 2022-03-12T00:20:57.000Z | dq0/sdk/estimators/data_handler/csv.py | gradientzero/dq0-sdk | 90856dd5ac56216971ffe33004447fd037a21660 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""Base data handler.
Copyright 2021, Gradient Zero
All rights reserved
"""
import logging
import dq0.sdk
from dq0.sdk.estimators.data_handler.base import BasicDataHandler
import pandas as pd
from sklearn.model_selection import train_test_split
logger = logging.getLogger(__name__)
class ... | 42.013514 | 184 | 0.690254 | 2,794 | 0.898681 | 0 | 0 | 0 | 0 | 0 | 0 | 945 | 0.303956 |
59519f91376cf89bef0bf6bdc3580d8bfb999e90 | 808 | py | Python | python/163_missing_ranges.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | 17 | 2016-03-01T22:40:53.000Z | 2021-04-19T02:15:03.000Z | python/163_missing_ranges.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | null | null | null | python/163_missing_ranges.py | liaison/LeetCode | 8b10a1f6bbeb3ebfda99248994f7c325140ee2fd | [
"MIT"
] | 3 | 2019-03-07T03:48:43.000Z | 2020-04-05T01:11:36.000Z | class Solution:
def findMissingRanges(self, nums: List[int], lower: int, upper: int) -> List[str]:
range_iter = lower
num_iter = 0
ranges = []
while range_iter < upper and num_iter < len(nums):
if range_iter < nums[num_iter]:
if nums[num_iter] - 1... | 36.727273 | 86 | 0.516089 | 808 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.024752 |
595209a149b488a190b55a28e227e0653341e30a | 407 | py | Python | core/utils/template_updater.py | blockomat2100/vulnman | 835ff3aae1168d8e2fa5556279bc86efd2e46472 | [
"MIT"
] | 3 | 2021-12-22T07:02:24.000Z | 2022-01-27T20:19:11.000Z | core/utils/template_updater.py | vulnman/vulnman | d48ee022bc0e4368060a990a527b1c7a5e437504 | [
"MIT"
] | 44 | 2021-12-14T07:24:29.000Z | 2022-03-23T07:01:16.000Z | core/utils/template_updater.py | blockomat2100/vulnman | 835ff3aae1168d8e2fa5556279bc86efd2e46472 | [
"MIT"
] | 1 | 2022-01-21T16:29:56.000Z | 2022-01-21T16:29:56.000Z | import os
from django.conf import settings
from git import Repo
def update_vulnerability_templates():
template_dir = os.path.join(
settings.BASE_DIR, "resources/vuln_templates")
if os.path.isdir(template_dir):
repo = Repo(template_dir)
origin = repo.remotes.origin
origin.pull()... | 27.133333 | 75 | 0.712531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.063882 |
5952b761ae49fba6ea7b48e61c02b4ec86ac2f3e | 209 | py | Python | Isomorphic Strings.py | HalShaw/Leetcode | 27c52aac5a8ecc5b5f02e54096a001920661b4bb | [
"MIT"
] | 1 | 2016-12-22T04:09:25.000Z | 2016-12-22T04:09:25.000Z | Isomorphic Strings.py | HalShaw/Leetcode | 27c52aac5a8ecc5b5f02e54096a001920661b4bb | [
"MIT"
] | null | null | null | Isomorphic Strings.py | HalShaw/Leetcode | 27c52aac5a8ecc5b5f02e54096a001920661b4bb | [
"MIT"
] | null | null | null | class Solution(object):
def isIsomorphic(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
return map(s.index,s)==map(t.index,t)#相同格式都可以用
| 20.9 | 54 | 0.473684 | 215 | 0.955556 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.457778 |
5952c5d9520173eb54626c3cf8e791dbdc5d7f03 | 656 | py | Python | pages/basket_page.py | Espad/stepik_autotests_final_tasks | 2d9e3408766cc00387a8ddd656006556cce567b4 | [
"MIT"
] | null | null | null | pages/basket_page.py | Espad/stepik_autotests_final_tasks | 2d9e3408766cc00387a8ddd656006556cce567b4 | [
"MIT"
] | null | null | null | pages/basket_page.py | Espad/stepik_autotests_final_tasks | 2d9e3408766cc00387a8ddd656006556cce567b4 | [
"MIT"
] | null | null | null | from .base_page import BasePage
from .locators import BasketPageLocators
class BasketPage(BasePage):
def should_be_empty_basket_message(self):
assert self.is_element_present(*BasketPageLocators.BASKET_EMPTY_MESSAGE), \
"Empty basket message element not found on page"
assert self.brows... | 41 | 135 | 0.745427 | 580 | 0.884146 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.23628 |
5955db7626231d3711353993b2796474b288c67c | 169 | py | Python | tests/collaboration/factories.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | null | null | null | tests/collaboration/factories.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | 51 | 2018-05-31T12:16:31.000Z | 2022-03-08T09:36:48.000Z | tests/collaboration/factories.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | 2 | 2019-12-24T09:47:42.000Z | 2021-02-09T09:36:51.000Z | import factory
from api.collaboration.models import TeamMember
class TeamMemberFactory(factory.django.DjangoModelFactory):
class Meta:
model = TeamMember
| 18.777778 | 59 | 0.781065 | 102 | 0.60355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
595945cb1c25f789695dd2fae8ba200ee3b77c80 | 1,454 | py | Python | trypython/extlib/aiohttp/aiohttp01.py | devlights/try-python-extlib | 9bfb649d3f5b249b67991a30865201be794e29a9 | [
"MIT"
] | null | null | null | trypython/extlib/aiohttp/aiohttp01.py | devlights/try-python-extlib | 9bfb649d3f5b249b67991a30865201be794e29a9 | [
"MIT"
] | null | null | null | trypython/extlib/aiohttp/aiohttp01.py | devlights/try-python-extlib | 9bfb649d3f5b249b67991a30865201be794e29a9 | [
"MIT"
] | null | null | null | """
aiohttp モジュールのサンプルです
基本的な使い方について
REFERENCES:: http://bit.ly/2O2lmeU
http://bit.ly/2O08oy3
"""
import asyncio
from asyncio import Future
from typing import List, Dict
import aiohttp
from trypython.common.commoncls import SampleBase
async def fetch_async(index: int, url: str) -> Dict:
async wit... | 25.068966 | 97 | 0.592847 | 408 | 0.26528 | 0 | 0 | 0 | 0 | 358 | 0.23277 | 495 | 0.321847 |
595abb6fdb13a008e2f80cf057085a05a97b14a8 | 1,860 | py | Python | models.py | camerongray1515/HackDee-2015 | 6459c5bd3ad895e0a216ff61342eb73877dc9ee5 | [
"MIT"
] | null | null | null | models.py | camerongray1515/HackDee-2015 | 6459c5bd3ad895e0a216ff61342eb73877dc9ee5 | [
"MIT"
] | 1 | 2015-04-04T20:55:52.000Z | 2015-12-17T23:35:08.000Z | models.py | camerongray1515/HackDee-2015 | 6459c5bd3ad895e0a216ff61342eb73877dc9ee5 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, String, Boolean, ForeignKey, Integer
from sqlalchemy.orm import relationship
from database import Base
from string import ascii_letters
from random import choice
class Playlist(Base):
__tablename__ = "playlists"
id = Column(String, primary_key=True)
name = Column(String)
... | 29.0625 | 89 | 0.614516 | 1,661 | 0.893011 | 0 | 0 | 510 | 0.274194 | 0 | 0 | 179 | 0.096237 |
595b940d98d4c9ba62ad1e7789fd5ad05f9b32ef | 3,270 | py | Python | Python3/726.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/726.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/726.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 24 ms submission
class Solution:
def countOfAtoms(self, formula: str) -> str:
stack, atom, dic, count, coeff, c = [], '', collections.defaultdict(int), 0, 1, 0
for i in formula... | 30 | 98 | 0.45107 | 2,920 | 0.892966 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.006116 |
595ecf0b3419dbc932591ff7beb5487e3db35f47 | 932 | py | Python | script/rmLinebyIndFile.py | ASLeonard/danbing-tk | 15540124ff408777d0665ace73698b0c2847d1cc | [
"BSD-3-Clause"
] | 17 | 2020-08-16T14:28:11.000Z | 2022-03-23T23:30:47.000Z | script/rmLinebyIndFile.py | ASLeonard/danbing-tk | 15540124ff408777d0665ace73698b0c2847d1cc | [
"BSD-3-Clause"
] | 7 | 2021-01-25T15:26:18.000Z | 2022-03-31T14:30:46.000Z | script/rmLinebyIndFile.py | ASLeonard/danbing-tk | 15540124ff408777d0665ace73698b0c2847d1cc | [
"BSD-3-Clause"
] | 2 | 2020-11-01T20:41:38.000Z | 2021-05-29T03:22:24.000Z | #!/usr/bin/env python3
import sys
import numpy as np
if len(sys.argv) == 1 or sys.argv[1] == "-h" or sys.argv[1] == "--help":
print(
"""
Remove line indices (0-based) specified in 'index.txt'
usage: program [-k] index.txt inFile
-k Keep line indices in 'index.txt' instead of removing ... | 22.731707 | 78 | 0.55794 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 306 | 0.328326 |
595f827df47c5f2bdd1ecfb6bc095d61ca198a03 | 538 | py | Python | dynaban/tests/postion.py | laukik-hase/imitation_of_human_arm_on_robotic_manipulator | 995beb1ab41597ca6cbecd0baecdef1ef13450f9 | [
"MIT"
] | 3 | 2021-11-13T16:54:31.000Z | 2021-11-13T20:50:18.000Z | dynaban/tests/postion.py | laukik-hase/human_arm_imitation | 995beb1ab41597ca6cbecd0baecdef1ef13450f9 | [
"MIT"
] | null | null | null | dynaban/tests/postion.py | laukik-hase/human_arm_imitation | 995beb1ab41597ca6cbecd0baecdef1ef13450f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import arm_control_utils
DURATION = 30000
TRAJ_POLY1 = [1000, 100, 100]
TORQUE_POLY1 = [1000, 100, 100]
MODE = 3
arm_control_utils.initialize_motors()
arm_control_utils.enable_state_torque()
arm_control_utils.set_debug(1, ... | 28.315789 | 80 | 0.702602 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.066914 |
595fa12df823f48a76595c65b488cfd3266708e8 | 5,758 | py | Python | google-datacatalog-connectors-commons/tests/google/datacatalog_connectors/commons/prepare/base_entry_factory_test.py | mesmacosta/datacatalog-connectors | 74a4b6272cb00f2831b669d1a41133913f3df3fa | [
"Apache-2.0"
] | 53 | 2020-04-27T21:50:47.000Z | 2022-02-18T22:08:49.000Z | google-datacatalog-connectors-commons/tests/google/datacatalog_connectors/commons/prepare/base_entry_factory_test.py | mesmacosta/datacatalog-connectors | 74a4b6272cb00f2831b669d1a41133913f3df3fa | [
"Apache-2.0"
] | 20 | 2020-05-26T13:51:45.000Z | 2022-01-25T00:06:19.000Z | google-datacatalog-connectors-commons/tests/google/datacatalog_connectors/commons/prepare/base_entry_factory_test.py | mesmacosta/datacatalog-connectors | 74a4b6272cb00f2831b669d1a41133913f3df3fa | [
"Apache-2.0"
] | 12 | 2020-04-30T22:14:02.000Z | 2021-10-09T03:44:39.000Z | #!/usr/bin/python
# coding=utf-8
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 42.029197 | 93 | 0.70719 | 5,058 | 0.878125 | 0 | 0 | 3,383 | 0.587326 | 0 | 0 | 2,419 | 0.419965 |
5960088035b5df4aefdc1abf2b6dd9894a0c53be | 5,978 | py | Python | estimators.py | RakitinDen/pytorch-recursive-gumbel-max-trick | 44f9854020e727946a074a6e53b20dd593f96cc1 | [
"Apache-2.0"
] | 20 | 2021-12-03T13:20:17.000Z | 2022-03-20T18:58:06.000Z | estimators.py | RakitinDen/pytorch-recursive-gumbel-max-trick | 44f9854020e727946a074a6e53b20dd593f96cc1 | [
"Apache-2.0"
] | null | null | null | estimators.py | RakitinDen/pytorch-recursive-gumbel-max-trick | 44f9854020e727946a074a6e53b20dd593f96cc1 | [
"Apache-2.0"
] | null | null | null | # Estimators are partially based on the "estimators.py" from the following repositories:
# https://github.com/agadetsky/pytorch-pl-variance-reduction
# https://github.com/sdrobert/pydrobert-pytorch
import torch
def uniform_to_exp(logits, uniform=None, enable_grad=False):
'''
Converts a tensor of independent u... | 36.674847 | 119 | 0.666109 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,072 | 0.346604 |
596098c174bcd92a072f4a63dcf655eaaf7c83e8 | 1,332 | py | Python | squareroot.py | martinaobrien/pands-problem-sets | 5928f9ed2a743f46a9615f41192fd6dfb810b73c | [
"CNRI-Python"
] | null | null | null | squareroot.py | martinaobrien/pands-problem-sets | 5928f9ed2a743f46a9615f41192fd6dfb810b73c | [
"CNRI-Python"
] | null | null | null | squareroot.py | martinaobrien/pands-problem-sets | 5928f9ed2a743f46a9615f41192fd6dfb810b73c | [
"CNRI-Python"
] | null | null | null | #Martina O'Brien 10/3/2019
#Problem Set 7 - squareroots
#Programming Code to determining the squareroots of positive floating point numbers
## Reference for try and expect https://www.w3schools.com/python/python_try_except.asp
while True: # this loop will run to allow the user to input a value again if they do ... | 45.931034 | 114 | 0.693694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,030 | 0.773273 |
596187b54ca231442ef296c49a1a09d46c903d01 | 2,843 | py | Python | tests/org_group_tests.py | JonLMyers/MetroTransitAPI | d8f467570368cd563d69564b680cfdd47ad6b622 | [
"MIT"
] | null | null | null | tests/org_group_tests.py | JonLMyers/MetroTransitAPI | d8f467570368cd563d69564b680cfdd47ad6b622 | [
"MIT"
] | null | null | null | tests/org_group_tests.py | JonLMyers/MetroTransitAPI | d8f467570368cd563d69564b680cfdd47ad6b622 | [
"MIT"
] | null | null | null | import requests
import json
token = ''
email_token = ''
print("######## Pass ########")
target = 'http://127.0.0.1:5000/login'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
data = {'username': 'jon@aaxus.com', 'password': 'password125'}
r = requests.post(target, data=json.dumps(data), headers... | 33.05814 | 106 | 0.638762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,426 | 0.501583 |
5961e885fedcd68b3653416c363d4e461726bdc8 | 5,578 | py | Python | pywbemtools/pywbemlistener/_context_obj.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 8 | 2017-04-01T13:55:00.000Z | 2022-03-15T18:28:47.000Z | pywbemtools/pywbemlistener/_context_obj.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 918 | 2017-03-03T14:29:03.000Z | 2022-03-29T15:32:16.000Z | pywbemtools/pywbemlistener/_context_obj.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 2 | 2020-01-17T15:56:46.000Z | 2020-02-12T18:49:30.000Z | # (C) Copyright 2021 Inova Development 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 appl... | 31.693182 | 80 | 0.620115 | 4,797 | 0.859986 | 0 | 0 | 2,068 | 0.370742 | 0 | 0 | 3,434 | 0.615633 |
5962222919ba8cf295722ccc3d990ff5fdab4dcc | 1,704 | py | Python | ota_xml_api/util/xml_base.py | mihira/opentravel-xml-api | 24d1ea4d24cf2575de474becaa665f6fc0d1971d | [
"MIT"
] | 3 | 2016-01-14T01:12:06.000Z | 2021-04-16T04:00:47.000Z | ota_xml_api/util/xml_base.py | mihira/opentravel-xml-api | 24d1ea4d24cf2575de474becaa665f6fc0d1971d | [
"MIT"
] | null | null | null | ota_xml_api/util/xml_base.py | mihira/opentravel-xml-api | 24d1ea4d24cf2575de474becaa665f6fc0d1971d | [
"MIT"
] | 2 | 2017-09-04T13:02:09.000Z | 2018-06-09T11:10:03.000Z | #!/usr/bin/env python
"""
This module contains the base xml Node and Period classes
"""
from xml.dom.minidom import getDOMImplementation
from date import Period
from constants import START, END
class XmlNode(object):
"""
the name of the class will define the name of the node by default.
classes inherit... | 27.483871 | 70 | 0.661385 | 1,502 | 0.881455 | 0 | 0 | 0 | 0 | 0 | 0 | 228 | 0.133803 |
59629f7a0c5633f940aafc1f0319ef57490ea9f2 | 9,441 | py | Python | phl_courts_scraper/court_summary/schema.py | PhiladelphiaController/phl-courts-scraper | 0c3c915a7fa355538c43a138fa7b104b8bf6ef1e | [
"MIT"
] | null | null | null | phl_courts_scraper/court_summary/schema.py | PhiladelphiaController/phl-courts-scraper | 0c3c915a7fa355538c43a138fa7b104b8bf6ef1e | [
"MIT"
] | 4 | 2020-12-09T18:25:53.000Z | 2021-03-19T22:30:18.000Z | phl_courts_scraper/court_summary/schema.py | PhiladelphiaController/phl-courts-scraper | 0c3c915a7fa355538c43a138fa7b104b8bf6ef1e | [
"MIT"
] | null | null | null | """Define the schema for the court summary report."""
import datetime
from dataclasses import dataclass, field, fields
from typing import Any, Iterator, List, Optional, Union
import desert
import marshmallow
import pandas as pd
from ..utils import DataclassSchema
__all__ = ["CourtSummary", "Docket", "Charge", "Sent... | 26.594366 | 72 | 0.586696 | 9,055 | 0.959115 | 0 | 0 | 8,366 | 0.886135 | 0 | 0 | 4,413 | 0.467429 |
5962e0c96855173baf9ead74168b62eef51ee37e | 216 | py | Python | Day_43/json_dump_python.py | kiranrraj/100Days_Of_Coding | ab75d83be9be87fb7bc83a3f3b72a4638dab22a1 | [
"MIT"
] | null | null | null | Day_43/json_dump_python.py | kiranrraj/100Days_Of_Coding | ab75d83be9be87fb7bc83a3f3b72a4638dab22a1 | [
"MIT"
] | null | null | null | Day_43/json_dump_python.py | kiranrraj/100Days_Of_Coding | ab75d83be9be87fb7bc83a3f3b72a4638dab22a1 | [
"MIT"
] | null | null | null | # Title : Json Module Module
# Author : Kiran Raj R.
# Date : 26/11/2020
python_json = {"name":"kiran", "email":"kiran@gmail.com", "isHappy": "Yes"}
import json
string_j = json.dumps(python_json)
print(string_j) | 24 | 75 | 0.680556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.574074 |
5963d226f34e95078375678dfe6099b78982408c | 573 | py | Python | userbot/modules/trd.py | LUCKYRAJPUTOP/VibeXUserbot | 257c86ff1775592688815435d8c5ce91e1dd299e | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/trd.py | LUCKYRAJPUTOP/VibeXUserbot | 257c86ff1775592688815435d8c5ce91e1dd299e | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/trd.py | LUCKYRAJPUTOP/VibeXUserbot | 257c86ff1775592688815435d8c5ce91e1dd299e | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | import asyncio
from asyncio import sleep
from random import choice
from userbot.events import register
T_R_D = [
"@PrajjuS",
"@Vin02vin",
"@Iamsaisharan",
"@venomsamurai",
]
@register(outgoing=True, pattern="^.trd$")
async def truthrdare(trd):
"""Truth or Dare"""
await trd.edit("`Choosing Name... | 22.92 | 74 | 0.602094 | 0 | 0 | 0 | 0 | 379 | 0.656846 | 336 | 0.582322 | 173 | 0.299827 |
596512b76ad497342148f69daf0ea980f36bbf49 | 2,384 | py | Python | collectors/nct/collector.py | almeidaah/collectors | f03096855b8d702969d22af0b20a4d6a0d820bd0 | [
"MIT"
] | 17 | 2016-06-28T21:20:21.000Z | 2022-03-02T16:31:25.000Z | collectors/nct/collector.py | almeidaah/collectors | f03096855b8d702969d22af0b20a4d6a0d820bd0 | [
"MIT"
] | 41 | 2016-04-04T10:36:45.000Z | 2017-04-24T10:04:57.000Z | collectors/nct/collector.py | kenferrara/collectors | e6c1f45df3a1ffd5d60dada1816484812eb51417 | [
"MIT"
] | 25 | 2016-05-18T09:27:42.000Z | 2021-03-21T14:44:31.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import zipfile
import logging
import requests
import tempfile
import contextlib
from .parser import parse_record
from .. import base
logger = logg... | 32.657534 | 87 | 0.633389 | 0 | 0 | 264 | 0.110738 | 0 | 0 | 0 | 0 | 451 | 0.189178 |
5968638622036a0684e095d3de7062e4e3ce8115 | 292 | py | Python | bigcode-fetcher/tests/fixtures/__init__.py | sourcery-ai-bot/bigcode-tools | 87aaa609998017d0312b7f4f102d41cc2942fa9d | [
"MIT"
] | 6 | 2017-10-15T08:21:27.000Z | 2018-05-17T12:57:41.000Z | bigcode-fetcher/tests/fixtures/__init__.py | bdqnghi/bigcode-tools | 94ce416fbb40b9b25d49bf88284bf7ccb6132bd3 | [
"MIT"
] | 2 | 2017-12-17T19:02:06.000Z | 2018-03-01T04:00:26.000Z | bigcode-fetcher/tests/fixtures/__init__.py | bdqnghi/bigcode-tools | 94ce416fbb40b9b25d49bf88284bf7ccb6132bd3 | [
"MIT"
] | 2 | 2017-10-18T08:17:54.000Z | 2018-06-28T09:57:36.000Z | from os import path
import json
from bigcode_fetcher.project import Project
FIXTURES_DIR = path.dirname(__file__)
PROJECTS_PATH = path.join(FIXTURES_DIR, "projects.json")
with open(PROJECTS_PATH, "r") as f:
JSON_PROJECTS = json.load(f)
PROJECTS = [Project(p) for p in JSON_PROJECTS]
| 20.857143 | 56 | 0.763699 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.061644 |
59692f082625d38c4980a6276af160523062869b | 1,465 | py | Python | examples/timeflies/timeflies_qt.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-16T09:07:13.000Z | 2018-11-16T09:07:13.000Z | examples/timeflies/timeflies_qt.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | examples/timeflies/timeflies_qt.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-04T11:13:49.000Z | 2021-11-04T11:13:49.000Z | from rx.subjects import Subject
from rx.concurrency import QtScheduler
import sys
try:
from PyQt4 import QtCore
from PyQt4.QtGui import QWidget, QLabel
from PyQt4.QtGui import QApplication
except ImportError:
try:
from PyQt5 import QtCore
from PyQt5.QtWidgets import QApplication, QWidge... | 24.416667 | 77 | 0.647099 | 398 | 0.271672 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.077133 |
5969ba0b61715dcc3c0755544d810b16a9ba7f4b | 6,116 | py | Python | src/contexts/context_local_structure.py | aindrila-ghosh/SmartReduce | b2b28055bc0b269155270c1f8206445e405e8d9b | [
"MIT"
] | null | null | null | src/contexts/context_local_structure.py | aindrila-ghosh/SmartReduce | b2b28055bc0b269155270c1f8206445e405e8d9b | [
"MIT"
] | null | null | null | src/contexts/context_local_structure.py | aindrila-ghosh/SmartReduce | b2b28055bc0b269155270c1f8206445e405e8d9b | [
"MIT"
] | null | null | null |
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import Isomap
from scipy.spatial.distance import pdist
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import cross_val_score, LeaveOneOut
RANDOM_STATE = 42
def calculate_pairwise_distances(df_for_Box_Plot_featu... | 28.985782 | 137 | 0.680347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,557 | 0.418084 |
596ab002529af664473cf2cc0c9a6d46e4922281 | 849 | py | Python | ADAMTR.py | akashsuper2000/codechef-archive | e0e4a7daf66812ab7aa3fe42132c3d067a72457b | [
"bzip2-1.0.6"
] | null | null | null | ADAMTR.py | akashsuper2000/codechef-archive | e0e4a7daf66812ab7aa3fe42132c3d067a72457b | [
"bzip2-1.0.6"
] | null | null | null | ADAMTR.py | akashsuper2000/codechef-archive | e0e4a7daf66812ab7aa3fe42132c3d067a72457b | [
"bzip2-1.0.6"
] | null | null | null | def swap(p,j,k,n):
a = p[j]
b = []
for m in range(n):
b.append(p[m][k])
for m in range(n):
p[m][k] = a[m]
p[j] = b
for i in range(int(input())):
n = int(input())
p,q = [],[]
for j in range(n):
p.append([int(k) for k in input().split()])
for j in range(n):
... | 22.342105 | 54 | 0.366313 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.010601 |
596bbf6cce06d70f6a325d7a5bf75a3e2280c89c | 1,110 | py | Python | hparams.py | TanUkkii007/vqvae | 6ac433490fd827174e5b925780d32bea14bfb097 | [
"MIT"
] | 2 | 2019-03-30T16:49:11.000Z | 2019-12-18T22:50:56.000Z | hparams.py | TanUkkii007/vqvae | 6ac433490fd827174e5b925780d32bea14bfb097 | [
"MIT"
] | null | null | null | hparams.py | TanUkkii007/vqvae | 6ac433490fd827174e5b925780d32bea14bfb097 | [
"MIT"
] | 1 | 2020-01-06T12:37:00.000Z | 2020-01-06T12:37:00.000Z | import tensorflow as tf
default_params = tf.contrib.training.HParams(
# Encoder
encoder_num_hiddens=128,
encoder_num_residual_hiddens=32,
encoder_num_residual_layers=2,
# Decoder
decoder_num_hiddens=128,
decoder_num_residual_hiddens=32,
decoder_num_residual_layers=2,
embedding_di... | 23.617021 | 71 | 0.711712 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.174775 |
596db7d21a1d0b9384a4b3ba2a66f7f8e7dbfeba | 1,080 | py | Python | coroutines.py | PraveenMathew92/python-chatroom-asyncio | 8b3048f17b76e649aff6bcbb7d084362cab32b58 | [
"MIT"
] | null | null | null | coroutines.py | PraveenMathew92/python-chatroom-asyncio | 8b3048f17b76e649aff6bcbb7d084362cab32b58 | [
"MIT"
] | null | null | null | coroutines.py | PraveenMathew92/python-chatroom-asyncio | 8b3048f17b76e649aff6bcbb7d084362cab32b58 | [
"MIT"
] | null | null | null | """
File to demonstrate the coroutines api in python
"""
import asyncio
async def coroutine(caller):
print(f'entering ${caller}')
await asyncio.sleep(1)
print(f'exited {caller}')
"""
asyncio.run takes a coroutine and
A RuntimeWarning is generated if the coroutine is not awaited
Eg: coroutine('withou... | 16.363636 | 76 | 0.694444 | 0 | 0 | 0 | 0 | 0 | 0 | 413 | 0.382407 | 685 | 0.634259 |
5970d34126fb063a7fca4ff450fce1eed6c84c32 | 494 | py | Python | projects/tornado_projects/tord/tord/urls.py | bigfoolliu/liu_aistuff | aa661d37c05c257ee293285dd0868fb7e8227628 | [
"MIT"
] | 1 | 2019-11-25T07:23:42.000Z | 2019-11-25T07:23:42.000Z | projects/tornado_projects/tord/tord/urls.py | bigfoolliu/liu_aistuff | aa661d37c05c257ee293285dd0868fb7e8227628 | [
"MIT"
] | 13 | 2020-01-07T16:09:47.000Z | 2022-03-02T12:51:44.000Z | projects/tornado_projects/tord/tord/urls.py | bigfoolliu/liu_aistuff | aa661d37c05c257ee293285dd0868fb7e8227628 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# author: bigfoolliu
from tord.handlers import (block_test, gocron, index, media, upload)
url_patterns = [
(r"/", index.IndexHandler),
(r"/books", upload.BooksHandler),
(r"/images", media.ImageHandler),
(r"/videos", media.VideoHandler),
# (r"/async/t... | 26 | 68 | 0.629555 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.435223 |
597101821b26dde66f369e5d6c9ba4029fcb1428 | 140 | py | Python | util/emojis.py | Lithimlin/TeaWaiter | fef8d6ef19b8bd10fcd48a2bb320f6cda3ac7156 | [
"MIT"
] | null | null | null | util/emojis.py | Lithimlin/TeaWaiter | fef8d6ef19b8bd10fcd48a2bb320f6cda3ac7156 | [
"MIT"
] | null | null | null | util/emojis.py | Lithimlin/TeaWaiter | fef8d6ef19b8bd10fcd48a2bb320f6cda3ac7156 | [
"MIT"
] | null | null | null | statusEmojis = {'yes':'✅', 'no':'❌'}
numEmojis = {1:'1️⃣', 2:'2️⃣', 3:'3️⃣', 4:'4️⃣', 5:'5️⃣', 6:'6️⃣', 7:'7️⃣', 8:'8️⃣', 9:'9️⃣', 0:'0️⃣'}
| 46.666667 | 102 | 0.328571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.592391 |
59728e393c4e17abe11271bfcc3dd74f28baee1f | 28 | py | Python | platehunter/platehunter/module/__init__.py | ZombieIce/A-Stock-Plate-Crawling | e0478c720513876562ebe2a48b9f3131dad63e47 | [
"MIT"
] | 20 | 2018-10-09T18:53:01.000Z | 2022-02-20T13:26:43.000Z | platehunter/platehunter/module/__init__.py | ZombieIce/A-Stock-Plate-Crawling | e0478c720513876562ebe2a48b9f3131dad63e47 | [
"MIT"
] | 36 | 2018-09-20T19:27:54.000Z | 2022-01-23T14:41:39.000Z | insta_hashtag_crawler/__init__.py | point1304/insta-hashtag-crawler | ee056f91d14e19404335fcc49360942acc2e15e8 | [
"MIT"
] | 6 | 2021-09-25T14:03:57.000Z | 2022-03-19T14:44:04.000Z | from .crawler import Crawler | 28 | 28 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5972ea55ea758af92089d41c09629539cc06ea40 | 12,048 | py | Python | test/test_subprocess.py | python-useful-helpers/exec-helpers | 3e0adfa7dded72ac1c9c93bd88db070f4c9050b6 | [
"Apache-2.0"
] | 12 | 2018-03-23T23:37:40.000Z | 2021-07-16T16:07:28.000Z | test/test_subprocess.py | penguinolog/exec-helpers | 0784a4772f6e9937540b266fdbb1f5a060fd4b76 | [
"Apache-2.0"
] | 111 | 2018-03-26T14:10:52.000Z | 2021-07-12T07:12:45.000Z | test/test_subprocess.py | penguinolog/exec-helpers | 0784a4772f6e9937540b266fdbb1f5a060fd4b76 | [
"Apache-2.0"
] | 6 | 2018-03-26T13:37:21.000Z | 2018-09-07T03:35:09.000Z | # Copyright 2018 - 2020 Alexey Stepanov aka penguinolog.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 34.820809 | 117 | 0.664011 | 451 | 0.037403 | 140 | 0.011611 | 1,693 | 0.140405 | 0 | 0 | 2,644 | 0.219274 |
59733ab215ceaed85b6503b5568828c87eda4e73 | 1,943 | py | Python | Code/v1.0/message.py | arik-le/Chips-Bits | fa343ea79f13ce3172292871cebd1144b2c3c1c5 | [
"MIT"
] | 4 | 2017-11-06T15:12:07.000Z | 2020-12-20T13:44:05.000Z | Code/v1.0/message.py | arik-le/Chips-Bits | fa343ea79f13ce3172292871cebd1144b2c3c1c5 | [
"MIT"
] | 36 | 2017-11-03T12:07:40.000Z | 2018-06-22T11:59:59.000Z | Code/v1.0/message.py | arik-le/Chips-Bits | fa343ea79f13ce3172292871cebd1144b2c3c1c5 | [
"MIT"
] | null | null | null | import pickle
import os
from constant_variable import *
# class Message
class Message:
def __init__(self,device, id, type, body): # constructor
# message will consist: type of message,content - body,device to send
self.id = id
self.type = type
self.body = body
self.device ... | 26.616438 | 77 | 0.65054 | 676 | 0.347916 | 0 | 0 | 0 | 0 | 0 | 0 | 391 | 0.201235 |
597345ee49817e67d67ebede702d14893a6e8c4d | 4,732 | py | Python | Lib/featureMan/familyFeatures.py | typoman/featureman | f115ea8d3faae042845cfca9502d91da88405c68 | [
"MIT"
] | 13 | 2019-07-21T14:00:49.000Z | 2019-07-29T21:43:03.000Z | Lib/featureMan/familyFeatures.py | typoman/featureman | f115ea8d3faae042845cfca9502d91da88405c68 | [
"MIT"
] | 1 | 2019-07-28T12:06:23.000Z | 2019-07-28T12:06:23.000Z | Lib/featureMan/familyFeatures.py | typoman/featureman | f115ea8d3faae042845cfca9502d91da88405c68 | [
"MIT"
] | null | null | null | from featureMan.otSingleSubFeatures import *
from featureMan.otNumberFeatures import *
from featureMan.otLanguages import *
from featureMan.otLocalized import *
from featureMan.otLigatureFeatures import *
from featureMan.otMark import mark
from featureMan.otSyntax import fontDic, GDEF
from featureMan.otKern import kern... | 40.793103 | 391 | 0.674134 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,137 | 0.240279 |
5975a408ae1c989c338845f71aa3900205bb24fd | 15,265 | py | Python | FFSP/FFSP_MatNet/FFSPModel.py | MinahPark/MatNet | 63342de76f6a982bdfb5c1e8d5930d64ec3efa61 | [
"MIT"
] | 18 | 2021-11-22T09:37:52.000Z | 2022-03-31T03:48:00.000Z | FFSP/FFSP_MatNet/FFSPModel.py | MinahPark/MatNet | 63342de76f6a982bdfb5c1e8d5930d64ec3efa61 | [
"MIT"
] | 1 | 2021-12-04T05:14:26.000Z | 2021-12-14T03:04:55.000Z | FFSP/FFSP_MatNet/FFSPModel.py | MinahPark/MatNet | 63342de76f6a982bdfb5c1e8d5930d64ec3efa61 | [
"MIT"
] | 5 | 2021-12-15T01:56:02.000Z | 2022-03-07T13:13:05.000Z |
"""
The MIT License
Copyright (c) 2021 MatNet
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... | 39.141026 | 123 | 0.648411 | 13,333 | 0.873436 | 0 | 0 | 0 | 0 | 0 | 0 | 4,495 | 0.294464 |
5975bf51cf6b40314443cbac07c50fa49c107d36 | 1,697 | py | Python | compose.py | lvyufeng/mindspore_poems | 2f46afa290a8065cd1c774c26a96be76da30873e | [
"MIT"
] | null | null | null | compose.py | lvyufeng/mindspore_poems | 2f46afa290a8065cd1c774c26a96be76da30873e | [
"MIT"
] | null | null | null | compose.py | lvyufeng/mindspore_poems | 2f46afa290a8065cd1c774c26a96be76da30873e | [
"MIT"
] | null | null | null | import os
import numpy as np
import mindspore
from mindspore import Tensor
from mindspore import load_checkpoint, load_param_into_net
from src.model import RNNModel, RNNModelInfer
from src.utils import process_poems
start_token = 'B'
end_token = 'E'
model_dir = './ckpt/'
corpus_file = './data/poems.txt'
def to_word(p... | 30.303571 | 83 | 0.669417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 184 | 0.10679 |
5976b5eadcdfa649651a6db9b9bd714639c5b347 | 1,523 | py | Python | pychemia/core/from_file.py | petavazohi/PyChemia | e779389418771c25c830aed360773c63bb069372 | [
"MIT"
] | 67 | 2015-01-31T07:44:55.000Z | 2022-03-21T21:43:34.000Z | pychemia/core/from_file.py | petavazohi/PyChemia | e779389418771c25c830aed360773c63bb069372 | [
"MIT"
] | 13 | 2016-06-03T19:07:51.000Z | 2022-03-31T04:20:40.000Z | pychemia/core/from_file.py | petavazohi/PyChemia | e779389418771c25c830aed360773c63bb069372 | [
"MIT"
] | 37 | 2015-01-22T15:37:23.000Z | 2022-03-21T15:38:10.000Z | import os
import sys
from pychemia import HAS_PYMATGEN, pcm_log
from .structure import Structure
from pychemia.code.vasp import read_poscar
from pychemia.code.abinit import AbinitInput
def structure_from_file(structure_file):
"""
Attempts to reconstruct a PyChemia Structure from the contents of any given file... | 37.146341 | 99 | 0.692055 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 443 | 0.290682 |
59792e136f9480b5e034aa6d01981255bd1bfdd7 | 992 | py | Python | snptools/vc_matrix.py | pvanheus/variant_exploration_with_tralynca | 4ffadc29c19d68909beed2254646e36513311847 | [
"MIT"
] | null | null | null | snptools/vc_matrix.py | pvanheus/variant_exploration_with_tralynca | 4ffadc29c19d68909beed2254646e36513311847 | [
"MIT"
] | null | null | null | snptools/vc_matrix.py | pvanheus/variant_exploration_with_tralynca | 4ffadc29c19d68909beed2254646e36513311847 | [
"MIT"
] | null | null | null |
from os import listdir
import os.path
import pandas as pd
from .count_variants_per_gene import process_vcf
from .genetree import make_gene_tree
def make_variant_count_matrix(input_directory, output_filename):
gene_tree = make_gene_tree()
locus_names = sorted([ interval.data['locus'] for interval in gene_tree ... | 41.333333 | 93 | 0.676411 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.040323 |
5979cf5bed5000445a52e27786a6829f4458f888 | 481 | py | Python | oarepo_records_draft/merge.py | oarepo/invenio-records-draft | 6d77309996c58fde7731e5f182e9cd5400f81f14 | [
"MIT"
] | 1 | 2020-06-03T14:44:49.000Z | 2020-06-03T14:44:49.000Z | oarepo_records_draft/merge.py | oarepo/invenio-records-draft | 6d77309996c58fde7731e5f182e9cd5400f81f14 | [
"MIT"
] | 7 | 2020-06-02T14:45:48.000Z | 2021-11-16T08:38:47.000Z | oarepo_records_draft/merge.py | oarepo/invenio-records-draft | 6d77309996c58fde7731e5f182e9cd5400f81f14 | [
"MIT"
] | 1 | 2019-08-15T07:59:48.000Z | 2019-08-15T07:59:48.000Z | from deepmerge import Merger
def list_merge(config, path, base, nxt):
for k in range(0, min(len(base), len(nxt))):
if isinstance(base[k], (dict, list, tuple)):
draft_merger.merge(base[k], nxt[k])
else:
base[k] = nxt[k]
for k in range(len(base), len(nxt)):
base.a... | 20.913043 | 52 | 0.534304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.056133 |
597bfa5b6f7cdb21349ef3d1cce73227ae2c86fc | 4,951 | py | Python | source/01_make_coordinates/make_coordinates.py | toshi-k/kaggle-airbus-ship-detection-challenge | 872a160057592022488b1772b6c7a8982677d1dc | [
"Apache-2.0"
] | 90 | 2018-11-17T21:37:41.000Z | 2021-11-24T11:55:34.000Z | source/01_make_coordinates/make_coordinates.py | jackweiwang/kaggle-airbus-ship-detection-challenge | 872a160057592022488b1772b6c7a8982677d1dc | [
"Apache-2.0"
] | 3 | 2018-11-27T14:23:15.000Z | 2020-03-09T09:23:25.000Z | source/01_make_coordinates/make_coordinates.py | jackweiwang/kaggle-airbus-ship-detection-challenge | 872a160057592022488b1772b6c7a8982677d1dc | [
"Apache-2.0"
] | 14 | 2018-11-17T21:37:44.000Z | 2020-11-30T02:22:28.000Z | import os
import numpy as np
import pandas as pd
from tqdm import tqdm
from PIL import Image
from lib.img2_coord_ica import img2_coord_iter, coord2_img
from lib.log import Logger
# ref: https://www.kaggle.com/paulorzp/run-length-encode-and-decode
def rle_decode(mask_rle, shape=(768, 768)):
"""
Args:
... | 30.006061 | 119 | 0.626338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 769 | 0.155322 |
597ddcf7272429172b7edee0cb03c0de356cd799 | 127 | py | Python | tests/test_main.py | skypaw/rconcrete | 30bc7e5ada2afa975caabcd38461707e094d695b | [
"MIT"
] | null | null | null | tests/test_main.py | skypaw/rconcrete | 30bc7e5ada2afa975caabcd38461707e094d695b | [
"MIT"
] | 2 | 2022-02-05T18:49:44.000Z | 2022-02-06T01:11:07.000Z | tests/test_main.py | skypaw/rconcrete | 30bc7e5ada2afa975caabcd38461707e094d695b | [
"MIT"
] | null | null | null | from src.main import sample_function
def test_addition():
test = sample_function(4)
print('test')
assert 8 == test | 21.166667 | 36 | 0.692913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.047244 |
597e7da85300fb6bd6d365c07bb2ba1dbac55565 | 1,598 | py | Python | scripts/combine_errors.py | nbren12/nn_atmos_param | cb138f0b211fd5743e56ad659aec38c082d2b3ac | [
"MIT"
] | 4 | 2018-09-16T20:55:57.000Z | 2020-12-06T11:27:50.000Z | scripts/combine_errors.py | nbren12/nn_atmos_param | cb138f0b211fd5743e56ad659aec38c082d2b3ac | [
"MIT"
] | 5 | 2018-04-07T07:40:39.000Z | 2018-06-20T06:56:08.000Z | scripts/combine_errors.py | nbren12/nn_atmos_param | cb138f0b211fd5743e56ad659aec38c082d2b3ac | [
"MIT"
] | null | null | null | import numpy as np
import re
import json
import xarray as xr
import pandas as pd
def read_train_loss(epoch, fname,
variables=['test_loss', 'train_loss']):
"""Read the loss.json file for the current epochs test and train loss"""
df = pd.read_json(fname)
epoch_means = df.groupby('epoch')... | 30.150943 | 90 | 0.627034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.335419 |
59801917a885910b96ef72a02bd5c83398abe7ef | 705 | py | Python | tests/acceptance/selene_collection_should_test.py | KalinkinaMaria/selene | 859e1102c85740b52af8d0f08dd6b6490b4bd2ff | [
"MIT"
] | null | null | null | tests/acceptance/selene_collection_should_test.py | KalinkinaMaria/selene | 859e1102c85740b52af8d0f08dd6b6490b4bd2ff | [
"MIT"
] | 1 | 2021-06-02T04:21:17.000Z | 2021-06-02T04:21:17.000Z | tests/acceptance/selene_collection_should_test.py | vkarpenko/selene | 4776357430c940be38f38be9981006dd156f9730 | [
"MIT"
] | null | null | null | import pytest
from selenium.common.exceptions import TimeoutException
from selene.browser import *
from selene.support.conditions import have
from selene.support.jquery_style_selectors import ss
from tests.acceptance.helpers.helper import get_test_driver
from tests.acceptance.helpers.todomvc import given_active
def ... | 25.178571 | 77 | 0.741844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.079433 |
5980640bb02c2631ecc30d2c519d9ed76e0a3bab | 2,422 | py | Python | genomics_data_index/test/unit/variant/service/test_SQLQueryInBatcher.py | apetkau/genomics-data-index | d0cc119fd57b8cbd701affb1c84450cf7832fa01 | [
"Apache-2.0"
] | 12 | 2021-05-03T20:56:05.000Z | 2022-01-04T14:52:19.000Z | genomics_data_index/test/unit/variant/service/test_SQLQueryInBatcher.py | apetkau/thesis-index | 6c96e9ed75d8e661437effe62a939727a0b473fc | [
"Apache-2.0"
] | 30 | 2021-04-26T23:03:40.000Z | 2022-02-25T18:41:14.000Z | genomics_data_index/test/unit/variant/service/test_SQLQueryInBatcher.py | apetkau/genomics-data-index | d0cc119fd57b8cbd701affb1c84450cf7832fa01 | [
"Apache-2.0"
] | null | null | null | from genomics_data_index.storage.service import SQLQueryInBatcherDict, SQLQueryInBatcherList
def test_sql_query_in_batcher_dict():
in_data = ['A', 'B', 'C', 'D', 'E']
# Test batch size 1
batcher = SQLQueryInBatcherDict(in_data=in_data, batch_size=1)
results = batcher.process(lambda in_batch: {x: True... | 36.69697 | 92 | 0.676301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.099917 |
59807967b291bcc22ce0c7c760cacd407b042fe9 | 609 | py | Python | tipico_server/utils/constants.py | lbusoni/tipico_server | 390e1ad8ca6a56ac14cebc1f9c50c9cb5803e287 | [
"MIT"
] | null | null | null | tipico_server/utils/constants.py | lbusoni/tipico_server | 390e1ad8ca6a56ac14cebc1f9c50c9cb5803e287 | [
"MIT"
] | null | null | null | tipico_server/utils/constants.py | lbusoni/tipico_server | 390e1ad8ca6a56ac14cebc1f9c50c9cb5803e287 | [
"MIT"
] | null | null | null |
class Constants:
METER_2_NANOMETER= 1e9
APP_NAME= "inaf.arcetri.ao.tipico_server"
APP_AUTHOR= "INAF Arcetri Adaptive Optics"
THIS_PACKAGE= 'tipico_server'
PROCESS_MONITOR_CONFIG_SECTION= 'processMonitor'
SERVER_1_CONFIG_SECTION= 'serverOfAnInstrument'
SERVER_2_CONFIG_SECTION= 'serverOfAn... | 30.45 | 59 | 0.775041 | 605 | 0.993432 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.449918 |
5980a13b88db20b5e773819c926a4981f53bb21e | 1,611 | py | Python | mu.py | cool2645/shadowsocksrr | 0a594857f4c3125ab14d27d7fd8143291b7c9fee | [
"Apache-2.0"
] | 2 | 2018-05-14T10:41:38.000Z | 2020-05-22T12:40:57.000Z | mu.py | cool2645/shadowsocksrr | 0a594857f4c3125ab14d27d7fd8143291b7c9fee | [
"Apache-2.0"
] | null | null | null | mu.py | cool2645/shadowsocksrr | 0a594857f4c3125ab14d27d7fd8143291b7c9fee | [
"Apache-2.0"
] | 1 | 2018-09-22T16:15:14.000Z | 2018-09-22T16:15:14.000Z | import db_transfer
import config
import logging
from musdk.client import Client
class MuApiTransfer(db_transfer.TransferBase):
client = None
users = []
def __init__(self):
super(MuApiTransfer, self).__init__()
self.pull_ok = False
self.port_uid_table = {}
self.init_mu_clie... | 28.767857 | 76 | 0.590937 | 1,528 | 0.948479 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.052142 |
598126ffcc8da7b8ff9a91f8f601f2ef5306a660 | 2,001 | py | Python | tests/test_json.py | NyntoFive/data_extractor | 965e12570d6b7549aa2f8b3bd1951e06b010c444 | [
"MIT"
] | null | null | null | tests/test_json.py | NyntoFive/data_extractor | 965e12570d6b7549aa2f8b3bd1951e06b010c444 | [
"MIT"
] | null | null | null | tests/test_json.py | NyntoFive/data_extractor | 965e12570d6b7549aa2f8b3bd1951e06b010c444 | [
"MIT"
] | null | null | null | # Standard Library
import json
# Third Party Library
import pytest
from jsonpath_rw.lexer import JsonPathLexerError
# First Party Library
from data_extractor.exceptions import ExprError, ExtractError
from data_extractor.json import JSONExtractor
@pytest.fixture(scope="module")
def text():
return """
{
... | 23.267442 | 82 | 0.590705 | 0 | 0 | 0 | 0 | 1,734 | 0.866567 | 0 | 0 | 487 | 0.243378 |
59814b4554d683700762543937d73f8de4e2078a | 938 | py | Python | demo/predictions/visualize.py | qixuxiang/maskrcnn_tianchi_stage2 | 52023b64268dc91f0b5b9f085203ab00a542458a | [
"MIT"
] | null | null | null | demo/predictions/visualize.py | qixuxiang/maskrcnn_tianchi_stage2 | 52023b64268dc91f0b5b9f085203ab00a542458a | [
"MIT"
] | null | null | null | demo/predictions/visualize.py | qixuxiang/maskrcnn_tianchi_stage2 | 52023b64268dc91f0b5b9f085203ab00a542458a | [
"MIT"
] | null | null | null | import numpy as np
from PIL import Image
import os
npy_file1 = './prediction/1110_1.npy'
npy_file2 = './prediction/1110_2.npy'
npy_file3 = './prediction/1110_3.npy'
npy_file4 = './prediction/1110_4.npy'
npy_file5 = './prediction/1110_5.npy'
arr1 = np.load(npy_file1)
arr2 = np.load(npy_file2)
arr3 = np.load(npy_file3)... | 26.055556 | 41 | 0.715352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.266525 |
59821d30d6e5bb63ead4e418643ab63f3b0a5f6b | 1,125 | py | Python | examples/gbdt_classifier_example.py | tushushu/Imilu | 121c79574d3e6ca35b569dd58661175e5c3668e2 | [
"Apache-2.0"
] | 407 | 2018-08-22T05:58:33.000Z | 2022-03-31T11:44:48.000Z | examples/gbdt_classifier_example.py | tushushu/Imilu | 121c79574d3e6ca35b569dd58661175e5c3668e2 | [
"Apache-2.0"
] | 9 | 2018-11-07T07:44:02.000Z | 2021-12-10T11:59:47.000Z | examples/gbdt_classifier_example.py | tushushu/Imilu | 121c79574d3e6ca35b569dd58661175e5c3668e2 | [
"Apache-2.0"
] | 286 | 2018-08-22T08:00:19.000Z | 2022-03-30T00:59:20.000Z | # -*- coding: utf-8 -*-
"""
@Author: tushushu
@Date: 2018-08-21 14:33:11
@Last Modified by: tushushu
@Last Modified time: 2019-05-22 15:41:11
"""
import os
os.chdir(os.path.split(os.path.realpath(__file__))[0])
import sys
sys.path.append(os.path.abspath(".."))
from imylu.ensemble.gbdt_classifier import GradientBoos... | 28.846154 | 99 | 0.731556 | 0 | 0 | 0 | 0 | 580 | 0.515556 | 0 | 0 | 336 | 0.298667 |
5985441293e6489af243c2cd16aa10e62e49c056 | 16,658 | py | Python | gamestonk_terminal/cryptocurrency/due_diligence/pycoingecko_view.py | clairvoyant/GamestonkTerminal | 7b40cfe61b32782e36f5de8a08d075532a08c294 | [
"MIT"
] | null | null | null | gamestonk_terminal/cryptocurrency/due_diligence/pycoingecko_view.py | clairvoyant/GamestonkTerminal | 7b40cfe61b32782e36f5de8a08d075532a08c294 | [
"MIT"
] | null | null | null | gamestonk_terminal/cryptocurrency/due_diligence/pycoingecko_view.py | clairvoyant/GamestonkTerminal | 7b40cfe61b32782e36f5de8a08d075532a08c294 | [
"MIT"
] | null | null | null | """CoinGecko view"""
__docformat__ = "numpy"
import argparse
from typing import List, Tuple
import pandas as pd
from pandas.plotting import register_matplotlib_converters
import matplotlib.pyplot as plt
from tabulate import tabulate
import mplfinance as mpf
from gamestonk_terminal.helper_funcs import (
parse_know... | 27.308197 | 117 | 0.551327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,541 | 0.392664 |
5985716e3511f569993e2ea970c450df3042b443 | 701 | py | Python | source/loaders/tploaders.py | rodsom22/gcn_refinement | b1b76811b145a2fa7e595cc6d131d75c0553d5a3 | [
"MIT"
] | 24 | 2020-05-04T20:24:35.000Z | 2022-03-21T07:57:02.000Z | source/loaders/tploaders.py | rodsom22/gcn_refinement | b1b76811b145a2fa7e595cc6d131d75c0553d5a3 | [
"MIT"
] | 3 | 2020-09-02T15:54:10.000Z | 2021-05-27T03:09:31.000Z | source/loaders/tploaders.py | rodsom22/gcn_refinement | b1b76811b145a2fa7e595cc6d131d75c0553d5a3 | [
"MIT"
] | 6 | 2020-08-03T21:01:37.000Z | 2021-02-04T02:24:46.000Z | """
Data loaders based on tensorpack
"""
import numpy as np
from utilities import nparrays as arrtools
def get_pancreas_generator(sample_name, volumes_path, references_path):
sample_vol_name = volumes_path + sample_name[0]
reference_vol_name = references_path + sample_name[1]
volume = np.load(sample_vol... | 29.208333 | 71 | 0.706134 | 0 | 0 | 594 | 0.847361 | 0 | 0 | 0 | 0 | 40 | 0.057061 |
5986324fbdcbaeae05e084715dcadf5d8b4991a3 | 1,199 | py | Python | app/stages/management/commands/import_stages_from_csv.py | guilloulouis/stage_medecine | 7ec9067402e510d812a375bbfe46f2ab545587f9 | [
"MIT"
] | null | null | null | app/stages/management/commands/import_stages_from_csv.py | guilloulouis/stage_medecine | 7ec9067402e510d812a375bbfe46f2ab545587f9 | [
"MIT"
] | null | null | null | app/stages/management/commands/import_stages_from_csv.py | guilloulouis/stage_medecine | 7ec9067402e510d812a375bbfe46f2ab545587f9 | [
"MIT"
] | 1 | 2021-04-30T16:38:19.000Z | 2021-04-30T16:38:19.000Z | # from django.core.management import BaseCommand
# import pandas as pd
#
# from stages.models import Category, Stage
#
#
# class Command(BaseCommand):
# help = 'Import a list of stage in the database'
#
# def add_arguments(self, parser):
# super(Command, self).add_arguments(parser)
# parser.add_... | 37.46875 | 113 | 0.584654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,168 | 0.974145 |
5986b5465c4c37fe33e19dc8df090df96c8f030d | 3,137 | py | Python | deep_learning/dl.py | remix-yh/moneycount | e8f35549ef96b8ebe6ca56417f0833f519179173 | [
"MIT"
] | null | null | null | deep_learning/dl.py | remix-yh/moneycount | e8f35549ef96b8ebe6ca56417f0833f519179173 | [
"MIT"
] | 7 | 2020-09-26T00:46:23.000Z | 2022-02-10T01:08:15.000Z | deep_learning/dl.py | remix-yh/moneycount | e8f35549ef96b8ebe6ca56417f0833f519179173 | [
"MIT"
] | null | null | null | import os
import io
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.backends.backend_agg import FigureCanvasAgg
from matplotlib.figure import Figure
from keras.applications.imagenet_utils import preprocess_input
from keras.backend.tensorflow_backend import set_session
from kera... | 31.37 | 95 | 0.667198 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.072362 |
598893a66d83b9b4e168cfcddf559998286b638d | 469 | py | Python | statping/exceptions.py | danielpalstra/pystatping | eb6325229d45cd452528007b440ca545bacc3e04 | [
"Apache-2.0"
] | null | null | null | statping/exceptions.py | danielpalstra/pystatping | eb6325229d45cd452528007b440ca545bacc3e04 | [
"Apache-2.0"
] | null | null | null | statping/exceptions.py | danielpalstra/pystatping | eb6325229d45cd452528007b440ca545bacc3e04 | [
"Apache-2.0"
] | null | null | null | class BaseExceptions(Exception):
pass
class AuthException(BaseException):
"""Raised when an api method requires authentication"""
pass
class DeleteException(BaseException):
"""Raised when the delete of an object fails"""
pass
class UpsertException(BaseException):
"""Raised when the combi... | 17.37037 | 59 | 0.714286 | 456 | 0.972281 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.441365 |
598974722569cb3c84cf300f7c787f22839c151a | 2,255 | py | Python | authors/tests/test_article_filters.py | andela/ah-backend-odin | 0e9ef1a10c8a3f6736999a5111736f7bd7236689 | [
"BSD-3-Clause"
] | null | null | null | authors/tests/test_article_filters.py | andela/ah-backend-odin | 0e9ef1a10c8a3f6736999a5111736f7bd7236689 | [
"BSD-3-Clause"
] | 43 | 2018-10-25T10:14:52.000Z | 2022-03-11T23:33:46.000Z | authors/tests/test_article_filters.py | andela/ah-backend-odin | 0e9ef1a10c8a3f6736999a5111736f7bd7236689 | [
"BSD-3-Clause"
] | 4 | 2018-10-29T07:04:58.000Z | 2020-04-02T14:15:10.000Z | from . import BaseAPITestCase
class TestArticleFilters(BaseAPITestCase):
def setUp(self):
super().setUp()
self.authenticate()
def test_it_filters_articles_by_article_title(self):
self.create_article()
self.create_article(title="Some article with another title")
respo... | 36.370968 | 75 | 0.640355 | 2,222 | 0.985366 | 0 | 0 | 0 | 0 | 0 | 0 | 541 | 0.239911 |
598d5551f035952fc6ef820f0bbd414d1bb129f0 | 720 | py | Python | myexporter/tcpexporter.py | abh15/flower | 7e1ab9393e0494f23df65bfa4f858cc35fea290e | [
"Apache-2.0"
] | null | null | null | myexporter/tcpexporter.py | abh15/flower | 7e1ab9393e0494f23df65bfa4f858cc35fea290e | [
"Apache-2.0"
] | null | null | null | myexporter/tcpexporter.py | abh15/flower | 7e1ab9393e0494f23df65bfa4f858cc35fea290e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import subprocess
import time
from prometheus_client import start_http_server, Gauge
def getstat():
s=subprocess.getoutput('ss -i -at \'( dport = :x11 or sport = :x11 )\' | awk \'FNR == 3 { print $4}\'')
if s == "":
return(0.0,"")
else:
rtt=s.lstrip("rtt:")
r=rtt.... | 32.727273 | 112 | 0.590278 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 0.340278 |
598f144f73e5a69e09521df868c498cc54751d48 | 516 | py | Python | tests/features/steps/roman.py | TestowanieAutomatyczneUG/laboratorium_14-maciejSzcz | b92186c574d3f21acd9f3e913e1a8ddcb5ec81fd | [
"MIT"
] | null | null | null | tests/features/steps/roman.py | TestowanieAutomatyczneUG/laboratorium_14-maciejSzcz | b92186c574d3f21acd9f3e913e1a8ddcb5ec81fd | [
"MIT"
] | null | null | null | tests/features/steps/roman.py | TestowanieAutomatyczneUG/laboratorium_14-maciejSzcz | b92186c574d3f21acd9f3e913e1a8ddcb5ec81fd | [
"MIT"
] | null | null | null | from behave import *
use_step_matcher("re")
@given("user inputs (?P<number>.+) and (?P<guess>.+)")
def step_impl(context, number, guess):
context.number = int(number)
context.user_guess = guess
@when("we run the converter")
def step_impl(context):
try:
context.res = context.roman.check_guess(con... | 24.571429 | 83 | 0.672481 | 0 | 0 | 0 | 0 | 463 | 0.897287 | 0 | 0 | 108 | 0.209302 |
599099e8cbd4ce7be2457cb90f171f8cb872d8d1 | 1,266 | py | Python | main.py | AbirLOUARD/AspiRobot | 0ea78bfd7c20f1371c01a0e912f5e92bed6648b7 | [
"MIT"
] | 1 | 2022-03-31T18:37:11.000Z | 2022-03-31T18:37:11.000Z | main.py | AbirLOUARD/AspiRobot | 0ea78bfd7c20f1371c01a0e912f5e92bed6648b7 | [
"MIT"
] | null | null | null | main.py | AbirLOUARD/AspiRobot | 0ea78bfd7c20f1371c01a0e912f5e92bed6648b7 | [
"MIT"
] | null | null | null | import functions
import Aspirobot
import time
import os
import Manoir
import Capteur
import Etat
import threading
import Case
from threading import Thread
manor_size = 5
gameIsRunning = True
clearConsole = lambda: os.system('cls' if os.name in ('nt', 'dos') else 'clear')
manoir = Manoir.Manoir(manor_size, manor_size... | 21.827586 | 80 | 0.691153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 442 | 0.349131 |
599104a205da723279b528df24bd43e2dcb5bdbb | 1,169 | py | Python | docs/src/newsgroups_data.py | vishalbelsare/RLScore | 713f0a402f7a09e41a609f2ddcaf849b2021a0a7 | [
"MIT"
] | 61 | 2015-03-06T08:48:01.000Z | 2021-04-26T16:13:07.000Z | docs/src/newsgroups_data.py | andrecamara/RLScore | 713f0a402f7a09e41a609f2ddcaf849b2021a0a7 | [
"MIT"
] | 5 | 2016-09-08T15:47:00.000Z | 2019-02-25T17:44:55.000Z | docs/src/newsgroups_data.py | vishalbelsare/RLScore | 713f0a402f7a09e41a609f2ddcaf849b2021a0a7 | [
"MIT"
] | 31 | 2015-01-28T15:05:33.000Z | 2021-04-16T19:39:48.000Z | import numpy as np
from scipy import sparse as sp
from rlscore.utilities import multiclass
def load_newsgroups():
T = np.loadtxt("train.data")
#map indices from 1...n to 0...n-1
rows = T[:,0] -1
cols = T[:,1] -1
vals = T[:,2]
X_train = sp.coo_matrix((vals, (rows, cols)))
X_train = X_train.... | 30.763158 | 58 | 0.638152 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.215569 |
59945bb43aee8c097a1605b49beb38bfd751d29b | 25 | py | Python | 1795.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 6 | 2021-04-13T00:33:43.000Z | 2022-02-10T10:23:59.000Z | 1795.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | null | null | null | 1795.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 3 | 2021-03-23T18:42:24.000Z | 2022-02-10T10:24:07.000Z | print(3 ** int(input()))
| 12.5 | 24 | 0.56 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
59962bcd6324fb181e2aeed2776a6d4ee13fa678 | 1,245 | py | Python | 5hours/14_dictionaries.py | matiasmasca/python | 7631583820d51e3132bdb793fed28cc83f4877a2 | [
"MIT"
] | null | null | null | 5hours/14_dictionaries.py | matiasmasca/python | 7631583820d51e3132bdb793fed28cc83f4877a2 | [
"MIT"
] | null | null | null | 5hours/14_dictionaries.py | matiasmasca/python | 7631583820d51e3132bdb793fed28cc83f4877a2 | [
"MIT"
] | null | null | null | # como los hash de ruby, guarda "clave" "valor"
# al igual que un diccionario, esta la Palabra, que es la clave y la definción que seria el valor.
# las claves tienen que ser unicas
nombre_de_diccionario = {} #curly brackets.
monthConversions = {
"Jan": "January",
"Feb": "February",
"Mar": "March",
"Apr": "A... | 23.055556 | 98 | 0.654618 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 777 | 0.623596 |
599682564ad210bc55f3314403d4b2babc14038c | 578 | py | Python | tests/unit/test_runner.py | mariocj89/dothub | bcfdcc5a076e48a73c4e0827c56431522e4cc4ba | [
"MIT"
] | 12 | 2017-05-30T12:46:41.000Z | 2019-08-18T18:55:43.000Z | tests/unit/test_runner.py | mariocj89/dothub | bcfdcc5a076e48a73c4e0827c56431522e4cc4ba | [
"MIT"
] | 30 | 2017-07-10T19:28:35.000Z | 2021-11-22T11:09:25.000Z | tests/unit/test_runner.py | Mariocj89/dothub | bcfdcc5a076e48a73c4e0827c56431522e4cc4ba | [
"MIT"
] | 1 | 2017-08-02T21:04:43.000Z | 2017-08-02T21:04:43.000Z | from click.testing import CliRunner
from dothub.cli import dothub
base_args = ["--user=xxx", "--token=yyy"]
def test_dothub_help():
runner = CliRunner()
result = runner.invoke(dothub, ['--help'], obj={})
assert result.exit_code == 0
def test_dothub_pull_help():
runner = CliRunner()
result = ru... | 23.12 | 74 | 0.652249 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.105536 |
5997a4ecb7f8086a5d0b295c0471521ff04b54f7 | 6,985 | py | Python | graph/__init__.py | worldwise001/stylometry | b5a4cc98fb8dfb6d1600d41bb15c96aeaf4ecb72 | [
"MIT"
] | 14 | 2015-02-24T16:14:07.000Z | 2022-02-19T21:49:55.000Z | graph/__init__.py | worldwise001/stylometry | b5a4cc98fb8dfb6d1600d41bb15c96aeaf4ecb72 | [
"MIT"
] | 1 | 2015-02-25T09:45:13.000Z | 2015-02-25T09:45:13.000Z | graph/__init__.py | worldwise001/stylometry | b5a4cc98fb8dfb6d1600d41bb15c96aeaf4ecb72 | [
"MIT"
] | 4 | 2015-11-20T10:47:11.000Z | 2021-03-30T13:14:20.000Z | import matplotlib
matplotlib.use('Agg')
import statsmodels.api as sm
import statsmodels.formula.api as smf
import numpy as np
from scipy.stats import linregress
import matplotlib.pyplot as plt
from sklearn.metrics import roc_curve, auc
def hist_prebin(filename, values, width=1, x_title='', y_title='', title=None):
... | 30.502183 | 100 | 0.591553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 714 | 0.102219 |
59987eb32850dcd0908c67453364b8a38745fe6e | 68 | py | Python | tests/unit/test_thicket/test_finders.py | GabrielC101/filer | d506ed804d10891cea33c3884896b6f0dfa08b88 | [
"MIT"
] | null | null | null | tests/unit/test_thicket/test_finders.py | GabrielC101/filer | d506ed804d10891cea33c3884896b6f0dfa08b88 | [
"MIT"
] | 1 | 2017-12-19T19:38:22.000Z | 2017-12-19T19:38:22.000Z | tests/unit/test_thicket/test_finders.py | GabrielC101/filer | d506ed804d10891cea33c3884896b6f0dfa08b88 | [
"MIT"
] | null | null | null | from thicket import finders
def test_import():
assert finders
| 11.333333 | 27 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
59995210d6ac282b5113ee3252c96de5a50256f9 | 2,251 | py | Python | test/test_component.py | gadalang/gada | 2dd4f4dfd5b7390c06307040cad23203a015f7a4 | [
"MIT"
] | null | null | null | test/test_component.py | gadalang/gada | 2dd4f4dfd5b7390c06307040cad23203a015f7a4 | [
"MIT"
] | null | null | null | test/test_component.py | gadalang/gada | 2dd4f4dfd5b7390c06307040cad23203a015f7a4 | [
"MIT"
] | 1 | 2021-06-15T13:52:33.000Z | 2021-06-15T13:52:33.000Z | __all__ = ["ComponentTestCase"]
import os
import sys
import yaml
import unittest
from gada import component
from test.utils import TestCaseBase
class ComponentTestCase(TestCaseBase):
def test_load(self):
"""Test loading the testnodes package that is in PYTHONPATH."""
# Load component configuration... | 32.157143 | 86 | 0.662372 | 2,055 | 0.912928 | 0 | 0 | 0 | 0 | 0 | 0 | 713 | 0.316748 |
599a3aac676f1bdb004c22bf7034b685260f3101 | 17,820 | py | Python | color pattern with threading.py | HashtagInnovator/Alpha-Star | f69a35b1924320dfec9610d6b61acae8d9de4afa | [
"Apache-2.0"
] | null | null | null | color pattern with threading.py | HashtagInnovator/Alpha-Star | f69a35b1924320dfec9610d6b61acae8d9de4afa | [
"Apache-2.0"
] | null | null | null | color pattern with threading.py | HashtagInnovator/Alpha-Star | f69a35b1924320dfec9610d6b61acae8d9de4afa | [
"Apache-2.0"
] | null | null | null | import time
import random
from multiprocessing import pool
from playsound import playsound
from threading import Thread
i = -1
l = 0
count = 0
class loops:
def loop(self):
print(" ", end="")
def A(self):
global i
global l
global i
for j in range(i, 5):
... | 26.322009 | 129 | 0.306285 | 10,632 | 0.596633 | 0 | 0 | 0 | 0 | 0 | 0 | 1,910 | 0.107183 |
599abd70ab2405fa33e84f2920872f4103dff83c | 273 | py | Python | tests/conftest.py | eddyvdaker/FlaskSimpleStarter | 4992492ac1788d80e5914188f994b3e0ed1e75f4 | [
"MIT"
] | null | null | null | tests/conftest.py | eddyvdaker/FlaskSimpleStarter | 4992492ac1788d80e5914188f994b3e0ed1e75f4 | [
"MIT"
] | null | null | null | tests/conftest.py | eddyvdaker/FlaskSimpleStarter | 4992492ac1788d80e5914188f994b3e0ed1e75f4 | [
"MIT"
] | null | null | null | import pytest
from src.app import create_app
@pytest.fixture
def app():
app = create_app()
app.config['TESTING'] = True
ctx = app.app_context()
ctx.push()
yield app
ctx.pop()
@pytest.fixture
def client(app):
return app.test_client()
| 12.409091 | 32 | 0.6337 | 0 | 0 | 144 | 0.527473 | 221 | 0.809524 | 0 | 0 | 9 | 0.032967 |
599c63fc42e3f63659183c30e8778ab397e4a872 | 2,533 | py | Python | amd64-linux/lib/pmon.py | qiyancos/Simics-3.0.31 | 9bd52d5abad023ee87a37306382a338abf7885f1 | [
"BSD-4-Clause",
"FSFAP"
] | 1 | 2020-06-15T10:41:18.000Z | 2020-06-15T10:41:18.000Z | amd64-linux/lib/pmon.py | qiyancos/Simics-3.0.31 | 9bd52d5abad023ee87a37306382a338abf7885f1 | [
"BSD-4-Clause",
"FSFAP"
] | null | null | null | amd64-linux/lib/pmon.py | qiyancos/Simics-3.0.31 | 9bd52d5abad023ee87a37306382a338abf7885f1 | [
"BSD-4-Clause",
"FSFAP"
] | 3 | 2020-08-10T10:25:02.000Z | 2021-09-12T01:12:09.000Z | # This file implements the PMON firmware's LEON2 boot setup. It does not
# implement the serial port boot loading, only the initial setup.
# The PMON firmware for the LEON2 comes with a number of preprocessor defines
# that the user typically changes to match the hardware configuration.
# The PMON emulation function t... | 51.693878 | 83 | 0.70075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 682 | 0.269246 |
599d3203f355bf0108b50dc6b8026b093b4736fc | 395 | py | Python | scripts/test_web3.py | AeneasHe/eth-brownie-enhance | e53995924ffb93239b9fab6c1c1a07e9166dd1c6 | [
"MIT"
] | 1 | 2021-10-04T23:34:14.000Z | 2021-10-04T23:34:14.000Z | scripts/test_web3.py | AeneasHe/eth-brownie-enhance | e53995924ffb93239b9fab6c1c1a07e9166dd1c6 | [
"MIT"
] | null | null | null | scripts/test_web3.py | AeneasHe/eth-brownie-enhance | e53995924ffb93239b9fab6c1c1a07e9166dd1c6 | [
"MIT"
] | null | null | null | import wpath
from web3 import Web3
from web3 import Web3, HTTPProvider, IPCProvider, WebsocketProvider
def get_web3_by_http_rpc():
address = "http://47.243.92.131:8545"
print("===>address:", address)
p = HTTPProvider(address)
web3 = Web3(p)
return web3
w3 = get_web3_by_http_rpc()
eth = w3.eth
... | 18.809524 | 67 | 0.721519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.21519 |
599f0418376070df049179da7c8e1b8f17a142f2 | 834 | py | Python | models/sklearn_model.py | Ailln/stock-prediction | 9de77de5047446ffceeed83cb610c7edd2cb1ad3 | [
"MIT"
] | 11 | 2020-07-11T06:14:29.000Z | 2021-12-02T08:48:53.000Z | models/sklearn_model.py | HaveTwoBrush/stock-prediction | 9de77de5047446ffceeed83cb610c7edd2cb1ad3 | [
"MIT"
] | null | null | null | models/sklearn_model.py | HaveTwoBrush/stock-prediction | 9de77de5047446ffceeed83cb610c7edd2cb1ad3 | [
"MIT"
] | 8 | 2020-04-15T14:29:47.000Z | 2021-12-19T09:26:53.000Z | from sklearn import svm
from sklearn import ensemble
from sklearn import linear_model
class Model(object):
def __init__(self):
self.model_dict = {
"SGDRegressor": linear_model.SGDRegressor(max_iter=1000),
"HuberRegressor": linear_model.HuberRegressor(),
"LinearRegressio... | 37.909091 | 77 | 0.681055 | 745 | 0.893285 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.20024 |
59a09df4f04358386749f3598f84da0352793936 | 189 | py | Python | venv/Lib/site-packages/shiboken2/_config.py | gabistoian/Hide-Text-in-image | 88b5ef0bd2bcb0e222cfbc7abf6ac2b869f72ec5 | [
"X11"
] | null | null | null | venv/Lib/site-packages/shiboken2/_config.py | gabistoian/Hide-Text-in-image | 88b5ef0bd2bcb0e222cfbc7abf6ac2b869f72ec5 | [
"X11"
] | null | null | null | venv/Lib/site-packages/shiboken2/_config.py | gabistoian/Hide-Text-in-image | 88b5ef0bd2bcb0e222cfbc7abf6ac2b869f72ec5 | [
"X11"
] | null | null | null | shiboken_library_soversion = str(5.15)
version = "5.15.2.1"
version_info = (5, 15, 2.1, "", "")
__build_date__ = '2022-01-07T13:13:47+00:00'
__setup_py_package_version__ = '5.15.2.1'
| 15.75 | 44 | 0.671958 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.269841 |
59a0a3b7aa59f29b5ba0e35ea23ff02112e179f9 | 1,023 | py | Python | 00Python/day05/basic02.py | HaoZhang95/PythonAndMachineLearning | b897224b8a0e6a5734f408df8c24846a98c553bf | [
"MIT"
] | 937 | 2019-05-08T08:46:25.000Z | 2022-03-31T12:56:07.000Z | 00Python/day05/basic02.py | Sakura-gh/Python24 | b97e18867264a0647d5645c7d757a0040e755577 | [
"MIT"
] | 47 | 2019-09-17T10:06:02.000Z | 2022-03-11T23:46:52.000Z | 00Python/day05/basic02.py | Sakura-gh/Python24 | b97e18867264a0647d5645c7d757a0040e755577 | [
"MIT"
] | 354 | 2019-05-10T02:15:26.000Z | 2022-03-30T05:52:57.000Z | """
list元素的排序
sort() 默认无参数是从小到大
reversed(list) 整个列表直接反过来,返回值是一个新的list
"""
import random
a_list = []
for i in range(10):
a_list.append(random.randint(0, 200))
print(a_list)
a_list.sort()
print(a_list)
a_list.sort(reverse=True) # 降序,从大到小
print(a_list)
new_list = reversed(a_list) # [12,10,7,9] -> ... | 18.267857 | 60 | 0.641251 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 846 | 0.600426 |
59a69dfbb3f7dfb97929bbbc436b9c105fe9fa48 | 1,643 | py | Python | ThreeBotPackages/unlock_service/scripts/restore.py | threefoldfoundation/tft-stellar | b36460e8dba547923778273b53fe4f0e06996db0 | [
"Apache-2.0"
] | 7 | 2020-02-05T16:10:46.000Z | 2021-04-28T10:39:20.000Z | ThreeBotPackages/unlock_service/scripts/restore.py | threefoldfoundation/tft-stellar | b36460e8dba547923778273b53fe4f0e06996db0 | [
"Apache-2.0"
] | 379 | 2020-01-13T10:22:21.000Z | 2022-03-23T08:59:57.000Z | ThreeBotPackages/unlock_service/scripts/restore.py | threefoldfoundation/tft-stellar | b36460e8dba547923778273b53fe4f0e06996db0 | [
"Apache-2.0"
] | 3 | 2020-01-24T09:56:44.000Z | 2020-08-03T21:02:38.000Z | #!/usr/bin/env python
# pylint: disable=no-value-for-parameter
import click
import os
import sys
import requests
import json
UNLOCK_SERVICE_DEFAULT_HOSTS = {"test": "https://testnet.threefold.io", "public": "https://tokenservices.threefold.io"}
@click.command()
@click.option("--source", default="export_data", help=... | 37.340909 | 120 | 0.684114 | 0 | 0 | 0 | 0 | 1,322 | 0.804626 | 0 | 0 | 533 | 0.324407 |
59a7951eb259bc0943a926370fa409960f8cba7c | 4,984 | py | Python | pgdiff/diff/PgDiffConstraints.py | Onapsis/pgdiff | ee9f618bc339cbfaf7967103e95f9650273550f8 | [
"MIT"
] | 2 | 2020-05-11T16:42:48.000Z | 2020-08-27T04:11:49.000Z | diff/PgDiffConstraints.py | Gesha3809/PgDiffPy | 00466429d0385eb999c32addcbe6e2746782cb5d | [
"MIT"
] | 1 | 2018-04-11T18:19:33.000Z | 2018-04-13T15:18:40.000Z | diff/PgDiffConstraints.py | Gesha3809/PgDiffPy | 00466429d0385eb999c32addcbe6e2746782cb5d | [
"MIT"
] | 1 | 2018-04-11T15:09:22.000Z | 2018-04-11T15:09:22.000Z | from PgDiffUtils import PgDiffUtils
class PgDiffConstraints(object):
@staticmethod
def createConstraints(writer, oldSchema, newSchema, primaryKey, searchPathHelper):
for newTableName, newTable in newSchema.tables.items():
oldTable = None
if (oldSchema is not None):
... | 41.190083 | 99 | 0.58427 | 4,947 | 0.992576 | 0 | 0 | 4,885 | 0.980136 | 0 | 0 | 186 | 0.037319 |
59a8688939bcf65bd9fa72756ce61831127d2530 | 7,715 | py | Python | experiments/old_code/result_scripts.py | hytsang/cs-ranking | 241626a6a100a27b96990b4f199087a6dc50dcc0 | [
"Apache-2.0"
] | null | null | null | experiments/old_code/result_scripts.py | hytsang/cs-ranking | 241626a6a100a27b96990b4f199087a6dc50dcc0 | [
"Apache-2.0"
] | null | null | null | experiments/old_code/result_scripts.py | hytsang/cs-ranking | 241626a6a100a27b96990b4f199087a6dc50dcc0 | [
"Apache-2.0"
] | 1 | 2018-10-30T08:57:14.000Z | 2018-10-30T08:57:14.000Z | import inspect
import logging
import os
from itertools import product
import numpy as np
import pandas as pd
from skopt import load, dump
from csrank.constants import OBJECT_RANKING
from csrank.util import files_with_same_name, create_dir_recursively, rename_file_if_exist
from experiments.util import dataset_options_... | 43.835227 | 119 | 0.608425 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,137 | 0.147375 |
59a98cedbef2ddabf9e787d32a317a09b1db8b5e | 13,108 | py | Python | notochord/features/BagOfWords.py | jroose/notochord | da9a6ff5d0fabbf0694d0bee1b81a240b66fa006 | [
"MIT"
] | null | null | null | notochord/features/BagOfWords.py | jroose/notochord | da9a6ff5d0fabbf0694d0bee1b81a240b66fa006 | [
"MIT"
] | null | null | null | notochord/features/BagOfWords.py | jroose/notochord | da9a6ff5d0fabbf0694d0bee1b81a240b66fa006 | [
"MIT"
] | null | null | null | from .. import schema, App, QueryCache, batcher, grouper, insert_ignore, export, lookup, persist, lookup_or_persist, ABCArgumentGroup, WorkOrderArgs, filter_widgets, temptable_scope, FeatureCache
from ..ObjectStore import ABCObjectStore
from sqlalchemy import Column, Integer, String, Float, ForeignKey, UnicodeText, Uni... | 51.403922 | 251 | 0.580333 | 12,430 | 0.948276 | 0 | 0 | 11,786 | 0.899146 | 0 | 0 | 2,369 | 0.180729 |
59ac1cf688342acfde23c07e10ca2e33caf1f078 | 450 | py | Python | trains/ATIO.py | Columbine21/TFR-Net | 1da01577542e7f477fdf7323ec0696aebc632357 | [
"MIT"
] | 7 | 2021-11-19T01:32:01.000Z | 2021-12-16T11:42:44.000Z | trains/ATIO.py | Columbine21/TFR-Net | 1da01577542e7f477fdf7323ec0696aebc632357 | [
"MIT"
] | 2 | 2021-11-25T08:28:08.000Z | 2021-12-29T08:42:55.000Z | trains/ATIO.py | Columbine21/TFR-Net | 1da01577542e7f477fdf7323ec0696aebc632357 | [
"MIT"
] | 1 | 2021-12-02T09:42:51.000Z | 2021-12-02T09:42:51.000Z | """
AIO -- All Trains in One
"""
from trains.baselines import *
from trains.missingTask import *
__all__ = ['ATIO']
class ATIO():
def __init__(self):
self.TRAIN_MAP = {
# single-task
'tfn': TFN,
'mult': MULT,
'misa': MISA,
# missing-task
... | 19.565217 | 59 | 0.52 | 330 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.202222 |
59ac4ecc150b88338555999e74b36af7366e76c2 | 271 | py | Python | method/boardInfo.py | gary920209/LightDance-RPi | 41d3ef536f3874fd5dbe092f5c9be42f7204427d | [
"MIT"
] | 2 | 2020-11-14T17:13:55.000Z | 2020-11-14T17:42:39.000Z | method/boardInfo.py | gary920209/LightDance-RPi | 41d3ef536f3874fd5dbe092f5c9be42f7204427d | [
"MIT"
] | null | null | null | method/boardInfo.py | gary920209/LightDance-RPi | 41d3ef536f3874fd5dbe092f5c9be42f7204427d | [
"MIT"
] | null | null | null | import os
from .baseMethod import BaseMethod
# BoardInfo
class BoardInfo(BaseMethod):
def method(self, payload):
info = [
"boardInfo",
{"name": os.name, "type": "dancer", "OK": True, "msg": "Success"},
]
return info
| 19.357143 | 78 | 0.553506 | 210 | 0.774908 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.221402 |
59ad06dd6ba9abadeea6a1f889a37f3edb2cafd7 | 4,928 | py | Python | split_data.py | Anchorboy/PR_FinalProject | e744723c9c9dd55e6995ae5929eb45f90c70819b | [
"MIT"
] | null | null | null | split_data.py | Anchorboy/PR_FinalProject | e744723c9c9dd55e6995ae5929eb45f90c70819b | [
"MIT"
] | null | null | null | split_data.py | Anchorboy/PR_FinalProject | e744723c9c9dd55e6995ae5929eb45f90c70819b | [
"MIT"
] | null | null | null | import os
import cv2
import random
import shutil
import numpy as np
def split_img(input_path):
split_ratio = 0.8
for dir_name in xrange(10):
dir_name += 1
dir_name = str(dir_name)
dir_path = os.path.join(input_path, dir_name)
img_in_class = os.listdir(dir_path)
rand_tr... | 36.503704 | 126 | 0.631494 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 673 | 0.136567 |