hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d68a40bb08e6f5b59df50693295056188dd6c8d | 990 | py | Python | python/tree/0429_n-ary_tree_level_order_traversal.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/tree/0429_n-ary_tree_level_order_traversal.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/tree/0429_n-ary_tree_level_order_traversal.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | # Definition for a Node.
class Node(object):
def __init__(self, val, children):
self.val = val
self.children = children
class Solution(object):
def levelOrder(self, root):
"""
:type root: Node
:rtype: List[List[int]]
"""
if root is None:
retu... | 19.8 | 38 | 0.420202 |
1d68e981bc3a0e777319089527ca0c18fa980c3d | 9,313 | py | Python | tests/db_engine_specs/base_engine_spec_tests.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 16 | 2017-01-22T19:24:02.000Z | 2021-04-29T05:34:33.000Z | tests/db_engine_specs/base_engine_spec_tests.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 339 | 2017-03-09T00:02:21.000Z | 2022-03-29T22:28:50.000Z | tests/db_engine_specs/base_engine_spec_tests.py | visshaljagtap/incubator-superset | c9c18011f3cbee144ef8f76568449a4b83325773 | [
"Apache-2.0"
] | 5 | 2017-06-27T03:42:10.000Z | 2020-02-14T18:38:22.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 39.629787 | 88 | 0.606786 |
1d68f00a8a680e32cd1bd5a12cb2723b76d7bd5f | 6,422 | py | Python | autotest/alg/sieve.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/alg/sieve.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/alg/sieve.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test SieveFilter() algorithm.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
###############################################################################
# ... | 26.870293 | 79 | 0.567892 |
1d68ffe4c319e92f3c429e74be151a97be2f7e17 | 37,781 | py | Python | Process/Spectral/_bicoherence.py | jwbrooks0/johnspythonlibrary2 | 10ca519276d8c32da0fbd41a597f75c0c98a8736 | [
"MIT"
] | null | null | null | Process/Spectral/_bicoherence.py | jwbrooks0/johnspythonlibrary2 | 10ca519276d8c32da0fbd41a597f75c0c98a8736 | [
"MIT"
] | null | null | null | Process/Spectral/_bicoherence.py | jwbrooks0/johnspythonlibrary2 | 10ca519276d8c32da0fbd41a597f75c0c98a8736 | [
"MIT"
] | null | null | null |
import numpy as _np
import matplotlib.pyplot as _plt
from johnspythonlibrary2.Plot import subTitle as _subTitle, finalizeFigure as _finalizeFigure #, finalizeSubplot as _finalizeSubplot
from johnspythonlibrary2.Process.Spectral import fft_average, signal_spectral_properties
from johnspythonlibrary2.Process.Misc import... | 27.044381 | 213 | 0.630952 |
1d6907429ada4bb0574ca408c4ece1960a53b0d6 | 3,729 | py | Python | analysis/choice_task/correlations.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | analysis/choice_task/correlations.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | analysis/choice_task/correlations.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
from analysis.correlations import clean_corr_data, combine_corr_matrix
from utils.save_data import write_csv
from visualize.all_tasks import save_plot
import seaborn as sns
import matplotlib.pyplot as plt
def corr_analysis_choice(data_trial, data_subject, path_plots,... | 36.558824 | 78 | 0.581121 |
1d69283c13a2e0a84a1060825e69de40ef8ef99e | 6,767 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_deployment.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_deployment.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_deployment.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Dep... | 30.61991 | 295 | 0.60396 |
1d6935cc117a87ae5c42b575a2967e017393314a | 4,195 | py | Python | PlaqueGAN/diffaug.py | ciaran-coleman/PlaqueGAN2 | 4c0c005be3d3879e5a27cb029f54845d89d7f1a6 | [
"MIT"
] | null | null | null | PlaqueGAN/diffaug.py | ciaran-coleman/PlaqueGAN2 | 4c0c005be3d3879e5a27cb029f54845d89d7f1a6 | [
"MIT"
] | null | null | null | PlaqueGAN/diffaug.py | ciaran-coleman/PlaqueGAN2 | 4c0c005be3d3879e5a27cb029f54845d89d7f1a6 | [
"MIT"
] | null | null | null | # Differentiable Augmentation for Data-Efficient GAN Training
# Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han
# https://arxiv.org/pdf/2006.10738
import torch
import torch.nn.functional as F
# def DiffAugment(x, policy='', channels_first=True):
# if policy:
# if not channels_first:
# ... | 34.958333 | 110 | 0.596663 |
1d696ef9f5a8a2f027f3487c9daf1aa983f14dd5 | 1,283 | py | Python | geneticalgorithm2/mutations.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | 34 | 2020-11-25T15:01:19.000Z | 2022-03-23T17:10:33.000Z | geneticalgorithm2/mutations.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | null | null | null | geneticalgorithm2/mutations.py | mudesire/geneticalgorithm2 | 165d87b182a0b56e035f7a37a17a16950de20ddd | [
"MIT"
] | 7 | 2020-11-30T16:50:16.000Z | 2022-02-22T16:03:45.000Z |
import math
import random
import numpy as np
from .utils import min_fast, max_fast
class Mutations:
@staticmethod
def uniform_by_x():
def func(x: float, left: float, right: float):
alp = min_fast(x - left, right - x)
return np.random.uniform(x - alp, x + alp)
... | 26.183673 | 105 | 0.564302 |
1d697d1b259b795387f1a35ac8371a149a3c9079 | 45,084 | py | Python | Kerning/_kerningStrings.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | 2 | 2021-02-12T20:36:29.000Z | 2021-11-03T08:04:01.000Z | Kerning/_kerningStrings.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | Kerning/_kerningStrings.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
# -*- coding: utf-8 -*-
strings_lc = {}
strings_lc['aa'] = 'bazaars'
strings_lc['ab'] = 'runabout'
strings_lc['ac'] = 'voracity'
strings_lc['ad'] = 'dreadful'
strings_lc['ae'] = 'muraenid'
strings_lc['af'] = 'unsafely'
strings_lc['ag'] = 'enraging'
strings_lc['ah'] = 'megahits'
str... | 27.241088 | 143 | 0.613854 |
1d69be48a16b11529241da923dd043042d84e8a8 | 6,732 | py | Python | src/pptxer/presentations_text_extractor.py | yazeed44/presentations_scraper | 9a3b963ec00f944a4336a88872a8ba90bda2aa11 | [
"MIT"
] | null | null | null | src/pptxer/presentations_text_extractor.py | yazeed44/presentations_scraper | 9a3b963ec00f944a4336a88872a8ba90bda2aa11 | [
"MIT"
] | 2 | 2021-05-17T19:04:32.000Z | 2021-05-17T19:23:35.000Z | src/pptxer/presentations_text_extractor.py | yazeed44/presentations_scraper | 9a3b963ec00f944a4336a88872a8ba90bda2aa11 | [
"MIT"
] | null | null | null | """This module extract text from presentation files (pptx)"""
import json
import os
import time
from typing import List
from pptx import Presentation
from pptx.exc import PackageNotFoundError
from pptxer.util import __calculate_length_stats_for_list_of_strings__
from pptxer import logger
def extract_presentations_t... | 37.820225 | 114 | 0.624926 |
1d69e084bb58650f32b32119c0fef82f6d1d8968 | 1,317 | py | Python | TrainingInterfaces/Text_to_Spectrogram/FastSpeech2/DurationCalculator.py | Flux9665/IMS-Toucan | dca76d37c5ea35bcdb35f979efd533fec75ed855 | [
"Apache-2.0"
] | null | null | null | TrainingInterfaces/Text_to_Spectrogram/FastSpeech2/DurationCalculator.py | Flux9665/IMS-Toucan | dca76d37c5ea35bcdb35f979efd533fec75ed855 | [
"Apache-2.0"
] | null | null | null | TrainingInterfaces/Text_to_Spectrogram/FastSpeech2/DurationCalculator.py | Flux9665/IMS-Toucan | dca76d37c5ea35bcdb35f979efd533fec75ed855 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Nagoya University (Tomoki Hayashi)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
# Adapted by Florian Lux 2021
import matplotlib.pyplot as plt
import torch
class DurationCalculator(torch.nn.Module):
def __init__(self, reduction_factor):
self.reduction_factor = reduction_f... | 32.121951 | 100 | 0.627942 |
1d69e8dd02d9d8280e1d457f7188da1fc32f8eda | 4,023 | py | Python | docusign_rooms/models/api_error.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 2 | 2020-11-11T01:38:45.000Z | 2021-11-14T17:00:43.000Z | docusign_rooms/models/api_error.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | null | null | null | docusign_rooms/models/api_error.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 1 | 2021-11-14T17:00:32.000Z | 2021-11-14T17:00:32.000Z | # coding: utf-8
"""
DocuSign Rooms API - v2
An API for an integrator to access the features of DocuSign Rooms # noqa: E501
OpenAPI spec version: v2
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import... | 27.182432 | 83 | 0.565747 |
1d69fbab651a4220793631e1b221ddda82f8dbc1 | 3,917 | py | Python | learner/flappy_inputs.py | WhitneyOnTheWeb/BetaFlapZero | 40c41721257434accb8c0263f0c121067129ddf5 | [
"MIT"
] | null | null | null | learner/flappy_inputs.py | WhitneyOnTheWeb/BetaFlapZero | 40c41721257434accb8c0263f0c121067129ddf5 | [
"MIT"
] | null | null | null | learner/flappy_inputs.py | WhitneyOnTheWeb/BetaFlapZero | 40c41721257434accb8c0263f0c121067129ddf5 | [
"MIT"
] | null | null | null | import numpy as np
class Inputs:
params = {
'game': {
'name': 'FlappyBird', # name of gmae being played
'fps': 30, # frames per second
'tick': 8, # clock ticks per second
'target': 40, # target sco... | 53.657534 | 98 | 0.435027 |
1d6a19bc1eaae1029934b8a66332da137accffb0 | 14,650 | py | Python | hallo/modules/subscriptions/source_fa_notif_comments.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2018-05-19T22:27:20.000Z | 2018-05-19T22:27:20.000Z | hallo/modules/subscriptions/source_fa_notif_comments.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/modules/subscriptions/source_fa_notif_comments.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from typing import Dict, Optional, List
from urllib.error import HTTPError
from hallo.destination import Destination, User, Channel
from hallo.events import EventMessage
import hallo.modules.subscriptions.source_fa_favs
import hallo.modules.subscriptions.stream_source
import hallo.modules.subscriptions.common_fa_key
i... | 41.977077 | 114 | 0.65727 |
1d6a8b62dbd11cc6b05492a4b97d49f838658e31 | 21,504 | py | Python | libs/dscache/odc/dscache/_jsoncache.py | tahvane1/odc-tools | 1f11133dc243d8e47060add1c95a3719135895c3 | [
"Apache-2.0"
] | 1 | 2021-04-15T23:06:10.000Z | 2021-04-15T23:06:10.000Z | libs/dscache/odc/dscache/_jsoncache.py | tahvane1/odc-tools | 1f11133dc243d8e47060add1c95a3719135895c3 | [
"Apache-2.0"
] | null | null | null | libs/dscache/odc/dscache/_jsoncache.py | tahvane1/odc-tools | 1f11133dc243d8e47060add1c95a3719135895c3 | [
"Apache-2.0"
] | null | null | null | from typing import (
Optional,
Tuple,
List,
Collection,
Iterator,
Union,
Any,
Dict,
Iterable,
)
from uuid import UUID
import json
import lmdb
import zstandard
import operator
import functools
import itertools
import toolz
from types import SimpleNamespace
from pathlib import Path
FO... | 30.244726 | 119 | 0.597191 |
1d6abefd65fdd044992ea34ff49ccce63ede0c5f | 4,897 | py | Python | docs/conf.py | eviatarbach/simulation_runner | e2abc1f0bfd0e0ea85d60aa5bcf99a713b1ac2b9 | [
"MIT"
] | 9 | 2019-05-11T09:29:23.000Z | 2022-01-15T15:05:06.000Z | docs/conf.py | eviatarbach/simulation_runner | e2abc1f0bfd0e0ea85d60aa5bcf99a713b1ac2b9 | [
"MIT"
] | 2 | 2020-02-11T11:41:33.000Z | 2020-09-02T21:14:08.000Z | docs/conf.py | eviatarbach/simulation_runner | e2abc1f0bfd0e0ea85d60aa5bcf99a713b1ac2b9 | [
"MIT"
] | 1 | 2020-11-16T14:33:32.000Z | 2020-11-16T14:33:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# parasweep documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... | 30.042945 | 81 | 0.686747 |
1d6ac0e4be751238bbd2bc23b944dbd13421b73e | 3,392 | py | Python | bin/rerun_dlr.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | 1 | 2019-10-23T11:04:15.000Z | 2019-10-23T11:04:15.000Z | bin/rerun_dlr.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | null | null | null | bin/rerun_dlr.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | null | null | null | #!/home/wiseman/anaconda3/bin/python
import numpy as np
import pandas as pd
import subprocess
import glob
import matplotlib.pyplot as plt
import seaborn as sns
from astropy.coordinates import SkyCoord
import logging
from astropy.table import Table
import astropy.io.fits as fits
import os
from astropy import units as u
... | 34.612245 | 102 | 0.679835 |
1d6ae554ee5fad2abe0cb36483e887f41443c6b7 | 2,267 | py | Python | vyperlogix/logging/standardLogging.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/logging/standardLogging.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/logging/standardLogging.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | import logging
from vyperlogix.enum import Enum
__copyright__ = """\
(c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/)
restricted to non-commercial educational use only.,
http://www.VyperLogix.com for detail... | 39.086207 | 186 | 0.754742 |
1d6b2e03c6c3430c57c2b607173eebe1a568d312 | 171 | py | Python | savu/plugins/loaders/mapping_loaders/base_multi_modal_loader_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/loaders/mapping_loaders/base_multi_modal_loader_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/loaders/mapping_loaders/base_multi_modal_loader_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | from savu.plugins.plugin_tools import PluginTools
class BaseMultiModalLoaderTools(PluginTools):
"""
This class provides a base for all multi-modal loaders
""" | 28.5 | 58 | 0.760234 |
1d6b5e23b38403191bf4a575afe44de032342ad2 | 9,700 | py | Python | python/ray/autoscaler/updater.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 2 | 2019-10-08T13:31:08.000Z | 2019-10-22T18:34:52.000Z | python/ray/autoscaler/updater.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 1 | 2018-12-26T01:09:50.000Z | 2018-12-26T01:09:50.000Z | python/ray/autoscaler/updater.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 6 | 2019-03-12T05:37:35.000Z | 2020-03-09T12:25:17.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
try: # py3
from shlex import quote
except ImportError: # py2
from pipes import quote
import logging
import os
import subprocess
import sys
import tempfile
import time
from multiprocessing import Proc... | 37.451737 | 79 | 0.544124 |
1d6b7dcc0ac00e9c2537b85832c519d4fccf9466 | 4,308 | py | Python | assorted.py | schana/random-hacking | 5eeda2f05681ce9f56f1b9114255c2392e92ee9a | [
"Apache-2.0"
] | null | null | null | assorted.py | schana/random-hacking | 5eeda2f05681ce9f56f1b9114255c2392e92ee9a | [
"Apache-2.0"
] | null | null | null | assorted.py | schana/random-hacking | 5eeda2f05681ce9f56f1b9114255c2392e92ee9a | [
"Apache-2.0"
] | null | null | null | def isCustomerWinner(codeList, shoppingCart):
codeListGroupPointer = 0
shoppingCartPointer = 0
while codeListGroupPointer < len(codeList) and shoppingCartPointer < len(shoppingCart):
if len(codeList[codeListGroupPointer]) > len(shoppingCart) - shoppingCartPointer:
return False
ma... | 43.08 | 173 | 0.62558 |
1d6b7f0c744cbab5b45b87096bc0dcc1dae70ca4 | 881 | py | Python | src/python/test/segmentation/test_connected_components.py | constantinpape/affogato | 22ea369313b01e10f5cfefa21b7db0df719f75b0 | [
"MIT"
] | 6 | 2021-04-11T00:47:37.000Z | 2021-10-03T23:41:06.000Z | src/python/test/segmentation/test_connected_components.py | constantinpape/affogato | 22ea369313b01e10f5cfefa21b7db0df719f75b0 | [
"MIT"
] | 8 | 2019-05-28T16:12:07.000Z | 2022-01-10T18:21:03.000Z | src/python/test/segmentation/test_connected_components.py | constantinpape/affogato | 22ea369313b01e10f5cfefa21b7db0df719f75b0 | [
"MIT"
] | 1 | 2021-06-01T12:16:23.000Z | 2021-06-01T12:16:23.000Z | import unittest
import numpy as np
# TODO check correctness for toy data
class TestConnectedComponents(unittest.TestCase):
def test_cc_2d(self):
from affogato.segmentation import connected_components
shape = (2, 100, 100)
affs = np.random.rand(*shape)
ccs, max_label = connected_co... | 30.37931 | 62 | 0.665153 |
1d6bae28a480598867cdb074b8d3449f3459af5f | 22,238 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 76.948097 | 1,722 | 0.817295 |
1d6bb7e4cee7b97ba96909da0e884e2fe6382d23 | 1,539 | py | Python | examples/AdAccountCampaignsPostLocalAwareness.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | examples/AdAccountCampaignsPostLocalAwareness.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | examples/AdAccountCampaignsPostLocalAwareness.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | 1 | 2018-09-24T14:04:48.000Z | 2018-09-24T14:04:48.000Z | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 37.536585 | 76 | 0.774529 |
1d6bf8c0ba40d4fb8a73b164a927f0c539608b20 | 3,546 | py | Python | tests/forte/processors/base/dummy_batch_processor_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | 2 | 2021-01-01T12:07:27.000Z | 2021-09-10T03:57:18.000Z | tests/forte/processors/base/dummy_batch_processor_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | tests/forte/processors/base/dummy_batch_processor_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Forte 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 ... | 35.818182 | 78 | 0.659616 |
1d6c122a5843ac75e62c5edc496de7d3690e9761 | 6,580 | py | Python | python/baxter_bon_appetit/src/baxter_essentials/baxter_ipk.py | san99tiago/tesis | 70e452cfa9eedbbe64347e2bd8826bb295473d01 | [
"MIT"
] | 4 | 2021-03-09T19:59:50.000Z | 2021-03-31T01:28:24.000Z | python/baxter_bon_appetit/src/baxter_essentials/baxter_ipk.py | san99tiago/tesis | 70e452cfa9eedbbe64347e2bd8826bb295473d01 | [
"MIT"
] | null | null | null | python/baxter_bon_appetit/src/baxter_essentials/baxter_ipk.py | san99tiago/tesis | 70e452cfa9eedbbe64347e2bd8826bb295473d01 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Built-in imports
import math
import cmath
# General module imports
import numpy as np
# Own imports
import baxter_essentials.denavit_hartenberg as dh
class BaxterIPK:
"""
Calculate Baxter's Inverse Pose Kinematics for each limb and with the
desired degrees of freedom for the tot... | 35.567568 | 80 | 0.532371 |
1d6c21dac2cb7cfe37c0ad94368ecf13c002f11e | 3,916 | py | Python | starthinker/task/bigquery/helper.py | danieldjewell/starthinker | 3327d5874f01d7563603b8a82c1ecd6615b9768d | [
"Apache-2.0"
] | 1 | 2020-12-04T17:13:35.000Z | 2020-12-04T17:13:35.000Z | starthinker/task/bigquery/helper.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | starthinker/task/bigquery/helper.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | ###########################################################################
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/l... | 27.577465 | 165 | 0.638662 |
1d6c49be9e4a68b7304075a177f09651d53dc08c | 1,849 | py | Python | tests/test_spice.py | Utagai/spice | a2604ad01c12138067eeb2036258437e0f8e4b82 | [
"MIT"
] | 41 | 2016-08-01T04:57:24.000Z | 2022-02-13T01:38:04.000Z | tests/test_spice.py | Utagai/spice | a2604ad01c12138067eeb2036258437e0f8e4b82 | [
"MIT"
] | 32 | 2016-07-13T18:10:22.000Z | 2018-06-05T22:58:48.000Z | tests/test_spice.py | Utagai/spice | a2604ad01c12138067eeb2036258437e0f8e4b82 | [
"MIT"
] | 14 | 2016-08-25T23:09:03.000Z | 2018-05-06T19:33:32.000Z | from bs4 import BeautifulSoup
import requests
import sys, os
from time import sleep
import spice_api as spice
def test_spice():
creds = spice.init_auth(os.environ['USERNAME'], os.environ['PASSWORD'])
results = spice.search('Re:Zero Kara Hajimeru Isekai Seikatsu',
spice.get_medium('anime'), creds)
... | 37.734694 | 85 | 0.717144 |
1d6c589cf79c51f7ed91aea0ae25fbb647f9703f | 98 | py | Python | conda/_vendor/tqdm/version.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | conda/_vendor/tqdm/version.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | conda/_vendor/tqdm/version.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | """`tqdm` version detector. Precedence: installed dist, git, 'UNKNOWN'."""
__version__ = '4.61.1'
| 32.666667 | 74 | 0.683673 |
1d6cef5d0e10e3ef43c5441b7728b13225c4d7f5 | 5,479 | py | Python | app/modules/admin/model.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 16 | 2020-03-26T13:21:15.000Z | 2021-07-25T18:49:05.000Z | app/modules/admin/model.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 13 | 2020-03-24T18:19:48.000Z | 2022-03-12T00:18:59.000Z | app/modules/admin/model.py | DsCodeStudio98m0f/DTia-Nugrahab | 218ef140727849206fe76f42f43a5a231cfda9d9 | [
"Apache-2.0"
] | 14 | 2020-03-31T01:02:38.000Z | 2021-09-17T01:10:36.000Z | """dao
Data Access Object
PROJECT: BaoAI Backend
AUTHOR: henry <703264459@qq.com>
WEBSITE: http://www.baoai.co
COPYRIGHT: Copyright © 2016-2020 广州源宝网络有限公司 Guangzhou Yuanbao Network Co., Ltd. ( http://www.ybao.org )
LICENSE: Apache-2.0
"""
import time
from app import db
from flask import current_app
from werkzeug.secu... | 35.348387 | 130 | 0.629859 |
1d6d202faa4a6d94c6b846add5bf4723b5ca2aca | 7,861 | py | Python | natbigrams.py | gouskova/compsegcode | 02f8a1b32c8ae3eb8512a0fa3c4c0345822e6578 | [
"MIT"
] | null | null | null | natbigrams.py | gouskova/compsegcode | 02f8a1b32c8ae3eb8512a0fa3c4c0345822e6578 | [
"MIT"
] | null | null | null | natbigrams.py | gouskova/compsegcode | 02f8a1b32c8ae3eb8512a0fa3c4c0345822e6578 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
#standard
import os
import sys
import itertools
from datetime import datetime
#special/external
import scipy
from nltk import ngrams
try:
import pynatclasses as pnc
import messages as msg
except ModuleNotFoundError:
import compseg.code.pynatclasses as pnc
import... | 41.157068 | 386 | 0.663147 |
1d6d380d24b995631ca3ca70e9ecc20f63ad8dbc | 26,467 | py | Python | run_classifier.py | sdhawan1/transformer-drg-style-transfer | 13ef0503ea689b3e4595de819b4889f42b0606e5 | [
"Apache-2.0"
] | null | null | null | run_classifier.py | sdhawan1/transformer-drg-style-transfer | 13ef0503ea689b3e4595de819b4889f42b0606e5 | [
"Apache-2.0"
] | null | null | null | run_classifier.py | sdhawan1/transformer-drg-style-transfer | 13ef0503ea689b3e4595de819b4889f42b0606e5 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy... | 45.320205 | 139 | 0.610383 |
1d6d3dab3816a4b12fc2f2112c2a37ab86160068 | 25,256 | py | Python | sirepo/runner/docker.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | 1 | 2019-06-06T08:08:11.000Z | 2019-06-06T08:08:11.000Z | sirepo/runner/docker.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | sirepo/runner/docker.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
u"""Run jobs in Docker
Locking is very tricky, because there are many long running operations. We
try to release locks when possible when talking to docker daemons, for example.
Always grab `Job.lock` then `_SlotManager.__lock`, and try to avoid holding
both locks.
:copyright: Copyright (c) 2... | 33.057592 | 92 | 0.550285 |
1d6d4ece352170232deb09c3913a3adfc49ee122 | 1,441 | py | Python | test/unit/composer/test_history.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | test/unit/composer/test_history.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | test/unit/composer/test_history.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | import os
from fedot.api.main import Fedot
from fedot.core.optimisers.gp_comp.operators.mutation import MutationTypesEnum
from fedot.core.optimisers.opt_history import ParentOperator
from fedot.core.pipelines.node import PrimaryNode
from fedot.core.pipelines.pipeline import Pipeline
from fedot.core.pipelines.template ... | 38.945946 | 92 | 0.725885 |
1d6d4f9c33bb361f633b1861d9b6918072cfa594 | 2,334 | py | Python | moma_example/data/forms.py | gadio/moma-django | 13265379be1dbab18697e5f42f38b3b37f928aa9 | [
"Apache-2.0"
] | 12 | 2015-03-29T05:31:25.000Z | 2019-06-13T16:17:37.000Z | moma_example/data/forms.py | antoniotaranto/moma-django | 13265379be1dbab18697e5f42f38b3b37f928aa9 | [
"Apache-2.0"
] | 8 | 2015-09-04T21:00:50.000Z | 2021-06-10T17:39:44.000Z | moma_example/data/forms.py | antoniotaranto/moma-django | 13265379be1dbab18697e5f42f38b3b37f928aa9 | [
"Apache-2.0"
] | 3 | 2015-03-25T21:52:14.000Z | 2021-01-11T03:02:29.000Z | #==========================================================================
# Copyright 2012 Lucidel, Inc., 2013 Cloudoscope Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the License.
# You may obtain a copy of the License in the LICENSE f... | 45.764706 | 175 | 0.62168 |
1d6d4fdd6a80ca50e094c02f28d5e47d13d514af | 738 | py | Python | app/recipe/migrations/0001_initial.py | MahmudulHassan5809/recipe-app-api-drf | 10d841dbfbf9e38d9c238138501af592bea4f656 | [
"MIT"
] | null | null | null | app/recipe/migrations/0001_initial.py | MahmudulHassan5809/recipe-app-api-drf | 10d841dbfbf9e38d9c238138501af592bea4f656 | [
"MIT"
] | null | null | null | app/recipe/migrations/0001_initial.py | MahmudulHassan5809/recipe-app-api-drf | 10d841dbfbf9e38d9c238138501af592bea4f656 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.2 on 2021-05-13 16:21
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 28.384615 | 118 | 0.638211 |
1d6d96dedb08c2e8cebec903f22f353ed0708e6e | 2,706 | py | Python | contracts/ontology/compile.py | markvelous/asdex | 09122ee74761a00a08c86f675d755e3b27b02e9f | [
"MIT"
] | null | null | null | contracts/ontology/compile.py | markvelous/asdex | 09122ee74761a00a08c86f675d755e3b27b02e9f | [
"MIT"
] | 6 | 2021-03-25T23:51:13.000Z | 2022-03-12T00:34:39.000Z | contracts/ontology/compile.py | markvelous/asdex | 09122ee74761a00a08c86f675d755e3b27b02e9f | [
"MIT"
] | 1 | 2021-06-06T05:08:13.000Z | 2021-06-06T05:08:13.000Z | from ontology.compiler import Compiler
import os
import sys
rootPath = os.path.join(os.path.abspath(__file__), os.pardir)
def GetContractsFolderPath():
return os.path.abspath(os.path.join(rootPath, "contracts"))
def GetBuildFolderPath():
return os.path.abspath(os.path.join(GetContractsFolderPath(), "build"))... | 29.413043 | 90 | 0.756837 |
1d6e0472fa757671669011cb7d0219f54355fb09 | 4,647 | py | Python | h/app.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | 1 | 2019-11-19T20:57:03.000Z | 2019-11-19T20:57:03.000Z | h/app.py | webdev525woj/h | a3df4a199b2e79980ce9fe8244d811a13fa3239b | [
"BSD-2-Clause"
] | 4 | 2020-03-24T17:38:24.000Z | 2022-03-02T05:45:01.000Z | h/app.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""The main h application."""
from __future__ import unicode_literals
from h._compat import urlparse
import logging
import transaction
from pyramid.settings import asbool
from pyramid.tweens import EXCVIEW
from h.config import configure
from h.views.client import DEFAULT_CLIENT_URL
log = l... | 33.431655 | 88 | 0.705401 |
1d6e3b3ab3bcd20bbde3021ca1705cc96aa453b4 | 755 | py | Python | huobi/model/chaindepositaddress.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | 1 | 2020-12-28T07:04:45.000Z | 2020-12-28T07:04:45.000Z | huobi/model/chaindepositaddress.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | null | null | null | huobi/model/chaindepositaddress.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | 1 | 2022-03-27T10:36:04.000Z | 2022-03-27T10:36:04.000Z |
class ChainDepositAddress:
"""
The deposit address.
:member
currency: The crypto currency to deposit.
address: Deposit address
addressTag: Deposit address tag.
chain: Block chain name.
"""
def __init__(self):
self.currency = ""
self.address = ""
... | 27.962963 | 75 | 0.639735 |
1d6e3bfb7ae060d45b36f6af83658101c1efecb2 | 7,400 | py | Python | tests/test_util.py | weijia/couchapp | 83a1b5c0754f9c205179f4c7d6b0f95e9632ae77 | [
"Apache-2.0"
] | 224 | 2015-01-03T13:35:56.000Z | 2022-02-13T14:27:17.000Z | tests/test_util.py | weijia/couchapp | 83a1b5c0754f9c205179f4c7d6b0f95e9632ae77 | [
"Apache-2.0"
] | 79 | 2015-03-11T15:28:00.000Z | 2022-02-17T13:53:46.000Z | tests/test_util.py | weijia/couchapp | 83a1b5c0754f9c205179f4c7d6b0f95e9632ae77 | [
"Apache-2.0"
] | 56 | 2015-01-03T13:37:22.000Z | 2022-01-11T08:33:38.000Z | # -*- coding: utf-8 -*-
import shutil
import tempfile
import os
from couchapp.errors import AppError
from couchapp.util import discover_apps, iscouchapp, rcpath, split_path
from couchapp.util import sh_open, remove_comments, is_empty_dir, setup_dir
from couchapp.util import setup_dirs
from mock import patch
from nos... | 26.523297 | 75 | 0.645946 |
1d6e5de7e27decdf58b100f4664c90b8a3550ffc | 15,628 | py | Python | ValveView/ValveView.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 48 | 2016-04-13T10:22:53.000Z | 2022-03-21T16:31:41.000Z | ValveView/ValveView.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 14 | 2018-10-25T21:15:20.000Z | 2021-11-26T16:55:55.000Z | ValveView/ValveView.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 21 | 2017-09-12T08:20:36.000Z | 2021-10-30T02:22:11.000Z | import os
import unittest
from __main__ import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
import logging
#
# ValveView
#
class ValveView(ScriptedLoadableModule):
"""Uses ScriptedLoadableModule base class, available at:
https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/ScriptedL... | 46.373887 | 247 | 0.779882 |
1d6e6dfe8e5ac7d18717b51345cc91787f3c9838 | 1,118 | py | Python | batch/slurm_prep.py | dbath/stitchup | 230d14b5269c67468795f83303ed7e4eb4b75600 | [
"BSD-3-Clause"
] | null | null | null | batch/slurm_prep.py | dbath/stitchup | 230d14b5269c67468795f83303ed7e4eb4b75600 | [
"BSD-3-Clause"
] | null | null | null | batch/slurm_prep.py | dbath/stitchup | 230d14b5269c67468795f83303ed7e4eb4b75600 | [
"BSD-3-Clause"
] | null | null | null |
import argparse
import glob
import os
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--handle', type=str, required=True,
help='provide unique identifier to select a subset of directories.')
args = parser.parse_args()
checklist... | 33.878788 | 94 | 0.597496 |
1d6e7df8d60e4382869fe32090a7f8512ac9a37f | 455 | py | Python | binarysearch.io/229_making_change_sequal.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | binarysearch.io/229_making_change_sequal.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | binarysearch.io/229_making_change_sequal.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | class Solution:
def solve(self, denominations, amount):
dp = [float("inf")]*(amount+1)
for i in denominations:
if i <= amount:
dp[i] = 1
for i in range(amount+1):
for j in denominations:
if i - j >= 0:
dp[i... | 25.277778 | 51 | 0.413187 |
1d6e8677d47457b9490dd8794f399842f70c8ebd | 15,062 | py | Python | Keras_tensorflow/source/tensorflow/contrib/learn/python/learn/models.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 65 | 2016-09-26T01:30:40.000Z | 2021-08-11T17:00:41.000Z | Keras_tensorflow/source/tensorflow/contrib/learn/python/learn/models.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 5 | 2017-02-21T08:37:52.000Z | 2017-03-29T05:46:05.000Z | Keras_tensorflow/source/tensorflow/contrib/learn/python/learn/models.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 11 | 2017-09-10T16:22:21.000Z | 2021-08-09T09:24:50.000Z | # Copyright 2016 The TensorFlow 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 applica... | 39.223958 | 80 | 0.680919 |
1d6e986b97231ff01d3e582f06f81d73d8e8f0c0 | 5,194 | py | Python | fiepipedesktoplib/watchfolder/shell/watchfolder.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/watchfolder/shell/watchfolder.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/watchfolder/shell/watchfolder.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | import os
import os.path
import typing
from fiepipedesktoplib.assetaspect.shell.config import AssetConfigCommand
from fiepipedesktoplib.gitstorage.shells.gitasset import Shell as GitAssetShell
from fiepipelib.localplatform.routines.localplatform import get_local_platform_routines
from fiepipelib.localuser.routines.loc... | 34.171053 | 116 | 0.680208 |
1d6e9bbaef867e48c2476294bd2dd15d65e999d6 | 271 | py | Python | examples/cs106a/6-namesurfer/namesurferentry.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 5 | 2018-12-03T19:18:50.000Z | 2021-05-31T07:17:06.000Z | examples/cs106a/6-namesurfer/namesurferentry.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 1 | 2017-06-07T04:33:46.000Z | 2017-06-07T04:33:46.000Z | examples/cs106a/6-namesurfer/namesurferentry.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 1 | 2017-06-06T07:29:07.000Z | 2017-06-06T07:29:07.000Z | import collections
NameSurferEntry = collections.namedtuple('NameSurferEntry', ['name', 'ranks'])
# TODO(sredmond): Is it worth writing a __str__ method?
def from_line(line):
name, *ranks = line.split(' ')
return NameSurferEntry(name, [int(r) for r in ranks])
| 27.1 | 78 | 0.712177 |
1d6ea06ace663666e2ab30702b337c29b0c57231 | 21,459 | py | Python | tests/python/pants_test/util/test_dirutil.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/util/test_dirutil.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/util/test_dirutil.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import errno
import os
import time
import unittest
from contextlib import contextmanager
... | 38.319643 | 109 | 0.643133 |
1d6ea53c9013d75eee2d10cfa1ff351ae7367a5a | 1,915 | py | Python | setup.py | iburadempa/pg_jts | bbb444525c6c3760bfd5407e884782824594d0e0 | [
"MIT"
] | 9 | 2015-10-21T18:08:01.000Z | 2021-05-26T15:33:14.000Z | setup.py | iburadempa/pg_jts | bbb444525c6c3760bfd5407e884782824594d0e0 | [
"MIT"
] | 6 | 2015-11-16T18:36:06.000Z | 2020-08-09T10:36:27.000Z | setup.py | iburadempa/pg_jts | bbb444525c6c3760bfd5407e884782824594d0e0 | [
"MIT"
] | 3 | 2015-11-16T09:55:13.000Z | 2018-03-29T02:04:20.000Z | import re
from os import path
from setuptools import setup
repo_root_dir = path.abspath(path.dirname(__file__))
def get_version():
with open(path.join(repo_root_dir, 'pg_jts', '__init__.py'),
encoding='utf-8') as version_file:
match = re.search(r'^__version__ = \((\d+), (\d+), (\d+)\)$',
... | 32.457627 | 76 | 0.625587 |
1d6eaa114d44b26662940c242b717f124a9a9555 | 276 | py | Python | template/{{cookiecutter.repository_name}}/{{cookiecutter.package_name}}/datastream/__init__.py | Aiwizo/ml-workflow | 88e104fce571dd3b76914626a52f9001342c07cc | [
"Apache-2.0"
] | 4 | 2020-09-23T15:39:24.000Z | 2021-09-12T22:11:00.000Z | template/{{cookiecutter.repository_name}}/{{cookiecutter.package_name}}/datastream/__init__.py | Aiwizo/ml-workflow | 88e104fce571dd3b76914626a52f9001342c07cc | [
"Apache-2.0"
] | 4 | 2020-09-23T15:07:39.000Z | 2020-10-30T10:26:24.000Z | template/{{cookiecutter.repository_name}}/{{cookiecutter.package_name}}/datastream/__init__.py | Aiwizo/ml-workflow | 88e104fce571dd3b76914626a52f9001342c07cc | [
"Apache-2.0"
] | null | null | null | from {{cookiecutter.package_name}}.datastream.augmenter import augmenter
from {{cookiecutter.package_name}}.datastream.evaluate_datastreams import (
evaluate_datastreams
)
from {{cookiecutter.package_name}}.datastream.gradient_datastream import (
GradientDatastream
)
| 34.5 | 75 | 0.822464 |
1d6ec868d84f0dc8bf977fbdfa263b977f00e998 | 13,211 | py | Python | lib/rucio/tests/test_authentication.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 187 | 2017-11-07T10:19:34.000Z | 2022-03-13T11:59:40.000Z | lib/rucio/tests/test_authentication.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 2,592 | 2017-10-25T06:57:46.000Z | 2022-03-31T22:53:51.000Z | lib/rucio/tests/test_authentication.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 322 | 2017-10-10T06:36:36.000Z | 2022-03-31T17:13:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2012-2021 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... | 46.517606 | 140 | 0.7384 |
1d6ede3662b42d99736c9017302ab200e7f0d7de | 1,441 | py | Python | leetcode/medium/518-Coin_change_2.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/518-Coin_change_2.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/518-Coin_change_2.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #518
"""
from typing import List
class Solution:
def change(self, amount: int, coins: List[int]) -> int:
memo = {}
def helper(target, curr, idx):
if target == 0:
return 1
if memo.get((idx, target)) is not None:
return memo[... | 25.280702 | 63 | 0.462873 |
1d6f18ec9fda8d44d5b5297d9939b763b12e4574 | 31,018 | py | Python | examples/qas_passage/run_qas_passage.py | yumoxu/pytorch-transformers | 4184e261873aa63c92607f073697fb68385f6739 | [
"Apache-2.0"
] | null | null | null | examples/qas_passage/run_qas_passage.py | yumoxu/pytorch-transformers | 4184e261873aa63c92607f073697fb68385f6739 | [
"Apache-2.0"
] | null | null | null | examples/qas_passage/run_qas_passage.py | yumoxu/pytorch-transformers | 4184e261873aa63c92607f073697fb68385f6739 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 53.47931 | 154 | 0.635341 |
1d6f23e1b900fc2c398031bb8d3dfe3859858d9f | 12,593 | py | Python | src/bin/qpnet_decode.py | entn-at/QPNet | 6c11ad452531bb8fb1cbba10f1b385032445d240 | [
"Apache-2.0"
] | 12 | 2019-11-07T14:54:21.000Z | 2020-09-14T20:13:26.000Z | src/bin/qpnet_decode.py | entn-at/QPNet | 6c11ad452531bb8fb1cbba10f1b385032445d240 | [
"Apache-2.0"
] | 2 | 2020-08-13T04:19:45.000Z | 2021-11-08T08:29:40.000Z | src/bin/qpnet_decode.py | entn-at/QPNet | 6c11ad452531bb8fb1cbba10f1b385032445d240 | [
"Apache-2.0"
] | 1 | 2020-03-15T15:32:26.000Z | 2020-03-15T15:32:26.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 Wu Yi-Chiao (Nagoya University)
# based on a WaveNet script by Tomoki Hayashi (Nagoya University)
# (https://github.com/kan-bayashi/PytorchWaveNetVocoder)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
from __future__ import division
import ... | 37.479167 | 100 | 0.604145 |
1d6f7ebf750953c8420872e5af915e63a7be9013 | 11,902 | py | Python | scqubits/core/spec_lookup.py | IlyaLSMmisis/scqubits-1 | c4915c998c2d1ef3348db0e4c423e74c7181da40 | [
"BSD-3-Clause"
] | null | null | null | scqubits/core/spec_lookup.py | IlyaLSMmisis/scqubits-1 | c4915c998c2d1ef3348db0e4c423e74c7181da40 | [
"BSD-3-Clause"
] | null | null | null | scqubits/core/spec_lookup.py | IlyaLSMmisis/scqubits-1 | c4915c998c2d1ef3348db0e4c423e74c7181da40 | [
"BSD-3-Clause"
] | null | null | null | # spec_lookup.py
#
# This file is part of scqubits.
#
# Copyright (c) 2019, Jens Koch and Peter Groszkowski
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
#############################################... | 37.077882 | 120 | 0.644514 |
1d6f83c9549ad3006b15d6dba7e783aec9f25965 | 2,521 | py | Python | alipay/aop/api/response/AlipayUserAlipaypointBudgetlibQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayUserAlipaypointBudgetlibQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayUserAlipaypointBudgetlibQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayUserAlipaypointBudgetlibQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayUserAlipaypointBudgetlibQueryResponse, self).__init__()
self._budget_code... | 29.313953 | 116 | 0.664419 |
1d6faa9b03ae5af5b9b50791bff5d1ac45eeba00 | 11,444 | py | Python | discreteflow_model.py | johnding1996/UMD-CMSC726-Project | c2e57368476ccb1a9576003e9562644886595e85 | [
"MIT"
] | 118 | 2019-02-18T15:00:46.000Z | 2022-02-01T00:05:00.000Z | discreteflow_model.py | johnding1996/UMD-CMSC726-Project | c2e57368476ccb1a9576003e9562644886595e85 | [
"MIT"
] | 8 | 2019-04-17T07:31:58.000Z | 2021-04-30T04:18:59.000Z | discreteflow_model.py | johnding1996/UMD-CMSC726-Project | c2e57368476ccb1a9576003e9562644886595e85 | [
"MIT"
] | 16 | 2019-03-07T02:57:23.000Z | 2021-05-13T03:02:36.000Z | import torch
from torch import nn
from torch.distributions import Categorical
import torch.nn.functional as F
import math
import sys
from lstm_flow import AFPrior
from common import FeedForwardNet
from utils import make_pos_cond
class InferenceBlock(nn.Module):
def __init__(self, inf_inp_dim, hidden_size, zsize,... | 41.463768 | 176 | 0.643132 |
1d702b71931b6dbf3f4b463721cd01f681e1e315 | 18,268 | py | Python | plugins/labhub.py | jennyjj/corobo | ce9cf184e3faebb4962f0a2c07d54e0d239b8036 | [
"MIT"
] | null | null | null | plugins/labhub.py | jennyjj/corobo | ce9cf184e3faebb4962f0a2c07d54e0d239b8036 | [
"MIT"
] | 1 | 2018-10-14T10:07:20.000Z | 2018-10-14T10:07:20.000Z | plugins/labhub.py | jennyjj/corobo | ce9cf184e3faebb4962f0a2c07d54e0d239b8036 | [
"MIT"
] | null | null | null | import datetime
import re
import time
import github3
from IGitt.GitHub.GitHub import GitHub, GitHubToken
from IGitt.GitLab.GitLab import GitLab, GitLabPrivateToken
from errbot import BotPlugin, cmdfilter, re_botcmd
from errbot.templating import tenv
from plugins import constants
from utils.backends import message_lin... | 39.286022 | 186 | 0.512755 |
1d7057f387d5e2c270bd6257f22fedc986c7127a | 104 | py | Python | bugzoo/mgr/coverage/__init__.py | pdreiter/BugZoo | e164ee67ff8bd3addfcc87b5e38ff1774992196b | [
"MIT"
] | 53 | 2017-12-02T03:22:06.000Z | 2022-03-10T22:20:52.000Z | bugzoo/mgr/coverage/__init__.py | pdreiter/BugZoo | e164ee67ff8bd3addfcc87b5e38ff1774992196b | [
"MIT"
] | 145 | 2017-11-29T23:23:06.000Z | 2020-09-17T22:17:44.000Z | bugzoo/mgr/coverage/__init__.py | pdreiter/BugZoo | e164ee67ff8bd3addfcc87b5e38ff1774992196b | [
"MIT"
] | 8 | 2018-06-26T17:58:49.000Z | 2021-09-07T14:03:41.000Z | from .extractor import CoverageExtractor, register, register_as_default
from .gcov import GcovExtractor
| 34.666667 | 71 | 0.865385 |
1d7061ddb54808a81eb0d3e50af8d5ff7bd62083 | 97 | py | Python | test.py | MehranTaghian/pytorch-soft-actor-critic | 757dd399fa3cdc75207db626d8df34b8a602f130 | [
"MIT"
] | null | null | null | test.py | MehranTaghian/pytorch-soft-actor-critic | 757dd399fa3cdc75207db626d8df34b8a602f130 | [
"MIT"
] | null | null | null | test.py | MehranTaghian/pytorch-soft-actor-critic | 757dd399fa3cdc75207db626d8df34b8a602f130 | [
"MIT"
] | null | null | null | import gym
import CustomGymEnvs
env = gym.make("AntEnv-v1")
obs = env.reset()
print(obs.shape) | 12.125 | 27 | 0.721649 |
1d707dda5f163636cfc28fa074c7385168b0e9de | 3,643 | py | Python | picamera_mqtt/tools/acquire_host.py | ethanjli/picamera-mqtt | 52562dc000b6d00bca5fc602d03d6879e629618f | [
"BSD-3-Clause"
] | 6 | 2019-04-11T10:00:07.000Z | 2021-07-01T11:46:30.000Z | picamera_mqtt/tools/acquire_host.py | ethanjli/picamera-mqtt | 52562dc000b6d00bca5fc602d03d6879e629618f | [
"BSD-3-Clause"
] | null | null | null | picamera_mqtt/tools/acquire_host.py | ethanjli/picamera-mqtt | 52562dc000b6d00bca5fc602d03d6879e629618f | [
"BSD-3-Clause"
] | 3 | 2018-12-16T15:47:00.000Z | 2020-05-17T02:24:52.000Z | """Test script to obtain a single image snapshot with remote cameras."""
import argparse
import asyncio
import logging
import logging.config
from picamera_mqtt import data_path
from picamera_mqtt.deploy import (
client_config_plain_name, client_configs_path
)
from picamera_mqtt.imaging.mqtt_client_host import Hos... | 32.238938 | 78 | 0.672797 |
1d70a7652f6ab1d768eb21f1b854c3344965802d | 16,016 | py | Python | docusign_rooms/models/classic_manager_permissions.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 2 | 2020-11-11T01:38:45.000Z | 2021-11-14T17:00:43.000Z | docusign_rooms/models/classic_manager_permissions.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | null | null | null | docusign_rooms/models/classic_manager_permissions.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 1 | 2021-11-14T17:00:32.000Z | 2021-11-14T17:00:32.000Z | # coding: utf-8
"""
DocuSign Rooms API - v2
An API for an integrator to access the features of DocuSign Rooms # noqa: E501
OpenAPI spec version: v2
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import... | 37.862884 | 136 | 0.700674 |
1d70aa84697e46e27a82f7b9ff0ffa3cf823c2e0 | 469 | py | Python | oscar/lib/python2.7/site-packages/faker/providers/phone_number/dk_DK/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/phone_number/dk_DK/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/faker/providers/phone_number/dk_DK/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as PhoneNumberProvider
class Provider(PhoneNumberProvider):
formats = (
'+45(0)##########',
'+45(0)#### ######',
'+45 (0) #### ######',
'+45(0) #########',
'+45(0)#### #####',
... | 23.45 | 47 | 0.309168 |
1d70bc62441847c1a036f085b3ef3b2cacb7c04b | 722 | py | Python | day1.py | Munzeltje/advent-2020 | a417b1d1b962aab1cd6824ceecd7d31af214ca8c | [
"MIT"
] | null | null | null | day1.py | Munzeltje/advent-2020 | a417b1d1b962aab1cd6824ceecd7d31af214ca8c | [
"MIT"
] | null | null | null | day1.py | Munzeltje/advent-2020 | a417b1d1b962aab1cd6824ceecd7d31af214ca8c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
file_name = "input.txt"
if not os.path.isfile(file_name):
raise ValueError("Given input file cannot be found.")
file = open(file_name, "r")
contents = file.read()
file.close()
split_contents = contents.split("\n")
numbers = [int(x) for x in split_contents if x != ""]
for i, nu... | 27.769231 | 97 | 0.648199 |
1d70c2a0bf2c45bab4af6560e7252ff0b3e4d8c5 | 1,021 | py | Python | CritsAndCoffee.Instagram.API/crits_and_coffee/contrib/sites/migrations/0003_set_site_domain_and_name.py | srwagsta/critsAndCoffee2.0 | 4d2042b91675c50c2b6938c1e1863f873c80d391 | [
"Apache-1.1"
] | null | null | null | CritsAndCoffee.Instagram.API/crits_and_coffee/contrib/sites/migrations/0003_set_site_domain_and_name.py | srwagsta/critsAndCoffee2.0 | 4d2042b91675c50c2b6938c1e1863f873c80d391 | [
"Apache-1.1"
] | 10 | 2020-07-16T23:43:12.000Z | 2022-03-02T03:52:43.000Z | CritsAndCoffee.Instagram.API/crits_and_coffee/contrib/sites/migrations/0003_set_site_domain_and_name.py | srwagsta/critsAndCoffee2.0 | 4d2042b91675c50c2b6938c1e1863f873c80d391 | [
"Apache-1.1"
] | null | null | null | """
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
from django.conf import settings
from django.db import migrations
def update_site_forward(apps, schema_editor):
"""Set site d... | 29.171429 | 129 | 0.688541 |
1d70d4bd0280ec0682bae330657ba2062c4d3073 | 1,852 | py | Python | alipay/aop/api/domain/AlipayEbppInvoiceRegisterModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayEbppInvoiceRegisterModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayEbppInvoiceRegisterModifyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayEbppInvoiceRegisterModifyModel(object):
def __init__(self):
self._action = None
self._ext_json = None
self._register_id = None
@property
def action(self):
... | 26.084507 | 73 | 0.579914 |
1d70f0b5b6118a8ab117e0eb9bc66fd1110539a9 | 6,400 | py | Python | model/Evaluation/untagged-data-notebooks/anomaly-predict-newdata.py | akmenon1996/intl-iot | 646f681d714a07703f8a36efe5bd2860bc4e62c9 | [
"Apache-2.0"
] | 1 | 2020-02-28T16:05:27.000Z | 2020-02-28T16:05:27.000Z | model/Evaluation/untagged-data-notebooks/anomaly-predict-newdata.py | dng24/intl-iot | 84d46012afce5c7473d0cc9b82dc9e3aef069bbf | [
"Apache-2.0"
] | null | null | null | model/Evaluation/untagged-data-notebooks/anomaly-predict-newdata.py | dng24/intl-iot | 84d46012afce5c7473d0cc9b82dc9e3aef069bbf | [
"Apache-2.0"
] | 2 | 2020-01-23T23:25:18.000Z | 2020-09-23T18:30:26.000Z | import pandas as pd
import numpy as np
from sklearn.metrics import accuracy_score
import warnings
from sklearn.metrics import fbeta_score, precision_score, recall_score, confusion_matrix,f1_score
import itertools
import pickle
from matplotlib import pyplot as plt,style
from multiprocessing import Pool
import json
impor... | 39.506173 | 112 | 0.706563 |
1d70fa3579f134c8fcba5d773ac101773c9e5dd8 | 6,543 | py | Python | dataDeal/visualization.py | Ixuanzhang/mmdet | a8f8397e49e3091f23262f8ace9641ee2c6be746 | [
"Apache-2.0"
] | null | null | null | dataDeal/visualization.py | Ixuanzhang/mmdet | a8f8397e49e3091f23262f8ace9641ee2c6be746 | [
"Apache-2.0"
] | null | null | null | dataDeal/visualization.py | Ixuanzhang/mmdet | a8f8397e49e3091f23262f8ace9641ee2c6be746 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import numpy as np
from six.moves import range
import matplotlib.pyplot as plt
import PIL.Image as Image
import PIL.ImageColor as ImageColor
import PIL.ImageDraw as ImageDraw
import PIL.ImageFont as I... | 43.046053 | 114 | 0.619593 |
1d7138f5b1a810aea2a8be86a5c015eca5f7cf55 | 1,747 | py | Python | tests/integration/build_system/test_pep_518.py | sthagen/pantsbuild-pex | bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309 | [
"Apache-2.0"
] | null | null | null | tests/integration/build_system/test_pep_518.py | sthagen/pantsbuild-pex | bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309 | [
"Apache-2.0"
] | null | null | null | tests/integration/build_system/test_pep_518.py | sthagen/pantsbuild-pex | bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os.path
import subprocess
from pex.build_system.pep_518 import BuildSystem, load_build_system
from pex.resolve.configured_resolver import ConfiguredResolver
from pex.resolve.resolv... | 37.978261 | 99 | 0.758443 |
1d714a057e67272c92bc3cc26a3fab6314196f8e | 3,254 | py | Python | waterbutler/core/streams/base.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | waterbutler/core/streams/base.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | waterbutler/core/streams/base.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | import abc
import asyncio
class BaseStream(asyncio.StreamReader, metaclass=abc.ABCMeta):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.readers = {}
self.writers = {}
@abc.abstractproperty
def size(self):
pass
def add_reader(self, name, r... | 25.622047 | 94 | 0.575599 |
1d7156c1e3a956aab1f3a561697dcc86bcb58bd8 | 33,897 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machine_scale_set_vm_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machine_scale_set_vm_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machine_scale_set_vm_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.309804 | 261 | 0.683954 |
1d7177961a44af435fcbcc9878993cb150016710 | 1,769 | py | Python | models/__init__.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | 1 | 2016-05-26T08:18:36.000Z | 2016-05-26T08:18:36.000Z | models/__init__.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | null | null | null | models/__init__.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | null | null | null | """
This package contains database models and access functions, all relying on peewee Object Relational Mapper that
appears to be both lightweight and expressive.
Please note that you MUST call init_database and optionally create_nonexistent_tables prior to using any model.
>>> import datetime
>>> from models import ... | 31.035088 | 111 | 0.721311 |
1d717c64f09d0dc5bf9ae9365d99e4d6410dac62 | 715 | py | Python | alipay/aop/api/response/AlipayBossProdMyTestQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayBossProdMyTestQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayBossProdMyTestQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayBossProdMyTestQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayBossProdMyTestQueryResponse, self).__init__()
self._longitude = None
@property... | 27.5 | 106 | 0.714685 |
1d7193a042511f30c287b7ee7a3f574fd8d82466 | 806 | py | Python | python/rna-transcription/rna_transcription_test.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | 9 | 2020-12-12T03:29:33.000Z | 2021-08-11T13:08:06.000Z | python/rna-transcription/rna_transcription_test.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | null | null | null | python/rna-transcription/rna_transcription_test.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | 1 | 2020-11-02T10:40:06.000Z | 2020-11-02T10:40:06.000Z | import unittest
from rna_transcription import to_rna
# Tests adapted from `problem-specifications//canonical-data.json`
class RnaTranscriptionTest(unittest.TestCase):
def test_empty_rna_sequence(self):
self.assertEqual(to_rna(""), "")
def test_rna_complement_of_cytosine_is_guanine(self):
se... | 26.866667 | 66 | 0.718362 |
1d71971636ee6ad6096e2ff08d9cd2a409c21428 | 406 | py | Python | deep_compression/utils/compressai/__main__.py | YodaEmbedding/deep-compression | cc1ea691921fbe2e5cffeb30a02b777dadd08700 | [
"MIT"
] | null | null | null | deep_compression/utils/compressai/__main__.py | YodaEmbedding/deep-compression | cc1ea691921fbe2e5cffeb30a02b777dadd08700 | [
"MIT"
] | null | null | null | deep_compression/utils/compressai/__main__.py | YodaEmbedding/deep-compression | cc1ea691921fbe2e5cffeb30a02b777dadd08700 | [
"MIT"
] | null | null | null | import importlib
import sys
import deep_compression
if __name__ == "__main__":
_, util_name, *argv = sys.argv
if util_name == "update_and_eval_model":
from . import update_and_eval_model
main = update_and_eval_model.main
else:
module = importlib.import_module(
f"compre... | 21.368421 | 52 | 0.650246 |
1d71c368275eb00285969a032ebe563612a4c654 | 6,097 | py | Python | dataset/SilhouetteDetector.py | rubende/mupeg | e10a3a890d7ce78593ed2775a482e9d023af350e | [
"MIT"
] | 2 | 2020-03-20T11:46:51.000Z | 2021-06-21T16:00:24.000Z | dataset/SilhouetteDetector.py | rubende/mupeg | e10a3a890d7ce78593ed2775a482e9d023af350e | [
"MIT"
] | 3 | 2020-11-13T17:45:36.000Z | 2022-02-09T23:36:40.000Z | dataset/SilhouetteDetector.py | rubende/mupeg | e10a3a890d7ce78593ed2775a482e9d023af350e | [
"MIT"
] | 2 | 2021-02-04T11:43:57.000Z | 2021-11-29T18:10:25.000Z | ## Based in code from https://averdones.github.io/real-time-semantic-image-segmentation-with-deeplab-in-tensorflow/
## Imports
import collections
import os
import sys
import tarfile
import tempfile
import urllib
import numpy as np
from PIL import Image
import glob
import cv2
import ntpath
import tensorflow as tf
PAT... | 34.84 | 118 | 0.674102 |
1d71d0d9ea9a6a26f4c379575e424de0468d5cd5 | 70 | py | Python | core/outfits/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | core/outfits/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | core/outfits/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from core.outfits import listing
from core.outfits.base import Outfit
| 23.333333 | 36 | 0.842857 |
1d71e2d885e71263bfe920b955bd403790382fd2 | 4,345 | py | Python | udsoncan/services/LinkControl.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | 1 | 2021-03-21T12:18:23.000Z | 2021-03-21T12:18:23.000Z | udsoncan/services/LinkControl.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | null | null | null | udsoncan/services/LinkControl.py | autopi-io/py-udsoncan | 2351ee02bf4a70e5661d6fd5f48f58db740f244e | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from . import *
from udsoncan.Response import Response
from udsoncan.exceptions import *
class LinkControl(BaseService):
_sid = 0x87
supported_negative_response = [ Response.Code.SubFunctionNotSupported,
Respo... | 49.375 | 332 | 0.664442 |
1d71ec783a9760cdf784c404c26a63249f0c1836 | 2,730 | py | Python | app.py | danijeljw/pymbo | 562df0fff0392fac9bc09474dd29fcb1dc835a95 | [
"MIT"
] | null | null | null | app.py | danijeljw/pymbo | 562df0fff0392fac9bc09474dd29fcb1dc835a95 | [
"MIT"
] | 2 | 2018-02-23T05:14:36.000Z | 2018-02-23T05:29:17.000Z | app.py | danijeljw/pymbo | 562df0fff0392fac9bc09474dd29fcb1dc835a95 | [
"MIT"
] | null | null | null | app = Flask(__name__)
#Facebook Messenger API credentials from keys
ACCESS_TOKEN = fb_keys['ACCESS_TOKEN']
VERIFY_TOKEN = fb_keys['VERIFY_TOKEN']
bot = Bot(ACCESS_TOKEN)
#We will receive messages that Facebook sends our bot at this endpoint
@app.route("/", methods=['GET', 'POST'])
def receive_message():
if requ... | 40.746269 | 122 | 0.681685 |
1d71f203d3bad0eb33ec188b4fa63de024c553a8 | 1,592 | py | Python | events_workshops/models.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-02T12:45:31.000Z | 2018-02-10T10:18:11.000Z | events_workshops/models.py | Socialsquare/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2020-03-24T15:58:05.000Z | 2022-02-10T08:08:57.000Z | events_workshops/models.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-01-05T08:02:18.000Z | 2018-01-05T08:02:18.000Z | from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse
# Create your models here.
class EventWorkshop(models.Model):
class Meta:
verbose_name = "Event Or Workshop"
verbose_name_plural = "Events And Workshops"
EVENT = 0
WORK... | 40.820513 | 142 | 0.713568 |
1d7211ba3d2041e12641e3d47d62ebfbb1a1f7c9 | 2,479 | py | Python | NLPCC_2018_TASK2_GEC/CS2S+BPE+Emb/software/nbest-reranker/augmenter.py | DCMMC/chineseocr | 0b8772615239ea7f212b1ab5bc75183e7e9f16b0 | [
"MIT"
] | null | null | null | NLPCC_2018_TASK2_GEC/CS2S+BPE+Emb/software/nbest-reranker/augmenter.py | DCMMC/chineseocr | 0b8772615239ea7f212b1ab5bc75183e7e9f16b0 | [
"MIT"
] | null | null | null | NLPCC_2018_TASK2_GEC/CS2S+BPE+Emb/software/nbest-reranker/augmenter.py | DCMMC/chineseocr | 0b8772615239ea7f212b1ab5bc75183e7e9f16b0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os
import time
import numpy as np
import codecs
import argparse
# Initializing the logging module
import logging
import log_utils as L
logger = logging.getLogger(__name__)
from candidatesreader import NBestList
from features import *
def augment(features, source_path, input_nbest_path, outp... | 41.316667 | 155 | 0.717225 |
1d72563d4f8cb9e778211d06491c8d5e3dbbf25d | 2,824 | py | Python | prod/jobs/refill_tdx_future_bars.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | prod/jobs/refill_tdx_future_bars.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | prod/jobs/refill_tdx_future_bars.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | # flake8: noqa
"""
下载通达信指数合约1分钟bar => vnpy项目目录/bar_data/tdx/
"""
import os
import sys
import json
import csv
from collections import OrderedDict
import pandas as pd
vnpy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
if vnpy_root not in sys.path:
sys.path.append(vnpy_root)
os.environ[... | 28.525253 | 119 | 0.621459 |
1d727aba41d692771acea9681d3875fd45e300c4 | 8,045 | py | Python | tests/integration/shared_storage_configuration/test_targets.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | tests/integration/shared_storage_configuration/test_targets.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | tests/integration/shared_storage_configuration/test_targets.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | from testconfig import config
from django.utils.unittest.case import skipIf
from tests.integration.core.chroma_integration_testcase import ChromaIntegrationTestCase
class TestTargets(ChromaIntegrationTestCase):
"""Exercise target operations done via the /api/target/
(this is a separate path to the typical fil... | 42.792553 | 116 | 0.678185 |
1d728eba35c632a56bec49ffa062467a2283cd2c | 1,881 | py | Python | gitlab/setup.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2020-08-08T02:01:01.000Z | 2020-08-08T02:01:01.000Z | gitlab/setup.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | gitlab/setup.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from setuptools import setup
from codecs import open # To use a consistent encoding
from os import path
HERE = path.dirname(path.abspath(__file__))
# Get version info
ABOUT = {}
with open(path.join(HERE, 'datad... | 27.661765 | 76 | 0.681552 |
1d728fab2b8f2d4f557e6bc7f76df74475ea899e | 1,326 | py | Python | django_joblog/management/commands/joblog_list.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | django_joblog/management/commands/joblog_list.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | django_joblog/management/commands/joblog_list.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | # encoding=utf-8
from __future__ import unicode_literals
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.utils.translation import ugettext_lazy as _
from django_joblog.models import JobLogModel, JobLogStates, db_alias
class Command(BaseCommand):
h... | 34.894737 | 103 | 0.604827 |
1d72939f711db9ab298c464d390ec2ef86ab09c9 | 927 | py | Python | py/944. Delete Columns to Make Sorted.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | 3 | 2021-08-07T07:01:34.000Z | 2021-08-07T07:03:02.000Z | py/944. Delete Columns to Make Sorted.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | py/944. Delete Columns to Make Sorted.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/delete-columns-to-make-sorted/
# You are given an array of n strings strs, all of the same length.
# The strings can be arranged such that there is one on each line, making a grid.
# For example, strs = ["abc", "bce", "cae"] can be arranged as:
# You want to delete the columns that ar... | 37.08 | 81 | 0.548004 |
1d72a2f595c408129898adfc08318dfb51e3b070 | 1,669 | py | Python | examples/docs_snippets/docs_snippets_tests/guides_tests/dagster_type_factories_tests/test_pandas_dagster_types_examples.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/guides_tests/dagster_type_factories_tests/test_pandas_dagster_types_examples.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/guides_tests/dagster_type_factories_tests/test_pandas_dagster_types_examples.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import pytest
import docs_snippets.guides.dagster.dagster_type_factories as example_root
from dagster import check_dagster_type
from dagster.core.errors import DagsterTypeCheckDidNotPass
from docs_snippets.guides.dagster.dagster_type_factories.job_1 import (
generate_trip_distribution_plot... | 29.280702 | 80 | 0.7855 |
1d72a366376f5d78affdaf8727abc27dbfe2ef56 | 5,122 | py | Python | vmchecker/confdefaults.py | calin-iorgulescu/vmchecker | 050ec96495974f76c615e827ea68e2fc6430b1e9 | [
"MIT"
] | 19 | 2015-08-31T22:53:45.000Z | 2020-07-15T12:02:13.000Z | vmchecker/confdefaults.py | calin-iorgulescu/vmchecker | 050ec96495974f76c615e827ea68e2fc6430b1e9 | [
"MIT"
] | 28 | 2015-01-18T13:26:47.000Z | 2021-06-29T13:51:09.000Z | vmchecker/confdefaults.py | calin-iorgulescu/vmchecker | 050ec96495974f76c615e827ea68e2fc6430b1e9 | [
"MIT"
] | 16 | 2015-04-20T06:04:22.000Z | 2017-04-15T19:39:54.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import ConfigParser
import os
LIST_SEPARATOR = ' '
class Config:
"""An object that encapsulates parsing of the config file of a course"""
def __init__(self, config_file_ = None, config = None):
if config != None:
# Copy the underlying ConfigPa... | 35.324138 | 83 | 0.612456 |
1d72b749be93aad2d6a525c25955c14d2d61f83e | 1,831 | py | Python | alipay/aop/api/domain/AlipayEcoMapGeocodingReverseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayEcoMapGeocodingReverseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayEcoMapGeocodingReverseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayEcoMapGeocodingReverseModel(object):
def __init__(self):
self._channel = None
self._latitude = None
self._longitude = None
@property
def channel(self):
... | 25.788732 | 69 | 0.575096 |
1d72c8d0c795a63c1589a2409b34022392f10dfc | 2,917 | py | Python | blogger_cli/commands/cmd_spellcheck.py | Himanshu-singhal-creator/blogger-cli | ed56d1c8ce54662b244523c4c0d0aa0daac23173 | [
"MIT"
] | 427 | 2019-07-24T15:04:40.000Z | 2022-01-28T03:28:01.000Z | blogger_cli/commands/cmd_spellcheck.py | Himanshu-singhal-creator/blogger-cli | ed56d1c8ce54662b244523c4c0d0aa0daac23173 | [
"MIT"
] | 32 | 2019-06-04T05:39:07.000Z | 2022-01-06T15:45:59.000Z | blogger_cli/commands/cmd_spellcheck.py | Himanshu-singhal-creator/blogger-cli | ed56d1c8ce54662b244523c4c0d0aa0daac23173 | [
"MIT"
] | 15 | 2019-07-24T16:48:20.000Z | 2020-09-30T15:40:57.000Z | from pathlib import Path
import click
from spellchecker import SpellChecker
from misspellings_lib import Misspellings
from blogger_cli.converter.extractor import (
extract_text_from_ipynb,
extract_text_from_html,
)
@click.command("spellcheck", short_help="Check spelling errors")
@click.option("-f", "--force_s... | 30.385417 | 81 | 0.578677 |
1d72e8727017043f35d63404b2c4ae67b8bee141 | 8,458 | py | Python | Query/sql.py | duncanbackr/jit_analytics | 9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1 | [
"MIT"
] | null | null | null | Query/sql.py | duncanbackr/jit_analytics | 9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1 | [
"MIT"
] | null | null | null | Query/sql.py | duncanbackr/jit_analytics | 9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1 | [
"MIT"
] | null | null | null | def full_query(okta_id, video_string, fan_string, limit=5000):
query = f'''
WITH
-- FIRST CTE
all_comments (
comment_id,
parent_youtube_comment_id,
youtube_fan_id,
by_creator,
content,
... | 35.838983 | 89 | 0.434855 |
1d72f5b4f8dcd7e31dc8a218f019070db9ca31e3 | 1,607 | py | Python | publichealth/home/models/admin.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 2 | 2020-10-29T16:27:21.000Z | 2021-06-07T12:47:46.000Z | publichealth/home/models/admin.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 11 | 2017-05-09T10:50:28.000Z | 2021-12-15T17:01:23.000Z | publichealth/home/models/admin.py | pcoder/public-health-ch | cebc4849653560c54238b67814074353ff7c01f3 | [
"MIT"
] | 4 | 2017-04-24T13:06:55.000Z | 2021-06-04T02:18:32.000Z | # -*- coding: utf-8 -*-
from django.db import models
from django.db.models.signals import pre_save
from django.dispatch import receiver
from django.core.mail import send_mail
from wagtail.contrib.settings.models import BaseSetting, register_setting
# A simple feedback module built into the site admin
@register_sett... | 34.934783 | 73 | 0.631612 |
1d73005832a418da8ae44cce561d109cbe46c10e | 7,765 | py | Python | GraphDefinitions.py | MojaveTom/HomeGraphing | d8e4e296f71bd153f86ce41432df2e41ce8b58c4 | [
"MIT"
] | null | null | null | GraphDefinitions.py | MojaveTom/HomeGraphing | d8e4e296f71bd153f86ce41432df2e41ce8b58c4 | [
"MIT"
] | 1 | 2019-05-25T17:17:57.000Z | 2019-05-25T17:17:57.000Z | GraphDefinitions.py | MojaveTom/HomeGraphing | d8e4e296f71bd153f86ce41432df2e41ce8b58c4 | [
"MIT"
] | null | null | null | '''
Define the schema for graph definition dictionary.
'''
import os # https://docs.python.org/3/library/os.html
import sys # https://docs.python.org/3/library/sys.html
import json # https://docs.python.org/3/library/json.html
import toml # https://github.com/... | 49.775641 | 132 | 0.61056 |
1d73117b9e7a513f98c0d3304fd84a7b97a82a5f | 4,542 | py | Python | alipay/aop/api/domain/AlipayEcoMycarVehicleVehicleiovSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayEcoMycarVehicleVehicleiovSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayEcoMycarVehicleVehicleiovSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.VehicleIovData import VehicleIovData
class AlipayEcoMycarVehicleVehicleiovSyncModel(object):
def __init__(self):
self._ext_info = None
self._iov_datas = None
... | 31.762238 | 83 | 0.584324 |
1d731329cbc600c0d3b5abf80eade08f62687a81 | 740 | py | Python | api_pets/pet/api.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | api_pets/pet/api.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | 2 | 2020-07-19T15:36:35.000Z | 2022-02-02T20:30:16.000Z | api_pets/pet/api.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask.views import MethodView
from flask import jsonify, request, abort
class PetAPI(MethodView):
pets = [
{'id': 1, 'name': u'Mac'},
{'id': 2, 'name': u'Brownie'},
{'id': 3, 'name': u'Charlie'},
{'id': 4, 'name': u'Sansao'}
]
# listar todos os ... | 27.407407 | 58 | 0.518919 |
1d7325ed61f3f6e382bbede7a9ab20b37a57402e | 16,318 | py | Python | music_trees/models/protonet.py | hugofloresgarcia/music-trees | 51c47f1fc924936c25b84bf35edff52d88e9cccd | [
"MIT"
] | 25 | 2021-07-16T10:24:35.000Z | 2022-03-25T04:46:25.000Z | music_trees/models/protonet.py | loretoparisi/music-trees | 0ea3f49c2bafa97efd7352728ca687d7fee9e025 | [
"MIT"
] | 4 | 2021-11-12T10:25:29.000Z | 2021-12-01T16:11:13.000Z | music_trees/models/protonet.py | loretoparisi/music-trees | 0ea3f49c2bafa97efd7352728ca687d7fee9e025 | [
"MIT"
] | 3 | 2021-11-09T02:40:03.000Z | 2022-03-04T19:26:39.000Z | from music_trees.models.backbone import Backbone
import music_trees as mt
from typing import List, Dict
from argparse import Namespace
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
def get_all_query_records(episode: dict):
return [e for e in episode['reco... | 37.685912 | 101 | 0.600625 |
1d73484be1389d3c5cf6a4ce0b59fa8478ffe4ef | 67,853 | py | Python | vhpc_toolkit/operations.py | maci0/vhpc-toolkit | 0131da03c399234960bd897ce28072496e435830 | [
"Apache-2.0"
] | null | null | null | vhpc_toolkit/operations.py | maci0/vhpc-toolkit | 0131da03c399234960bd897ce28072496e435830 | [
"Apache-2.0"
] | null | null | null | vhpc_toolkit/operations.py | maci0/vhpc-toolkit | 0131da03c399234960bd897ce28072496e435830 | [
"Apache-2.0"
] | null | null | null | # Virtualized High Performance Computing Toolkit
#
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved.
#
# This product is licensed to you under the Apache 2.0 license (the
# "License"). You may not use this product except in compliance with the
# Apache 2.0 License. This product may include a number of subcomp... | 34.286508 | 88 | 0.539225 |
1d7363cd7bf1e41a2d51085c0e18e62a4035592c | 17,406 | py | Python | git_cache/git_mirror.py | shinh/gitcache | 930c8374cc028c985e72291a7e1f52acf137c776 | [
"BSD-3-Clause"
] | null | null | null | git_cache/git_mirror.py | shinh/gitcache | 930c8374cc028c985e72291a7e1f52acf137c776 | [
"BSD-3-Clause"
] | null | null | null | git_cache/git_mirror.py | shinh/gitcache | 930c8374cc028c985e72291a7e1f52acf137c776 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
A single git mirror handler.
Copyright:
2020 by Clemens Rabe <clemens.rabe@clemensrabe.de>
All rights reserved.
This file is part of gitcache (https://github.com/seeraven/gitcache)
and is released under the "BSD 3-Clause License". Please see the ``LICENSE`` file
that i... | 36.490566 | 100 | 0.561933 |
1d73837cfba6bc4e5e39d1fa7da1861630c38139 | 5,607 | py | Python | mdrsl/data_handling/one_hot_encoding/encoding_book_keeping.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | mdrsl/data_handling/one_hot_encoding/encoding_book_keeping.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | mdrsl/data_handling/one_hot_encoding/encoding_book_keeping.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | from typing import Optional, Dict, List, KeysView
Attr = str
class EncodingBookKeeper:
"""
Keeps track of a one hot encoding,
i.e. which original columns map to which set of one-hot-encoded columns,
and vice versa.
"""
def __init__(self, ohe_prefix_separator: str):
self.ohe_prefix_se... | 44.856 | 110 | 0.643838 |
1d73840805e60cc9c6b243c14d1118d4dc170761 | 5,217 | py | Python | util/convert_data_to_api.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/convert_data_to_api.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/convert_data_to_api.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null |
import inflection
import os
from btd6_memory_info.cheat_engine_data import data
def api_up():
for module_name, module_data in data['process']['modules'].items():
import_lines = []
import_names = []
classes = []
class_names = []
def get_class_lines(path, data):
... | 39.522727 | 143 | 0.525781 |
1d7386768c3d3923a8b9b46d10d598b09ea824ab | 27,483 | py | Python | contrib/libs/protobuf/python/google/protobuf/json_format.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | contrib/libs/protobuf/python/google/protobuf/json_format.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | null | null | null | contrib/libs/protobuf/python/google/protobuf/json_format.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | 1 | 2018-08-06T14:13:12.000Z | 2018-08-06T14:13:12.000Z | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | 37.545082 | 79 | 0.679984 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.