hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
59ac79b02165f363e79977cf2e4e24693e6b4703 | 1,551 | py | Python | Human/imbalance_treatment.py | dipta007/SEMal | 8c89e385ff946a2f9b9c5cefff3e0becc8e6a455 | [
"MIT"
] | 1 | 2020-07-02T00:39:15.000Z | 2020-07-02T00:39:15.000Z | Human/imbalance_treatment.py | dipta007/SEMal | 8c89e385ff946a2f9b9c5cefff3e0becc8e6a455 | [
"MIT"
] | 7 | 2020-11-13T18:35:24.000Z | 2022-02-26T22:50:33.000Z | Human/imbalance_treatment.py | dipta007/SEMal | 8c89e385ff946a2f9b9c5cefff3e0becc8e6a455 | [
"MIT"
] | 1 | 2020-10-12T01:51:22.000Z | 2020-10-12T01:51:22.000Z | import numpy as np
from tqdm import tqdm
import math
K = 100
def eucledian_distance(x, y):
sum = 0
for i in range(len(x)):
now = (x[i] - y[i]) * (x[i] - y[i])
sum += now
return math.sqrt(sum)
def eucledian_distance_mat(x, y):
x = np.asarray(x, np.float)
y = np.asarray(y, np.floa... | 24.234375 | 70 | 0.557705 |
e0edec036657775bff9ffda293a44c74d7feb55e | 4,051 | py | Python | losses.py | srikrishnapriyad/youtube-8m | 463f9abb926db956ed5191ab26d56fa6f3b15030 | [
"Apache-2.0"
] | 2 | 2019-07-25T12:53:10.000Z | 2019-08-18T16:26:23.000Z | losses.py | srikrishnapriyad/youtube-8m | 463f9abb926db956ed5191ab26d56fa6f3b15030 | [
"Apache-2.0"
] | null | null | null | losses.py | srikrishnapriyad/youtube-8m | 463f9abb926db956ed5191ab26d56fa6f3b15030 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 39.330097 | 80 | 0.707726 |
876b6b46f7508b81d9039d520b2fde84d343a016 | 2,004 | py | Python | dexctl/client.py | mikedougherty/dexctl-py | fd77fa0839ab0891d0f9c4cd14bea2ae1b969600 | [
"MIT"
] | 1 | 2020-03-26T22:52:05.000Z | 2020-03-26T22:52:05.000Z | dexctl/client.py | mikedougherty/dexctl-py | fd77fa0839ab0891d0f9c4cd14bea2ae1b969600 | [
"MIT"
] | null | null | null | dexctl/client.py | mikedougherty/dexctl-py | fd77fa0839ab0891d0f9c4cd14bea2ae1b969600 | [
"MIT"
] | null | null | null | import typing
import grpc
from .pb import DexStub
from .pb import api_pb2
class DexClient:
OAuth2Client = api_pb2.Client
def __init__(self, channel):
self.stub = DexStub(channel)
def GetVersion(self) -> api_pb2.VersionResp:
return self.stub.GetVersion(api_pb2.VersionReq())
def Cre... | 27.081081 | 86 | 0.661677 |
2bac0087005ec9cabec5caf6e0ad3b560c9138b4 | 4,782 | py | Python | iCloud/remove_duplicates.py | ZacksAmber/utils | 96b6368de5b5006b56243b59e6d7c6deb2ae94c3 | [
"MIT"
] | null | null | null | iCloud/remove_duplicates.py | ZacksAmber/utils | 96b6368de5b5006b56243b59e6d7c6deb2ae94c3 | [
"MIT"
] | null | null | null | iCloud/remove_duplicates.py | ZacksAmber/utils | 96b6368de5b5006b56243b59e6d7c6deb2ae94c3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
################################################################################
# File Name: remove_duplicates.py #
# File Path: /remove_duplicates.py #
# Created Date: 2022-02-15 ... | 39.196721 | 123 | 0.458595 |
d9dfa74ea780bbb298be9f292c046b5498adb3c3 | 1,420 | py | Python | tests/test_automata.py | vincentdavis/special-sequences | b7b7f8c2bd2f655baeb7b2139ddf007615bffd67 | [
"MIT"
] | 1 | 2020-04-15T10:46:57.000Z | 2020-04-15T10:46:57.000Z | tests/test_automata.py | vincentdavis/special-sequences | b7b7f8c2bd2f655baeb7b2139ddf007615bffd67 | [
"MIT"
] | 1 | 2016-09-14T03:57:25.000Z | 2016-09-14T03:57:25.000Z | tests/test_automata.py | vincentdavis/special-sequences | b7b7f8c2bd2f655baeb7b2139ddf007615bffd67 | [
"MIT"
] | null | null | null | from unittest import TestCase
from seqs.Automata import RegularLanguage
class RegExpTest(TestCase):
# tuples (L,[strings in L],[strings not in L])
languages = [
(RegularLanguage("0"), ["0"], ["", "00"]),
(RegularLanguage("(10+0)*"), ["", "0", "010"], ["1"]),
(RegularLanguage("(0+1)*1(0... | 34.634146 | 79 | 0.558451 |
3dd06b91fbe55e8ad7a3d0eeb1fd28b1930d02dd | 2,579 | py | Python | etl/jobs/transformation/quality_assurance_transformer_job.py | PDCMFinder/pdcm-etl | df0006e4ad5ca2ddf9c1387e28a0b7fb24f195de | [
"Apache-2.0"
] | 1 | 2022-01-28T16:01:59.000Z | 2022-01-28T16:01:59.000Z | etl/jobs/transformation/quality_assurance_transformer_job.py | PDCMFinder/pdcm-etl | df0006e4ad5ca2ddf9c1387e28a0b7fb24f195de | [
"Apache-2.0"
] | 37 | 2022-02-09T18:19:13.000Z | 2022-03-29T12:14:19.000Z | etl/jobs/transformation/quality_assurance_transformer_job.py | PDCMFinder/pdcm-etl | df0006e4ad5ca2ddf9c1387e28a0b7fb24f195de | [
"Apache-2.0"
] | null | null | null | import sys
from pyspark.sql import DataFrame, SparkSession
from etl.jobs.util.cleaner import init_cap_and_trim_all
from etl.jobs.util.dataframe_functions import transform_to_fk
from etl.jobs.util.id_assigner import add_id
from pyspark.sql.functions import lit, input_file_name, col
def main(argv):
"""
Creates... | 37.926471 | 102 | 0.759597 |
1b464f5c77a5862203459b557eb2ebebd5410f5f | 84 | py | Python | mfr/extensions/image/__init__.py | yacchin1205/RDM-modular-file-renderer | 5bd18175a681d21e7be7fe0238132335a1cd8ded | [
"Apache-2.0"
] | 36 | 2015-08-31T20:24:22.000Z | 2021-12-17T17:02:44.000Z | mfr/extensions/image/__init__.py | yacchin1205/RDM-modular-file-renderer | 5bd18175a681d21e7be7fe0238132335a1cd8ded | [
"Apache-2.0"
] | 190 | 2015-01-02T06:22:01.000Z | 2022-01-19T11:27:03.000Z | mfr/extensions/image/__init__.py | yacchin1205/RDM-modular-file-renderer | 5bd18175a681d21e7be7fe0238132335a1cd8ded | [
"Apache-2.0"
] | 47 | 2015-01-27T15:45:22.000Z | 2021-01-27T22:43:03.000Z | from .export import ImageExporter # noqa
from .render import ImageRenderer # noqa
| 28 | 41 | 0.785714 |
a961e7c32d6396faecb34167c9f0b4beff3e2370 | 131 | py | Python | test/testdata/execute_params_error.py | Scartography/mapchete | f7d1a74acb4021adfd3053501416d2b974c40af9 | [
"MIT"
] | 161 | 2016-02-20T15:18:13.000Z | 2022-03-28T11:55:32.000Z | test/testdata/execute_params_error.py | Scartography/mapchete | f7d1a74acb4021adfd3053501416d2b974c40af9 | [
"MIT"
] | 387 | 2015-08-12T07:16:56.000Z | 2022-03-30T14:27:12.000Z | test/testdata/execute_params_error.py | Scartography/mapchete | f7d1a74acb4021adfd3053501416d2b974c40af9 | [
"MIT"
] | 20 | 2016-02-22T12:51:54.000Z | 2022-01-30T22:54:08.000Z | """Test to raise MapcheteProcessImportError."""
def execute():
""" "Function needs to have exactly one argument."""
pass
| 18.714286 | 56 | 0.671756 |
972d51bb4b7f17299a874decb2f1b422317d0f70 | 3,566 | py | Python | modules/discriminator.py | GGGHSL/InfoSwap-master | 0484ef5fcb35bf811f2c3ec52ecf77ccade822db | [
"CC0-1.0"
] | 37 | 2021-11-01T14:16:23.000Z | 2022-03-29T14:30:54.000Z | modules/discriminator.py | GGGHSL/InfoSwap-master | 0484ef5fcb35bf811f2c3ec52ecf77ccade822db | [
"CC0-1.0"
] | 15 | 2021-11-16T12:52:08.000Z | 2022-03-31T09:22:18.000Z | modules/discriminator.py | GGGHSL/InfoSwap-master | 0484ef5fcb35bf811f2c3ec52ecf77ccade822db | [
"CC0-1.0"
] | 9 | 2021-11-02T07:25:35.000Z | 2022-03-04T10:15:44.000Z | import torch.nn as nn
import numpy as np
class NLayerDiscriminator(nn.Module):
def __init__(self, input_nc, ndf=64, n_layers=6, norm_layer=nn.BatchNorm2d, use_sigmoid=False, getIntermFeat=False):
super(NLayerDiscriminator, self).__init__()
self.getIntermFeat = getIntermFeat
self.n_layers =... | 32.715596 | 120 | 0.547392 |
070eb36f6a76e508b098086b7beb14703e700350 | 4,606 | py | Python | final/final_part3/operations.py | MrDDaye/cna_cp1855 | 5b83f5877d373e9499e379ba93b04c394c13db5f | [
"MIT"
] | null | null | null | final/final_part3/operations.py | MrDDaye/cna_cp1855 | 5b83f5877d373e9499e379ba93b04c394c13db5f | [
"MIT"
] | null | null | null | final/final_part3/operations.py | MrDDaye/cna_cp1855 | 5b83f5877d373e9499e379ba93b04c394c13db5f | [
"MIT"
] | null | null | null | """Operations team manager program."""
from cli import display_lineup_header, display_player, display_player_position, display_player_stats, display_farewell, display_player_updated
from inputs import get_lineup_number, get_string, get_position, get_int
from baseball_stats import batting_average
from files import... | 45.156863 | 143 | 0.688667 |
b791845bcd824f236d4c73eff111d2064e28c2e7 | 6,377 | py | Python | tests/apps/migrations/auto/test_serialisation.py | aminalaee/piccolo | af8d2d45294dcd84f4f9b6028752aa45b699ec15 | [
"MIT"
] | null | null | null | tests/apps/migrations/auto/test_serialisation.py | aminalaee/piccolo | af8d2d45294dcd84f4f9b6028752aa45b699ec15 | [
"MIT"
] | null | null | null | tests/apps/migrations/auto/test_serialisation.py | aminalaee/piccolo | af8d2d45294dcd84f4f9b6028752aa45b699ec15 | [
"MIT"
] | null | null | null | from enum import Enum
from unittest import TestCase
from piccolo.apps.migrations.auto.serialisation import serialise_params
from piccolo.columns.base import OnDelete
from piccolo.columns.choices import Choice
from piccolo.columns.column_types import Varchar
from piccolo.columns.defaults import DateNow, TimeNow, Timest... | 34.47027 | 171 | 0.604987 |
a318cfffb506fb9fe169e481e671bef86d28e1e3 | 1,869 | py | Python | dataPipelines/gc_scrapy/gc_scrapy/GCSeleniumSpider.py | dod-advana/gamechanger-crawlers | e0113111a39f78bd13f70fa4b3359a688f7dc6e8 | [
"MIT"
] | 8 | 2021-05-20T18:39:35.000Z | 2022-02-25T23:24:21.000Z | dataPipelines/gc_scrapy/gc_scrapy/GCSeleniumSpider.py | dod-advana/gamechanger-crawlers | e0113111a39f78bd13f70fa4b3359a688f7dc6e8 | [
"MIT"
] | 4 | 2021-06-14T13:46:46.000Z | 2022-03-02T02:01:49.000Z | dataPipelines/gc_scrapy/gc_scrapy/GCSeleniumSpider.py | dod-advana/gamechanger-crawlers | e0113111a39f78bd13f70fa4b3359a688f7dc6e8 | [
"MIT"
] | 4 | 2021-06-30T22:18:52.000Z | 2021-11-17T22:43:27.000Z | # -*- coding: utf-8 -*-
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
import typing
from dataPipelines.gc_scrapy.gc_scrapy.runspider_settings import general_settings, selenium_settings
from dataPipeli... | 35.264151 | 122 | 0.695559 |
a701a901aa7d6ea8d5f9dc69f88e2f07f7ac3b99 | 11,259 | py | Python | pymysqldao/dao/baseDao.py | AsuraChj/PyMySQLDao | f1638a2b2d449e71b089824193da8f5a95f56114 | [
"MIT"
] | null | null | null | pymysqldao/dao/baseDao.py | AsuraChj/PyMySQLDao | f1638a2b2d449e71b089824193da8f5a95f56114 | [
"MIT"
] | null | null | null | pymysqldao/dao/baseDao.py | AsuraChj/PyMySQLDao | f1638a2b2d449e71b089824193da8f5a95f56114 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding: utf-8 -*-
# file_name: baseDao.py
# author: ScCcWe
# time: 2022/3/4 12:35 下午
from typing import List, Dict
from pymysql.connections import Connection
from pymysqldao.log.logger import logger
from pymysqldao.constant.COMMON import DEBUG
from pymysqldao.err import ParamTypeError, P... | 39.784452 | 118 | 0.557243 |
feb6075676df5afc4bf2e78d9cae9b993d4b827f | 4,413 | py | Python | chemtonic/splitting/clustering.py | mldlproject/chemtonic | 88b1d01d89a2b7d59ed701dccd9849649f9bea1f | [
"MIT"
] | null | null | null | chemtonic/splitting/clustering.py | mldlproject/chemtonic | 88b1d01d89a2b7d59ed701dccd9849649f9bea1f | [
"MIT"
] | null | null | null | chemtonic/splitting/clustering.py | mldlproject/chemtonic | 88b1d01d89a2b7d59ed701dccd9849649f9bea1f | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
from chemtonic.featurizer.RDKitMD.getRDKitMD import *
from chemtonic.curation.utils import molStructVerify
from .utils import suggest_K, visualizeElbow
#=======================================================... | 45.494845 | 156 | 0.552005 |
3b354f9aa2bffcdb287989b607d2e93e609bec5e | 6,709 | py | Python | src/main_timm_version.py | HamaguchiKazuki/MahalanobisAD-pytorch | afdcf574865d6d021a13d81996701e0bcd2783b2 | [
"Apache-2.0"
] | null | null | null | src/main_timm_version.py | HamaguchiKazuki/MahalanobisAD-pytorch | afdcf574865d6d021a13d81996701e0bcd2783b2 | [
"Apache-2.0"
] | null | null | null | src/main_timm_version.py | HamaguchiKazuki/MahalanobisAD-pytorch | afdcf574865d6d021a13d81996701e0bcd2783b2 | [
"Apache-2.0"
] | null | null | null | import argparse
from typing import List
import numpy as np
import os
import pickle
from tqdm import tqdm
from sklearn.metrics import roc_auc_score
from sklearn.metrics import roc_curve
from sklearn.metrics import confusion_matrix
from sklearn.covariance import LedoitWolf
from sklearn.manifold import TSNE
from scipy.spa... | 37.272222 | 114 | 0.629155 |
9c8a38c3ecd6e45fbf3470c0d50c68a4e21b6639 | 12,506 | py | Python | hwilib/cli.py | tkijewski/HWI | 0b78229c94dce72f5b33ee4555ba78f25f64d2e1 | [
"MIT"
] | null | null | null | hwilib/cli.py | tkijewski/HWI | 0b78229c94dce72f5b33ee4555ba78f25f64d2e1 | [
"MIT"
] | null | null | null | hwilib/cli.py | tkijewski/HWI | 0b78229c94dce72f5b33ee4555ba78f25f64d2e1 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
from .commands import backup_device, displayaddress, enumerate, find_device, \
get_client, getmasterxpub, getxpub, getkeypool, prompt_pin, restore_device, send_pin, setup_device, \
signmessage, signtx, wipe_device, install_udev_rules
from .errors import (
handle_errors,
DEVICE_C... | 50.837398 | 248 | 0.726131 |
b9201724009d8bdf16fedd23e1bd3e1cb23e7b9c | 2,018 | py | Python | PP4E/Examples/PP4E/Gui/Tools/threadtools-test-classes.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | PP4E/Examples/PP4E/Gui/Tools/threadtools-test-classes.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | PP4E/Examples/PP4E/Gui/Tools/threadtools-test-classes.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | # tests thread callback queue, but uses class bound methods for action and callbacks
import time
from threadtools import threadChecker, startThread
from tkinter.scrolledtext import ScrolledText
class MyGUI:
def __init__(self, reps=3):
self.reps = reps # uses default Tk root
... | 42.041667 | 85 | 0.557483 |
cbaa53098a9be915ace17bee930847bbf004f640 | 189 | py | Python | Python 3 - Estrutura de Controle/Desafio 52.py | Paimonz/Python-Estudos | bbc4d7abb2eebff7f160eac54a290fd9ea7a1cff | [
"MIT"
] | null | null | null | Python 3 - Estrutura de Controle/Desafio 52.py | Paimonz/Python-Estudos | bbc4d7abb2eebff7f160eac54a290fd9ea7a1cff | [
"MIT"
] | null | null | null | Python 3 - Estrutura de Controle/Desafio 52.py | Paimonz/Python-Estudos | bbc4d7abb2eebff7f160eac54a290fd9ea7a1cff | [
"MIT"
] | null | null | null | n = int(input ('Digite um número inteiro:'))
if n % 1 == 0 and n % n == 0 and n % 2 == 1:
print('O número {} é primo!'.format(n))
else:
print (' número {} NÃO é primo!'.format(n))
| 27 | 47 | 0.544974 |
adbaa09e900a7bbf942454d968c965b560041620 | 1,874 | py | Python | lib/rucio/common/rse_attributes.py | ejr004/rucio | 81620cc54e3536e3656dfc83a4563da4ee39247e | [
"Apache-2.0"
] | null | null | null | lib/rucio/common/rse_attributes.py | ejr004/rucio | 81620cc54e3536e3656dfc83a4563da4ee39247e | [
"Apache-2.0"
] | null | null | null | lib/rucio/common/rse_attributes.py | ejr004/rucio | 81620cc54e3536e3656dfc83a4563da4ee39247e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2015-2022 CERN
#
# 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... | 30.721311 | 108 | 0.702241 |
f20ddc80c73201d4d9d0a6b0a1cef12bc5e68703 | 1,070 | py | Python | Greedy/45_Jump_Game_II.py | hren-ron/LeetCode | 3ba2766f8e6ad2bfb5c9686b362f000824e78474 | [
"Apache-2.0"
] | null | null | null | Greedy/45_Jump_Game_II.py | hren-ron/LeetCode | 3ba2766f8e6ad2bfb5c9686b362f000824e78474 | [
"Apache-2.0"
] | null | null | null | Greedy/45_Jump_Game_II.py | hren-ron/LeetCode | 3ba2766f8e6ad2bfb5c9686b362f000824e78474 | [
"Apache-2.0"
] | null | null | null | '''
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Your goal is to reach the last index in the minimum number of jumps.
Example:
Input: [2,3,1,1,4]
Output: 2
Explanation: The minim... | 22.291667 | 102 | 0.514953 |
e3e90a8224766e0801460c906b7b0a3aabf3c006 | 3,161 | py | Python | django_app/todo/todo/settings.py | the-vikas/ToDo-List | eadf91792e251085f9701c21369e3981123a83a8 | [
"bzip2-1.0.6"
] | null | null | null | django_app/todo/todo/settings.py | the-vikas/ToDo-List | eadf91792e251085f9701c21369e3981123a83a8 | [
"bzip2-1.0.6"
] | null | null | null | django_app/todo/todo/settings.py | the-vikas/ToDo-List | eadf91792e251085f9701c21369e3981123a83a8 | [
"bzip2-1.0.6"
] | null | null | null | """
Django settings for todo project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# Buil... | 25.288 | 91 | 0.694401 |
0181b3fc4cd5efc6cd8e097ee0d6fc4fcce0a812 | 451 | py | Python | great_expectations/render/renderer/__init__.py | ncsu-las/great_expectations | b4606e184eb97dd84787d7f56699fed708c7b731 | [
"Apache-2.0"
] | null | null | null | great_expectations/render/renderer/__init__.py | ncsu-las/great_expectations | b4606e184eb97dd84787d7f56699fed708c7b731 | [
"Apache-2.0"
] | null | null | null | great_expectations/render/renderer/__init__.py | ncsu-las/great_expectations | b4606e184eb97dd84787d7f56699fed708c7b731 | [
"Apache-2.0"
] | null | null | null | from .column_section_renderer import (
ProfilingResultsColumnSectionRenderer,
ValidationResultsColumnSectionRenderer,
ExpectationSuiteColumnSectionRenderer,
)
from .other_section_renderer import (
ProfilingResultsOverviewSectionRenderer
)
from .page_renderer import (
ProfilingResultsPageRenderer,
... | 25.055556 | 59 | 0.840355 |
df024893307f81d3c7c616526c7fb739e04ca2d1 | 397 | py | Python | leads/migrations/0003_auto_20190211_1142.py | exenin/Django-CRM | 009461beb2279590c656465c6b47cd2e1e5aaa70 | [
"MIT"
] | 2 | 2020-07-28T12:32:57.000Z | 2020-08-20T11:47:07.000Z | leads/migrations/0003_auto_20190211_1142.py | exenin/Django-CRM | 009461beb2279590c656465c6b47cd2e1e5aaa70 | [
"MIT"
] | 8 | 2020-06-05T20:58:52.000Z | 2022-03-11T23:48:48.000Z | leads/migrations/0003_auto_20190211_1142.py | exenin/Django-CRM | 009461beb2279590c656465c6b47cd2e1e5aaa70 | [
"MIT"
] | 5 | 2020-03-21T09:55:05.000Z | 2020-04-03T06:51:02.000Z | # Generated by Django 2.1.5 on 2019-02-11 06:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('leads', '0002_lead_tags'),
]
operations = [
migrations.AlterField(
model_name='lead',
name='email',
fiel... | 20.894737 | 75 | 0.594458 |
744c5e3fc853e5dc2a65c8e3b1d6d952a9a0c656 | 2,657 | py | Python | infoxlm/fairseq/fairseq/binarizer.py | Maria-philna/unilm | 5550a335c6d2ae5838b1a90e50cb46f81edcd50f | [
"MIT"
] | 5,129 | 2019-09-30T11:21:03.000Z | 2022-03-31T22:35:12.000Z | infoxlm/fairseq/fairseq/binarizer.py | Maria-philna/unilm | 5550a335c6d2ae5838b1a90e50cb46f81edcd50f | [
"MIT"
] | 604 | 2019-10-05T00:39:46.000Z | 2022-03-31T11:12:07.000Z | infoxlm/fairseq/fairseq/binarizer.py | Maria-philna/unilm | 5550a335c6d2ae5838b1a90e50cb46f81edcd50f | [
"MIT"
] | 1,034 | 2019-09-30T15:01:32.000Z | 2022-03-31T06:14:50.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from collections import Counter
import os
from fairseq.tokenizer import tokenize_line
def safe_readline(f):
pos = f.tell()
while Tr... | 32.402439 | 104 | 0.521641 |
ac397c39090e60c45aaec83f20f0c525a67ea36a | 1,628 | py | Python | django_cas_ng/migrations/0001_initial.py | forcityplatform/django-cas-ng-mutu | d798a33c382b174e10d525261c89bbc79ed95bc4 | [
"MIT"
] | 2 | 2021-04-23T09:16:09.000Z | 2021-06-14T14:35:22.000Z | django_cas_ng/migrations/0001_initial.py | forcityplatform/django-cas-ng-mutu | d798a33c382b174e10d525261c89bbc79ed95bc4 | [
"MIT"
] | 1 | 2018-10-26T23:29:46.000Z | 2018-10-26T23:29:46.000Z | django_cas_ng/migrations/0001_initial.py | forcityplatform/django-cas-ng-mutu | d798a33c382b174e10d525261c89bbc79ed95bc4 | [
"MIT"
] | 1 | 2020-04-15T11:36:07.000Z | 2020-04-15T11:36:07.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-13 18:08
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migration... | 37.860465 | 159 | 0.613636 |
b68123b7fe0f2053712bceab15706dfb5942c062 | 68,614 | py | Python | versioneer.py | klauer/archstats | 1ba388b34177c1e6f1960fd31cc6bb3d45e8a98a | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-08-25T10:53:56.000Z | 2021-08-25T10:53:56.000Z | versioneer.py | klauer/archstats | 1ba388b34177c1e6f1960fd31cc6bb3d45e8a98a | [
"BSD-3-Clause-LBNL"
] | 22 | 2020-09-16T01:25:02.000Z | 2022-03-07T17:51:49.000Z | versioneer.py | klauer/archstats | 1ba388b34177c1e6f1960fd31cc6bb3d45e8a98a | [
"BSD-3-Clause-LBNL"
] | 2 | 2020-07-16T22:29:34.000Z | 2021-04-15T22:07:53.000Z |
# Version: 0.18
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
==============
* like a rocketeer, but for versions!
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy
* [![Latest Version]
... | 37.576123 | 79 | 0.624144 |
f93963fb7e52f8e28b71628a85a146f113be54eb | 384 | py | Python | plotly/validators/heatmapgl/_z.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/heatmapgl/_z.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/heatmapgl/_z.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class ZValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name='z', parent_name='heatmapgl', **kwargs):
super(ZValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=... | 27.428571 | 75 | 0.635417 |
c373398fb511d61f08caf8d847231639a81b635a | 1,028 | py | Python | inputs/fields/field.py | Receiling/ENPAR | decd2945d21a7be5a0f73c37cfc5e252301aab15 | [
"MIT"
] | 5 | 2021-06-09T13:38:22.000Z | 2022-01-29T05:26:51.000Z | inputs/fields/field.py | Receiling/ENPAR | decd2945d21a7be5a0f73c37cfc5e252301aab15 | [
"MIT"
] | null | null | null | inputs/fields/field.py | Receiling/ENPAR | decd2945d21a7be5a0f73c37cfc5e252301aab15 | [
"MIT"
] | 1 | 2021-10-31T05:09:16.000Z | 2021-10-31T05:09:16.000Z | from abc import ABC, abstractclassmethod
class Field(ABC):
"""Abstract class `Field` define one indexing method,
generate counter from raw text data and index token in raw text data
Arguments:
ABC {ABC} -- abstract base class
"""
@abstractclassmethod
def count_vocab_items(self, count... | 28.555556 | 76 | 0.643969 |
b76f472b4edd5862bf5c0e8571bc3288585dd768 | 2,507 | py | Python | test/functional/feature_help.py | raymaker/deftchain-0.17 | fa0444240eb926b48c475acf50da73322855d7d3 | [
"MIT"
] | null | null | null | test/functional/feature_help.py | raymaker/deftchain-0.17 | fa0444240eb926b48c475acf50da73322855d7d3 | [
"MIT"
] | null | null | null | test/functional/feature_help.py | raymaker/deftchain-0.17 | fa0444240eb926b48c475acf50da73322855d7d3 | [
"MIT"
] | 2 | 2019-01-16T18:48:44.000Z | 2019-01-16T19:01:13.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Verify that starting deftchain with -h works as expected."""
from test_framework.test_framework import Bitc... | 39.793651 | 86 | 0.664539 |
c62c69e06685c3a927c36b7b66d969bf2e686ad8 | 1,263 | py | Python | PyOpenGL-3.0.2/OpenGL/raw/GL/INTEL/parallel_arrays.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | PyOpenGL-3.0.2/OpenGL/raw/GL/INTEL/parallel_arrays.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | PyOpenGL-3.0.2/OpenGL/raw/GL/INTEL/parallel_arrays.py | frederica07/Dragon_Programming_Process | c0dff2e20c1be6db5adc6f9977efae8f7f888ef5 | [
"BSD-2-Clause"
] | null | null | null | '''Autogenerated by get_gl_extensions script, do not edit!'''
from OpenGL import platform as _p, constants as _cs, arrays
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_INTEL_parallel_arrays'
def _f( function ):
return _p.createFunction( function,_p.GL,'GL_INTEL_parallel_arrays',False)
_p.unpack_con... | 39.46875 | 78 | 0.820269 |
0bac9f2479ded23e1264b40704e9cef98be07ec3 | 2,032 | py | Python | tests/client/test_config.py | cfogg/python-client | 40e6891c8240e6b2acd5df538e622e9f15de43d6 | [
"Apache-2.0"
] | null | null | null | tests/client/test_config.py | cfogg/python-client | 40e6891c8240e6b2acd5df538e622e9f15de43d6 | [
"Apache-2.0"
] | null | null | null | tests/client/test_config.py | cfogg/python-client | 40e6891c8240e6b2acd5df538e622e9f15de43d6 | [
"Apache-2.0"
] | null | null | null | """Configuration unit tests."""
# pylint: disable=protected-access,no-self-use,line-too-long
from splitio.client import config
from splitio.engine.impressions import ImpressionsMode
class ConfigSanitizationTests(object):
"""Inmemory storage-based integration tests."""
def test_parse_operation_mode(self):
... | 37.62963 | 94 | 0.671752 |
f95e1333ac543570c7afc2700e11021923f0fd0f | 579 | py | Python | torchtools/test.py | Takezo87/torchtools | 4230305d9063dabee3614f0dcd8557739b90f817 | [
"Apache-2.0"
] | null | null | null | torchtools/test.py | Takezo87/torchtools | 4230305d9063dabee3614f0dcd8557739b90f817 | [
"Apache-2.0"
] | 1 | 2022-02-26T06:23:52.000Z | 2022-02-26T06:23:52.000Z | torchtools/test.py | Takezo87/torchtools | 4230305d9063dabee3614f0dcd8557739b90f817 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 100_test.ipynb (unless otherwise specified).
__all__ = ['items_to_arrays']
# Cell
from .core import *
from .data import *
from .models import *
from .datasets import *
from .augmentations import *
from .datablock import *
from .dataloader import *
# Cell
def items_to_array... | 32.166667 | 91 | 0.704663 |
2b8e46981704623c4bb8affc4b14df1d789e6c25 | 1,835 | py | Python | testpiechart1.py | vigyywaran/foo | 954c03c9c38e7f0198422a1b46d348a453585949 | [
"MIT"
] | null | null | null | testpiechart1.py | vigyywaran/foo | 954c03c9c38e7f0198422a1b46d348a453585949 | [
"MIT"
] | 1 | 2022-03-13T05:50:41.000Z | 2022-03-13T05:50:41.000Z | testpiechart1.py | AshithaDN/Measuring-Calories-of-Food-using-Images | abcead7b19d5eb7540c4d125fba4d1404a26510d | [
"MIT"
] | null | null | null | #! /usr/bin/python3
# This python script creates a piechart of the various categories displayed as a result of labelling the input image. The piechart is stored as a png file for later use.
import matplotlib.pyplot as plt
import collections
import csv
def name1():
percentage=[]
item=[]
#labels=[]
calorie={}
... | 31.101695 | 169 | 0.650136 |
451db55473765539997b3ba1989f626841c7ccce | 623 | py | Python | handlers/util.py | Hironsan/TatsujinDaifugo | 8dfacf2433650eb4bdb0b498168c91faab3fa92e | [
"MIT"
] | 6 | 2016-08-11T14:34:21.000Z | 2021-11-17T20:19:26.000Z | handlers/util.py | Hironsan/TatsujinDaifugo | 8dfacf2433650eb4bdb0b498168c91faab3fa92e | [
"MIT"
] | null | null | null | handlers/util.py | Hironsan/TatsujinDaifugo | 8dfacf2433650eb4bdb0b498168c91faab3fa92e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from models.user import User
def check_group_permission(f):
"""
グループに所属していない場合は、リダイレクトする。
"""
def wrapper(*args):
user = args[0].get_current_user()
if not user:
args[0].redirect(args[0].reverse_url('login'))
return
user = User.get... | 28.318182 | 103 | 0.561798 |
91d7cbdef5402bfa0734ced83e46cdb9e189103f | 269 | py | Python | Dataset/Leetcode/test/35/644.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/test/35/644.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/test/35/644.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def XXX(self, nums: List[int], target: int) -> int:
if target in nums:
return nums.index(target)
for index, value in enumerate(nums):
if value > target:
return index
return len(nums)
| 26.9 | 55 | 0.542751 |
1168288a8b8d5f1d7bff316683f62b394cc50856 | 1,595 | py | Python | nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py | mfalkiewicz/nipype | 775e21b78fb1ffa2ff9cb12e6f052868bd44d052 | [
"Apache-2.0"
] | 1 | 2015-01-19T13:12:27.000Z | 2015-01-19T13:12:27.000Z | nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py | bpinsard/nipype | 373bdddba9f675ef153951afa368729e2d8950d2 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/semtools/brains/tests/test_auto_BRAINSTalairach.py | bpinsard/nipype | 373bdddba9f675ef153951afa368729e2d8950d2 | [
"Apache-2.0"
] | null | null | null | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..segmentation import BRAINSTalairach
def test_BRAINSTalairach_inputs():
input_map = dict(AC=dict(argstr='--AC %s',
sep=',',
),
ACisIndex=dict(argstr='--ACisIndex ',
),
IRP=dict(argstr='--IRP %s'... | 24.921875 | 67 | 0.611285 |
1afd784901b2c94dea1fe82dcff9a52faf2d182f | 1,175 | py | Python | Creating & Running Test Suiter | Batch Testing/TestSuites/All_TestSuites.py | scottwedge/Unit-Test-Framework | 787bef0c2dabd39625ac5b47d9e6681105ccf104 | [
"Apache-2.0"
] | null | null | null | Creating & Running Test Suiter | Batch Testing/TestSuites/All_TestSuites.py | scottwedge/Unit-Test-Framework | 787bef0c2dabd39625ac5b47d9e6681105ccf104 | [
"Apache-2.0"
] | null | null | null | Creating & Running Test Suiter | Batch Testing/TestSuites/All_TestSuites.py | scottwedge/Unit-Test-Framework | 787bef0c2dabd39625ac5b47d9e6681105ccf104 | [
"Apache-2.0"
] | null | null | null | import unittest
from Package1.TC_LoginTest import LoginTest
from Package1.TC_SignupTest import SignupTest
from Package2.TC_PaymentTest import PaymentTest
from Package2.TC_PaymentReturnsTest import PaymentReturnsTest
# Get all the tests from LoginTest, SignUpTest, PaymentTest and PaymentReturnsTest
tc1 = unittest.Test... | 47 | 82 | 0.813617 |
78312eccc35854cf68c72468520748323f5e69b5 | 358 | py | Python | homeassistant/components/remootio/exceptions.py | sam43434/core | 60d41e763daf83cdfef662a99a4daee690f3fb90 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/remootio/exceptions.py | sam43434/core | 60d41e763daf83cdfef662a99a4daee690f3fb90 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/remootio/exceptions.py | sam43434/core | 60d41e763daf83cdfef662a99a4daee690f3fb90 | [
"Apache-2.0"
] | null | null | null | """Exceptions for the Remootio integration."""
from homeassistant.exceptions import HomeAssistantError
class UnsupportedRemootioDeviceError(HomeAssistantError):
"""Error to indicate unsupported Remootio device."""
class UnsupportedRemootioApiVersionError(UnsupportedRemootioDeviceError):
"""Error to indicate... | 32.545455 | 73 | 0.815642 |
10bd8926ceb0fcc4d1162d7eb8a1f67131d4083d | 300 | py | Python | frappe/desk/doctype/onboarding_step/onboarding_step.py | monroy95/frappe | a9411e845634174a7f8c8b11aa0f3dbdbaa4ac7c | [
"MIT"
] | 1 | 2021-12-18T18:37:29.000Z | 2021-12-18T18:37:29.000Z | frappe/desk/doctype/onboarding_step/onboarding_step.py | monroy95/frappe | a9411e845634174a7f8c8b11aa0f3dbdbaa4ac7c | [
"MIT"
] | 3 | 2021-02-27T11:50:14.000Z | 2021-05-03T06:48:49.000Z | frappe/desk/doctype/onboarding_step/onboarding_step.py | monroy95/frappe | a9411e845634174a7f8c8b11aa0f3dbdbaa4ac7c | [
"MIT"
] | 2 | 2021-09-02T09:51:55.000Z | 2021-09-07T04:55:42.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Frappe Technologies and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class OnboardingStep(Document):
def before_export(self, doc):
doc.is_complete = 0
doc.is_skipped = 0
| 25 | 58 | 0.75 |
8a267cbddabe126eabedfeee341fe272c6d172a0 | 1,795 | py | Python | python/637.average-of-levels-in-binary-tree.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 10 | 2019-09-15T00:23:57.000Z | 2022-01-05T12:53:42.000Z | python/637.average-of-levels-in-binary-tree.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 3 | 2021-06-30T00:39:26.000Z | 2021-08-01T07:13:59.000Z | python/637.average-of-levels-in-binary-tree.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 6 | 2020-02-08T02:55:22.000Z | 2022-01-02T22:48:18.000Z | #
# @lc app=leetcode id=637 lang=python3
#
# [637] Average of Levels in Binary Tree
#
# https://leetcode.com/problems/average-of-levels-in-binary-tree/description/
#
# algorithms
# Easy (64.59%)
# Likes: 1926
# Dislikes: 201
# Total Accepted: 187.7K
# Total Submissions: 284.1K
# Testcase Example: '[3,9,20,null,n... | 22.4375 | 79 | 0.581058 |
7411d70f33e1f9db50459b8e0fc2a337de4b0af2 | 1,844 | py | Python | revenue_tracker/models/people.py | mfcovington/django-revenue-tracker | 336b51484b62fac256b086ac565e4f92f8c7223d | [
"BSD-3-Clause"
] | 1 | 2021-09-06T21:07:32.000Z | 2021-09-06T21:07:32.000Z | revenue_tracker/models/people.py | mfcovington/django-revenue-tracker | 336b51484b62fac256b086ac565e4f92f8c7223d | [
"BSD-3-Clause"
] | null | null | null | revenue_tracker/models/people.py | mfcovington/django-revenue-tracker | 336b51484b62fac256b086ac565e4f92f8c7223d | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from customer_tracker.models import Customer as CustomerBase
class Customer(CustomerBase):
class Meta:
proxy = True
@property
def is_repeat_customer(self):
if self.tx_count > 1:
return True
else:
return False
@property
... | 21.694118 | 74 | 0.603037 |
04a4e67fd8312d80a0120d7592da0eea09da44a5 | 2,985 | py | Python | openff/recharge/tests/cli/test_generate.py | openforcefield/openff-recharge | 0ea3ef986e33c3ecf05924e64fb2e1872913b093 | [
"MIT"
] | 7 | 2020-07-20T02:56:48.000Z | 2022-03-22T18:09:00.000Z | openff/recharge/tests/cli/test_generate.py | openforcefield/openff-recharge | 0ea3ef986e33c3ecf05924e64fb2e1872913b093 | [
"MIT"
] | 94 | 2020-07-07T23:59:40.000Z | 2022-03-31T09:03:22.000Z | openff/recharge/tests/cli/test_generate.py | openforcefield/openff-recharge | 0ea3ef986e33c3ecf05924e64fb2e1872913b093 | [
"MIT"
] | null | null | null | import json
import logging
import os
from multiprocessing.pool import Pool
import numpy
import pytest
from openff.recharge.charges.exceptions import OEQuacpacError
from openff.recharge.cli.generate import _compute_esp
from openff.recharge.cli.generate import generate as generate_cli
from openff.recharge.conformers im... | 33.166667 | 84 | 0.723618 |
1890508ce5ad7ba8bb93185245bf356cf858a538 | 6,045 | py | Python | SemEval/dataset_readers/semeval_datareader.py | VanDuc0209/Sentiment_Twitter | 666168b2082a4d3736efed3743c2dc535030065e | [
"MIT"
] | 23 | 2019-05-09T08:23:55.000Z | 2022-03-05T14:10:30.000Z | SemEval/dataset_readers/semeval_datareader.py | VanDuc0209/Sentiment_Twitter | 666168b2082a4d3736efed3743c2dc535030065e | [
"MIT"
] | null | null | null | SemEval/dataset_readers/semeval_datareader.py | VanDuc0209/Sentiment_Twitter | 666168b2082a4d3736efed3743c2dc535030065e | [
"MIT"
] | 6 | 2020-05-20T15:59:40.000Z | 2021-04-06T13:54:19.000Z | import glob
import html
import json
import logging
import os
import re
import string
from typing import Dict
from allennlp.common.file_utils import cached_path
from allennlp.data.dataset_readers.dataset_reader import DatasetReader
from allennlp.data.fields import LabelField, TextField
from allennlp.data.instance impor... | 35.982143 | 95 | 0.603474 |
088ff46e76b6eb07707aafe59412d52c69286bf5 | 2,099 | py | Python | sumo_rl/agents/ql_agent.py | joaovitorblabres/sumo-rl | ec9d178cd0289366ba0a8648da52972d31d1026e | [
"MIT"
] | null | null | null | sumo_rl/agents/ql_agent.py | joaovitorblabres/sumo-rl | ec9d178cd0289366ba0a8648da52972d31d1026e | [
"MIT"
] | null | null | null | sumo_rl/agents/ql_agent.py | joaovitorblabres/sumo-rl | ec9d178cd0289366ba0a8648da52972d31d1026e | [
"MIT"
] | null | null | null | import numpy as np
import random
from sumo_rl.exploration.epsilon_greedy import EpsilonGreedy
class QLAgent:
def __init__(self, starting_state, state_space, action_space, alpha=0.1, gamma=0.95, exploration_strategy=EpsilonGreedy(), groupRecommendation=0.2):
self.state = starting_state
self.state... | 39.603774 | 152 | 0.633635 |
1bb0ced574e0da710b6f1e27302367fc80f23204 | 412 | py | Python | myproject/museos/migrations/0006_auto_20180516_0852.py | pariaspe/X-Serv-Practica-Museos | 349896dae5b2b35440a5e524e81857300e147163 | [
"Apache-2.0"
] | null | null | null | myproject/museos/migrations/0006_auto_20180516_0852.py | pariaspe/X-Serv-Practica-Museos | 349896dae5b2b35440a5e524e81857300e147163 | [
"Apache-2.0"
] | null | null | null | myproject/museos/migrations/0006_auto_20180516_0852.py | pariaspe/X-Serv-Practica-Museos | 349896dae5b2b35440a5e524e81857300e147163 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('museos', '0005_auto_20180513_1745'),
]
operations = [
migrations.AlterField(
model_name='comentario',
... | 20.6 | 58 | 0.614078 |
78989f445ef372f4eac798e2c3277eb36f8f9bb2 | 19,009 | py | Python | gui/alplogparser.py | hanckmann/alplogs | fa9fc538b47303168f131d0e46341e9f9331481a | [
"Apache-2.0"
] | null | null | null | gui/alplogparser.py | hanckmann/alplogs | fa9fc538b47303168f131d0e46341e9f9331481a | [
"Apache-2.0"
] | null | null | null | gui/alplogparser.py | hanckmann/alplogs | fa9fc538b47303168f131d0e46341e9f9331481a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) Patrick Hanckmann
# All rights reserved.
#
# License information is provided in LICENSE.md
#
# Author: Patrick Hanckmann <hanckmann@gmail.com>
# Project: Alpine System Info Log Viewer
from abc import ABCMeta
from pathlib import Path
from datetime import datetime
from typing impo... | 28.757943 | 196 | 0.512231 |
fc6b0f6726ada08b88ac940cce7e1f95ba3f819c | 7,818 | py | Python | pylot/perception/detection/lane_detection_canny_operator.py | Shaviv-Hoffman-Lowitz/pylot | d9a16ffb6fbfdad21c910d9c8efa8c4c831c752f | [
"Apache-2.0"
] | 2 | 2021-06-07T08:51:44.000Z | 2021-06-07T08:54:00.000Z | pylot/perception/detection/lane_detection_canny_operator.py | akhilkanduri/pylot_edited | d1295a42f0edd79670dc64053824a3e075d433e2 | [
"Apache-2.0"
] | null | null | null | pylot/perception/detection/lane_detection_canny_operator.py | akhilkanduri/pylot_edited | d1295a42f0edd79670dc64053824a3e075d433e2 | [
"Apache-2.0"
] | null | null | null | """Implements an operator that detects lanes."""
import math
from collections import namedtuple
import cv2
import erdos
import numpy as np
Line = namedtuple("Line", "x1, y1, x2, y2, slope")
class CannyEdgeLaneDetectionOperator(erdos.Operator):
"""Detects driving lanes using a camera.
The operator uses st... | 37.586538 | 79 | 0.549757 |
c4b4f4c0e448dfbe2f8d6c40ac0e6e9e5609f531 | 2,063 | py | Python | concourse/model/traits/options.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | concourse/model/traits/options.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | concourse/model/traits/options.py | adracus/cc-utils | dcd1ff544d8b18a391188903789d1cac929f50f9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed
# under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... | 29.898551 | 99 | 0.709161 |
e6f661f7a2cc86978e1cf02d95b5a928efe21652 | 27,891 | py | Python | map_test.py | slarda/ur-analysis-tools | 7e7ade4a2418d798ccccc7949b8362faab1e10c9 | [
"Apache-2.0"
] | 1 | 2019-03-25T02:27:48.000Z | 2019-03-25T02:27:48.000Z | map_test.py | slarda/ur-analysis-tools | 7e7ade4a2418d798ccccc7949b8362faab1e10c9 | [
"Apache-2.0"
] | null | null | null | map_test.py | slarda/ur-analysis-tools | 7e7ade4a2418d798ccccc7949b8362faab1e10c9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#####!/usr/local/bin/python3
import os
import pytz
import click
import random
import logging
import harness
import datetime
import pandas as pd
import numpy as np
import ml_metrics as metrics
from tqdm import tqdm
from uuid import uuid4
from dateutil import parser
from config import init_confi... | 38.845404 | 126 | 0.571582 |
91e40b1084ec34e1f901ef665fd545922f27b8d1 | 22,226 | py | Python | cirq/ops/linear_combinations.py | jeffreygrover/Cirq | 17d94cf45f6b09ddf40048ddbb173e50fa293995 | [
"Apache-2.0"
] | null | null | null | cirq/ops/linear_combinations.py | jeffreygrover/Cirq | 17d94cf45f6b09ddf40048ddbb173e50fa293995 | [
"Apache-2.0"
] | null | null | null | cirq/ops/linear_combinations.py | jeffreygrover/Cirq | 17d94cf45f6b09ddf40048ddbb173e50fa293995 | [
"Apache-2.0"
] | 1 | 2020-12-18T16:36:41.000Z | 2020-12-18T16:36:41.000Z | # Copyright 2019 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 38.586806 | 80 | 0.602133 |
bcf364002885b6882b13f2328ed566c33e8ec985 | 1,735 | py | Python | lqrrt/constraints.py | jnez71/lqRRT | 4796ee3fa8d1e658dc23c143f576b38d22642e45 | [
"MIT"
] | 71 | 2016-10-20T05:19:39.000Z | 2022-02-13T05:57:11.000Z | lqrrt/constraints.py | jnez71/lqRRT | 4796ee3fa8d1e658dc23c143f576b38d22642e45 | [
"MIT"
] | 12 | 2016-10-02T05:17:15.000Z | 2017-05-04T17:46:30.000Z | lqrrt/constraints.py | jnez71/lqRRT | 4796ee3fa8d1e658dc23c143f576b38d22642e45 | [
"MIT"
] | 23 | 2016-10-02T04:18:49.000Z | 2022-02-28T09:37:15.000Z | """
Class for lqrrt constraints.
An instance of this class must be given to an lqrrt planner
to fully define the search problem.
"""
################################################# DEPENDENCIES
from __future__ import division
import numpy as np
import numpy.linalg as npl
#########################################... | 27.983871 | 91 | 0.588473 |
0ba46ee5801be4b17b5413a7560cfb8507b01b38 | 3,378 | py | Python | mitmproxy/proxy/config.py | illera88/mitmproxy | 4f464001841e5119bf57ef620a3257892ded2ded | [
"MIT"
] | 6 | 2020-11-25T07:33:05.000Z | 2022-01-25T07:25:54.000Z | mitmproxy/proxy/config.py | illera88/mitmproxy | 4f464001841e5119bf57ef620a3257892ded2ded | [
"MIT"
] | 18 | 2020-12-28T20:12:26.000Z | 2022-03-15T20:44:40.000Z | mitmproxy/proxy/config.py | illera88/mitmproxy | 4f464001841e5119bf57ef620a3257892ded2ded | [
"MIT"
] | 4 | 2021-03-14T16:14:27.000Z | 2021-09-25T03:01:15.000Z | import os
import re
import typing
from OpenSSL import crypto
from mitmproxy import certs
from mitmproxy import exceptions
from mitmproxy import options as moptions
from mitmproxy.net import server_spec
class HostMatcher:
def __init__(self, handle, patterns=tuple()):
self.handle = handle
self.pat... | 36.322581 | 97 | 0.608644 |
9e75a26a2ca3215e39e3eba35d3ac2e27ebd7f45 | 1,658 | py | Python | watch_later_convert.py | david-ruffner/Youtube-Video-ID-Converter | abe56f2881c7d6852ae5d14720990642bb51a7c3 | [
"MIT"
] | null | null | null | watch_later_convert.py | david-ruffner/Youtube-Video-ID-Converter | abe56f2881c7d6852ae5d14720990642bb51a7c3 | [
"MIT"
] | null | null | null | watch_later_convert.py | david-ruffner/Youtube-Video-ID-Converter | abe56f2881c7d6852ae5d14720990642bb51a7c3 | [
"MIT"
] | null | null | null | import csv
import requests
import json
import pandas as pd
import openpyxl
class Video:
def __init__(self, title, channel):
self.title = title
self.channel = channel
def GetVideoInfo(videoId):
response = requests.get("https://youtube.googleapis.com/youtube/v3/videos?part=snippet&id... | 29.607143 | 130 | 0.624246 |
98bebd6603bbed75923ed756d9394c967e7166a2 | 2,430 | py | Python | scrapy/get_enti_and_know.py | LouisYZK/recruitKG | 2f65f005230ea0ca05eb45d9e1e689f83dec2720 | [
"MIT"
] | null | null | null | scrapy/get_enti_and_know.py | LouisYZK/recruitKG | 2f65f005230ea0ca05eb45d9e1e689f83dec2720 | [
"MIT"
] | null | null | null | scrapy/get_enti_and_know.py | LouisYZK/recruitKG | 2f65f005230ea0ca05eb45d9e1e689f83dec2720 | [
"MIT"
] | null | null | null | import sqlite3
import requests
import json
import time
"""
Input: doc from zhilian_doc.db
Aim:
get the entities/knowledges in the doc.
store them into entites.json/knowledges.json
entities.json:
{
'name+position':List(entities),
}
konwledges.json:
{
'entity':[
['relation', 'entity'],
..... | 25.851064 | 139 | 0.617695 |
8aba4c938888ec1a0757356734b82dbbf8ef1d27 | 4,222 | py | Python | keras_retinanet/utils/visualization.py | Accioy/keras-retinanet | 01dce4547f78588185fa6a138c45279609bfa1c9 | [
"Apache-2.0"
] | 7,141 | 2018-03-22T16:27:31.000Z | 2022-03-31T07:18:34.000Z | keras_retinanet/utils/visualization.py | Accioy/keras-retinanet | 01dce4547f78588185fa6a138c45279609bfa1c9 | [
"Apache-2.0"
] | 1,472 | 2017-11-11T23:10:27.000Z | 2022-03-25T11:04:22.000Z | keras_retinanet/utils/visualization.py | Accioy/keras-retinanet | 01dce4547f78588185fa6a138c45279609bfa1c9 | [
"Apache-2.0"
] | 2,580 | 2017-05-14T14:33:41.000Z | 2022-03-31T15:04:14.000Z | """
Copyright 2017-2018 Fizyr (https://fizyr.com)
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 w... | 39.457944 | 136 | 0.639034 |
69b428edd2e7fa4ea051ebe8df33202b38a5e2e4 | 3,169 | py | Python | Pkg_Template/scripts/ROSPY_TEMPLATE.py | jwatson-CO-edu/ROS1_Templates_Helpers | d2bc9f091c8bfdda01353df9afe70e312f7c7b54 | [
"MIT"
] | null | null | null | Pkg_Template/scripts/ROSPY_TEMPLATE.py | jwatson-CO-edu/ROS1_Templates_Helpers | d2bc9f091c8bfdda01353df9afe70e312f7c7b54 | [
"MIT"
] | null | null | null | Pkg_Template/scripts/ROSPY_TEMPLATE.py | jwatson-CO-edu/ROS1_Templates_Helpers | d2bc9f091c8bfdda01353df9afe70e312f7c7b54 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
########## INIT ####################################################################################
##### Future First #####
from __future__ import division # Future imports must be called before everything else, including triple-quote docs!
"""
James Watson , Template ... | 30.471154 | 245 | 0.575891 |
164a1bd27629991b95d85e7b9374333089e8923d | 1,608 | py | Python | tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_import_contacts_menu_no_network.py | TheoChevalier/gaia | 803d04e3829fd4fe9261211aa0ddca6b79d4e328 | [
"Apache-2.0"
] | 3 | 2016-08-17T08:52:51.000Z | 2020-03-29T04:56:45.000Z | tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_import_contacts_menu_no_network.py | TheoChevalier/gaia | 803d04e3829fd4fe9261211aa0ddca6b79d4e328 | [
"Apache-2.0"
] | 1 | 2017-02-21T21:36:12.000Z | 2017-02-21T21:36:30.000Z | tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_import_contacts_menu_no_network.py | TheoChevalier/gaia | 803d04e3829fd4fe9261211aa0ddca6b79d4e328 | [
"Apache-2.0"
] | 3 | 2019-03-31T04:27:13.000Z | 2020-04-12T17:58:15.000Z | # -*- coding: iso-8859-15 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from gaiatest import GaiaTestCase
from gaiatest.apps.contacts.app import Contacts
class ... | 34.956522 | 78 | 0.755597 |
f1ccc9043ea96a35cdfbfaa0d3d6644d5f8b9c45 | 816 | bzl | Python | recipes/llvm/config.bzl | curoky/rules_cc | 943408c05e2204e1e603b70db05037217a53868d | [
"Apache-2.0"
] | null | null | null | recipes/llvm/config.bzl | curoky/rules_cc | 943408c05e2204e1e603b70db05037217a53868d | [
"Apache-2.0"
] | null | null | null | recipes/llvm/config.bzl | curoky/rules_cc | 943408c05e2204e1e603b70db05037217a53868d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 curoky(cccuroky@gmail.com).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 34 | 74 | 0.708333 |
c27ba8e67d43d9795e02b1cf8dee88ec2e18184d | 8,881 | py | Python | tests/importer/test_importer.py | sheganinans/hy | d7c333e61c88fdc73414cf42c9ec33861e4a9ed9 | [
"MIT"
] | null | null | null | tests/importer/test_importer.py | sheganinans/hy | d7c333e61c88fdc73414cf42c9ec33861e4a9ed9 | [
"MIT"
] | null | null | null | tests/importer/test_importer.py | sheganinans/hy | d7c333e61c88fdc73414cf42c9ec33861e4a9ed9 | [
"MIT"
] | null | null | null | # Copyright 2021 the authors.
# This file is part of Hy, which is free software licensed under the Expat
# license. See the LICENSE.
import os
import sys
import ast
import tempfile
import runpy
import importlib
from fractions import Fraction
from importlib import reload
import pytest
import hy
from hy.lex import hy... | 29.802013 | 114 | 0.623466 |
75d52fe3e538b606d2aa9faadf36f31eeda8edd2 | 40,972 | py | Python | src/natcap/invest/sdr.py | hkotaro1215/invest | 1ba08bd746977bfa8a4600ad8c821fc43598c421 | [
"BSD-3-Clause"
] | null | null | null | src/natcap/invest/sdr.py | hkotaro1215/invest | 1ba08bd746977bfa8a4600ad8c821fc43598c421 | [
"BSD-3-Clause"
] | null | null | null | src/natcap/invest/sdr.py | hkotaro1215/invest | 1ba08bd746977bfa8a4600ad8c821fc43598c421 | [
"BSD-3-Clause"
] | null | null | null | """InVEST Sediment Delivery Ratio (SDR) module.
The SDR method in this model is based on:
Winchell, M. F., et al. "Extension and validation of a geographic
information system-based method for calculating the Revised Universal
Soil Loss Equation length-slope factor for erosion risk assessments in
large ... | 39.170172 | 80 | 0.649102 |
67d5bd9141aa22cec0330a06f5fc9f671cc6c2f6 | 5,173 | py | Python | main.py | PeterParser/BarcodeAnalyzer | f7a3771fea66f21c47d885d7bb3bbe203143a5ff | [
"MIT"
] | 1 | 2021-01-21T14:44:21.000Z | 2021-01-21T14:44:21.000Z | main.py | PeterParser/BarcodeAnalyzer | f7a3771fea66f21c47d885d7bb3bbe203143a5ff | [
"MIT"
] | null | null | null | main.py | PeterParser/BarcodeAnalyzer | f7a3771fea66f21c47d885d7bb3bbe203143a5ff | [
"MIT"
] | null | null | null | import cv2
import glob
import matplotlib.pyplot as plt
from colorama import Fore, Style
from barcode import Barcode
title = r"""██████╗ █████╗ ██████╗ ██████╗ ██████╗ ██████╗ ███████╗ █████╗ ███╗ ██╗ █████╗ ██╗ ██╗ ██╗███████╗███████╗██████╗
██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔═... | 42.401639 | 142 | 0.500483 |
b914824273d8dfa469ac27c8f4635ed3cab42e9e | 90,070 | py | Python | buzzer_music/example.py | 100askTeam/pico-micropython | adbf63c24be0142237577d996dfd5a6211c39f1f | [
"BSD-3-Clause"
] | null | null | null | buzzer_music/example.py | 100askTeam/pico-micropython | adbf63c24be0142237577d996dfd5a6211c39f1f | [
"BSD-3-Clause"
] | null | null | null | buzzer_music/example.py | 100askTeam/pico-micropython | adbf63c24be0142237577d996dfd5a6211c39f1f | [
"BSD-3-Clause"
] | 1 | 2021-03-23T12:12:24.000Z | 2021-03-23T12:12:24.000Z | from buzzer_music import music
from time import sleep
#Example songs
# Test - Me
#song = '0 D4 8 0;0 D5 8 0;0 G4 8 0;8 C5 2 0;10 B4 2 0;12 G4 2 0;14 F4 1 0;15 G4 17 0;16 D4 8 0;24 C4 8 0'
# https://onlinesequencer.net/195547
#song = '0 A#4 1 1;2 F5 1 1;4 D#5 1 1;8 D5 1 1;11 D5 1 1;6 A#4 1 1;14 D#5 1 1;1... | 1,637.636364 | 22,256 | 0.64451 |
b7485a75aa179467315f768ae92b0f88c262a8e3 | 6,697 | py | Python | lang/da.py | TidB/wikitranslator | 55472c0f479ced8cb4e3606c9f39d0846ad02a61 | [
"Xnet",
"X11"
] | 2 | 2019-04-09T00:03:17.000Z | 2019-04-09T00:03:27.000Z | lang/da.py | TidB/wikitranslator | 55472c0f479ced8cb4e3606c9f39d0846ad02a61 | [
"Xnet",
"X11"
] | null | null | null | lang/da.py | TidB/wikitranslator | 55472c0f479ced8cb4e3606c9f39d0846ad02a61 | [
"Xnet",
"X11"
] | 6 | 2016-01-25T22:22:01.000Z | 2020-10-20T05:48:29.000Z | # STANDARD
ADDEDTOGAME = "* Denne genstand blev tilføjet til spillet"
ALLCLASSESBOX = "[[All classes/da|Alle klasser]]"
ITEMLOOK = "Den fremstår som"
NOUNMARKER_INDEFINITE_COSMETIC = "(Navneordsmarkering)"
NOUNMARKER_INDEFINITE_SET = "(navneordsmarkering)"
NOUNMARKER_INDEFINITE_WEAPON = "(Navneordsmarkering)"
SENTENCE... | 35.247368 | 149 | 0.657907 |
b98b99f1674ff9c2363e796c37d7fa62d78e8353 | 9,191 | py | Python | simplify.py | Diffeomorphic/retarget-bvh | 201d6f92c73a1af2837bd498ac5e1d86ef3a9756 | [
"BSD-2-Clause"
] | 3 | 2021-07-15T02:46:28.000Z | 2022-03-31T02:42:50.000Z | simplify.py | Diffeomorphic/retarget-bvh | 201d6f92c73a1af2837bd498ac5e1d86ef3a9756 | [
"BSD-2-Clause"
] | 1 | 2021-08-06T09:28:24.000Z | 2021-08-06T09:28:24.000Z | simplify.py | Diffeomorphic/retarget-bvh | 201d6f92c73a1af2837bd498ac5e1d86ef3a9756 | [
"BSD-2-Clause"
] | 1 | 2020-11-22T18:35:20.000Z | 2020-11-22T18:35:20.000Z | # ------------------------------------------------------------------------------
# BSD 2-Clause License
#
# Copyright (c) 2019, Thomas Larsson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following co... | 29.364217 | 107 | 0.555543 |
27cc4e48473940a0ed28f12c7c9532ab618cb0d2 | 5,338 | py | Python | supervisor/supervisor.py | issacg/supervisor | 53fa8e48c0689669f4ea56afc8ea0b4e398aa69c | [
"Apache-2.0"
] | null | null | null | supervisor/supervisor.py | issacg/supervisor | 53fa8e48c0689669f4ea56afc8ea0b4e398aa69c | [
"Apache-2.0"
] | null | null | null | supervisor/supervisor.py | issacg/supervisor | 53fa8e48c0689669f4ea56afc8ea0b4e398aa69c | [
"Apache-2.0"
] | null | null | null | """Home Assistant control object."""
import asyncio
from contextlib import suppress
from ipaddress import IPv4Address
import logging
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Awaitable, Optional
import aiohttp
from .const import URL_HASSIO_APPARMOR, SUPERVISOR_VERSION
from .c... | 32.54878 | 101 | 0.628887 |
9d524f70a294758510d5896642589e7e3876572e | 651 | py | Python | poetry/utils/helpers.py | blueyed/poetry | 8708540fd4e1e034aa9fbee9398980d80a4a04d3 | [
"MIT"
] | null | null | null | poetry/utils/helpers.py | blueyed/poetry | 8708540fd4e1e034aa9fbee9398980d80a4a04d3 | [
"MIT"
] | null | null | null | poetry/utils/helpers.py | blueyed/poetry | 8708540fd4e1e034aa9fbee9398980d80a4a04d3 | [
"MIT"
] | null | null | null | import re
import shutil
import tempfile
from contextlib import contextmanager
_canonicalize_regex = re.compile('[-_.]+')
def canonicalize_name(name): # type: (str) -> str
return _canonicalize_regex.sub('-', name).lower()
def module_name(name): # type: (str) -> str
return canonicalize_name(name).replace(... | 21 | 57 | 0.666667 |
db23c075c8efc45c2262a81a16e14160d67d907f | 2,452 | py | Python | test/functional/node_network_limited.py | wolfoxonly/ofic | dea8f4aa577999947e1c8f969af60a03e13cae00 | [
"MIT"
] | null | null | null | test/functional/node_network_limited.py | wolfoxonly/ofic | dea8f4aa577999947e1c8f969af60a03e13cae00 | [
"MIT"
] | null | null | null | test/functional/node_network_limited.py | wolfoxonly/ofic | dea8f4aa577999947e1c8f969af60a03e13cae00 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The OFIChain Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Tests NODE_NETWORK_LIMITED.
Tests that a node configured with -prune=550 signals NODE_NETWORK_LIMITED corr... | 42.275862 | 111 | 0.726346 |
627b39b2b1b6e900c0c565c904b5b30ee6f661b2 | 8,803 | py | Python | core/gdrn_modeling/models/pvnet_net/resnet.py | AlbertoRemus/GDR_Net | 114cff27c6fc6048724a6f2bdce2306ab51d798e | [
"Apache-2.0"
] | 132 | 2021-02-25T10:45:29.000Z | 2022-03-30T06:54:26.000Z | core/gdrn_modeling/models/pvnet_net/resnet.py | AlbertoRemus/GDR_Net | 114cff27c6fc6048724a6f2bdce2306ab51d798e | [
"Apache-2.0"
] | 69 | 2021-03-23T12:26:17.000Z | 2022-03-29T09:08:11.000Z | core/gdrn_modeling/models/pvnet_net/resnet.py | AlbertoRemus/GDR_Net | 114cff27c6fc6048724a6f2bdce2306ab51d798e | [
"Apache-2.0"
] | 23 | 2021-03-26T06:21:32.000Z | 2022-03-23T23:53:51.000Z | import torch.nn as nn
import math
import torch.utils.model_zoo as model_zoo
import numpy as np
__all__ = ["ResNet", "resnet18", "resnet34", "resnet50", "resnet101", "resnet152"]
model_urls = {
"resnet18": "https://download.pytorch.org/models/resnet18-5c106cde.pth",
"resnet34": "https://download.pytorch.org/mo... | 31.779783 | 110 | 0.619107 |
9435089eb829fecacc5997189c7278f92a066fa9 | 3,775 | py | Python | Pi Driver.py | OwenSawyer/PiBot | ccb51b168cb418a413250bc136b4385b9cf76e93 | [
"MIT"
] | 1 | 2015-09-03T01:16:54.000Z | 2015-09-03T01:16:54.000Z | Pi Driver.py | owen135731/PiBot | ccb51b168cb418a413250bc136b4385b9cf76e93 | [
"MIT"
] | null | null | null | Pi Driver.py | owen135731/PiBot | ccb51b168cb418a413250bc136b4385b9cf76e93 | [
"MIT"
] | null | null | null |
from pubnub import Pubnub
import json,time
try:
import RPi.GPIO as GPIO
except RuntimeError:
print "Error importing RPi.GPIO! This is probably because you need superuser privileges. You can achieve this by using 'sudo' to run your script"
#Setup GPIO
GPIO.setmode(GPIO.BOARD)
#Setup PubNub
pubnub = Pubnub... | 19.661458 | 151 | 0.627285 |
0c2ca77da16ec200431e9f5f0585ffb801ae2d49 | 3,488 | py | Python | venv/lib/python3.9/site-packages/tinycss2/nth.py | almmello/frozen | c9928491f694b56a0023926bc763c703ba1fd75a | [
"BSD-2-Clause"
] | 87 | 2017-10-02T14:43:10.000Z | 2022-02-07T18:21:03.000Z | venv/lib/python3.9/site-packages/tinycss2/nth.py | almmello/frozen | c9928491f694b56a0023926bc763c703ba1fd75a | [
"BSD-2-Clause"
] | 36 | 2017-07-01T16:40:27.000Z | 2022-02-22T22:02:22.000Z | venv/lib/python3.9/site-packages/tinycss2/nth.py | almmello/frozen | c9928491f694b56a0023926bc763c703ba1fd75a | [
"BSD-2-Clause"
] | 13 | 2018-03-01T20:28:21.000Z | 2021-06-01T14:08:25.000Z | import re
from .parser import _next_significant, _to_token_iterator
def parse_nth(input):
"""Parse `<An+B> <https://drafts.csswg.org/css-syntax-3/#anb>`_,
as found in `:nth-child()
<https://drafts.csswg.org/selectors/#nth-child-pseudo>`_
and related Selector pseudo-classes.
Although tinycss2 doe... | 34.534653 | 79 | 0.584289 |
970291f504f307a281218759223c2abb46125e59 | 1,318 | py | Python | sdwan/sdwan/devicestate.py | sambyers/netauto_learning | 22c1049bf86e188f774f1c977823abea2bb3abfe | [
"MIT"
] | null | null | null | sdwan/sdwan/devicestate.py | sambyers/netauto_learning | 22c1049bf86e188f774f1c977823abea2bb3abfe | [
"MIT"
] | null | null | null | sdwan/sdwan/devicestate.py | sambyers/netauto_learning | 22c1049bf86e188f774f1c977823abea2bb3abfe | [
"MIT"
] | null | null | null |
class DeviceState():
def __init__(self, session):
self.session = session
def get_devices(self, params: dict = None) -> dict:
url = f'{self.session.api_url}/device/'
r = self.session.get(url, params=params)
return r.json()
def get_interface_stats(self, params: dict... | 32.146341 | 69 | 0.612291 |
d182b004094d9d92721d17125669d28978a7c7f0 | 215 | py | Python | d6tflow/tasks/torch.py | Mozin/d6tflow | e332e2244d5d98362eb7d15b4c7800a14a4a56e5 | [
"MIT"
] | 1,004 | 2019-01-11T09:59:26.000Z | 2022-03-31T17:48:50.000Z | d6tflow/tasks/torch.py | Mozin/d6tflow | e332e2244d5d98362eb7d15b4c7800a14a4a56e5 | [
"MIT"
] | 27 | 2019-03-28T02:29:40.000Z | 2022-02-07T12:38:17.000Z | d6tflow/tasks/torch.py | Mozin/d6tflow | e332e2244d5d98362eb7d15b4c7800a14a4a56e5 | [
"MIT"
] | 73 | 2019-02-27T03:13:15.000Z | 2021-08-29T06:10:25.000Z | from d6tflow.tasks import TaskData
from d6tflow.targets.torch import PyTorchModel
class PyTorch(TaskData):
"""
Task which saves to .pt models
"""
target_class = PyTorchModel
target_ext = '.pt'
| 19.545455 | 46 | 0.702326 |
82af3d31c0dcc4b6a3540f4d8649928a823b7e18 | 2,310 | py | Python | tests/parsers/winreg_plugins/shutdown.py | jeppetrost/plaso | b48008c6ea79950eeeef3a05b3a859086c8704b6 | [
"Apache-2.0"
] | null | null | null | tests/parsers/winreg_plugins/shutdown.py | jeppetrost/plaso | b48008c6ea79950eeeef3a05b3a859086c8704b6 | [
"Apache-2.0"
] | null | null | null | tests/parsers/winreg_plugins/shutdown.py | jeppetrost/plaso | b48008c6ea79950eeeef3a05b3a859086c8704b6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the LastShutdown value plugin."""
from __future__ import unicode_literals
import unittest
from plaso.formatters import shutdown as _ # pylint: disable=unused-import
from plaso.lib import definitions
from plaso.parsers.winreg_plugins import shutdown
from te... | 33 | 80 | 0.759307 |
c3bf8c1acf5b3c6fe9a3079323333e48bdf16de9 | 781 | py | Python | main.py | djtimca/spacex-api | 2aff020116f7ba74f468b9a2011b5abf0a9f61b2 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-09-19T10:56:55.000Z | 2021-07-27T15:32:19.000Z | main.py | djtimca/spacex-api | 2aff020116f7ba74f468b9a2011b5abf0a9f61b2 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | main.py | djtimca/spacex-api | 2aff020116f7ba74f468b9a2011b5abf0a9f61b2 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-11-22T17:38:49.000Z | 2020-11-22T17:38:49.000Z | from spacexpypi import SpaceX
import asyncio
async def main():
api_client = SpaceX()
#Roadster Data
success = await api_client.get_roadster_status()
write_file(success, "test_data/roadster.json")
#Next Launch Data
success = await api_client.get_next_launch()
write_file(success, "test_data... | 24.40625 | 59 | 0.709347 |
f9e6785b6c9b1acf7f3a800f3f17e4112d156e8d | 34,948 | py | Python | azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/operations/role_assignments_operations.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/operations/role_assignments_operations.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01/operations/role_assignments_operations.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 47.036339 | 249 | 0.660782 |
caffabdcb39c625a61b5428627a0a1045adc0f4a | 47 | py | Python | python_modules/mylib/__init__.py | plter/PythonCourse2021 | 239d0c70fdc240906b3676e3c7cb134fb7ec685d | [
"MIT"
] | null | null | null | python_modules/mylib/__init__.py | plter/PythonCourse2021 | 239d0c70fdc240906b3676e3c7cb134fb7ec685d | [
"MIT"
] | null | null | null | python_modules/mylib/__init__.py | plter/PythonCourse2021 | 239d0c70fdc240906b3676e3c7cb134fb7ec685d | [
"MIT"
] | null | null | null | # def say_hello():
# print("Hello Python")
| 15.666667 | 27 | 0.595745 |
f46f8651ed123b765e512b2b01f44bcb4673705c | 2,723 | py | Python | baggie/test/test_baggie_writer.py | Box-Robotics/ros2-bagutils | 4542316e0831f727f8d97f4ec271f693a732482b | [
"Apache-2.0"
] | 10 | 2021-02-02T14:38:16.000Z | 2021-11-23T12:15:46.000Z | baggie/test/test_baggie_writer.py | Box-Robotics/ros2-bagutils | 4542316e0831f727f8d97f4ec271f693a732482b | [
"Apache-2.0"
] | null | null | null | baggie/test/test_baggie_writer.py | Box-Robotics/ros2-bagutils | 4542316e0831f727f8d97f4ec271f693a732482b | [
"Apache-2.0"
] | 2 | 2021-02-04T12:20:31.000Z | 2021-03-20T04:16:49.000Z | import unittest
import os
import tempfile
import time
import baggie
from example_interfaces.msg import Int32
N_MSGS = 100
TOPIC_NAME = "/counter"
BAGNAME = "ziplock.bag"
class TestBaggieWriter(unittest.TestCase):
"""
Test fixture for the baggie.Baggie Python interface to writing bag files
"""
def s... | 31.662791 | 78 | 0.639001 |
ebd0d037f3b0d6a5d6696f1ae69eed8e6ca2f187 | 52 | py | Python | s3conf/storage/exceptions.py | sbneto/s3conf | 6eb6df4132ed1557da4128a748585d949015aa59 | [
"MIT"
] | 2 | 2019-05-08T18:41:49.000Z | 2020-06-22T14:43:34.000Z | s3conf/storage/exceptions.py | sbneto/s3conf | 6eb6df4132ed1557da4128a748585d949015aa59 | [
"MIT"
] | 7 | 2018-05-15T16:09:08.000Z | 2019-05-27T12:53:20.000Z | s3conf/storage/exceptions.py | sbneto/s3conf | 6eb6df4132ed1557da4128a748585d949015aa59 | [
"MIT"
] | 1 | 2018-06-19T15:51:43.000Z | 2018-06-19T15:51:43.000Z | class FileDoesNotExist(FileNotFoundError):
pass
| 17.333333 | 42 | 0.807692 |
59620f95c1f644f1c02d63e83eec0e431c10c8d3 | 553 | py | Python | scrapy_lab/mtime/mtime/items.py | ch1huizong/lab | c1622f94ca5c8a716cb5769fa6213060eb7c140d | [
"MIT"
] | null | null | null | scrapy_lab/mtime/mtime/items.py | ch1huizong/lab | c1622f94ca5c8a716cb5769fa6213060eb7c140d | [
"MIT"
] | null | null | null | scrapy_lab/mtime/mtime/items.py | ch1huizong/lab | c1622f94ca5c8a716cb5769fa6213060eb7c140d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class MtimeItem(scrapy.Item):
image_urls = scrapy.Field()
images = scrapy.Field()
image_paths = scrapy.Field()
rank = scrapy.Field()
... | 22.12 | 52 | 0.65642 |
e3e9732bc69d49146de68e1294ca97cee66126d1 | 1,792 | py | Python | Desafios/Desafio 44.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | 2 | 2021-02-06T04:35:44.000Z | 2021-02-08T02:37:33.000Z | Desafios/Desafio 44.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | null | null | null | Desafios/Desafio 44.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | null | null | null | print("""Elabore umprograma que calcule o valor a ser pago por um produto,
considerando o seu \033[1;31mpreço normal\033[0;0m e \033[1;31mcondição de pagamento\033[0;0m:
\033[1;31m-\033[0;0m à vista \033[1;34mdinheiro/cheque:\033[0;0m \033[1;31m10%\033[0;0m de desconto
\033[1;31m-\033[0;0m à vista no \033[1;34mcartão\... | 56 | 99 | 0.688058 |
2feb7f5cadcb1182b6d5e8b6701cde57890b3ab6 | 1,709 | py | Python | app/core/migrations/0001_initial.py | rushi444/recipe-api | 8c7828ee969426ec9093ad0d21f492cca1e310c3 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | rushi444/recipe-api | 8c7828ee969426ec9093ad0d21f492cca1e310c3 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | rushi444/recipe-api | 8c7828ee969426ec9093ad0d21f492cca1e310c3 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-03-13 17:30
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | 50.264706 | 266 | 0.63897 |
c4f4af1588d61975a6c96b4d202df3f7fc842e2d | 30,300 | py | Python | bzt/jmx/tools.py | svetasemashko/taurus | 6f2dbaa60fa71a1f0dc5536171d963df91a1f420 | [
"Apache-2.0"
] | null | null | null | bzt/jmx/tools.py | svetasemashko/taurus | 6f2dbaa60fa71a1f0dc5536171d963df91a1f420 | [
"Apache-2.0"
] | null | null | null | bzt/jmx/tools.py | svetasemashko/taurus | 6f2dbaa60fa71a1f0dc5536171d963df91a1f420 | [
"Apache-2.0"
] | null | null | null | """
Module holds JMX handlers implementations
Copyright 2017 BlazeMeter 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 appli... | 42.141864 | 120 | 0.598152 |
6dea18d2b6454e97f881a62544a4c46801fbf869 | 13,563 | py | Python | infoblox_netmri/client.py | NastyaArslanova/infoblox-netmri | 399d904399ba7958262c6f107fa3b0efdd55019b | [
"Apache-2.0"
] | null | null | null | infoblox_netmri/client.py | NastyaArslanova/infoblox-netmri | 399d904399ba7958262c6f107fa3b0efdd55019b | [
"Apache-2.0"
] | null | null | null | infoblox_netmri/client.py | NastyaArslanova/infoblox-netmri | 399d904399ba7958262c6f107fa3b0efdd55019b | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Infoblox 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... | 35.320313 | 98 | 0.58055 |
0574ccdf72bb9b8368b9992b9a0ae3308da0f6f1 | 9,719 | py | Python | gssutils/transform/cubes.py | GSS-Cogs/gss-utils | 55165c58d8c4fb9dd4ad364059f2c1de24935c06 | [
"Apache-2.0"
] | 1 | 2021-01-21T23:35:12.000Z | 2021-01-21T23:35:12.000Z | gssutils/transform/cubes.py | GSS-Cogs/gss-utils | 55165c58d8c4fb9dd4ad364059f2c1de24935c06 | [
"Apache-2.0"
] | 254 | 2019-10-07T16:17:48.000Z | 2022-01-31T09:20:16.000Z | gssutils/transform/cubes.py | GSS-Cogs/gss-utils | 55165c58d8c4fb9dd4ad364059f2c1de24935c06 | [
"Apache-2.0"
] | 5 | 2020-09-30T16:01:12.000Z | 2021-01-13T18:44:28.000Z | import json
import logging
import os
import copy
from pathlib import Path
from urllib.parse import urljoin
from typing import Optional
from gssutils.csvw.mapping import CSVWMapping
from gssutils.csvw.namespaces import URI
from gssutils.utils import pathify
class Cubes:
"""
A class representing multiple data... | 35.600733 | 112 | 0.605206 |
a51bb9232d03fea7ae412202ac2ce9629d659eb9 | 1,222 | py | Python | nova/api/openstack/compute/legacy_v2/contrib/__init__.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/legacy_v2/contrib/__init__.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/legacy_v2/contrib/__init__.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-03-01T17:04:57.000Z | 2020-03-01T17:04:57.000Z | # Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 32.157895 | 78 | 0.738134 |
31563e01e0c37e006ebec92e498e7dd89dd9162b | 1,052 | py | Python | example_nodeview/migrations/0001_initial.py | SolarLiner/django-node | 0d094301c57fdcd9369dfe40a87566c7092a25d9 | [
"MIT"
] | null | null | null | example_nodeview/migrations/0001_initial.py | SolarLiner/django-node | 0d094301c57fdcd9369dfe40a87566c7092a25d9 | [
"MIT"
] | null | null | null | example_nodeview/migrations/0001_initial.py | SolarLiner/django-node | 0d094301c57fdcd9369dfe40a87566c7092a25d9 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-05-11 21:59
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='House',
fields=[
... | 32.875 | 146 | 0.594106 |
242d312dda357b9c9f9ff472ccf39298ab86ba78 | 8,772 | py | Python | alpaca_trade_api/rest.py | h55nick/alpaca-trade-api-python | b870b0a1896c1373a2ee0ce37179ba21b4f642ee | [
"Apache-2.0"
] | null | null | null | alpaca_trade_api/rest.py | h55nick/alpaca-trade-api-python | b870b0a1896c1373a2ee0ce37179ba21b4f642ee | [
"Apache-2.0"
] | null | null | null | alpaca_trade_api/rest.py | h55nick/alpaca-trade-api-python | b870b0a1896c1373a2ee0ce37179ba21b4f642ee | [
"Apache-2.0"
] | null | null | null | import logging
import os
import requests
from requests.exceptions import HTTPError
import time
from .common import get_base_url, get_credentials
from .entity import (
Account, Asset, Order, Position,
AssetBars, Quote, Fundamental,
Clock, Calendar,
)
from . import polygon
logger = logging.getLogger(__name__... | 30.778947 | 78 | 0.55301 |
fb2c9882bafbd9d4dcec664807375cd42e6d8cd8 | 4,938 | py | Python | batchgenerators/generators/spatial_transform_generators.py | ORippler/MSD_2018 | bf2bb158d8718052d0160daa8cce325fbe0728b4 | [
"Apache-2.0"
] | 15 | 2018-12-03T12:33:30.000Z | 2021-06-18T21:43:53.000Z | batchgenerators/generators/spatial_transform_generators.py | BboyT/batchgenerators | 5ab40f822da52fb2c6bb207060ce3a6d630f4efe | [
"Apache-2.0"
] | 1 | 2018-12-09T04:04:14.000Z | 2019-01-16T16:39:32.000Z | batchgenerators/generators/spatial_transform_generators.py | BboyT/batchgenerators | 5ab40f822da52fb2c6bb207060ce3a6d630f4efe | [
"Apache-2.0"
] | 2 | 2018-11-10T14:03:03.000Z | 2019-04-04T04:58:25.000Z | # Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ)
#
# 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
#... | 45.302752 | 179 | 0.63305 |
4594cf1ac38f0d8aba5a0746d6edada2c33f5284 | 1,216 | py | Python | peter_lists/users/views.py | pvize1/peter_lists | 77e9f30cfc45f500e059b7b163db541335180332 | [
"MIT"
] | null | null | null | peter_lists/users/views.py | pvize1/peter_lists | 77e9f30cfc45f500e059b7b163db541335180332 | [
"MIT"
] | 8 | 2021-05-12T05:53:42.000Z | 2022-03-31T04:08:18.000Z | peter_lists/users/views.py | pvize1/peter_lists | 77e9f30cfc45f500e059b7b163db541335180332 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from django.views.generic import DetailView, RedirectView, UpdateV... | 24.816327 | 87 | 0.751645 |
f481a3800eb7f5f868fa8dd0af4beff10f62dc3a | 2,159 | py | Python | labs/lab3/problem5.py | ioanabirsan/python | 5cff2acf36092e450bb269b37a0571ee62ccec31 | [
"Apache-2.0"
] | null | null | null | labs/lab3/problem5.py | ioanabirsan/python | 5cff2acf36092e450bb269b37a0571ee62ccec31 | [
"Apache-2.0"
] | null | null | null | labs/lab3/problem5.py | ioanabirsan/python | 5cff2acf36092e450bb269b37a0571ee62ccec31 | [
"Apache-2.0"
] | null | null | null | # 5. Fie functia validate_dict care primeste ca parametru un set de tuple care reprezinta reguli de validare pentru un
# dictionar cu chei de tipul string si valori tot de tipul string si un dictionar.
# O regula este definita astfel:
# (cheie, "prefix", "middle", "sufix").
# O valoare este considerata valida dac... | 46.934783 | 124 | 0.642427 |
5b8e85584196b1a2dac112b1a83a0509471e43e4 | 5,620 | py | Python | jina/drivers/helper.py | YueLiu-jina/jina | f3e860313f26edc6d9f6e6ecc74cf6c2a3c65bff | [
"Apache-2.0"
] | null | null | null | jina/drivers/helper.py | YueLiu-jina/jina | f3e860313f26edc6d9f6e6ecc74cf6c2a3c65bff | [
"Apache-2.0"
] | null | null | null | jina/drivers/helper.py | YueLiu-jina/jina | f3e860313f26edc6d9f6e6ecc74cf6c2a3c65bff | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import mimetypes
import os
import urllib.parse
import urllib.request
from typing import Dict, Any, Iterable, Tuple
import numpy as np
from ..proto import jina_pb2
def pb2array(blob: 'jina_pb2.NdArray') -> 'np.ndar... | 36.258065 | 125 | 0.659253 |
4b1e4975c7c35e2ab2ee452840d52a076eac9034 | 91,633 | py | Python | mne/viz/utils.py | vagechirkov/mne-python | f20ffa0eb46e76baf4e30437bc03d765da83b38a | [
"BSD-3-Clause"
] | 1 | 2020-06-18T14:05:26.000Z | 2020-06-18T14:05:26.000Z | mne/viz/utils.py | jaromilfrossard/mne-python | 8714cda45d0f0269c15026323a9ac689b47722f8 | [
"BSD-3-Clause"
] | 2 | 2017-01-18T16:29:02.000Z | 2017-01-19T16:03:25.000Z | mne/viz/utils.py | jaromilfrossard/mne-python | 8714cda45d0f0269c15026323a9ac689b47722f8 | [
"BSD-3-Clause"
] | 1 | 2020-06-18T14:15:16.000Z | 2020-06-18T14:15:16.000Z | # -*- coding: utf-8 -*-
"""Utility functions for plotting M/EEG data."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Mainak Jas <mainak... | 38.663713 | 144 | 0.593716 |
f5493ef1568865b4ce69891b4511017a569d3321 | 2,916 | py | Python | murano/openstack/common/sslutils.py | chenyujie/hybrid-murano | 5577bee4bd636d0de794ca928897fe6b1b69b1a4 | [
"Apache-2.0"
] | null | null | null | murano/openstack/common/sslutils.py | chenyujie/hybrid-murano | 5577bee4bd636d0de794ca928897fe6b1b69b1a4 | [
"Apache-2.0"
] | null | null | null | murano/openstack/common/sslutils.py | chenyujie/hybrid-murano | 5577bee4bd636d0de794ca928897fe6b1b69b1a4 | [
"Apache-2.0"
] | 1 | 2016-04-30T07:27:52.000Z | 2016-04-30T07:27:52.000Z | # Copyright 2013 IBM Corp.
#
# 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 t... | 28.588235 | 78 | 0.653978 |
7da99970aefd207e2010bf7c73c1c7647dc9b012 | 4,663 | py | Python | pebbles/views/import_export.py | CSCfi/pebbles | 24b32e8fc538cc8095fda62c892a8221346c2bce | [
"MIT"
] | 4 | 2017-05-11T14:50:32.000Z | 2020-01-10T09:02:27.000Z | pebbles/views/import_export.py | CSCfi/pebbles | 24b32e8fc538cc8095fda62c892a8221346c2bce | [
"MIT"
] | 145 | 2017-04-07T11:01:58.000Z | 2019-12-11T15:30:23.000Z | pebbles/views/import_export.py | CSCfi/pebbles | 24b32e8fc538cc8095fda62c892a8221346c2bce | [
"MIT"
] | 3 | 2017-10-25T12:36:16.000Z | 2018-04-26T08:49:34.000Z | from flask import g
from flask_restful import fields, marshal_with
from flask import Blueprint as FlaskBlueprint
import logging
from pebbles.models import db, Blueprint, BlueprintTemplate, Plugin, Group
from pebbles.server import restful
from pebbles.views.commons import auth, requires_group_manager_or_admin
from pebb... | 33.546763 | 90 | 0.655372 |
11feb2573477c189a4c64565514bbdadb9cc0144 | 6,335 | py | Python | src/mips/instruction.py | IOverflow/cool-compiler-2020 | 65ee19af19973e25b79de70e0dca7721b93c82b6 | [
"MIT"
] | null | null | null | src/mips/instruction.py | IOverflow/cool-compiler-2020 | 65ee19af19973e25b79de70e0dca7721b93c82b6 | [
"MIT"
] | null | null | null | src/mips/instruction.py | IOverflow/cool-compiler-2020 | 65ee19af19973e25b79de70e0dca7721b93c82b6 | [
"MIT"
] | null | null | null | """
Este modulo ofrece wrappers a las instrucciones de mips de modo que se puedan
parametrizar y sea facil su uso a la hora de escribir en ensamblador.
"""
# ********************** REGISTROS *********************************
zero = 0 # Siempre almacena la constante 0.
at = 1 # Reservado para el assembler.
# Regis... | 23.120438 | 108 | 0.569061 |
0ac108acc327f2b80a43dbd9cd37a167c4a80f9d | 22,956 | py | Python | kge/job/entity_ranking.py | pbloem/kge | 9dcba730cf85acab02cccd49e5ffbd74c8774230 | [
"MIT"
] | 1 | 2021-06-03T10:48:43.000Z | 2021-06-03T10:48:43.000Z | kge/job/entity_ranking.py | pbloem/kge | 9dcba730cf85acab02cccd49e5ffbd74c8774230 | [
"MIT"
] | null | null | null | kge/job/entity_ranking.py | pbloem/kge | 9dcba730cf85acab02cccd49e5ffbd74c8774230 | [
"MIT"
] | null | null | null | import math
import time
import torch
import kge.job
from kge.job import EvaluationJob, Job
from kge import Config, Dataset
from collections import defaultdict
class EntityRankingJob(EvaluationJob):
""" Entity ranking evaluation protocol """
def __init__(self, config: Config, dataset: Dataset, parent_job, mo... | 39.923478 | 91 | 0.540164 |
c5c4ea1ffb37584d2eb03c9b8db1c0e875c8c409 | 6,329 | py | Python | aiocloudpayments/dispatcher/aiohttp_dispatcher.py | drforse/aiocloudpayments | 25b8827250279335d037754dca6978bc79c9b18d | [
"MIT"
] | null | null | null | aiocloudpayments/dispatcher/aiohttp_dispatcher.py | drforse/aiocloudpayments | 25b8827250279335d037754dca6978bc79c9b18d | [
"MIT"
] | null | null | null | aiocloudpayments/dispatcher/aiohttp_dispatcher.py | drforse/aiocloudpayments | 25b8827250279335d037754dca6978bc79c9b18d | [
"MIT"
] | null | null | null | import logging
from typing import Optional, Callable, Awaitable
from aiohttp import web
from aiohttp.abc import Application
from .callback import Result
from .. import AioCpClient
from ..types.notifications import CancelNotification, CheckNotification, ConfirmNotification, \
FailNotification, PayNotification, Rec... | 36.373563 | 112 | 0.609417 |
3dce706ded547ef250abc6494a0668d11fb368c7 | 886 | py | Python | gilbo_experiments_trace_diag/explore.py | BachiLi/autodiff_comp | d2e33db4bd4ac7630b6ee6cfc56b3411cc37e14d | [
"MIT"
] | 2 | 2020-04-15T21:02:55.000Z | 2020-05-07T00:37:21.000Z | gilbo_experiments_trace_diag/explore.py | BachiLi/autodiff_comp | d2e33db4bd4ac7630b6ee6cfc56b3411cc37e14d | [
"MIT"
] | null | null | null | gilbo_experiments_trace_diag/explore.py | BachiLi/autodiff_comp | d2e33db4bd4ac7630b6ee6cfc56b3411cc37e14d | [
"MIT"
] | 1 | 2020-05-06T17:13:56.000Z | 2020-05-06T17:13:56.000Z | import numpy as np
import tensorflow as tf
import time
import math
tf.compat.v1.enable_eager_execution()
def run_exp_0(N):
@tf.function(
experimental_compile=True,
input_signature=[tf.TensorSpec(shape=[N,N], dtype=tf.float32)]
)
def f(A):
grads = None
with tf.GradientTape() as tape:
tape.w... | 22.15 | 76 | 0.61851 |
4e92a5839f506fe3ea2a43bba6d66216f1deae57 | 668 | py | Python | creator/migrations/0009_auto_20210621_1300.py | MeTeoRise/chatbot_automation | 6dfbbdbf8b71219b35052c6549ff32347a6248be | [
"MIT"
] | 3 | 2022-03-04T10:18:29.000Z | 2022-03-23T20:16:01.000Z | creator/migrations/0009_auto_20210621_1300.py | MeTeoRise/chatbot_automation | 6dfbbdbf8b71219b35052c6549ff32347a6248be | [
"MIT"
] | null | null | null | creator/migrations/0009_auto_20210621_1300.py | MeTeoRise/chatbot_automation | 6dfbbdbf8b71219b35052c6549ff32347a6248be | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-06-21 13:00
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('creator', '0008_steps_story'),
]
operations = [
migrations.AlterField(
model_name='steps',
... | 26.72 | 105 | 0.61976 |
e417ec9ff7b4c7766695217d77aa9bad8cfcfc08 | 397 | py | Python | projectenv/projectenv/asgi.py | rzsaglam/project-env | f4c02b15cf924ba5d69d8a4a89efcc686b73aa9c | [
"MIT"
] | null | null | null | projectenv/projectenv/asgi.py | rzsaglam/project-env | f4c02b15cf924ba5d69d8a4a89efcc686b73aa9c | [
"MIT"
] | null | null | null | projectenv/projectenv/asgi.py | rzsaglam/project-env | f4c02b15cf924ba5d69d8a4a89efcc686b73aa9c | [
"MIT"
] | null | null | null | """
ASGI config for projectenv project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.