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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e87e04f93cb68a3c2933934087897447e67e6e18 | 1,433 | py | Python | chapter2-neural-networks/rnn-mnist-2.2.1.py | roatienza/dl-keras | 9472dce7381e0bc05b52db269905909c2a2aa5c8 | [
"MIT"
] | 3 | 2017-12-31T15:03:22.000Z | 2021-03-10T09:39:08.000Z | chapter2-neural-networks/rnn-mnist-2.2.1.py | roatienza/dl-keras | 9472dce7381e0bc05b52db269905909c2a2aa5c8 | [
"MIT"
] | null | null | null | chapter2-neural-networks/rnn-mnist-2.2.1.py | roatienza/dl-keras | 9472dce7381e0bc05b52db269905909c2a2aa5c8 | [
"MIT"
] | 9 | 2017-10-25T05:59:39.000Z | 2020-04-16T08:51:47.000Z | '''
RNN for MNIST digits classification
Project: https://github.com/roatienza/dl-keras
Dependencies: keras
Usage: python3 <this file>
'''
# numpy package
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Activation, SimpleRNN
from keras.datasets import mnist
from keras.utils imp... | 28.098039 | 66 | 0.7418 |
e87e43fecc5698a213b217f0af50f35d9136cf71 | 4,175 | py | Python | src/ggrc/migrations/versions/20170525144337_281fea549981_move_owners_to_acl.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/migrations/versions/20170525144337_281fea549981_move_owners_to_acl.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc/migrations/versions/20170525144337_281fea549981_move_owners_to_acl.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
Move object owners to ACL
Create Date: 2017-05-25 14:43:37.605749
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
from sqlalchemy.sql i... | 26.257862 | 79 | 0.644311 |
e87e4e6fa3f0bb830d6ce6acd9319832fa52badf | 6,819 | py | Python | service/models.py | jm9498/customers | 42a74008f0a560195fec90469f346e1d45453513 | [
"Apache-2.0"
] | null | null | null | service/models.py | jm9498/customers | 42a74008f0a560195fec90469f346e1d45453513 | [
"Apache-2.0"
] | null | null | null | service/models.py | jm9498/customers | 42a74008f0a560195fec90469f346e1d45453513 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016, 2021 John Rofrano. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 29.907895 | 79 | 0.594075 |
e87e5de93249701afe3b24b4bdba6bdf82bf72be | 12,439 | py | Python | MrsRobot_StreamlabsSystem.py | KanjiuAkuma/JBetSystem | b3ec6e3e21b2f18659bf80b5eeee054aaf321662 | [
"MIT"
] | 1 | 2020-06-21T18:12:29.000Z | 2020-06-21T18:12:29.000Z | MrsRobot_StreamlabsSystem.py | KanjiuAkuma/JBetSystem | b3ec6e3e21b2f18659bf80b5eeee054aaf321662 | [
"MIT"
] | 6 | 2020-01-12T18:42:54.000Z | 2020-03-05T03:59:39.000Z | MrsRobot_StreamlabsSystem.py | KanjiuAkuma/MrsRobot | b3ec6e3e21b2f18659bf80b5eeee054aaf321662 | [
"MIT"
] | null | null | null | # append lib to search path
import sys
import os
sys.path.append(os.path.dirname(__file__))
import clr
import traceback
import ctypes
from lib import info, global_variables, logger
from lib.bot import Bot
from lib.logger import log_call, log, log_levels, make_log_file
from lib.config import load_config, save_config... | 38.750779 | 148 | 0.523515 |
e87e77a2a93433accf74ea2c8608a2917116c307 | 3,023 | py | Python | imodels/experimental/bartpy/samplers/modelsampler.py | csinva/interpretability-implementations-demos | 0223114225d0e077007b1ad49f63b64f3ff5ee15 | [
"MIT"
] | 102 | 2019-07-16T13:45:35.000Z | 2020-09-14T19:12:49.000Z | imodels/experimental/bartpy/samplers/modelsampler.py | csinva/interpretability-workshop | db201be7723179a1f5ab20b242419a604edc9186 | [
"MIT"
] | 2 | 2020-01-03T20:47:14.000Z | 2020-01-03T21:17:39.000Z | imodels/experimental/bartpy/samplers/modelsampler.py | csinva/interpretability-workshop | db201be7723179a1f5ab20b242419a604edc9186 | [
"MIT"
] | 8 | 2019-08-09T08:40:34.000Z | 2020-09-06T17:51:10.000Z | import copy
from collections import defaultdict
from typing import List, Mapping, Union, Any, Type
import numpy as np
from tqdm import tqdm
from ..model import Model
from ..samplers.sampler import Sampler
from ..samplers.schedule import SampleSchedule
from ..trace import TraceLogger
Chain = Mapping[str, Union[List[A... | 33.588889 | 109 | 0.578234 |
e87f0441d3f249b73688cff3477a1f3a17c168ea | 1,482 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/replicapoolupdater/v1beta1/resources.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/replicapoolupdater/v1beta1/resources.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/replicapoolupdater/v1beta1/resources.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2015 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 ag... | 30.244898 | 74 | 0.689609 |
e87f1224d0ee476d3a2f889cf0a13c253c8e5794 | 17,204 | py | Python | trac/versioncontrol/tests/functional.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/versioncontrol/tests/functional.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/versioncontrol/tests/functional.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
... | 39.824074 | 81 | 0.626133 |
e87f330545042f05a98ccd43037aa234290e2819 | 76,362 | py | Python | tornado/web.py | M-Kokolich/PoVo | d72b8375a2662225299690a321979ac6988d229d | [
"MIT"
] | 4 | 2016-08-01T02:32:13.000Z | 2021-11-08T11:21:08.000Z | tornado/web.py | gus-ball/gps_v4.9 | ed587bc6e49093603072d6d137d45d9b765bd73e | [
"MIT"
] | 1 | 2016-08-01T02:32:32.000Z | 2016-08-01T02:32:32.000Z | tornado/web.py | gus-ball/gps_v4.9 | ed587bc6e49093603072d6d137d45d9b765bd73e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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... | 39.896552 | 89 | 0.605026 |
e87f341f2cb47b787b0d918330521cddcff6fefc | 1,237 | py | Python | rj_gameplay/rj_gameplay/play/line_up.py | p-nayak11/robocup-software | 542292e5cbb317234620d241b9c476ab125ebdf3 | [
"Apache-2.0"
] | null | null | null | rj_gameplay/rj_gameplay/play/line_up.py | p-nayak11/robocup-software | 542292e5cbb317234620d241b9c476ab125ebdf3 | [
"Apache-2.0"
] | null | null | null | rj_gameplay/rj_gameplay/play/line_up.py | p-nayak11/robocup-software | 542292e5cbb317234620d241b9c476ab125ebdf3 | [
"Apache-2.0"
] | null | null | null | import stp.play
import stp.tactic
from rj_gameplay.tactic import line_tactic
import stp.skill
import stp.role
import stp.role.cost
import stp.rc
from typing import (
Dict,
List,
Tuple,
Optional,
Type,
)
import numpy as np
from rj_msgs.msg import RobotIntent
from enum import Enum, auto
class Stat... | 23.339623 | 80 | 0.636217 |
e87f37f2f0651cab15d3ad7f7641bd55a79c6df5 | 1,730 | py | Python | ophiuchus/experiments/config.py | adrn/ophiuchus | fe7e937bf421d506ec252165f044d514f571667b | [
"MIT"
] | 1 | 2015-09-25T10:12:52.000Z | 2015-09-25T10:12:52.000Z | ophiuchus/experiments/config.py | adrn/ophiuchus | fe7e937bf421d506ec252165f044d514f571667b | [
"MIT"
] | null | null | null | ophiuchus/experiments/config.py | adrn/ophiuchus | fe7e937bf421d506ec252165f044d514f571667b | [
"MIT"
] | null | null | null | # coding: utf-8
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os
# Third-party
import yaml
__all__ = ['ConfigNamespace']
class ConfigNamespace(object):
def __init__(self):
# do nothing...
pass
def __getitem__(self, key):
return self.__getattribute__(key)
... | 22.467532 | 70 | 0.595376 |
e87f4aa0d0036a6843ce410175956b6c24b5212f | 8,870 | py | Python | run_inference.py | hyanwong/tsinfer-benchmarks | 230e19e2a583c11360d65523de736d313911955b | [
"MIT"
] | null | null | null | run_inference.py | hyanwong/tsinfer-benchmarks | 230e19e2a583c11360d65523de736d313911955b | [
"MIT"
] | null | null | null | run_inference.py | hyanwong/tsinfer-benchmarks | 230e19e2a583c11360d65523de736d313911955b | [
"MIT"
] | 1 | 2020-08-20T10:36:21.000Z | 2020-08-20T10:36:21.000Z | import os.path
import argparse
import collections
import re
import time
import tskit
import msprime
import numpy as np
import tsinfer
import stdpopsim
Params = collections.namedtuple(
"Params",
"sample_data, rec_rate, ma_mis_rate, ms_mis_rate, cutoff_exponent, precision, "
"num_threads")
Results = collec... | 39.598214 | 89 | 0.654904 |
e87f7ede8a0591ee4d4424f87f0407695bda56dc | 3,092 | py | Python | code/grid_search/grid_search.py | Nathx/subs_check | b91e0f031f756d0df317c6768fe73e4d07dc7ba3 | [
"MIT"
] | null | null | null | code/grid_search/grid_search.py | Nathx/subs_check | b91e0f031f756d0df317c6768fe73e4d07dc7ba3 | [
"MIT"
] | null | null | null | code/grid_search/grid_search.py | Nathx/subs_check | b91e0f031f756d0df317c6768fe73e4d07dc7ba3 | [
"MIT"
] | 2 | 2016-07-10T22:24:57.000Z | 2020-03-26T02:54:28.000Z | from spark_model import SparkModel
from pyspark import SQLContext, SparkContext, SparkConf
from boto.s3.connection import S3Connection
from pyspark.ml import Pipeline
from pyspark.ml.tuning import CrossValidator, ParamGridBuilder
from pyspark.ml.evaluation import BinaryClassificationEvaluator
from pyspark.ml.feature im... | 37.707317 | 95 | 0.684347 |
e87f9da8b23f8bea8ac124959685a6c285979335 | 1,947 | py | Python | ssl_image_classification/algorithms/meanteacher.py | JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification | b32599d1a5f28beefb4f9a744087e1dc47bd9906 | [
"MIT"
] | 4 | 2021-04-16T18:56:46.000Z | 2021-11-18T07:14:04.000Z | ssl_image_classification/algorithms/meanteacher.py | JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification | b32599d1a5f28beefb4f9a744087e1dc47bd9906 | [
"MIT"
] | 2 | 2022-02-05T16:55:14.000Z | 2022-03-06T11:04:23.000Z | ssl_image_classification/algorithms/meanteacher.py | JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification | b32599d1a5f28beefb4f9a744087e1dc47bd9906 | [
"MIT"
] | 2 | 2022-02-08T12:43:49.000Z | 2022-03-06T10:47:56.000Z | import tensorflow as tf
from ..libml.data_augmentations import weak_augment, medium_augment, strong_augment
def mean_teacher(x, u, height, width, seed=[29598, 29598]):
"""
Applies medium augmentations on inputs x, y and u returns tensors
and returns augmented tensors.
Args:
x: tenso... | 38.94 | 103 | 0.692861 |
e87fb289741a7ddbcae9da5cf9e3cbc3feb05cea | 8,480 | py | Python | src/MyDataset.py | rubicco/music-genre-classification | c097024388cf774e98fbab7c377e5ba12764c335 | [
"MIT"
] | null | null | null | src/MyDataset.py | rubicco/music-genre-classification | c097024388cf774e98fbab7c377e5ba12764c335 | [
"MIT"
] | null | null | null | src/MyDataset.py | rubicco/music-genre-classification | c097024388cf774e98fbab7c377e5ba12764c335 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import zipfile
import matplotlib.pyplot as plt
import seaborn as sns
from tqdm import tqdm
import gensim.downloader as api
import sys
import spacy
import os
import torch
from datetime import datetime
from torch.utils.data import Dataset
settings = {
"embedding_settings": {
... | 39.44186 | 115 | 0.592335 |
e87fd2359d677beaf9de62dbbbb372bf027bf4aa | 379 | py | Python | Python3/Coursera/others/getitem_and_setitem.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Coursera/others/getitem_and_setitem.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Coursera/others/getitem_and_setitem.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null |
class MyDict:
def __init__(self):
self.storage = {}
def __setitem__(self, key, value):
self.storage[key] = value
def __getitem__(self, key):
return self.storage[key]
def _main():
my_dict = MyDict()
my_dict['a'] = 'b'
print(my_dict['a']) # b
print(my_dict[... | 16.478261 | 38 | 0.556728 |
e87ff0510a98989a7142614cb468b63e45a18627 | 5,216 | py | Python | tests/sentry/tasks/test_deletion.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | 20 | 2016-10-01T04:29:24.000Z | 2020-10-09T07:23:34.000Z | tests/sentry/tasks/test_deletion.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/tasks/test_deletion.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | 7 | 2016-10-27T05:12:45.000Z | 2021-05-01T14:29:53.000Z | from __future__ import absolute_import
from mock import patch
from sentry.exceptions import DeleteAborted
from sentry.models import (
GroupMeta, GroupTagKey, GroupTagValue, Organization, OrganizationStatus,
Project, ProjectStatus, TagKey, TagValue, Team, TeamStatus
)
from sentry.tasks.deletion import (
de... | 34.543046 | 99 | 0.663727 |
e87ff6a36e81f76ab8829423db07f8ef8e7a6640 | 17,145 | py | Python | src/tequila/simulators/simulator_cirq.py | naomicurnow/tequila | 739a76222005558d348a428cf2ce7cb5dfe290de | [
"MIT"
] | 1 | 2021-01-11T18:40:47.000Z | 2021-01-11T18:40:47.000Z | src/tequila/simulators/simulator_cirq.py | kiminh/tequila | 464085265e125222c63e65446861e9c0a2428bab | [
"MIT"
] | null | null | null | src/tequila/simulators/simulator_cirq.py | kiminh/tequila | 464085265e125222c63e65446861e9c0a2428bab | [
"MIT"
] | null | null | null | from tequila.simulators.simulator_base import QCircuit, BackendCircuit, BackendExpectationValue
from tequila.wavefunction.qubit_wavefunction import QubitWaveFunction
from tequila import TequilaException
from tequila import BitString, BitNumbering
import sympy
from tequila.objective.objective import to_float
import num... | 35.350515 | 140 | 0.577603 |
e87ff7a0bc90c3b3fd985e7e06fd49d0ca53c6eb | 122 | py | Python | wagtail_svgmap/__init__.py | sylvainblot/wagtail-svgmap | a9883570029a23b555fd0ce2b8bdfc423c3032ed | [
"BSD-3-Clause"
] | 13 | 2017-10-10T03:15:45.000Z | 2021-06-11T05:26:58.000Z | wagtail_svgmap/__init__.py | sylvainblot/wagtail-svgmap | a9883570029a23b555fd0ce2b8bdfc423c3032ed | [
"BSD-3-Clause"
] | 12 | 2016-08-23T09:59:37.000Z | 2018-03-02T16:44:51.000Z | wagtail_svgmap/__init__.py | sylvainblot/wagtail-svgmap | a9883570029a23b555fd0ce2b8bdfc423c3032ed | [
"BSD-3-Clause"
] | 8 | 2017-08-18T10:19:43.000Z | 2021-01-21T23:04:17.000Z | import logging
default_app_config = 'wagtail_svgmap.apps.WagtailSvgmapConfig'
log = logging.getLogger('wagtail_svgmap')
| 20.333333 | 62 | 0.827869 |
e8803ac54e947e9902c0f3da5fd4f7847980cc25 | 589 | py | Python | Practica4/QuickSort/main.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | 1 | 2021-09-30T20:05:41.000Z | 2021-09-30T20:05:41.000Z | Practica4/QuickSort/main.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | null | null | null | Practica4/QuickSort/main.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | null | null | null | #Análisis de Algoritmos 3CV2
# Alan Romero Lucero
# Josué David Hernández Ramírez
# Práctica 4 Divide y vencerás
from quicksort import quicksort
from grafica import graph
from menu import menu
import gb
def main ( ):
menu ( )
for i in range ( len ( gb.n ) + 1 ):
m, gb.time = gb.n [ :i ], 0
qui... | 28.047619 | 58 | 0.604414 |
e8804495153363edf584a9dd6645b3ce92c5a600 | 947 | py | Python | Allura/allura/version.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2017-07-31T23:13:58.000Z | 2017-07-31T23:13:58.000Z | Allura/allura/version.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | Allura/allura/version.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # 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 (t... | 47.35 | 68 | 0.69905 |
e8804c193abead81f086a2968812e96faf1cd938 | 3,555 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/page_block_embed_post.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/page_block_embed_post.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/page_block_embed_post.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 33.857143 | 176 | 0.607032 |
e8805d942dd118a26b011420fa5aa2d4a7edfe35 | 4,756 | py | Python | src/python/pants/cache/artifact.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/cache/artifact.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/cache/artifact.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 shutil
import tarfile
from pants.util.contextutil import o... | 34.463768 | 104 | 0.684609 |
e8807402d86969944fd4c2df6403c262151549c0 | 3,334 | py | Python | tests/test_order_SolidLiquid.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_order_SolidLiquid.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_order_SolidLiquid.py | pbuslaev/freud | ed83bdc63ee8fddba78f070ce9ddf2a0021d67b8 | [
"BSD-3-Clause"
] | null | null | null | import numpy.testing as npt
import freud
import matplotlib
import unittest
matplotlib.use('agg')
class TestSolidLiquid(unittest.TestCase):
def test_shape(self):
N = 1000
L = 10
box, positions = freud.data.make_random_system(L, N)
comp = freud.order.SolidLiquid(6, q_threshold=.7, ... | 34.371134 | 78 | 0.65237 |
e88095705ef55f10c1ef5ca4c54911be956cbc79 | 1,512 | py | Python | offregister/recipes/deis.py | offscale/offregister | ac9ce3b3cdefac15ef5e8c6a3bce9ac2335a526c | [
"Apache-2.0",
"MIT"
] | 2 | 2021-02-25T00:14:45.000Z | 2021-02-26T00:30:05.000Z | offregister/recipes/deis.py | offscale/offregister | ac9ce3b3cdefac15ef5e8c6a3bce9ac2335a526c | [
"Apache-2.0",
"MIT"
] | null | null | null | offregister/recipes/deis.py | offscale/offregister | ac9ce3b3cdefac15ef5e8c6a3bce9ac2335a526c | [
"Apache-2.0",
"MIT"
] | 3 | 2016-07-19T09:12:12.000Z | 2021-01-09T22:33:40.000Z | from os import path
from fabric.api import run, sudo, cd
from fabric.contrib.files import append
from offregister.common.fabric_utils import get_tempdir_fab
from offregister.aux_recipes.go import core_install_godep
def ubuntu_install_deis(*args, **kwargs):
raise NotImplementedError("Deis not implemented on Ubun... | 34.363636 | 110 | 0.700397 |
e880a976cab94a896bdbe7dff35adb1d6164bf10 | 1,889 | py | Python | app/enquiries/tests/test_common_hawk.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | 3 | 2020-04-03T12:16:56.000Z | 2020-12-09T18:18:49.000Z | app/enquiries/tests/test_common_hawk.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | 173 | 2020-03-18T09:31:50.000Z | 2022-03-26T04:19:41.000Z | app/enquiries/tests/test_common_hawk.py | uktrade/enquiry-mgmt-tool | 547a195cb9296ad0b1dbc5c8435bfeeae9755bb4 | [
"MIT"
] | null | null | null | import re
from unittest.mock import Mock
import pytest
from freezegun import freeze_time
from app.enquiries.common.hawk import HawkAuth
BASE = "http://local.host/"
class TestHawkAuth:
"""Tests HawkAuth."""
@freeze_time("2018-01-01 00:00:00")
def test_requests_with_no_body_are_signed(self):
"""... | 34.981481 | 99 | 0.643197 |
e880d1cbec4f035e8fe27b8e0bffa15225cab161 | 17,518 | py | Python | functions.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | null | null | null | functions.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | 1 | 2021-11-11T22:15:36.000Z | 2021-11-11T22:15:36.000Z | functions.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | null | null | null | # %% functions
from timeit import default_timer as timer
import numpy as np
import matplotlib.pyplot as plt
import cv2 as cv
import skimage.color as skm
import pickle
import lzma
import bz2
from PIL import Image, ImageFilter
import sys
import os.path
import mpmath as mp
import skimage.morphology as morph
# video and ... | 30.203448 | 112 | 0.609544 |
e880d347fb999c82696858cfd3b0f010d9098553 | 7,236 | gyp | Python | third_party/class-dump/class-dump.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | third_party/class-dump/class-dump.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/class-dump/class-dump.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'mac_deployment_target': '10.9',
'mac_sdk_min': '10.9',
},
'targets': [
{
# GN version //third_party/class-dump(... | 36.918367 | 76 | 0.611111 |
e880d8d655ae110c12577ba8aef04542757e347d | 532 | py | Python | 239.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | 239.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | 239.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | '''
@author: l4zyc0d3r
People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt
'''
class Solution:
def maxSlidingWindow(self, N: List[int], k: int) -> List[int]:
dq, ans = [], []
for i, x in enumerate(N):
if dq and i+1-dq[0][0]>k:dq.pop(0)
if ... | 31.294118 | 86 | 0.511278 |
e880fc61ce25b40daa97334b9a67dd2fd0054478 | 3,591 | py | Python | intersight/models/snmp_deploy_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/snmp_deploy_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/snmp_deploy_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class SnmpDeployTaskRef(object):
"""
NOTE: This cla... | 23.94 | 77 | 0.539126 |
e8814b6cc4ff837105209df46699a2530754b234 | 3,855 | py | Python | tests/test_api.py | jeremylinlin/operator-courier | 9e53cee85e02e3ab54cfbef5770cfd58b4895c3b | [
"Apache-2.0"
] | 1 | 2019-04-09T04:52:16.000Z | 2019-04-09T04:52:16.000Z | tests/test_api.py | jeremylinlin/operator-courier | 9e53cee85e02e3ab54cfbef5770cfd58b4895c3b | [
"Apache-2.0"
] | null | null | null | tests/test_api.py | jeremylinlin/operator-courier | 9e53cee85e02e3ab54cfbef5770cfd58b4895c3b | [
"Apache-2.0"
] | null | null | null | import pytest
import yaml
from operatorcourier import api
from operatorcourier.format import unformat_bundle
from operatorcourier.errors import OpCourierBadBundle
@pytest.mark.parametrize('directory,expected', [
("tests/test_files/bundles/api/bundle1",
"tests/test_files/bundles/api/bundle1/results/bundle.yam... | 36.714286 | 88 | 0.716472 |
e8814e358b22f54faf12930d61257820f6c361c2 | 808 | py | Python | learning_log/learning_logs/migrations/0002_entry.py | gp111111/python_again | 4cd81362a2a72fa91886bb9550d45112d1921470 | [
"MIT"
] | null | null | null | learning_log/learning_logs/migrations/0002_entry.py | gp111111/python_again | 4cd81362a2a72fa91886bb9550d45112d1921470 | [
"MIT"
] | null | null | null | learning_log/learning_logs/migrations/0002_entry.py | gp111111/python_again | 4cd81362a2a72fa91886bb9550d45112d1921470 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.12 on 2022-04-08 09:34
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('learning_logs', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Entry',
... | 29.925926 | 117 | 0.579208 |
e8816b963f19facd5cbb8cc9cc285f001dcd4561 | 632 | py | Python | workflows/migrations/0009_auto_20171219_1032.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 4 | 2017-12-13T10:59:42.000Z | 2019-11-03T17:26:19.000Z | workflows/migrations/0009_auto_20171219_1032.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 21 | 2017-04-05T08:03:54.000Z | 2022-03-11T23:16:03.000Z | workflows/migrations/0009_auto_20171219_1032.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-19 10:32
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import workflows.thumbs
class Migration(migrations.Migration):
dependencies = [
('wo... | 26.333333 | 120 | 0.681962 |
e8817c82a7f0891f102a70e7d4ef6a4e757c0b43 | 43,749 | py | Python | lib/python2.7/matplotlib/font_manager.py | ashley8jain/IITD-complaint-system-web | 21a94601cba710f558d1689b87cfc391a1541c9f | [
"BSD-3-Clause"
] | 1 | 2017-01-25T00:38:48.000Z | 2017-01-25T00:38:48.000Z | lib/python2.7/matplotlib/font_manager.py | ashley8jain/IITD-complaint-system-web | 21a94601cba710f558d1689b87cfc391a1541c9f | [
"BSD-3-Clause"
] | null | null | null | lib/python2.7/matplotlib/font_manager.py | ashley8jain/IITD-complaint-system-web | 21a94601cba710f558d1689b87cfc391a1541c9f | [
"BSD-3-Clause"
] | null | null | null | """
A module for finding, managing, and using fonts across platforms.
This module provides a single :class:`FontManager` instance that can
be shared across backends and platforms. The :func:`findfont`
function returns the best TrueType (TTF) font file in the local or
system font path that matches the specified :class... | 32.869271 | 96 | 0.582665 |
e8818206effbb08ae3dad2e0437aa2e0a7b5d8b4 | 904 | py | Python | sdks/python/test/test_DeviceSetModel.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_DeviceSetModel.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_DeviceSetModel.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 22.6 | 87 | 0.712389 |
e881c35d2c306a57a0f220eaf21b699ad5b0e1ba | 671 | py | Python | softlearning/replay_pools/replay_pool.py | limash/softlearning | aaa9d8c5cc3ba4bf459eb5a1a7469b3ae3b4f94f | [
"MIT"
] | 920 | 2018-12-11T16:22:23.000Z | 2022-03-28T08:17:07.000Z | softlearning/replay_pools/replay_pool.py | limash/softlearning | aaa9d8c5cc3ba4bf459eb5a1a7469b3ae3b4f94f | [
"MIT"
] | 133 | 2018-12-09T08:08:33.000Z | 2022-02-28T12:43:14.000Z | softlearning/replay_pools/replay_pool.py | limash/softlearning | aaa9d8c5cc3ba4bf459eb5a1a7469b3ae3b4f94f | [
"MIT"
] | 241 | 2018-12-03T21:35:24.000Z | 2022-03-20T06:24:45.000Z | import abc
class ReplayPool(object):
"""A class used to save and replay data."""
@abc.abstractmethod
def add_sample(self, sample):
"""Add a transition tuple."""
pass
@abc.abstractmethod
def terminate_episode(self):
"""Clean up pool after episode termination."""
pa... | 20.96875 | 57 | 0.603577 |
e881d883cd6d8933841722474185123ead7d0b42 | 5,034 | py | Python | rlkit/state_distance/gcm/gcm_ddpg.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/state_distance/gcm/gcm_ddpg.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/state_distance/gcm/gcm_ddpg.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | from collections import OrderedDict
import numpy as np
import torch.optim as optim
from torch import nn as nn
import rlkit.torch.pytorch_util as ptu
from rlkit.misc.eval_util import create_stats_ordered_dict
from rlkit.state_distance.gcm import GoalConditionedModel
from rlkit.torch.torch_rl_algorithm import TorchRLAl... | 33.337748 | 80 | 0.595749 |
e881e204f7113a1ad75fd725ebd81cee46f1511f | 6,742 | py | Python | usecase-3/usecase-3-cleanup-Step-4.py | simonsays881/data-protection | 390551984f7da2f7ec8aed65578b79c7059e476b | [
"MIT-0"
] | null | null | null | usecase-3/usecase-3-cleanup-Step-4.py | simonsays881/data-protection | 390551984f7da2f7ec8aed65578b79c7059e476b | [
"MIT-0"
] | null | null | null | usecase-3/usecase-3-cleanup-Step-4.py | simonsays881/data-protection | 390551984f7da2f7ec8aed65578b79c7059e476b | [
"MIT-0"
] | null | null | null | """
###########################################################################
# CLIENT SIDE ENCRYPTION - KMS CLEAN-UP FOR USECASE-3 #
# LET'S DELETE THE BUCKET AND THE OBJECTS THAT WE CREATED FOR USECASE-3 #
# LET's ALSO DELETE THE FILES LOCALLY CREATED IN THE FILESYSTEM #
############... | 43.496774 | 157 | 0.490211 |
e8820fd042e959f6f7a9520af0dd78cff8405486 | 17,663 | py | Python | previous_version/utils.py | CVI-SZU/CLIMS | 9d3d0123b625b2c6941069e8fb359019a5cabd59 | [
"MIT"
] | 4 | 2022-03-19T06:50:32.000Z | 2022-03-26T03:25:51.000Z | previous_version/utils.py | CVI-SZU/CLIMS | 9d3d0123b625b2c6941069e8fb359019a5cabd59 | [
"MIT"
] | 1 | 2022-03-26T03:27:57.000Z | 2022-03-30T07:00:43.000Z | previous_version/utils.py | CVI-SZU/CLIMS | 9d3d0123b625b2c6941069e8fb359019a5cabd59 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import torch
import cv2
from tools.ai.torch_utils import *
from tools.ai.demo_utils import *
from torchvision.utils import save_image
from torchvision import utils
CAT20_VOC2012 = ['aeroplane', 'bicycle', 'bird', 'boat',
'bottle', 'bus', 'car', 'cat',... | 40.234624 | 127 | 0.537508 |
e8821743a03fb9800d07a5eb14a6d683655ec707 | 4,381 | py | Python | docusign_rooms/models/form_group_form_to_assign.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | 2 | 2020-11-11T01:38:45.000Z | 2021-11-14T17:00:43.000Z | docusign_rooms/models/form_group_form_to_assign.py | docusign/docusign-rooms-python-client | eb8cfd0e487a87bc43d54bfa9de784eb170a40d3 | [
"MIT"
] | null | null | null | docusign_rooms/models/form_group_form_to_assign.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... | 29.206667 | 93 | 0.589135 |
e8822bbb18c27e935da3add035c714301895e65f | 12,300 | py | Python | geosoft/gxapi/GXSURFACE.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | geosoft/gxapi/GXSURFACE.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | geosoft/gxapi/GXSURFACE.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | ### extends 'class_empty.py'
### block ClassImports
# NOTICE: Do not edit anything here, it is generated code
from . import gxapi_cy
from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref
from .GXSURFACEITEM import GXSURFACEITEM
### endblock ClassImports
### block Header
# NOTICE: The code generator will n... | 32.198953 | 182 | 0.620569 |
e88242530c248b0837abaaf68418e99947068bc0 | 43,537 | py | Python | mitmproxy/http.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/http.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/http.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | import binascii
import os
import re
import time
import urllib.parse
import json
import warnings
from dataclasses import dataclass
from dataclasses import fields
from email.utils import formatdate
from email.utils import mktime_tz
from email.utils import parsedate_tz
from typing import Callable
from typing import Iterab... | 33.438556 | 122 | 0.592691 |
e88282d2285f9833cf4ede394c65def3a8c7bdd2 | 4,338 | py | Python | docs/examples/use_cases/pytorch/single_stage_detector/src/coco_pipeline.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2021-03-16T05:09:16.000Z | 2022-03-29T12:48:44.000Z | docs/examples/use_cases/pytorch/single_stage_detector/src/coco_pipeline.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | docs/examples/use_cases/pytorch/single_stage_detector/src/coco_pipeline.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2021-05-08T16:51:55.000Z | 2021-07-22T09:02:44.000Z | # 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 of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 34.704 | 97 | 0.600507 |
e88290ab6d3be06575b1ddd86533786feb887ee8 | 5,992 | py | Python | scripts/average_reward_sarsa.py | fb1n15/maddpg | ce0fd8028c09dc4f13c5c4ab015c9ad980469443 | [
"MIT"
] | null | null | null | scripts/average_reward_sarsa.py | fb1n15/maddpg | ce0fd8028c09dc4f13c5c4ab015c9ad980469443 | [
"MIT"
] | null | null | null | scripts/average_reward_sarsa.py | fb1n15/maddpg | ce0fd8028c09dc4f13c5c4ab015c9ad980469443 | [
"MIT"
] | null | null | null | # %%
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from collections import deque
from tqdm import tqdm
import json
from agents import BaseAgent
from generate_simulation_data import generate_synthetic_data_edge_cloud
from classes_in_reverse_auction_v1 import ReverseAuctionMDP, FogNodeAgent, ... | 41.041096 | 109 | 0.591288 |
e8829641b481e1aa195a15739541e8d1f64d3a56 | 699 | py | Python | test_balsa/test_balsa_gui.py | jamesabel/balsa | 504fe200530da7bf466f0101deafa3b7c93560b6 | [
"MIT"
] | 4 | 2018-10-27T20:03:11.000Z | 2019-09-30T03:30:32.000Z | test_balsa/test_balsa_gui.py | jamesabel/balsa | 504fe200530da7bf466f0101deafa3b7c93560b6 | [
"MIT"
] | 8 | 2018-06-08T17:03:51.000Z | 2019-11-19T01:38:25.000Z | test_balsa/test_balsa_gui.py | jamesabel/balsa | 504fe200530da7bf466f0101deafa3b7c93560b6 | [
"MIT"
] | 4 | 2018-06-08T17:13:05.000Z | 2019-11-19T01:39:00.000Z | import time
import threading
import pyautogui
from balsa import get_logger, Balsa, __author__
from test_balsa import enter_press_time
def press_enter():
time.sleep(enter_press_time)
pyautogui.press("enter")
def test_balsa_gui():
application_name = "test_balsa_gui"
balsa = Balsa(application_name, ... | 22.548387 | 140 | 0.756795 |
e882a5626c20921e17a47c046e8dbcca7330630a | 703 | py | Python | py/cidoc_crm_types/properties/p129_is_about.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p129_is_about.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p129_is_about.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | from .p67_refers_to import P67RefersTo
from dataclasses import dataclass
@dataclass
class P129IsAbout(P67RefersTo):
"""
Scope note:
This property documents that an instance of E89 Propositional Object has as subject an instance of E1 CRM Entity.
This differs from P67 refers to (is referred to by), which refers t... | 28.12 | 195 | 0.74111 |
e882cc7f5fc40a898969ba71a70be66935877c5a | 2,043 | py | Python | test/python/test_relu6.py | ananyamukh6/ngraph-tf | 7d6d643164371c38458525c63ecf1fe29ce10b36 | [
"Apache-2.0"
] | null | null | null | test/python/test_relu6.py | ananyamukh6/ngraph-tf | 7d6d643164371c38458525c63ecf1fe29ce10b36 | [
"Apache-2.0"
] | null | null | null | test/python/test_relu6.py | ananyamukh6/ngraph-tf | 7d6d643164371c38458525c63ecf1fe29ce10b36 | [
"Apache-2.0"
] | null | null | null | # ==============================================================================
# Copyright 2018 Intel Corporation
#
# 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.apa... | 34.05 | 80 | 0.531082 |
e882eb266c4c1dc126c5b4df8865c11e8a500cca | 3,880 | py | Python | ivy/backends/numpy/core/image.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | null | null | null | ivy/backends/numpy/core/image.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | null | null | null | ivy/backends/numpy/core/image.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | null | null | null | """
Collection of Numpy image functions, wrapped to fit Ivy syntax and signature.
"""
# global
import math
import numpy as _np
# local
from ivy.backends import numpy as _ivy
def stack_images(images, desired_aspect_ratio=(1, 1)):
num_images = len(images)
if num_images == 0:
raise Exception('At least ... | 34.336283 | 108 | 0.627835 |
e88309c78868621e3b878fdfb719af3ce7cce1d8 | 3,053 | py | Python | Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2011 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 40.171053 | 90 | 0.717 |
e8831207c72b91bb68da0f4a2481302a46f9a966 | 742 | py | Python | python/tree/0589_n-ary_tree_preorder_traversal.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/tree/0589_n-ary_tree_preorder_traversal.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/tree/0589_n-ary_tree_preorder_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:
def __init__(self, val, children):
self.val = val
self.children = children
class Solution:
def preorder(self, root):
res = []
self.traverse(root, res)
return res
def traverse(self, node, res):
if node:
res.ap... | 21.2 | 55 | 0.52965 |
e88369763af9506f36a7fd150edf4ecf27c4865f | 106 | py | Python | libs/uix/baseclasses/startscreen.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | null | null | null | libs/uix/baseclasses/startscreen.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | 1 | 2021-06-01T22:30:24.000Z | 2021-06-01T22:30:24.000Z | libs/uix/baseclasses/startscreen.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | 1 | 2021-05-11T23:06:20.000Z | 2021-05-11T23:06:20.000Z | # -*- coding: utf-8 -*-
from kivy.uix.boxlayout import BoxLayout
class StartScreen(BoxLayout):
pass
| 15.142857 | 40 | 0.698113 |
e8838cd3bca7b3afba80504f9e705943474423c5 | 39,979 | py | Python | tensorflow/python/keras/engine/training_eager.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/keras/engine/training_eager.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/keras/engine/training_eager.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2018 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... | 35.600178 | 80 | 0.662998 |
e883be094a10e8f32b1bde7bb9852eb7692e1e53 | 1,534 | py | Python | mapusaurus/respondents/admin.py | mehtadev17/mapusaurus | ad49c45f375ace9b8271f27aca64f2f81e23a4bd | [
"CC0-1.0"
] | null | null | null | mapusaurus/respondents/admin.py | mehtadev17/mapusaurus | ad49c45f375ace9b8271f27aca64f2f81e23a4bd | [
"CC0-1.0"
] | null | null | null | mapusaurus/respondents/admin.py | mehtadev17/mapusaurus | ad49c45f375ace9b8271f27aca64f2f81e23a4bd | [
"CC0-1.0"
] | null | null | null | from django.contrib import admin
from models import ZipcodeCityState, Agency, ParentInstitution, Institution
admin.site.disable_action('delete_selected')
# Register your models here.
class ZipcodeCityStateAdmin(admin.ModelAdmin):
readonly_fields = ('zip_code', 'plus_four', 'city', 'state')
list_display = ['un... | 29.5 | 106 | 0.649935 |
e883dfb064d902bdd3b7948d4d5a65f9330ea399 | 477 | py | Python | rl-toolkit/rlf/comps/ensemble.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | 4 | 2021-11-17T20:19:34.000Z | 2022-03-31T04:21:26.000Z | rl-toolkit/rlf/comps/ensemble.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | rl-toolkit/rlf/comps/ensemble.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
class Ensemble(nn.Module):
def __init__(self, create_net_fn, num_ensembles):
super().__init__()
self.nets = nn.ModuleList([create_net_fn() for _ in range(num_ensembles)])
def forward(self, *argv):
outs = []
for net in self.nets:
n... | 25.105263 | 82 | 0.601677 |
e8840e3507808b2a2ce19e9fec34f6e999306b02 | 263 | py | Python | bflib/skills/professions.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/skills/professions.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/skills/professions.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from bflib.skills.base import Skill
from bflib.characters import abilityscores
# TODO Mostly placeholder, each Profession should be its own Skill
class Profession(Skill):
name = "Profession"
related_stat = abilityscores.Intelligence
natural = False
| 26.3 | 66 | 0.779468 |
e8841edff47ac47a779e33a0c8f800712091cd62 | 261 | py | Python | neuralmonkey/checkpython.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 5 | 2017-04-24T21:10:03.000Z | 2019-05-22T13:19:35.000Z | neuralmonkey/checkpython.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | null | null | null | neuralmonkey/checkpython.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 5 | 2017-04-25T01:36:44.000Z | 2019-12-13T15:04:03.000Z | import sys
if sys.version_info[0] < 3 or sys.version_info[1] < 5:
print("Error:", file=sys.stderr)
print("Neural Monkey must use Python >= 3.5", file=sys.stderr)
print("Your Python is", sys.version, sys.executable, file=sys.stderr)
sys.exit(1)
| 32.625 | 73 | 0.67433 |
e88429595242a1ca3dd54e85b6dabb74f25ce936 | 4,495 | py | Python | lib/python/treadmill_aws/cli/admin/cell/configure_partition.py | bretttegartms/treadmill-aws | b6b6438d19adbbabcbcccf1497965b72d11d50bd | [
"Apache-2.0"
] | null | null | null | lib/python/treadmill_aws/cli/admin/cell/configure_partition.py | bretttegartms/treadmill-aws | b6b6438d19adbbabcbcccf1497965b72d11d50bd | [
"Apache-2.0"
] | null | null | null | lib/python/treadmill_aws/cli/admin/cell/configure_partition.py | bretttegartms/treadmill-aws | b6b6438d19adbbabcbcccf1497965b72d11d50bd | [
"Apache-2.0"
] | null | null | null | """Admin module to manage partition data.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import click
from treadmill import admin
from treadmill import context
from treadmill import cli
from trea... | 39.429825 | 79 | 0.591546 |
e8843e66675d292e1cef3b5c92585c230386b8c1 | 1,967 | py | Python | src/retrie/trie.py | pombredanne/retrie | 2ff5e55acc2aaa06c62873e8b0b3676985c94736 | [
"MIT"
] | 31 | 2020-04-09T16:57:39.000Z | 2022-03-08T15:54:24.000Z | src/retrie/trie.py | pombredanne/retrie | 2ff5e55acc2aaa06c62873e8b0b3676985c94736 | [
"MIT"
] | 4 | 2020-05-01T17:40:51.000Z | 2021-07-08T07:19:39.000Z | src/retrie/trie.py | pombredanne/retrie | 2ff5e55acc2aaa06c62873e8b0b3676985c94736 | [
"MIT"
] | 4 | 2020-06-05T08:32:45.000Z | 2021-07-01T23:49:31.000Z | import re
from typing import Dict, Optional, Text, Union
data_type = Dict[Text, Union[int, Dict]]
class Trie:
"""Create a Trie for a sequence of strings.
The Trie can be exported to a Regex pattern, which should match much faster than a
simple Regex union.
"""
__slots__ = "data"
def __ini... | 25.881579 | 86 | 0.492628 |
e88442a6a4bdb1db64f9b54467ab34b0394e0bbb | 898 | py | Python | query.py | mathurma/KGQA | 967cd851f84c73f284aee5fe94f8a3df66d5b638 | [
"CC0-1.0"
] | null | null | null | query.py | mathurma/KGQA | 967cd851f84c73f284aee5fe94f8a3df66d5b638 | [
"CC0-1.0"
] | null | null | null | query.py | mathurma/KGQA | 967cd851f84c73f284aee5fe94f8a3df66d5b638 | [
"CC0-1.0"
] | null | null | null | import rdflib
import en_core_web_sm
class _Similarity(object):
nlp = en_core_web_sm.load()
def sim(self, w1, w2, method=1):
if method == 1:
return self._sim1(w1, w2)
# elif method == N:
# return self._simN(w1, w2)
def _sim1(self, w1, w2):
toks = _Similari... | 23.631579 | 53 | 0.571269 |
e884759508dcf16ed99ead995553dab9039e6653 | 2,843 | py | Python | setup.py | cocoaaa/interpretable-test | 373c1316d071e80b04b17a91d767cf6f40268439 | [
"MIT"
] | null | null | null | setup.py | cocoaaa/interpretable-test | 373c1316d071e80b04b17a91d767cf6f40268439 | [
"MIT"
] | null | null | null | setup.py | cocoaaa/interpretable-test | 373c1316d071e80b04b17a91d767cf6f40268439 | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.absp... | 33.447059 | 79 | 0.68484 |
e8848e9d3d078c606c55a7e3bad97f303c6d7e50 | 10,626 | py | Python | Lib/site-packages/kivy/logger.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 9 | 2016-09-03T07:20:01.000Z | 2020-05-21T14:44:48.000Z | Lib/site-packages/kivy/logger.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 1 | 2017-05-30T20:45:15.000Z | 2017-05-30T20:45:15.000Z | Lib/site-packages/kivy/logger.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 4 | 2016-09-10T15:27:54.000Z | 2020-03-27T22:05:31.000Z | '''
Logger object
=============
Differents logging levels are available : trace, debug, info, warning, error
and critical.
Examples of usage::
from kivy.logger import Logger
Logger.info('title: This is a info message.')
Logger.debug('title: This is a debug message.')
try:
raise Exception('b... | 28.875 | 79 | 0.579334 |
e8849b49e197910ea5338f7b5dcf53fa65df6d8c | 22,933 | py | Python | Reconstruct4DCineMRI/Reconstruct4DCineMRI.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 48 | 2016-04-13T10:22:53.000Z | 2022-03-21T16:31:41.000Z | Reconstruct4DCineMRI/Reconstruct4DCineMRI.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 14 | 2018-10-25T21:15:20.000Z | 2021-11-26T16:55:55.000Z | Reconstruct4DCineMRI/Reconstruct4DCineMRI.py | SlicerHeart/SlicerHeart | 5ead8d723f6dec67ea6065b847cb4f8dce5bef72 | [
"BSD-3-Clause"
] | 21 | 2017-09-12T08:20:36.000Z | 2021-10-30T02:22:11.000Z | import os
import unittest
import logging
import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
from slicer.util import VTKObservationMixin
#
# Reconstruct4DCineMRI
#
class Reconstruct4DCineMRI(ScriptedLoadableModule):
"""Uses ScriptedLoadableModule base class, available at:
https://... | 46.423077 | 168 | 0.747918 |
e884af828ee29ce307d11de00f26338229fcb563 | 1,034 | py | Python | examples/pretrained_cnn/tutorial_models_vgg_static.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | examples/pretrained_cnn/tutorial_models_vgg_static.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | examples/pretrained_cnn/tutorial_models_vgg_static.py | OliverZijia/tensorlayer2 | 01113b53e84a3bbb298b9c35ebd53254e487350f | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""VGG for ImageNet using TL models."""
import time
import numpy as np
import tensorflow as tf
import tensorlayer as tl
from tensorlayer.models.imagenet_classes import class_names
tf.logging.set_verbosity(tf.logging.DEBUG)
tl.logging.set_verbosity(tl.logging.DEBUG)
# get... | 26.512821 | 83 | 0.704062 |
e884c43285e6f05c5929fe4db361918fb47708ac | 974 | py | Python | tests/pymath/test_matrix.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/pymath/test_matrix.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/pymath/test_matrix.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import unittest
from pymath.matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqual([9, 7... | 28.647059 | 57 | 0.629363 |
e884db66fd1cffeb87956d7c7e5d2a4d68074cb9 | 1,105 | py | Python | tests/conftest.py | felix990302/nnlib | 618c9f860ff2298ed2e0bbcb249ae74eeb8a408b | [
"Apache-2.0"
] | 1 | 2019-03-27T17:02:50.000Z | 2019-03-27T17:02:50.000Z | tests/conftest.py | felix990302/nnlib | 618c9f860ff2298ed2e0bbcb249ae74eeb8a408b | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | felix990302/nnlib | 618c9f860ff2298ed2e0bbcb249ae74eeb8a408b | [
"Apache-2.0"
] | null | null | null | from os import path
import pytest
import h5py
import numpy as np
testdir = path.abspath(path.dirname(__file__))
@pytest.fixture(scope='session')
def cat_dataset():
train_dataset = h5py.File(path.join(testdir, 'datasets/train_catvnoncat.h5'), "r")
train_set_x_orig = np.array(train_dataset["train_set_x"][:]) ... | 36.833333 | 91 | 0.728507 |
e88509980686e0cc82bae09b544d0b16334051ab | 203 | py | Python | mmgen/ops/__init__.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | mmgen/ops/__init__.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | mmgen/ops/__init__.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from .conv2d_gradfix import conv2d, conv_transpose2d
from .stylegan3.ops import filtered_lrelu
__all__ = ['conv2d', 'conv_transpose2d', 'filtered_lrelu']
| 33.833333 | 58 | 0.793103 |
e8851f78205c06799f49108ed285a6fe9c6f65b8 | 4,793 | py | Python | fedot/core/data/load_data.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | fedot/core/data/load_data.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | fedot/core/data/load_data.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | import glob
import json
import os
from abc import ABC, abstractmethod
import pandas as pd
class BatchLoader(ABC):
""" Class for loading data with batches """
def __init__(self, path: str, label='label'):
self.path = path
self.meta_df = None
self.target_name = label
@abstractmeth... | 33.992908 | 97 | 0.584603 |
e8852d831cc58835241d8f631a98379f34f23b67 | 4,210 | py | Python | src/olympia/devhub/widgets.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 3 | 2020-03-05T18:17:14.000Z | 2020-03-09T01:24:38.000Z | src/olympia/devhub/widgets.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/devhub/widgets.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1 | 2020-06-04T10:18:59.000Z | 2020-06-04T10:18:59.000Z | from django.conf import settings
from django import forms
from django.utils.encoding import force_text
from django.utils.html import conditional_escape, format_html
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext
from olympia.addons.models import Category
class IconTypeSe... | 36.293103 | 79 | 0.540855 |
e885363a1e573b545565fefe999032b8c7170f15 | 1,874 | py | Python | augly/video/augmenters/ffmpeg/stack.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/video/augmenters/ffmpeg/stack.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/video/augmenters/ffmpeg/stack.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
from typing import Dict, Tuple
import ffmpeg # @manual
from augly.utils import pathmgr
from augly.video.augmenters.ffmpeg.base_augmenter import BaseFFMPEGAugmenter
from augly.video.helpers import get_video_info
from ffmpeg.nodes import Filtera... | 33.464286 | 87 | 0.65048 |
e88546186bcb1f3e8355582d2b127cc396f000c2 | 2,788 | py | Python | mozillians/urls.py | Sheeri/mozillians | b8c48d205fcd203214a4949b2ad6cb790545d8a6 | [
"BSD-3-Clause"
] | null | null | null | mozillians/urls.py | Sheeri/mozillians | b8c48d205fcd203214a4949b2ad6cb790545d8a6 | [
"BSD-3-Clause"
] | null | null | null | mozillians/urls.py | Sheeri/mozillians | b8c48d205fcd203214a4949b2ad6cb790545d8a6 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.conf.urls.defaults import include, patterns, url
from django.contrib import admin
from django.shortcuts import render
from django.views.decorators.cache import cache_page
from django.views.i18n import javascript_catalog
import autocomplete_light
from funfactory.monkeypatch... | 33.190476 | 77 | 0.718795 |
e88588c9020d13b53d6ab19a97776013ef597136 | 4,511 | py | Python | examples/tests/utils.py | 2bright/adapow2 | 5f06c18ba95a61dc910ab5ad28b490c44841ae3b | [
"Apache-2.0"
] | null | null | null | examples/tests/utils.py | 2bright/adapow2 | 5f06c18ba95a61dc910ab5ad28b490c44841ae3b | [
"Apache-2.0"
] | null | null | null | examples/tests/utils.py | 2bright/adapow2 | 5f06c18ba95a61dc910ab5ad28b490c44841ae3b | [
"Apache-2.0"
] | 1 | 2019-05-13T03:12:54.000Z | 2019-05-13T03:12:54.000Z | import numpy as np
import matplotlib.pyplot as plt
import os
import json
class NumpyEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, np.ndarray):
return obj.tolist()
if isinstance(obj, np.int64):
return int(obj)
if isinstance(obj, np.int32):
... | 29.677632 | 91 | 0.59765 |
e8858cffa0bd2752516da87987d79e303c600942 | 18,894 | py | Python | saleor/settings.py | rainerioagbayani/golftee-core | 228744d42391bae32288cfcac943b6a38f3b47e5 | [
"CC-BY-4.0"
] | null | null | null | saleor/settings.py | rainerioagbayani/golftee-core | 228744d42391bae32288cfcac943b6a38f3b47e5 | [
"CC-BY-4.0"
] | null | null | null | saleor/settings.py | rainerioagbayani/golftee-core | 228744d42391bae32288cfcac943b6a38f3b47e5 | [
"CC-BY-4.0"
] | null | null | null | import ast
import os.path
import warnings
from datetime import timedelta
import dj_database_url
import dj_email_url
import django_cache_url
import jaeger_client
import jaeger_client.config
import pkg_resources
import sentry_sdk
from django.core.exceptions import ImproperlyConfigured
from django.core.management.utils i... | 32.297436 | 88 | 0.692654 |
e885a554b1883fd74b5a532ab13b39ba14f18fa5 | 3,710 | py | Python | Solutions/TenableIO/Data Connectors/tenable_helper.py | recordedfuture/Azure-Sentinel | 1cbe97cfbd5cd39baeeac2f16424918aa8f9d73b | [
"MIT"
] | null | null | null | Solutions/TenableIO/Data Connectors/tenable_helper.py | recordedfuture/Azure-Sentinel | 1cbe97cfbd5cd39baeeac2f16424918aa8f9d73b | [
"MIT"
] | null | null | null | Solutions/TenableIO/Data Connectors/tenable_helper.py | recordedfuture/Azure-Sentinel | 1cbe97cfbd5cd39baeeac2f16424918aa8f9d73b | [
"MIT"
] | 1 | 2022-03-15T06:18:02.000Z | 2022-03-15T06:18:02.000Z | import os
import logging
import json
from tenable.io import TenableIO as BaseIO
from tenable.io.exports import ExportsAPI
from enum import Enum
from queue import Queue
from typing import List, Dict
class ExportsAPIExtended(ExportsAPI):
def vulns(self, **kwargs) -> str:
return super().vulns(**kwargs).uuid... | 32.26087 | 116 | 0.628841 |
e885acdaec98fd5da7d2c8a0440d7d1322e9760e | 2,353 | py | Python | tests/api/test_thread.py | HwangWonYo/naver_talk_sdk | 8c4bb692d50654e5af3c4ae2b8894052feb2116a | [
"MIT"
] | 19 | 2017-12-05T07:07:54.000Z | 2018-12-08T11:39:13.000Z | tests/api/test_thread.py | bungeoppang/naver_talk_sdk | 8c4bb692d50654e5af3c4ae2b8894052feb2116a | [
"MIT"
] | 36 | 2017-12-04T03:48:16.000Z | 2018-07-20T01:30:16.000Z | tests/api/test_thread.py | bungeoppang/naver_talk_sdk | 8c4bb692d50654e5af3c4ae2b8894052feb2116a | [
"MIT"
] | 2 | 2018-10-02T01:39:59.000Z | 2018-10-16T01:28:29.000Z | #-*- encoding:utf-8 -*-
import json
import unittest
import responses
try:
from unittest import mock
except:
import mock
from nta import (
NaverTalkApi,
)
from nta.models import(
TextContent, QuickReply, ButtonText, ButtonLink
)
class TestNaverTalkAPI(unittest.TestCase):
def setUp(self):
... | 25.576087 | 66 | 0.479388 |
e885b81e1a23bf2903c1bcaf476717284fd31162 | 7,701 | py | Python | Face Recognition/code_material_python/helper.py | AmineKheldouni/Graphs-Machine-Learning | 1b34ef38516d46e8ca61b1a8093e6c8fb76fe031 | [
"MIT"
] | 1 | 2019-02-17T12:40:53.000Z | 2019-02-17T12:40:53.000Z | Face Recognition/code_material_python/helper.py | AmineKheldouni/Graphs-Machine-Learning | 1b34ef38516d46e8ca61b1a8093e6c8fb76fe031 | [
"MIT"
] | null | null | null | Face Recognition/code_material_python/helper.py | AmineKheldouni/Graphs-Machine-Learning | 1b34ef38516d46e8ca61b1a8093e6c8fb76fe031 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import scipy
import numpy as np
import networkx as nx
import random
import scipy.io
import scipy.spatial.distance as sd
def is_connected(adj,n):
# Uses the fact that multiplying the adj matrix to itself k times give the
# number of ways to get from i to j in k steps. If the end of the
... | 30.681275 | 84 | 0.539151 |
e885ebc36f39c86f8ee1bd5c2899aae70095a576 | 2,569 | py | Python | ufora/FORA/python/Control.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/FORA/python/Control.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/FORA/python/Control.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 32.518987 | 86 | 0.636434 |
e885ee66d420c16ad974a4d9dfdc8b9e48c4e30c | 3,051 | py | Python | myeongsoo/pseudo/train.py | DongjaeJang/Deep-Knowledge-Tracing | aab72939a6cbdfc8b7f11bf074040b48771cbf3f | [
"Unlicense"
] | null | null | null | myeongsoo/pseudo/train.py | DongjaeJang/Deep-Knowledge-Tracing | aab72939a6cbdfc8b7f11bf074040b48771cbf3f | [
"Unlicense"
] | null | null | null | myeongsoo/pseudo/train.py | DongjaeJang/Deep-Knowledge-Tracing | aab72939a6cbdfc8b7f11bf074040b48771cbf3f | [
"Unlicense"
] | null | null | null | import os
from args import parse_args
from dkt.dataloader import *
from dkt import trainer
import torch
from dkt.utils import setSeeds
import wandb
import numpy as np
import pandas as pd
import pickle
def main(args):
setSeeds(42)
device = "cuda" if torch.cuda.is_available() else "cpu"
args.device = device
... | 37.666667 | 88 | 0.679777 |
e885f31008212980d5b81a199c156af5d5c75f99 | 3,692 | py | Python | cavparams/functions.py | mikelovskij/cavparams | c2fc25501a4fa26925dae43cf0d07a2a31d64031 | [
"MIT"
] | null | null | null | cavparams/functions.py | mikelovskij/cavparams | c2fc25501a4fa26925dae43cf0d07a2a31d64031 | [
"MIT"
] | null | null | null | cavparams/functions.py | mikelovskij/cavparams | c2fc25501a4fa26925dae43cf0d07a2a31d64031 | [
"MIT"
] | null | null | null | import numpy as np
def cavity_parameter_estimator(l, rc1, rc2, lam=1064 * 10 ** (-9)):
"""
Uses the parameters of a FP cavity (and of the laser) to estimate the
parameters of its matched gaussian beam, using Perreca's formulas.
Args:
l: length of the cavity
rc1: curvature radius of fi... | 35.161905 | 88 | 0.48429 |
e8860718169d69287511f9fa02ade2352decd302 | 2,808 | py | Python | src/streamlink/plugins/live_russia_tv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2019-11-25T01:37:21.000Z | 2019-11-25T01:37:21.000Z | src/streamlink/plugins/live_russia_tv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/live_russia_tv.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | import logging
import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import http, validate
from streamlink.plugin.api.utils import itertags
from streamlink.stream import HLSStream, HTTPStream
log = logging.getLogger(__name__)
class LiveRussia(Plugin):
url_re = re.compile(r"https?://(?:www\.|... | 34.243902 | 114 | 0.523504 |
e886698a73de9599799aa50a5d36940aaef48d9a | 1,244 | py | Python | Clase06/costo_camion.py | qagustina/python-exercises | b4e0708ed1b3defea4d9b6adb4d97fc2d3b4a7e1 | [
"MIT"
] | null | null | null | Clase06/costo_camion.py | qagustina/python-exercises | b4e0708ed1b3defea4d9b6adb4d97fc2d3b4a7e1 | [
"MIT"
] | null | null | null | Clase06/costo_camion.py | qagustina/python-exercises | b4e0708ed1b3defea4d9b6adb4d97fc2d3b4a7e1 | [
"MIT"
] | null | null | null | # 6.12
import informe_funciones
def costo_camion(nombre_archivo):
camion = informe_funciones.leer_camion(nombre_archivo)
costo_total = 0
for registro in camion:
costo_total += registro['cajones']*registro['precio']
return costo_total
# version anterior
# def costo_camion(archivo):
# cost... | 30.341463 | 81 | 0.590836 |
e886975dd5522ff2aae6cf11d869486620efaab0 | 4,346 | py | Python | py/levels/energy.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | 2 | 2020-01-04T23:44:10.000Z | 2020-07-12T17:10:09.000Z | py/levels/energy.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | null | null | null | py/levels/energy.py | triffid/kiki | b64b8524063c149a5cc9118f48d80afec1d8a942 | [
"Unlicense"
] | 1 | 2022-03-16T05:43:33.000Z | 2022-03-16T05:43:33.000Z | # .................................................................................................................
level_dict["energy"] = {
"scheme": "default_scheme",
"size": (9,17,9),
"intro": "energy",
"... | 49.386364 | 115 | 0.560746 |
e886b9c5b28827b65bde24b91585c574917b4733 | 15,312 | py | Python | extended_uva_judge/objects.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | extended_uva_judge/objects.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | extended_uva_judge/objects.py | fritogotlayed/Extended-UVA-Judge | 7f4b04052429374d90597757c5bfb2a0a5bfe2ba | [
"MIT"
] | null | null | null | """Module housing the bulk of the business objects for the Judge system
This module houses the various business objects for the automated Judge. In the
future if the judge expands enough new modules may be created to subdivide
logical groupings.
"""
import os
import shutil
import logging
import json
import abc
import ... | 32.929032 | 79 | 0.623694 |
e8870c072110da145c0bb78e20c3584083438ea0 | 5,800 | py | Python | tensorflow/contrib/opt/python/training/sign_decay.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/opt/python/training/sign_decay.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/opt/python/training/sign_decay.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2017 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... | 36.477987 | 80 | 0.721207 |
e88719bec3a11afac73451af0b754eb9c94bbdf5 | 6,529 | py | Python | cellphonedb/src/core/methods/cpdb_analysis_simple_method.py | jshilts/cellphonedb | 866e23b7785f04a609654de5c3e7621ffeb46c0f | [
"MIT"
] | null | null | null | cellphonedb/src/core/methods/cpdb_analysis_simple_method.py | jshilts/cellphonedb | 866e23b7785f04a609654de5c3e7621ffeb46c0f | [
"MIT"
] | null | null | null | cellphonedb/src/core/methods/cpdb_analysis_simple_method.py | jshilts/cellphonedb | 866e23b7785f04a609654de5c3e7621ffeb46c0f | [
"MIT"
] | null | null | null | import pandas as pd
from cellphonedb.src.core.methods import cpdb_statistical_analysis_helper
from cellphonedb.src.core.core_logger import core_logger
from cellphonedb.src.core.models.interaction import interaction_filter
def call(meta: pd.DataFrame,
counts: pd.DataFrame,
interactions: pd.DataFrame... | 46.304965 | 115 | 0.69735 |
e887407bb152401af05e3ab7141155f502fa692e | 3,758 | py | Python | py3status/modules/spotify.py | ChoiZ/py3status | bd2cd9053d45a0284c2fa31e2361d9e5071eae51 | [
"BSD-3-Clause"
] | null | null | null | py3status/modules/spotify.py | ChoiZ/py3status | bd2cd9053d45a0284c2fa31e2361d9e5071eae51 | [
"BSD-3-Clause"
] | null | null | null | py3status/modules/spotify.py | ChoiZ/py3status | bd2cd9053d45a0284c2fa31e2361d9e5071eae51 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Display information about the current song playing on Spotify.
Configuration parameters:
cache_timeout: how often to update the bar
color_offline: text color when spotify is not running,
defaults to color_bad
color_paused: text color when song is stopped or paused,
... | 30.803279 | 77 | 0.564396 |
e887564b0fa8bc7922ff6f26e8187e71965e53ba | 906 | py | Python | teachingAndViz/cropimage4viz.py | justinkuhn/py360convert | df69cac1e0d801a188db3574a09b136d29178123 | [
"MIT"
] | null | null | null | teachingAndViz/cropimage4viz.py | justinkuhn/py360convert | df69cac1e0d801a188db3574a09b136d29178123 | [
"MIT"
] | null | null | null | teachingAndViz/cropimage4viz.py | justinkuhn/py360convert | df69cac1e0d801a188db3574a09b136d29178123 | [
"MIT"
] | null | null | null | from PIL import Image
import argparse
import os
import math
#argument parser
parser = argparse.ArgumentParser(description='Get Image Information')
parser.add_argument('in_filename', help='Input filename')
args = parser.parse_args()
im = Image.open(str(os.getcwd() + "\\" + args.in_filename))
width, height = im.size
... | 26.647059 | 77 | 0.720751 |
e8876525e3414498e66fa40b8dc562f2684aaa31 | 3,407 | py | Python | whispers/utils.py | supaflysnooka/whispers | 762fcee6173ba0016687545bb9861751af72e277 | [
"Apache-2.0"
] | null | null | null | whispers/utils.py | supaflysnooka/whispers | 762fcee6173ba0016687545bb9861751af72e277 | [
"Apache-2.0"
] | null | null | null | whispers/utils.py | supaflysnooka/whispers | 762fcee6173ba0016687545bb9861751af72e277 | [
"Apache-2.0"
] | null | null | null | import json
import re
from collections import namedtuple
from difflib import SequenceMatcher
from hashlib import md5
from pathlib import Path
from typing import Optional
from yaml import safe_load
Secret = namedtuple("Secret", ["file", "line", "key", "value", "message", "severity"])
def strip_string(value: str) -> ... | 24.688406 | 86 | 0.591429 |
e88770a22e70189918cff7bf29f1a6f1171f1720 | 10,331 | py | Python | homeassistant/components/media_player/kodi.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/media_player/kodi.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/media_player/kodi.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | """
Support for interfacing with the XBMC/Kodi JSON-RPC API.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.kodi/
"""
import logging
import urllib
import voluptuous as vol
from homeassistant.components.media_player import (
SUPPORT_NEX... | 32.083851 | 78 | 0.617462 |
e8877a0b81db260d583bd251ac91bf7c08f4d1f1 | 25,078 | py | Python | qiita_db/data.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | qiita_db/data.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | qiita_db/data.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | r"""
Data objects (:mod: `qiita_db.data`)
====================================
..currentmodule:: qiita_db.data
This module provides functionality for inserting, querying and deleting
data stored in the database. There are three data classes available: `RawData`,
`PreprocessedData` and `ProcessedData`.
Classes
------... | 36.825257 | 79 | 0.621142 |
e88784f8c415fb95a6ffa81175481cec00ca0ba4 | 255 | py | Python | cogs/EventTasksCog.py | saschavhd/DiscordAssistant | 5c2649ba281a49215f6c74b91f37f3bfcb4088b4 | [
"MIT"
] | null | null | null | cogs/EventTasksCog.py | saschavhd/DiscordAssistant | 5c2649ba281a49215f6c74b91f37f3bfcb4088b4 | [
"MIT"
] | null | null | null | cogs/EventTasksCog.py | saschavhd/DiscordAssistant | 5c2649ba281a49215f6c74b91f37f3bfcb4088b4 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from utils.database import db
class EventTasksCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
# TODO: IMPLEMENT EVENT ROLE
def setup(bot):
bot.add_cog(EventTasksCog(bot))
| 17 | 35 | 0.713725 |
e8878f09bf3dce18cff0379ff394058c9017e54e | 50,302 | py | Python | userbot/modules/gdrive.py | JoanLindo/BaianoBot-backup-sexo | b3d0b0f83b6460c3279a243ab753745df1562852 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-11-23T16:43:44.000Z | 2021-11-23T16:43:44.000Z | userbot/modules/gdrive.py | JoanLindo/purpled | fd95c674de3e4c0bc9eb909dddb4a65c7623fa02 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/gdrive.py | JoanLindo/purpled | fd95c674de3e4c0bc9eb909dddb4a65c7623fa02 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
# Many improve from adekmaulana
"""
Google Drive manager for Userbot
"""
import asyncio
import base64
import io
i... | 37.992447 | 98 | 0.492923 |
e887ad6de212080c0403b1c8fedad823b8e2719b | 4,742 | py | Python | homeassistant/components/brother/const.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 2 | 2020-03-02T19:17:52.000Z | 2020-03-02T19:17:53.000Z | homeassistant/components/brother/const.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 6 | 2021-02-08T21:05:36.000Z | 2022-03-12T00:54:00.000Z | homeassistant/components/brother/const.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 1 | 2020-03-07T10:43:50.000Z | 2020-03-07T10:43:50.000Z | """Constants for Brother integration."""
from homeassistant.const import TIME_DAYS, UNIT_PERCENTAGE
ATTR_BELT_UNIT_REMAINING_LIFE = "belt_unit_remaining_life"
ATTR_BLACK_INK_REMAINING = "black_ink_remaining"
ATTR_BLACK_TONER_REMAINING = "black_toner_remaining"
ATTR_BW_COUNTER = "b/w_counter"
ATTR_COLOR_COUNTER = "colo... | 35.654135 | 76 | 0.686419 |
e887eb8b9dcf6b05c92b9cd18187f063f9e65dfb | 3,494 | py | Python | tests/processor/test_token_processor.py | asherwunk/objconfig | 97243fa00a9e39d1167dc1e07a84578e20072c37 | [
"MIT"
] | null | null | null | tests/processor/test_token_processor.py | asherwunk/objconfig | 97243fa00a9e39d1167dc1e07a84578e20072c37 | [
"MIT"
] | null | null | null | tests/processor/test_token_processor.py | asherwunk/objconfig | 97243fa00a9e39d1167dc1e07a84578e20072c37 | [
"MIT"
] | null | null | null | """
Test objconfig.reader.Xml
"""
import pytest
from objconfig.exception import RuntimeException
from objconfig.processor import ProcessorInterface
from objconfig.processor import Token
from objconfig import Config
def test_emptyinstantiation_token():
token = Token({})
assert isinstance(token, ProcessorInter... | 30.649123 | 93 | 0.577275 |
e8880d064a80dcb3714d3cd0cf0c996e65333102 | 1,716 | py | Python | src/bin/hooks/heater.py | ddamerell53/ChemiRegV2 | 906fa4674bfda0088b86b3bcdde0e000510c79e0 | [
"CC0-1.0"
] | null | null | null | src/bin/hooks/heater.py | ddamerell53/ChemiRegV2 | 906fa4674bfda0088b86b3bcdde0e000510c79e0 | [
"CC0-1.0"
] | null | null | null | src/bin/hooks/heater.py | ddamerell53/ChemiRegV2 | 906fa4674bfda0088b86b3bcdde0e000510c79e0 | [
"CC0-1.0"
] | null | null | null | from chemireg import ChemiReg
class Heater(object):
def __init__(self, hostname, port, username, password):
self.hostname = hostname
self.port = port
self.username = username
self.password = password
self.chemireg = None
def on(self):
self.chemireg = ChemiReg(se... | 30.642857 | 146 | 0.574009 |
e88820e658401f9ef2e05865f72462c89d36f4d0 | 5,926 | py | Python | obsolete/reports/pipeline_chipseq/trackers/MotifsTSS.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 49 | 2015-04-13T16:49:25.000Z | 2022-03-29T10:29:14.000Z | obsolete/reports/pipeline_chipseq/trackers/MotifsTSS.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 252 | 2015-04-08T13:23:34.000Z | 2019-03-18T21:51:29.000Z | obsolete/reports/pipeline_chipseq/trackers/MotifsTSS.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 22 | 2015-05-21T00:37:52.000Z | 2019-09-25T05:04:27.000Z | from ChipseqReport import *
import Motifs
###########################################################################
###########################################################################
###########################################################################
class MotifsAndTSS(Motifs.Mast):
'''numbe... | 37.987179 | 104 | 0.467938 |
e888662650357161f22c0527f1d4dd2e3aec3937 | 84 | py | Python | LamData/module_example.py | Iamlegend-Imani/LamData3 | 69c593c2a69a6894a3e3d8770737d3f9bd14e468 | [
"MIT"
] | null | null | null | LamData/module_example.py | Iamlegend-Imani/LamData3 | 69c593c2a69a6894a3e3d8770737d3f9bd14e468 | [
"MIT"
] | null | null | null | LamData/module_example.py | Iamlegend-Imani/LamData3 | 69c593c2a69a6894a3e3d8770737d3f9bd14e468 | [
"MIT"
] | null | null | null | """Helper Function"""
FAVE_CITIES = ["Nairobi","Limpopo","Kigali","Bloemfontein"]
| 16.8 | 59 | 0.678571 |
e88887295cfc91ae8e327d7b4a510ac2378987da | 1,504 | py | Python | user.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | user.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | user.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | class User:
"""A User class
(Django's User model inspired us)
"""
def __init__(self, first_name, last_name):
"""Constructor, base values"""
self.first_name = first_name
self.last_name = last_name
@property
def get_full_name(self):
"""Return first separated by... | 30.08 | 86 | 0.589761 |
e88891cf8ca4f84d06aa3229231805e4183f78c4 | 7,535 | py | Python | plugins/timers.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | null | null | null | plugins/timers.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | 4 | 2021-12-10T06:18:12.000Z | 2022-03-24T14:43:57.000Z | plugins/timers.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | null | null | null | from ast import Str
import json
import re
import uuid
from datetime import timedelta
from discord import ButtonStyle, Color, Embed
from discord.ui import Button
from squid.bot import CommandContext, SquidPlugin, command
from squid.bot.context import ComponentContext
from squid.bot.errors import CommandFailed
from squid... | 32.339056 | 190 | 0.476178 |
e888ca7c0b739d76c56a728728f1a99d29257005 | 7,492 | py | Python | fairscale/experimental/optim/dynamic_loss_scaler.py | foreveronehundred/fairscale | 26a986c4d16971029e5f88a4879000fb166af1bb | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | fairscale/experimental/optim/dynamic_loss_scaler.py | foreveronehundred/fairscale | 26a986c4d16971029e5f88a4879000fb166af1bb | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | fairscale/experimental/optim/dynamic_loss_scaler.py | foreveronehundred/fairscale | 26a986c4d16971029e5f88a4879000fb166af1bb | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
"""
To prevent underflow or overflow of gradients, DynamicLossScaler is used to
dynamically scale up and down gradients b... | 35.84689 | 122 | 0.618393 |
e888e8b80b0a18cc812b2217c53cde9f13ba5717 | 9,222 | py | Python | tomopy_rectv.py | zdemat/rectv_gpu | cd8546b97ee2fd25b5aed159c71cb0a1b21442c5 | [
"BSD-2-Clause"
] | null | null | null | tomopy_rectv.py | zdemat/rectv_gpu | cd8546b97ee2fd25b5aed159c71cb0a1b21442c5 | [
"BSD-2-Clause"
] | null | null | null | tomopy_rectv.py | zdemat/rectv_gpu | cd8546b97ee2fd25b5aed159c71cb0a1b21442c5 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
TomoPy example script to reconstruct a single data set.
"""
from __future__ import print_function
import os
import sys
import json
import argparse
import numpy as np
import collections
import h5py
import tomopy
import dxchange
def get_dx_dims(fname, dataset):
... | 33.172662 | 163 | 0.620581 |
e888fc45c90f5c34b03726a53c5a5471d3c43e88 | 4,497 | py | Python | test_load_table.py | zacharycohn/pants | 6d7b0d8aa3de02414f06e063310694fc8910e52f | [
"CC0-1.0"
] | 1 | 2018-02-14T17:46:42.000Z | 2018-02-14T17:46:42.000Z | test_load_table.py | zacharycohn/AutoAPI | 6d7b0d8aa3de02414f06e063310694fc8910e52f | [
"CC0-1.0"
] | null | null | null | test_load_table.py | zacharycohn/AutoAPI | 6d7b0d8aa3de02414f06e063310694fc8910e52f | [
"CC0-1.0"
] | null | null | null | import config
import utils
import pytest
from sqlalchemy import create_engine, inspect, MetaData
from sqlalchemy.sql import select
def assert_column_type(column, expected_type):
assert column.type.python_type == expected_type
def assert_non_unique_indexes(engine, table_name, *columns):
inspection = inspec... | 31.893617 | 76 | 0.609517 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.