hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
790e79b85d67c39c7121ab447093d21ae2acf789
29,763
py
Python
analysis_module/analyzer/AnalyzerDatabaseManager_tmp.py
ria-ee/monitor
d5cb9384abf38394b35e760729649136cbbc7548
[ "MIT" ]
10
2017-12-01T11:59:54.000Z
2021-11-08T10:30:35.000Z
analysis_module/analyzer/AnalyzerDatabaseManager_tmp.py
ria-ee/monitor
d5cb9384abf38394b35e760729649136cbbc7548
[ "MIT" ]
16
2019-11-15T08:45:33.000Z
2021-06-10T18:06:03.000Z
analysis_module/analyzer/AnalyzerDatabaseManager_tmp.py
ria-ee/monitor
d5cb9384abf38394b35e760729649136cbbc7548
[ "MIT" ]
13
2017-11-22T08:46:57.000Z
2021-12-16T06:51:07.000Z
# _tmp_ import datetime from copy import deepcopy # _tmp_ from pymongo import MongoClient import pymongo import pandas as pd import numpy as np import sys pd.options.mode.chained_assignment = None class AnalyzerDatabaseManager(object): def __init__(self, db_config, config): self._db_config = db_config ...
50.876923
158
0.629977
import datetime from copy import deepcopy from pymongo import MongoClient import pymongo import pandas as pd import numpy as np import sys pd.options.mode.chained_assignment = None class AnalyzerDatabaseManager(object): def __init__(self, db_config, config): self._db_config = db_config self._c...
true
true
790e7d287528a1269e09470762940c56aefc0e6c
3,674
py
Python
monai/handlers/checkpoint_loader.py
BRAINSia/MONAI
04e1c345fc840f5a1b6504ee5857d5a9feb27d84
[ "Apache-2.0" ]
null
null
null
monai/handlers/checkpoint_loader.py
BRAINSia/MONAI
04e1c345fc840f5a1b6504ee5857d5a9feb27d84
[ "Apache-2.0" ]
null
null
null
monai/handlers/checkpoint_loader.py
BRAINSia/MONAI
04e1c345fc840f5a1b6504ee5857d5a9feb27d84
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 MONAI Consortium # 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, s...
42.72093
111
0.679096
import logging from typing import TYPE_CHECKING, Dict, Optional import torch from monai.utils import exact_version, optional_import Events, _ = optional_import("ignite.engine", "0.3.0", exact_version, "Events") Checkpoint, _ = optional_import("ignite.handlers", "0.3.0", exact_version, "Checkpoint") if TYP...
true
true
790e7d48fc74b078b698d22908efa30d7a798044
994
py
Python
tethys/bin/cli.py
tethys-platform/tethys
c27daf5a832b05f9d771b04355001c331bc08766
[ "ECL-2.0", "Apache-2.0" ]
2
2020-05-20T19:03:14.000Z
2020-06-03T20:43:34.000Z
tethys/bin/cli.py
tethys-platform/tethys
c27daf5a832b05f9d771b04355001c331bc08766
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tethys/bin/cli.py
tethys-platform/tethys
c27daf5a832b05f9d771b04355001c331bc08766
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2020 Konstruktor, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
26.864865
74
0.72334
import click from tethys.apps.base import AppBase @click.group() def cli(): @cli.group(name="apps") def apps_entry(): for app_cls in AppBase.get_apps(): add_click_entry = getattr(app_cls, "add_click_entry", None) if add_click_entry: add_click_entry(apps_entry)
true
true
790e7d851357a5a65fe4fce0b51959cc8cde1937
54,066
py
Python
external/vulkancts/scripts/gen_framework.py
jingpad-bsp/android_external_deqp
50f948294cb12f5384633efc9327c571feb0fa21
[ "Apache-2.0" ]
null
null
null
external/vulkancts/scripts/gen_framework.py
jingpad-bsp/android_external_deqp
50f948294cb12f5384633efc9327c571feb0fa21
[ "Apache-2.0" ]
null
null
null
external/vulkancts/scripts/gen_framework.py
jingpad-bsp/android_external_deqp
50f948294cb12f5384633efc9327c571feb0fa21
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # Vulkan CTS # ---------- # # Copyright (c) 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy ...
37.729239
225
0.694281
import os import re import sys import copy from itertools import chain from collections import OrderedDict sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) from build.common import DEQP_DIR from khr_util.format import indentLines, writeInlFile VULKAN_H = os....
true
true
790e7da15c19838fcf7d83854540fed3484ca0bd
12,476
py
Python
src/AsmvarVarScore/FeatureToScore2.py
bioinformatics-centre/AsmVar
5abd91a47feedfbd39b89ec3e2d6d20c02fe5a5e
[ "MIT" ]
17
2015-12-25T10:58:03.000Z
2021-05-06T01:56:40.000Z
src/AsmvarVarScore/FeatureToScore2.py
bioinformatics-centre/AsmVar
5abd91a47feedfbd39b89ec3e2d6d20c02fe5a5e
[ "MIT" ]
3
2017-07-20T22:12:16.000Z
2021-04-19T14:37:14.000Z
src/AsmvarVarScore/FeatureToScore2.py
bioinformatics-centre/AsmVar
5abd91a47feedfbd39b89ec3e2d6d20c02fe5a5e
[ "MIT" ]
3
2018-01-26T02:03:04.000Z
2020-08-07T08:01:20.000Z
""" ======================================================== Statistic the SV Stat after AGE Process ======================================================== Author: Shujia Huang & Siyang Liu Date : 2014-03-07 0idx:54:15 """ import sys import re import os import string import numpy as np import matplotlib.pyplot as pl...
46.207407
177
0.511783
""" ======================================================== Statistic the SV Stat after AGE Process ======================================================== Author: Shujia Huang & Siyang Liu Date : 2014-03-07 0idx:54:15 """ import sys import re import os import string import numpy as np import matplotlib.pyplot as pl...
false
true
790e7e3cbbb549ed654db291347be7a238b3d730
374
py
Python
pkgs/spyder-2.3.8-py27_1/lib/python2.7/site-packages/spyderplugins/widgets/__init__.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/spyder-2.3.8-py27_1/lib/python2.7/site-packages/spyderplugins/widgets/__init__.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/spyder-2.3.8-py27_1/lib/python2.7/site-packages/spyderplugins/widgets/__init__.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-08-04T08:13:34.000Z
2021-08-04T08:13:34.000Z
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ spyderlib.widgets ================= Widgets defined in this module may be used in any other Qt-based application They are also used in Spyder throug...
23.375
77
0.679144
true
true
790e7e9cf0a7ae176e306f42356a271451e13a17
680
py
Python
ampel/test/test_T3SimpleDataLoader.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
ampel/test/test_T3SimpleDataLoader.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
ampel/test/test_T3SimpleDataLoader.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
from ampel.t3.supply.load.T3SimpleDataLoader import T3SimpleDataLoader from ampel.core.AmpelContext import AmpelContext def test_instantiate(core_config, patch_mongo, ampel_logger): """ AbsT3Loader understands all the aliases in the ampel-core config """ ctx = AmpelContext.load(core_config) aliase...
34
70
0.677941
from ampel.t3.supply.load.T3SimpleDataLoader import T3SimpleDataLoader from ampel.core.AmpelContext import AmpelContext def test_instantiate(core_config, patch_mongo, ampel_logger): ctx = AmpelContext.load(core_config) aliases = ctx.config.get("alias.t3", dict) assert len( directives := T3SimpleDa...
true
true
790e7ec6ba85fc5230215d834a4fe8ea2e783dfe
8,135
py
Python
info/utils/captcha/captcha.py
rymmx/My_information
70e7b8b294c19328c10d1335cacca8832d86931f
[ "MIT" ]
1
2019-02-03T03:53:30.000Z
2019-02-03T03:53:30.000Z
info/utils/captcha/captcha.py
rymmx/My_information
70e7b8b294c19328c10d1335cacca8832d86931f
[ "MIT" ]
null
null
null
info/utils/captcha/captcha.py
rymmx/My_information
70e7b8b294c19328c10d1335cacca8832d86931f
[ "MIT" ]
1
2019-02-03T03:55:10.000Z
2019-02-03T03:55:10.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # refer to `https://bitbucket.org/akorn/wheezy.captcha` import random import string import os.path from io import BytesIO from PIL import Image from PIL import ImageFilter from PIL.ImageDraw import Draw from PIL.ImageFont import truetype class Bezier: def __init__(...
34.764957
116
0.547019
import random import string import os.path from io import BytesIO from PIL import Image from PIL import ImageFilter from PIL.ImageDraw import Draw from PIL.ImageFont import truetype class Bezier: def __init__(self): self.tsequence = tuple([t / 20.0 for t in range(21)]) self.beziers = {} ...
true
true
790e7f140f004009c0d7b94b4a17b6bb1d019f53
4,382
py
Python
factern_client/com/factern/model/create_entity_response.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
null
null
null
factern_client/com/factern/model/create_entity_response.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
null
null
null
factern_client/com/factern/model/create_entity_response.py
Factern/factern-client-python
2453dbf0d683417142fe98514ef6de2742f14f92
[ "MIT" ]
2
2018-07-20T15:02:06.000Z
2018-08-01T20:38:38.000Z
# coding: utf-8 """ Factern API """ import pprint import re # noqa: F401 import six import importlib parent_name = "BaseResponse" def get_parent(): # Lazy importing of parent means that loading the classes happens # in the correct order. if get_parent.cache is None: parent_fname = "fact...
26.883436
122
0.581698
import pprint import re import six import importlib parent_name = "BaseResponse" def get_parent(): if get_parent.cache is None: parent_fname = "factern_client.com.factern.model.%s" % re.sub("([a-z])([A-Z])", "\\1_\\2", "BaseResponse").lower() parent = importlib.import_module(par...
true
true
790e7f4d6d28c11ac979b72d02dfc112ce6de065
39,647
py
Python
main.py
DeniseMak/ner-neuron
d7ca8a2b1f5652b42892b4bda9b07a2e4edd09db
[ "Apache-2.0" ]
null
null
null
main.py
DeniseMak/ner-neuron
d7ca8a2b1f5652b42892b4bda9b07a2e4edd09db
[ "Apache-2.0" ]
null
null
null
main.py
DeniseMak/ner-neuron
d7ca8a2b1f5652b42892b4bda9b07a2e4edd09db
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: Jie # @Date: 2017-06-15 14:11:08 # @Last Modified by: Jie Yang, Contact: jieynlp@gmail.com # @Last Modified time: 2019-02-13 12:41:44 from __future__ import print_function import time import sys import argparse import random import torch import gc import torch.nn as nn import...
44.199554
219
0.645749
from __future__ import print_function import time import sys import argparse import random import torch import gc import torch.nn as nn import torch.optim as optim import numpy as np from utils.metric import get_ner_fmeasure from model.seqlabel import SeqLabel from model.sentclassifier import SentClassifier from ...
true
true
790e7f6b3c7e567f5959d6e6164964eafc2f6710
11,370
py
Python
mne/forward/tests/test_field_interpolation.py
0reza/mne-python
da02a256423404a81929d6de278bc63d3192a280
[ "BSD-3-Clause" ]
null
null
null
mne/forward/tests/test_field_interpolation.py
0reza/mne-python
da02a256423404a81929d6de278bc63d3192a280
[ "BSD-3-Clause" ]
null
null
null
mne/forward/tests/test_field_interpolation.py
0reza/mne-python
da02a256423404a81929d6de278bc63d3192a280
[ "BSD-3-Clause" ]
null
null
null
from os import path as op import numpy as np from numpy.polynomial import legendre from numpy.testing import (assert_allclose, assert_array_equal, assert_equal, assert_array_almost_equal) from scipy.interpolate import interp1d import pytest import mne from mne.forward import _make_surface_...
41.195652
79
0.652858
from os import path as op import numpy as np from numpy.polynomial import legendre from numpy.testing import (assert_allclose, assert_array_equal, assert_equal, assert_array_almost_equal) from scipy.interpolate import interp1d import pytest import mne from mne.forward import _make_surface_...
true
true
790e7f9473c29d485376aeb989c661c776a540bb
6,122
py
Python
pkgs/nbconvert-4.1.0-py27_0/lib/python2.7/site-packages/nbconvert/preprocessors/execute.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
652
2015-07-26T00:00:17.000Z
2022-02-24T18:30:04.000Z
pkgs/nbconvert-4.1.0-py27_0/lib/python2.7/site-packages/nbconvert/preprocessors/execute.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
8
2015-09-07T03:38:19.000Z
2021-05-23T03:18:51.000Z
pkgs/nbconvert-4.1.0-py27_0/lib/python2.7/site-packages/nbconvert/preprocessors/execute.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
40
2015-07-24T19:45:08.000Z
2021-11-01T14:54:56.000Z
"""Module containing a preprocessor that removes the outputs from code cells""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os from textwrap import dedent try: from queue import Empty # Py 3 except ImportError: from Queue import Empty # Py 2 ...
32.221053
93
0.542143
import os from textwrap import dedent try: from queue import Empty except ImportError: from Queue import Empty from traitlets import List, Unicode, Bool from nbformat.v4 import output_from_msg from .base import Preprocessor from ..utils.exceptions import ConversionException from traitlets import Inte...
true
true
790e80318b8c20adfa0e3278f7d70c03a34e6a41
683
py
Python
tests/utils.py
YegorDB/phnl
879f4e728d9fcbcfe5e2f78720836483e2046160
[ "Apache-2.0" ]
3
2019-02-20T06:51:43.000Z
2021-06-19T22:29:23.000Z
tests/utils.py
YegorDB/phnl
879f4e728d9fcbcfe5e2f78720836483e2046160
[ "Apache-2.0" ]
1
2021-12-01T08:25:23.000Z
2021-12-15T17:16:57.000Z
tests/utils.py
YegorDB/phnl
879f4e728d9fcbcfe5e2f78720836483e2046160
[ "Apache-2.0" ]
2
2020-12-16T01:21:09.000Z
2021-01-27T08:51:52.000Z
# Copyright 2018 Yegor Bitensky # 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.15
74
0.746706
def get_parameters(func): def wrap(self, values): return func(self, **values) return wrap
true
true
790e805f07060deff8588dc86e74956319e8813e
1,678
py
Python
ml_rxe.py
sczyz/radioxenon_ml
73398f0060e88616c7652a72bdedf7f93ea17a20
[ "MIT" ]
null
null
null
ml_rxe.py
sczyz/radioxenon_ml
73398f0060e88616c7652a72bdedf7f93ea17a20
[ "MIT" ]
null
null
null
ml_rxe.py
sczyz/radioxenon_ml
73398f0060e88616c7652a72bdedf7f93ea17a20
[ "MIT" ]
1
2018-04-23T20:52:43.000Z
2018-04-23T20:52:43.000Z
# -*- coding: utf-8 -*- """ Created on Wed May 9 14:25:47 2018 @author: Steven """ import sys import argparse from radioxenon_ml.read_in import ml_matrix_composition as mlmc from radioxenon_ml.solve import iterate import numpy as np """ import radioxenon_ml.read_in.ml_matrix_composition import radioxenon_ml.solve.it...
43.025641
138
0.690703
import sys import argparse from radioxenon_ml.read_in import ml_matrix_composition as mlmc from radioxenon_ml.solve import iterate import numpy as np parser = argparse.ArgumentParser(description='This is the master file for running the maximum likelihood package.') parser.add_argument('-o', '--offset', ...
true
true
790e8251ca3599b1dd947fa9e452741fd177e540
2,463
py
Python
colour/recovery/tests/test__init__.py
JGoldstone/colour
6829b363d5f0682bff0f4826995e7ceac189ff28
[ "BSD-3-Clause" ]
null
null
null
colour/recovery/tests/test__init__.py
JGoldstone/colour
6829b363d5f0682bff0f4826995e7ceac189ff28
[ "BSD-3-Clause" ]
null
null
null
colour/recovery/tests/test__init__.py
JGoldstone/colour
6829b363d5f0682bff0f4826995e7ceac189ff28
[ "BSD-3-Clause" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- """ Defines the unit tests for the :mod:`colour.recovery` module. """ import numpy as np import unittest from colour.colorimetry import ( MSDS_CMFS, SDS_ILLUMINANTS, SpectralShape, reshape_msds, reshape_sd, sd_to_XYZ_integration, ) from colour.rec...
28.976471
78
0.568006
import numpy as np import unittest from colour.colorimetry import ( MSDS_CMFS, SDS_ILLUMINANTS, SpectralShape, reshape_msds, reshape_sd, sd_to_XYZ_integration, ) from colour.recovery import XYZ_to_sd from colour.utilities import domain_range_scale __author__ = 'Colour Developers' __copyrigh...
true
true
790e82c2ea74403dab86a5d801648ecbbfe778d3
9,663
py
Python
examples/VideoSpeedTest.py
3DAlgoLab/pyqtgraph
53bedea724b05b5fda158946907ab881935ca865
[ "MIT" ]
69
2020-01-06T13:31:06.000Z
2022-03-29T11:23:14.000Z
examples/VideoSpeedTest.py
tom00ti/pyqtgraph
6b4385ce0d0f9078aa22e2e27aa5307271e95ae1
[ "MIT" ]
67
2019-11-30T14:45:05.000Z
2022-03-14T20:26:06.000Z
examples/VideoSpeedTest.py
tom00ti/pyqtgraph
6b4385ce0d0f9078aa22e2e27aa5307271e95ae1
[ "MIT" ]
13
2020-01-06T13:44:40.000Z
2022-03-29T11:23:17.000Z
# -*- coding: utf-8 -*- """ Tests the speed of image updates for an ImageItem and RawImageWidget. The speed will generally depend on the type of data being shown, whether it is being scaled and/or converted by lookup table, and whether OpenGL is used by the view widget """ ## Add path to library (just for examples; yo...
32.21
214
0.651868
s np import pyqtgraph as pg import pyqtgraph.ptime as ptime from pyqtgraph.Qt import QtGui, QtCore, QT_LIB pg.setConfigOption('imageAxisOrder', 'row-major') import importlib ui_template = importlib.import_module(f'VideoTemplate_{QT_LIB.lower()}') try: import cupy as cp pg.setConfigOption("useCupy", True) ...
true
true
790e84ee7c77e55183385013de3fec12c64baa89
1,654
py
Python
desktop/core/ext-py/avro-1.7.6/setup.py
vinaymundada27/Hue
7bffb33bbe7cfa34d340241c4ba3b19476211b2a
[ "Apache-2.0" ]
11
2019-03-20T07:38:35.000Z
2021-06-18T09:42:46.000Z
desktop/core/ext-py/avro-1.7.6/setup.py
vinaymundada27/Hue
7bffb33bbe7cfa34d340241c4ba3b19476211b2a
[ "Apache-2.0" ]
null
null
null
desktop/core/ext-py/avro-1.7.6/setup.py
vinaymundada27/Hue
7bffb33bbe7cfa34d340241c4ba3b19476211b2a
[ "Apache-2.0" ]
5
2019-06-29T03:13:02.000Z
2020-04-23T04:47:11.000Z
#! /usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
33.08
74
0.724305
try: from setuptools import setup except ImportError: from distutils.core import setup from sys import version_info install_requires = [] if version_info[:2] <= (2, 5): install_requires.append('simplejson >= 2.0.9') setup( name = 'avro', version = '1.7.6', packages = ['avro',], packag...
true
true
790e85948a1fb20f8a06349df155398d71916fcb
2,958
py
Python
experimental/megno.py
LuisCerdenoMota/SHERLOCK
5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1
[ "MIT" ]
null
null
null
experimental/megno.py
LuisCerdenoMota/SHERLOCK
5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1
[ "MIT" ]
null
null
null
experimental/megno.py
LuisCerdenoMota/SHERLOCK
5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1
[ "MIT" ]
null
null
null
import rebound import numpy as np import matplotlib.pyplot as plt from IPython.display import display, clear_output from sherlockpipe.nbodies.PlanetInput import PlanetInput class StabilityCalculator: def __init__(self, star_mass): self.star_mass = star_mass def mass_from_radius(self, radius): ...
39.44
153
0.649763
import rebound import numpy as np import matplotlib.pyplot as plt from IPython.display import display, clear_output from sherlockpipe.nbodies.PlanetInput import PlanetInput class StabilityCalculator: def __init__(self, star_mass): self.star_mass = star_mass def mass_from_radius(self, radius): ...
true
true
790e860c5735e301a8b6ec577a6fc063d016ff82
503
py
Python
tests/openbb_terminal/cryptocurrency/defi/test_terraengineer_model.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
255
2022-03-29T16:43:51.000Z
2022-03-31T23:57:08.000Z
tests/openbb_terminal/cryptocurrency/defi/test_terraengineer_model.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
14
2022-03-29T14:20:33.000Z
2022-03-31T23:39:20.000Z
tests/openbb_terminal/cryptocurrency/defi/test_terraengineer_model.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
24
2022-03-29T15:28:56.000Z
2022-03-31T23:54:15.000Z
# IMPORTATION STANDARD # IMPORTATION THIRDPARTY import pytest # IMPORTATION INTERNAL from openbb_terminal.cryptocurrency.defi import terraengineer_model @pytest.mark.vcr @pytest.mark.parametrize( "asset,address", [("ust", "terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8")], ) def test_get_history_asset_from_te...
23.952381
72
0.771372
import pytest from openbb_terminal.cryptocurrency.defi import terraengineer_model @pytest.mark.vcr @pytest.mark.parametrize( "asset,address", [("ust", "terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8")], ) def test_get_history_asset_from_terra_address(asset, address, recorder): df = terraengineer_model....
true
true
790e86d135ee08aa433422ee85291f62d15dc188
2,125
py
Python
setup.py
mikiec84/gaffer
8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d
[ "MIT", "Unlicense" ]
null
null
null
setup.py
mikiec84/gaffer
8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d
[ "MIT", "Unlicense" ]
null
null
null
setup.py
mikiec84/gaffer
8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d
[ "MIT", "Unlicense" ]
1
2018-10-28T00:59:17.000Z
2018-10-28T00:59:17.000Z
# -*- coding: utf-8 - # # This file is part of gaffer. See the NOTICE for more information. import os import sys from setuptools import setup, find_packages, Extension py_version = sys.version_info[:2] if py_version < (2, 6): raise RuntimeError('On Python 2, Gaffer requires Python 2.6 or better') CLASSIFIERS ...
28.333333
75
0.6
import os import sys from setuptools import setup, find_packages, Extension py_version = sys.version_info[:2] if py_version < (2, 6): raise RuntimeError('On Python 2, Gaffer requires Python 2.6 or better') CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Inte...
true
true
790e86d5a57af29752f9e5f7c45064dda92d72f6
1,541
py
Python
scripts/mysql.py
harveywangdao/road
062f787ca69d72d5d997eb7a18d860485857ffe1
[ "Apache-2.0" ]
null
null
null
scripts/mysql.py
harveywangdao/road
062f787ca69d72d5d997eb7a18d860485857ffe1
[ "Apache-2.0" ]
null
null
null
scripts/mysql.py
harveywangdao/road
062f787ca69d72d5d997eb7a18d860485857ffe1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import pymysql db = pymysql.connect("localhost","root","123456","tboxdb" ) cursor = db.cursor() #create table cursor.execute("DROP TABLE IF EXISTS EMPLOYEE") sql = """CREATE TABLE EMPLOYEE ( FIRST_NAME CHAR(20) NOT NULL, LAST_NAME CHAR(20), AGE INT, ...
21.109589
67
0.53926
import pymysql db = pymysql.connect("localhost","root","123456","tboxdb" ) cursor = db.cursor() cursor.execute("DROP TABLE IF EXISTS EMPLOYEE") sql = """CREATE TABLE EMPLOYEE ( FIRST_NAME CHAR(20) NOT NULL, LAST_NAME CHAR(20), AGE INT, SEX CHAR(1), I...
true
true
790e8756114562099f0bcd94c6413c469f54eb86
1,499
py
Python
main.py
0xol/server-installer
e4f41c2e34bfb4bc2103d099820b4026c3ed3b23
[ "MIT" ]
null
null
null
main.py
0xol/server-installer
e4f41c2e34bfb4bc2103d099820b4026c3ed3b23
[ "MIT" ]
null
null
null
main.py
0xol/server-installer
e4f41c2e34bfb4bc2103d099820b4026c3ed3b23
[ "MIT" ]
null
null
null
from importlib.resources import path import sys import os import shutil from git import Repo from subprocess import call from git import RemoteProgress import git from tqdm import tqdm from pathlib import Path dir_path = (os.path.expanduser('~/Documents') + "\server") os.chdir(dir_path) gitaddress = str("https://gith...
28.283019
108
0.695797
from importlib.resources import path import sys import os import shutil from git import Repo from subprocess import call from git import RemoteProgress import git from tqdm import tqdm from pathlib import Path dir_path = (os.path.expanduser('~/Documents') + "\server") os.chdir(dir_path) gitaddress = str("https://gith...
true
true
790e87b572d17d593c5544de491af8b47ea1d36b
271
py
Python
Python/Dicionarios.py
Kauan677/Projetos-Python
62f6b476e6d250d9ff31c95808b31ebd3ab4fdbb
[ "MIT" ]
1
2022-03-03T23:19:57.000Z
2022-03-03T23:19:57.000Z
Python/Dicionarios.py
Kauan677/Projetos-Python
62f6b476e6d250d9ff31c95808b31ebd3ab4fdbb
[ "MIT" ]
null
null
null
Python/Dicionarios.py
Kauan677/Projetos-Python
62f6b476e6d250d9ff31c95808b31ebd3ab4fdbb
[ "MIT" ]
null
null
null
estado = dict() brasil = list() for c in range(0,3): estado['uf'] = str(input('Uf: ')) estado['sigla'] = str(input('Sigla: ')) brasil.append(estado.copy()) print(brasil) for e in brasil: for k, v in e.items(): print(f'O campo {k} tem valor {v}')
22.583333
43
0.571956
estado = dict() brasil = list() for c in range(0,3): estado['uf'] = str(input('Uf: ')) estado['sigla'] = str(input('Sigla: ')) brasil.append(estado.copy()) print(brasil) for e in brasil: for k, v in e.items(): print(f'O campo {k} tem valor {v}')
true
true
790e880e49a4aff05d076208bbe8350a414f060a
5,986
py
Python
analyzer/apisan/parse/sparser.py
oslab-swrc/apisan
9ff3d3bc04c8e119f4d659f03b38747395e58c3e
[ "MIT" ]
58
2016-08-27T03:19:14.000Z
2022-01-05T17:33:44.000Z
analyzer/apisan/parse/sparser.py
oslab-swrc/apisan
9ff3d3bc04c8e119f4d659f03b38747395e58c3e
[ "MIT" ]
14
2017-12-01T17:16:59.000Z
2020-12-21T12:16:35.000Z
analyzer/apisan/parse/sparser.py
oslab-swrc/apisan
9ff3d3bc04c8e119f4d659f03b38747395e58c3e
[ "MIT" ]
22
2016-11-27T09:53:31.000Z
2021-11-22T00:22:53.000Z
# SPDX-License-Identifier: MIT #!/usr/bin/env python3 import os import sys from ply import yacc from ply.lex import TOKEN from .slexer import SLexer from ..lib import dbg from .symbol import ( BinaryOperatorSymbol, ConstraintSymbol, FieldSymbol, ArraySymbol, CallSymbol, IDSymbol, ConcreteIntSymbol, StringLitera...
35.005848
109
0.538423
import os import sys from ply import yacc from ply.lex import TOKEN from .slexer import SLexer from ..lib import dbg from .symbol import ( BinaryOperatorSymbol, ConstraintSymbol, FieldSymbol, ArraySymbol, CallSymbol, IDSymbol, ConcreteIntSymbol, StringLiteralSymbol ) ROOT = os.path.dirname(__file__) sys.pat...
true
true
790e8836ca1d11ca7cd114e940447e0491a46db0
3,326
py
Python
test/test_all.py
icgrp/fpga-tool-perf
3b4f079fd13ffe89d5703bf3a995031ecf32b923
[ "0BSD" ]
48
2018-09-21T00:15:52.000Z
2021-12-15T03:06:19.000Z
test/test_all.py
icgrp/fpga-tool-perf
3b4f079fd13ffe89d5703bf3a995031ecf32b923
[ "0BSD" ]
243
2018-07-16T20:47:16.000Z
2022-01-10T21:43:13.000Z
test/test_all.py
icgrp/fpga-tool-perf
3b4f079fd13ffe89d5703bf3a995031ecf32b923
[ "0BSD" ]
21
2018-07-17T22:16:47.000Z
2022-03-28T10:37:13.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC import sys import os sys.path.append(os.getc...
27.94958
75
0.562538
import sys import os sys.path.append(os.getcwd() + "/..") import unittest import fpgaperf import re import random def def_devpack(toolchain): if 'radiant' in toolchain: device = 'up5k' package = 'uwg30' else: device = 'lp8k' package = 'cm81' re...
true
true
790e892bd198756436c17dbc6379a7f2d1957725
690
py
Python
chapter_07/06_larger_than_n.py
SergeHall/Tony-Gaddis-Python-4th
24e7c70fbd196ff531a5e4e7f6f5021c4b4177ba
[ "MIT" ]
2
2021-04-07T03:26:37.000Z
2021-07-26T07:38:49.000Z
chapter_07/06_larger_than_n.py
SergeHall/Tony-Gaddis-Python-4th
24e7c70fbd196ff531a5e4e7f6f5021c4b4177ba
[ "MIT" ]
null
null
null
chapter_07/06_larger_than_n.py
SergeHall/Tony-Gaddis-Python-4th
24e7c70fbd196ff531a5e4e7f6f5021c4b4177ba
[ "MIT" ]
null
null
null
# 6. Больше числа п. В программе напишите функцию, которая принимает два # аргумента: список и число п. Допустим, что список содержит числа. Функция # должна показать все числа в списке, которые больше п. import random def main(): list_num = [random.randint(0, 100) for i in range(20)] print(list_num) n = ...
28.75
80
0.650725
import random def main(): list_num = [random.randint(0, 100) for i in range(20)] print(list_num) n = int(input('entered n: ')) print("This is list " + str(check_n(list_num, n)) + " of numbers\nthat are " "greater than the number you provided ", n, ".", sep="") def check_n(list_num, n)...
true
true
790e8ae2cd5b0b00bd94352c58a976ddfef79142
901
py
Python
src/python/tests/resolver.py
djp952/prebuilt-libxml2
8f067d2965c964bf4ba35ad1c0a3f5c313a2fa0f
[ "AML" ]
2
2020-07-24T11:11:36.000Z
2022-03-17T13:33:59.000Z
src/python/tests/resolver.py
djp952/prebuilt-libxml2
8f067d2965c964bf4ba35ad1c0a3f5c313a2fa0f
[ "AML" ]
null
null
null
src/python/tests/resolver.py
djp952/prebuilt-libxml2
8f067d2965c964bf4ba35ad1c0a3f5c313a2fa0f
[ "AML" ]
3
2020-02-20T12:24:55.000Z
2021-03-19T08:41:48.000Z
#!/usr/bin/python -u import sys import libxml2 try: import StringIO str_io = StringIO.StringIO except: import io str_io = io.StringIO # Memory debug specific libxml2.debugMemory(1) def myResolver(URL, ID, ctxt): return(str_io("<foo/>")) libxml2.setEntityLoader(myResolver) doc =...
20.022222
61
0.627081
import sys import libxml2 try: import StringIO str_io = StringIO.StringIO except: import io str_io = io.StringIO libxml2.debugMemory(1) def myResolver(URL, ID, ctxt): return(str_io("<foo/>")) libxml2.setEntityLoader(myResolver) doc = libxml2.parseFile("doesnotexist.xml") root ...
true
true
790e8b6fc8974254edd28e3e3dde2a226e3a7184
452
py
Python
src/grepros/__main__.py
suurjaak/grepros
4e719252858b6895d2ee071fcf0c332a3a5dafaa
[ "BSD-3-Clause" ]
10
2021-11-05T12:43:21.000Z
2022-03-17T06:08:30.000Z
src/grepros/__main__.py
suurjaak/grepros
4e719252858b6895d2ee071fcf0c332a3a5dafaa
[ "BSD-3-Clause" ]
1
2022-03-01T09:19:53.000Z
2022-03-01T21:38:52.000Z
src/grepros/__main__.py
suurjaak/grepros
4e719252858b6895d2ee071fcf0c332a3a5dafaa
[ "BSD-3-Clause" ]
1
2022-01-24T23:46:00.000Z
2022-01-24T23:46:00.000Z
# -*- coding: utf-8 -*- """ Module entry point. ------------------------------------------------------------------------------ This file is part of grepros - grep for ROS bag files and live topics. Released under the BSD License. @author Erki Suurjaak @created 24.10.2021 @modified 02.11.2021 -------------...
25.111111
78
0.429204
from . import main if "__main__" == __name__: main.run()
true
true
790e8bf8c36c53b5716cc2c80f558b1aeef48bd5
1,183
py
Python
launch.py
brianjimenez/emol
b789b85b40a99247f008fb7cafa0d019d142cd3c
[ "MIT" ]
null
null
null
launch.py
brianjimenez/emol
b789b85b40a99247f008fb7cafa0d019d142cd3c
[ "MIT" ]
null
null
null
launch.py
brianjimenez/emol
b789b85b40a99247f008fb7cafa0d019d142cd3c
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Created on Apr 12, 2017 @author: Brian Jimenez-Garcia @contact: brian.jimenez@bsc.es ''' import sys import os if len(sys.argv[1:]) != 2: raise SystemExit("usage: %s pdb_file1 pdb_file2" % os.path.basename(sys.argv[0])) pdb_file1 = sys.argv[1] pdb_file2 = sys.argv[2] # Panda3D imports...
23.196078
85
0.715976
import sys import os if len(sys.argv[1:]) != 2: raise SystemExit("usage: %s pdb_file1 pdb_file2" % os.path.basename(sys.argv[0])) pdb_file1 = sys.argv[1] pdb_file2 = sys.argv[2] from pandac.PandaModules import loadPrcFileData from emol import EMol width = 1400 height = 900 loadPrcFileData("", "window-titl...
true
true
790e8c064a9b611e4e6bc404c4db08f867c93260
5,112
py
Python
python_anticaptcha/tasks.py
uguraba/python-anticaptcha
572e51fc60e768150429832c31e352e28d1a340c
[ "MIT" ]
null
null
null
python_anticaptcha/tasks.py
uguraba/python-anticaptcha
572e51fc60e768150429832c31e352e28d1a340c
[ "MIT" ]
null
null
null
python_anticaptcha/tasks.py
uguraba/python-anticaptcha
572e51fc60e768150429832c31e352e28d1a340c
[ "MIT" ]
null
null
null
import base64 from .fields import BaseField class BaseTask(object): def serialize(self, **result): return result class ProxyMixin(BaseTask): def __init__(self, *args, **kwargs): self.proxyType = kwargs.pop('proxy_type') self.userAgent = kwargs.pop('user_agent') self.proxyAddr...
31.555556
110
0.607981
import base64 from .fields import BaseField class BaseTask(object): def serialize(self, **result): return result class ProxyMixin(BaseTask): def __init__(self, *args, **kwargs): self.proxyType = kwargs.pop('proxy_type') self.userAgent = kwargs.pop('user_agent') self.proxyAddr...
true
true
790e8c366ce5a96106155346be664452de39c797
2,580
py
Python
tools/jsfy.py
floatinghotpot/ajax-local
dfbeb6e6aa21a3e6e4bd3f64badd655da3f9c0b3
[ "MIT" ]
1
2020-05-25T21:13:24.000Z
2020-05-25T21:13:24.000Z
tools/jsfy.py
floatinghotpot/ajax-local
dfbeb6e6aa21a3e6e4bd3f64badd655da3f9c0b3
[ "MIT" ]
null
null
null
tools/jsfy.py
floatinghotpot/ajax-local
dfbeb6e6aa21a3e6e4bd3f64badd655da3f9c0b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Convert *.json, *.csv and other text data files to js for local use and avoid ajax call. """ import optparse from os import listdir from os.path import abspath, isfile, isdir, join, splitext, basename import json; #curdir = os.path.abspath('.') curdir = "." filter_text_ext = [".json", ".csv"...
26.060606
95
0.584109
import optparse from os import listdir from os.path import abspath, isfile, isdir, join, splitext, basename import json; curdir = "." filter_text_ext = [".json", ".csv"] filter_binary_ext = [] def jsfy_file(path, basedir, fout): fname = basename(path) if(fname.startswith(".")): return if(...
true
true
790e8d2aa97f1835c89929924f4c62d04a7e13d2
2,655
py
Python
terminusdb_client/tests/mockResponse.py
pnijhara/terminusdb-client-python
bdc3480c21a6c1eb123abae1592e6a2b27b046c1
[ "Apache-2.0" ]
null
null
null
terminusdb_client/tests/mockResponse.py
pnijhara/terminusdb-client-python
bdc3480c21a6c1eb123abae1592e6a2b27b046c1
[ "Apache-2.0" ]
null
null
null
terminusdb_client/tests/mockResponse.py
pnijhara/terminusdb-client-python
bdc3480c21a6c1eb123abae1592e6a2b27b046c1
[ "Apache-2.0" ]
null
null
null
from terminusdb_client.woqlclient.api_endpoint_const import APIEndpointConst from .connectCapabilitiesResponse import ConnectResponse from .getSchemaTurtleResponse import RESPONSE def mocked_requests(*args, **kwargs): class MockResponse: def json(self): if self._json_data is None: ...
33.607595
94
0.616196
from terminusdb_client.woqlclient.api_endpoint_const import APIEndpointConst from .connectCapabilitiesResponse import ConnectResponse from .getSchemaTurtleResponse import RESPONSE def mocked_requests(*args, **kwargs): class MockResponse: def json(self): if self._json_data is None: ...
true
true
790e8d7c3fe7dfe74097a23bfce3009a1fdf6d41
3,076
py
Python
BeiKeZuFangSpider/settings.py
sunhailin-Leo/BeiKeZuFangSpider
2fe0a29b1f666b71379c1d357331b9badd8ccc3c
[ "MIT" ]
4
2018-09-18T00:33:12.000Z
2020-08-19T06:24:46.000Z
BeiKeZuFangSpider/settings.py
sunhailin-Leo/BeiKeZuFangSpider
2fe0a29b1f666b71379c1d357331b9badd8ccc3c
[ "MIT" ]
null
null
null
BeiKeZuFangSpider/settings.py
sunhailin-Leo/BeiKeZuFangSpider
2fe0a29b1f666b71379c1d357331b9badd8ccc3c
[ "MIT" ]
1
2018-10-09T09:19:39.000Z
2018-10-09T09:19:39.000Z
# -*- coding: utf-8 -*- BOT_NAME = 'BeiKeZuFangSpider' SPIDER_MODULES = ['BeiKeZuFangSpider.spiders'] NEWSPIDER_MODULE = 'BeiKeZuFangSpider.spiders' # Obey robots.txt rules ROBOTSTXT_OBEY = True # Configure maximum concurrent requests performed by Scrapy (default: 16) # CONCURRENT_REQUESTS = 32 # Configure a delay ...
32.041667
102
0.776983
BOT_NAME = 'BeiKeZuFangSpider' SPIDER_MODULES = ['BeiKeZuFangSpider.spiders'] NEWSPIDER_MODULE = 'BeiKeZuFangSpider.spiders' ROBOTSTXT_OBEY = True KA_IP_PORT = ["localhost:9092"] KAFKA_TOPIC_NAME = "BeiKeZuFang" MONGODB_HOST = "127.0.0.1" MONGODB_PORT = 27017 MONGODB_USER = "" MONGODB_PASS = "" MONGODB_DB_N...
true
true
790e8deb03af8d1cae7c0cfaed049b854206a7d8
833
py
Python
gscripts/expr_db/test_seqdb.py
YeoLab/gscripts
ae653d29d0ce82d342f7f6ff5bbeedd27a2e062b
[ "MIT" ]
12
2015-07-10T09:36:49.000Z
2021-07-06T03:25:04.000Z
gscripts/expr_db/test_seqdb.py
YeoLab/gscripts
ae653d29d0ce82d342f7f6ff5bbeedd27a2e062b
[ "MIT" ]
43
2015-01-21T20:01:38.000Z
2021-04-13T17:50:38.000Z
gscripts/expr_db/test_seqdb.py
YeoLab/gscripts
ae653d29d0ce82d342f7f6ff5bbeedd27a2e062b
[ "MIT" ]
19
2015-05-02T09:33:17.000Z
2022-02-12T17:08:06.000Z
import seq_db from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker engine = create_engine('mysql+pymysql://ppliu:some_pass@sauron.ucsd.edu/test') seq_db.Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) session = Session() """ try: s = seq_db.CLIPSeq() s.sample_name...
20.825
78
0.684274
import seq_db from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker engine = create_engine('mysql+pymysql://ppliu:some_pass@sauron.ucsd.edu/test') seq_db.Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) session = Session() """ try: s = seq_db.CLIPSeq() s.sample_name...
false
true
790e8deb9fc4d03f5d854f02dc6665b72ed2f535
1,154
py
Python
day03/binary_diagnostic.py
SimeonHristov99/aoc_2021
1925b4b967a4486e54714c3fe523f72a20707993
[ "MIT" ]
3
2021-12-03T17:12:33.000Z
2021-12-09T21:24:56.000Z
day03/binary_diagnostic.py
SimeonHristov99/aoc_2021
1925b4b967a4486e54714c3fe523f72a20707993
[ "MIT" ]
null
null
null
day03/binary_diagnostic.py
SimeonHristov99/aoc_2021
1925b4b967a4486e54714c3fe523f72a20707993
[ "MIT" ]
null
null
null
from collections import Counter def part1(lines): gamma = '' epsilon = '' num_bits = len(lines[0]) for i in range(num_bits): most_common = Counter(map(lambda x: x[i], lines)).most_common(1)[0][0] gamma += most_common epsilon += '0' if most_common == '1' else '1' return in...
24.553191
99
0.57539
from collections import Counter def part1(lines): gamma = '' epsilon = '' num_bits = len(lines[0]) for i in range(num_bits): most_common = Counter(map(lambda x: x[i], lines)).most_common(1)[0][0] gamma += most_common epsilon += '0' if most_common == '1' else '1' return in...
true
true
790e8ef5044f3c01c9f08e978e6f0c11248d9e9b
227
py
Python
src/utils.py
AntoineRondelet/SideChannelLeaksOverHTTPS
1035398effe2178c496a15b31579232cf2e3df29
[ "MIT" ]
3
2021-11-01T14:59:29.000Z
2022-03-09T20:06:03.000Z
src/utils.py
AntoineRondelet/SideChannelLeaksOverHTTPS
1035398effe2178c496a15b31579232cf2e3df29
[ "MIT" ]
2
2018-10-27T20:33:23.000Z
2018-11-08T18:48:02.000Z
src/utils.py
AntoineRondelet/SideChannelLeaksOverHTTPS
1035398effe2178c496a15b31579232cf2e3df29
[ "MIT" ]
1
2018-05-10T14:45:03.000Z
2018-05-10T14:45:03.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- class TrafficWeight: def __init__(self): self.request = 0 self.response = 0 class PacketInterval: def __init__(self): self.firstPacket = 0 self.lastPacket = 0
17.461538
24
0.651982
class TrafficWeight: def __init__(self): self.request = 0 self.response = 0 class PacketInterval: def __init__(self): self.firstPacket = 0 self.lastPacket = 0
true
true
790e8f171d56aa5ded6020675a1feb1bf06ffe59
736
py
Python
api/server.py
xu-hao/tx-router
3e94edc7b6341d68ea0cc0e68bfa0e787df45ae8
[ "MIT" ]
null
null
null
api/server.py
xu-hao/tx-router
3e94edc7b6341d68ea0cc0e68bfa0e787df45ae8
[ "MIT" ]
null
null
null
api/server.py
xu-hao/tx-router
3e94edc7b6341d68ea0cc0e68bfa0e787df45ae8
[ "MIT" ]
null
null
null
import connexion from flask_cors import CORS import api from flask import request import sys def create_app(): app = connexion.FlaskApp(__name__, specification_dir='openapi/') app.add_api('my_api.yaml') @app.app.route("/v1/plugin/<name>/<path:path>", methods=["GET", "POST"]) def plugin(name, path): ...
29.44
114
0.653533
import connexion from flask_cors import CORS import api from flask import request import sys def create_app(): app = connexion.FlaskApp(__name__, specification_dir='openapi/') app.add_api('my_api.yaml') @app.app.route("/v1/plugin/<name>/<path:path>", methods=["GET", "POST"]) def plugin(name, path): ...
true
true
790e9162d319d5f33ca3882cd3a109ca98c02965
2,706
py
Python
thor/orbits/ephemeris.py
B612-Asteroid-Institute/thor
d3d1dcbe86f67a62c90b4cde3fc577e414825cf2
[ "BSD-3-Clause" ]
null
null
null
thor/orbits/ephemeris.py
B612-Asteroid-Institute/thor
d3d1dcbe86f67a62c90b4cde3fc577e414825cf2
[ "BSD-3-Clause" ]
null
null
null
thor/orbits/ephemeris.py
B612-Asteroid-Institute/thor
d3d1dcbe86f67a62c90b4cde3fc577e414825cf2
[ "BSD-3-Clause" ]
null
null
null
import warnings import pandas as pd from ..config import Config from ..backend import Backend from ..backend import PYOORB from ..backend import FINDORB from ..backend import MJOLNIR __all__ = [ "generateEphemeris" ] def generateEphemeris( orbits, observers, backend="MJOLNIR", b...
31.103448
123
0.645233
import warnings import pandas as pd from ..config import Config from ..backend import Backend from ..backend import PYOORB from ..backend import FINDORB from ..backend import MJOLNIR __all__ = [ "generateEphemeris" ] def generateEphemeris( orbits, observers, backend="MJOLNIR", b...
true
true
790e919e7a4953bc91186ab386782cbf53a77711
3,831
py
Python
nerblackbox/modules/datasets/formatter/conll2003_formatter.py
af-ai-center/nerblackbox
a2b751d0b74c3f4779ccf3846e35d8575b488027
[ "Apache-2.0" ]
11
2020-09-24T12:10:52.000Z
2021-05-28T12:59:06.000Z
nerblackbox/modules/datasets/formatter/conll2003_formatter.py
af-ai-center/nerblackbox
a2b751d0b74c3f4779ccf3846e35d8575b488027
[ "Apache-2.0" ]
1
2020-07-03T13:13:35.000Z
2020-07-03T13:13:35.000Z
nerblackbox/modules/datasets/formatter/conll2003_formatter.py
af-ai-center/nerblackbox
a2b751d0b74c3f4779ccf3846e35d8575b488027
[ "Apache-2.0" ]
null
null
null
import os import requests from os.path import join, isfile from nerblackbox.modules.datasets.formatter.base_formatter import BaseFormatter class CoNLL2003Formatter(BaseFormatter): def __init__(self): ner_dataset = "conll2003" ner_tag_list = ["PER", "ORG", "LOC", "MISC"] super().__init__(n...
35.472222
120
0.456017
import os import requests from os.path import join, isfile from nerblackbox.modules.datasets.formatter.base_formatter import BaseFormatter class CoNLL2003Formatter(BaseFormatter): def __init__(self): ner_dataset = "conll2003" ner_tag_list = ["PER", "ORG", "LOC", "MISC"] super().__init__(n...
true
true
790e921990c3acd738f6bd67c36429795b03f0c4
13,727
py
Python
tests/test_speedify.py
meramsey/speedify-py
db3210f48a9234f20f28d29463934c061df2f9e0
[ "Apache-2.0" ]
23
2019-07-24T16:40:39.000Z
2022-02-09T22:49:42.000Z
tests/test_speedify.py
meramsey/speedify-py
db3210f48a9234f20f28d29463934c061df2f9e0
[ "Apache-2.0" ]
3
2019-08-08T18:32:56.000Z
2020-05-14T14:04:29.000Z
tests/test_speedify.py
meramsey/speedify-py
db3210f48a9234f20f28d29463934c061df2f9e0
[ "Apache-2.0" ]
9
2019-09-26T03:30:00.000Z
2022-03-13T04:38:22.000Z
import os import sys sys.path.append('../') import speedify from speedify import State, Priority, SpeedifyError, SpeedifyAPIError import speedifysettings import speedifyutil import logging import unittest import time logging.basicConfig(handlers=[logging.FileHandler('test.log'),logging.StreamHandler(sys.stdout)],forma...
44.280645
179
0.678298
import os import sys sys.path.append('../') import speedify from speedify import State, Priority, SpeedifyError, SpeedifyAPIError import speedifysettings import speedifyutil import logging import unittest import time logging.basicConfig(handlers=[logging.FileHandler('test.log'),logging.StreamHandler(sys.stdout)],forma...
true
true
790e92ef4e3361d6c911e119421f3766c2e32775
4,954
py
Python
atores.py
NTMaia/pythonbirds
1164fc08668dbbe976e68a1e88cee10a529a76f2
[ "MIT" ]
null
null
null
atores.py
NTMaia/pythonbirds
1164fc08668dbbe976e68a1e88cee10a529a76f2
[ "MIT" ]
null
null
null
atores.py
NTMaia/pythonbirds
1164fc08668dbbe976e68a1e88cee10a529a76f2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import math DESTRUIDO = 'Destruido' ATIVO = 'Ativo' GRAVIDADE = 10 # m/s^2 class Ator(): """ Classe que representa um ator. Ele representa um ponto cartesiano na tela. """ _caracter_ativo = 'A' _caracter_destruido = ' ' def _...
31.157233
118
0.648365
from __future__ import unicode_literals import math DESTRUIDO = 'Destruido' ATIVO = 'Ativo' GRAVIDADE = 10 class Ator(): _caracter_ativo = 'A' _caracter_destruido = ' ' def __init__(self, x=0, y=0): self.y = y self.x = x self.status = ATIVO def caracter(self): r...
true
true
790e93ff7de575f52fa099e1154b4823f74ba258
1,979
py
Python
brexit-word-freq/app.py
brittwitham/brexit-word-freq
943c9c83aee30d2866571a6b07ad1895a73c02de
[ "MIT" ]
null
null
null
brexit-word-freq/app.py
brittwitham/brexit-word-freq
943c9c83aee30d2866571a6b07ad1895a73c02de
[ "MIT" ]
null
null
null
brexit-word-freq/app.py
brittwitham/brexit-word-freq
943c9c83aee30d2866571a6b07ad1895a73c02de
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd import plotly.graph_objs as go from pymongo import MongoClient import json import os client = MongoClient(os.environ.get("DATABASE")) db = client.politics.brexit external_stylesheets = ['https://codepen.io/chriddy...
24.432099
96
0.547246
import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd import plotly.graph_objs as go from pymongo import MongoClient import json import os client = MongoClient(os.environ.get("DATABASE")) db = client.politics.brexit external_stylesheets = ['https://codepen.io/chriddy...
true
true
790e948e136eebbcfb3e21e22100eb690d57bcb7
106
py
Python
matfin/utils/utils.py
bailez/matfin
23c78534f8a6f414066ef7f916b7b3b6096edbae
[ "MIT" ]
2
2019-09-16T01:36:25.000Z
2020-10-29T01:21:28.000Z
matfin/utils/utils.py
bailez/matfin
23c78534f8a6f414066ef7f916b7b3b6096edbae
[ "MIT" ]
null
null
null
matfin/utils/utils.py
bailez/matfin
23c78534f8a6f414066ef7f916b7b3b6096edbae
[ "MIT" ]
null
null
null
class Errors: def __init__(self): pass def min_nonetype(self): pass
13.25
27
0.5
class Errors: def __init__(self): pass def min_nonetype(self): pass
true
true
790e9496b0319a06f10d52ec4a8bdf596b0d5dc3
1,543
py
Python
ykman/__init__.py
amake/yubikey-manager
ba049e1454a2435e4772b17fec88785a50373cf9
[ "BSD-2-Clause" ]
1
2020-03-16T14:57:15.000Z
2020-03-16T14:57:15.000Z
ykman/__init__.py
amake/yubikey-manager
ba049e1454a2435e4772b17fec88785a50373cf9
[ "BSD-2-Clause" ]
1
2018-05-07T07:34:23.000Z
2018-05-07T13:44:29.000Z
ykman/__init__.py
amake/yubikey-manager
ba049e1454a2435e4772b17fec88785a50373cf9
[ "BSD-2-Clause" ]
1
2019-07-15T05:36:41.000Z
2019-07-15T05:36:41.000Z
# Copyright (c) 2015 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
40.605263
71
0.755023
import os with open( os.path.join( os.path.dirname(__file__), 'VERSION')) as version_file: version = version_file.read().strip() __version__ = version
true
true
790e9517fc9e8f6c96158cd9c93faa4f3db7d729
3,878
py
Python
bughunter/action/assignment.py
ChrisTimperley/BugHunter
090201f491c50fff5a36507ea6861142570d18b9
[ "MIT" ]
4
2017-03-01T05:10:01.000Z
2021-12-14T15:18:01.000Z
bughunter/action/assignment.py
ChrisTimperley/BugCollector
090201f491c50fff5a36507ea6861142570d18b9
[ "MIT" ]
4
2016-10-16T22:57:17.000Z
2017-01-12T21:39:45.000Z
bughunter/action/assignment.py
ChrisTimperley/BugCollector
090201f491c50fff5a36507ea6861142570d18b9
[ "MIT" ]
null
null
null
from bughunter.action.core import * import cgum.statement class ModifyAssignment(ReplaceRepairAction): @staticmethod def from_json(jsn, before, after): return ReplaceRepairAction.from_json(ModifyAssignment, jsn, before, after) @staticmethod def detect(patch, stmts_bef, stmts_aft, actions): ...
35.254545
86
0.596699
from bughunter.action.core import * import cgum.statement class ModifyAssignment(ReplaceRepairAction): @staticmethod def from_json(jsn, before, after): return ReplaceRepairAction.from_json(ModifyAssignment, jsn, before, after) @staticmethod def detect(patch, stmts_bef, stmts_aft, actions): ...
true
true
790e9587e3df9644c7c62a69564b8c0ebdbbcc61
2,219
py
Python
src/oci/management_agent/models/work_submission_key.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/management_agent/models/work_submission_key.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/management_agent/models/work_submission_key.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
31.253521
245
0.68274
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class WorkSubmissionKey(object): def __init__(self, **kwargs): self.swagger_types = { 'work_submission_key'...
true
true
790e95a19404e1861d1cbab10c43fd2f4ffb6cdf
757
py
Python
inf.py
sensiblecodeio/inf
41473129125c9a1b3f6dbff0cd559369afb9fc51
[ "MIT" ]
null
null
null
inf.py
sensiblecodeio/inf
41473129125c9a1b3f6dbff0cd559369afb9fc51
[ "MIT" ]
null
null
null
inf.py
sensiblecodeio/inf
41473129125c9a1b3f6dbff0cd559369afb9fc51
[ "MIT" ]
null
null
null
from __future__ import division import sys class Inf(float): __name__ = __name__ __file__ = __file__ @staticmethod def div(p, q): """ ``p / q`` returning the correct infinity instead of raising ZeroDivisionError. """ from math import copysign if q !=...
22.939394
64
0.535007
from __future__ import division import sys class Inf(float): __name__ = __name__ __file__ = __file__ @staticmethod def div(p, q): from math import copysign if q != 0.0: return p / q elif p == 0.0: return p / q elif copysign(1, ...
true
true
790e96b4bc0d2d2c2326832011eac23cc98d5cf4
109,421
py
Python
code/exp/v18.py
okotaku/pet_finder
380e4f19172e06e92b5b752f59e2902efa6aee1f
[ "MIT" ]
34
2019-07-31T01:17:18.000Z
2020-11-15T20:01:30.000Z
code/exp/v18.py
okotaku/pet_finder
380e4f19172e06e92b5b752f59e2902efa6aee1f
[ "MIT" ]
null
null
null
code/exp/v18.py
okotaku/pet_finder
380e4f19172e06e92b5b752f59e2902efa6aee1f
[ "MIT" ]
6
2019-07-31T07:21:35.000Z
2021-05-21T12:46:06.000Z
# -*- coding: utf-8 -*- ''' feature: v1, 2, 3, 4, 10, 11 feature: v1, 2, 3, 4, 11, 13, 14, 17, 18, 19, 22, 23 model: v10 ''' import itertools import json import gc import glob import os import time import cv2 import re import nltk import torch import imagehash import lightgbm as lgb import xgboost as xgb import matplot...
45.611088
151
0.557434
import itertools import json import gc import glob import os import time import cv2 import re import nltk import torch import imagehash import lightgbm as lgb import xgboost as xgb import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns impo...
true
true
790e9709898353c8af26ad1da67d9d4d96aca8ee
8,625
py
Python
benchmarks/f3_wrong_hints_permutations/scaling_ltl_infinite_state/12-extending_bound_39.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints_permutations/scaling_ltl_infinite_state/12-extending_bound_39.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints_permutations/scaling_ltl_infinite_state/12-extending_bound_39.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_mak...
35.9375
89
0.628406
from typing import Tuple, FrozenSet from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_mak...
true
true
790e99ef4637384e27573a7942ddb1fd48d782cb
3,818
py
Python
segmentation_models_pytorch/decoders/unet/decoder.py
navivokaj/segmentation_models.pytorch
5dbb5f6733515097cecc93f078c09e59ccbeb0c0
[ "MIT" ]
null
null
null
segmentation_models_pytorch/decoders/unet/decoder.py
navivokaj/segmentation_models.pytorch
5dbb5f6733515097cecc93f078c09e59ccbeb0c0
[ "MIT" ]
null
null
null
segmentation_models_pytorch/decoders/unet/decoder.py
navivokaj/segmentation_models.pytorch
5dbb5f6733515097cecc93f078c09e59ccbeb0c0
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from segmentation_models_pytorch.base import modules as md class DecoderBlock(nn.Module): def __init__( self, in_channels, skip_channels, out_channels, use_batchnorm=True, attention_type=None, )...
30.790323
96
0.587742
import torch import torch.nn as nn import torch.nn.functional as F from segmentation_models_pytorch.base import modules as md class DecoderBlock(nn.Module): def __init__( self, in_channels, skip_channels, out_channels, use_batchnorm=True, attention_type=None, )...
true
true
790e9a4af6c3bbbfc20c0a4c4aa335a9fec0e5bf
8,290
py
Python
tsxv/splitTrainVal.py
DidierRLopes/timeseries-cv
8e9137c2774e92a6d7a80446e4022c27ca1b7991
[ "MIT" ]
14
2021-05-30T16:29:42.000Z
2022-03-16T01:59:18.000Z
tsxv/splitTrainVal.py
DidierRLopes/TimeSeriesCrossValidation
c886670ba0c8c347b12639ec4a6fb549457c1ef1
[ "MIT" ]
null
null
null
tsxv/splitTrainVal.py
DidierRLopes/TimeSeriesCrossValidation
c886670ba0c8c347b12639ec4a6fb549457c1ef1
[ "MIT" ]
6
2021-01-06T12:22:34.000Z
2021-04-20T08:05:33.000Z
""" Forward Chaining, K-Fold and Group K-Fold algorithms to split a given training dataset into train (X, y) and validation (Xcv, ycv) sets """ import numpy as np def split_train_val_forwardChaining(sequence, numInputs, numOutputs, numJumps): """ Returns sets to train and cross-validate a model using forward chai...
37.681818
135
0.563088
import numpy as np def split_train_val_forwardChaining(sequence, numInputs, numOutputs, numJumps): X, y, Xcv, ycv = dict(), dict(), dict(), dict() j=2; while 1: start_ix=0; end_ix=0; startCv_ix=0; endCv_ix=0; X_it, y_it, Xcv_it, ycv_it = list(), list(), list(), list() ...
true
true
790e9b280fc1a0afde58e16d883f1eb73f4659cd
427
py
Python
odoo-13.0/addons/account/wizard/account_unreconcile.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/account/wizard/account_unreconcile.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/account/wizard/account_unreconcile.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
from odoo import models, api class AccountUnreconcile(models.TransientModel): _name = "account.unreconcile" _description = "Account Unreconcile" def trans_unrec(self): context = dict(self._context or {}) if context.get('active_ids', False): self.env['account.move.line'].browse...
32.846154
99
0.686183
from odoo import models, api class AccountUnreconcile(models.TransientModel): _name = "account.unreconcile" _description = "Account Unreconcile" def trans_unrec(self): context = dict(self._context or {}) if context.get('active_ids', False): self.env['account.move.line'].browse...
true
true
790e9c64da11166eaae2b86fdf01c316b798e7d7
52,258
py
Python
Code/DataHandlers/GraphModels.py
aricsanders/pyMez3
13e2b9900af2287db0cc42a0190d31da165ce174
[ "Unlicense" ]
null
null
null
Code/DataHandlers/GraphModels.py
aricsanders/pyMez3
13e2b9900af2287db0cc42a0190d31da165ce174
[ "Unlicense" ]
null
null
null
Code/DataHandlers/GraphModels.py
aricsanders/pyMez3
13e2b9900af2287db0cc42a0190d31da165ce174
[ "Unlicense" ]
null
null
null
#----------------------------------------------------------------------------- # Name: GraphModels # Purpose: To store graphs used in network translations # Author: Aric Sanders # Created: 4/6/2016 # License: MIT License #--------------------------------------------------------------------------...
49.816969
136
0.603793
import re import datetime import sys import os sys.path.append(os.path.join(os.path.dirname( __file__ ), '..','..')) try: from Code.Utils.Alias import * METHOD_ALIASES=1 except: print("The module pyMez.Code.Utils.Alias was not found") METHOD_ALIASES=0 pass try: from Code.DataHandler...
true
true
790e9d08248243d5cb911b08285fe9dfe822d1f5
164
py
Python
ABC180/ABC180_B.py
consommee/AtCoder
9beccf6a1202ca48491b4fcf748aa3dba0f12fb3
[ "MIT" ]
null
null
null
ABC180/ABC180_B.py
consommee/AtCoder
9beccf6a1202ca48491b4fcf748aa3dba0f12fb3
[ "MIT" ]
null
null
null
ABC180/ABC180_B.py
consommee/AtCoder
9beccf6a1202ca48491b4fcf748aa3dba0f12fb3
[ "MIT" ]
null
null
null
import math n=int(input()) c=list(map(int, input().split())) print(sum([abs(i) for i in c])) print(math.sqrt(sum([i*i for i in c]))) print(max([abs(i) for i in c]))
27.333333
39
0.628049
import math n=int(input()) c=list(map(int, input().split())) print(sum([abs(i) for i in c])) print(math.sqrt(sum([i*i for i in c]))) print(max([abs(i) for i in c]))
true
true
790e9d26b2713e796f3d0ebb3b27759102676379
676
py
Python
emenuapi/menus/admin.py
dzbrozek/emenu-api
254b19a766b85caf51513541d3cdff06b97893f0
[ "MIT" ]
null
null
null
emenuapi/menus/admin.py
dzbrozek/emenu-api
254b19a766b85caf51513541d3cdff06b97893f0
[ "MIT" ]
5
2021-11-03T11:21:08.000Z
2021-11-04T09:22:00.000Z
emenuapi/menus/admin.py
dzbrozek/emenu-api
254b19a766b85caf51513541d3cdff06b97893f0
[ "MIT" ]
null
null
null
from django.contrib import admin from menus.models import Dish, Menu @admin.register(Menu) class MenuAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'description', 'created', 'updated') search_fields = ('id', 'name', 'description') list_filter = ('created', 'updated') raw_id_fields = ('dishes',...
25.037037
70
0.606509
from django.contrib import admin from menus.models import Dish, Menu @admin.register(Menu) class MenuAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'description', 'created', 'updated') search_fields = ('id', 'name', 'description') list_filter = ('created', 'updated') raw_id_fields = ('dishes',...
true
true
790e9d785e220fab436da36b2f2ad86449371f35
826
py
Python
tests/svm/conftest.py
mdietrichstein/skpredict
f15416b61f5fc2693b4c85c690d664fbbb008f8b
[ "BSD-3-Clause" ]
null
null
null
tests/svm/conftest.py
mdietrichstein/skpredict
f15416b61f5fc2693b4c85c690d664fbbb008f8b
[ "BSD-3-Clause" ]
null
null
null
tests/svm/conftest.py
mdietrichstein/skpredict
f15416b61f5fc2693b4c85c690d664fbbb008f8b
[ "BSD-3-Clause" ]
null
null
null
import pytest import pandas as pd from sklearn.model_selection import train_test_split TEST_SIZE = 0.33 RANDOM_STATE = 42 @pytest.fixture(scope="module") def binary_dataset(): df = pd.read_csv("./resources/heart.csv") features = df.iloc[0:, :-1] labels = df.iloc[0:, -1].values.ravel() X_train, X_tes...
25.030303
72
0.691283
import pytest import pandas as pd from sklearn.model_selection import train_test_split TEST_SIZE = 0.33 RANDOM_STATE = 42 @pytest.fixture(scope="module") def binary_dataset(): df = pd.read_csv("./resources/heart.csv") features = df.iloc[0:, :-1] labels = df.iloc[0:, -1].values.ravel() X_train, X_tes...
true
true
790e9dde65c2a90c47b9735b4bffaba61bbd081d
2,508
py
Python
nas/random.py
francotheengineer/autokeras
d873aa41226b958004c3ff1e5694912b9fad10e1
[ "MIT" ]
1
2019-01-14T11:19:06.000Z
2019-01-14T11:19:06.000Z
nas/random.py
dspshin/autokeras
eac91bad8a90f78a68933992cc1ff4b7df4ee30f
[ "MIT" ]
1
2018-12-09T16:46:30.000Z
2018-12-09T16:46:30.000Z
nas/random.py
dspshin/autokeras
eac91bad8a90f78a68933992cc1ff4b7df4ee30f
[ "MIT" ]
2
2018-11-12T19:43:31.000Z
2018-11-26T08:14:32.000Z
from random import randrange from autokeras.bayesian import SearchTree, contain from autokeras.net_transformer import transform from autokeras.search import Searcher class RandomSearcher(Searcher): """ Class to search for neural architectures using Random search strategy. Attributes: search_tree: The...
40.451613
98
0.631978
from random import randrange from autokeras.bayesian import SearchTree, contain from autokeras.net_transformer import transform from autokeras.search import Searcher class RandomSearcher(Searcher): def __init__(self, n_output_node, input_shape, path, metric, loss, generators, verbose, trainer_a...
true
true
790e9df6891454e24bcccf46d1e898f0a5c15df8
4,576
py
Python
venv/Lib/site-packages/PySide2/examples/network/fortuneserver.py
Farhan-Malik/advance-hand-gesture
0ebe21ddd7c8c2eb14746678be57b33d38c47205
[ "MIT" ]
41
2021-06-19T13:57:18.000Z
2021-12-02T17:08:53.000Z
venv/Lib/site-packages/PySide2/examples/network/fortuneserver.py
Farhan-Malik/advance-hand-gesture
0ebe21ddd7c8c2eb14746678be57b33d38c47205
[ "MIT" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
venvWIN/Lib/site-packages/PySide2/examples/network/fortuneserver.py
NeroNekro/PortableController
a8bbfc1b6c8cb2c919e48eb0104e42f436059b18
[ "BSD-3-Clause" ]
4
2021-07-02T03:09:51.000Z
2021-11-25T13:00:10.000Z
############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the Qt for Python examples of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:BSD$ ## ...
38.779661
85
0.664773
true
true
790ea13f67ed1a18d97bb62e80020f3ad78486f0
67
py
Python
kiberdrom_core/util/__init__.py
IlyaDanilenko/kiberdrom_core
c3050cdb7cbc22adc06f454bdafc081051511f04
[ "MIT" ]
null
null
null
kiberdrom_core/util/__init__.py
IlyaDanilenko/kiberdrom_core
c3050cdb7cbc22adc06f454bdafc081051511f04
[ "MIT" ]
null
null
null
kiberdrom_core/util/__init__.py
IlyaDanilenko/kiberdrom_core
c3050cdb7cbc22adc06f454bdafc081051511f04
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .core import *
16.75
23
0.597015
from .core import *
true
true
790ea1f994a4f821a2a9cb2614f6ae899533df2a
238
py
Python
app/meetings/api/urls.py
kaizumaki/owaranai-meter
aa4703f84116c9d6bac558f301de2389c9175fdf
[ "MIT" ]
5
2021-02-04T14:16:12.000Z
2021-02-19T12:36:50.000Z
app/meetings/api/urls.py
kaizumaki/owaranai-meter
aa4703f84116c9d6bac558f301de2389c9175fdf
[ "MIT" ]
27
2021-02-11T04:49:39.000Z
2021-08-22T07:34:39.000Z
app/meetings/api/urls.py
kaizumaki/owaranai-meter
aa4703f84116c9d6bac558f301de2389c9175fdf
[ "MIT" ]
6
2021-02-04T14:16:28.000Z
2021-02-27T07:14:38.000Z
from django.urls import path from meetings.api.views import (MeetingViewset) from rest_framework import routers router = routers.DefaultRouter(trailing_slash='/?') router.register('meetings', MeetingViewset) urlpatterns = router.urls
21.636364
51
0.806723
from django.urls import path from meetings.api.views import (MeetingViewset) from rest_framework import routers router = routers.DefaultRouter(trailing_slash='/?') router.register('meetings', MeetingViewset) urlpatterns = router.urls
true
true
790ea2b9e02aa9a2a694c78097804ebfd6e268da
1,865
py
Python
fm/handlers/alarm/segment.py
sbworth/getnoc
a9a5647df31822062db3db7afe7ae1c005d166f7
[ "BSD-3-Clause" ]
null
null
null
fm/handlers/alarm/segment.py
sbworth/getnoc
a9a5647df31822062db3db7afe7ae1c005d166f7
[ "BSD-3-Clause" ]
null
null
null
fm/handlers/alarm/segment.py
sbworth/getnoc
a9a5647df31822062db3db7afe7ae1c005d166f7
[ "BSD-3-Clause" ]
null
null
null
# --------------------------------------------------------------------- # Segment handlers # --------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # Python modules...
30.57377
85
0.576408
import logging from noc.sa.models.managedobject import ManagedObject from noc.fm.models.activealarm import ActiveAlarm logger = logging.getLogger(__name__) def set_segment_redundancy(alarm): if alarm.root: return mo = alarm.managed_object seg = mo.segment if seg.is_redundant and n...
true
true
790ea2f0afdb0edf9afd302ebc5965f9803c5d23
431
py
Python
pygin/example_games/Balance/animations/particle_fade_animation.py
CarlosMatheus/Engine
1467a919ad4489d0d4cb041b5f02aa67c6be6664
[ "MIT" ]
22
2018-12-29T16:31:19.000Z
2022-03-07T13:12:40.000Z
pygin/example_games/Balance/animations/particle_fade_animation.py
CarlosMatheus/Engine
1467a919ad4489d0d4cb041b5f02aa67c6be6664
[ "MIT" ]
3
2018-08-14T14:45:40.000Z
2020-01-22T08:03:27.000Z
pygin/example_games/Balance/animations/particle_fade_animation.py
CarlosMatheus/Engine
1467a919ad4489d0d4cb041b5f02aa67c6be6664
[ "MIT" ]
6
2018-05-29T20:02:02.000Z
2021-11-13T19:35:23.000Z
from pygin.components.animation import Animation from pygin.key_frame import KeyFrame class ParticleFadeAnimation(Animation): def __init__(self, game_obj, duration): key_frame_list = list() key_frame_list.append(KeyFrame(0.0, alpha=255, interpolation="in_cubic")) key_frame_list.append(Key...
35.916667
84
0.74942
from pygin.components.animation import Animation from pygin.key_frame import KeyFrame class ParticleFadeAnimation(Animation): def __init__(self, game_obj, duration): key_frame_list = list() key_frame_list.append(KeyFrame(0.0, alpha=255, interpolation="in_cubic")) key_frame_list.append(Key...
true
true
790ea45467f095c2a73dc3570997da10933b765e
5,584
py
Python
XIO/plugins/minicbf_interpreter.py
jsburg/xdsme
3fc9ed185ab78e1a42306edf24e681981eacd221
[ "BSD-3-Clause" ]
null
null
null
XIO/plugins/minicbf_interpreter.py
jsburg/xdsme
3fc9ed185ab78e1a42306edf24e681981eacd221
[ "BSD-3-Clause" ]
null
null
null
XIO/plugins/minicbf_interpreter.py
jsburg/xdsme
3fc9ed185ab78e1a42306edf24e681981eacd221
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ XIO plugin for the minicbf format of images (DECTRIS-PILATUS). """ __version__ = "0.2.1" __author__ = "Pierre Legrand (pierre.legrand@synchrotron-soleil.fr)" __date__ = "23-09-2012" __copyright__ = "Copyright (c) 2009-2012 Pierre Legrand" __license__ = "New BSD, http://www.opensource.org/l...
40.172662
103
0.566082
__version__ = "0.2.1" __author__ = "Pierre Legrand (pierre.legrand@synchrotron-soleil.fr)" __date__ = "23-09-2012" __copyright__ = "Copyright (c) 2009-2012 Pierre Legrand" __license__ = "New BSD, http://www.opensource.org/licenses/bsd-license.php" import time HEADER_KEYS = ["Detector:", "Pixel_size", "Silicon", "E...
true
true
790ea6506d8614ffad99579c37d058bcd8d9722b
317
py
Python
.history/forms_20200723155707.py
rkustas/taskmanager
3218b277a235c4e8d30b1d548ba28be3ab3f628f
[ "MIT" ]
null
null
null
.history/forms_20200723155707.py
rkustas/taskmanager
3218b277a235c4e8d30b1d548ba28be3ab3f628f
[ "MIT" ]
null
null
null
.history/forms_20200723155707.py
rkustas/taskmanager
3218b277a235c4e8d30b1d548ba28be3ab3f628f
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField,SubmitField from wtforms.validators import DataRequired class AddTaskForm(FlaskForm): title = StringField('Title', validators=[DataRequired()]) submit = SubmitField('Submit') class DeleteTaskForm(FlaskForm): submit = SubmitField('Delete')
28.818182
61
0.782334
from flask_wtf import FlaskForm from wtforms import StringField,SubmitField from wtforms.validators import DataRequired class AddTaskForm(FlaskForm): title = StringField('Title', validators=[DataRequired()]) submit = SubmitField('Submit') class DeleteTaskForm(FlaskForm): submit = SubmitField('Delete')
true
true
790ea6bb9863f0bd94d14860ef19c6de8ed43f80
11,246
py
Python
python/lib/socket.py
cschutijser/scion
054cef53b31a577ed224a090d6a4fd3883fd520b
[ "Apache-2.0" ]
null
null
null
python/lib/socket.py
cschutijser/scion
054cef53b31a577ed224a090d6a4fd3883fd520b
[ "Apache-2.0" ]
1
2020-03-20T01:28:56.000Z
2020-03-20T01:28:56.000Z
python/lib/socket.py
cschutijser/scion
054cef53b31a577ed224a090d6a4fd3883fd520b
[ "Apache-2.0" ]
2
2020-03-14T16:03:27.000Z
2020-03-18T08:13:19.000Z
# Copyright 2015 ETH Zurich # # 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, sof...
31.066298
82
0.577983
import logging import os import selectors import struct from abc import abstractmethod from errno import EHOSTUNREACH, ENETUNREACH from socket import ( AF_INET, AF_INET6, AF_UNIX, MSG_DONTWAIT, SOCK_DGRAM, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR, socket, ) from external...
true
true
790ea96619f499aab56bb208e4e3fd11df4af6bc
2,178
py
Python
frameworks/schema_dataclasses.py
mtag-dev/py-rest-stress-testing
37bd95575aa264734a980cef6b1a4506fdc24eb8
[ "MIT" ]
1
2021-12-06T09:49:21.000Z
2021-12-06T09:49:21.000Z
frameworks/schema_dataclasses.py
mtag-dev/py-rest-stress-testing
37bd95575aa264734a980cef6b1a4506fdc24eb8
[ "MIT" ]
42
2021-11-03T13:48:00.000Z
2022-03-28T17:15:26.000Z
frameworks/schema_dataclasses.py
mtag-dev/py-rest-stress-testing
37bd95575aa264734a980cef6b1a4506fdc24eb8
[ "MIT" ]
null
null
null
from typing import List, Optional, Union from dataclasses import dataclass, field ## - - - - - - - ## userinfo.json ## - - - - - - - @dataclass class UserAddress: formatted: str = "" @dataclass class UserInfoResponse: group_ids: List[str] = field(default_factory=list) sub: str = "" given_name: str ...
16.253731
71
0.636823
from typing import List, Optional, Union from dataclasses import dataclass, field ted: str = "" @dataclass class UserInfoResponse: group_ids: List[str] = field(default_factory=list) sub: str = "" given_name: str = "" name: str = "" email: str = "" phone_number: Optional[str] = None addres...
true
true
790ea9ff4c7d70fb8c547b4ddb51f8931cc0d2ff
8,820
py
Python
configurable_control_gym/envs/cartpole.py
takuseno/configurable-control-gym
9837e6c03c5a7fe6711b32dc70fe5e432e7d96c3
[ "MIT" ]
2
2020-08-03T12:49:13.000Z
2021-07-26T22:43:08.000Z
configurable_control_gym/envs/cartpole.py
takuseno/configurable-control-gym
9837e6c03c5a7fe6711b32dc70fe5e432e7d96c3
[ "MIT" ]
null
null
null
configurable_control_gym/envs/cartpole.py
takuseno/configurable-control-gym
9837e6c03c5a7fe6711b32dc70fe5e432e7d96c3
[ "MIT" ]
1
2021-07-23T11:05:10.000Z
2021-07-23T11:05:10.000Z
import math import gym from gym import spaces, logger from gym.utils import seeding import numpy as np class CartPoleEnv(gym.Env): """ Description: A pole is attached by an un-actuated joint to a cart, which moves along a frictionless track. The pendulum starts upright, and the goal is to prevent it fr...
39.72973
245
0.593424
import math import gym from gym import spaces, logger from gym.utils import seeding import numpy as np class CartPoleEnv(gym.Env): metadata = { 'render.modes': ['human', 'rgb_array'], 'video.frames_per_second' : 50 } def __init__(self, force=10.0, length=0.5, mass=0.1): self.g...
true
true
790eaa491884e40dcd87e04684adcaa3a65828c5
1,313
py
Python
enex2notion/cli_notion.py
vzhd1701/enex2notion
d9e0811af6f2c779caf1328c6daa0d6f81290fb3
[ "MIT" ]
49
2021-12-12T04:13:24.000Z
2022-03-31T12:58:57.000Z
enex2notion/cli_notion.py
vzhd1701/enex2notion
d9e0811af6f2c779caf1328c6daa0d6f81290fb3
[ "MIT" ]
11
2021-12-03T10:49:54.000Z
2022-03-29T20:00:30.000Z
enex2notion/cli_notion.py
vzhd1701/enex2notion
d9e0811af6f2c779caf1328c6daa0d6f81290fb3
[ "MIT" ]
3
2022-02-04T13:25:21.000Z
2022-03-07T17:54:36.000Z
import logging import sys from notion.block import PageBlock from notion.client import NotionClient from requests import HTTPError, codes from enex2notion.utils_exceptions import BadTokenException logger = logging.getLogger(__name__) def get_root(token, name): if not token: logger.warning( ...
25.25
82
0.665651
import logging import sys from notion.block import PageBlock from notion.client import NotionClient from requests import HTTPError, codes from enex2notion.utils_exceptions import BadTokenException logger = logging.getLogger(__name__) def get_root(token, name): if not token: logger.warning( ...
true
true
790eaaa759816e509f3f5f24589e258cfc969ee9
346
py
Python
sb3_contrib/__init__.py
cyprienc/stable-baselines3-contrib
342fe531bfa5af13a15099f16fbc71feceb5ba1e
[ "MIT" ]
null
null
null
sb3_contrib/__init__.py
cyprienc/stable-baselines3-contrib
342fe531bfa5af13a15099f16fbc71feceb5ba1e
[ "MIT" ]
null
null
null
sb3_contrib/__init__.py
cyprienc/stable-baselines3-contrib
342fe531bfa5af13a15099f16fbc71feceb5ba1e
[ "MIT" ]
null
null
null
import os from sb3_contrib.ppo_mask import MaskablePPO from sb3_contrib.qrdqn import QRDQN from sb3_contrib.tqc import TQC from sb3_contrib.trpo import TRPO # Read version from file version_file = os.path.join(os.path.dirname(__file__), "version.txt") with open(version_file, "r") as file_handler: __version__ = fi...
28.833333
69
0.791908
import os from sb3_contrib.ppo_mask import MaskablePPO from sb3_contrib.qrdqn import QRDQN from sb3_contrib.tqc import TQC from sb3_contrib.trpo import TRPO version_file = os.path.join(os.path.dirname(__file__), "version.txt") with open(version_file, "r") as file_handler: __version__ = file_handler.read().strip(...
true
true
790eab206fb124c88e97a56d4b9422cf52199180
2,380
py
Python
keras_metrics/__init__.py
netrack/keras-metrics
daed203c31b6dfecaef1b8344accf7494cb7e78d
[ "MIT" ]
180
2018-06-03T06:37:42.000Z
2021-05-24T05:36:58.000Z
AIDeveloper/keras_metrics/__init__.py
maikherbig/AIDeveloper
34d03cc6953680255fb0d2d0406331e70b7eaa50
[ "BSD-3-Clause" ]
51
2020-01-13T07:54:13.000Z
2022-03-17T09:11:56.000Z
keras_metrics/__init__.py
netrack/keras-metrics
daed203c31b6dfecaef1b8344accf7494cb7e78d
[ "MIT" ]
33
2018-06-21T09:18:43.000Z
2020-02-28T16:56:26.000Z
from functools import partial from keras_metrics import metrics as m from keras_metrics import casts __version__ = "1.2.1" def metric_fn(cls, cast_strategy): def fn(label=0, **kwargs): metric = cls(label=label, cast_strategy=cast_strategy, **kwargs) metric.__name__ = "%s_%s" % (cast_strategy.__n...
35.522388
79
0.843697
from functools import partial from keras_metrics import metrics as m from keras_metrics import casts __version__ = "1.2.1" def metric_fn(cls, cast_strategy): def fn(label=0, **kwargs): metric = cls(label=label, cast_strategy=cast_strategy, **kwargs) metric.__name__ = "%s_%s" % (cast_strategy.__n...
true
true
790eab2aab0f40b91977170e40f32fa3aa393bda
2,623
bzl
Python
lib/private/yq.bzl
alexeagle/bazel-lib
02be4c5f47b476e686943f53ddd47a672a51a265
[ "Apache-2.0" ]
null
null
null
lib/private/yq.bzl
alexeagle/bazel-lib
02be4c5f47b476e686943f53ddd47a672a51a265
[ "Apache-2.0" ]
null
null
null
lib/private/yq.bzl
alexeagle/bazel-lib
02be4c5f47b476e686943f53ddd47a672a51a265
[ "Apache-2.0" ]
null
null
null
"""Implementation for yq rule""" _yq_attrs = { "srcs": attr.label_list( allow_files = [".yaml", ".json", ".xml"], mandatory = True, allow_empty = True, ), "expression": attr.string(mandatory = False), "args": attr.string_list(), "outs": attr.output_list(mandatory = True), } ...
37.471429
168
0.617995
_yq_attrs = { "srcs": attr.label_list( allow_files = [".yaml", ".json", ".xml"], mandatory = True, allow_empty = True, ), "expression": attr.string(mandatory = False), "args": attr.string_list(), "outs": attr.output_list(mandatory = True), } def is_split_operation(args): ...
true
true
790eabb2766051a446539a216425ba5de2c4af11
8,788
py
Python
2021/changeLineWidth.py
zhangjq933/HowtoSim_Script
d958cc6cc743106e8f6ddf58dead6551a8ac7784
[ "MIT" ]
79
2019-04-01T04:35:01.000Z
2022-03-30T10:59:32.000Z
2021/changeLineWidth.py
raflzhang/HowtoSim_Script
90fb8cca87d47d2c45b8ff5d07a35e8a6c846685
[ "MIT" ]
1
2020-03-29T20:52:06.000Z
2020-03-30T05:35:30.000Z
2021/changeLineWidth.py
raflzhang/HowtoSim_Script
90fb8cca87d47d2c45b8ff5d07a35e8a6c846685
[ "MIT" ]
73
2019-05-07T10:26:53.000Z
2022-03-24T02:25:08.000Z
# coding=utf-8 import os, clr os.chdir(os.path.dirname(__file__)) clr.AddReference('System.Drawing') clr.AddReference('System.Windows.Forms') from System import Drawing, Array, ComponentModel, Diagnostics, IO from System.Windows import Forms import System.Object as object import System.String as string from ...
38.375546
128
0.600819
import os, clr os.chdir(os.path.dirname(__file__)) clr.AddReference('System.Drawing') clr.AddReference('System.Windows.Forms') from System import Drawing, Array, ComponentModel, Diagnostics, IO from System.Windows import Forms import System.Object as object import System.String as string from System.Windows....
true
true
790ead42dcb15afcce656866dd10d5b70d4fa931
634
py
Python
rdd/nasaApacheWebLogs/UnionLogSolutions.py
shubozhang/pyspark-tutorial
244f69bc75ad4238a00151dc7802bbb63e6f35e1
[ "MIT" ]
null
null
null
rdd/nasaApacheWebLogs/UnionLogSolutions.py
shubozhang/pyspark-tutorial
244f69bc75ad4238a00151dc7802bbb63e6f35e1
[ "MIT" ]
null
null
null
rdd/nasaApacheWebLogs/UnionLogSolutions.py
shubozhang/pyspark-tutorial
244f69bc75ad4238a00151dc7802bbb63e6f35e1
[ "MIT" ]
null
null
null
from pyspark import SparkContext, SparkConf def isNotHeader(line: str): return not (line.startswith("host") and "bytes" in line) if __name__ == "__main__": conf = SparkConf().setAppName("unionLogs").setMaster("local[*]") sc = SparkContext(conf = conf) julyFirstLogs = sc.textFile("in/nasa_19950701.tsv...
31.7
73
0.733438
from pyspark import SparkContext, SparkConf def isNotHeader(line: str): return not (line.startswith("host") and "bytes" in line) if __name__ == "__main__": conf = SparkConf().setAppName("unionLogs").setMaster("local[*]") sc = SparkContext(conf = conf) julyFirstLogs = sc.textFile("in/nasa_19950701.tsv...
true
true
790ead91c052011dccbb2364857a6b2b2af82a03
4,202
py
Python
cishouseholds/pyspark_utils.py
ONS-SST/cis_households
e475df5929e6763a46cd05aff1f7e960ccbe8e21
[ "MIT" ]
null
null
null
cishouseholds/pyspark_utils.py
ONS-SST/cis_households
e475df5929e6763a46cd05aff1f7e960ccbe8e21
[ "MIT" ]
252
2021-05-19T11:12:43.000Z
2022-03-02T10:39:10.000Z
cishouseholds/pyspark_utils.py
ONS-SST/cis_households
e475df5929e6763a46cd05aff1f7e960ccbe8e21
[ "MIT" ]
null
null
null
from typing import Any from typing import Mapping from pandas.core.frame import DataFrame from pyspark.sql import SparkSession from pyspark.sql.types import StructType from cishouseholds.pipeline.config import get_config sessions = { "s": ( SparkSession.builder.config("spark.executor.memory", "1g") ...
39.271028
90
0.6604
from typing import Any from typing import Mapping from pandas.core.frame import DataFrame from pyspark.sql import SparkSession from pyspark.sql.types import StructType from cishouseholds.pipeline.config import get_config sessions = { "s": ( SparkSession.builder.config("spark.executor.memory", "1g") ...
true
true
790eafa18e5a22240a98a743b38eb3a53048bc2a
839
py
Python
models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/PyTorch/pt_personreid-res18_market1501_176_80_1.1G_1.3/code/network/__init__.py
guochunhe/Vitis-AI
e86b6efae11f8703ee647e4a99004dc980b84989
[ "Apache-2.0" ]
1
2020-12-18T14:49:19.000Z
2020-12-18T14:49:19.000Z
models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/PyTorch/pt_personreid-res50_market1501_256_128_5.4G_1.3/code/network/__init__.py
guochunhe/Vitis-AI
e86b6efae11f8703ee647e4a99004dc980b84989
[ "Apache-2.0" ]
null
null
null
models/AI-Model-Zoo/VAI-1.3-Model-Zoo-Code/PyTorch/pt_personreid-res50_market1501_256_128_5.4G_1.3/code/network/__init__.py
guochunhe/Vitis-AI
e86b6efae11f8703ee647e4a99004dc980b84989
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
28.931034
74
0.771156
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .baseline import Baseline
true
true
790eb016ed428bf6f36cf13323eb606f36352516
8,815
py
Python
assignments/2021/assignment1/cs231n/classifiers/k_nearest_neighbor.py
Michellemingxuan/stanford_cs231n
b1d0a5a4a3b2fe5d685e34a4ebd810cbc56ec143
[ "MIT" ]
null
null
null
assignments/2021/assignment1/cs231n/classifiers/k_nearest_neighbor.py
Michellemingxuan/stanford_cs231n
b1d0a5a4a3b2fe5d685e34a4ebd810cbc56ec143
[ "MIT" ]
null
null
null
assignments/2021/assignment1/cs231n/classifiers/k_nearest_neighbor.py
Michellemingxuan/stanford_cs231n
b1d0a5a4a3b2fe5d685e34a4ebd810cbc56ec143
[ "MIT" ]
null
null
null
from builtins import range from builtins import object import numpy as np from past.builtins import xrange class KNearestNeighbor(object): """ a kNN classifier with L2 distance """ def __init__(self): pass def train(self, X, y): """ Train the classifier. For k-nearest neighbors t...
47.392473
112
0.473511
from builtins import range from builtins import object import numpy as np from past.builtins import xrange class KNearestNeighbor(object): def __init__(self): pass def train(self, X, y): self.X_train = X self.y_train = y def predict(self, X, k=1, num_loops=0): if num_loo...
true
true
790eb0595d544aed4675acfaf8ae9eb4be14a58f
526
py
Python
Algorithm/coding_interviews/Python/sword-for-offer/57_find_num_with_sum.py
ck76/awesome-cs
48cba4081dc5290f07e305850b9a3a7e8a590b64
[ "Apache-2.0" ]
1
2021-11-16T13:37:41.000Z
2021-11-16T13:37:41.000Z
Algorithm/coding_interviews/Python/sword-for-offer/57_find_num_with_sum.py
ck76/awesome-cs
48cba4081dc5290f07e305850b9a3a7e8a590b64
[ "Apache-2.0" ]
null
null
null
Algorithm/coding_interviews/Python/sword-for-offer/57_find_num_with_sum.py
ck76/awesome-cs
48cba4081dc5290f07e305850b9a3a7e8a590b64
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python3 # -*- coding: utf-8 -*- # @Time : 2019/3/10 7:44 PM # @Author : xiaoliji # @Email : yutian9527@gmail.com """ 找出和为s的数字。 >>> nums = [1, 2, 4, 7, 11, 15] >>> FindNumbersWithSum(nums, 15) (4, 11) """ def FindNumbersWithSum(array: list, tsum: int) -> tuple: l, r = 0, len(a...
21.916667
56
0.48289
def FindNumbersWithSum(array: list, tsum: int) -> tuple: l, r = 0, len(array)-1 while l < r: if array[l] + array[r] < tsum: l += 1 elif array[l]+array[r] > tsum: r -= 1 else: return array[l], array[r] return []
true
true
790eb18722b1eac69480ab1eb00f7c121f6ba66c
2,520
py
Python
build/linux/unbundle/replace_gn_files.py
google-ar/chromium
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
777
2017-08-29T15:15:32.000Z
2022-03-21T05:29:41.000Z
build/linux/unbundle/replace_gn_files.py
harrymarkovskiy/WebARonARCore
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
66
2017-08-30T18:31:18.000Z
2021-08-02T10:59:35.000Z
build/linux/unbundle/replace_gn_files.py
harrymarkovskiy/WebARonARCore
2441c86a5fd975f09a6c30cddb57dfb7fc239699
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
123
2017-08-30T01:19:34.000Z
2022-03-17T22:55:31.000Z
#!/usr/bin/env python # Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Replaces GN files in tree with files from here that make the build use system libraries. """ from __future__ import print_function...
31.5
72
0.687698
from __future__ import print_function import argparse import os import shutil import sys REPLACEMENTS = { 'ffmpeg': 'third_party/ffmpeg/BUILD.gn', 'flac': 'third_party/flac/BUILD.gn', 'harfbuzz-ng': 'third_party/harfbuzz-ng/BUILD.gn', 'icu': 'third_party/icu/BUILD.gn', 'libevent': 'base/third_party/l...
true
true
790eb24236f11b45a2ecb4687164521b20be05ea
8,442
py
Python
mmdet3d/models/dense_heads/assigner/assign_result.py
yangzilongdmgy/merge_monster_3d
0595e36749d32c3d5537a3f707727a137c82076e
[ "Apache-2.0" ]
null
null
null
mmdet3d/models/dense_heads/assigner/assign_result.py
yangzilongdmgy/merge_monster_3d
0595e36749d32c3d5537a3f707727a137c82076e
[ "Apache-2.0" ]
null
null
null
mmdet3d/models/dense_heads/assigner/assign_result.py
yangzilongdmgy/merge_monster_3d
0595e36749d32c3d5537a3f707727a137c82076e
[ "Apache-2.0" ]
null
null
null
# Modification 2020 RangiLyu # Copyright 2018-2019 Open-MMLab. # 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 applicabl...
37.026316
86
0.592514
import torch from ...utils import util_mixins class AssignResult(util_mixins.NiceRepr): def __init__(self, num_gts, gt_inds, max_overlaps, labels=None): self.num_gts = num_gts self.gt_inds = gt_inds self.max_overlaps = max_overlaps self.labels = labels ...
true
true
790eb2559f043c83a117b44792d5ec5eea6716df
6,960
py
Python
plugins/String/test.py
dregad/Limnoria
986913628929c9018e01b82b53638aced50ab0de
[ "BSD-3-Clause" ]
1
2021-12-04T20:55:17.000Z
2021-12-04T20:55:17.000Z
plugins/String/test.py
dregad/Limnoria
986913628929c9018e01b82b53638aced50ab0de
[ "BSD-3-Clause" ]
null
null
null
plugins/String/test.py
dregad/Limnoria
986913628929c9018e01b82b53638aced50ab0de
[ "BSD-3-Clause" ]
null
null
null
### # Copyright (c) 2003-2005, Jeremiah Fincher # Copyright (c) 2009, James McCoy # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyr...
43.5
80
0.625862
mport re from supybot.test import * import supybot.utils as utils nicks = ['fatjim','scn','moshez','LordVan','MetaCosm','pythong','fishfart', 'alb','d0rt','jemfinch','StyxAlso','fors','deltab','gd', 'hellz_hunter','are_j|pub_comp','jason_','dreid','sayke_','winjer', ...
true
true
790eb3eb87fab7bae92f2aa41b7b1327b2277dc8
17,245
py
Python
tests/pipeline/test_node.py
laisbsc/kedro
abdb51f1fc5a247dc92cca63010cf06a581c5462
[ "Apache-2.0" ]
null
null
null
tests/pipeline/test_node.py
laisbsc/kedro
abdb51f1fc5a247dc92cca63010cf06a581c5462
[ "Apache-2.0" ]
null
null
null
tests/pipeline/test_node.py
laisbsc/kedro
abdb51f1fc5a247dc92cca63010cf06a581c5462
[ "Apache-2.0" ]
1
2021-08-22T08:16:22.000Z
2021-08-22T08:16:22.000Z
# Copyright 2020 QuantumBlack Visual Analytics Limited # # 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 # # THE SOFTWARE IS PROVIDED "AS IS",...
33.747554
98
0.595071
import re from functools import partial, update_wrapper, wraps from typing import Callable import pytest from kedro.pipeline import node def constant_output(): return "output" def identity(input1: str): return input1 def biconcat(input1: str, input2: str): return inpu...
true
true
790eb41ffd1c2aed2bd72ddd41c785d9c7dd4f88
14,268
py
Python
app_backend/views/rack.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
1
2020-06-21T04:08:26.000Z
2020-06-21T04:08:26.000Z
app_backend/views/rack.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
13
2019-10-18T17:19:32.000Z
2022-01-13T00:44:43.000Z
app_backend/views/rack.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
5
2019-02-07T03:15:16.000Z
2021-09-04T14:06:28.000Z
#!/usr/bin/env python # encoding: utf-8 """ @author: zhanghe @software: PyCharm @file: rack.py @time: 2018-04-06 18:22 """ from __future__ import unicode_literals from datetime import datetime from flask import ( request, flash, render_template, url_for, redirect, abort, jsonify, Blu...
29.418557
91
0.593146
from __future__ import unicode_literals from datetime import datetime from flask import ( request, flash, render_template, url_for, redirect, abort, jsonify, Blueprint, ) from flask_babel import gettext as _ from flask_login import login_required from app_backend import app from a...
true
true
790eb53163105b71fb9f054f268a141352767bf0
3,322
py
Python
deepblast/utils.py
athbaltzis/deepblast
63d29fd162e537de1630d4f98f2b559b61a611e3
[ "BSD-3-Clause" ]
29
2020-09-20T17:34:08.000Z
2022-03-21T11:47:13.000Z
deepblast/utils.py
athbaltzis/deepblast
63d29fd162e537de1630d4f98f2b559b61a611e3
[ "BSD-3-Clause" ]
50
2020-06-19T23:56:17.000Z
2020-09-12T22:20:26.000Z
deepblast/utils.py
athbaltzis/deepblast
63d29fd162e537de1630d4f98f2b559b61a611e3
[ "BSD-3-Clause" ]
9
2020-09-17T20:27:10.000Z
2021-09-23T01:11:17.000Z
import os import numpy as np from scipy.stats import multivariate_normal import inspect from sklearn.metrics.pairwise import pairwise_distances def sample(transition_matrix, means, covs, start_state, n_samples, random_state): n_states, n_features, _ = covs.shape states = np.zeros(n_samples, dtype='...
33.897959
80
0.606562
import os import numpy as np from scipy.stats import multivariate_normal import inspect from sklearn.metrics.pairwise import pairwise_distances def sample(transition_matrix, means, covs, start_state, n_samples, random_state): n_states, n_features, _ = covs.shape states = np.zeros(n_samples, dtype='...
true
true
790eb54ddf76ac8637ab3494b96e13577f241ade
6,598
py
Python
slim/types/TreatmentTypes.py
magicicada/slim
e6e966dfa88145f0f571e9479ea22ed7ce61fd57
[ "MIT" ]
3
2021-10-06T20:09:53.000Z
2022-01-05T11:40:57.000Z
slim/types/TreatmentTypes.py
resistance-modelling/slim
ce05d40f56f5263cb039973af3e187cffc1d00b4
[ "MIT" ]
143
2021-07-16T09:44:23.000Z
2022-03-29T16:27:40.000Z
slim/types/TreatmentTypes.py
resistance-modelling/slim
ce05d40f56f5263cb039973af3e187cffc1d00b4
[ "MIT" ]
null
null
null
from __future__ import annotations from abc import abstractmethod, ABC from decimal import Decimal from enum import Enum from typing import Dict, cast import numpy as np # A few extra general types from slim.simulation.lice_population import LicePopulation, GenoDistrib, GenoTreatmentValue,\ Alleles, GenoTreatmen...
34.544503
115
0.677933
from __future__ import annotations from abc import abstractmethod, ABC from decimal import Decimal from enum import Enum from typing import Dict, cast import numpy as np from slim.simulation.lice_population import LicePopulation, GenoDistrib, GenoTreatmentValue,\ Alleles, GenoTreatmentDistrib Money = Decimal ...
true
true
790eb660dec288f5b6fd4bcac1aded1ed2bcfc79
4,355
py
Python
test/TEX/subdir_variantdir_include2.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
1,403
2017-11-23T14:24:01.000Z
2022-03-30T20:59:39.000Z
test/TEX/subdir_variantdir_include2.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
3,708
2017-11-27T13:47:12.000Z
2022-03-29T17:21:17.000Z
test/TEX/subdir_variantdir_include2.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
281
2017-12-01T23:48:38.000Z
2022-03-31T15:25:44.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
30.034483
74
0.723766
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons test = TestSCons.TestSCons() latex = test.where_is('latex') if not latex: test.skip_test("Could not find 'latex'; skipping test.\n") pdflatex = test.where_is('pdflatex') if not pdflatex: test.skip_test("C...
true
true
790eb702ce487ee58b2ce443409170bbba6308b9
333
py
Python
scripts/whatsup.py
foretheta/whatsup
7a77631d6fc72aa15f2aac3a04d0734be95f6bb5
[ "Apache-2.0" ]
7
2020-09-01T20:10:08.000Z
2021-08-12T01:48:06.000Z
scripts/whatsup.py
foretheta/whatsup
7a77631d6fc72aa15f2aac3a04d0734be95f6bb5
[ "Apache-2.0" ]
1
2021-09-26T06:12:22.000Z
2021-09-26T06:12:22.000Z
scripts/whatsup.py
foretheta/whatsup
7a77631d6fc72aa15f2aac3a04d0734be95f6bb5
[ "Apache-2.0" ]
null
null
null
import click import subprocess import os @click.group() def cli(): ... @cli.command() def deploy(): click.echo("Running chalice deploy") output = subprocess.check_output(f"source {os.environ['VIRTUAL_ENV']}/bin/activate && chalice deploy",shell=True) click.echo(output) click.echo(os.environ["VIRT...
18.5
117
0.693694
import click import subprocess import os @click.group() def cli(): ... @cli.command() def deploy(): click.echo("Running chalice deploy") output = subprocess.check_output(f"source {os.environ['VIRTUAL_ENV']}/bin/activate && chalice deploy",shell=True) click.echo(output) click.echo(os.environ["VIRT...
true
true
790eb87068522c15bbbaf75a4eba02c100a77081
3,410
py
Python
models/MiDaS.py
valgur/GIMP-ML-Hub
11bdfcc894ac53543b2178e67eaf29bf9815049f
[ "MIT" ]
16
2020-07-20T03:32:08.000Z
2021-12-24T12:50:01.000Z
models/MiDaS.py
valgur/GIMP-ML-Hub
11bdfcc894ac53543b2178e67eaf29bf9815049f
[ "MIT" ]
4
2020-07-20T12:47:24.000Z
2021-04-24T11:00:41.000Z
models/MiDaS.py
valgur/GIMP-ML
11bdfcc894ac53543b2178e67eaf29bf9815049f
[ "MIT" ]
1
2020-06-09T10:02:00.000Z
2020-06-09T10:02:00.000Z
import sys import numpy as np import torch import torch.hub from PIL import Image from torchvision.transforms import Compose from _model_base import ModelBase, handle_alpha from _util import apply_colormap, to_rgb # Simplified transforms from # https://github.com/intel-isl/MiDaS/blob/master/models/transforms.py cla...
29.145299
99
0.633724
import sys import numpy as np import torch import torch.hub from PIL import Image from torchvision.transforms import Compose from _model_base import ModelBase, handle_alpha from _util import apply_colormap, to_rgb class Resize: def __init__(self, width, height, image_interpolation_method=Image.BICUBIC): ...
true
true
790eb8a8191fce34f76f66f4d3ffcffcec6ff9d7
841
py
Python
examples/plotting/file/candlestick.py
goncaloperes/bokeh
b857d2d17d7c19779bb0a7be2601d8238fb1d5e9
[ "BSD-3-Clause" ]
1
2021-10-30T00:32:00.000Z
2021-10-30T00:32:00.000Z
examples/plotting/file/candlestick.py
Deng-Fankang/bokeh
894731860c53b7c9ddd0057dee85cf064278dc0e
[ "BSD-3-Clause" ]
12
2020-08-26T20:19:29.000Z
2020-08-26T20:19:52.000Z
examples/plotting/file/candlestick.py
Deng-Fankang/bokeh
894731860c53b7c9ddd0057dee85cf064278dc0e
[ "BSD-3-Clause" ]
2
2021-01-12T18:22:24.000Z
2021-10-30T00:32:02.000Z
from math import pi import pandas as pd from bokeh.plotting import figure, output_file, show from bokeh.sampledata.stocks import MSFT df = pd.DataFrame(MSFT)[:50] df["date"] = pd.to_datetime(df["date"]) inc = df.close > df.open dec = df.open > df.close w = 12*60*60*1000 # half day in ms TOOLS = "pan,wheel_zoom,box...
30.035714
94
0.72176
from math import pi import pandas as pd from bokeh.plotting import figure, output_file, show from bokeh.sampledata.stocks import MSFT df = pd.DataFrame(MSFT)[:50] df["date"] = pd.to_datetime(df["date"]) inc = df.close > df.open dec = df.open > df.close w = 12*60*60*1000 TOOLS = "pan,wheel_zoom,box_zoom,reset,save...
true
true
790eba203760fc449369cdd11240df8b7774ce60
156
py
Python
selenzy_wrapper/selenzy/__init__.py
brsynth/selenzy-wrapper
4d56d4de4811348477ffeda30b3214d082c096c7
[ "MIT" ]
null
null
null
selenzy_wrapper/selenzy/__init__.py
brsynth/selenzy-wrapper
4d56d4de4811348477ffeda30b3214d082c096c7
[ "MIT" ]
null
null
null
selenzy_wrapper/selenzy/__init__.py
brsynth/selenzy-wrapper
4d56d4de4811348477ffeda30b3214d082c096c7
[ "MIT" ]
null
null
null
from .Selenzy import ( readData, updateScore, analyse, seqScore ) from .Selenzy2 import ( analyse2 ) from .newtax import ( newtax )
12
23
0.634615
from .Selenzy import ( readData, updateScore, analyse, seqScore ) from .Selenzy2 import ( analyse2 ) from .newtax import ( newtax )
true
true
790eba2bab3ca5a0df3081bf1214c98005a123c1
7,396
py
Python
openbook_follows/views.py
TamaraAbells/okuna-api
f87d8e80d2f182c01dbce68155ded0078ee707e4
[ "MIT" ]
164
2019-07-29T17:59:06.000Z
2022-03-19T21:36:01.000Z
openbook_follows/views.py
TamaraAbells/okuna-api
f87d8e80d2f182c01dbce68155ded0078ee707e4
[ "MIT" ]
188
2019-03-16T09:53:25.000Z
2019-07-25T14:57:24.000Z
openbook_follows/views.py
TamaraAbells/okuna-api
f87d8e80d2f182c01dbce68155ded0078ee707e4
[ "MIT" ]
80
2019-08-03T17:49:08.000Z
2022-02-28T16:56:33.000Z
# Create your views here. from django.contrib.auth import get_user_model from django.db import transaction from rest_framework import status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from django.utils.translation import ...
37.543147
114
0.741211
from django.contrib.auth import get_user_model from django.db import transaction from rest_framework import status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from django.utils.translation import gettext as _ from openboo...
true
true
790eba80fffd8687db251eb9826ebd6207bd2e00
1,241
py
Python
setup.py
dgrtwo/dplython
9c36e9e3b9d6a457e8b974c30f6725abde947f1c
[ "MIT" ]
3
2016-05-19T02:58:54.000Z
2017-12-01T10:37:55.000Z
setup.py
dgrtwo/dplython
9c36e9e3b9d6a457e8b974c30f6725abde947f1c
[ "MIT" ]
null
null
null
setup.py
dgrtwo/dplython
9c36e9e3b9d6a457e8b974c30f6725abde947f1c
[ "MIT" ]
1
2019-11-04T17:50:54.000Z
2019-11-04T17:50:54.000Z
"""Install Dplython.""" from setuptools import setup, find_packages setup( name="dplython", version="0.0.4", description="Dplyr-style operations on top of pandas DataFrame.", url="https://github.com/dodger487/dplython", download_url="https://github.com/dodger487/dplython/tarball/0.0.4", pack...
34.472222
71
0.639807
from setuptools import setup, find_packages setup( name="dplython", version="0.0.4", description="Dplyr-style operations on top of pandas DataFrame.", url="https://github.com/dodger487/dplython", download_url="https://github.com/dodger487/dplython/tarball/0.0.4", packages=find_packages(), ...
true
true
790eba842712649a0e5573f38254e1b35da936d9
764
py
Python
loggingExer/moduleExer/start.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
loggingExer/moduleExer/start.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
loggingExer/moduleExer/start.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
import logging from logging import basicConfig, getLogger from lib import do_something def main(): log_fmt = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" basicConfig(format=log_fmt, level="DEBUG") logger = getLogger(__name__) for i in range(3): logger.info("--------...
28.296296
71
0.602094
import logging from logging import basicConfig, getLogger from lib import do_something def main(): log_fmt = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" basicConfig(format=log_fmt, level="DEBUG") logger = getLogger(__name__) for i in range(3): logger.info("--------...
true
true
790ebad5d5bc81f70e6b8a4c28488ca2eefa0b81
268
py
Python
src/core/migrations/0040_merge_20190205_0807.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
src/core/migrations/0040_merge_20190205_0807.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
src/core/migrations/0040_merge_20190205_0807.py
metabolism-of-cities/ARCHIVED-metabolism-of-cities-platform-v3
c754d3b1b401906a21640b8eacb6b724a448b31c
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2019-02-05 08:07 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0038_merge_20190203_1423'), ('core', '0039_auto_20190205_0609'), ] operations = [ ]
17.866667
47
0.641791
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0038_merge_20190203_1423'), ('core', '0039_auto_20190205_0609'), ] operations = [ ]
true
true
790ebc56bf69c688e3cdf8e7fc4e72565848d180
13,006
py
Python
tests/components/mobile_app/test_webhook.py
SmarthomeNinja/core
f4b8a95205ea7d4126fc5e704da532cd8eed937e
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
tests/components/mobile_app/test_webhook.py
SmarthomeNinja/core
f4b8a95205ea7d4126fc5e704da532cd8eed937e
[ "Apache-2.0" ]
38
2020-07-23T07:13:12.000Z
2022-03-31T06:01:46.000Z
tests/components/mobile_app/test_webhook.py
SmarthomeNinja/core
f4b8a95205ea7d4126fc5e704da532cd8eed937e
[ "Apache-2.0" ]
3
2021-05-18T16:42:18.000Z
2021-07-19T22:04:21.000Z
"""Webhook tests for mobile_app.""" import logging import pytest from homeassistant.components.camera import SUPPORT_STREAM as CAMERA_SUPPORT_STREAM from homeassistant.components.mobile_app.const import CONF_SECRET from homeassistant.components.zone import DOMAIN as ZONE_DOMAIN from homeassistant.const import CONF_WE...
31.799511
105
0.685068
import logging import pytest from homeassistant.components.camera import SUPPORT_STREAM as CAMERA_SUPPORT_STREAM from homeassistant.components.mobile_app.const import CONF_SECRET from homeassistant.components.zone import DOMAIN as ZONE_DOMAIN from homeassistant.const import CONF_WEBHOOK_ID from homeassistant.core imp...
true
true
790ebc8206dd9a84200612f2e11974711b763a6d
1,284
py
Python
eval/obs_and_M_split.py
maxinye/AIC_Weather_Forecasting
ef43a9371ecfce27d52b4102adf940a0cf625d7b
[ "MIT" ]
19
2020-04-03T09:59:57.000Z
2022-03-17T09:12:03.000Z
eval/obs_and_M_split.py
jhhuang96/AIC_Weather_Forecasting
e04b9b3570d7377847b35f8ba67943988e24744d
[ "MIT" ]
1
2021-11-09T07:40:49.000Z
2021-11-09T07:40:49.000Z
eval/obs_and_M_split.py
jhhuang96/AIC_Weather_Forecasting
e04b9b3570d7377847b35f8ba67943988e24744d
[ "MIT" ]
10
2020-06-29T11:56:44.000Z
2022-03-17T09:12:04.000Z
import pandas as pd from datetime import datetime import os def datelist(beginDate, endDate): date_l=[datetime.strftime(x,'%Y-%m-%d') for x in list(pd.date_range(start=beginDate, end=endDate))] return date_l begin_date='2018-10-28' end_date='2018-11-03' dates=datelist(begin_date,end_date) if not os.path.exists...
38.909091
103
0.613707
import pandas as pd from datetime import datetime import os def datelist(beginDate, endDate): date_l=[datetime.strftime(x,'%Y-%m-%d') for x in list(pd.date_range(start=beginDate, end=endDate))] return date_l begin_date='2018-10-28' end_date='2018-11-03' dates=datelist(begin_date,end_date) if not os.path.exists...
true
true
790ebd430cd808d0de68b41c62833b8afbeea970
1,258
py
Python
nc_vote/vote/views.py
dave-a-fox/VoteNC2020
ea4735a927d74a867287ded7340f04485377f3fc
[ "MIT" ]
null
null
null
nc_vote/vote/views.py
dave-a-fox/VoteNC2020
ea4735a927d74a867287ded7340f04485377f3fc
[ "MIT" ]
null
null
null
nc_vote/vote/views.py
dave-a-fox/VoteNC2020
ea4735a927d74a867287ded7340f04485377f3fc
[ "MIT" ]
null
null
null
from django.shortcuts import render # Create your views here. from .models import BallotText, Candidate, District def index(request): districts = District.objects.all context = {'districts': districts} return render(request, 'vote/index.html', context) def ballot(request, district_num): ballot_lis...
26.208333
78
0.636725
from django.shortcuts import render from .models import BallotText, Candidate, District def index(request): districts = District.objects.all context = {'districts': districts} return render(request, 'vote/index.html', context) def ballot(request, district_num): ballot_list = BallotText.objects.al...
true
true
790ebd77437f194de1b476c2101e95f29fc52fd1
363
py
Python
client/data_manage/data_dir.py
ivigns/mipt-cis-docs
fe96e7630b4d127dfe241a1aedfbd14b692b4996
[ "MIT" ]
null
null
null
client/data_manage/data_dir.py
ivigns/mipt-cis-docs
fe96e7630b4d127dfe241a1aedfbd14b692b4996
[ "MIT" ]
9
2021-03-09T18:42:13.000Z
2021-05-06T15:34:16.000Z
client/data_manage/data_dir.py
ivigns/mipt-cis-docs
fe96e7630b4d127dfe241a1aedfbd14b692b4996
[ "MIT" ]
null
null
null
import os import PyQt5.QtCore as qc DATA_DIR = 'MiptCisDocs' WRITABLE_LOCATION = qc.QStandardPaths.writableLocation( qc.QStandardPaths.StandardLocation.AppDataLocation ) def get_data_dir() -> str: data_dir = os.path.abspath(os.path.join(WRITABLE_LOCATION, DATA_DIR)) if not os.path.exists(data_dir): ...
22.6875
73
0.749311
import os import PyQt5.QtCore as qc DATA_DIR = 'MiptCisDocs' WRITABLE_LOCATION = qc.QStandardPaths.writableLocation( qc.QStandardPaths.StandardLocation.AppDataLocation ) def get_data_dir() -> str: data_dir = os.path.abspath(os.path.join(WRITABLE_LOCATION, DATA_DIR)) if not os.path.exists(data_dir): ...
true
true
790ebd83489431c1fcb29bf8324aa14264a7f595
21,412
py
Python
deeptrio/variant_caller_test.py
tahashmi/deepvariant
441c1809d3290f4a20b29a0a0bbf8ecfb929a6e3
[ "BSD-3-Clause" ]
4
2019-03-30T13:25:25.000Z
2020-10-14T18:47:21.000Z
deeptrio/variant_caller_test.py
FrogEnthusiast7/deepvariant
84516dfacd1ed856a34507becb21848aa12e77a8
[ "BSD-3-Clause" ]
1
2021-06-18T15:04:47.000Z
2021-06-18T15:04:47.000Z
deeptrio/variant_caller_test.py
FrogEnthusiast7/deepvariant
84516dfacd1ed856a34507becb21848aa12e77a8
[ "BSD-3-Clause" ]
1
2019-09-04T16:59:18.000Z
2019-09-04T16:59:18.000Z
# Copyright 2017 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
43.432049
80
0.600738
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys if 'google' in sys.modules and 'google.protobuf' not in sys.modules: del sys.modules['google'] from absl.testing import absltest from absl.testing import parameteriz...
true
true
790ebd8bc6c0ac06a99896b061a2c625e1fdb2c4
14,433
py
Python
tensorflow/contrib/learn/python/learn/basic_session_run_hooks.py
topsun888/tensorflow
bad7c50b9dc9789ad7dd0a62daca40b7269841ed
[ "Apache-2.0" ]
1
2017-03-24T12:08:25.000Z
2017-03-24T12:08:25.000Z
tensorflow/contrib/learn/python/learn/basic_session_run_hooks.py
topsun888/tensorflow
bad7c50b9dc9789ad7dd0a62daca40b7269841ed
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/learn/python/learn/basic_session_run_hooks.py
topsun888/tensorflow
bad7c50b9dc9789ad7dd0a62daca40b7269841ed
[ "Apache-2.0" ]
1
2020-07-09T22:02:18.000Z
2020-07-09T22:02:18.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.992519
89
0.701933
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import numpy as np import six from tensorflow.contrib.framework.python.ops import variables as contrib_variables from tensorflow.contrib.learn.python.learn import session_...
true
true
790ebe6901ce2c482c9ba637f3d89943c6472b08
6,294
py
Python
elastalert/alerter/slack_alerter.py
JasperJuergensen/elastalert
8033361083b5edad1845ad9b307b8280ef278da7
[ "Apache-2.0" ]
2
2020-06-19T13:02:19.000Z
2021-02-11T19:35:46.000Z
elastalert/alerter/slack_alerter.py
JasperJuergensen/elastalert
8033361083b5edad1845ad9b307b8280ef278da7
[ "Apache-2.0" ]
9
2020-04-09T15:40:37.000Z
2022-01-19T17:49:22.000Z
elastalert/alerter/slack_alerter.py
JasperJuergensen/elastalert
8033361083b5edad1845ad9b307b8280ef278da7
[ "Apache-2.0" ]
null
null
null
import copy import json import logging import warnings import requests from elastalert.alerter import Alerter from elastalert.exceptions import EAException from elastalert.utils.time import DateTimeEncoder from elastalert.utils.util import lookup_es_key from requests import RequestException log = logging.getLogger(__...
40.606452
87
0.601525
import copy import json import logging import warnings import requests from elastalert.alerter import Alerter from elastalert.exceptions import EAException from elastalert.utils.time import DateTimeEncoder from elastalert.utils.util import lookup_es_key from requests import RequestException log = logging.getLogger(__...
true
true