hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d25b3d6bc31f3ca7960ee1d2b2edc46e92e9ff1d | 6,142 | py | Python | skills/eliza/test_eliza.py | oserikov/dream | 109ba2df799025dcdada1fddbb7380e1c03100eb | [
"Apache-2.0"
] | 34 | 2021-08-18T14:51:44.000Z | 2022-03-10T14:14:48.000Z | skills/eliza/test_eliza.py | oserikov/dream | 109ba2df799025dcdada1fddbb7380e1c03100eb | [
"Apache-2.0"
] | 27 | 2021-08-30T14:42:09.000Z | 2022-03-17T22:11:45.000Z | skills/eliza/test_eliza.py | oserikov/dream | 109ba2df799025dcdada1fddbb7380e1c03100eb | [
"Apache-2.0"
] | 40 | 2021-08-22T07:13:32.000Z | 2022-03-29T11:45:32.000Z | import unittest
import eliza
class ElizaTest(unittest.TestCase):
def test_decomp_1(self):
el = eliza.Eliza()
self.assertEqual([], el._match_decomp(["a"], ["a"]))
self.assertEqual([], el._match_decomp(["a", "b"], ["a", "b"]))
def test_decomp_2(self):
el = eliza.Eliza()
... | 45.496296 | 120 | 0.545262 | 6,061 | 0.986812 | 0 | 0 | 0 | 0 | 0 | 0 | 2,146 | 0.349398 |
d25b9fd6524f688abaf7d222a5e27a028065bdf6 | 5,387 | py | Python | examples/tasks/dtw-energy-plus-models-data/code.py | dburian/ivis-core | 7789821c3750ccab68396aa2bfdd405fd4d21520 | [
"MIT"
] | 2 | 2021-05-17T13:20:56.000Z | 2021-11-04T16:36:29.000Z | examples/tasks/dtw-energy-plus-models-data/code.py | dburian/ivis-core | 7789821c3750ccab68396aa2bfdd405fd4d21520 | [
"MIT"
] | 37 | 2019-05-08T04:53:58.000Z | 2022-03-02T03:50:42.000Z | examples/tasks/dtw-energy-plus-models-data/code.py | dburian/ivis-core | 7789821c3750ccab68396aa2bfdd405fd4d21520 | [
"MIT"
] | 12 | 2019-04-06T15:00:32.000Z | 2021-11-06T08:56:07.000Z | import sys
import os
import json
from elasticsearch import Elasticsearch, helpers
from datetime import datetime, timezone
import numpy as np
from dtw import dtw
# Get parameters and set up elasticsearch
data = json.loads(sys.stdin.readline())
es = Elasticsearch([{'host': data['es']['host'], 'port': int(data['es']['po... | 25.530806 | 111 | 0.593837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,940 | 0.360126 |
d25d20d8eebe1fa8e5a33aad978f268f206cda23 | 602 | py | Python | xmrswap/interface_part.py | tecnovert/xmrswap | ad2983a4df03184453ff680c17602497acc75a87 | [
"MIT"
] | 2 | 2020-09-21T17:33:23.000Z | 2020-10-03T08:54:01.000Z | xmrswap/interface_part.py | tecnovert/xmrswap | ad2983a4df03184453ff680c17602497acc75a87 | [
"MIT"
] | 2 | 2020-10-03T09:18:48.000Z | 2020-10-13T19:58:34.000Z | xmrswap/interface_part.py | tecnovert/xmrswap | ad2983a4df03184453ff680c17602497acc75a87 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2020 tecnovert
# Distributed under the MIT software license, see the accompanying
# file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php.
from .contrib.test_framework.messages import (
CTxOutPart,
)
from .interface_btc import BTCInte... | 22.296296 | 73 | 0.704319 | 273 | 0.453488 | 0 | 0 | 114 | 0.189369 | 0 | 0 | 213 | 0.353821 |
d25df58bed9f8be63b8c4a15d08e86c300ade0fd | 2,511 | py | Python | pelican_resume/resume.py | cmenguy/pelican-resume | 57105e72c24ef04ad96857f51e5e9060e6aff1f6 | [
"MIT"
] | 12 | 2016-02-07T05:16:44.000Z | 2019-11-20T08:46:10.000Z | pelican_resume/resume.py | cmenguy/pelican-resume | 57105e72c24ef04ad96857f51e5e9060e6aff1f6 | [
"MIT"
] | 1 | 2019-01-20T20:57:35.000Z | 2019-01-20T20:59:59.000Z | pelican_resume/resume.py | cmenguy/pelican-resume | 57105e72c24ef04ad96857f51e5e9060e6aff1f6 | [
"MIT"
] | 5 | 2016-06-07T23:34:36.000Z | 2020-07-13T18:01:23.000Z | '''
resume
==============================================================================
This plugin generates a PDF resume from a Markdown file using customizable CSS
'''
import os
import logging
import tempfile
from subprocess import Popen
from pelican import signals
CURRENT_DIR = os.path.dirname(os.path.abspath... | 38.630769 | 87 | 0.682597 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 614 | 0.244524 |
d25e34eee54e20d2dc920f68d0031efffaa533b3 | 331 | py | Python | app/machine_learning.py | ludthor/CovidVisualizer | 721015e8f9f0b1c0fb2e5ba985884341d22046e2 | [
"MIT"
] | null | null | null | app/machine_learning.py | ludthor/CovidVisualizer | 721015e8f9f0b1c0fb2e5ba985884341d22046e2 | [
"MIT"
] | null | null | null | app/machine_learning.py | ludthor/CovidVisualizer | 721015e8f9f0b1c0fb2e5ba985884341d22046e2 | [
"MIT"
] | null | null | null | from sklearn.linear_model import Ridge
class MachineLearning():
def __init__(self):
self.model = None
def train_model(self, X,y):
lr = Ridge(alpha=0.5)
lr.fit(X,y)
print(lr)
self.model = lr
def predict(self, X):
preds = self.model.predict(X)
return... | 15.761905 | 38 | 0.570997 | 286 | 0.864048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d25f4bca7ddaa3e56f525ab91b8973856914e4df | 6,246 | py | Python | connection/connection_handler.py | valsoares/td | 4856604c71ff7d996f4e2580e0cdd9b904805225 | [
"MIT"
] | null | null | null | connection/connection_handler.py | valsoares/td | 4856604c71ff7d996f4e2580e0cdd9b904805225 | [
"MIT"
] | null | null | null | connection/connection_handler.py | valsoares/td | 4856604c71ff7d996f4e2580e0cdd9b904805225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Marcos F. Caetano ([email protected]) 11/03/2020
@description: PyDash Project
The ConnectionHandler is a Singleton class implementation
The class responsible to retrieve segments in the web server.
Also it implements a traffic shaping approach.
"""
from base.simple_module import ... | 34.131148 | 168 | 0.646013 | 5,624 | 0.900272 | 0 | 0 | 0 | 0 | 0 | 0 | 1,172 | 0.18761 |
d260f409a5bee0d6f1b71a1546aadce5730647ca | 37,634 | py | Python | latexpp/fixes/pkg/phfqit.py | psg-mit/latexpp | 0b7b523c9ce147c2d34cc430b1abd39972e33fa9 | [
"MIT"
] | 4 | 2020-08-28T18:41:48.000Z | 2021-11-11T11:23:58.000Z | latexpp/fixes/pkg/phfqit.py | psg-mit/latexpp | 0b7b523c9ce147c2d34cc430b1abd39972e33fa9 | [
"MIT"
] | 4 | 2020-07-31T07:34:38.000Z | 2021-11-23T19:05:00.000Z | latexpp/fixes/pkg/phfqit.py | psg-mit/latexpp | 0b7b523c9ce147c2d34cc430b1abd39972e33fa9 | [
"MIT"
] | 1 | 2020-07-22T02:44:48.000Z | 2020-07-22T02:44:48.000Z | import re
import yaml
import logging
logger = logging.getLogger(__name__)
from pylatexenc.macrospec import MacroSpec, ParsedMacroArgs, MacroStandardArgsParser
from pylatexenc import latexwalker
from latexpp.macro_subst_helper import MacroSubstHelper
from latexpp.fix import BaseFix
# parse entropy macros etc.
_q... | 37.041339 | 115 | 0.533693 | 30,524 | 0.811075 | 0 | 0 | 0 | 0 | 0 | 0 | 15,708 | 0.417389 |
d26193d8f95b87350b91fd8517bcdb1ccfde7d7b | 3,936 | py | Python | Ch_5/linear_alg5.py | Skyblueballykid/linalg | 515eea984856ad39c823314178929876b21f8014 | [
"MIT"
] | null | null | null | Ch_5/linear_alg5.py | Skyblueballykid/linalg | 515eea984856ad39c823314178929876b21f8014 | [
"MIT"
] | null | null | null | Ch_5/linear_alg5.py | Skyblueballykid/linalg | 515eea984856ad39c823314178929876b21f8014 | [
"MIT"
] | null | null | null | import numpy as np
import scipy
import sympy
from numpy import linalg as lg
from numpy.linalg import solve
from numpy.linalg import eig
from scipy.integrate import quad
# Question 1
'''
A. Determinant = -21
B. Determinant = -21
'''
m1 = np.array([[3, 0, 3], [2, 3, 3], [0, 4, -1]])
print(m1)
det1 = np.linalg.det(m... | 23.152941 | 202 | 0.653201 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,872 | 0.474645 |
d26272e6f74f04e9cc5cdc1f6a997a3ad8bdee52 | 2,620 | py | Python | builder/tasks_bullet/standimitation_task_bullet.py | FrankTianTT/laikago_robot | a5d54f10ea6a5620762c2210893ae8abe2f9ac05 | [
"MIT"
] | 6 | 2020-12-02T07:49:36.000Z | 2021-12-24T01:36:07.000Z | builder/tasks_bullet/standimitation_task_bullet.py | FrankTianTT/laikago_robot | a5d54f10ea6a5620762c2210893ae8abe2f9ac05 | [
"MIT"
] | null | null | null | builder/tasks_bullet/standimitation_task_bullet.py | FrankTianTT/laikago_robot | a5d54f10ea6a5620762c2210893ae8abe2f9ac05 | [
"MIT"
] | 3 | 2021-01-12T14:09:40.000Z | 2021-12-24T01:36:17.000Z | from builder.laikago_task_bullet import LaikagoTaskBullet
from builder.laikago_task import InitPose
import math
import numpy as np
ABDUCTION_P_GAIN = 220.0
ABDUCTION_D_GAIN = 0.3
HIP_P_GAIN = 220.0
HIP_D_GAIN = 2.0
KNEE_P_GAIN = 220.0
KNEE_D_GAIN = 2.0
class LaikagoStandImitationBulletBase(LaikagoTaskBullet):
de... | 42.95082 | 92 | 0.596183 | 2,363 | 0.901908 | 0 | 0 | 449 | 0.171374 | 0 | 0 | 45 | 0.017176 |
d26509e1b720c708ef4c28d0e261a51f29110955 | 425 | py | Python | build.py | chrahunt/conan-protobuf | c49350d1c69d2e5b40305803f3184561f433554c | [
"MIT"
] | null | null | null | build.py | chrahunt/conan-protobuf | c49350d1c69d2e5b40305803f3184561f433554c | [
"MIT"
] | null | null | null | build.py | chrahunt/conan-protobuf | c49350d1c69d2e5b40305803f3184561f433554c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from bincrafters import build_template_default
if __name__ == "__main__":
builder = build_template_default.get_builder()
# Todo: re-enable shared builds when issue resolved
# github issue: https://github.com/google/protobuf/issues/2502
builder.items... | 26.5625 | 98 | 0.701176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 184 | 0.432941 |
d2657376a64e94e969ed1edf71ca0efd3af9b3de | 2,046 | py | Python | pytrek/settings/LimitsSettings.py | hasii2011/PyArcadeStarTrek | 370edbb62f15f69322aa7f109d6d36ebf20cbe4a | [
"MIT"
] | 1 | 2021-06-13T00:56:24.000Z | 2021-06-13T00:56:24.000Z | pytrek/settings/LimitsSettings.py | hasii2011/PyArcadeStarTrek | 370edbb62f15f69322aa7f109d6d36ebf20cbe4a | [
"MIT"
] | 94 | 2021-04-16T20:34:10.000Z | 2022-01-13T19:58:20.000Z | pytrek/settings/LimitsSettings.py | hasii2011/PyArcadeStarTrek | 370edbb62f15f69322aa7f109d6d36ebf20cbe4a | [
"MIT"
] | null | null | null |
from logging import Logger
from logging import getLogger
from pytrek.settings.BaseSubSetting import BaseSubSetting
from pytrek.settings.SettingsCommon import SettingsCommon
from pytrek.settings.SettingsCommon import SettingsNameValues
class LimitsSettings(BaseSubSetting):
LIMITS_SECTION: str = 'Limits'
MA... | 33.540984 | 133 | 0.729717 | 1,806 | 0.882698 | 0 | 0 | 735 | 0.359238 | 0 | 0 | 191 | 0.093353 |
d26592ea9cca4872fa15f4c5aedeb743d022345c | 2,366 | py | Python | tests/integration_tests/testYieldCurve.py | neoyung/IrLib | 942793c49a477c9f5747410be74daf868391f289 | [
"MIT"
] | 1 | 2021-10-04T03:15:50.000Z | 2021-10-04T03:15:50.000Z | tests/integration_tests/testYieldCurve.py | neoyung/IrLib | 942793c49a477c9f5747410be74daf868391f289 | [
"MIT"
] | null | null | null | tests/integration_tests/testYieldCurve.py | neoyung/IrLib | 942793c49a477c9f5747410be74daf868391f289 | [
"MIT"
] | null | null | null | import unittest
from datetime import date
from irLib.marketConvention.dayCount import ACT_ACT
from irLib.marketConvention.compounding import annually_k_Spot
from irLib.helpers.yieldCurve import yieldCurve, discountCurve, forwardCurve
import numpy as np
alias_disC = 'disC'
alias_forC = 'forC'
referenceDate = date(2020... | 37.555556 | 111 | 0.674979 | 1,557 | 0.658073 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.056213 |
d26666e751893b180e8e39534e0d885f31d24a15 | 1,876 | py | Python | src/python/setup.py | blaine141/NVISII | 1675bb9bb74a1fe441bbb10ca98ea5cc4b0e4e24 | [
"Apache-2.0"
] | 149 | 2021-02-09T11:35:23.000Z | 2022-03-29T10:06:22.000Z | src/python/setup.py | blaine141/NVISII | 1675bb9bb74a1fe441bbb10ca98ea5cc4b0e4e24 | [
"Apache-2.0"
] | 66 | 2020-05-28T18:53:21.000Z | 2021-02-07T05:34:14.000Z | src/python/setup.py | blaine141/NVISII | 1675bb9bb74a1fe441bbb10ca98ea5cc4b0e4e24 | [
"Apache-2.0"
] | 14 | 2021-02-09T08:51:44.000Z | 2022-03-11T00:39:21.000Z | # Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
# This work is licensed under the NVIDIA Source Code License - Non-commercial. Full
# text can be found in LICENSE.md
from setuptools import setup, dist
import wheel
import os
# required to geneerate a platlib folder required by audittools
from setuptools.c... | 28 | 83 | 0.710554 | 339 | 0.180704 | 0 | 0 | 0 | 0 | 0 | 0 | 771 | 0.410981 |
d26a2cfd9b0c9f91c37793b0017bd2b85c25f09b | 1,060 | py | Python | portal_gun/configuration/schemas/compute_aws.py | Coderik/portal-gun | 081020a46b16b649497bceb6c2435b1ba135b487 | [
"MIT"
] | 69 | 2018-05-03T18:25:43.000Z | 2021-02-10T11:37:28.000Z | portal_gun/configuration/schemas/compute_aws.py | Coderik/portal-gun | 081020a46b16b649497bceb6c2435b1ba135b487 | [
"MIT"
] | 7 | 2018-09-19T06:39:11.000Z | 2022-03-29T21:55:08.000Z | portal_gun/configuration/schemas/compute_aws.py | Coderik/portal-gun | 081020a46b16b649497bceb6c2435b1ba135b487 | [
"MIT"
] | 11 | 2018-07-30T18:09:12.000Z | 2019-10-03T15:36:13.000Z | from marshmallow import fields, Schema
from .provision import ProvisionActionSchema
class InstanceSchema(Schema):
type = fields.String(required=True)
image_id = fields.String(required=True)
availability_zone = fields.String(required=True)
ebs_optimized = fields.Boolean()
iam_fleet_role = fields.String(required=... | 24.090909 | 68 | 0.779245 | 963 | 0.908491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d26a6bee5f324041d60e07e49f5e1f8b0a925d37 | 1,099 | py | Python | extras/unbundle.py | mstriemer/amo-validator | 35b502204183d783634207e7c2e7766ea1070ce8 | [
"BSD-3-Clause"
] | 1 | 2015-07-15T20:06:09.000Z | 2015-07-15T20:06:09.000Z | extras/unbundle.py | mstriemer/amo-validator | 35b502204183d783634207e7c2e7766ea1070ce8 | [
"BSD-3-Clause"
] | null | null | null | extras/unbundle.py | mstriemer/amo-validator | 35b502204183d783634207e7c2e7766ea1070ce8 | [
"BSD-3-Clause"
] | null | null | null | import sys
import os
import zipfile
from zipfile import ZipFile
from StringIO import StringIO
source = sys.argv[1]
target = sys.argv[2]
if not target.endswith("/"):
target = "%s/" % target
def _unbundle(path, target):
zf = ZipFile(path, 'r')
contents = zf.namelist()
for item in contents:
sp ... | 22.895833 | 51 | 0.526843 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.057325 |
d26afa5cb9899f00bda32076f95a8a1292054119 | 81,920 | py | Python | linuxOperation/app/domain/forms.py | zhouli121018/core | f9700204349ecb22d45e700e9e27e79412829199 | [
"MIT"
] | null | null | null | linuxOperation/app/domain/forms.py | zhouli121018/core | f9700204349ecb22d45e700e9e27e79412829199 | [
"MIT"
] | 1 | 2021-06-10T20:45:55.000Z | 2021-06-10T20:45:55.000Z | linuxOperation/app/domain/forms.py | zhouli121018/core | f9700204349ecb22d45e700e9e27e79412829199 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
import time
import os
import math
import json
from lib.forms import BaseFied, BaseFieldFormatExt, DotDict, BaseCfilterActionFied, BaseCfilterOptionFied
from app.core.models import Mailbox, MailboxUserAttr, Domain, CoCompany, CoreAlias, DomainAttr, \
Department... | 39.083969 | 154 | 0.585278 | 80,556 | 0.965136 | 677 | 0.008111 | 1,700 | 0.020368 | 0 | 0 | 9,086 | 0.108859 |
d26b10ff6669fa3fb71b08771c9e2a65a51f7bb3 | 9,074 | py | Python | deep_coach.py | jendelel/rhl-algs | d5b8779d7e271265d4f0bfcb3602bc56958e3eb3 | [
"Apache-2.0"
] | 2 | 2019-03-30T23:29:10.000Z | 2019-04-05T21:54:21.000Z | deep_coach.py | jendelel/rhl-algs | d5b8779d7e271265d4f0bfcb3602bc56958e3eb3 | [
"Apache-2.0"
] | 3 | 2019-03-29T11:23:17.000Z | 2020-12-28T02:00:17.000Z | deep_coach.py | jendelel/rhl-algs | d5b8779d7e271265d4f0bfcb3602bc56958e3eb3 | [
"Apache-2.0"
] | null | null | null | from PyQt5 import QtGui, QtCore, QtWidgets
from collections import namedtuple
import time
import random
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils import utils
HumanFeedback = namedtuple('HumanFeedback', ['feedback_value'])
SavedAction = namedtuple('SavedAction', ['state', 'action', ... | 45.144279 | 119 | 0.622548 | 7,482 | 0.824554 | 0 | 0 | 492 | 0.054221 | 0 | 0 | 923 | 0.101719 |
d26dbcccea877eec0764524f32244d3a230c796d | 434 | py | Python | model/DB Automation/add_db.py | chrisdcao/Covid_Map_Hanoi | 07d18cad8c1b4988795d9ec2aca5ae1fefdff892 | [
"MIT"
] | 1 | 2021-09-09T07:55:00.000Z | 2021-09-09T07:55:00.000Z | model/DB Automation/add_db.py | chrisdcao/Covid_Map_Hanoi | 07d18cad8c1b4988795d9ec2aca5ae1fefdff892 | [
"MIT"
] | null | null | null | model/DB Automation/add_db.py | chrisdcao/Covid_Map_Hanoi | 07d18cad8c1b4988795d9ec2aca5ae1fefdff892 | [
"MIT"
] | null | null | null | import pyodbc
import mysql.connector
conn = mysql.connector.connect(user='root', password='', port='3307', host='localhost', database='coviddb')
cursor = conn.cursor(buffered=True)
cursor.execute('SELECT * FROM coviddb.markers')
cursor.execute('''
INSERT INTO coviddb.markers(id, name, address, sub... | 22.842105 | 107 | 0.615207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.534562 |
d26eb1d2c5907c778452828f508b0d406c3d409a | 605 | py | Python | conduit_tests/fixtu.py | ArtuZi2/conduit | 804fc2b69dda7e244fc91025eb30ad1847b81f6a | [
"MIT"
] | null | null | null | conduit_tests/fixtu.py | ArtuZi2/conduit | 804fc2b69dda7e244fc91025eb30ad1847b81f6a | [
"MIT"
] | null | null | null | conduit_tests/fixtu.py | ArtuZi2/conduit | 804fc2b69dda7e244fc91025eb30ad1847b81f6a | [
"MIT"
] | null | null | null | import time
import pytest
# preparing selenium and chrome web driver manager
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
# importing os for environmental variable, and docker-compose up
import os
@pytest.fixture(scope=... | 28.809524 | 79 | 0.77686 | 0 | 0 | 0 | 0 | 306 | 0.505785 | 0 | 0 | 173 | 0.28595 |
d26eb2453ea9164766469c382d7b579b2c3779e5 | 22,390 | py | Python | scope/utils.py | jasonmsetiadi/scope | e718998d0a7ac64e5f86554383030341dbe940f9 | [
"MIT"
] | 3 | 2021-03-05T01:32:34.000Z | 2022-01-19T03:13:44.000Z | scope/utils.py | jasonmsetiadi/scope | e718998d0a7ac64e5f86554383030341dbe940f9 | [
"MIT"
] | 57 | 2021-01-14T19:49:44.000Z | 2022-03-25T22:32:03.000Z | scope/utils.py | jasonmsetiadi/scope | e718998d0a7ac64e5f86554383030341dbe940f9 | [
"MIT"
] | 10 | 2021-01-08T19:59:24.000Z | 2022-02-16T10:54:44.000Z | __all__ = [
"Dataset",
"forgiving_true",
"load_config",
"log",
"make_tdtax_taxonomy",
"plot_gaia_density",
"plot_gaia_hr",
"plot_light_curve_data",
"plot_periods",
]
from astropy.io import fits
import datetime
import json
import healpy as hp
import matplotlib.pyplot as plt
import nu... | 31.01108 | 109 | 0.552121 | 11,517 | 0.514381 | 0 | 0 | 128 | 0.005717 | 0 | 0 | 5,516 | 0.24636 |
d26ec52370aaf5a63c525e628d70b23d3bdd5697 | 1,787 | py | Python | spacy/lang/pt/lex_attrs.py | keshan/spaCy | 45c165af448783359f99673ab6b91492033bc66b | [
"MIT"
] | 1 | 2018-12-13T18:12:18.000Z | 2018-12-13T18:12:18.000Z | spacy/lang/pt/lex_attrs.py | keshan/spaCy | 45c165af448783359f99673ab6b91492033bc66b | [
"MIT"
] | null | null | null | spacy/lang/pt/lex_attrs.py | keshan/spaCy | 45c165af448783359f99673ab6b91492033bc66b | [
"MIT"
] | null | null | null | # coding: utf8
from __future__ import unicode_literals
from ...attrs import LIKE_NUM
_num_words = ['zero', 'um', 'dois', 'três', 'tres', 'quatro', 'cinco', 'seis', 'sete', 'oito', 'nove', 'dez',
'onze', 'doze', 'dúzia', 'dúzias', 'duzia', 'duzias', 'treze', 'catorze', 'quinze', 'dezasseis',
... | 41.55814 | 111 | 0.567431 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 932 | 0.512088 |
d26f1afb5207b56be2e3191794a04329185695ac | 1,818 | py | Python | factor calculation scripts/15.smoothearningstopriceratio.py | cagdemir/equity-index-predictors | 2546e72328de848222cb6a1c744ababab2058477 | [
"MIT"
] | null | null | null | factor calculation scripts/15.smoothearningstopriceratio.py | cagdemir/equity-index-predictors | 2546e72328de848222cb6a1c744ababab2058477 | [
"MIT"
] | null | null | null | factor calculation scripts/15.smoothearningstopriceratio.py | cagdemir/equity-index-predictors | 2546e72328de848222cb6a1c744ababab2058477 | [
"MIT"
] | 1 | 2021-07-21T12:24:51.000Z | 2021-07-21T12:24:51.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 29 18:00:53 2019
@author: Administrator
"""
import pdblp
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
con = pdblp.BCon(debug=False, port=8194, timeout=5000)
con.start()
index_tickers = ['NYA Index', 'SPX I... | 33.054545 | 160 | 0.718372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 831 | 0.457096 |
d26f2516f232179df9832fdd43a7f139a4b6d7ba | 357 | py | Python | ms/commands/autopep8.py | edcilo/flask_ms_boilerplate | 6507b7b7e61ab227df40b4701faab9ec9866e732 | [
"MIT"
] | null | null | null | ms/commands/autopep8.py | edcilo/flask_ms_boilerplate | 6507b7b7e61ab227df40b4701faab9ec9866e732 | [
"MIT"
] | null | null | null | ms/commands/autopep8.py | edcilo/flask_ms_boilerplate | 6507b7b7e61ab227df40b4701faab9ec9866e732 | [
"MIT"
] | null | null | null | import click
import os
from flask.cli import with_appcontext
@click.command(name='pep8',
help='Automatically formats Python code to conform to the PEP 8 style guide.')
@click.option('-p', '--path', default='./ms',
help='folder path to fix code')
@with_appcontext
def pep8(path: str) -> Non... | 27.461538 | 93 | 0.661064 | 0 | 0 | 0 | 0 | 293 | 0.820728 | 0 | 0 | 139 | 0.389356 |
d26f95f1c9db6cafe8a214de467a08368f6b0271 | 2,378 | py | Python | py2ts/generate_service_registry.py | conanfanli/py2ts | 8543ad03f19f094b0771c3b0cfc26a89eefd95ed | [
"MIT"
] | 3 | 2020-04-10T22:09:44.000Z | 2020-11-29T07:19:28.000Z | py2ts/generate_service_registry.py | conanfanli/py2ts | 8543ad03f19f094b0771c3b0cfc26a89eefd95ed | [
"MIT"
] | 1 | 2020-04-11T14:25:50.000Z | 2020-04-11T14:25:50.000Z | py2ts/generate_service_registry.py | conanfanli/py2ts | 8543ad03f19f094b0771c3b0cfc26a89eefd95ed | [
"MIT"
] | 1 | 2021-05-15T09:22:41.000Z | 2021-05-15T09:22:41.000Z | #!/usr/bin/env python
import logging
import re
import subprocess
import sys
from typing import Dict
logger = logging.getLogger("py2ts.generate_service_registry")
logging.basicConfig(level=logging.INFO)
class RipgrepError(Exception):
pass
def camel_to_snake(name: str) -> str:
name = re.sub("(.)([A-Z][a-z]+)... | 27.976471 | 117 | 0.638352 | 39 | 0.0164 | 0 | 0 | 0 | 0 | 0 | 0 | 891 | 0.374685 |
d273a6d20b4812002b8ea1fa328f2d59bdbbb865 | 5,311 | py | Python | tasks/birds.py | CatherineWong/l3 | 53ed9dc99d9b247cb209333ae9b528974e5e7e96 | [
"Apache-2.0"
] | 46 | 2017-11-03T16:54:36.000Z | 2021-12-07T23:07:58.000Z | tasks/birds.py | CatherineWong/l3 | 53ed9dc99d9b247cb209333ae9b528974e5e7e96 | [
"Apache-2.0"
] | 7 | 2018-08-03T18:27:53.000Z | 2020-12-17T17:08:52.000Z | tasks/birds.py | CatherineWong/l3 | 53ed9dc99d9b247cb209333ae9b528974e5e7e96 | [
"Apache-2.0"
] | 6 | 2018-02-24T19:00:00.000Z | 2021-03-28T19:50:53.000Z | from misc import util
from collections import namedtuple
import csv
import numpy as np
import os
import pickle
import sys
N_EX = 4
Datum = namedtuple("Datum", ["hint", "ex_inputs", "input", "label"])
START = "<s>"
STOP = "</s>"
random = util.next_random()
birds_path = os.path.join(sys.path[0], "data/birds")
def ... | 35.644295 | 96 | 0.559217 | 4,785 | 0.90096 | 0 | 0 | 0 | 0 | 0 | 0 | 941 | 0.177179 |
d273a8f81f9807f4dd16cdd363ca8063f3987151 | 2,261 | py | Python | tests/test_utils.py | caiosba/covid-19 | 2a0f43f5004e7e39bd982eaa36185859cd9db88f | [
"MIT"
] | 9 | 2020-03-23T19:04:04.000Z | 2020-03-28T02:11:14.000Z | tests/test_utils.py | caiosba/covid-19 | 2a0f43f5004e7e39bd982eaa36185859cd9db88f | [
"MIT"
] | 6 | 2020-03-22T14:10:08.000Z | 2020-04-05T01:53:29.000Z | tests/test_utils.py | caiosba/covid-19 | 2a0f43f5004e7e39bd982eaa36185859cd9db88f | [
"MIT"
] | 6 | 2020-03-23T18:15:26.000Z | 2020-04-05T01:49:40.000Z | import locale
import pytest
from covid.utils import fmt
class TestUtilityFunctions:
def test_format_functions_en_US(self):
try:
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
except locale.Error:
return pytest.skip()
assert fmt(0.10) == "0.1"
assert fmt(0... | 33.25 | 58 | 0.530739 | 2,200 | 0.973021 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.153914 |
d27463b7bc3e1731eab5ba3103ed835b119f201f | 10,717 | py | Python | catkin_ws/src/10-lane-control/line_detector/src/line_detector_node.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/src/10-lane-control/line_detector/src/line_detector_node.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/src/10-lane-control/line_detector/src/line_detector_node.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | null | null | null | #!/usr/bin/env python
from anti_instagram.AntiInstagram import AntiInstagram
from cv_bridge import CvBridge, CvBridgeError
from duckietown_msgs.msg import (AntiInstagramTransform, BoolStamped, Segment,
SegmentList, Vector2D, FSMState)
from duckietown_utils.instantiate_utils import instantiate
from duckietown_utils.... | 33.701258 | 122 | 0.624149 | 9,840 | 0.918167 | 0 | 0 | 0 | 0 | 0 | 0 | 1,622 | 0.151348 |
d274bf60d6abc1273072877c9d1d6cd1119e3863 | 776 | py | Python | django_qiniu/utils.py | 9nix00/django-qiniu | 08a403dc156b4971eef5af359048a6d2ce485245 | [
"MIT"
] | 1 | 2018-06-21T03:14:20.000Z | 2018-06-21T03:14:20.000Z | django_qiniu/utils.py | 9nix00/django-qiniu | 08a403dc156b4971eef5af359048a6d2ce485245 | [
"MIT"
] | null | null | null | django_qiniu/utils.py | 9nix00/django-qiniu | 08a403dc156b4971eef5af359048a6d2ce485245 | [
"MIT"
] | 1 | 2018-06-21T03:14:21.000Z | 2018-06-21T03:14:21.000Z | # -*- coding: utf-8 -*-
from account_helper.middleware import get_current_user_id
from django.utils import timezone
from django.conf import settings
from hashlib import sha1
import os
def user_upload_dir(instance, filename):
name_struct = os.path.splitext(filename)
current_user_id = get_current_user_id()
... | 38.8 | 101 | 0.590206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.115979 |
d27508d001c149eb0a10e44188a30d1458aaa3a0 | 1,339 | py | Python | AxePy3Lib/01/re/re_test_patterns_groups.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2019-01-04T05:47:50.000Z | 2019-01-04T05:47:50.000Z | AxePy3Lib/01/re/re_test_patterns_groups.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | null | null | null | AxePy3Lib/01/re/re_test_patterns_groups.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Show the groups within the matches for a pattern.
"""
# end_pymotw_header
import re
def test_patterns(text, patterns):
"""Given source text and a list of patterns, look for
matches for each pattern withi... | 29.108696 | 66 | 0.477969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 525 | 0.392084 |
d275a759f35f51d02a7503058e5ce4b1b8c106f5 | 332 | py | Python | src/xr_embeds/urls.py | xr-web-de/xr-web | 63269e26a8752564b63e84bfc0ce180198577d35 | [
"MIT"
] | 4 | 2019-03-28T20:49:59.000Z | 2019-08-11T19:31:35.000Z | src/xr_embeds/urls.py | xr-web-de/xr-web | 63269e26a8752564b63e84bfc0ce180198577d35 | [
"MIT"
] | 4 | 2019-05-08T18:07:45.000Z | 2021-05-08T17:29:46.000Z | src/xr_embeds/urls.py | xr-web-de/xr-web | 63269e26a8752564b63e84bfc0ce180198577d35 | [
"MIT"
] | 5 | 2019-03-28T20:50:15.000Z | 2020-01-17T21:16:57.000Z | from django.urls import re_path
from xr_embeds.views import geojson_view, embed_html_view
app_name = "embeds"
urlpatterns = [
re_path(r"^(\d+)/html/$", embed_html_view, name="embed_html"),
re_path(
r"^geojson/(?P<model_slug>\w+)/(?P<query_slug>\w+)/$",
geojson_view,
name="geojson_view... | 22.133333 | 66 | 0.638554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.310241 |
d276c726608d0b175c4c5a4e294d5b6baeab2166 | 377 | py | Python | templates/django/__APPNAME__/apps/utils/models.py | ba1dr/tplgenerator | f05b6f9a32cf825d326dd2faf551d1e156d2df37 | [
"MIT"
] | null | null | null | templates/django/__APPNAME__/apps/utils/models.py | ba1dr/tplgenerator | f05b6f9a32cf825d326dd2faf551d1e156d2df37 | [
"MIT"
] | null | null | null | templates/django/__APPNAME__/apps/utils/models.py | ba1dr/tplgenerator | f05b6f9a32cf825d326dd2faf551d1e156d2df37 | [
"MIT"
] | null | null | null |
from django.db import models
from django.core import signing
class PasswordMixin(object):
password_encrypted = models.CharField(max_length=128, null=False, blank=False)
@property
def password(self):
return signing.loads(self.password_encrypted)
@password.setter
def password(self, value)... | 23.5625 | 82 | 0.732095 | 312 | 0.827586 | 0 | 0 | 189 | 0.501326 | 0 | 0 | 0 | 0 |
d2777dd29fcc8c927860ffb94a848ef3650dcd17 | 7,858 | py | Python | publications/admin.py | lukacu/django-publications | 663ace605925f53835f441c7761a6f4b0d2d4143 | [
"BSD-3-Clause"
] | null | null | null | publications/admin.py | lukacu/django-publications | 663ace605925f53835f441c7761a6f4b0d2d4143 | [
"BSD-3-Clause"
] | 3 | 2020-02-12T03:15:47.000Z | 2021-06-10T22:05:24.000Z | publications/admin.py | lukacu/django-publications | 663ace605925f53835f441c7761a6f4b0d2d4143 | [
"BSD-3-Clause"
] | 1 | 2018-07-23T11:46:37.000Z | 2018-07-23T11:46:37.000Z | # -*- Mode: python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*-
from publications import list_import_formats, get_publications_importer
__license__ = 'MIT License <http://www.opensource.org/licenses/mit-license.php>'
__author__ = 'Lucas Theis <[email protected]>'
__docformat__ = 'epytext'
from django.cont... | 38.331707 | 241 | 0.673199 | 6,179 | 0.786332 | 0 | 0 | 0 | 0 | 0 | 0 | 2,094 | 0.26648 |
d2786b44c868c09be621a0323723a3881eb90dc7 | 7,379 | py | Python | tests/common/helpers/dut_utils.py | Rancho333/sonic-mgmt | c73836900f83c1a66b2121563511604a7b81807a | [
"Apache-2.0"
] | 2 | 2020-10-15T05:54:32.000Z | 2020-12-14T07:21:41.000Z | tests/common/helpers/dut_utils.py | Rancho333/sonic-mgmt | c73836900f83c1a66b2121563511604a7b81807a | [
"Apache-2.0"
] | 14 | 2021-08-04T05:50:21.000Z | 2021-12-14T10:06:38.000Z | tests/common/helpers/dut_utils.py | Rancho333/sonic-mgmt | c73836900f83c1a66b2121563511604a7b81807a | [
"Apache-2.0"
] | 7 | 2021-07-28T03:24:41.000Z | 2022-03-07T01:44:20.000Z | import logging
from tests.common.helpers.assertions import pytest_assert
from tests.common.utilities import get_host_visible_vars
from tests.common.utilities import wait_until
CONTAINER_CHECK_INTERVAL_SECS = 1
CONTAINER_RESTART_THRESHOLD_SECS = 180
logger = logging.getLogger(__name__)
def is_supervisor_node(inv_file... | 40.322404 | 126 | 0.69359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,865 | 0.523784 |
d279c195499d050dd18e9f8e03c43e9d1fc1fd2d | 7,716 | py | Python | pyy1/.pycharm_helpers/python_stubs/-1550516950/_ctypes.py | pyy1988/pyy_test1 | 6bea878409e658aa87441384419be51aaab061e7 | [
"Apache-2.0"
] | null | null | null | pyy1/.pycharm_helpers/python_stubs/-1550516950/_ctypes.py | pyy1988/pyy_test1 | 6bea878409e658aa87441384419be51aaab061e7 | [
"Apache-2.0"
] | null | null | null | pyy1/.pycharm_helpers/python_stubs/-1550516950/_ctypes.py | pyy1988/pyy_test1 | 6bea878409e658aa87441384419be51aaab061e7 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# module _ctypes
# from /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so
# by generator 1.145
""" Create and manipulate C compatible data types in Python. """
# no imports
# Variables with simple values
FUNCFLAG_CDECL = 1
FUNCFLAG_PYTHONAPI = 4
FUNCFLAG_USE_ERRNO = 8
FUNCFLAG_... | 27.459075 | 106 | 0.636729 | 4,581 | 0.593701 | 0 | 0 | 1,182 | 0.153188 | 0 | 0 | 3,796 | 0.491965 |
d279e09431c6846b49df5d7a332c49cc36e64bc9 | 1,059 | py | Python | senseis/models/rc_action_model1.py | armandli/ReconChessRL | 3f3f018fd347ee17452ef6ad725d82f2f11678c6 | [
"MIT"
] | 4 | 2021-08-19T14:06:01.000Z | 2021-12-24T06:34:23.000Z | senseis/models/rc_action_model1.py | captainzhu123/ReconChessRL | 6d0de7acd7aeba0ad767e29c807ee0e6f30d95fb | [
"MIT"
] | 2 | 2021-09-18T08:34:01.000Z | 2022-03-23T07:06:05.000Z | senseis/models/rc_action_model1.py | captainzhu123/ReconChessRL | 6d0de7acd7aeba0ad767e29c807ee0e6f30d95fb | [
"MIT"
] | 1 | 2021-09-18T08:30:23.000Z | 2021-09-18T08:30:23.000Z | import torch
from torch import nn
from senseis.torch_modules.activation import relu_activation
from senseis.torch_modules.residual_layer import ResidualLayer1DV5, ResidualLayer2DV3
# Dueling Q Model
class RCActionModel1(nn.Module):
def __init__(self, csz, row_sz, col_sz, a_sz):
super(RCActionModel1, self).__ini... | 31.147059 | 85 | 0.674221 | 857 | 0.809254 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.016053 |
d27a9b4239643f2c105ea4c3f170a4d1c43a0714 | 5,506 | py | Python | win/msgbox.py | Zxynine/fusion360-thomasa88lib | c6570c9adffd06ec7b762032326805d13a99982e | [
"MIT"
] | 4 | 2021-11-19T17:24:44.000Z | 2022-03-18T13:17:21.000Z | win/msgbox.py | Zxynine/fusion360-thomasa88lib | c6570c9adffd06ec7b762032326805d13a99982e | [
"MIT"
] | 2 | 2021-04-15T05:47:55.000Z | 2021-12-07T17:36:53.000Z | win/msgbox.py | Zxynine/fusion360-thomasa88lib | c6570c9adffd06ec7b762032326805d13a99982e | [
"MIT"
] | 1 | 2021-12-04T23:07:53.000Z | 2021-12-04T23:07:53.000Z | # Message box functions
#
# This file is part of thomasa88lib, a library of useful Fusion 360
# add-in/script functions.
#
# Copyright (c) 2020 Thomas Axelsson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to dea... | 36.463576 | 85 | 0.680349 | 286 | 0.051943 | 0 | 0 | 0 | 0 | 0 | 0 | 1,708 | 0.310207 |
d27af471667bb42fad40784d1d32e99b8d50d1f8 | 22,496 | py | Python | eispac/core/eiscube.py | MJWeberg/eispac | 8de2b282fc08da9ac66d48c396060aab6e17be70 | [
"MIT"
] | 11 | 2021-02-18T00:24:22.000Z | 2022-01-30T06:48:06.000Z | eispac/core/eiscube.py | MJWeberg/eispac | 8de2b282fc08da9ac66d48c396060aab6e17be70 | [
"MIT"
] | 23 | 2021-04-09T16:34:26.000Z | 2021-11-09T16:55:29.000Z | eispac/core/eiscube.py | MJWeberg/eispac | 8de2b282fc08da9ac66d48c396060aab6e17be70 | [
"MIT"
] | 5 | 2021-04-09T16:47:27.000Z | 2021-11-04T15:45:29.000Z | __all__ = ['EISCube']
import sys
import copy
import numpy as np
import astropy.units as u
from astropy.convolution import convolve, CustomKernel
from astropy.coordinates import SkyCoord
from ndcube import __version__ as ndcube_ver
from ndcube import NDCube
class EISCube(NDCube):
"""EIS Level-1 Data Cube
Subc... | 46.00409 | 95 | 0.581526 | 22,238 | 0.988443 | 0 | 0 | 539 | 0.023958 | 0 | 0 | 10,693 | 0.475287 |
d27bad13c9c160040228fa36a65d4924909e6f0d | 5,380 | py | Python | stylee/comments/serializers.py | jbaek7023/Stylee-API | ff0397ba2dc1ed17ff22c33f80eef5d13e6ae097 | [
"MIT"
] | 1 | 2020-03-06T00:34:39.000Z | 2020-03-06T00:34:39.000Z | stylee/comments/serializers.py | jbaek7023/Stylee-API | ff0397ba2dc1ed17ff22c33f80eef5d13e6ae097 | [
"MIT"
] | null | null | null | stylee/comments/serializers.py | jbaek7023/Stylee-API | ff0397ba2dc1ed17ff22c33f80eef5d13e6ae097 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth import get_user_model
from profiles.serializers import UserRowSerializer
from .models import Comment
User = get_user_model()
# content, user
def create_comment_serializer(model_type='outfit', i... | 29.723757 | 96 | 0.561152 | 4,473 | 0.831413 | 0 | 0 | 0 | 0 | 0 | 0 | 949 | 0.176394 |
d27bf22d6bf897be8eacbdeb8156e0811b013b5d | 3,497 | py | Python | stressTest/stressTestPV.py | bhill-slac/epics-stress-tests | bf895cdf84e3ef16819204fbf49f2dd54c9473fb | [
"BSD-3-Clause-LBNL"
] | null | null | null | stressTest/stressTestPV.py | bhill-slac/epics-stress-tests | bf895cdf84e3ef16819204fbf49f2dd54c9473fb | [
"BSD-3-Clause-LBNL"
] | null | null | null | stressTest/stressTestPV.py | bhill-slac/epics-stress-tests | bf895cdf84e3ef16819204fbf49f2dd54c9473fb | [
"BSD-3-Clause-LBNL"
] | null | null | null | #!/usr/bin/env python3
class stressTestPV:
def __init__( self, pvName ):
self._pvName = pvName
self._tsValues = {} # Dict of collected values, keys are float timestamps
self._tsRates = {} # Dict of collection rates, keys are int secPastEpoch values
self._tsMissR... | 38.01087 | 98 | 0.543323 | 3,471 | 0.992565 | 0 | 0 | 0 | 0 | 0 | 0 | 628 | 0.179582 |
d27c6795141864bd67b93ea1ed9caca681ced3fd | 10,246 | py | Python | pysoundcloud/client.py | omarcostahamido/PySoundCloud | 1ca53a280c77f6b5f52868adefa332c4de56858f | [
"MIT"
] | 4 | 2021-09-15T06:40:02.000Z | 2022-01-16T03:31:59.000Z | pysoundcloud/client.py | AnthonyMakesStuff/PySoundCloud | 1ca53a280c77f6b5f52868adefa332c4de56858f | [
"MIT"
] | 1 | 2021-04-22T04:18:42.000Z | 2021-05-09T09:22:59.000Z | pysoundcloud/client.py | AnthonyMakesStuff/PySoundCloud | 1ca53a280c77f6b5f52868adefa332c4de56858f | [
"MIT"
] | 1 | 2020-09-05T02:14:37.000Z | 2020-09-05T02:14:37.000Z | import re
import requests
from typing import Union
from pysoundcloud.soundcloudplaylists import SoundCloudPlaylists
from pysoundcloud.soundcloudsearchresults import SoundCloudSearchResults
from pysoundcloud.soundcloudlikedtracks import SoundCloudLikedTracks
from pysoundcloud.soundcloudplaylist import SoundClo... | 44.547826 | 119 | 0.576127 | 9,776 | 0.954128 | 0 | 0 | 0 | 0 | 0 | 0 | 4,352 | 0.424751 |
d27cc7e2f11f688e99e9542aba655008056fb669 | 859 | py | Python | rojak-analyzer/generate_stopwords.py | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 107 | 2016-10-02T05:54:42.000Z | 2021-08-05T00:20:51.000Z | rojak-analyzer/generate_stopwords.py | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 134 | 2016-10-02T21:21:08.000Z | 2016-12-27T02:46:34.000Z | rojak-analyzer/generate_stopwords.py | pyk/rojak | 0dd69efedb58ee5d951e1a43cdfa65b60f8bb7c7 | [
"BSD-3-Clause"
] | 54 | 2016-10-02T08:47:56.000Z | 2020-03-08T00:56:03.000Z | # Run this script to create stopwords.py based on stopwords.txt
import json
def generate(input_txt, output_py):
# Read line by line
txt_file = open(input_txt)
words = set([])
for raw_line in txt_file:
line = raw_line.strip()
# Skip empty line
if len(line) < 1: continue
#... | 29.62069 | 71 | 0.622817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.389988 |
d27d80f790828621c13dad6b6615e88b5261c7f1 | 33,166 | py | Python | bcbio/structural/cnvkit.py | YTLogos/bcbio-nextgen | f964a25ab74a31551273b7e50518f3451c90f473 | [
"MIT"
] | 1 | 2019-08-29T07:55:48.000Z | 2019-08-29T07:55:48.000Z | bcbio/structural/cnvkit.py | YTLogos/bcbio-nextgen | f964a25ab74a31551273b7e50518f3451c90f473 | [
"MIT"
] | null | null | null | bcbio/structural/cnvkit.py | YTLogos/bcbio-nextgen | f964a25ab74a31551273b7e50518f3451c90f473 | [
"MIT"
] | null | null | null | """Copy number detection with CNVkit with specific support for targeted sequencing.
http://cnvkit.readthedocs.org
"""
import copy
import math
import operator
import os
import sys
import tempfile
import subprocess
import pybedtools
import numpy as np
import toolz as tz
from bcbio import utils
from bcbio.bam import re... | 46.910891 | 117 | 0.637792 | 0 | 0 | 0 | 0 | 204 | 0.006151 | 0 | 0 | 7,525 | 0.226889 |
d27d939d04d3b5253e8adbdbae402c28328bae05 | 31,862 | py | Python | pyexchange/exchange2010/__init__.py | tedeler/pyexchange | 58042f473cbd4f00769249ce9ca20c6a376eddb6 | [
"Apache-2.0"
] | 128 | 2015-01-11T10:29:40.000Z | 2021-06-25T05:27:45.000Z | pyexchange/exchange2010/__init__.py | tedeler/pyexchange | 58042f473cbd4f00769249ce9ca20c6a376eddb6 | [
"Apache-2.0"
] | 52 | 2015-01-02T15:24:28.000Z | 2020-08-07T04:49:49.000Z | pyexchange/exchange2010/__init__.py | tedeler/pyexchange | 58042f473cbd4f00769249ce9ca20c6a376eddb6 | [
"Apache-2.0"
] | 96 | 2015-01-02T15:16:20.000Z | 2021-12-25T01:37:46.000Z | """
(c) 2013 LinkedIn Corp. 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 agreed to in writing... | 34.745911 | 216 | 0.701211 | 30,694 | 0.963342 | 0 | 0 | 0 | 0 | 0 | 0 | 13,180 | 0.413659 |
d27e18ed16bd406812b85f4af214631d5d9da65c | 8,982 | py | Python | rnacentral_pipeline/rnacentral/r2dt/should_show.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 1 | 2018-08-09T14:41:16.000Z | 2018-08-09T14:41:16.000Z | rnacentral_pipeline/rnacentral/r2dt/should_show.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 60 | 2015-02-04T16:43:53.000Z | 2022-01-27T10:28:43.000Z | rnacentral_pipeline/rnacentral/r2dt/should_show.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright [2009-2021] EMBL-European Bioinformatics Institute
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... | 32.309353 | 87 | 0.638833 | 539 | 0.060009 | 3,195 | 0.355711 | 552 | 0.061456 | 0 | 0 | 1,810 | 0.201514 |
d27e557da62812d946f0019863efdd827d603a76 | 1,024 | py | Python | model.py | nitro-code/inception-api | 0ee40b1bdc7cccec8e15921ff835ce29070a66f6 | [
"MIT"
] | 1 | 2017-08-18T09:13:47.000Z | 2017-08-18T09:13:47.000Z | model.py | nitroventures/inception-api | 0ee40b1bdc7cccec8e15921ff835ce29070a66f6 | [
"MIT"
] | null | null | null | model.py | nitroventures/inception-api | 0ee40b1bdc7cccec8e15921ff835ce29070a66f6 | [
"MIT"
] | null | null | null | import tensorflow as tf
from keras.preprocessing import image
from keras.applications.inception_v3 import InceptionV3, preprocess_input, decode_predictions
import numpy as np
import h5py
model = InceptionV3(include_top=True, weights='imagenet', input_tensor=None, input_shape=None)
graph = tf.get_default_graph()
def ... | 34.133333 | 131 | 0.775391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.029297 |
d2824e51dfb32b914b5d61d7c72ec4e8a213bab5 | 4,959 | py | Python | models/recall/word2vec/static_model.py | ziyoujiyi/PaddleRec | bcddcf46e5cd8d4e6b2c5ee8d0d5521e292a2a81 | [
"Apache-2.0"
] | 2,739 | 2020-04-28T05:12:48.000Z | 2022-03-31T16:01:49.000Z | models/recall/word2vec/static_model.py | jiangcongxu/PaddleRec | 9a107c56af2d1ee282975bcc8edb1ad5fb7e7973 | [
"Apache-2.0"
] | 205 | 2020-05-14T13:29:14.000Z | 2022-03-31T13:01:50.000Z | models/recall/word2vec/static_model.py | jiangcongxu/PaddleRec | 9a107c56af2d1ee282975bcc8edb1ad5fb7e7973 | [
"Apache-2.0"
] | 545 | 2020-05-14T13:19:13.000Z | 2022-03-24T07:53:05.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 40.983471 | 79 | 0.617867 | 4,213 | 0.849566 | 0 | 0 | 0 | 0 | 0 | 0 | 1,390 | 0.280298 |
d282949426f3fae8441528c5a9f321ae9b759d68 | 324 | py | Python | transformers/transformers/data/processors/split_sentences.py | richardbaihe/segatron_aaai | 1739b667f2bee53541f00d227da8375543fe5f11 | [
"MIT"
] | 16 | 2020-12-22T07:35:20.000Z | 2022-02-09T19:49:02.000Z | transformers/transformers/data/processors/split_sentences.py | richardbaihe/segatron_aaai | 1739b667f2bee53541f00d227da8375543fe5f11 | [
"MIT"
] | 1 | 2021-12-21T14:33:15.000Z | 2021-12-27T20:40:39.000Z | transformers/transformers/data/processors/split_sentences.py | richardbaihe/segatron_aaai | 1739b667f2bee53541f00d227da8375543fe5f11 | [
"MIT"
] | 2 | 2020-12-22T08:46:01.000Z | 2021-01-09T14:50:12.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Time : 2020-04-13 21:19
# @Author : Richard Bai
# @EMail : [email protected]
import nltk
import os
import json
def sentence_split(line):
sents = nltk.tokenize.sent_tokenize(line)
rnt = [sent.split() for sent in sents]
return rn... | 19.058824 | 49 | 0.608025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.429012 |
d2831bfec38a388ec3a1badd4f034aaa55b158a5 | 1,661 | py | Python | sfdata/posts/migrations/0001_initial.py | adjspecies/sfdata | 9522176c1c80e9f0aeecf77da6576e8465238383 | [
"MIT"
] | 1 | 2019-01-24T01:57:21.000Z | 2019-01-24T01:57:21.000Z | sfdata/posts/migrations/0001_initial.py | adjspecies/sfdata | 9522176c1c80e9f0aeecf77da6576e8465238383 | [
"MIT"
] | null | null | null | sfdata/posts/migrations/0001_initial.py | adjspecies/sfdata | 9522176c1c80e9f0aeecf77da6576e8465238383 | [
"MIT"
] | 1 | 2018-12-22T02:20:39.000Z | 2018-12-22T02:20:39.000Z | # Generated by Django 2.1.4 on 2018-12-21 21:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Author',
fields=[
... | 33.22 | 114 | 0.526791 | 1,535 | 0.924142 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.128236 |
d28385fbbbc8e61ca535b580e9a5d1d70c77fe44 | 1,361 | py | Python | test/test_tools.py | cokelaer/sequana | da35de12b45f38b4fa488c7a15a6d9829890b44e | [
"BSD-3-Clause"
] | 138 | 2016-07-13T06:24:45.000Z | 2022-03-28T13:12:03.000Z | test/test_tools.py | cokelaer/sequana | da35de12b45f38b4fa488c7a15a6d9829890b44e | [
"BSD-3-Clause"
] | 655 | 2016-03-10T17:33:40.000Z | 2022-03-30T16:10:45.000Z | test/test_tools.py | cokelaer/sequana | da35de12b45f38b4fa488c7a15a6d9829890b44e | [
"BSD-3-Clause"
] | 39 | 2016-11-04T11:40:58.000Z | 2022-03-15T08:12:29.000Z | from sequana.tools import bam_to_mapped_unmapped_fastq, reverse_complement, StatsBAM2Mapped
from sequana import sequana_data
from sequana.tools import bam_get_paired_distance, GZLineCounter, PairedFastQ
from sequana.tools import genbank_features_parser
def test_StatsBAM2Mapped():
data = sequana_data("test.bam", "t... | 26.686275 | 91 | 0.739897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 187 | 0.137399 |
d285ef91afbd55e6c2220bf3361249aade406f01 | 16,219 | py | Python | sxl/sxl.py | giriannamalai/sxl | 37db962bbbc978053375ffcc51e298ee6f5272d8 | [
"MIT"
] | null | null | null | sxl/sxl.py | giriannamalai/sxl | 37db962bbbc978053375ffcc51e298ee6f5272d8 | [
"MIT"
] | null | null | null | sxl/sxl.py | giriannamalai/sxl | 37db962bbbc978053375ffcc51e298ee6f5272d8 | [
"MIT"
] | null | null | null | """
xl.py - python library to deal with *big* Excel files.
"""
from abc import ABC
from collections import namedtuple, ChainMap
from contextlib import contextmanager
import datetime
import io
from itertools import zip_longest
import os
import re
import string
import xml.etree.cElementTree as ET
from zipfile import Zip... | 35.803532 | 106 | 0.533818 | 14,693 | 0.905913 | 2,455 | 0.151366 | 5,088 | 0.313706 | 0 | 0 | 3,616 | 0.222948 |
9627bff44e51fdfda5ec4883f22ddd53286fedc6 | 5,156 | py | Python | sdk-python/awaazde/base.py | ashwini-ad/awaazde-api-client-sdk | c966f24d1e4b11fb9b0878d7e20c80b19cc04628 | [
"Apache-2.0"
] | null | null | null | sdk-python/awaazde/base.py | ashwini-ad/awaazde-api-client-sdk | c966f24d1e4b11fb9b0878d7e20c80b19cc04628 | [
"Apache-2.0"
] | null | null | null | sdk-python/awaazde/base.py | ashwini-ad/awaazde-api-client-sdk | c966f24d1e4b11fb9b0878d7e20c80b19cc04628 | [
"Apache-2.0"
] | null | null | null | import logging
import urllib.parse
from .api_client import ApiClient
from .constants import APIConstants
from .exceptions import APIException
from .utils import CommonUtils
class BaseAPI(object):
"""
BaseApi class, all the other api class extends it
"""
resource_url = None
resource_cls = None
... | 33.480519 | 145 | 0.597944 | 4,979 | 0.965671 | 0 | 0 | 0 | 0 | 0 | 0 | 1,688 | 0.327386 |
96296ccad66334cb3060947522a0c3b215f8f83c | 774 | py | Python | configs/mmrotate/rotated-detection_tensorrt_dynamic-320x320-1024x1024.py | grimoire/mmdeploy | e84bc30f4a036dd19cb3af854203922a91098e84 | [
"Apache-2.0"
] | 746 | 2021-12-27T10:50:28.000Z | 2022-03-31T13:34:14.000Z | configs/mmrotate/rotated-detection_tensorrt_dynamic-320x320-1024x1024.py | grimoire/mmdeploy | e84bc30f4a036dd19cb3af854203922a91098e84 | [
"Apache-2.0"
] | 253 | 2021-12-28T05:59:13.000Z | 2022-03-31T18:22:25.000Z | configs/mmrotate/rotated-detection_tensorrt_dynamic-320x320-1024x1024.py | grimoire/mmdeploy | e84bc30f4a036dd19cb3af854203922a91098e84 | [
"Apache-2.0"
] | 147 | 2021-12-27T10:50:33.000Z | 2022-03-30T10:44:20.000Z | _base_ = ['./rotated-detection_static.py', '../_base_/backends/tensorrt.py']
onnx_config = dict(
output_names=['dets', 'labels'],
input_shape=None,
dynamic_axes={
'input': {
0: 'batch',
2: 'height',
3: 'width'
},
'dets': {
0: 'batch',
... | 23.454545 | 76 | 0.432817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.198966 |
96298d33b6be77c822487f95da02b8e986a6434c | 4,053 | py | Python | rainy/envs/parallel_wrappers.py | alexmlamb/blocks_rl_gru_setup | fe462f79518d14f828e2c7cbf210cd105ff982f4 | [
"Apache-2.0"
] | null | null | null | rainy/envs/parallel_wrappers.py | alexmlamb/blocks_rl_gru_setup | fe462f79518d14f828e2c7cbf210cd105ff982f4 | [
"Apache-2.0"
] | null | null | null | rainy/envs/parallel_wrappers.py | alexmlamb/blocks_rl_gru_setup | fe462f79518d14f828e2c7cbf210cd105ff982f4 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from typing import Any, Iterable, Tuple
from .ext import EnvSpec
from .parallel import ParallelEnv
from ..prelude import Action, Array, State
from ..utils.rms import RunningMeanStd
class ParallelEnvWrapper(ParallelEnv[Action, State]):
def __init__(self, penv: ParallelEnv) -> None:
self.... | 32.685484 | 97 | 0.603504 | 3,841 | 0.947693 | 0 | 0 | 223 | 0.055021 | 0 | 0 | 70 | 0.017271 |
962a9c50351cba1947f6e3a1a14ce2f159196743 | 1,205 | py | Python | oldp/apps/search/templatetags/search.py | docsuleman/oldp | 8dcaa8e6e435794c872346b5014945ace885adb4 | [
"MIT"
] | 66 | 2018-05-07T12:34:39.000Z | 2022-02-23T20:14:24.000Z | oldp/apps/search/templatetags/search.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 68 | 2018-06-11T16:13:17.000Z | 2022-02-10T08:03:26.000Z | oldp/apps/search/templatetags/search.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 15 | 2018-06-23T19:41:13.000Z | 2021-08-18T08:21:49.000Z | from datetime import datetime
from dateutil.relativedelta import relativedelta
from django import template
from django.template.defaultfilters import urlencode
from django.urls import reverse
from haystack.models import SearchResult
from haystack.utils.highlighting import Highlighter
register = template.Library()
@... | 28.690476 | 117 | 0.73444 | 0 | 0 | 0 | 0 | 878 | 0.728631 | 0 | 0 | 165 | 0.136929 |
962b1992cdd2dfaf0952dfed1c1a16307ccc9f57 | 372 | py | Python | interview/leet/1029_Two_City_Scheduling.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | 1 | 2020-10-12T13:33:29.000Z | 2020-10-12T13:33:29.000Z | interview/leet/1029_Two_City_Scheduling.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | null | null | null | interview/leet/1029_Two_City_Scheduling.py | eroicaleo/LearningPython | 297d46eddce6e43ce0c160d2660dff5f5d616800 | [
"MIT"
] | 1 | 2016-11-09T07:28:45.000Z | 2016-11-09T07:28:45.000Z | #!/usr/bin/env python
class Solution:
def twoCitySchedCost(self, costs):
N = len(costs)//2
costs = list(sorted(costs, key=lambda c: c[0]-c[1]))
s = 0
for i, c in enumerate(costs):
s += c[0] if i < N else c[1]
return s
costs = [[10,20],[30,200],[400,50],[30,20]]
... | 24.8 | 60 | 0.553763 | 251 | 0.674731 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.056452 |
962b25ef7d6c6efe9c549cbaf3d04d00594f4f6d | 23,818 | py | Python | Metrics/plots.py | liorfrenkel1992/focal_calibration | 4f020e022be501ee3f723e6105afe793a1e522f0 | [
"MIT"
] | null | null | null | Metrics/plots.py | liorfrenkel1992/focal_calibration | 4f020e022be501ee3f723e6105afe793a1e522f0 | [
"MIT"
] | null | null | null | Metrics/plots.py | liorfrenkel1992/focal_calibration | 4f020e022be501ee3f723e6105afe793a1e522f0 | [
"MIT"
] | null | null | null | '''
This file contains method for generating calibration related plots, eg. reliability plots.
References:
[1] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks.
arXiv preprint arXiv:1706.04599, 2017.
'''
import math
import matplotlib.pyplot as plt
import numpy as np
import... | 54.00907 | 234 | 0.674196 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,033 | 0.211311 |
962cd88d6f79f8b3352c0cd041ccfcff6c478fe5 | 11,137 | py | Python | sdk/python/pulumi_oci/sch/get_service_connector.py | EladGabay/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2021-08-17T11:14:46.000Z | 2021-12-31T02:07:03.000Z | sdk/python/pulumi_oci/sch/get_service_connector.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-09-06T11:21:29.000Z | 2021-09-06T11:21:29.000Z | sdk/python/pulumi_oci/sch/get_service_connector.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-08-24T23:31:30.000Z | 2022-01-02T19:26:54.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 43.846457 | 347 | 0.679806 | 8,833 | 0.793122 | 717 | 0.06438 | 8,021 | 0.720212 | 0 | 0 | 4,897 | 0.439705 |
962dd9983600a5e9baec739d1eaccc092f1e2982 | 3,258 | py | Python | manim_demo/srcs/new_Scene_demo.py | shujunge/manim_tutorial | 8e320373f0404dcc0a200ab3750ee70784dc1345 | [
"MIT"
] | null | null | null | manim_demo/srcs/new_Scene_demo.py | shujunge/manim_tutorial | 8e320373f0404dcc0a200ab3750ee70784dc1345 | [
"MIT"
] | null | null | null | manim_demo/srcs/new_Scene_demo.py | shujunge/manim_tutorial | 8e320373f0404dcc0a200ab3750ee70784dc1345 | [
"MIT"
] | null | null | null | from manimlib.imports import *
class LSystem(Scene):
CONFIG = {
'rules': {'F': 'F+F--F+F'},
'length': 1,
'start_loc': ORIGIN,
'angle': PI / 3,
'start_rot': 0,
'iteration': 1,
'initial': 'F',
'actions': {},
'locations': [],
'rotations':... | 24.313433 | 58 | 0.482198 | 3,216 | 0.987109 | 0 | 0 | 0 | 0 | 0 | 0 | 560 | 0.171885 |
962e6f77c6888ab263ac0737fad6faa36799e3b3 | 4,720 | py | Python | prototyping/OpenCv/robot_tracking.py | ssnover/msd-p18542 | 32bef466f9d5ba55429da2119a14081b3e411d0b | [
"MIT"
] | 3 | 2021-01-07T07:46:50.000Z | 2021-11-17T10:48:39.000Z | prototyping/OpenCv/robot_tracking.py | ssnover/msd-p18542 | 32bef466f9d5ba55429da2119a14081b3e411d0b | [
"MIT"
] | 3 | 2018-02-19T20:30:30.000Z | 2018-04-20T23:25:29.000Z | prototyping/OpenCv/robot_tracking.py | ssnover95/msd-p18542 | 32bef466f9d5ba55429da2119a14081b3e411d0b | [
"MIT"
] | 1 | 2021-01-07T07:46:52.000Z | 2021-01-07T07:46:52.000Z | import imutils
import cv2
import numpy as np
import math
from math import sqrt
def find_robot_orientation(image):
robot = {}
robot['angle'] = []
robot['direction'] = []
robotLower = (139, 227, 196)
robotUpper = (255, 255, 255)
distances = []
# img = cv2.imread('all_color_terrain_with_robot.... | 39.333333 | 114 | 0.587288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,273 | 0.269703 |
962e9ec005fd784de4a3baab20160d8df9ba9898 | 7,404 | py | Python | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_host_ntp.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 1 | 2019-04-16T21:23:15.000Z | 2019-04-16T21:23:15.000Z | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_host_ntp.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 5 | 2020-02-26T20:10:50.000Z | 2021-09-23T23:23:18.000Z | ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_host_ntp.py | otus-devops-2019-02/yyashkin_infra | 0cd0c003884155ac922e3e301305ac202de7028c | [
"MIT"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Abhijeet Kasurde <[email protected]>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata... | 35.768116 | 122 | 0.66356 | 3,771 | 0.509319 | 0 | 0 | 0 | 0 | 0 | 0 | 2,838 | 0.383306 |
962f56d3ff295087050794dbedace7481235e971 | 337 | py | Python | molecule/default/tests/test_creation.py | stackhpc/ansible-role-luks | 8c4b5f472ab0aef3d2a776d4fcd37ca17c6eac05 | [
"Apache-1.1"
] | 3 | 2020-04-14T19:57:25.000Z | 2021-01-11T09:09:16.000Z | molecule/default/tests/test_creation.py | stackhpc/ansible-role-luks | 8c4b5f472ab0aef3d2a776d4fcd37ca17c6eac05 | [
"Apache-1.1"
] | 4 | 2020-08-12T10:24:25.000Z | 2022-01-17T17:48:28.000Z | molecule/default/tests/test_creation.py | stackhpc/ansible-role-luks | 8c4b5f472ab0aef3d2a776d4fcd37ca17c6eac05 | [
"Apache-1.1"
] | 2 | 2021-06-17T21:57:42.000Z | 2022-02-20T08:02:43.000Z | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_crypto_devices(host):
f = host.file('/dev/mapper/cryptotest')
assert f.exists
f = host.file('/dev/mapper/crypto-test1')
... | 24.071429 | 63 | 0.744807 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.237389 |
962ff9f355899a8526a5df34e1ab89d319623352 | 796 | py | Python | test_weakref.py | xzfn/retroreload | 79466ef013a2a0892e096e510b847e222478caeb | [
"MIT"
] | null | null | null | test_weakref.py | xzfn/retroreload | 79466ef013a2a0892e096e510b847e222478caeb | [
"MIT"
] | null | null | null | test_weakref.py | xzfn/retroreload | 79466ef013a2a0892e096e510b847e222478caeb | [
"MIT"
] | null | null | null | """
weakref should be valid.
"""
import gc
import importlib
import autoreload
import retroreload
switch = 2
if switch == 0:
reload_module = importlib.reload
elif switch == 1:
reload_module = autoreload.superreload
elif switch == 2:
reload_module = retroreload.retroreload
import mod3
if __name__ ==... | 18.090909 | 76 | 0.688442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 273 | 0.342965 |
963000235c468e48e66c69225a889ee4596a7a88 | 814 | py | Python | model/model.py | Okestro-symphony/Log-Anomaly-Detection | ab6548ca93c8d6073faf96d8a39bf4517139d8ea | [
"Apache-2.0"
] | null | null | null | model/model.py | Okestro-symphony/Log-Anomaly-Detection | ab6548ca93c8d6073faf96d8a39bf4517139d8ea | [
"Apache-2.0"
] | 1 | 2021-11-03T04:17:55.000Z | 2021-11-03T04:17:55.000Z | model/model.py | Okestro-symphony/Log-Anomaly-Detection | ab6548ca93c8d6073faf96d8a39bf4517139d8ea | [
"Apache-2.0"
] | 1 | 2021-11-03T04:15:33.000Z | 2021-11-03T04:15:33.000Z | def train_isolation_forest(df, padding_data):
'''
* Isolation Forest model setting
- n_estimators=100
- max_samples='auto'
- n_jobs=-1
- max_features=2
- contamination=0.01
'''
#padding한 data load
data_df = padding_data
# model 정의
model = IsolationForest(n_estimators=100... | 24.666667 | 76 | 0.589681 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 383 | 0.43424 |
963036c125a200d1a52d12e53f35e03ad2ffc294 | 1,619 | py | Python | datasets.py | Tracesource/DCEC | 8b9dca56bc032fb81d18dd9709c170802600e06b | [
"MIT"
] | 154 | 2017-10-01T22:32:26.000Z | 2022-03-08T14:09:38.000Z | datasets.py | Tracesource/DCEC | 8b9dca56bc032fb81d18dd9709c170802600e06b | [
"MIT"
] | 10 | 2017-12-28T11:38:14.000Z | 2020-07-22T04:46:27.000Z | datasets.py | Tracesource/DCEC | 8b9dca56bc032fb81d18dd9709c170802600e06b | [
"MIT"
] | 59 | 2017-12-18T11:50:53.000Z | 2022-03-16T17:42:18.000Z | import numpy as np
def load_mnist():
# the data, shuffled and split between train and test sets
from keras.datasets import mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
x = np.concatenate((x_train, x_test))
y = np.concatenate((y_train, y_test))
x = x.reshape(-1, 28, 28, 1).as... | 34.446809 | 113 | 0.618901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.239036 |
9630b2873f1800433cfbc8d045129730577eb455 | 121,027 | py | Python | balto_gui.py | peckhams/balto_gui | 1c599bce4e90569f34aab1546d1adfd9dcaad943 | [
"MIT"
] | 8 | 2020-07-27T16:16:50.000Z | 2022-03-09T19:42:27.000Z | balto_gui.py | peckhams/balto_gui | 1c599bce4e90569f34aab1546d1adfd9dcaad943 | [
"MIT"
] | 1 | 2020-05-21T01:36:16.000Z | 2020-05-21T01:36:16.000Z | balto_gui.py | peckhams/balto_gui | 1c599bce4e90569f34aab1546d1adfd9dcaad943 | [
"MIT"
] | 5 | 2020-05-07T13:16:42.000Z | 2021-02-18T18:57:42.000Z | """
This module defines a class called "balto_gui" that can be used to
create a graphical user interface (GUI) for downloading data from
OpenDAP servers from and into a Jupyter notebook. If used with Binder,
this GUI runs in a browser window and does not require the user to
install anything on their computer. However... | 42.811107 | 96 | 0.432118 | 117,038 | 0.96704 | 0 | 0 | 0 | 0 | 0 | 0 | 62,616 | 0.517372 |
9632975c75b20b8d1e791a57c8e86aa3a4d6057f | 586 | py | Python | w0rplib/url.py | w0rp/w0rpzone | 06aa9f8871cefcbefbbfdfcba0abfd4fa2629d0c | [
"BSD-2-Clause"
] | null | null | null | w0rplib/url.py | w0rp/w0rpzone | 06aa9f8871cefcbefbbfdfcba0abfd4fa2629d0c | [
"BSD-2-Clause"
] | 13 | 2019-07-05T18:44:46.000Z | 2021-06-19T12:19:46.000Z | w0rplib/url.py | w0rp/w0rpzone | 06aa9f8871cefcbefbbfdfcba0abfd4fa2629d0c | [
"BSD-2-Clause"
] | null | null | null | from django.views.generic.base import RedirectView
from django.conf.urls import re_path
def redir(regex, redirect_url, name=None):
"""
A shorter wrapper around RedirectView for 301 redirects.
"""
return re_path(
regex,
RedirectView.as_view(url=redirect_url, permanent=True),
nam... | 23.44 | 64 | 0.663823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.245734 |
963361945d482a5cef7d35e152993ddbfadb7240 | 1,889 | py | Python | launcher.py | lucaso60/DiscordDMSpammer | 336a20195cf32013cf50c98c2a400ec79750758b | [
"MIT"
] | 1 | 2021-08-15T13:21:22.000Z | 2021-08-15T13:21:22.000Z | launcher.py | lucaso60/DiscordDMSpammer | 336a20195cf32013cf50c98c2a400ec79750758b | [
"MIT"
] | 1 | 2021-09-14T15:29:30.000Z | 2021-09-14T15:42:01.000Z | launcher.py | lucaso60/DiscordDMSpammer | 336a20195cf32013cf50c98c2a400ec79750758b | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 lucaso60
Copyright (c) 2015-present Rapptz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, ... | 33.732143 | 79 | 0.741133 | 0 | 0 | 0 | 0 | 384 | 0.203282 | 373 | 0.197459 | 1,351 | 0.715193 |
9633daded62c203085e90cc7105a91f913793c8c | 2,393 | py | Python | src/pipelines.py | charnley/bayes-mndo | 38662dd738af7cba73f98ffacc5c719aaa9a036d | [
"CC0-1.0"
] | null | null | null | src/pipelines.py | charnley/bayes-mndo | 38662dd738af7cba73f98ffacc5c719aaa9a036d | [
"CC0-1.0"
] | null | null | null | src/pipelines.py | charnley/bayes-mndo | 38662dd738af7cba73f98ffacc5c719aaa9a036d | [
"CC0-1.0"
] | null | null | null | import multiprocessing as mp
import os
import shutil
from functools import partial
from tqdm import tqdm
import data
from chemhelp import mndo
# def calculate(binary, filename, scr=None):
# """
# Collect sets of lines for each molecule as they become available
# and then call a parser to extract the dict... | 25.457447 | 88 | 0.670288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 933 | 0.389887 |
96343356750cc9fb146f0fb6d55a57fd12b0dbb2 | 2,915 | py | Python | lib/googlecloudsdk/api_lib/logging/common.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/api_lib/logging/common.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/api_lib/logging/common.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 38.355263 | 80 | 0.704974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,743 | 0.597942 |
96346b689665119bb71187a849bd5ed61453fc88 | 23,288 | py | Python | hkdataminer/utils/plot_.py | stephenliu1989/HK_DataMiner | 312d8244d33337971d81305ec7a9986427c669d9 | [
"Apache-2.0"
] | 3 | 2020-06-12T21:25:05.000Z | 2021-03-02T09:38:24.000Z | hkdataminer/utils/plot_.py | stephenliu1989/HK_DataMiner | 312d8244d33337971d81305ec7a9986427c669d9 | [
"Apache-2.0"
] | 1 | 2018-01-30T09:52:01.000Z | 2018-01-30T09:52:01.000Z | hkdataminer/utils/plot_.py | stephenliu1989/HK_DataMiner | 312d8244d33337971d81305ec7a9986427c669d9 | [
"Apache-2.0"
] | 1 | 2021-01-16T13:07:50.000Z | 2021-01-16T13:07:50.000Z | __author__ = 'stephen'
import numpy as np
import scipy.io
import scipy.sparse
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import matplotlib.pylab as pylab
from .utils import get_subindices
import matplotlib.ticker as mtick
from collections import Counter
from s... | 38.556291 | 209 | 0.591635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,974 | 0.342408 |
9634bfc41291ba70d3cb8d6d1b58e82b77a84ebf | 494 | py | Python | commanderbot_lib/database/yaml_file_database.py | CommanderBot-Dev/commanderbot-lib | 2716279b059056eaf0797085149b61f71b175ed5 | [
"MIT"
] | 1 | 2020-09-25T19:22:47.000Z | 2020-09-25T19:22:47.000Z | commanderbot_lib/database/yaml_file_database.py | CommanderBot-Dev/commanderbot-lib | 2716279b059056eaf0797085149b61f71b175ed5 | [
"MIT"
] | 1 | 2021-01-06T00:22:56.000Z | 2021-08-29T20:54:50.000Z | commanderbot_lib/database/yaml_file_database.py | CommanderBot-Dev/commanderbot-lib | 2716279b059056eaf0797085149b61f71b175ed5 | [
"MIT"
] | 2 | 2020-09-25T19:23:07.000Z | 2020-09-25T21:06:11.000Z | from typing import IO
from commanderbot_lib.database.abc.file_database import FileDatabase
from commanderbot_lib.database.mixins.yaml_file_database_mixin import (
YamlFileDatabaseMixin,
)
class YamlFileDatabase(FileDatabase, YamlFileDatabaseMixin):
# @implements FileDatabase
async def load(self, file: IO... | 29.058824 | 71 | 0.755061 | 298 | 0.603239 | 0 | 0 | 0 | 0 | 165 | 0.334008 | 52 | 0.105263 |
9634f1c7c56270380c2632695615ddd30a7c567d | 1,663 | py | Python | git_verkefni_forritun.py | JonasFreyrB/Forritun | 61cfda738693b255131bf6fb4ebea3af6f3a4ecf | [
"MIT"
] | null | null | null | git_verkefni_forritun.py | JonasFreyrB/Forritun | 61cfda738693b255131bf6fb4ebea3af6f3a4ecf | [
"MIT"
] | null | null | null | git_verkefni_forritun.py | JonasFreyrB/Forritun | 61cfda738693b255131bf6fb4ebea3af6f3a4ecf | [
"MIT"
] | null | null | null | #Jónas Freyr Bjarnason
#25.01.2017
#Forritun
#Liður 1
#Byð notanda um tölu 1
tala1=int(input("Sláðu inn tölu 1 "))
#Byð notanda um tölu 2
tala2=int(input("Sláðu inn tölu 2 "))
#Birti tölu 1 og 2 lagðar saman
print("Tölurnar lagðar saman ",tala1+tala2)
#Birti tölu 1 og 2 margfaldaðar saman
print("Tölurnar margfaldaðar... | 29.175439 | 72 | 0.723391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,124 | 0.640091 |
96359eac01afe317df5fd3c215b39bdd662a534c | 14,568 | py | Python | test/pdu.py | praekelt/python-smpp | 8a0753fc498ab6bcd6243aed5953cddd69cef2c0 | [
"BSD-3-Clause"
] | 36 | 2015-01-15T09:38:06.000Z | 2021-06-14T15:27:34.000Z | test/pdu.py | komuW/smpp_server | 10ef5c2ebc09e2ef88bdd62c55a4280a187d1eb2 | [
"BSD-3-Clause"
] | 8 | 2015-02-12T15:52:53.000Z | 2017-05-22T12:28:45.000Z | test/pdu.py | komuW/smpp_server | 10ef5c2ebc09e2ef88bdd62c55a4280a187d1eb2 | [
"BSD-3-Clause"
] | 22 | 2015-04-29T15:06:17.000Z | 2021-05-25T11:19:41.000Z |
pdu_objects = [
{
'header': {
'command_length': 0,
'command_id': 'bind_transmitter',
'command_status': 'ESME_ROK',
'sequence_number': 0,
},
'body': {
'mandatory_parameters': {
'system_id': 'test_system',
... | 28.17795 | 57 | 0.376922 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,360 | 0.436573 |
96361040937f80ec08a4104661139247c1a2e9f9 | 3,616 | py | Python | arxiv/release/dist_version.py | cul-it/arxiv-base | a5beadf44c24f72e21313299bfafc1ffb9d28ac7 | [
"MIT"
] | 23 | 2019-01-10T22:01:18.000Z | 2022-02-02T10:28:25.000Z | arxiv/release/dist_version.py | arXiv/arxiv-base | b59490abc1656c240025e19af86d6a246926914a | [
"MIT"
] | 57 | 2018-12-17T16:45:38.000Z | 2021-12-14T14:20:58.000Z | arxiv/release/dist_version.py | cul-it/arxiv-base-ui | a5beadf44c24f72e21313299bfafc1ffb9d28ac7 | [
"MIT"
] | 5 | 2019-01-10T22:01:28.000Z | 2021-11-05T12:25:31.000Z | """
Functions to deal with arxiv package versions.
It can be used in the setup.py file:
from arxiv.release.dist_version import get_version
setup(
version=get_version('arxiv-filemanager'),
....
)
"""
import sys
import pathlib
from subprocess import Popen, PIPE
from datetime import datetime
import pkg_resou... | 29.16129 | 79 | 0.634679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,071 | 0.572732 |
9636f9d68fd104dbb3836b714d906a33ec4f48ed | 15,812 | py | Python | rssynergia/base_diagnostics/read_bunch.py | radiasoft/rs_synergia | b43509de7f4a938354dc127762d8e723463e0e95 | [
"Apache-2.0"
] | null | null | null | rssynergia/base_diagnostics/read_bunch.py | radiasoft/rs_synergia | b43509de7f4a938354dc127762d8e723463e0e95 | [
"Apache-2.0"
] | null | null | null | rssynergia/base_diagnostics/read_bunch.py | radiasoft/rs_synergia | b43509de7f4a938354dc127762d8e723463e0e95 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""?
:copyright: Copyright (c) 2020 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
#import argparse
#import tables
from mpi4py import MPI
import h5py
import inspect
import numpy ... | 41.177083 | 142 | 0.623893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,862 | 0.433974 |
9637f8491206f394aea0791103d4e2cc75fcd07e | 15,043 | py | Python | funfolding/binning/classic_binning.py | tudo-astroparticlephysics/funfolding | 2f485b04f8d79698527fcaab015baf708505e8dd | [
"MIT"
] | 1 | 2019-05-22T13:46:46.000Z | 2019-05-22T13:46:46.000Z | funfolding/binning/classic_binning.py | tudo-astroparticlephysics/funfolding | 2f485b04f8d79698527fcaab015baf708505e8dd | [
"MIT"
] | null | null | null | funfolding/binning/classic_binning.py | tudo-astroparticlephysics/funfolding | 2f485b04f8d79698527fcaab015baf708505e8dd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from ._binning import Binning
import itertools
import numpy as np
import copy
try:
from astroML.density_estimation.bayesian_blocks import bayesian_blocks
got_astroML = True
except ImportError:
got_astroML = False
class ClassicBinning(Binning):
name = 'C... | 38.670951 | 79 | 0.515456 | 14,766 | 0.981586 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.024131 |
96395cbf1fcfecb1f1e6a9078b9555cfe006e998 | 2,625 | py | Python | basic_algorithm/draw/draw.py | Quanfita/ImageProcessing | 2a7c1d093a003c43d6d259f6e8db3b4e6163839b | [
"MIT"
] | null | null | null | basic_algorithm/draw/draw.py | Quanfita/ImageProcessing | 2a7c1d093a003c43d6d259f6e8db3b4e6163839b | [
"MIT"
] | null | null | null | basic_algorithm/draw/draw.py | Quanfita/ImageProcessing | 2a7c1d093a003c43d6d259f6e8db3b4e6163839b | [
"MIT"
] | null | null | null | import cv2
import numpy as np
def drawPoint(canvas,x,y):
canvas[y,x] = 0
def drawLine(canvas,x1,y1,x2,y2):
dx, dy = abs(x2 - x1), abs(y2 - y1)
xi, yi = x1, y1
sx, sy = 1 if (x2 - x1) > 0 else -1, 1 if (y2 - y1) > 0 else -1
pi = 2*dy - dx
while xi != x2 + 1:
if pi < 0:
pi +... | 27.061856 | 67 | 0.459429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.017143 |
9639600eac70c10e9cb5e5d9d76147c7dda0b313 | 888 | py | Python | PyTCI/models/alfentanil.py | jcia2192/PyTCI | 952ac6312015514c8609af5d9a61cc3397758c94 | [
"MIT"
] | 6 | 2019-02-16T22:29:42.000Z | 2020-10-17T17:22:52.000Z | PyTCI/models/alfentanil.py | jcia2192/PyTCI | 952ac6312015514c8609af5d9a61cc3397758c94 | [
"MIT"
] | 91 | 2019-03-04T06:11:07.000Z | 2022-03-30T01:31:27.000Z | PyTCI/models/alfentanil.py | jcia2192/PyTCI | 952ac6312015514c8609af5d9a61cc3397758c94 | [
"MIT"
] | 3 | 2019-05-14T15:09:30.000Z | 2020-02-19T13:03:03.000Z | from .base import Three
class Alfentanil(Three):
"""base Alfentanil class"""
pass
class Maitre(Alfentanil):
def __init__(self, age, weight, height, sex):
if sex == "m":
self.v1 = 0.111 * weight
elif sex == "f":
self.v1 = 0.128 * weight
else:
... | 24 | 83 | 0.516892 | 858 | 0.966216 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.147523 |
963a4d3128c84db58d2f454e777068e2515b774e | 307 | py | Python | cooee/actions.py | yschimke/cooee-cli-py | 74edeb58ee5cfd0887b73de4f90ffa28892e24df | [
"Apache-2.0"
] | null | null | null | cooee/actions.py | yschimke/cooee-cli-py | 74edeb58ee5cfd0887b73de4f90ffa28892e24df | [
"Apache-2.0"
] | null | null | null | cooee/actions.py | yschimke/cooee-cli-py | 74edeb58ee5cfd0887b73de4f90ffa28892e24df | [
"Apache-2.0"
] | null | null | null | import webbrowser
from typing import Dict, Any
from prompt_toolkit import print_formatted_text
from .format import todo_string
def launch_action(result: Dict[str, Any]):
if "location" in result:
webbrowser.open(result["location"])
else:
print_formatted_text(todo_string(result))
| 21.928571 | 49 | 0.745928 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.065147 |
963a7890170f483f8139e5e50f0f73025935d302 | 4,114 | py | Python | custom_components/panasonic_smart_app/sensor.py | clspeter/panasonic_smart_app | 22cf7e64f3b9685b94b38e4d7ffeb5deb900a8af | [
"MIT"
] | null | null | null | custom_components/panasonic_smart_app/sensor.py | clspeter/panasonic_smart_app | 22cf7e64f3b9685b94b38e4d7ffeb5deb900a8af | [
"MIT"
] | null | null | null | custom_components/panasonic_smart_app/sensor.py | clspeter/panasonic_smart_app | 22cf7e64f3b9685b94b38e4d7ffeb5deb900a8af | [
"MIT"
] | null | null | null | from datetime import timedelta
import logging
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import (
STATE_UNAVAILABLE,
DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_TEMPERATURE,
TEMP_CELSIUS,
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
PERCENTAGE,
)
from .entity import ... | 26.714286 | 75 | 0.622265 | 2,237 | 0.543753 | 0 | 0 | 1,794 | 0.436072 | 1,164 | 0.282936 | 437 | 0.106223 |
963b386535b3cdad7d06852710557f50ea31610a | 5,664 | py | Python | fluent.runtime/tests/format/test_placeables.py | jakub-szczepaniak/python-fluent | 2b751220e4ced57fc256df0f25adc72400e5ce9a | [
"Apache-2.0"
] | null | null | null | fluent.runtime/tests/format/test_placeables.py | jakub-szczepaniak/python-fluent | 2b751220e4ced57fc256df0f25adc72400e5ce9a | [
"Apache-2.0"
] | null | null | null | fluent.runtime/tests/format/test_placeables.py | jakub-szczepaniak/python-fluent | 2b751220e4ced57fc256df0f25adc72400e5ce9a | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, unicode_literals
import unittest
from fluent.runtime import FluentBundle
from fluent.runtime.errors import FluentCyclicReferenceError, FluentReferenceError
from ..utils import dedent_ftl
class TestPlaceables(unittest.TestCase):
def setUp(self):
self.ctx = FluentB... | 37.76 | 82 | 0.596751 | 5,428 | 0.958333 | 0 | 0 | 0 | 0 | 0 | 0 | 1,791 | 0.316208 |
963c560293977e228cb5a3afa7c8d254adb111f7 | 956 | py | Python | ads/feature_engineering/adsstring/parsers/base.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | 20 | 2022-02-22T19:07:09.000Z | 2022-03-16T17:21:42.000Z | ads/feature_engineering/adsstring/parsers/base.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | ads/feature_engineering/adsstring/parsers/base.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*--
# Copyright (c) 2021, 2022 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
class Parser:
@property
def pos(self):
raise NotImplementedError()
@property
def no... | 19.916667 | 104 | 0.639121 | 743 | 0.777197 | 0 | 0 | 671 | 0.701883 | 0 | 0 | 205 | 0.214435 |
963c73799bbdb00fb97205577d7028cae7121d80 | 1,535 | py | Python | tests/conftest.py | banteg/lido-vault | 702fa9c58a26c01c61b24489d18ea099e22e8b09 | [
"MIT"
] | 22 | 2020-12-19T10:07:38.000Z | 2022-01-03T03:28:08.000Z | tests/conftest.py | banteg/lido-vault | 702fa9c58a26c01c61b24489d18ea099e22e8b09 | [
"MIT"
] | 1 | 2020-12-23T22:32:42.000Z | 2020-12-23T22:35:56.000Z | tests/conftest.py | banteg/lido-vault | 702fa9c58a26c01c61b24489d18ea099e22e8b09 | [
"MIT"
] | 1 | 2020-12-21T08:45:07.000Z | 2020-12-21T08:45:07.000Z | import pytest
from brownie import Wei
@pytest.fixture(scope="function", autouse=True)
def shared_setup(fn_isolation):
pass
@pytest.fixture(scope='module')
def nocoiner(accounts, lido):
assert lido.balanceOf(accounts[9]) == 0
return accounts[9]
@pytest.fixture(scope='module')
def ape(accounts):
ret... | 25.583333 | 84 | 0.721173 | 722 | 0.470358 | 0 | 0 | 1,442 | 0.939414 | 0 | 0 | 127 | 0.082736 |
963e0a388ab593079d1ff2e77544ecf12fa56919 | 112 | py | Python | reqto/__init__.py | DovaX/reqto | 4d3cc03535297fb0d5c946632e9de6a3a1ec5420 | [
"MIT"
] | null | null | null | reqto/__init__.py | DovaX/reqto | 4d3cc03535297fb0d5c946632e9de6a3a1ec5420 | [
"MIT"
] | null | null | null | reqto/__init__.py | DovaX/reqto | 4d3cc03535297fb0d5c946632e9de6a3a1ec5420 | [
"MIT"
] | null | null | null | from reqto.core.reqto import get, post, delete, put, patch, head
__all__=[get, post, delete, put, patch, head] | 28 | 64 | 0.723214 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
963e5b6e89e0809787a1d58ba17bc95ac8ccc84f | 911 | py | Python | setup.py | sgillies/fio-taxa | a278f366c23d1e0946bc4675de905bda712c2490 | [
"MIT"
] | 2 | 2018-05-20T06:31:44.000Z | 2021-12-02T20:59:46.000Z | setup.py | sgillies/fio-taxa | a278f366c23d1e0946bc4675de905bda712c2490 | [
"MIT"
] | 1 | 2018-12-19T17:05:05.000Z | 2018-12-19T17:05:05.000Z | setup.py | sgillies/fio-taxa | a278f366c23d1e0946bc4675de905bda712c2490 | [
"MIT"
] | null | null | null | from codecs import open as codecs_open
from setuptools import setup, find_packages
# Get the long description from the relevant file
with codecs_open('README.rst', encoding='utf-8') as f:
long_description = f.read()
setup(name='fio_taxa',
version='1.0.0',
description=u"Classification of GeoJSON feat... | 26.794118 | 72 | 0.630077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 338 | 0.371021 |
963e81d1f86297198f40e8bbac901cbb13572805 | 829 | py | Python | python/q04.py | holisound/70-math-quizs-for-programmers | 746d98435a496fd8313a233fe4c2a59fd11d3823 | [
"MIT"
] | null | null | null | python/q04.py | holisound/70-math-quizs-for-programmers | 746d98435a496fd8313a233fe4c2a59fd11d3823 | [
"MIT"
] | null | null | null | python/q04.py | holisound/70-math-quizs-for-programmers | 746d98435a496fd8313a233fe4c2a59fd11d3823 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import deque
def cutBar(m, n):
res, now = 0, 1
while now < n:
now += now if now < m else m
res += 1
return res
def cutBarBFS(m, n):
if n == 1:
return 0
que = deque([n])
res = 0
while que:
size = len(que)
for... | 19.738095 | 43 | 0.472859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.027744 |
963ee23183336e553e81e0efa85833a77f9df80d | 6,108 | py | Python | numba/core/itanium_mangler.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | null | null | null | numba/core/itanium_mangler.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | 1 | 2020-07-28T20:47:24.000Z | 2020-07-28T20:47:24.000Z | numba/core/itanium_mangler.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | null | null | null | """
Itanium CXX ABI Mangler
Reference: http://mentorembedded.github.io/cxx-abi/abi.html
The basics of the mangling scheme.
We are hijacking the CXX mangling scheme for our use. We map Python modules
into CXX namespace. A `module1.submodule2.foo` is mapped to
`module1::submodule2::foo`. For parameterized numba ty... | 29.650485 | 79 | 0.655861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,110 | 0.509168 |
963ee361844cacc5317b943abf161599e3643da8 | 1,247 | py | Python | DRAFTS/CookieStealer.py | henryza/Python | 34af4a915e7bec27268b619246833e65e48d1cb8 | [
"MIT"
] | null | null | null | DRAFTS/CookieStealer.py | henryza/Python | 34af4a915e7bec27268b619246833e65e48d1cb8 | [
"MIT"
] | null | null | null | DRAFTS/CookieStealer.py | henryza/Python | 34af4a915e7bec27268b619246833e65e48d1cb8 | [
"MIT"
] | null | null | null | import requests
import json
class test(object):
def __init__(self):
self._debug = False
self._http_debug = False
self._https = True
self._session = requests.session() # use single session for all requests
def update_csrf(self):
# Retrieve server csrf and update session's he... | 30.414634 | 81 | 0.567763 | 1,169 | 0.93745 | 0 | 0 | 0 | 0 | 0 | 0 | 238 | 0.190858 |
964088ff23e1f89499e5fcf0c7eaef0bac779407 | 15,483 | py | Python | viewers/trpl_h5.py | ScopeFoundry/FoundryDataBrowser | 604506a2e9cabe757f1c5430b688fb98788b6251 | [
"BSD-3-Clause"
] | 6 | 2017-01-10T20:13:38.000Z | 2019-05-23T16:25:12.000Z | viewers/trpl_h5.py | ScopeFoundry/FoundryDataBrowser | 604506a2e9cabe757f1c5430b688fb98788b6251 | [
"BSD-3-Clause"
] | null | null | null | viewers/trpl_h5.py | ScopeFoundry/FoundryDataBrowser | 604506a2e9cabe757f1c5430b688fb98788b6251 | [
"BSD-3-Clause"
] | null | null | null | from ScopeFoundry.data_browser import DataBrowser
from FoundryDataBrowser.viewers.hyperspec_base_view import HyperSpectralBaseView
import numpy as np
import h5py
from qtpy import QtWidgets
from ScopeFoundry.logged_quantity import LQCollection
import time
from FoundryDataBrowser.viewers.plot_n_fit import MonoExponentia... | 39.497449 | 124 | 0.580831 | 12,300 | 0.79442 | 0 | 0 | 0 | 0 | 0 | 0 | 4,603 | 0.297294 |
964093368998bbfce9f4d1b33cd4d8d11bcb3ef0 | 854 | py | Python | python/matrices.py | silvajhonatan/robotics | d1097809e88c744658dab6d661092b6ea8f0e13a | [
"MIT"
] | 3 | 2017-11-16T18:34:27.000Z | 2021-01-28T15:33:46.000Z | python/matrices.py | sjhonatan/robotics | d1097809e88c744658dab6d661092b6ea8f0e13a | [
"MIT"
] | null | null | null | python/matrices.py | sjhonatan/robotics | d1097809e88c744658dab6d661092b6ea8f0e13a | [
"MIT"
] | null | null | null | import numpy as np
import numpy.matlib
# soma das matrizes
A = np.array([[1,0],[0,2]])
B = np.array([[0,1],[1,0]])
C = A + B
print(C)
# soma das linhas
A = np.array([[1,0],[0,2]])
B = np.array([[0,1],[1,0]])
s_linha = sum(A)
print(s_linha)
# soma dos elementos
A = np.array([[1,0],[0,2]])
B = np.array([[0,1],[1,0]]... | 16.423077 | 30 | 0.564403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.092506 |
9640feccc968d6a78b76b7178f48a08b2309b36c | 5,459 | py | Python | builder/action.py | nagisc007/storybuilder | 54b28934de8acedbe35930ce27e12a7e75f91be0 | [
"MIT"
] | null | null | null | builder/action.py | nagisc007/storybuilder | 54b28934de8acedbe35930ce27e12a7e75f91be0 | [
"MIT"
] | 176 | 2019-03-07T13:31:26.000Z | 2019-11-02T12:38:23.000Z | builder/action.py | nagisc007/storybuilder | 54b28934de8acedbe35930ce27e12a7e75f91be0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Define action class.
"""
from enum import Enum
from . import assertion
from .basedata import BaseData
from .description import Description, NoDesc, DescType
from .flag import Flag, NoFlag, NoDeflag
from .basesubject import NoSubject
from .person import Person
from .chara import Chara
from .wh... | 28.432292 | 87 | 0.605972 | 5,214 | 0.937938 | 0 | 0 | 484 | 0.087066 | 0 | 0 | 517 | 0.093002 |
9641ba7ef69f2c86256af69c136b624ad8b36e71 | 1,025 | py | Python | pype/hosts/fusion/plugins/publish/increment_current_file_deadline.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | pype/hosts/fusion/plugins/publish/increment_current_file_deadline.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | pype/hosts/fusion/plugins/publish/increment_current_file_deadline.py | simonebarbieri/pype | a6dc83aa1300738749cbe8e5e2e6d2d1794e0289 | [
"MIT"
] | null | null | null | import pyblish.api
class FusionIncrementCurrentFile(pyblish.api.ContextPlugin):
"""Increment the current file.
Saves the current file with an increased version number.
"""
label = "Increment current file"
order = pyblish.api.IntegratorOrder + 9.0
hosts = ["fusion"]
families = ["render.f... | 29.285714 | 76 | 0.66439 | 1,003 | 0.978537 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.282927 |
9642f267112ae3cb7eec037a994d03366ec2da1a | 2,346 | py | Python | tests/integration_tests/framework/flask_utils.py | ilan-WS/cloudify-manager | 510d8a277c848db351f38fc5b264806b2cb36d0b | [
"Apache-2.0"
] | 124 | 2015-01-22T22:28:37.000Z | 2022-02-26T23:12:06.000Z | tests/integration_tests/framework/flask_utils.py | cloudify-cosmo/cloudify-manager | 4a3f44ceb49d449bc5ebc8766b1c7b9c174ff972 | [
"Apache-2.0"
] | 345 | 2015-01-08T15:49:40.000Z | 2022-03-29T08:33:00.000Z | tests/integration_tests/framework/flask_utils.py | ilan-WS/cloudify-manager | 510d8a277c848db351f38fc5b264806b2cb36d0b | [
"Apache-2.0"
] | 77 | 2015-01-07T14:04:35.000Z | 2022-03-07T22:46:00.000Z | #########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | 36.65625 | 75 | 0.738704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,069 | 0.455669 |
9643beb9c22472b136ce8bcd1f8f9fb526f1f46a | 11,096 | py | Python | dependencies/FontTools/Lib/fontTools/misc/bezierTools.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 21 | 2015-01-16T05:10:02.000Z | 2021-06-11T20:48:15.000Z | dependencies/FontTools/Lib/fontTools/misc/bezierTools.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 1 | 2019-09-09T12:10:27.000Z | 2020-05-22T10:12:14.000Z | dependencies/FontTools/Lib/fontTools/misc/bezierTools.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 2 | 2015-05-03T04:51:08.000Z | 2018-08-24T08:28:53.000Z | """fontTools.misc.bezierTools.py -- tools for working with bezier path segments."""
__all__ = [
"calcQuadraticBounds",
"calcCubicBounds",
"splitLine",
"splitQuadratic",
"splitCubic",
"splitQuadraticAtT",
"splitCubicAtT",
"solveQuadratic",
"solveCubic",
]
from fontTools.misc.arrayTools import calcBounds
impo... | 30.31694 | 114 | 0.594809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,251 | 0.563356 |
9643d280cf21edb06bbf96df561f04888a36f82e | 19,403 | py | Python | pymach/present.py | EnriqueU/pymach | b9918dcb0964fc4645f548639a762ef03c3c2e13 | [
"MIT"
] | null | null | null | pymach/present.py | EnriqueU/pymach | b9918dcb0964fc4645f548639a762ef03c3c2e13 | [
"MIT"
] | null | null | null | pymach/present.py | EnriqueU/pymach | b9918dcb0964fc4645f548639a762ef03c3c2e13 | [
"MIT"
] | null | null | null | # Standard Libraries
import subprocess
import datetime
import sys # print en consola
import os
import json
# Local Libraries
import define
import analyze
import prepare
import fselect
import evaluate
import improve
import tools
import pandas as pd
from flask_login import LoginManager, login_required, login_user, logo... | 35.931481 | 124 | 0.611091 | 0 | 0 | 0 | 0 | 10,836 | 0.55847 | 0 | 0 | 9,340 | 0.481369 |
96442ec34b3f08fd8d2dea36e730470c13f2a4b5 | 7,344 | py | Python | api/ddu/management-zone-calculation/dduConsumptionPerMZ.py | pawelsiwek/snippets | 6b551bf98e1ca514c0176363acfcb7dd20288b30 | [
"Apache-2.0"
] | 11 | 2019-07-26T08:35:08.000Z | 2021-11-04T11:25:28.000Z | api/ddu/management-zone-calculation/dduConsumptionPerMZ.py | pawelsiwek/snippets | 6b551bf98e1ca514c0176363acfcb7dd20288b30 | [
"Apache-2.0"
] | 12 | 2019-07-09T07:55:36.000Z | 2022-03-10T22:26:42.000Z | api/ddu/management-zone-calculation/dduConsumptionPerMZ.py | pawelsiwek/snippets | 6b551bf98e1ca514c0176363acfcb7dd20288b30 | [
"Apache-2.0"
] | 46 | 2019-04-24T13:35:46.000Z | 2022-03-23T01:00:17.000Z | import sys, requests, json, time
METRIC_NAME = "builtin:billing.ddu.metrics.byEntity"
PAGE_SIZE = 500
sys.tracebacklimit = 0
# python .\dduConsumptionPerMZ.py 2020-08-01T12:00:00+02:00 2020-08-10T12:00:00+02:00 https://mySampleEnv.live.dynatrace.com/api/ abcdefghijklmnop 60
# python .\dduConsumptionPerMZ.py 2020-08-0... | 42.697674 | 212 | 0.687228 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,679 | 0.50068 |
964481acbba226d6bc1f722acc9bd0960d9cebe5 | 936 | py | Python | Lesson3/coefficient_of_determination2.py | rmhyman/DataScience | c839c97c76f104ab298563a5c8b48f6d90be5f60 | [
"MIT"
] | 1 | 2015-09-17T18:49:09.000Z | 2015-09-17T18:49:09.000Z | Lesson3/coefficient_of_determination2.py | rmhyman/DataScience | c839c97c76f104ab298563a5c8b48f6d90be5f60 | [
"MIT"
] | null | null | null | Lesson3/coefficient_of_determination2.py | rmhyman/DataScience | c839c97c76f104ab298563a5c8b48f6d90be5f60 | [
"MIT"
] | null | null | null | import numpy as np
import scipy
import matplotlib.pyplot as plt
import sys
def compute_r_squared(data, predictions):
'''
In exercise 5, we calculated the R^2 value for you. But why don't you try and
and calculate the R^2 value yourself.
Given a list of original data points, and also a li... | 36 | 89 | 0.679487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 628 | 0.67094 |
964490d0c12237f4b5b63e54d5ed293032299a1f | 414 | py | Python | setup.py | 10sr/pyltsv | d31286cef6caca941d20d364863bf3bd0d95b008 | [
"Apache-2.0"
] | null | null | null | setup.py | 10sr/pyltsv | d31286cef6caca941d20d364863bf3bd0d95b008 | [
"Apache-2.0"
] | 16 | 2020-06-15T11:04:39.000Z | 2022-01-11T15:34:14.000Z | setup.py | 10sr/pyltsv | d31286cef6caca941d20d364863bf3bd0d95b008 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# type: ignore
"""Setup script."""
from setuptools import setup
def _get_version():
with open("pyltsv/_version.py") as f:
for line in f:
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
... | 19.714286 | 56 | 0.589372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.309179 |
96461908df787c4f715fcb78e9b9a2b6846a1ccf | 15,328 | py | Python | hypha/apply/projects/models/project.py | slifty/hypha | 93313933c26589858beb9a861e33431658cd3b24 | [
"BSD-3-Clause"
] | null | null | null | hypha/apply/projects/models/project.py | slifty/hypha | 93313933c26589858beb9a861e33431658cd3b24 | [
"BSD-3-Clause"
] | null | null | null | hypha/apply/projects/models/project.py | slifty/hypha | 93313933c26589858beb9a861e33431658cd3b24 | [
"BSD-3-Clause"
] | null | null | null | import collections
import decimal
import json
import logging
from django.apps import apps
from django.conf import settings
from django.contrib.contenttypes.fields import GenericRelation
from django.contrib.postgres.fields import JSONField
from django.core.exceptions import ValidationError
from django.core.validators i... | 32.892704 | 123 | 0.666819 | 13,295 | 0.867367 | 778 | 0.050757 | 3,623 | 0.236365 | 0 | 0 | 3,499 | 0.228275 |
964683b856f9816db2cfc1191cef1b460b9b0c10 | 2,030 | py | Python | logsight/result/template.py | aiops/logsight-sdk-py | 35fd9f99eb03472dee7ae6a1639502b7ea0c485e | [
"MIT"
] | 1 | 2021-10-02T09:29:10.000Z | 2021-10-02T09:29:10.000Z | logsight/result/template.py | aiops/logsight-sdk-py | 35fd9f99eb03472dee7ae6a1639502b7ea0c485e | [
"MIT"
] | null | null | null | logsight/result/template.py | aiops/logsight-sdk-py | 35fd9f99eb03472dee7ae6a1639502b7ea0c485e | [
"MIT"
] | null | null | null |
class Template:
def __init__(self, data):
"""Class representing log templates.
Note:
Timestamps are represented in ISO format with timezone information.
e.g, 2021-10-07T13:18:09.178477+02:00.
"""
self._timestamp = data.get("@timestamp", None)
self.... | 25.375 | 79 | 0.567488 | 2,028 | 0.999015 | 0 | 0 | 1,230 | 0.605911 | 0 | 0 | 957 | 0.471429 |