hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55b06f25c1d96b1becadf3a363fb778fd324768c | 1,179 | py | Python | VLLV/Models/__init__.py | rzumer/VideoLowLevelVision | 1c15dbe74f0b33d2e74d0a717a22ccbd67cdf269 | [
"MIT"
] | 3 | 2019-04-15T10:00:39.000Z | 2019-04-26T07:51:27.000Z | VLLV/Models/__init__.py | rzumer/VideoLowLevelVision | 1c15dbe74f0b33d2e74d0a717a22ccbd67cdf269 | [
"MIT"
] | null | null | null | VLLV/Models/__init__.py | rzumer/VideoLowLevelVision | 1c15dbe74f0b33d2e74d0a717a22ccbd67cdf269 | [
"MIT"
] | null | null | null | from . import (Srcnn, Espcn, Dcscn, DnCnn, Vdsr, Drcn, Drrn, LapSrn, MemNet,
Edsr, Idn, Rdn, Dbpn, Carn, Rcan, SrGan, Vespcn, Msrn,
SRDenseNet, SRFeat, Gan)
__all__ = ['get_model', 'list_supported_models']
alias = {
'srcnn': Srcnn.SRCNN,
'espcn': Espcn.ESPCN,
'vdsr': Vdsr.VDS... | 24.5625 | 76 | 0.601357 |
27eb2e33bb4b871e3fe190cbd9999c3d49756982 | 688 | py | Python | configs/selfsup/mocov1/cifar100/r18_4xb64_step_ep1000.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 10 | 2021-12-30T10:22:27.000Z | 2022-03-30T02:31:38.000Z | configs/selfsup/mocov1/cifar100/r18_4xb64_step_ep1000.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 3 | 2022-01-20T21:02:48.000Z | 2022-03-19T13:49:45.000Z | configs/selfsup/mocov1/cifar100/r18_4xb64_step_ep1000.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../../_base_/models/mocov1/r18.py',
'../../_base_/datasets/cifar100/mocov1_sz224_bs64.py',
'../../_base_/default_runtime.py',
]
# interval for accumulate gradient
update_interval = 1 # total: 4 x bs64 x 1 accumulates = bs256
# optimizer
optimizer = dict(type='SGD', lr=0.03, weight_decay=1e-4,... | 28.666667 | 91 | 0.719477 |
fe75dbb9d690f3c813ed73f5b0c641dc5f54a13d | 75,056 | py | Python | src/utils.py | uehr/amena | 96e23678a261a4de6896d6d70540f447724018b7 | [
"MIT"
] | 1 | 2021-01-17T13:36:51.000Z | 2021-01-17T13:36:51.000Z | src/utils.py | uehr/amena | 96e23678a261a4de6896d6d70540f447724018b7 | [
"MIT"
] | 1 | 2021-01-19T11:23:42.000Z | 2021-01-19T11:23:42.000Z | src/utils.py | uehr/amena | 96e23678a261a4de6896d6d70540f447724018b7 | [
"MIT"
] | null | null | null | import os
import glob
import cv2
import scipy.misc as misc
from skimage.transform import resize
import numpy as np
from functools import reduce
from operator import mul
import torch
from torch import nn
import re
try:
import cynetworkx as netx
except ImportError:
import networkx as netx
from scipy.ndimage impor... | 53.803584 | 200 | 0.536186 |
67ad271c3a419f3276011598e3a58615d8ce49b7 | 11,114 | py | Python | scales/mux/sink.py | jeffreythewang/scales | 9b068c6308eb7eb98f629e0542a0b0f28c04c960 | [
"MIT"
] | null | null | null | scales/mux/sink.py | jeffreythewang/scales | 9b068c6308eb7eb98f629e0542a0b0f28c04c960 | [
"MIT"
] | null | null | null | scales/mux/sink.py | jeffreythewang/scales | 9b068c6308eb7eb98f629e0542a0b0f28c04c960 | [
"MIT"
] | null | null | null | from abc import abstractmethod
import logging
import time
from struct import unpack
from cStringIO import StringIO
import gevent
from gevent.queue import Queue
from ..async import (
AsyncResult,
NamedGreenlet
)
from ..constants import ChannelState
from ..message import (
Deadline,
ClientError,
MethodReturn... | 29.876344 | 84 | 0.669066 |
7b077af5c3502dcb522f2786d54b3bfc2af1a42d | 97 | py | Python | mysite/settings/__init__.py | lasher85/AirCheck | 52b2f78c7d797999df4952b1bcac9f7d2c12b42c | [
"MIT"
] | null | null | null | mysite/settings/__init__.py | lasher85/AirCheck | 52b2f78c7d797999df4952b1bcac9f7d2c12b42c | [
"MIT"
] | 8 | 2019-12-04T23:44:11.000Z | 2022-02-10T08:31:40.000Z | mysite/settings/__init__.py | lasher85/AirCheck | 52b2f78c7d797999df4952b1bcac9f7d2c12b42c | [
"MIT"
] | null | null | null | from .base import *
from .production import *
try:
from .development import *
except:
pass | 16.166667 | 28 | 0.701031 |
65a6b4574a218a71efad0c08cb03e791236e175e | 2,278 | py | Python | bindings/python/cntk/tests/attributes_test.py | ArpitSisodia/CNTK | 11732625b3d7b5bca1f447c4790e8c8f10de45e1 | [
"RSA-MD"
] | null | null | null | bindings/python/cntk/tests/attributes_test.py | ArpitSisodia/CNTK | 11732625b3d7b5bca1f447c4790e8c8f10de45e1 | [
"RSA-MD"
] | null | null | null | bindings/python/cntk/tests/attributes_test.py | ArpitSisodia/CNTK | 11732625b3d7b5bca1f447c4790e8c8f10de45e1 | [
"RSA-MD"
] | 1 | 2020-12-24T14:50:54.000Z | 2020-12-24T14:50:54.000Z | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
import cntk as C
import numpy as np
def _check(expected, d):
for key in expecte... | 34 | 126 | 0.55619 |
32d8c2a2e57510782c86c2636d48c26aea47fa28 | 11,339 | py | Python | unitTests/testScripts/TestUtils.py | faichele/NumCpp | 7c8fc50fbe44b80eaa105f0f9258120abddfcec2 | [
"MIT"
] | 1 | 2019-06-17T02:04:04.000Z | 2019-06-17T02:04:04.000Z | unitTests/testScripts/TestUtils.py | lamarrr/NumCpp | a24328e9d8dc472607a09ba50419baf21b1d3142 | [
"MIT"
] | null | null | null | unitTests/testScripts/TestUtils.py | lamarrr/NumCpp | a24328e9d8dc472607a09ba50419baf21b1d3142 | [
"MIT"
] | null | null | null | import numpy as np
from termcolor import colored
import sys
if sys.platform == 'linux':
sys.path.append(r'../lib')
else:
sys.path.append(r'../build/x64/Release')
import NumCpp
####################################################################################
def doTest():
print(colored('Testing Utils', '... | 36.459807 | 84 | 0.566364 |
5dcccca7e3a75453c70d622598c682f1ab37976c | 8,439 | py | Python | text-classification/a06_Transformer/a2_predict_classification.py | sliderSun/pynlp | 0f1aa73f8c4bd3faba18dbb6e402d251e308bb50 | [
"MIT"
] | 71 | 2019-01-28T16:18:37.000Z | 2022-03-24T13:47:08.000Z | text-classification/a06_Transformer/a2_predict_classification.py | sliderSun/pynlp | 0f1aa73f8c4bd3faba18dbb6e402d251e308bb50 | [
"MIT"
] | 3 | 2020-06-16T10:12:50.000Z | 2021-04-08T09:41:35.000Z | text-classification/a06_Transformer/a2_predict_classification.py | sliderSun/pynlp | 0f1aa73f8c4bd3faba18dbb6e402d251e308bb50 | [
"MIT"
] | 39 | 2019-02-14T09:45:17.000Z | 2021-12-11T02:32:09.000Z | # -*- coding: utf-8 -*-
#prediction using model.
#process--->1.load data(X:list of lint,y:int). 2.create session. 3.feed data. 4.predict
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import tensorflow as tf
import numpy as np
from a2_transformer_classification import Transformer
from data_util_zhihu import loa... | 56.637584 | 197 | 0.747126 |
1dc8c07f1525f3ec68db3bb5ab00ed94840a25c1 | 1,082 | py | Python | sponge-jython/examples/script/py/filters_java.py | mnpas/sponge | 7190f23ae888bbef49d0fbb85157444d6ea48bcd | [
"Apache-2.0"
] | 9 | 2017-12-16T21:48:57.000Z | 2022-01-06T12:22:24.000Z | sponge-jython/examples/script/py/filters_java.py | mnpas/sponge | 7190f23ae888bbef49d0fbb85157444d6ea48bcd | [
"Apache-2.0"
] | 3 | 2020-12-18T11:56:46.000Z | 2022-03-31T18:37:10.000Z | sponge-jython/examples/script/py/filters_java.py | mnpas/sponge | 7190f23ae888bbef49d0fbb85157444d6ea48bcd | [
"Apache-2.0"
] | 2 | 2019-12-29T16:08:32.000Z | 2020-06-15T14:05:34.000Z | """
Sponge Knowledge Base
Using java filters
"""
from java.util import Collections, HashMap
from java.util.concurrent.atomic import AtomicInteger
from org.openksavi.sponge.examples import ShapeFilter
def onInit():
global eventCounter
# Variables for assertions only
eventCounter = Collections.... | 30.914286 | 68 | 0.682994 |
616e742ca65e6c7b9941ab7270847836bb6b59e6 | 36,640 | py | Python | swift/common/db_replicator.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | swift/common/db_replicator.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | swift/common/db_replicator.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 43.671037 | 79 | 0.576174 |
a451582f7c7a186ab002c673f19a7ad1bedba895 | 8,032 | py | Python | src/oci/ai_vision/models/image_text_detection_feature.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/ai_vision/models/image_text_detection_feature.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/ai_vision/models/image_text_detection_feature.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 42.273684 | 253 | 0.678536 |
7d215c940c03177cc0f3c276fc1599cf8d411280 | 56,204 | py | Python | pandas/tests/arithmetic/test_period.py | RakhithJK/pandas | 0eeda645212c240d6cbdef8e3ba4834c3763553b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 28,899 | 2016-10-13T03:32:12.000Z | 2022-03-31T21:39:05.000Z | pandas/tests/arithmetic/test_period.py | RakhithJK/pandas | 0eeda645212c240d6cbdef8e3ba4834c3763553b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 31,004 | 2016-10-12T23:22:27.000Z | 2022-03-31T23:17:38.000Z | pandas/tests/arithmetic/test_period.py | RakhithJK/pandas | 0eeda645212c240d6cbdef8e3ba4834c3763553b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 15,149 | 2016-10-13T03:21:31.000Z | 2022-03-31T18:46:47.000Z | # Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for Period dtype
import operator
import numpy as np
import pytest
from pandas._libs.tslibs import (
IncompatibleFrequency,
Period,
Timestamp,
to_offset,
)
from pandas.errors import PerformanceW... | 36.307494 | 88 | 0.574835 |
5aa53b7f153355eeb48020b9ad7a4001d52891c2 | 20,725 | py | Python | pypureclient/flasharray/FA_2_8/models/host_group_performance_by_array.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_8/models/host_group_performance_by_array.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_8/models/host_group_performance_by_array.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.8
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 56.625683 | 294 | 0.664608 |
935d91a6db2e6206e368a6fee42d3f90fa9ebcdd | 9,430 | py | Python | lexsubgen/datasets/wsi.py | myrachins/LexSubGen | 5fe27901fa96e51c94280d0938135907a2e5fd80 | [
"Apache-2.0"
] | 32 | 2020-11-09T04:55:30.000Z | 2022-02-20T10:10:19.000Z | lexsubgen/datasets/wsi.py | myrachins/LexSubGen | 5fe27901fa96e51c94280d0938135907a2e5fd80 | [
"Apache-2.0"
] | 3 | 2021-05-31T08:55:27.000Z | 2021-11-27T18:38:14.000Z | lexsubgen/datasets/wsi.py | myrachins/LexSubGen | 5fe27901fa96e51c94280d0938135907a2e5fd80 | [
"Apache-2.0"
] | 9 | 2020-11-28T11:19:35.000Z | 2022-02-20T12:29:15.000Z | import logging
import os
from itertools import chain
from pathlib import Path
from typing import List, Set, Dict, Tuple
from xml.etree import ElementTree
from word_forms.word_forms import get_word_forms
import nltk
import pandas as pd
from nltk.corpus import wordnet as wn
from lexsubgen.datasets.lexsub import Dataset... | 39.957627 | 97 | 0.601909 |
8dc6f7ee910faaae53a81fc83cb47ab4d390a849 | 12,214 | py | Python | skcriteria/preprocessing/scalers.py | elcolie/scikit-criteria | 216674d699b60d68fefa98d44afd619943f3bb00 | [
"BSD-3-Clause"
] | null | null | null | skcriteria/preprocessing/scalers.py | elcolie/scikit-criteria | 216674d699b60d68fefa98d44afd619943f3bb00 | [
"BSD-3-Clause"
] | null | null | null | skcriteria/preprocessing/scalers.py | elcolie/scikit-criteria | 216674d699b60d68fefa98d44afd619943f3bb00 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# License: BSD-3 (https://tldrlegal.com/license/bsd-3-clause-license-(revised))
# Copyright (c) 2016-2021, Cabral, Juan; Luczywo, Nadia
# All rights reserved.
# =============================================================================
# DOCS
# =========================... | 29.150358 | 79 | 0.5542 |
18c9b055a1010eb67b7ea25cecdf00477f1de106 | 12,875 | py | Python | easyp2p/ui/Ui_main_window.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 4 | 2019-07-18T10:58:28.000Z | 2021-11-18T16:57:45.000Z | easyp2p/ui/Ui_main_window.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 1 | 2019-07-05T09:21:47.000Z | 2019-07-05T09:21:47.000Z | easyp2p/ui/Ui_main_window.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 2 | 2019-07-05T08:56:34.000Z | 2020-06-09T10:03:42.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018-2020 Niko Sandschneider
# Form implementation generated from reading ui file 'easyp2p/ui/main_window.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless... | 62.198068 | 127 | 0.75301 |
507cb7e7b0bdd8c2784f4bbb2ea85bda2d43880d | 3,178 | py | Python | blog/blog/settings.py | edgardarbeni/curso-induccion-django | e95416690c1ca7fd1e62b481e0ffb57eabf6f8e9 | [
"MIT"
] | null | null | null | blog/blog/settings.py | edgardarbeni/curso-induccion-django | e95416690c1ca7fd1e62b481e0ffb57eabf6f8e9 | [
"MIT"
] | 6 | 2021-03-19T02:55:17.000Z | 2021-09-22T19:05:25.000Z | blog/blog/settings.py | edgardarbeni/curso-induccion-django | e95416690c1ca7fd1e62b481e0ffb57eabf6f8e9 | [
"MIT"
] | null | null | null | """
Django settings for blog project.
Generated by 'django-admin startproject' using Django 3.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# Bu... | 25.837398 | 91 | 0.695091 |
5cafa32fe2ebad6ae37070befe15306c16a301f8 | 3,512 | py | Python | mglearn/plot_grid_search.py | data-ml/advanced_training | 84d78b60161d08b0f212a14f10f80c6bdc346998 | [
"BSD-2-Clause"
] | 132 | 2016-06-06T17:30:23.000Z | 2021-11-16T13:51:36.000Z | mglearn/plot_grid_search.py | afcarl/advanced_training | 1ef9246e2f70b82295bb3c4dc9a283e32fd427fb | [
"BSD-2-Clause"
] | 1 | 2017-03-08T19:49:13.000Z | 2017-03-08T19:55:03.000Z | mglearn/plot_grid_search.py | afcarl/advanced_training | 1ef9246e2f70b82295bb3c4dc9a283e32fd427fb | [
"BSD-2-Clause"
] | 47 | 2016-06-07T09:39:22.000Z | 2021-09-01T01:45:44.000Z | import numpy as np
import matplotlib.pyplot as plt
from sklearn.svm import SVC
try:
from sklearn.model_selection import GridSearchCV, train_test_split
except:
from sklearn.grid_search import GridSearchCV
from sklearn.cross_validation import train_test_split
from sklearn.datasets import load_iris
def plot_... | 46.210526 | 142 | 0.61959 |
0a0b45c86afc92462c684ffed94ebc8ca5a4dac2 | 27,591 | py | Python | improver_tests/nowcasting/accumulation/test_Accumulation.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 77 | 2017-04-26T07:47:40.000Z | 2022-03-31T09:40:49.000Z | improver_tests/nowcasting/accumulation/test_Accumulation.py | owena11/improver | ff658db31364c0bdf3af3940736c260e10544705 | [
"BSD-3-Clause"
] | 1,440 | 2017-03-29T10:04:15.000Z | 2022-03-28T10:11:29.000Z | improver_tests/nowcasting/accumulation/test_Accumulation.py | MoseleyS/improver | ca028e3a1c842e3ff00b188c8ea6eaedd0a07149 | [
"BSD-3-Clause"
] | 72 | 2017-03-17T16:53:45.000Z | 2022-02-16T09:41:37.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 39.247511 | 88 | 0.592295 |
feb8c1bce0fecc53864eb38e57f296a7fc0ec94d | 3,013 | py | Python | Sketches/THF/simplecube/simplecube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/THF/simplecube/simplecube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/THF/simplecube/simplecube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Vers... | 27.390909 | 78 | 0.589446 |
78b783081ac77e8fa07bf48d3e801ec1a1692452 | 81,793 | py | Python | nlp/models/nezha.py | zhihao-chen/NLP-experiments | c7512276050f5b8489adb4c745fa970ea8119646 | [
"MIT"
] | 4 | 2021-11-10T03:49:28.000Z | 2022-03-24T02:18:44.000Z | nlp/models/nezha.py | zhihao-chen/NLP-experiments | c7512276050f5b8489adb4c745fa970ea8119646 | [
"MIT"
] | null | null | null | nlp/models/nezha.py | zhihao-chen/NLP-experiments | c7512276050f5b8489adb4c745fa970ea8119646 | [
"MIT"
] | 1 | 2021-11-14T18:01:18.000Z | 2021-11-14T18:01:18.000Z | # -*- coding: utf8 -*-
"""
======================================
Project Name: NLP
File Name: nezha
Author: czh
Create Date: 2021/8/10
--------------------------------------
Change Activity:
======================================
"""
import math
import os
import re
import logging
from abc import A... | 49.96518 | 120 | 0.648772 |
e5fd2e0a512ea1d4f119fedf9ee39cd0c1a4d881 | 24,301 | py | Python | experiment_domainadapt_meanteacher.py | Danilum/self-ensemble-visual-domain-adapt | 22d10d9585c5d1f93b5cb02a6cd1576a80d9ba63 | [
"MIT"
] | null | null | null | experiment_domainadapt_meanteacher.py | Danilum/self-ensemble-visual-domain-adapt | 22d10d9585c5d1f93b5cb02a6cd1576a80d9ba63 | [
"MIT"
] | null | null | null | experiment_domainadapt_meanteacher.py | Danilum/self-ensemble-visual-domain-adapt | 22d10d9585c5d1f93b5cb02a6cd1576a80d9ba63 | [
"MIT"
] | null | null | null | """
Incorporates mean teacher, from:
Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results
Antti Tarvainen, Harri Valpola
https://arxiv.org/abs/1703.01780
"""
import click
import torch
@click.command()
@click.option('--exp', type=click.Choice(['svhn_mn... | 45.169145 | 144 | 0.657051 |
af817d8015b475b5dfc39e6a9f691ed1e71c05fc | 53,145 | py | Python | reflred/refldata.py | usnistgov/reductus | abb977f8db41975bb577597e23790b8b58b19d98 | [
"Unlicense"
] | null | null | null | reflred/refldata.py | usnistgov/reductus | abb977f8db41975bb577597e23790b8b58b19d98 | [
"Unlicense"
] | null | null | null | reflred/refldata.py | usnistgov/reductus | abb977f8db41975bb577597e23790b8b58b19d98 | [
"Unlicense"
] | null | null | null | # This program is public domain
"""
Reflectometry data representation.
Need to support collections of data from TOF, monochromatic
and white beam instruments.
Conceptually each data point is a tuple::
incident angles (sample tilt and rotation)
reflected angles (polar angle of detector pixel)
slit distanc... | 37.906562 | 125 | 0.618177 |
7e935e1b5e16b957db9a5d507fa8561cdd5de762 | 1,652 | py | Python | selvbetjening/sadmin2/graph.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | null | null | null | selvbetjening/sadmin2/graph.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | 3 | 2020-02-11T21:54:59.000Z | 2021-06-10T17:35:21.000Z | selvbetjening/sadmin2/graph.py | animekita/selvbetjening | fee63d178fbd5ce2976c04d3a4b2dde6d8691892 | [
"MIT"
] | null | null | null | from datetime import date, timedelta
def diff_in_months(ref_date, date):
return (date.year - ref_date.year) * 12 + (date.month - ref_date.month)
def diff_in_weeks(ref_date, date):
first_week = int(ref_date.strftime('%W'))
last_week = int(date.strftime('%W'))
return (date.year - ref_date.year) * 52 + ... | 25.415385 | 85 | 0.609564 |
78a9cf4d65f60f0dc979b6f6f00478e1232aa385 | 5,401 | py | Python | zephyr/zmake/zmake/__main__.py | IssacAlegre/chrome-ec | 19c3731dfd5250bfadaa90940f108476444d49b1 | [
"BSD-3-Clause"
] | null | null | null | zephyr/zmake/zmake/__main__.py | IssacAlegre/chrome-ec | 19c3731dfd5250bfadaa90940f108476444d49b1 | [
"BSD-3-Clause"
] | null | null | null | zephyr/zmake/zmake/__main__.py | IssacAlegre/chrome-ec | 19c3731dfd5250bfadaa90940f108476444d49b1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""The entry point into zmake."""
import argparse
import inspect
import logging
import pathlib
import sys
import zmake.multiproc as multiproc
import zmak... | 37.506944 | 83 | 0.603036 |
07cfa7c073692f7ff81f78defb2e3541ec3803be | 13,313 | py | Python | nf/flows.py | arita37/normalizing-flows | c9896656bfd2007b0c17b801c0fe068560127301 | [
"MIT"
] | 1 | 2019-11-11T05:40:30.000Z | 2019-11-11T05:40:30.000Z | nf/flows.py | arita37/normalizing-flows | c9896656bfd2007b0c17b801c0fe068560127301 | [
"MIT"
] | null | null | null | nf/flows.py | arita37/normalizing-flows | c9896656bfd2007b0c17b801c0fe068560127301 | [
"MIT"
] | null | null | null | import math
import numpy as np
import scipy as sp
import scipy.linalg
import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
from nf.utils import unconstrained_RQS
# supported non-linearities: note that the function must be invertible
functional_derivatives = {
torch.tanh: ... | 35.312997 | 80 | 0.533539 |
2cdba8314fca4b127afe3ab310e7e1a8ae90a33c | 25,268 | py | Python | geffnet/efficientnet_builder.py | laksh9950/gen-efficientnet-pytorch | b3bc163478737924f508978a6f0c96e07046e025 | [
"Apache-2.0"
] | 1 | 2019-11-18T02:41:44.000Z | 2019-11-18T02:41:44.000Z | geffnet/efficientnet_builder.py | jph00/gen-efficientnet-pytorch | b3bc163478737924f508978a6f0c96e07046e025 | [
"Apache-2.0"
] | null | null | null | geffnet/efficientnet_builder.py | jph00/gen-efficientnet-pytorch | b3bc163478737924f508978a6f0c96e07046e025 | [
"Apache-2.0"
] | 1 | 2020-01-18T20:56:53.000Z | 2020-01-18T20:56:53.000Z | import re
from copy import deepcopy
from .conv2d_layers import *
from geffnet.activations import *
# Default args for PyTorch BN impl
BN_MOMENTUM_PT_DEFAULT = 0.1
BN_EPS_PT_DEFAULT = 1e-5
BN_ARGS_PT = dict(momentum=BN_MOMENTUM_PT_DEFAULT, eps=BN_EPS_PT_DEFAULT)
# Defaults used for Google/Tensorflow training of mobil... | 39.114551 | 124 | 0.62969 |
ce0b4ea506c4114a09eb01800eadbcb279805bfe | 1,919 | py | Python | options.py | dungpham98/HiDDeN | ecbe71e290091afca86d0a5df469c30ac5436e0f | [
"MIT"
] | null | null | null | options.py | dungpham98/HiDDeN | ecbe71e290091afca86d0a5df469c30ac5436e0f | [
"MIT"
] | null | null | null | options.py | dungpham98/HiDDeN | ecbe71e290091afca86d0a5df469c30ac5436e0f | [
"MIT"
] | null | null | null | class TrainingOptions:
"""
Configuration options for the training
"""
def __init__(self,
batch_size: int,
number_of_epochs: int,
train_folder: str, validation_folder: str, runs_folder: str,
start_epoch: int, experiment_name: str):
... | 36.903846 | 77 | 0.629495 |
f418cbf5ae6251e0528abbbc6878bc474d65f6e4 | 768 | py | Python | modules/math-codes/modules/statistics-and-probability/src/outliers-v1.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | 1 | 2020-09-06T22:17:19.000Z | 2020-09-06T22:17:19.000Z | modules/math-codes/modules/statistics-and-probability/src/outliers-v1.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | modules/math-codes/modules/statistics-and-probability/src/outliers-v1.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | ########################################################
# Rodrigo Leite - drigols #
# Last update: 17/12/2021 #
########################################################
import pandas as pd
from matplotlib import pyplot as plt
df = pd.DataFrame(
{
'Name'... | 34.909091 | 79 | 0.489583 |
37a1507c324a5e876a2da60a2f53e814facf6789 | 5,818 | py | Python | app.py | gozer/nhobot | 437299f0fa3500af22ae1562f247041c85cc44f5 | [
"MIT"
] | null | null | null | app.py | gozer/nhobot | 437299f0fa3500af22ae1562f247041c85cc44f5 | [
"MIT"
] | null | null | null | app.py | gozer/nhobot | 437299f0fa3500af22ae1562f247041c85cc44f5 | [
"MIT"
] | null | null | null | from flask import Flask, request
import database.mongo_setup as mongo_setup
from database.people import People
from database.messages import Messages
from database.messages_to_send import MessagesToSend as Send
from iam_profile_faker.factory import V2ProfileFactory
import json
import datetime
import pytz
app = Flask(... | 40.685315 | 141 | 0.665693 |
047fd03f595ad1af67e086843b570a3f3ab02b72 | 632 | py | Python | Chapter07/final/form_project/manage.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 97 | 2021-03-01T12:54:30.000Z | 2022-03-28T02:57:26.000Z | Chapter07/final/form_project/manage.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 81 | 2020-08-27T04:56:04.000Z | 2022-03-12T00:53:40.000Z | Chapter07/final/form_project/manage.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 163 | 2020-12-25T14:38:38.000Z | 2022-03-30T10:31:40.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'form_project.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise I... | 28.727273 | 76 | 0.685127 |
573bab32ce05e80ff152cda09326f2712c6af8b6 | 3,827 | py | Python | test/test_pipeline/components/feature_preprocessing/test_select_rates_regression.py | Louquinze/auto-sklearn | b2ac331c500ebef7becf372802493a7b235f7cec | [
"BSD-3-Clause"
] | 6,390 | 2015-07-11T07:59:51.000Z | 2022-03-31T16:45:15.000Z | test/test_pipeline/components/feature_preprocessing/test_select_rates_regression.py | Louquinze/auto-sklearn | b2ac331c500ebef7becf372802493a7b235f7cec | [
"BSD-3-Clause"
] | 1,276 | 2015-07-29T02:11:29.000Z | 2022-03-31T17:31:34.000Z | test/test_pipeline/components/feature_preprocessing/test_select_rates_regression.py | Louquinze/auto-sklearn | b2ac331c500ebef7becf372802493a7b235f7cec | [
"BSD-3-Clause"
] | 1,313 | 2015-07-20T14:11:39.000Z | 2022-03-25T18:22:48.000Z | import unittest
import numpy as np
import scipy.sparse
import sklearn.preprocessing
from autosklearn.pipeline.components.feature_preprocessing.select_rates_regression import \
SelectRegressionRates
from autosklearn.pipeline.util import _test_preprocessing, get_dataset
class SelectRegressionRatesComponentTest(un... | 44.5 | 91 | 0.652469 |
6e1a46d9c048e96eb734e95ced18507fae5713a4 | 1,022 | py | Python | LocusPocus/scripts/fidibus-filens.py | vpbrendel/AEGeAn | 4b00f0a6aab36a9ab6ea6a62f53c110053aaf96c | [
"0BSD"
] | 21 | 2016-05-19T18:14:41.000Z | 2021-12-21T21:42:33.000Z | LocusPocus/scripts/fidibus-filens.py | BrendelGroup/AEGeAn | 4d59d2f268cf67d1296dd3eea52cf76d7a23c465 | [
"0BSD"
] | 59 | 2016-01-27T20:46:06.000Z | 2021-01-04T14:51:16.000Z | LocusPocus/scripts/fidibus-filens.py | vpbrendel/AEGeAn | 4b00f0a6aab36a9ab6ea6a62f53c110053aaf96c | [
"0BSD"
] | 10 | 2016-01-27T20:41:32.000Z | 2020-01-28T22:45:42.000Z | #!/usr/bin/env python
#
# -----------------------------------------------------------------------------
# Copyright (c) 2015 Indiana University
#
# This file is part of AEGeAn (http://github.com/BrendelGroup/AEGeAn) and is
# licensed under the ISC license: see LICENSE.
# ----------------------------------------------... | 31.9375 | 79 | 0.584149 |
26d7d7297177b35e6453e4d5a4edaab0bd0f88b0 | 511 | py | Python | env/lib/python3.8/site-packages/plotly/validators/funnel/marker/_cmax.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/funnel/marker/_cmax.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/funnel/marker/_cmax.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class CmaxValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="cmax", parent_name="funnel.marker", **kwargs):
super(CmaxValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
e... | 36.5 | 82 | 0.643836 |
3d88f337e938ecea5f0dfe895d916165ec5d3087 | 11,115 | py | Python | tests/components/arcam_fmj/test_media_player.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 1 | 2021-08-23T00:15:33.000Z | 2021-08-23T00:15:33.000Z | tests/components/arcam_fmj/test_media_player.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:51:16.000Z | 2022-03-12T00:43:18.000Z | tests/components/arcam_fmj/test_media_player.py | klauern/home-assistant-core | c18ba6aec0627e6afb6442c678edb5ff2bb17db6 | [
"Apache-2.0"
] | 1 | 2020-06-09T20:54:05.000Z | 2020-06-09T20:54:05.000Z | """Tests for arcam fmj receivers."""
from math import isclose
from arcam.fmj import DecodeMode2CH, DecodeModeMCH, IncomingAudioFormat, SourceCodes
import pytest
from homeassistant.components.media_player.const import MEDIA_TYPE_MUSIC
from homeassistant.core import HomeAssistant
from .conftest import MOCK_ENTITY_ID, ... | 31.309859 | 84 | 0.698336 |
7c91aa3a614e001eb5ba45c44c570e34b5aa282a | 3,949 | py | Python | backend/bin/test/test_enrichers/test_tls_enricher.py | anjo-ba/PCAP-Analyzer | ccb13caba9c0c05a7643e63c57575b56ab1233cb | [
"MIT"
] | 4 | 2019-03-29T08:45:36.000Z | 2021-11-11T00:49:36.000Z | backend/bin/test/test_enrichers/test_tls_enricher.py | anjo-ba/PCAP-Analyzer | ccb13caba9c0c05a7643e63c57575b56ab1233cb | [
"MIT"
] | 9 | 2019-04-03T18:10:19.000Z | 2020-08-16T12:13:34.000Z | backend/bin/test/test_enrichers/test_tls_enricher.py | anjo-ba/PCAP-Analyzer | ccb13caba9c0c05a7643e63c57575b56ab1233cb | [
"MIT"
] | 4 | 2019-05-09T15:33:23.000Z | 2022-02-06T08:01:23.000Z | import unittest
from typing import Dict
from main.enrichers.tls_version_enricher import TlsVersionEnricher
from main.helpers.string_helper import enclose_with_quotes
class TestTlsVersionEnricherMethods(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.tls_version_enricher = ... | 48.158537 | 119 | 0.634591 |
6e81eab84a1558fcc45ec90f1a4220b9d57d6be5 | 1,983 | py | Python | Lib/distutils/tests/test_spawn.py | hashiqizaizai/hashiqizaizai.github.io | 7217400802f6b944dfd1e29d4b00d268957ff769 | [
"bzip2-1.0.6"
] | 1 | 2019-05-14T05:05:42.000Z | 2019-05-14T05:05:42.000Z | Lib/distutils/tests/test_spawn.py | hashiqizaizai/hashiqizaizai.github.io | 7217400802f6b944dfd1e29d4b00d268957ff769 | [
"bzip2-1.0.6"
] | null | null | null | Lib/distutils/tests/test_spawn.py | hashiqizaizai/hashiqizaizai.github.io | 7217400802f6b944dfd1e29d4b00d268957ff769 | [
"bzip2-1.0.6"
] | 2 | 2018-07-15T06:35:21.000Z | 2019-05-14T05:05:31.000Z | """Tests for distutils.spawn."""
import unittest
import os
import time
from test.test_support import captured_stdout
from distutils.spawn import _nt_quote_args
from distutils.spawn import spawn, find_executable
from distutils.errors import DistutilsExecError
from distutils.tests import support
class SpawnT... | 32.508197 | 62 | 0.555724 |
986dd0a3e46d255edc056771592808752abbb5c8 | 679 | py | Python | aula078.py | juniorpedroso/CFBCursos | 88657d6aad38de7d41e76499f0ff4d85a02745ae | [
"MIT"
] | null | null | null | aula078.py | juniorpedroso/CFBCursos | 88657d6aad38de7d41e76499f0ff4d85a02745ae | [
"MIT"
] | null | null | null | aula078.py | juniorpedroso/CFBCursos | 88657d6aad38de7d41e76499f0ff4d85a02745ae | [
"MIT"
] | null | null | null | # Aula 78 - Grid
from tkinter import *
from tkinter import ttk
app = Tk()
app.title('Pedroso')
app.geometry('500x300')
lb_canal = Label(app, text='CFB Cursos')
lb_nome = Label(app, text='Digite seu nome')
lb_idade = Label(app, text='Digite sua idade')
en_nome = Entry(app)
en_idade = Entry(app)
btn = Button(app, t... | 21.21875 | 69 | 0.683358 |
607b64abcdb7af2ecaf00d47d133c69cb76945a1 | 1,903 | py | Python | jobfunnel/resources/enums.py | marchbnr/JobFunnel | 446e9e06790467d6274e7e69cc505e7b3d982e03 | [
"MIT"
] | 2 | 2020-01-05T20:39:07.000Z | 2020-03-23T18:07:04.000Z | jobfunnel/resources/enums.py | marchbnr/JobFunnel | 446e9e06790467d6274e7e69cc505e7b3d982e03 | [
"MIT"
] | 18 | 2019-11-12T21:04:56.000Z | 2020-10-19T19:44:52.000Z | jobfunnel/resources/enums.py | marchbnr/JobFunnel | 446e9e06790467d6274e7e69cc505e7b3d982e03 | [
"MIT"
] | 2 | 2020-01-05T00:37:58.000Z | 2020-01-12T03:32:06.000Z | from enum import Enum
class Locale(Enum):
"""This will allow Scrapers / Filters / Main to identify the support they
have for different domains of different websites
Locale must be set as it defines the code implementation to use for forming
the correct GET requests, to allow us to interact with a job... | 20.684783 | 79 | 0.619548 |
c7e42ae828640d68900f0a39b4b5d119738fb0e4 | 2,968 | py | Python | bootstrap.py | MiguelCarino/maniwani | 9519b89aeedee40527ba49425964a077d74a7de4 | [
"MIT"
] | 81 | 2018-08-09T12:58:01.000Z | 2022-02-02T05:56:48.000Z | bootstrap.py | MiguelCarino/maniwani | 9519b89aeedee40527ba49425964a077d74a7de4 | [
"MIT"
] | 456 | 2019-12-09T02:28:26.000Z | 2021-08-03T03:28:12.000Z | bootstrap.py | MiguelCarino/maniwani | 9519b89aeedee40527ba49425964a077d74a7de4 | [
"MIT"
] | 13 | 2018-08-11T10:12:01.000Z | 2022-03-10T04:32:05.000Z | from gevent import monkey
monkey.patch_all()
import json
import os
from alembic import command
from alembic.config import Config
from flask.cli import with_appcontext
from model.Board import Board
from model.Slip import gen_slip
from model.Tag import Tag
from model.Media import storage
from shared import app, db
M... | 28 | 91 | 0.674865 |
bebc80e061ccefa6875e315060818c0a8d32fd2b | 9,292 | py | Python | drnet/apps/load_db_icu.py | jameszhou-gl/drnet | d8ff339f802425c3f7896ccd57c8995f69c43d28 | [
"MIT"
] | 46 | 2019-02-03T20:57:51.000Z | 2022-03-28T12:06:45.000Z | drnet/apps/load_db_icu.py | jameszhou-gl/drnet | d8ff339f802425c3f7896ccd57c8995f69c43d28 | [
"MIT"
] | 7 | 2019-12-16T21:27:25.000Z | 2022-02-10T00:11:43.000Z | drnet/apps/load_db_icu.py | jameszhou-gl/drnet | d8ff339f802425c3f7896ccd57c8995f69c43d28 | [
"MIT"
] | 12 | 2019-07-21T20:48:01.000Z | 2022-03-22T02:16:13.000Z | """
Copyright (C) 2019 Patrick Schwab, ETH Zurich
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... | 45.326829 | 117 | 0.646255 |
9c02901134141c5a7b9e62c7a8aafccc891c6cf3 | 161 | py | Python | mlflow/R/mlflow/inst/examples/python/simple/simple.py | parkerzf/mlflow | 58f70d522d439ab26f777dbd32de77f79c0235bc | [
"Apache-2.0"
] | 1 | 2020-10-02T08:10:13.000Z | 2020-10-02T08:10:13.000Z | mlflow/R/mlflow/inst/examples/python/simple/simple.py | parkerzf/mlflow | 58f70d522d439ab26f777dbd32de77f79c0235bc | [
"Apache-2.0"
] | null | null | null | mlflow/R/mlflow/inst/examples/python/simple/simple.py | parkerzf/mlflow | 58f70d522d439ab26f777dbd32de77f79c0235bc | [
"Apache-2.0"
] | null | null | null | import os
import mlflow
if __name__ == "__main__":
with mlflow.start_run():
mlflow.log_param("parameter", 5)
mlflow.log_metric("metric", 0)
| 20.125 | 40 | 0.652174 |
1710c5bab0ebcb8449c4996da0a480276eae11f8 | 99 | py | Python | intro/introduction/apps.py | cs-fullstack-2019-fall/django-intro1-cw-marcus110379 | 3a95df8732d9032d70929545658a97ac52d81568 | [
"Apache-2.0"
] | null | null | null | intro/introduction/apps.py | cs-fullstack-2019-fall/django-intro1-cw-marcus110379 | 3a95df8732d9032d70929545658a97ac52d81568 | [
"Apache-2.0"
] | 5 | 2021-03-18T23:39:07.000Z | 2021-09-22T18:33:54.000Z | apps/introduction/apps.py | ad-free/lab-friends | a91d69b0ab60d78b5202e9d682f6dafd689963c4 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class IntroductionConfig(AppConfig):
name = 'introduction'
| 16.5 | 36 | 0.777778 |
d152d50163f31708efcb02d6f0aad9f9b1551428 | 15,585 | py | Python | appengine/chromium_rietveld/codereview/library.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | appengine/chromium_rietveld/codereview/library.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | appengine/chromium_rietveld/codereview/library.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.002053 | 80 | 0.694386 |
0e86cf1f1508d7dd02762f7bd8eb0294903cf738 | 2,698 | py | Python | route/give_admin.py | lsh23/openNAMU | 18f780afe5e81ef1f347fe556b6fd98bb4914a53 | [
"BSD-3-Clause"
] | null | null | null | route/give_admin.py | lsh23/openNAMU | 18f780afe5e81ef1f347fe556b6fd98bb4914a53 | [
"BSD-3-Clause"
] | null | null | null | route/give_admin.py | lsh23/openNAMU | 18f780afe5e81ef1f347fe556b6fd98bb4914a53 | [
"BSD-3-Clause"
] | null | null | null | from .tool.func import *
def give_admin_2(conn, name):
curs = conn.cursor()
owner = admin_check()
curs.execute(db_change("select acl from user where id = ?"), [name])
user = curs.fetchall()
if not user:
return re_error('/error/2')
else:
if owner != 1:
curs.exec... | 40.878788 | 136 | 0.475908 |
90244c77a85be4beb9cdd5190bce19ed1aff602a | 238 | py | Python | usuarios/models.py | ShadowsS01/Cursos-Django | 40ca002d7de34d2d4e192819801e99b62938f1f2 | [
"MIT"
] | null | null | null | usuarios/models.py | ShadowsS01/Cursos-Django | 40ca002d7de34d2d4e192819801e99b62938f1f2 | [
"MIT"
] | null | null | null | usuarios/models.py | ShadowsS01/Cursos-Django | 40ca002d7de34d2d4e192819801e99b62938f1f2 | [
"MIT"
] | null | null | null | from django.db import models
class Usuario(models.Model):
nome = models.CharField(max_length = 50)
email = models.EmailField()
senha = models.CharField(max_length = 64)
def __str__(self) -> str:
return self.nome
| 23.8 | 45 | 0.680672 |
ba27eea6c51bc0d0221743751c085b8cdeae49a5 | 100,279 | py | Python | numpy/lib/tests/test_io.py | PhanatosZou/numpy | ee7fcb790e36d940d4fde69bd1cad5048008064b | [
"BSD-3-Clause"
] | 1 | 2020-01-09T03:37:16.000Z | 2020-01-09T03:37:16.000Z | numpy/lib/tests/test_io.py | PhanatosZou/numpy | ee7fcb790e36d940d4fde69bd1cad5048008064b | [
"BSD-3-Clause"
] | null | null | null | numpy/lib/tests/test_io.py | PhanatosZou/numpy | ee7fcb790e36d940d4fde69bd1cad5048008064b | [
"BSD-3-Clause"
] | null | null | null | import sys
import gzip
import os
import threading
import time
import warnings
import io
import re
import pytest
from tempfile import NamedTemporaryFile
from io import BytesIO, StringIO
from datetime import datetime
import locale
import numpy as np
import numpy.ma as ma
from numpy.lib._iotools import ConverterError, Co... | 38.64316 | 97 | 0.521106 |
0e5abe2f5ccd169a6fb25914bd7f747325aec507 | 10,643 | py | Python | pandas/tests/indexes/timedeltas/test_ops.py | hkennyv/pandas | 31875eb3d8a56f359c2f529f86b867572d5dfeb1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-04-26T22:11:21.000Z | 2020-04-26T22:11:21.000Z | pandas/tests/indexes/timedeltas/test_ops.py | hkennyv/pandas | 31875eb3d8a56f359c2f529f86b867572d5dfeb1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/indexes/timedeltas/test_ops.py | hkennyv/pandas | 31875eb3d8a56f359c2f529f86b867572d5dfeb1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | from datetime import timedelta
import numpy as np
import pytest
import pandas as pd
from pandas import Series, TimedeltaIndex, timedelta_range
import pandas._testing as tm
from pandas.tseries.offsets import DateOffset, Day, Hour
class TestTimedeltaIndexOps:
def test_value_counts_unique(self):
# GH 7735... | 36.324232 | 88 | 0.573804 |
be37b022b1aec1a75fd5eff3b017f93d3ebeda10 | 3,568 | py | Python | p2p/exchange/manager.py | dendisuhubdy/trinity | 001664781259c7dd0779a0ef6f822451b608ded4 | [
"MIT"
] | 1 | 2021-04-07T07:33:28.000Z | 2021-04-07T07:33:28.000Z | p2p/exchange/manager.py | dendisuhubdy/trinity | 001664781259c7dd0779a0ef6f822451b608ded4 | [
"MIT"
] | null | null | null | p2p/exchange/manager.py | dendisuhubdy/trinity | 001664781259c7dd0779a0ef6f822451b608ded4 | [
"MIT"
] | null | null | null | import asyncio
from concurrent import futures
import logging
from typing import (
Callable,
TypeVar,
)
from eth_utils import (
ValidationError,
)
from p2p.abc import ConnectionAPI
from p2p.exceptions import PeerConnectionLost
from .abc import (
ExchangeManagerAPI,
NormalizerAPI,
PerformanceT... | 33.980952 | 99 | 0.589406 |
ddd956e5c3167cd42b79fefa50d9d1b6df083bad | 3,163 | py | Python | music_player/music_player/settings.py | yashrahurikar23/drf-spotify-houseparty-app | 150842a52671b9f31cb878c85667c7849ff3c10f | [
"MIT"
] | null | null | null | music_player/music_player/settings.py | yashrahurikar23/drf-spotify-houseparty-app | 150842a52671b9f31cb878c85667c7849ff3c10f | [
"MIT"
] | null | null | null | music_player/music_player/settings.py | yashrahurikar23/drf-spotify-houseparty-app | 150842a52671b9f31cb878c85667c7849ff3c10f | [
"MIT"
] | null | null | null | """
Django settings for music_player project.
Generated by 'django-admin startproject' using Django 3.1.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pa... | 25.508065 | 91 | 0.696175 |
e9c882c00d145d573ab2ef725685cc79448f178f | 783 | py | Python | project/db/models/blogs.py | samsonosiomwan/Devs-Prime-Api | 7b43078bb1f848f17f85e8bb94292d1b776eee92 | [
"MIT"
] | null | null | null | project/db/models/blogs.py | samsonosiomwan/Devs-Prime-Api | 7b43078bb1f848f17f85e8bb94292d1b776eee92 | [
"MIT"
] | 1 | 2021-10-21T22:13:56.000Z | 2021-10-21T22:13:57.000Z | project/db/models/blogs.py | Favourkass/Devsprime-api | 2414a2541efeb76b6a7ebb26c2d05a3bfead153c | [
"MIT"
] | null | null | null | from django.db import models
import uuid
from django.conf import settings
from .user import User
class Blog(models.Model):
DEFAULT_COVER_IMG_URL = 'https://res.cloudinary.com/devsprime/image/upload/v1623419362/Blogs/blog_ompj6m.jpg'
id = models.UUIDField(unique=True, primary_key=True,
... | 34.043478 | 113 | 0.735632 |
2d54c0d597d485791d552aae5b679dffacd5d2e5 | 1,158 | py | Python | applications/ATOM/utils/compute_profile.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 194 | 2016-07-19T15:40:21.000Z | 2022-03-19T08:06:10.000Z | applications/ATOM/utils/compute_profile.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 1,021 | 2016-07-19T12:56:31.000Z | 2022-03-29T00:41:47.000Z | applications/ATOM/utils/compute_profile.py | jonesholger/lbann | 3214f189a1438565d695542e076c4fa8e7332d34 | [
"Apache-2.0"
] | 74 | 2016-07-28T18:24:00.000Z | 2022-01-24T19:41:04.000Z | import sys
if len(sys.argv) != 3 :
print('usage:')
print(' ' + sys.argv[0] + ' input_fn output_fn')
print('function:')
print(' writes data for plotting num_sequences as a function')
print(' of sequence length to "output_fn"; prints length')
print(' of longest sequence to cout (add two for <bos>, <eos>)... | 22.705882 | 67 | 0.606218 |
ec80fe97a457f81ae79726b1a19934210a7e93b5 | 38,270 | py | Python | tools/scons/scons-local-1.2.0/SCons/SConf.py | rohankumardubey/node | d49d53fd499f7cf68fdfcc7d0c9d401e4e4407fb | [
"MIT"
] | 48 | 2015-01-09T20:39:35.000Z | 2021-12-21T21:17:52.000Z | tools/scons/scons-local-1.2.0/SCons/SConf.py | jdunck/node | d1f69ef35dac810530df8249d523add168e09f03 | [
"MIT"
] | 2 | 2016-02-05T10:27:37.000Z | 2019-01-22T16:22:51.000Z | tools/scons/scons-local-1.2.0/SCons/SConf.py | jdunck/node | d1f69ef35dac810530df8249d523add168e09f03 | [
"MIT"
] | 8 | 2015-01-12T17:14:36.000Z | 2018-09-15T14:10:27.000Z | """SCons.SConf
Autoconf-like configuration support.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
#
# 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 Softwa... | 37.778875 | 96 | 0.595088 |
015ab75d01d8493fdf14a1258350473b1e8a3919 | 751 | py | Python | setup.py | CharliePW/Covid-Clock | af94542952a74906625337729cd80cdbffa0d36b | [
"MIT"
] | null | null | null | setup.py | CharliePW/Covid-Clock | af94542952a74906625337729cd80cdbffa0d36b | [
"MIT"
] | null | null | null | setup.py | CharliePW/Covid-Clock | af94542952a74906625337729cd80cdbffa0d36b | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name = "Covid-Clock-pkg-cep234",
version = "0.0.1",
author = "Charles Pearman-Wright",
author_email = "cep234@exeter.ac.uk",
description = "A webpage that can set announces recent covid news, co... | 32.652174 | 113 | 0.655126 |
7e6f91019689a97ceb88a1e93ad66c6db5c5fba3 | 666 | py | Python | pyqt5_module/pyqt5_lesson1.py | kenwaldek/python | e6aaf5616a456a4fb91889c0617bd6511f1a223e | [
"MIT"
] | 1 | 2019-02-24T09:57:16.000Z | 2019-02-24T09:57:16.000Z | pyqt5_module/pyqt5_lesson1.py | kenwaldek/python | e6aaf5616a456a4fb91889c0617bd6511f1a223e | [
"MIT"
] | null | null | null | pyqt5_module/pyqt5_lesson1.py | kenwaldek/python | e6aaf5616a456a4fb91889c0617bd6511f1a223e | [
"MIT"
] | 4 | 2017-05-21T15:34:53.000Z | 2018-09-25T06:56:15.000Z | #! /usr/bin/env python3
# -*- coding:utf-8 -*-
###############################################################
# kenwaldek GPL-license
# Title: PyQt5 lesson 1 Version: 1.0
# Date: 08-01-17 Language: python3
# Description: pyqt5 simple example of empty windo... | 27.75 | 63 | 0.528529 |
33a1cfdd2bb289ca4ff5f9e0123a5f236449dbce | 3,362 | py | Python | inventory/views.py | CNicox/inventory | 6a85e3155a7215182f892bbc712f49f85db5d8f8 | [
"Unlicense"
] | 1 | 2022-01-11T13:51:35.000Z | 2022-01-11T13:51:35.000Z | inventory/views.py | CNicox/inventory | 6a85e3155a7215182f892bbc712f49f85db5d8f8 | [
"Unlicense"
] | null | null | null | inventory/views.py | CNicox/inventory | 6a85e3155a7215182f892bbc712f49f85db5d8f8 | [
"Unlicense"
] | null | null | null | from django.shortcuts import render, redirect
from django.http import HttpResponse
from .models import *
from django.views.generic import ListView, TemplateView
from django.contrib.auth.backends import BaseBackend
from .forms import *
from django.contrib.auth import login
from django.contrib import messages
from django... | 31.420561 | 99 | 0.653778 |
70c9c88a72ac966be243fd35c19d9d6705b9b2c3 | 437 | py | Python | 14.classes/0.basic_classes.py | Tazri/Python | f7ca625800229c8a7e20b64810d6e162ccb6b09f | [
"DOC"
] | null | null | null | 14.classes/0.basic_classes.py | Tazri/Python | f7ca625800229c8a7e20b64810d6e162ccb6b09f | [
"DOC"
] | null | null | null | 14.classes/0.basic_classes.py | Tazri/Python | f7ca625800229c8a7e20b64810d6e162ccb6b09f | [
"DOC"
] | null | null | null | # create simple class which name is Point
from operator import pos
class Point :
x = 40;
y = 43;
# create Point object
position = Point();
print(">>> Position <<<");
print("position.x : ",position.x);
print("position.y : ",position.y);
# changing position property
position.x = 0;
position.y = 0;
print("\... | 19 | 54 | 0.652174 |
819b95776ca69d600b2acf57094194988767c5e0 | 11,426 | py | Python | goatools/parsers/ncbi_gene_file_reader.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | 1 | 2020-03-12T13:53:11.000Z | 2020-03-12T13:53:11.000Z | goatools/parsers/ncbi_gene_file_reader.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | null | null | null | goatools/parsers/ncbi_gene_file_reader.py | cinaljess/goatools | 8cd603df88fcb49da970e37c445cdb1bdd17ee01 | [
"BSD-2-Clause"
] | 1 | 2022-03-17T03:14:32.000Z | 2022-03-17T03:14:32.000Z | """Reads an NCBI Gene tsv file."""
from __future__ import print_function
import sys
import re
from collections import namedtuple
from collections import OrderedDict
__copyright__ = "Copyright (C) 2016-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
#pylint: disable=line-too-long... | 42.794007 | 101 | 0.549799 |
994269d36cd8540b0a38dbad0d82863e95d90236 | 41,944 | py | Python | pandas/tools/tests/test_pivot.py | betoesquivel/PyData29-DataAnalyticsWithAWSLambda | 318d1f595e4079544159a0f4802277dc5b25cb47 | [
"MIT"
] | 4 | 2016-12-06T20:22:28.000Z | 2018-05-04T09:51:45.000Z | pandas/tools/tests/test_pivot.py | betoesquivel/PyData29-DataAnalyticsWithAWSLambda | 318d1f595e4079544159a0f4802277dc5b25cb47 | [
"MIT"
] | null | null | null | pandas/tools/tests/test_pivot.py | betoesquivel/PyData29-DataAnalyticsWithAWSLambda | 318d1f595e4079544159a0f4802277dc5b25cb47 | [
"MIT"
] | 1 | 2021-11-05T22:17:01.000Z | 2021-11-05T22:17:01.000Z | from datetime import datetime, date, timedelta
import numpy as np
from numpy.testing import assert_equal
import pandas as pd
from pandas import DataFrame, Series, Index, MultiIndex, Grouper
from pandas.tools.merge import concat
from pandas.tools.pivot import pivot_table, crosstab
from pandas.compat import range, u, p... | 44.479321 | 79 | 0.461091 |
556b0c9ed1615e1ad8a5f773d4d2054b90c2ddc5 | 582 | py | Python | strategies/strategy.py | math2001/pacman | 01c998bed3ca278e8dded30122e569a213a7b45a | [
"MIT"
] | null | null | null | strategies/strategy.py | math2001/pacman | 01c998bed3ca278e8dded30122e569a213a7b45a | [
"MIT"
] | null | null | null | strategies/strategy.py | math2001/pacman | 01c998bed3ca278e8dded30122e569a213a7b45a | [
"MIT"
] | null | null | null | from scene import Scene
class Strategy(Scene):
"""A strategy is just like a scene
It just isn't *activated* as a scene. But in essense, they do the same
thing: update, render (for debug) and handle events. Hence why they have
such similar methods.
"""
def __init__(self, tiles, pacman, ghosts)... | 22.384615 | 76 | 0.613402 |
501cfd68d25c8e9f148a4433514f6fcf3ac80d49 | 944 | py | Python | tests/test_tag_inheritance.py | phonkee/django-wrapper-tag | 61059e33c8c77ebfa2fd73db730777173d100fef | [
"MIT"
] | 1 | 2016-10-03T19:56:18.000Z | 2016-10-03T19:56:18.000Z | tests/test_tag_inheritance.py | phonkee/django-wrapper-tag | 61059e33c8c77ebfa2fd73db730777173d100fef | [
"MIT"
] | 7 | 2020-02-11T21:54:38.000Z | 2022-02-10T07:36:07.000Z | tests/test_tag_inheritance.py | phonkee/django-wrapper-tag | 61059e33c8c77ebfa2fd73db730777173d100fef | [
"MIT"
] | 1 | 2019-02-25T09:47:00.000Z | 2019-02-25T09:47:00.000Z | """
test_django-wrapper-tag
------------
Tests for `django-wrapper-tag` inheritance of tags module.
"""
from django.test import TestCase
from wrapper_tag import arguments
from wrapper_tag import tag
class TestInheritanceTag(TestCase):
def test_something(self):
class FirstTag(object):
title1... | 25.513514 | 92 | 0.623941 |
84eb076aca21d9dab584791252be9b6bb4559627 | 8,184 | py | Python | uq_benchmark_2019/news/data_utils_from_hendrycks.py | yick2232/google-research | 99021ebda945e232abdcc592f2cea1375b3c84f7 | [
"Apache-2.0"
] | 11 | 2020-01-29T07:25:04.000Z | 2022-03-05T16:01:21.000Z | uq_benchmark_2019/news/data_utils_from_hendrycks.py | RubensZimbres/google-research | 562c7c6ef959cb3cb382b1b660ccc45e8f5289c4 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:19:53.000Z | 2022-02-10T00:39:26.000Z | uq_benchmark_2019/news/data_utils_from_hendrycks.py | RubensZimbres/google-research | 562c7c6ef959cb3cb382b1b660ccc45e8f5289c4 | [
"Apache-2.0"
] | 2 | 2019-12-07T19:01:03.000Z | 2020-03-19T16:53:04.000Z | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 33.540984 | 107 | 0.690982 |
d5c6102251eb6a1130e03d5b62e5b58fe34d8741 | 1,872 | py | Python | src/predict_video.py | irfanmustafas/TeethClassifierCNN | 8c58b50162b3f9eb7f12251cbca9fcbd4d6c43b7 | [
"MIT"
] | 1 | 2018-12-05T01:49:54.000Z | 2018-12-05T01:49:54.000Z | src/predict_video.py | irfanmustafas/TeethClassifierCNN | 8c58b50162b3f9eb7f12251cbca9fcbd4d6c43b7 | [
"MIT"
] | null | null | null | src/predict_video.py | irfanmustafas/TeethClassifierCNN | 8c58b50162b3f9eb7f12251cbca9fcbd4d6c43b7 | [
"MIT"
] | null | null | null | import numpy as np
import sys
import caffe
import glob
import uuid
import cv2
from util import transform_img
from mouth_detector_dlib import mouth_detector
from caffe.proto import caffe_pb2
import os
import shutil
from util import histogram_equalization
import math
from teeth_cnn import teeth_cnn
cv2.namedWindow("prev... | 31.728814 | 89 | 0.676282 |
12c88281619be7d6995b19fa1aa88957efe8eeb7 | 4,588 | py | Python | contrib/testgen/gen_base58_test_vectors.py | ROZ-MOFUMOFU-ME/susucoin | af7616171f814313f8bdea43a3186ffaec9770f8 | [
"MIT"
] | 15 | 2018-06-12T07:48:13.000Z | 2020-01-17T10:10:56.000Z | contrib/testgen/gen_base58_test_vectors.py | ROZ-MOFUMOFU-ME/susucoin | af7616171f814313f8bdea43a3186ffaec9770f8 | [
"MIT"
] | 12 | 2018-06-11T16:13:59.000Z | 2018-12-19T15:31:12.000Z | contrib/testgen/gen_base58_test_vectors.py | ROZ-MOFUMOFU-ME/susucoin | af7616171f814313f8bdea43a3186ffaec9770f8 | [
"MIT"
] | 16 | 2018-06-26T21:56:40.000Z | 2020-12-21T15:59:02.000Z | #!/usr/bin/env python3
# Copyright (c) 2012-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Generate valid and invalid base58 address and private key test vectors.
Usage:
gen_base58_test_ve... | 34.496241 | 91 | 0.613775 |
5d6d32960d714d1de9f90a675ef231f91d0cfb79 | 443 | py | Python | catkin_ws/devel/lib/python2.7/dist-packages/carla_msgs/msg/__init__.py | udeto/carla_autoware_final | 479e53f916be1cffa2524eb854bc3d1c47471bc1 | [
"MIT"
] | 2 | 2021-02-03T07:22:12.000Z | 2021-06-24T15:10:52.000Z | catkin_ws/devel/lib/python2.7/dist-packages/carla_msgs/msg/__init__.py | udeto/carla_autoware_final | 479e53f916be1cffa2524eb854bc3d1c47471bc1 | [
"MIT"
] | null | null | null | catkin_ws/devel/lib/python2.7/dist-packages/carla_msgs/msg/__init__.py | udeto/carla_autoware_final | 479e53f916be1cffa2524eb854bc3d1c47471bc1 | [
"MIT"
] | 2 | 2020-08-24T09:16:31.000Z | 2020-12-08T06:18:23.000Z | from ._CarlaActorInfo import *
from ._CarlaActorList import *
from ._CarlaCollisionEvent import *
from ._CarlaControl import *
from ._CarlaEgoVehicleControl import *
from ._CarlaEgoVehicleInfo import *
from ._CarlaEgoVehicleInfoWheel import *
from ._CarlaEgoVehicleStatus import *
from ._CarlaLaneInvasionEvent import *
... | 31.642857 | 40 | 0.823928 |
ab24042197de9bf802d95aafe8d8b0ab4bc00138 | 60 | py | Python | Baisc_Calculator/Square.py | cy275/Statistics_Calculator | c98dec271df98465a87180a170a786bcf817800c | [
"MIT"
] | null | null | null | Baisc_Calculator/Square.py | cy275/Statistics_Calculator | c98dec271df98465a87180a170a786bcf817800c | [
"MIT"
] | null | null | null | Baisc_Calculator/Square.py | cy275/Statistics_Calculator | c98dec271df98465a87180a170a786bcf817800c | [
"MIT"
] | null | null | null | def square(a):
a = float(a)
b = a ** 2
return b
| 12 | 16 | 0.45 |
10792c775ae1f307f700a0520e067d2049c12046 | 2,811 | py | Python | model-optimizer/extensions/middle/TensorIteratorOutput_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 1 | 2021-04-06T03:32:12.000Z | 2021-04-06T03:32:12.000Z | model-optimizer/extensions/middle/TensorIteratorOutput_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 28 | 2021-09-24T09:29:02.000Z | 2022-03-28T13:20:46.000Z | model-optimizer/extensions/middle/TensorIteratorOutput_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 1 | 2020-08-30T11:48:03.000Z | 2020-08-30T11:48:03.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
import numpy as np
from extensions.middle.TensorIteratorOutput import SmartOutputMatcher
from mo.utils.ir_engine.compare_graphs import compare_graphs
from mo.utils.unittest.graph import build_graph_with_attrs
class Sm... | 54.057692 | 113 | 0.44148 |
a0823d14952a5496bef78662882645d6421894ad | 4,242 | py | Python | authorized_keys/management/commands/expireusers.py | tzwenn/moalinna | 5723b773325452162a719870f27ea0db1ebf0b5a | [
"MIT"
] | 2 | 2021-01-09T09:56:40.000Z | 2021-01-25T14:34:58.000Z | authorized_keys/management/commands/expireusers.py | tzwenn/moalinna | 5723b773325452162a719870f27ea0db1ebf0b5a | [
"MIT"
] | 6 | 2021-01-09T10:31:06.000Z | 2021-02-03T09:51:35.000Z | authorized_keys/management/commands/expireusers.py | tzwenn/moalinna | 5723b773325452162a719870f27ea0db1ebf0b5a | [
"MIT"
] | 1 | 2021-01-11T05:54:57.000Z | 2021-01-11T05:54:57.000Z | from django.conf import settings
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand
from abc import ABCMeta, abstractmethod
import datetime
import inspect
import logging
import ldap3
logger = logging.getLogger(__name__)
class UserDirectory(object, metaclass=ABCMeta):
... | 35.057851 | 116 | 0.724422 |
5cb62278c581f3ea53bffb022e92a7cb04ab9413 | 30,957 | bzl | Python | packages/typescript/index.bzl | jakebiesinger-storyhealth/rules_nodejs | 8df86ccb799e4f9f3c4b26174f09b58a89ef3639 | [
"Apache-2.0"
] | null | null | null | packages/typescript/index.bzl | jakebiesinger-storyhealth/rules_nodejs | 8df86ccb799e4f9f3c4b26174f09b58a89ef3639 | [
"Apache-2.0"
] | null | null | null | packages/typescript/index.bzl | jakebiesinger-storyhealth/rules_nodejs | 8df86ccb799e4f9f3c4b26174f09b58a89ef3639 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 49.610577 | 179 | 0.653487 |
b540efba89fbdceddb157defeba6f8b42f9bfe22 | 1,037 | py | Python | tests/test_jewellerybox.py | Jarino/pycgp | c3281c0deff3388cb7cfd79339b84391f6499ae1 | [
"MIT"
] | 4 | 2018-02-08T17:34:58.000Z | 2021-09-20T01:37:32.000Z | tests/test_jewellerybox.py | Jarino/pycgp | c3281c0deff3388cb7cfd79339b84391f6499ae1 | [
"MIT"
] | 1 | 2018-02-09T09:59:09.000Z | 2018-02-09T10:52:26.000Z | tests/test_jewellerybox.py | Jarino/pycgp | c3281c0deff3388cb7cfd79339b84391f6499ae1 | [
"MIT"
] | 1 | 2018-12-12T03:51:33.000Z | 2018-12-12T03:51:33.000Z | """ Test suite for jewellery box """
from pycgp.gems import GemSingleGene, JewelleryBox
from pycgp.individual import Individual
def test_match(jewellerybox: JewelleryBox, individual: Individual):
""" Should return matching gem """
matching_gem = jewellerybox.match(individual)
assert hash(matching_gem) ... | 27.289474 | 86 | 0.717454 |
8b8856a97f0e894481c41e4c520c6cb1808ab4cf | 4,324 | py | Python | userbot/modules/dogbin.py | razalfaaindi/rwszay | e4772d6a218b43ac8b721e5ff35d0ad853b78805 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/dogbin.py | razalfaaindi/rwszay | e4772d6a218b43ac8b721e5ff35d0ad853b78805 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/dogbin.py | razalfaaindi/rwszay | e4772d6a218b43ac8b721e5ff35d0ad853b78805 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot module containing commands for interacting with dogbin(https://del.dog)"""
from requests import get, post,... | 33.261538 | 90 | 0.612396 |
637b7c84fb49487d7f58887ccf6c4829f7fd92e6 | 1,729 | py | Python | komics/commands/assemble.py | FreBio/komics | 3af2d968f7864d5f3767983b236660f268f8d0c0 | [
"OLDAP-2.2.1"
] | 2 | 2021-10-04T14:10:32.000Z | 2021-11-10T11:59:39.000Z | komics/commands/assemble.py | FreBio/komics | 3af2d968f7864d5f3767983b236660f268f8d0c0 | [
"OLDAP-2.2.1"
] | 2 | 2021-10-20T11:21:22.000Z | 2022-03-29T13:47:28.000Z | komics/commands/assemble.py | FreBio/komics | 3af2d968f7864d5f3767983b236660f268f8d0c0 | [
"OLDAP-2.2.1"
] | 1 | 2020-06-11T10:05:32.000Z | 2020-06-11T10:05:32.000Z | import sys
import komics
import argparse
def main():
parser = argparse.ArgumentParser(
prog='komics',
description='Assembles contigs using MEGAHIT',
usage = 'komics assemble [options] <out> <reads1> <reads2>')
parser.add_argument('out', help='Prefix used for labeling FASTQ files', metavar='out')
parser.add_a... | 44.333333 | 266 | 0.717178 |
9bed4fd21676890f7257d1c2be96e8f2cbe486aa | 2,870 | py | Python | nowcasting_dataset/consts.py | JanEbbing/nowcasting_dataset | f907054a457987e6f6dbb13bfb65fc5359c6f680 | [
"MIT"
] | null | null | null | nowcasting_dataset/consts.py | JanEbbing/nowcasting_dataset | f907054a457987e6f6dbb13bfb65fc5359c6f680 | [
"MIT"
] | null | null | null | nowcasting_dataset/consts.py | JanEbbing/nowcasting_dataset | f907054a457987e6f6dbb13bfb65fc5359c6f680 | [
"MIT"
] | null | null | null | """ Constants that can be imported when needed """
from pathlib import Path
from typing import Union
import numpy as np
import xarray as xr
# Satellite data
# TODO: Issue #423: Remove this?
SAT_FILENAME = "gs://" + str(
Path("solar-pv-nowcasting-data")
/ "satellite/EUMETSAT/SEVIRI_RSS/OSGB36/all_zarr_int16_si... | 20.797101 | 80 | 0.697213 |
83399868f5f6851fbc6675e827830813f4aa4ab8 | 3,748 | py | Python | pyfitnesspal/settings.py | gord1anknot/pyfitnesspal | cf0b224a2b12797876a3601678d84172c6dddf00 | [
"Apache-2.0"
] | 2 | 2018-06-08T16:05:53.000Z | 2018-12-22T16:07:33.000Z | pyfitnesspal/settings.py | gord1anknot/pyfitnesspal | cf0b224a2b12797876a3601678d84172c6dddf00 | [
"Apache-2.0"
] | null | null | null | pyfitnesspal/settings.py | gord1anknot/pyfitnesspal | cf0b224a2b12797876a3601678d84172c6dddf00 | [
"Apache-2.0"
] | 1 | 2018-11-08T10:53:15.000Z | 2018-11-08T10:53:15.000Z | # Copyright 2015 Bradley Rowe
#
# 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, ... | 30.471545 | 74 | 0.740662 |
3684e7e877da009447ab9b71ef594b8a51f1fd82 | 1,736 | py | Python | ticketViewer/TicketModel.py | kunwarvidhan/Zendesk-Coding-Challenge-2021 | f6b34fd0d7e21937ed6af6e0e0397409a1c48106 | [
"MIT"
] | null | null | null | ticketViewer/TicketModel.py | kunwarvidhan/Zendesk-Coding-Challenge-2021 | f6b34fd0d7e21937ed6af6e0e0397409a1c48106 | [
"MIT"
] | null | null | null | ticketViewer/TicketModel.py | kunwarvidhan/Zendesk-Coding-Challenge-2021 | f6b34fd0d7e21937ed6af6e0e0397409a1c48106 | [
"MIT"
] | null | null | null | import time
import sys
import requests
class TicketModel:
"""Class for retrieve, update and store tickets."""
def __init__(self):
"""__init__ function defines tickets list"""
self.__tickets = []
def __update_tickets(self, tickets):
"""update ticket in TicketModel from the server"... | 32.754717 | 100 | 0.570853 |
52b380abbfc036d3abd0d94a7b431d357a2c83f0 | 1,698 | py | Python | packstack/installer/utils/shortcuts.py | strider/packstack | 8157722953234d00a2dc4ca6bca940464e70a614 | [
"Apache-2.0"
] | null | null | null | packstack/installer/utils/shortcuts.py | strider/packstack | 8157722953234d00a2dc4ca6bca940464e70a614 | [
"Apache-2.0"
] | null | null | null | packstack/installer/utils/shortcuts.py | strider/packstack | 8157722953234d00a2dc4ca6bca940464e70a614 | [
"Apache-2.0"
] | 1 | 2020-08-31T21:25:37.000Z | 2020-08-31T21:25:37.000Z | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 26.53125 | 69 | 0.621908 |
77fb66fd0863454ea0b7e27061b5af8cd71e71ae | 4,109 | py | Python | huaweicloud-sdk-as/huaweicloudsdkas/v1/model/lbaas_listeners.py | githubmilesma/huaweicloud-sdk-python-v3 | 9d9449ed68a609ca65f0aa50b5b2a1c28445bf03 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-as/huaweicloudsdkas/v1/model/lbaas_listeners.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-as/huaweicloudsdkas/v1/model/lbaas_listeners.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class LbaasListeners:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is ... | 25.208589 | 74 | 0.554149 |
92ce14c261592eb062be660d1a06447c0685fe38 | 3,703 | py | Python | clamav.py | Rafiot/viper-modules | 812642effecf8ae64bce76fa0f72116e0c2c81cd | [
"BSD-3-Clause"
] | 5 | 2019-12-20T09:42:41.000Z | 2021-04-30T07:05:00.000Z | clamav.py | SubSpaceManeuvers/viper-modules | c8f19c6d4e0e976e2ad8730e0862c2250e3acdd5 | [
"BSD-3-Clause"
] | 7 | 2019-11-25T13:13:15.000Z | 2020-09-09T09:04:46.000Z | clamav.py | SubSpaceManeuvers/viper-modules | c8f19c6d4e0e976e2ad8730e0862c2250e3acdd5 | [
"BSD-3-Clause"
] | 10 | 2019-11-20T04:57:51.000Z | 2021-01-21T18:51:47.000Z | # -*- coding: utf-8 -*-
# This file is part of Viper - https://github.com/viper-framework/viper
# See the file 'LICENSE' for copying permission.
try:
import pyclamd
HAVE_CLAMD = True
except ImportError:
HAVE_CLAMD = False
import os
from viper.common.abstracts import Module
from viper.core.database import... | 32.482456 | 135 | 0.565487 |
92090221db0004b84ef4a8dc46e83cc5a75ec4bc | 1,472 | py | Python | src/pypyr/shapefunctions.py | joelphillips/pypyramid | be1b4760235d859755771e55c003396e02b72f91 | [
"BSD-3-Clause"
] | 1 | 2015-01-01T16:26:16.000Z | 2015-01-01T16:26:16.000Z | src/pypyr/shapefunctions.py | joelphillips/pypyramid | be1b4760235d859755771e55c003396e02b72f91 | [
"BSD-3-Clause"
] | null | null | null | src/pypyr/shapefunctions.py | joelphillips/pypyramid | be1b4760235d859755771e55c003396e02b72f91 | [
"BSD-3-Clause"
] | null | null | null | '''
The Pyramidal approximation spaces. See the paper "Numerical integration for high order pyramidal elements"
For each space, we build first build the Helmholtz decomposition, then map to the finite pyramid.
Created on Aug 17, 2010
@author: joel
'''
from pypyr.mappings import derham3dweights, psijac, psiinvjac, ... | 29.44 | 108 | 0.662364 |
14c7c434712494ee16c87381bf7a5f04a3a1435c | 7,583 | py | Python | vispy/visuals/tests/test_mesh.py | theGiallo/vispy | 081a1216e336e8c2c9aa4c61b926ba771bb5479f | [
"BSD-3-Clause"
] | null | null | null | vispy/visuals/tests/test_mesh.py | theGiallo/vispy | 081a1216e336e8c2c9aa4c61b926ba771bb5479f | [
"BSD-3-Clause"
] | 1 | 2021-06-04T13:48:46.000Z | 2021-06-05T10:57:33.000Z | vispy/visuals/tests/test_mesh.py | theGiallo/vispy | 081a1216e336e8c2c9aa4c61b926ba771bb5479f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
from vispy import scene
from vispy.geometry import create_cube, create_sphere
from vispy.testing import (TestingCanvas, requires_application,
run_tests_if_main, requires_pyopengl)
from vispy.visuals.filters import WireframeFilter
import pytest
@... | 40.989189 | 79 | 0.632731 |
9f5f89113bc6f1696aa59fc5348d159c42ef7989 | 3,018 | py | Python | tools/vid2img_kinetics.py | eynaij/X-Temporal | 7dde0457b10be703e70329312ea55b14d7364f88 | [
"MIT"
] | 1 | 2020-11-05T03:05:30.000Z | 2020-11-05T03:05:30.000Z | tools/vid2img_kinetics.py | eynaij/X-Temporal | 7dde0457b10be703e70329312ea55b14d7364f88 | [
"MIT"
] | null | null | null | tools/vid2img_kinetics.py | eynaij/X-Temporal | 7dde0457b10be703e70329312ea55b14d7364f88 | [
"MIT"
] | 1 | 2020-11-05T03:14:59.000Z | 2020-11-05T03:14:59.000Z | # Code for "TSM: Temporal Shift Module for Efficient Video Understanding"
# arXiv:1811.08383
# Ji Lin*, Chuang Gan, Song Han
# {jilin, songhan}@mit.edu, ganchuang@csail.mit.edu
from __future__ import print_function, division
import os
import sys
import subprocess
from multiprocessing import Pool
from tqdm import tqdm
... | 31.113402 | 91 | 0.633863 |
00d932f0551fe04bafe7e4b0f8fcf5c7da193da4 | 2,997 | py | Python | ee/clickhouse/sql/dead_letter_queue.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | ee/clickhouse/sql/dead_letter_queue.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | ee/clickhouse/sql/dead_letter_queue.py | msnitish/posthog | cb86113f568e72eedcb64b5fd00c313d21e72f90 | [
"MIT"
] | null | null | null | from ee.clickhouse.sql.clickhouse import KAFKA_COLUMNS, kafka_engine, ttl_period
from ee.clickhouse.sql.table_engines import ReplacingMergeTree
from ee.kafka_client.topics import KAFKA_DEAD_LETTER_QUEUE
from posthog.settings import CLICKHOUSE_CLUSTER, CLICKHOUSE_DATABASE
# We pipe our Kafka dead letter queue into CH f... | 25.836207 | 102 | 0.771772 |
4ff62b509ab1490e8621aab8b331350b929a7ecc | 669 | py | Python | python/hackerrank/AlternatingCharacters.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | null | null | null | python/hackerrank/AlternatingCharacters.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | null | null | null | python/hackerrank/AlternatingCharacters.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | 1 | 2020-08-29T17:12:52.000Z | 2020-08-29T17:12:52.000Z | '''
https://www.hackerrank.com/snippets/fde7efcb-163f-4574-a896-4944d37edb3e/quietwalters-snippet-from-alternating-characters
'''
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the alternatingCharacters function below.
def alternatingCharacters(s):
count_delete = 0
for i... | 18.583333 | 121 | 0.647235 |
36c55c1568bb20cb0a8890b1d8da917f4cd141fc | 3,304 | py | Python | tests/unit/test_accessor.py | matthewgdv/pathmagic | fe5788e02cfa7397cc0ef45ea7a0c5549ca4f261 | [
"MIT"
] | null | null | null | tests/unit/test_accessor.py | matthewgdv/pathmagic | fe5788e02cfa7397cc0ef45ea7a0c5549ca4f261 | [
"MIT"
] | 1 | 2021-02-08T10:48:05.000Z | 2021-02-08T10:48:05.000Z | tests/unit/test_accessor.py | matthewgdv/pathmagic | fe5788e02cfa7397cc0ef45ea7a0c5549ca4f261 | [
"MIT"
] | null | null | null | import pytest
from pathmagic import Dir, File
from pathmagic.accessor import Name, AmbiguityError
from tests.conftest import unnecessary, abstract, untestable
class TestAccessor:
def test___call__(self, temp_root: Dir, temp_dir: Dir, temp_file: File): # synced
file_name, = temp_root.files()
asse... | 32.392157 | 113 | 0.666768 |
261e7f2c6aa1d506f3dd658d97795a3a5c435d61 | 2,480 | py | Python | Database Initialization/Creators/consistsof_init.py | georgevangelou/Bringing_yoU_Spiti | 6b98c6f1179e8e3dd3f41ff0b3d373eb1d8643a5 | [
"Apache-2.0"
] | 2 | 2021-03-05T19:36:24.000Z | 2021-03-08T19:52:06.000Z | Database Initialization/Creators/consistsof_init.py | n-roussos/Bringing_yoU_Spiti | cc0946d0b8a66bb3b9d7b988622fe262a68ba3fb | [
"Apache-2.0"
] | null | null | null | Database Initialization/Creators/consistsof_init.py | n-roussos/Bringing_yoU_Spiti | cc0946d0b8a66bb3b9d7b988622fe262a68ba3fb | [
"Apache-2.0"
] | 1 | 2021-03-05T19:58:51.000Z | 2021-03-05T19:58:51.000Z | import random
random.seed(3900)
import bus_stops_init
STOPS = bus_stops_init.BUS_STOPS
stopsDic = bus_stops_init.bustopsDic
import lines_init
SIZE = lines_init.LINES
linesDic = lines_init.linesDic
EXTRAS = lines_init.NAMES_EXTRAS
def getRandStop(currentStops, finalStop):
newStop = random.randint(1, STOPS)
... | 33.066667 | 149 | 0.648387 |
ee0253ace1355b321ea73b50fd394dcd96a03122 | 13,218 | py | Python | mars/dataframe/groupby/tests/test_groupby.py | xccheng/mars | 8146d1b7d3f3bc2a652c414a336a2f884a06a108 | [
"Apache-2.0"
] | 1 | 2020-11-05T05:53:00.000Z | 2020-11-05T05:53:00.000Z | mars/dataframe/groupby/tests/test_groupby.py | xccheng/mars | 8146d1b7d3f3bc2a652c414a336a2f884a06a108 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/groupby/tests/test_groupby.py | xccheng/mars | 8146d1b7d3f3bc2a652c414a336a2f884a06a108 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 44.959184 | 102 | 0.611893 |
4388485df16a9b9463b0ac06422f702f6669034f | 8,679 | py | Python | packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py | pragyagarg642/plotly.py | 141aa6dcb3f838b2102db6ecc9ae1bdb70daf20b | [
"MIT"
] | 2 | 2020-04-11T19:28:30.000Z | 2020-05-04T03:16:20.000Z | packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py | pragyagarg642/plotly.py | 141aa6dcb3f838b2102db6ecc9ae1bdb70daf20b | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py | pragyagarg642/plotly.py | 141aa6dcb3f838b2102db6ecc9ae1bdb70daf20b | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000'... | 37.571429 | 88 | 0.572186 |
fc4857bf0aff4178b507e74759703614be85862f | 23,190 | py | Python | desktop/core/ext-py/Twisted/twisted/conch/test/test_telnet.py | civascu/hue | 82f2de44789ff5a981ed725175bae7944832d1e9 | [
"Apache-2.0"
] | 19 | 2015-05-01T19:59:03.000Z | 2021-12-09T08:03:16.000Z | desktop/core/ext-py/Twisted/twisted/conch/test/test_telnet.py | civascu/hue | 82f2de44789ff5a981ed725175bae7944832d1e9 | [
"Apache-2.0"
] | 1 | 2018-01-03T15:26:49.000Z | 2018-01-03T15:26:49.000Z | desktop/core/ext-py/Twisted/twisted/conch/test/test_telnet.py | civascu/hue | 82f2de44789ff5a981ed725175bae7944832d1e9 | [
"Apache-2.0"
] | 30 | 2015-03-25T19:40:07.000Z | 2021-05-28T22:59:26.000Z | # -*- test-case-name: twisted.conch.test.test_telnet -*-
# Copyright (c) 2001-2007 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.conch.telnet}.
"""
from zope.interface import implements
from twisted.internet import defer
from twisted.conch import telnet
from twisted.trial import u... | 34.153166 | 82 | 0.596809 |
d698a0f4167f19f1d4cd7d928ae59e1c2b8897df | 14,965 | py | Python | chia/cmds/show.py | santiagoferreira33/mainchia | 16917701fd93cebab25bf054cf7c17967052ef2e | [
"Apache-2.0"
] | 3 | 2021-06-16T05:12:13.000Z | 2021-08-14T01:26:54.000Z | chia/cmds/show.py | santiagoferreira33/mainchia | 16917701fd93cebab25bf054cf7c17967052ef2e | [
"Apache-2.0"
] | 28 | 2021-07-13T21:07:14.000Z | 2022-03-29T21:10:38.000Z | chia/cmds/show.py | santiagoferreira33/mainchia | 16917701fd93cebab25bf054cf7c17967052ef2e | [
"Apache-2.0"
] | 2 | 2021-05-18T15:33:58.000Z | 2021-05-28T21:15:09.000Z | from typing import Any
import click
async def show_async(
rpc_port: int,
state: bool,
show_connections: bool,
exit_node: bool,
add_connection: str,
remove_connection: str,
block_header_hash_by_height: str,
block_by_header_hash: str,
) -> None:
import aiohttp
import time
im... | 45.764526 | 119 | 0.537187 |
60bd1df0f4de5ae4ea668c915b47625d96e1f746 | 549 | py | Python | users/migrations/0027_auto_20190910_1643.py | dhanupandey12/Blog | fcd274b7249c255786b46cf81d6e949a903e9a53 | [
"MIT"
] | null | null | null | users/migrations/0027_auto_20190910_1643.py | dhanupandey12/Blog | fcd274b7249c255786b46cf81d6e949a903e9a53 | [
"MIT"
] | null | null | null | users/migrations/0027_auto_20190910_1643.py | dhanupandey12/Blog | fcd274b7249c255786b46cf81d6e949a903e9a53 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.5 on 2019-09-10 11:13
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
atomic = False
dependencies = [
('users', '0026_auto_20190910_1638'),
]
operations = [
mig... | 26.142857 | 134 | 0.663024 |
892d58bced7a94c8ffa269c5a5131735fe183099 | 4,246 | py | Python | drafthorse/models/trade.py | olf42/python-drafthorse | 0ef0326556ad0336236fd8d91cb32e8343ebd592 | [
"Apache-2.0"
] | null | null | null | drafthorse/models/trade.py | olf42/python-drafthorse | 0ef0326556ad0336236fd8d91cb32e8343ebd592 | [
"Apache-2.0"
] | null | null | null | drafthorse/models/trade.py | olf42/python-drafthorse | 0ef0326556ad0336236fd8d91cb32e8343ebd592 | [
"Apache-2.0"
] | null | null | null | from . import BASIC, COMFORT, EXTENDED, NS_RAM, NS_FERD_1p0
from .accounting import (ApplicableTradeTax, AppliedTradeTax,
BillingSpecifiedPeriod, MonetarySummation,
ReceivableAccountingAccount, TradeAllowanceCharge)
from .delivery import TradeDelivery
from .elements imp... | 47.177778 | 93 | 0.70325 |
ddb264931c11feb420a91eea58b5663963d7a29e | 2,365 | py | Python | curlylint/rules/tabindex_no_positive/tabindex_no_positive.py | adamchainz/curlylint | b64ec22effafffc6a1371e544c560e6bfc24b56e | [
"MIT"
] | 155 | 2020-03-22T14:06:31.000Z | 2022-03-20T15:41:03.000Z | curlylint/rules/tabindex_no_positive/tabindex_no_positive.py | adamchainz/curlylint | b64ec22effafffc6a1371e544c560e6bfc24b56e | [
"MIT"
] | 57 | 2020-06-22T13:33:32.000Z | 2022-03-30T11:44:33.000Z | curlylint/rules/tabindex_no_positive/tabindex_no_positive.py | adamchainz/curlylint | b64ec22effafffc6a1371e544c560e6bfc24b56e | [
"MIT"
] | 22 | 2020-08-11T19:51:48.000Z | 2022-03-29T08:42:28.000Z | from curlylint import ast
from curlylint.check_node import CheckNode, build_tree
from curlylint.issue import Issue
TABINDEX_NO_POSITIVE = "tabindex_no_positive"
RULE = {
"id": "tabindex_no_positive",
"type": "accessibility",
"docs": {
"description": "Prevents using positive `tabindex` values, whic... | 34.275362 | 156 | 0.594503 |
1d2d5a983a54eea11b57e4bdc6b96c6b65d47e48 | 1,050 | py | Python | jp.atcoder/abc224/abc224_e/26783521.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc224/abc224_e/26783521.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc224/abc224_e/26783521.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
import typing
import numba as nb
import numpy as np
@nb.njit((nb.i8, nb.i8, nb.i8[:, :]), cache=True)
def solve(h: int, w: int, rca: np.ndarray) -> typing.NoReturn:
n = len(rca)
dist = np.zeros(n, np.int64)
rmax = np.full(h, -1, np.int64)
cmax = np.full(w, -1, np.int64)
... | 22.826087 | 63 | 0.464762 |
54d7ebb15352fe37218fd899dc5554eaf1ff576d | 114,815 | py | Python | src/sage/rings/number_field/number_field_ideal.py | velasjk3/SageMath | 7fb1c29714fb7c9b93e640e658586a664f939791 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/number_field/number_field_ideal.py | velasjk3/SageMath | 7fb1c29714fb7c9b93e640e658586a664f939791 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/number_field/number_field_ideal.py | velasjk3/SageMath | 7fb1c29714fb7c9b93e640e658586a664f939791 | [
"BSL-1.0"
] | null | null | null | """
Number Field Ideals
AUTHORS:
- Steven Sivek (2005-05-16)
- William Stein (2007-09-06): vastly improved the doctesting
- William Stein and John Cremona (2007-01-28): new class
NumberFieldFractionalIdeal now used for all except the 0 ideal
- Radoslav Kirov and Alyson Deines (2010-06-22):
prime_to_S_part, is... | 33.818851 | 425 | 0.531385 |
443fb2c4e1cfe8dcc35fe9ae22809c35084f95ea | 11,910 | py | Python | QUANTAXIS/__init__.py | qingduyu/QUANTAXIS | 1ac7def710d5c170b4980f5926bb97816f452867 | [
"MIT"
] | 1 | 2019-01-01T14:01:29.000Z | 2019-01-01T14:01:29.000Z | QUANTAXIS/__init__.py | qingduyu/QUANTAXIS | 1ac7def710d5c170b4980f5926bb97816f452867 | [
"MIT"
] | null | null | null | QUANTAXIS/__init__.py | qingduyu/QUANTAXIS | 1ac7def710d5c170b4980f5926bb97816f452867 | [
"MIT"
] | 2 | 2018-11-30T07:52:14.000Z | 2021-05-28T23:00:20.000Z | #coding :utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2018 yutiansut/QUANTAXIS
#
# 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 th... | 65.801105 | 206 | 0.590512 |
0ba75752f6302b4ac69edd74e3a2785329277326 | 4,056 | py | Python | skimage/io/tests/test_mpl_imshow.py | jjhelmus/scikit-image | b9b5fde0821fe8bcece2528b30d012c65c64ad6f | [
"BSD-3-Clause"
] | 2 | 2017-03-30T11:22:11.000Z | 2019-03-03T05:18:01.000Z | skimage/io/tests/test_mpl_imshow.py | jjhelmus/scikit-image | b9b5fde0821fe8bcece2528b30d012c65c64ad6f | [
"BSD-3-Clause"
] | null | null | null | skimage/io/tests/test_mpl_imshow.py | jjhelmus/scikit-image | b9b5fde0821fe8bcece2528b30d012c65c64ad6f | [
"BSD-3-Clause"
] | 1 | 2019-12-17T14:53:28.000Z | 2019-12-17T14:53:28.000Z | from __future__ import division
import numpy as np
from skimage import io
from skimage._shared._warnings import expected_warnings
import matplotlib.pyplot as plt
def setup():
io.reset_plugins()
# test images. Note that they don't have their full range for their dtype,
# but we still expect the display range to ... | 31.6875 | 79 | 0.636588 |
0cddb725f46c96a7220d36b3440adef3382d045e | 288 | py | Python | examples/2.py | CBORT-NCBIB/oct-cbort | 7f2bc525bb3f5b3bcf2e41622129c87ee710161a | [
"MIT"
] | 2 | 2021-12-16T00:03:19.000Z | 2022-02-21T10:58:39.000Z | examples/2.py | CBORT-NCBIB/oct-cbort | 7f2bc525bb3f5b3bcf2e41622129c87ee710161a | [
"MIT"
] | null | null | null | examples/2.py | CBORT-NCBIB/oct-cbort | 7f2bc525bb3f5b3bcf2e41622129c87ee710161a | [
"MIT"
] | 2 | 2021-11-19T02:32:50.000Z | 2021-12-16T00:05:43.000Z | import os
if os.name == 'nt':
os.system("python -m oct examples//data//2_BL_Catheter1_rat_clot_ramp_struct_ps tomo+struct+ps+proj mgh 1")
elif os.name == 'posix':
os.system("python -m oct examples//data//2_BL_Catheter1_rat_clot_ramp_struct_ps tomo+struct+angio+ps+proj mgh 1")
| 32 | 117 | 0.743056 |
db30e9bf5ca81cd6a83d6eafb4142c9bb37a6c4e | 1,815 | py | Python | test_code/grader_relu.py | pl80tech/CarND-Traffic-Sign-Classifier-Project | aac1de9d2d24cb0b4280c7733579a101a13ee2fa | [
"MIT"
] | 2 | 2018-09-24T04:43:31.000Z | 2018-09-24T04:44:13.000Z | test_code/grader_relu.py | pl80tech/CarND-Traffic-Sign-Classifier-Project | aac1de9d2d24cb0b4280c7733579a101a13ee2fa | [
"MIT"
] | null | null | null | test_code/grader_relu.py | pl80tech/CarND-Traffic-Sign-Classifier-Project | aac1de9d2d24cb0b4280c7733579a101a13ee2fa | [
"MIT"
] | 1 | 2018-10-11T05:16:47.000Z | 2018-10-11T05:16:47.000Z | import numpy as np
from tensorflow.python.framework.errors import FailedPreconditionError
import re
def get_result(output):
"""
Run tests
"""
answer = np.array([
[5.11000013, 8.44000053],
[0., 0.],
[24.01000214, 38.23999786]])
result = {
'correct': False,
... | 26.691176 | 93 | 0.563636 |
04c71d4e40c2ded8265246f75fda1105eccae0f1 | 4,379 | py | Python | test/functional/wallet_keypool_topup.py | tokyocoin-project/tokyocoin | 48cbabf73f0687cc04b6658cf69aba65aa1b997d | [
"MIT"
] | null | null | null | test/functional/wallet_keypool_topup.py | tokyocoin-project/tokyocoin | 48cbabf73f0687cc04b6658cf69aba65aa1b997d | [
"MIT"
] | null | null | null | test/functional/wallet_keypool_topup.py | tokyocoin-project/tokyocoin | 48cbabf73f0687cc04b6658cf69aba65aa1b997d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2019 The Tokyocoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test HD Wallet keypool restore function.
Two nodes. Node1 is under test. Node0 is providing transact... | 46.585106 | 164 | 0.654259 |
5c54627a793c4e208697803920447312b8b56a56 | 6,092 | py | Python | model/g_p.py | MatthewAbugeja/lmbn | 6e18e752f95614ef37d5a767672cb81e82708d94 | [
"MIT"
] | 45 | 2021-01-25T15:42:59.000Z | 2022-03-22T07:08:40.000Z | model/g_p.py | MatthewAbugeja/lmbn | 6e18e752f95614ef37d5a767672cb81e82708d94 | [
"MIT"
] | 12 | 2021-01-29T05:00:35.000Z | 2022-02-11T01:12:00.000Z | model/g_p.py | MatthewAbugeja/lmbn | 6e18e752f95614ef37d5a767672cb81e82708d94 | [
"MIT"
] | 13 | 2021-01-27T06:38:32.000Z | 2022-03-06T05:35:28.000Z | import copy
import torch
from torch import nn
import torch.nn.functional as F
import random
import math
from .osnet import osnet_x1_0, OSBlock
from .attention import BatchDrop, BatchRandomErasing, PAM_Module, CAM_Module, SE_Module, Dual_Module
from .bnneck import BNNeck, BNNeck3
from torch.autograd import Variable
... | 33.108696 | 100 | 0.584537 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.