hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7548cf37397caaf93f53914ca51b12b3d41949e
880
py
Python
views/console_dialogue_view.py
Catsuko/Westward
3c04df668f7e04ca45e622017ffa9dfe6d3c242c
[ "MIT" ]
3
2019-12-22T22:44:43.000Z
2020-02-11T11:14:10.000Z
views/console_dialogue_view.py
Catsuko/Westward
3c04df668f7e04ca45e622017ffa9dfe6d3c242c
[ "MIT" ]
null
null
null
views/console_dialogue_view.py
Catsuko/Westward
3c04df668f7e04ca45e622017ffa9dfe6d3c242c
[ "MIT" ]
null
null
null
class ConsoleDialogueView: def __init__(self, speaker="", message=""): self.speaker = speaker self.message = message def render(self): self.__print_message() input() return self def render_with_choice(self, options): if len(options) == 0: raise ...
28.387097
68
0.617045
class ConsoleDialogueView: def __init__(self, speaker="", message=""): self.speaker = speaker self.message = message def render(self): self.__print_message() input() return self def render_with_choice(self, options): if len(options) == 0: raise ...
true
true
f7548decf8a96e24cd04228a0e8e9419257f1ec8
664
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractRydeniustranslationsBlogspotCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractRydeniustranslationsBlogspotCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractRydeniustranslationsBlogspotCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractRydeniustranslationsBlogspotCom(item): ''' Parser for 'rydeniustranslations.blogspot.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None urlfrag = [ ('/vrmmo-summoner-hajimemashita-chapter-', 'V...
31.619048
104
0.692771
def extractRydeniustranslationsBlogspotCom(item): vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None urlfrag = [ ('/vrmmo-summoner-hajimemashita-chapter-', 'VRMMO Summoner Hajimemashita', 'translated'), ('/mari...
true
true
f7548df972e228df83bd8d10ed1a712c29ffa757
2,399
py
Python
pyspeckit/spectrum/speclines/optical.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
79
2015-03-03T15:06:20.000Z
2022-03-27T21:29:47.000Z
pyspeckit/spectrum/speclines/optical.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
240
2015-01-04T02:59:12.000Z
2021-11-13T15:11:14.000Z
pyspeckit/spectrum/speclines/optical.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
68
2015-03-02T12:23:12.000Z
2022-02-28T10:26:36.000Z
""" Storage for optical spectral line information. """ from __future__ import print_function import numpy as np def hydrogen(nu,nl, vacuum=True): """ Compute the rest wavelength of Hydrogen recombination lines in angstroms """ rydberg = 10973731.6 # m^-1 protontoelectron = 1836.15266 # ratio ...
32.863014
97
0.570238
from __future__ import print_function import numpy as np def hydrogen(nu,nl, vacuum=True): rydberg = 10973731.6 protontoelectron = 1836.15266 lvac = 1.0/rydberg * 1./(1/float(nl)**2 - 1/float(nu)**2) * 1e10 * (1.0+1.0/protontoelectron) if not vacuum: import ref_index return ref_ind...
true
true
f7548e05813854e29a31ebc87eb440f139cb12b6
1,105
py
Python
test/vanilla/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/cat.py
iscai-msft/autorest.python
a9f38dd762fbc046ce6197bfabea2f56045d2957
[ "MIT" ]
null
null
null
test/vanilla/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/cat.py
iscai-msft/autorest.python
a9f38dd762fbc046ce6197bfabea2f56045d2957
[ "MIT" ]
null
null
null
test/vanilla/Expected/AcceptanceTests/BodyComplex/bodycomplex/models/cat.py
iscai-msft/autorest.python
a9f38dd762fbc046ce6197bfabea2f56045d2957
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
28.333333
76
0.510407
from .pet import Pet class Cat(Pet): _attribute_map = { 'id': {'key': 'id', 'type': 'int'}, 'name': {'key': 'name', 'type': 'str'}, 'color': {'key': 'color', 'type': 'str'}, 'hates': {'key': 'hates', 'type': '[Dog]'}, } def __init__(self, **kwargs): sup...
true
true
f7548e51c4fa64b6290f782bac3ee9172b0407ca
10,381
py
Python
wafer/settings.py
andrewshadura/wafer
64a6fac9ca4456a386a27e1bc71d233bdc35d1a6
[ "ISC" ]
null
null
null
wafer/settings.py
andrewshadura/wafer
64a6fac9ca4456a386a27e1bc71d233bdc35d1a6
[ "ISC" ]
null
null
null
wafer/settings.py
andrewshadura/wafer
64a6fac9ca4456a386a27e1bc71d233bdc35d1a6
[ "ISC" ]
null
null
null
import os from django.utils.translation import ugettext_lazy as _ try: from localsettings import * except ImportError: pass # Django settings for wafer project. ADMINS = ( # The logging config below mails admins # ('Your Name', 'your_email@example.com'), ) DATABASES = { 'default': { 'EN...
31.268072
85
0.692515
import os from django.utils.translation import ugettext_lazy as _ try: from localsettings import * except ImportError: pass ADMINS = ( ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'wafer.db', } } if os.environ.get('TESTDB', None) == 'postg...
true
true
f7548ea23132f68d4db048b1a671ed3a00235bc1
3,954
py
Python
lir/ece.py
bartbroere/lir
041f1cea40366937d56c43bb15712873eb3e8a0a
[ "Apache-2.0" ]
null
null
null
lir/ece.py
bartbroere/lir
041f1cea40366937d56c43bb15712873eb3e8a0a
[ "Apache-2.0" ]
null
null
null
lir/ece.py
bartbroere/lir
041f1cea40366937d56c43bb15712873eb3e8a0a
[ "Apache-2.0" ]
null
null
null
""" Empirical Cross Entrpy (ECE) The discrimination and calibration of the LRs reported by some systems can also be measured separately. The empirical cross entropy (ECE) plot is a graphical way of doing this. The ECE is the average of -P(Hp) * log2(P(Hp|LRi)) for all LRi when Hp is true, and -P(Hd) * log2(P(Hd|LRi))...
37.301887
132
0.685382
import matplotlib.pyplot as plt import numpy as np from .calibration import IsotonicCalibrator from . import util def plot(lrs, y, log_prior_odds_range=None, on_screen=False, path=None, kw_figure={}): if log_prior_odds_range is None: log_prior_odds_range = (-3, 3) log_prior_odds = np.arange(*log_pri...
true
true
f7548f21939e30893c91535133014cd7619fa8b3
565
py
Python
ampel/model/operator/AllOf.py
AmpelProject/Ampel-base
e344e4be31f3c009084cbf285693c77389cafae8
[ "BSD-3-Clause" ]
1
2019-11-21T11:44:04.000Z
2019-11-21T11:44:04.000Z
ampel/model/operator/AllOf.py
AmpelProject/Ampel-base
e344e4be31f3c009084cbf285693c77389cafae8
[ "BSD-3-Clause" ]
1
2019-03-25T19:24:09.000Z
2019-03-25T19:24:09.000Z
ampel/model/operator/AllOf.py
AmpelProject/Ampel-base
e344e4be31f3c009084cbf285693c77389cafae8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: Ampel-interface/ampel/model/operator/AllOf.py # License: BSD-3-Clause # Author: valery brinnel <firstname.lastname@gmail.com> # Date: 15.10.2018 # Last Modified Date: 18.03.2021 # Last Modified By: valery br...
31.388889
68
0.677876
from typing import Generic from ampel.types import T from ampel.base.AmpelGenericModel import AmpelGenericModel class AllOf(AmpelGenericModel, Generic[T]): all_of: list[T]
true
true
f7548f951cfa557e6c30a59015ebb3236fe199ff
3,676
py
Python
tickit/adapters/interpreters/command/command_interpreter.py
dls-controls/tickit
00bb013e69674bcfe4926f365ecb3c65c080abe8
[ "Apache-2.0" ]
4
2021-09-16T13:35:33.000Z
2022-02-01T23:35:53.000Z
tickit/adapters/interpreters/command/command_interpreter.py
dls-controls/tickit
00bb013e69674bcfe4926f365ecb3c65c080abe8
[ "Apache-2.0" ]
46
2021-09-16T13:44:58.000Z
2022-02-02T13:42:56.000Z
tickit/adapters/interpreters/command/command_interpreter.py
dls-controls/tickit
00bb013e69674bcfe4926f365ecb3c65c080abe8
[ "Apache-2.0" ]
null
null
null
from abc import abstractmethod from inspect import getmembers from typing import AnyStr, AsyncIterable, Optional, Sequence, Tuple from tickit.core.adapter import Adapter, Interpreter from tickit.utils.compat.typing_compat import Protocol, runtime_checkable @runtime_checkable class Command(Protocol): """An interf...
37.131313
88
0.657236
from abc import abstractmethod from inspect import getmembers from typing import AnyStr, AsyncIterable, Optional, Sequence, Tuple from tickit.core.adapter import Adapter, Interpreter from tickit.utils.compat.typing_compat import Protocol, runtime_checkable @runtime_checkable class Command(Protocol): interr...
true
true
f7548fc14ac9a342adfdfe3d8a0d268c75ea2320
84
py
Python
Bronze/Bronze_V/14652.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
Bronze/Bronze_V/14652.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
Bronze/Bronze_V/14652.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
N, M, K = map(int, input().split()) down = K // M right = K % M print(down, right)
14
35
0.547619
N, M, K = map(int, input().split()) down = K // M right = K % M print(down, right)
true
true
f75491a67f37fcfca279c55f9158ad0207b307ec
3,668
py
Python
strawberryfields/circuitspecs/gbs.py
mpofukelvintafadzwa/strawberryfields
b7deb70929ea10995f2dd1c52d69b1db50bd6149
[ "Apache-2.0" ]
1
2020-07-12T17:53:56.000Z
2020-07-12T17:53:56.000Z
strawberryfields/circuitspecs/gbs.py
mpofukelvintafadzwa/strawberryfields
b7deb70929ea10995f2dd1c52d69b1db50bd6149
[ "Apache-2.0" ]
null
null
null
strawberryfields/circuitspecs/gbs.py
mpofukelvintafadzwa/strawberryfields
b7deb70929ea10995f2dd1c52d69b1db50bd6149
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Xanadu Quantum Technologies 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 agre...
34.603774
95
0.636859
from strawberryfields.program_utils import CircuitError, Command, group_operations import strawberryfields.ops as ops from .gaussian import GaussianSpecs class GBSSpecs(GaussianSpecs): short_name = 'gbs' primitives = { "All", "_New_modes", "_Delete", ...
true
true
f7549283d2d863814da13be74c686671f2b667a1
7,543
py
Python
mmpose/datasets/datasets/top_down/topdown_onehand10k_dataset.py
woffett/mmpose
cf8cbf49759e745896b70ce69d412518568af33b
[ "Apache-2.0" ]
null
null
null
mmpose/datasets/datasets/top_down/topdown_onehand10k_dataset.py
woffett/mmpose
cf8cbf49759e745896b70ce69d412518568af33b
[ "Apache-2.0" ]
null
null
null
mmpose/datasets/datasets/top_down/topdown_onehand10k_dataset.py
woffett/mmpose
cf8cbf49759e745896b70ce69d412518568af33b
[ "Apache-2.0" ]
null
null
null
import copy as cp import os import os.path as osp from collections import OrderedDict import json_tricks as json import numpy as np from mmpose.datasets.builder import DATASETS from .topdown_base_dataset import TopDownBaseDataset @DATASETS.register_module() class TopDownOneHand10KDataset(TopDownBaseDataset): ""...
32.235043
78
0.542357
import copy as cp import os import os.path as osp from collections import OrderedDict import json_tricks as json import numpy as np from mmpose.datasets.builder import DATASETS from .topdown_base_dataset import TopDownBaseDataset @DATASETS.register_module() class TopDownOneHand10KDataset(TopDownBaseDataset): d...
true
true
f75493064823a72c6f4883bd631fc55c5afecbff
2,868
py
Python
Unsplash_webscrapping.py
HayetBD/Text-to-image
7ead7e03bb8ee42f457281bc250cd88161fb5dcd
[ "MIT" ]
null
null
null
Unsplash_webscrapping.py
HayetBD/Text-to-image
7ead7e03bb8ee42f457281bc250cd88161fb5dcd
[ "MIT" ]
null
null
null
Unsplash_webscrapping.py
HayetBD/Text-to-image
7ead7e03bb8ee42f457281bc250cd88161fb5dcd
[ "MIT" ]
null
null
null
import time import pandas as pd from selenium import webdriver # Scrapping images and their caption from unsplash website # saving these images url and captions into a csv file WEBSITE = 'http://unsplash.com/s/photos/landscape-forest-mountain' columns = ['description', 'url'] imageset = pd.DataFrame(columns ...
40.971429
120
0.665969
import time import pandas as pd from selenium import webdriver WEBSITE = 'http://unsplash.com/s/photos/landscape-forest-mountain' columns = ['description', 'url'] imageset = pd.DataFrame(columns = columns) options = webdriver.ChromeOptions() options.add_argument("--start-maximized") driver = webdriv...
true
true
f75493be2dab1e4afc6a83c17df048e489fd7921
52,081
py
Python
pandas/core/dtypes/common.py
mtrbean/pandas
c0ff67a22df9c18da1172766e313732ed2ab6c30
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2021-05-15T22:58:42.000Z
2021-12-08T15:48:59.000Z
pandas/core/dtypes/common.py
mtrbean/pandas
c0ff67a22df9c18da1172766e313732ed2ab6c30
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2019-08-18T16:00:45.000Z
2019-08-18T16:00:45.000Z
pandas/core/dtypes/common.py
mtrbean/pandas
c0ff67a22df9c18da1172766e313732ed2ab6c30
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-12-08T15:49:00.000Z
2021-12-08T15:49:00.000Z
""" common type operations """ from typing import Any, Callable, Union import warnings import numpy as np from pandas._libs import algos, lib from pandas._libs.tslibs import conversion from pandas.compat import PY36 from pandas.core.dtypes.dtypes import ( CategoricalDtype, DatetimeTZDtype, ExtensionDtype...
25.147755
87
0.625103
from typing import Any, Callable, Union import warnings import numpy as np from pandas._libs import algos, lib from pandas._libs.tslibs import conversion from pandas.compat import PY36 from pandas.core.dtypes.dtypes import ( CategoricalDtype, DatetimeTZDtype, ExtensionDtype, IntervalDtype, Period...
true
true
f75494bdcde83a1a9a55eecc22524d893d681e37
11,403
py
Python
tests/test_span.py
vijayperiasamy-eb/dd-trace-py
2b0d396fc7f76582e8ffedff48933245a77ebaf2
[ "BSD-3-Clause" ]
null
null
null
tests/test_span.py
vijayperiasamy-eb/dd-trace-py
2b0d396fc7f76582e8ffedff48933245a77ebaf2
[ "BSD-3-Clause" ]
null
null
null
tests/test_span.py
vijayperiasamy-eb/dd-trace-py
2b0d396fc7f76582e8ffedff48933245a77ebaf2
[ "BSD-3-Clause" ]
null
null
null
import mock import time from unittest.case import SkipTest from ddtrace.context import Context from ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY from ddtrace.span import Span from ddtrace.ext import errors, priority from .base import BaseTracerTestCase class SpanTestCase(BaseTracerTestCase): def test_ids(...
31.763231
87
0.571692
import mock import time from unittest.case import SkipTest from ddtrace.context import Context from ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY from ddtrace.span import Span from ddtrace.ext import errors, priority from .base import BaseTracerTestCase class SpanTestCase(BaseTracerTestCase): def test_ids(...
true
true
f75495b8c26d527bddd3d5f1ab41c696dee66fe9
3,093
py
Python
examples/server/wsgi/app.py
flocko-motion/python-socketio
3bd13578c82e8a94d6b0328180606c2aefd496f1
[ "MIT" ]
2,977
2015-07-15T08:01:56.000Z
2022-03-31T15:36:09.000Z
examples/server/wsgi/app.py
flocko-motion/python-socketio
3bd13578c82e8a94d6b0328180606c2aefd496f1
[ "MIT" ]
758
2015-07-15T09:37:11.000Z
2022-03-31T22:49:07.000Z
examples/server/wsgi/app.py
flocko-motion/python-socketio
3bd13578c82e8a94d6b0328180606c2aefd496f1
[ "MIT" ]
584
2015-08-08T03:16:29.000Z
2022-03-30T09:25:30.000Z
# set async_mode to 'threading', 'eventlet', 'gevent' or 'gevent_uwsgi' to # force a mode else, the best mode is selected automatically from what's # installed async_mode = None import time from flask import Flask, render_template import socketio sio = socketio.Server(logger=True, async_mode=async_mode) app = Flask(_...
27.131579
77
0.632719
# installed async_mode = None import time from flask import Flask, render_template import socketio sio = socketio.Server(logger=True, async_mode=async_mode) app = Flask(__name__) app.wsgi_app = socketio.WSGIApp(sio, app.wsgi_app) app.config['SECRET_KEY'] = 'secret!' thread = None def background_thread(): coun...
true
true
f75495d13c54ba6bdbf71c9d1abb3fc873b6c183
7,005
py
Python
pymarlin/plugins/hf_ner/module_classes.py
nifarn/PyMarlin
ea1f5f927aa85112ecebc206d53b5c3ee65704fa
[ "MIT" ]
20
2021-06-09T18:46:45.000Z
2022-02-09T01:08:13.000Z
pymarlin/plugins/hf_ner/module_classes.py
nifarn/PyMarlin
ea1f5f927aa85112ecebc206d53b5c3ee65704fa
[ "MIT" ]
50
2021-06-09T17:50:35.000Z
2022-02-07T23:02:30.000Z
pymarlin/plugins/hf_ner/module_classes.py
nifarn/PyMarlin
ea1f5f927aa85112ecebc206d53b5c3ee65704fa
[ "MIT" ]
5
2021-06-21T22:24:30.000Z
2021-12-21T17:08:21.000Z
import os import dataclasses import numpy as np import torch from torch.utils.data import DataLoader from torch.optim import Adam from torch.optim.lr_scheduler import OneCycleLR from pymarlin.core import module_interface, data_interface from transformers import AutoModelForTokenClassification from pymarlin.utils.sta...
36.484375
121
0.624554
import os import dataclasses import numpy as np import torch from torch.utils.data import DataLoader from torch.optim import Adam from torch.optim.lr_scheduler import OneCycleLR from pymarlin.core import module_interface, data_interface from transformers import AutoModelForTokenClassification from pymarlin.utils.sta...
true
true
f754965e123b65adb77bc26aa997bbe6b24f0f3a
3,022
py
Python
config/settings/local.py
bdzim/farmlogger
c8565dca9287945b13c93cc50b1587aaefcb0c4d
[ "MIT" ]
null
null
null
config/settings/local.py
bdzim/farmlogger
c8565dca9287945b13c93cc50b1587aaefcb0c4d
[ "MIT" ]
null
null
null
config/settings/local.py
bdzim/farmlogger
c8565dca9287945b13c93cc50b1587aaefcb0c4d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app """ import socket import os from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bo...
28.242991
99
0.49636
import socket import os from .common import * DEBUG = env.bool('DJANGO_DEBUG', default=True) TEMPLATES[0]['OPTIONS']['debug'] = DEBUG Y = env('DJANGO_SECRET_KEY', default='k%-ir&m=wlet6(-kn%9i65tw6u^0_b(z#yc*kp2&i&fozawb*#') EMAIL_PORT = 1025 EMAIL_HOST = 'localhost' EMAIL_BACKEND = env('DJANGO_EMAIL_BAC...
true
true
f75497d3e13b281bdf702b3c931c788d91ed60c0
3,087
py
Python
ML_Sandbox/data_prep.py
ChristopherGS/rolltec_motion
45105ddd0a8eb1f4eb5075b1dd807cbbc3b49505
[ "BSD-3-Clause" ]
6
2016-09-05T02:16:41.000Z
2020-09-03T00:43:45.000Z
ML_Sandbox/data_prep.py
ChristopherGS/rolltec_motion
45105ddd0a8eb1f4eb5075b1dd807cbbc3b49505
[ "BSD-3-Clause" ]
null
null
null
ML_Sandbox/data_prep.py
ChristopherGS/rolltec_motion
45105ddd0a8eb1f4eb5075b1dd807cbbc3b49505
[ "BSD-3-Clause" ]
1
2019-04-12T05:43:59.000Z
2019-04-12T05:43:59.000Z
import pandas as pd import numpy as np from manage_state import set_state, set_stand_state from utilities import combine_csv, concat_data, blank_filter, resolve_acc_gyro, resolve_acc_gyro_labels from rolltec_features import create_features def combine_state_features(directory, state, window=40, stand=0): """ ...
42.287671
128
0.746356
import pandas as pd import numpy as np from manage_state import set_state, set_stand_state from utilities import combine_csv, concat_data, blank_filter, resolve_acc_gyro, resolve_acc_gyro_labels from rolltec_features import create_features def combine_state_features(directory, state, window=40, stand=0): com...
true
true
f754980331d751c7e313cac487df9e04f05bab83
5,354
py
Python
test/python/circuit/library/test_qft.py
gadial/qiskit-terra
0fc83f44a6e80969875c738b2cee7bc33223e45f
[ "Apache-2.0" ]
1
2021-10-05T11:56:53.000Z
2021-10-05T11:56:53.000Z
test/python/circuit/library/test_qft.py
gadial/qiskit-terra
0fc83f44a6e80969875c738b2cee7bc33223e45f
[ "Apache-2.0" ]
24
2021-01-27T08:20:27.000Z
2021-07-06T09:42:28.000Z
test/python/circuit/library/test_qft.py
gadial/qiskit-terra
0fc83f44a6e80969875c738b2cee7bc33223e45f
[ "Apache-2.0" ]
4
2021-10-05T12:07:27.000Z
2022-01-28T18:37:28.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
34.541935
97
0.612626
import unittest import numpy as np from ddt import ddt, data, unpack from qiskit.test.base import QiskitTestCase from qiskit import transpile from qiskit.circuit import QuantumCircuit from qiskit.circuit.library import QFT from qiskit.quantum_info import Operator @ddt class TestQFT(QiskitTestCase): ...
true
true
f75498b4cbf2463a4688b366b12b8ea893b25143
6,417
py
Python
ts/model_server.py
dumpmemory/serve
a21e28fc6e775612b2eab2f74333a606e71692fd
[ "Apache-2.0" ]
null
null
null
ts/model_server.py
dumpmemory/serve
a21e28fc6e775612b2eab2f74333a606e71692fd
[ "Apache-2.0" ]
3
2022-03-12T01:08:09.000Z
2022-03-15T10:56:14.000Z
ts/model_server.py
dumpmemory/serve
a21e28fc6e775612b2eab2f74333a606e71692fd
[ "Apache-2.0" ]
null
null
null
""" File to define the entry point to Model Server """ import os import re import subprocess import sys import tempfile from builtins import str import platform import psutil from ts.version import __version__ from ts.arg_parser import ArgParser def start(): """ This is the entry point for model server ...
33.421875
118
0.545426
import os import re import subprocess import sys import tempfile from builtins import str import platform import psutil from ts.version import __version__ from ts.arg_parser import ArgParser def start(): args = ArgParser.ts_parser().parse_args() pid_file = os.path.join(tempfile.gettempdir(), ".model_server....
true
true
f75499283712f5c7399843cf7125d170f53b41be
6,817
py
Python
cone_finder/scripts/cone_pose_trainer.py
mattp256/wheele
724e2df031017051085000ac49849e4bb03b69cb
[ "BSD-3-Clause" ]
2
2018-01-28T00:48:42.000Z
2019-04-08T00:24:11.000Z
cone_finder/scripts/cone_pose_trainer.py
mattp256/wheele
724e2df031017051085000ac49849e4bb03b69cb
[ "BSD-3-Clause" ]
27
2018-08-03T01:49:19.000Z
2022-01-05T19:22:46.000Z
cone_finder/scripts/cone_pose_trainer.py
mattp256/wheele
724e2df031017051085000ac49849e4bb03b69cb
[ "BSD-3-Clause" ]
3
2018-04-20T02:55:10.000Z
2020-11-24T05:57:13.000Z
#!/usr/bin/env python import cv2 import numpy as np import math import csv import rospy from sensor_msgs.msg import Image from geometry_msgs.msg import PoseStamped from std_msgs.msg import Float32 from cv_bridge import CvBridge, CvBridgeError import sys import threading from dynamic_reconfigure.server import Server fr...
42.080247
138
0.578847
import cv2 import numpy as np import math import csv import rospy from sensor_msgs.msg import Image from geometry_msgs.msg import PoseStamped from std_msgs.msg import Float32 from cv_bridge import CvBridge, CvBridgeError import sys import threading from dynamic_reconfigure.server import Server from cone_detector.cfg ...
true
true
f75499cbfd3e7a07c99869dc0d558e37f376cd23
1,103
py
Python
601-700/623.add-one-row-to-tree.py
guangxu-li/leetcode-in-python
8a5a373b32351500342705c141591a1a8f5f1cb1
[ "MIT" ]
null
null
null
601-700/623.add-one-row-to-tree.py
guangxu-li/leetcode-in-python
8a5a373b32351500342705c141591a1a8f5f1cb1
[ "MIT" ]
null
null
null
601-700/623.add-one-row-to-tree.py
guangxu-li/leetcode-in-python
8a5a373b32351500342705c141591a1a8f5f1cb1
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=623 lang=python3 # # [623] Add One Row to Tree # # @lc code=start # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right from collections import deque class...
23.978261
68
0.461469
from collections import deque class Solution: def addOneRow(self, root: TreeNode, v: int, d: int) -> TreeNode: if d == 1: root = TreeNode(v, root) nodes = deque() nodes.append(root) depth = 1 while nodes: size = len(nodes) ...
true
true
f7549a64a4266bbc45df530b40d886aa8b257c5b
144,004
py
Python
pysnmp/MOXA-IAW5x50A_IO-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/MOXA-IAW5x50A_IO-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/MOXA-IAW5x50A_IO-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module MOXA-IAW5x50A_IO-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MOXA-IAW5x50A_IO-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:03:34 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (defau...
147.848049
10,622
0.748868
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuild...
true
true
f7549b2a7e43be62024398be597de5cef24c6be9
10,886
py
Python
py_files/AmazonReviews.py
jason-sa/amazon_product_trend_classification
d73b94338354bfdf1d6e83942560d0f95716ecd6
[ "MIT" ]
1
2018-12-27T02:38:49.000Z
2018-12-27T02:38:49.000Z
py_files/AmazonReviews.py
jason-sa/amazon_product_trend_classification
d73b94338354bfdf1d6e83942560d0f95716ecd6
[ "MIT" ]
null
null
null
py_files/AmazonReviews.py
jason-sa/amazon_product_trend_classification
d73b94338354bfdf1d6e83942560d0f95716ecd6
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from datetime import datetime, timedelta import os import pickle import re from collections import defaultdict from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score, confusion_matrix, roc_auc_score...
43.198413
185
0.628973
import pandas as pd import numpy as np from datetime import datetime, timedelta import os import pickle import re from collections import defaultdict from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score, confusion_matrix, roc_auc_score...
true
true
f7549bb0708dc74a610cec9f71d9678924c4b55d
6,901
py
Python
tests/test_query.py
equadon/invenio-search
14c9dc7122005189de2754c2818c76dcb5497c28
[ "MIT" ]
null
null
null
tests/test_query.py
equadon/invenio-search
14c9dc7122005189de2754c2818c76dcb5497c28
[ "MIT" ]
1
2018-09-13T04:33:10.000Z
2018-09-13T04:33:10.000Z
tests/test_query.py
equadon/invenio-search
14c9dc7122005189de2754c2818c76dcb5497c28
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Module tests.""" from __future__ import absolute_import, print_function import ...
31.511416
78
0.607303
from __future__ import absolute_import, print_function import hashlib from elasticsearch import VERSION as ES_VERSION from elasticsearch_dsl import Q, Search from flask import request from invenio_search.api import BaseRecordsSearch, DefaultFilter, RecordsSearch def test_empty_query(app): q = Records...
true
true
f7549c216e291cff5efe4800160dc4005654a7f6
3,222
py
Python
graph-db/extractor/src/biocyc/protein_parser.py
SBRG/lifelike
a7b715f38b389a585c10e6d0d067345937455c13
[ "MIT" ]
8
2022-01-28T08:43:07.000Z
2022-03-23T11:18:10.000Z
graph-db/extractor/src/biocyc/protein_parser.py
SBRG/lifelike
a7b715f38b389a585c10e6d0d067345937455c13
[ "MIT" ]
23
2022-02-14T15:25:00.000Z
2022-03-28T15:30:45.000Z
graph-db/extractor/src/biocyc/protein_parser.py
SBRG/lifelike
a7b715f38b389a585c10e6d0d067345937455c13
[ "MIT" ]
5
2022-01-28T15:45:44.000Z
2022-03-14T11:36:49.000Z
from biocyc.base_data_file_parser import BaseDataFileParser from common.constants import * from common.graph_models import * ATTR_NAMES = { 'UNIQUE-ID': (PROP_BIOCYC_ID, 'str'), 'COMMON-NAME': (PROP_NAME, 'str'), 'ABBREV-NAME': (PROP_ABBREV_NAME, 'str'), 'MOLECULAR-WEIGHT-KD': (PROP_MOL_WEIGHT_KD, 'st...
43.540541
144
0.636561
from biocyc.base_data_file_parser import BaseDataFileParser from common.constants import * from common.graph_models import * ATTR_NAMES = { 'UNIQUE-ID': (PROP_BIOCYC_ID, 'str'), 'COMMON-NAME': (PROP_NAME, 'str'), 'ABBREV-NAME': (PROP_ABBREV_NAME, 'str'), 'MOLECULAR-WEIGHT-KD': (PROP_MOL_WEIGHT_KD, 'st...
true
true
f7549e5d60f9b300d18a0e3f88cf93333ca9eee7
1,427
py
Python
app.py
chalvors/boggle_matrix_analysis
a56508e218a32aec5b97a17c89603ca40585dc32
[ "MIT" ]
null
null
null
app.py
chalvors/boggle_matrix_analysis
a56508e218a32aec5b97a17c89603ca40585dc32
[ "MIT" ]
null
null
null
app.py
chalvors/boggle_matrix_analysis
a56508e218a32aec5b97a17c89603ca40585dc32
[ "MIT" ]
null
null
null
#boggle matrix analysis main app def find_adjacent_nodes(row_index, col_index): adjacent_nodes = [] temp_num_pair = [] count = 0 while count < 9: if count == 0: temp_num_pair = [row_index-1, col_index-1] elif count == 1: temp_num_pair = [row_index-1, col_index] ...
24.603448
62
0.555011
def find_adjacent_nodes(row_index, col_index): adjacent_nodes = [] temp_num_pair = [] count = 0 while count < 9: if count == 0: temp_num_pair = [row_index-1, col_index-1] elif count == 1: temp_num_pair = [row_index-1, col_index] elif count == 2: ...
true
true
f7549f4db3e585da47ad916d4a3f750ce10ce685
7,937
py
Python
box_world_env.py
eczy/Box-World
228f06d07b3cf95e29a6f49b9abec89a612e675b
[ "MIT" ]
null
null
null
box_world_env.py
eczy/Box-World
228f06d07b3cf95e29a6f49b9abec89a612e675b
[ "MIT" ]
null
null
null
box_world_env.py
eczy/Box-World
228f06d07b3cf95e29a6f49b9abec89a612e675b
[ "MIT" ]
null
null
null
import gym from gym.spaces.discrete import Discrete from gym.spaces import Box import matplotlib.pyplot as plt from collections import deque from .boxworld_gen import * class BoxWorld(gym.Env): """Boxworld representation Args: n (int): Size of the field (n x n) goal_length (int): Number of keys t...
36.077273
121
0.557767
import gym from gym.spaces.discrete import Discrete from gym.spaces import Box import matplotlib.pyplot as plt from collections import deque from .boxworld_gen import * class BoxWorld(gym.Env): def __init__(self, n, goal_length, num_distractor, distractor_length, max_steps=10**6, collect_key=True, world=None): ...
true
true
f7549fbbdb1bbd49e77fc25124613dc952882afe
29
py
Python
hi.py
iAreth/arm
5d316ddaa5ae19f0ce972810913aa79cbcb83e05
[ "Apache-2.0" ]
null
null
null
hi.py
iAreth/arm
5d316ddaa5ae19f0ce972810913aa79cbcb83e05
[ "Apache-2.0" ]
null
null
null
hi.py
iAreth/arm
5d316ddaa5ae19f0ce972810913aa79cbcb83e05
[ "Apache-2.0" ]
null
null
null
#Numeral print("Hola Mundo")
9.666667
19
0.724138
print("Hola Mundo")
true
true
f7549fe48a36b7c7714daf9e3b46450fa5d10be0
976
py
Python
gpytorch/models/grid_inducing_variational_gp.py
techshot25/gpytorch
b4aee6f81a3428172d4914e7e0fef0e71cd1f519
[ "MIT" ]
2
2019-04-19T00:35:49.000Z
2019-04-19T02:51:49.000Z
gpytorch/models/grid_inducing_variational_gp.py
VonRosenchild/gpytorch
092d523027a844939ba85d7ea8c8c7b7511843d5
[ "MIT" ]
null
null
null
gpytorch/models/grid_inducing_variational_gp.py
VonRosenchild/gpytorch
092d523027a844939ba85d7ea8c8c7b7511843d5
[ "MIT" ]
1
2019-04-19T00:42:35.000Z
2019-04-19T00:42:35.000Z
#!/usr/bin/env python3 from ..variational import CholeskyVariationalDistribution, GridInterpolationVariationalStrategy from .abstract_variational_gp import AbstractVariationalGP import warnings class GridInducingVariationalGP(AbstractVariationalGP): def __init__(self, grid_size, grid_bounds): warnings.wa...
44.363636
114
0.753074
from ..variational import CholeskyVariationalDistribution, GridInterpolationVariationalStrategy from .abstract_variational_gp import AbstractVariationalGP import warnings class GridInducingVariationalGP(AbstractVariationalGP): def __init__(self, grid_size, grid_bounds): warnings.warn( "GridI...
true
true
f754a1a1081634d0c0b97ee6713621dc284b38c1
1,887
py
Python
mars/learn/utils/core.py
ueshin/mars
0b542974243be4e0ff239eaf49ab0fb2935f3361
[ "Apache-2.0" ]
null
null
null
mars/learn/utils/core.py
ueshin/mars
0b542974243be4e0ff239eaf49ab0fb2935f3361
[ "Apache-2.0" ]
null
null
null
mars/learn/utils/core.py
ueshin/mars
0b542974243be4e0ff239eaf49ab0fb2935f3361
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37
77
0.714361
import pandas as pd from ...tensor import tensor as astensor from ...tensor.core import TENSOR_TYPE, CHUNK_TYPE as TENSOR_CHUNK_TYPE from ...dataframe import DataFrame, Series from ...dataframe.core import DATAFRAME_TYPE, SERIES_TYPE, \ DATAFRAME_CHUNK_TYPE, SERIES_CHUNK_TYPE from ..operands import O...
true
true
f754a1c2b701a1c5908f08b13e9f6397a4f96c01
13,271
py
Python
HLAFeatureLibrary/FeatureLibrary.py
CDCgov/DCPC
c3fadef1bd6345e01a58afef051491d8ef6a7f93
[ "Apache-2.0" ]
6
2018-11-03T22:43:35.000Z
2022-02-15T17:51:33.000Z
HLAFeatureLibrary/FeatureLibrary.py
CDCgov/DCPC
c3fadef1bd6345e01a58afef051491d8ef6a7f93
[ "Apache-2.0" ]
2
2019-04-08T03:42:59.000Z
2019-10-28T13:42:59.000Z
HLAFeatureLibrary/FeatureLibrary.py
CDCgov/DCPC
c3fadef1bd6345e01a58afef051491d8ef6a7f93
[ "Apache-2.0" ]
10
2017-04-10T21:40:22.000Z
2022-02-21T16:50:10.000Z
import sys import glob import os import json from Training.Client import ServiceClient import Training.Stanford import Training.OpenNLP import Training.GATE import TokenType """ This is the Feature Library which will take the input files and user selected features. It will determine the sequence of pipeline to be cal...
36.660221
128
0.710949
import sys import glob import os import json from Training.Client import ServiceClient import Training.Stanford import Training.OpenNLP import Training.GATE import TokenType class FeatureLibrary: def __init__(self, lif_filename="", txt_filename="", ann_filename = "", output_filename="", pipeline="", pipeline_type="...
true
true
f754a2537b4304224f2d09afa52d2fab74d8ff80
56,281
py
Python
tests/__init__.py
nialov/fractopo
a59ca168950d07e1961f1009479ce71c2aa9c2d7
[ "MIT" ]
3
2021-02-08T22:28:23.000Z
2021-12-09T15:27:56.000Z
tests/__init__.py
nialov/fractopo
a59ca168950d07e1961f1009479ce71c2aa9c2d7
[ "MIT" ]
1
2022-03-25T19:16:46.000Z
2022-03-29T06:23:14.000Z
tests/__init__.py
nialov/fractopo
a59ca168950d07e1961f1009479ce71c2aa9c2d7
[ "MIT" ]
1
2021-03-11T12:08:36.000Z
2021-03-11T12:08:36.000Z
""" Test parameters i.e. sample data, known past errors, etc. """ from functools import lru_cache from pathlib import Path from traceback import print_tb from typing import List import geopandas as gpd import numpy as np import pandas as pd import pytest from click.testing import Result from hypothesis.strategies impo...
32.068946
88
0.4926
from functools import lru_cache from pathlib import Path from traceback import print_tb from typing import List import geopandas as gpd import numpy as np import pandas as pd import pytest from click.testing import Result from hypothesis.strategies import floats, integers, tuples from shapely.geometry import ( Lin...
true
true
f754a3e66bce9fcebea92bfe7e40f66e2479ffb8
4,228
py
Python
Zero/settings.py
Prashastp25/Zerolang
5d0703036591623fff2208537638f257a52ad450
[ "MIT" ]
null
null
null
Zero/settings.py
Prashastp25/Zerolang
5d0703036591623fff2208537638f257a52ad450
[ "MIT" ]
null
null
null
Zero/settings.py
Prashastp25/Zerolang
5d0703036591623fff2208537638f257a52ad450
[ "MIT" ]
null
null
null
""" Django settings for Zero project. Generated by 'django-admin startproject' using Django 3.2.6. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ fro...
27.815789
92
0.664617
from pathlib import Path import os import django_heroku BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-f8b&g4mpv@-2$2+6dvej0eecwmdk8e&dmu%1g^vek!-80v$rr3' DEBUG = False ALLOWED_HOSTS = ['https://zerolang.herokuapp.com/','127.0.0.1','localhost'] # Applicatio...
true
true
f754aa5c9dfd04e2f965479baef99fb15b319888
1,419
py
Python
bzt/modules/apiritif/ast_helpers.py
sbesedkov/taurus
2b27c781b0f5eae2f340f39809fa169917158089
[ "Apache-2.0" ]
1
2021-03-05T14:20:23.000Z
2021-03-05T14:20:23.000Z
bzt/modules/apiritif/ast_helpers.py
sbesedkov/taurus
2b27c781b0f5eae2f340f39809fa169917158089
[ "Apache-2.0" ]
null
null
null
bzt/modules/apiritif/ast_helpers.py
sbesedkov/taurus
2b27c781b0f5eae2f340f39809fa169917158089
[ "Apache-2.0" ]
null
null
null
import ast def ast_attr(fields): """ fields is string of attrs (e.g. 'self.call.me.now') or list of ast args""" if isinstance(fields, str): if "." in fields: fields_list = fields.split(".") return ast.Attribute(attr=fields_list[-1], value=ast_attr(".".join(fields_list[:-1]))) ...
31.533333
106
0.589147
import ast def ast_attr(fields): if isinstance(fields, str): if "." in fields: fields_list = fields.split(".") return ast.Attribute(attr=fields_list[-1], value=ast_attr(".".join(fields_list[:-1]))) return ast.Name(id=fields) else: if len(fields) == 1: ...
true
true
f754ab1a9c7dab7ce2ed19e42a5b899645b07217
463
py
Python
code/perceptron.py
yxnchen/SLM-Lihang-Notes
8effca5f809a1b3e563661d9a2f6774ab915e37a
[ "MIT" ]
2
2019-03-27T13:19:51.000Z
2019-10-17T16:39:25.000Z
code/perceptron.py
yxnchen/SLM-Lihang-Notes
8effca5f809a1b3e563661d9a2f6774ab915e37a
[ "MIT" ]
null
null
null
code/perceptron.py
yxnchen/SLM-Lihang-Notes
8effca5f809a1b3e563661d9a2f6774ab915e37a
[ "MIT" ]
1
2022-03-14T08:48:47.000Z
2022-03-14T08:48:47.000Z
# -*- coding: utf-8 -*- """ Created on: 2019/4/10 13:46 @author: its_cyx """ from utils import load_mldata from sklearn.linear_model import Perceptron X_train, y_train, X_test, y_test = load_mldata.fetch_mnist() # 二分类:数字5和其他 y_train_5 = (y_train == 5) y_train_5 = y_train_5.ravel() y_test_5 = (y_test == 5) y_test_5 ...
21.045455
60
0.736501
from utils import load_mldata from sklearn.linear_model import Perceptron X_train, y_train, X_test, y_test = load_mldata.fetch_mnist() y_train_5 = (y_train == 5) y_train_5 = y_train_5.ravel() y_test_5 = (y_test == 5) y_test_5 = y_test_5.ravel() classifier = Perceptron(tol=1e-3, random_state=2019) classifier.fit(X...
true
true
f754ab49e5370a01140f9ebd46496949c6d9e50d
3,791
py
Python
tests/conftest.py
ri0t/circuits
9c0b8b8d39aacb5354d4c710215e7711469faaf7
[ "MIT" ]
null
null
null
tests/conftest.py
ri0t/circuits
9c0b8b8d39aacb5354d4c710215e7711469faaf7
[ "MIT" ]
null
null
null
tests/conftest.py
ri0t/circuits
9c0b8b8d39aacb5354d4c710215e7711469faaf7
[ "MIT" ]
null
null
null
"""py.test config""" import collections import sys import threading from collections import deque from time import sleep import pytest from circuits import BaseComponent, Debugger, Manager, handler from circuits.core.manager import TIMEOUT class Watcher(BaseComponent): def init(self): self._lock = thr...
24.616883
76
0.597731
import collections import sys import threading from collections import deque from time import sleep import pytest from circuits import BaseComponent, Debugger, Manager, handler from circuits.core.manager import TIMEOUT class Watcher(BaseComponent): def init(self): self._lock = threading.Lock() ...
true
true
f754ad0128b2582bd7b88c2e016ccc37697bb9de
78,933
py
Python
powerdnsadmin/routes/admin.py
ciscoqid/PowerDNS-Admin
701a442d126ebd816d2a9728dba5d3a306ba0efb
[ "MIT" ]
null
null
null
powerdnsadmin/routes/admin.py
ciscoqid/PowerDNS-Admin
701a442d126ebd816d2a9728dba5d3a306ba0efb
[ "MIT" ]
null
null
null
powerdnsadmin/routes/admin.py
ciscoqid/PowerDNS-Admin
701a442d126ebd816d2a9728dba5d3a306ba0efb
[ "MIT" ]
null
null
null
import json import datetime import traceback import re from base64 import b64encode from ast import literal_eval from flask import Blueprint, render_template, make_response, url_for, current_app, request, redirect, jsonify, abort, flash, session from flask_login import login_required, current_user from ..decorators im...
41.239812
174
0.548681
import json import datetime import traceback import re from base64 import b64encode from ast import literal_eval from flask import Blueprint, render_template, make_response, url_for, current_app, request, redirect, jsonify, abort, flash, session from flask_login import login_required, current_user from ..decorators im...
true
true
f754aec10e1d2e82fa56db80daaaa27b661a2b2b
448
py
Python
data/scripts/templates/object/tangible/firework/shared_firework_two.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/firework/shared_firework_two.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/firework/shared_firework_two.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/firework/shared_firework_two.iff" result.attribute_template_id = -1...
26.352941
69
0.727679
true
true
f754aef24c73909f2718b71146a4de50b2166765
1,037
py
Python
pyout/tests/utils.py
vsoch/pyout
f4247e563b89a01ee8b3e167e1e75dd01b2f2632
[ "MIT" ]
2
2020-01-29T13:42:02.000Z
2020-05-13T02:26:50.000Z
pyout/tests/utils.py
vsoch/pyout
f4247e563b89a01ee8b3e167e1e75dd01b2f2632
[ "MIT" ]
132
2017-12-19T18:15:18.000Z
2022-02-03T20:28:19.000Z
pyout/tests/utils.py
kyleam/pyout
9f5bbf2cab6b131365c1cc282fcae81f01f0b18f
[ "MIT" ]
3
2017-12-19T20:57:25.000Z
2020-05-12T22:56:21.000Z
from operator import eq def assert_contains(collection, *items, **kwargs): """Check that each item in `items` is in `collection`. Parameters ---------- collection : list *items : list Query items. count : int, optional The number of times each item should occur in `collection`...
29.628571
79
0.603664
from operator import eq def assert_contains(collection, *items, **kwargs): count = kwargs.pop("count", 1) cmp = kwargs.pop("cmp", eq) for item in items: if not len([x for x in collection if cmp(x, item)]) == count: raise AssertionError("{!r} (x{}) not in {!r}".format( i...
true
true
f754afc10c4bbadb3d679b4d9670fc42dd78a35c
1,559
py
Python
p1.py
its-kz-again/AI-project
cbef083d77eb37eab4f455b5ecd35f10246d5cd6
[ "MIT" ]
null
null
null
p1.py
its-kz-again/AI-project
cbef083d77eb37eab4f455b5ecd35f10246d5cd6
[ "MIT" ]
null
null
null
p1.py
its-kz-again/AI-project
cbef083d77eb37eab4f455b5ecd35f10246d5cd6
[ "MIT" ]
null
null
null
from main import p, initial_node from solution import Solution initial_depth = int(input('please input initial depth:')) solution = Solution() def recursive_dls(node, problem, limit): if problem.goal_test(node.state): solution.print_goal(node.state) depth = 0 path = [] while node....
24.359375
64
0.550994
from main import p, initial_node from solution import Solution initial_depth = int(input('please input initial depth:')) solution = Solution() def recursive_dls(node, problem, limit): if problem.goal_test(node.state): solution.print_goal(node.state) depth = 0 path = [] while node....
true
true
f754b04031da445c5a8e9078308d90d5b15bba6c
6,642
py
Python
tests/rados/test_83571452.py
jennkimerson/cephci
d654deb0b51a9e790ec5ca7285184e044ad4fe63
[ "MIT" ]
null
null
null
tests/rados/test_83571452.py
jennkimerson/cephci
d654deb0b51a9e790ec5ca7285184e044ad4fe63
[ "MIT" ]
null
null
null
tests/rados/test_83571452.py
jennkimerson/cephci
d654deb0b51a9e790ec5ca7285184e044ad4fe63
[ "MIT" ]
null
null
null
import json import logging import random import time import traceback from ceph.rados_utils import RadosHelper log = logging.getLogger(__name__) def run(ceph_cluster, **kw): """ CEPH-83571452 RADOS: Corrupt snap info of an object and run list-inconsistent-snapset Steps: 1. create a repli...
37.106145
120
0.635351
import json import logging import random import time import traceback from ceph.rados_utils import RadosHelper log = logging.getLogger(__name__) def run(ceph_cluster, **kw): log.info("Running CEPH-83571452") log.info(run.__doc__) ceph_nodes = kw.get('ceph_nodes') config = kw.get('config') mons =...
true
true
f754b04722f12ec2f7bc1bd78e45ee3303b8b9b0
3,495
py
Python
azure-kusto-ingest/azure/kusto/ingest/_ingestion_blob_info.py
cclauss/azure-kusto-python
92e2d5c97079b96f78cf6ef1619ebe89cb4d4985
[ "MIT" ]
null
null
null
azure-kusto-ingest/azure/kusto/ingest/_ingestion_blob_info.py
cclauss/azure-kusto-python
92e2d5c97079b96f78cf6ef1619ebe89cb4d4985
[ "MIT" ]
null
null
null
azure-kusto-ingest/azure/kusto/ingest/_ingestion_blob_info.py
cclauss/azure-kusto-python
92e2d5c97079b96f78cf6ef1619ebe89cb4d4985
[ "MIT" ]
null
null
null
"""This module represents the object to write to azure queue that the DM is listening to.""" import json import uuid from datetime import datetime class _IngestionBlobInfo: def __init__(self, blob_descriptor, ingestion_properties, auth_context=None): self.properties = dict() self.properties["Blob...
51.397059
148
0.731903
import json import uuid from datetime import datetime class _IngestionBlobInfo: def __init__(self, blob_descriptor, ingestion_properties, auth_context=None): self.properties = dict() self.properties["BlobPath"] = blob_descriptor.path self.properties["RawDataSize"] = blob_descriptor.size ...
true
true
f754b0d7e7f8d8e3d1c065d9753711b4ea723bf4
1,324
py
Python
unsupervised/convs/wgin_conv.py
susheels/adgcl
2605ef8f980934c28d545f2556af5cc6ff48ed18
[ "MIT" ]
42
2021-06-30T21:05:28.000Z
2022-03-28T09:23:57.000Z
unsupervised/convs/wgin_conv.py
susheels/adgcl
2605ef8f980934c28d545f2556af5cc6ff48ed18
[ "MIT" ]
3
2021-11-04T02:49:41.000Z
2021-12-29T08:41:15.000Z
unsupervised/convs/wgin_conv.py
susheels/adgcl
2605ef8f980934c28d545f2556af5cc6ff48ed18
[ "MIT" ]
3
2022-01-25T16:24:17.000Z
2022-03-24T13:45:57.000Z
from typing import Callable, Union import torch from torch import Tensor from torch_geometric.nn.conv import MessagePassing from torch_geometric.typing import OptPairTensor, Adj, Size from unsupervised.convs.inits import reset class WGINConv(MessagePassing): def __init__(self, nn: Callable, eps: float = 0., train_...
27.583333
88
0.705438
from typing import Callable, Union import torch from torch import Tensor from torch_geometric.nn.conv import MessagePassing from torch_geometric.typing import OptPairTensor, Adj, Size from unsupervised.convs.inits import reset class WGINConv(MessagePassing): def __init__(self, nn: Callable, eps: float = 0., train_...
true
true
f754b10af043fd1808b04629c9b3d730c9153fd3
11,193
py
Python
ckanext/multilingual/plugin.py
FuhuXia/ckan
45b495785109c8c65e7586c519928fc8b826a897
[ "Apache-2.0" ]
1
2016-03-12T03:09:35.000Z
2016-03-12T03:09:35.000Z
ckanext/multilingual/plugin.py
sirca/ckan
f847c329a0b288cbef6995c848bf2ee7ccdcf281
[ "Apache-2.0" ]
null
null
null
ckanext/multilingual/plugin.py
sirca/ckan
f847c329a0b288cbef6995c848bf2ee7ccdcf281
[ "Apache-2.0" ]
1
2021-01-05T17:38:34.000Z
2021-01-05T17:38:34.000Z
import sets import ckan from ckan.plugins import SingletonPlugin, implements, IPackageController from ckan.plugins import IGroupController, IOrganizationController, ITagController import pylons from ckan.logic import get_action from pylons import config LANGS = ['en', 'fr', 'de', 'es', 'it', 'nl', 'ro', 'pt', 'pl'] d...
40.26259
82
0.617171
import sets import ckan from ckan.plugins import SingletonPlugin, implements, IPackageController from ckan.plugins import IGroupController, IOrganizationController, ITagController import pylons from ckan.logic import get_action from pylons import config LANGS = ['en', 'fr', 'de', 'es', 'it', 'nl', 'ro', 'pt', 'pl'] d...
true
true
f754b16bcb9335f601230398ad2e39c562b9fd0c
31,963
py
Python
Assignment1.py
b-bertagnolli/expense-tracker
e1dd06f087003b63b05e67e30822524a1168829f
[ "Unlicense" ]
null
null
null
Assignment1.py
b-bertagnolli/expense-tracker
e1dd06f087003b63b05e67e30822524a1168829f
[ "Unlicense" ]
null
null
null
Assignment1.py
b-bertagnolli/expense-tracker
e1dd06f087003b63b05e67e30822524a1168829f
[ "Unlicense" ]
null
null
null
from collections import Counter import sqlite3 import os from math import ceil import datetime import time def leap_year(year): """ checks year parameter to see if the given year is a leap year. :param year: accepts INT between 0-9999 :return: BOOLEAN True or False """ if year ...
35.953881
119
0.594437
from collections import Counter import sqlite3 import os from math import ceil import datetime import time def leap_year(year): if year % 400 == 0: return True elif year % 100 == 0: return False elif year % 4 == 0: return True def before_at(dy=0, mn=0, yr=0): ...
true
true
f754b1bc895e6f91b0329798600a0d6d33e937aa
7,300
py
Python
P2.py
quangmnh/UltimaTTTBot
2307a164934ac82ec318662dfe8ecb063b68e113
[ "MIT" ]
null
null
null
P2.py
quangmnh/UltimaTTTBot
2307a164934ac82ec318662dfe8ecb063b68e113
[ "MIT" ]
null
null
null
P2.py
quangmnh/UltimaTTTBot
2307a164934ac82ec318662dfe8ecb063b68e113
[ "MIT" ]
null
null
null
# // _ooOoo_ # // o8888888o # // 88" . "88 # // (| -_- |) # // O\ = /O # // ____/`---'\____ # // .' \\| |// `. # // / \\||| : |||// \ # // / _||||| -:- |||||- \ # // ...
34.761905
93
0.54411
# // .' \\| |// `. # // ."" '< `.___\_<|>_/___.' >'"". # // `=---=' import numpy as np from state import State, State_2, UltimateTTT_Move import sys import random APPROXIMATE_WIN_SCORE = 7 BIG_BOARD_WEIGHT = 23 WIN_SCORE = 10**6 POSSIBLE_WIN_SEQUENCES = np...
true
true
f754b2f731448fe9dfce3c552d1871d6e13c781e
567
py
Python
tests/constants.py
maspe36/JSONTyper
26d0bbf73c093cf8781a6946425cbede13c7c2dc
[ "MIT" ]
4
2018-12-01T19:57:59.000Z
2022-03-25T18:51:09.000Z
tests/constants.py
maspe36/JSONTyper
26d0bbf73c093cf8781a6946425cbede13c7c2dc
[ "MIT" ]
1
2018-07-21T22:52:57.000Z
2018-12-01T18:09:45.000Z
tests/constants.py
maspe36/json-typer
26d0bbf73c093cf8781a6946425cbede13c7c2dc
[ "MIT" ]
null
null
null
FILE_PATH = "test.json" EXAMPLE_JSON = '{"_type": "Holder", "_module": "tests.test_classes.holder", "objects": [{"_type": "Foo", "_module": "tests.test_classes.foo"}, {"_type": "Bar", "_module": "tests.test_classes.bar"}]}' # Formatted EXAMPLE_JSON # { # "_type": "Holder", # "_module": "tests.test_classes.hol...
27
199
0.504409
FILE_PATH = "test.json" EXAMPLE_JSON = '{"_type": "Holder", "_module": "tests.test_classes.holder", "objects": [{"_type": "Foo", "_module": "tests.test_classes.foo"}, {"_type": "Bar", "_module": "tests.test_classes.bar"}]}'
true
true
f754b30f30dbfb328780a5e62ee855649c559495
73,346
py
Python
azure/Kqlmagic/parser.py
ForrestTrepte/jupyter-Kqlmagic
3dec41e7eb44d43bad30aca64d72144895322188
[ "MIT" ]
null
null
null
azure/Kqlmagic/parser.py
ForrestTrepte/jupyter-Kqlmagic
3dec41e7eb44d43bad30aca64d72144895322188
[ "MIT" ]
null
null
null
azure/Kqlmagic/parser.py
ForrestTrepte/jupyter-Kqlmagic
3dec41e7eb44d43bad30aca64d72144895322188
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from typi...
49.225503
387
0.585035
from typing import Tuple, Dict, List, Any import itertools import configparser as CP from datetime import timedelta, datetime import dateutil.parser from traitlets import TraitType from traitlets.config.configurable import Configurable from ._debug_utils import debug_print from .dependencies import Dependenci...
true
true
f754b34c2e44f58e08a64ea95f8150d785ab9137
1,176
py
Python
HW3/ratingprank.py
miguel-mzbi/MachineLearning-DataMining
d589e89c85ccc7cba129c9a489c49f61a4298c5d
[ "MIT" ]
null
null
null
HW3/ratingprank.py
miguel-mzbi/MachineLearning-DataMining
d589e89c85ccc7cba129c9a489c49f61a4298c5d
[ "MIT" ]
null
null
null
HW3/ratingprank.py
miguel-mzbi/MachineLearning-DataMining
d589e89c85ccc7cba129c9a489c49f61a4298c5d
[ "MIT" ]
null
null
null
# Input: number of iterations L # number of labels k # matrix X of features, with n rows (samples), d columns (features) # X[i,j] is the j-th feature of the i-th sample # vector y of labels, with n rows (samples), 1 column # y[i] is the label (1 or 2 ... or k) of the i-th samp...
28.682927
74
0.437925
import numpy as np def stl(yt, l): if yt <= l+1: return -1 else: return 1 def run(L,k,X,y): n, d = X.shape theta = np.zeros((d, 1)) b = np.zeros((k-1, 1)) for l in range(k-1): b[l] = l for _ in range(1, L+1): for t in range(0, n): ...
true
true
f754b37acbedfbf78ca26577a8a4cc6216da9281
2,976
py
Python
benchexec/tools/esbmc.py
xvitovs1/benchexec
ad855061eea7847004703a031a16e8ce25d38cb5
[ "Apache-2.0" ]
2
2019-01-01T17:36:34.000Z
2019-04-05T06:19:56.000Z
benchexec/tools/esbmc.py
xvitovs1/benchexec
ad855061eea7847004703a031a16e8ce25d38cb5
[ "Apache-2.0" ]
null
null
null
benchexec/tools/esbmc.py
xvitovs1/benchexec
ad855061eea7847004703a031a16e8ce25d38cb5
[ "Apache-2.0" ]
null
null
null
""" BenchExec is a framework for reliable benchmarking. This file is part of BenchExec. Copyright (C) 2007-2015 Dirk Beyer 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 ...
31.326316
85
0.634409
import os import benchexec.util as util import benchexec.tools.template import benchexec.result as result class Tool(benchexec.tools.template.BaseTool): REQUIRED_PATHS = [ "cpachecker", "esbmc", "esbmc-wrapper.py", "tokenizer" ...
true
true
f754b3d0a104c4154c6194ab43187dfaea5cf1c9
156
py
Python
codeforces/977A.py
bartekpacia/python-training
00a1047f70ab44cc5afed8619eb4eac0e406f3e3
[ "MIT" ]
null
null
null
codeforces/977A.py
bartekpacia/python-training
00a1047f70ab44cc5afed8619eb4eac0e406f3e3
[ "MIT" ]
null
null
null
codeforces/977A.py
bartekpacia/python-training
00a1047f70ab44cc5afed8619eb4eac0e406f3e3
[ "MIT" ]
null
null
null
line = input().split(" ") n = int(line[0]) k = int(line[1]) for _ in range(k): if n % 10 == 0: n /= 10 else: n -= 1 print(int(n))
13
25
0.435897
line = input().split(" ") n = int(line[0]) k = int(line[1]) for _ in range(k): if n % 10 == 0: n /= 10 else: n -= 1 print(int(n))
true
true
f754b470cf7cad7ef208ec9f75a3ea884d5d9c8d
4,321
py
Python
flexget/components/managed_lists/lists/regexp_list/db.py
guillaumelamirand/Flexget
51945105c253a64c079eb5a62680392ce9013794
[ "MIT" ]
2
2017-03-25T10:39:25.000Z
2019-12-11T03:46:26.000Z
flexget/components/managed_lists/lists/regexp_list/db.py
guillaumelamirand/Flexget
51945105c253a64c079eb5a62680392ce9013794
[ "MIT" ]
null
null
null
flexget/components/managed_lists/lists/regexp_list/db.py
guillaumelamirand/Flexget
51945105c253a64c079eb5a62680392ce9013794
[ "MIT" ]
null
null
null
import logging import re from collections.abc import MutableSet from datetime import datetime from sqlalchemy import Column, DateTime, ForeignKey, Integer, Unicode, and_, func from sqlalchemy.orm import relationship from flexget import plugin from flexget.db_schema import versioned_base, with_session from flexget.ent...
31.311594
97
0.684795
import logging import re from collections.abc import MutableSet from datetime import datetime from sqlalchemy import Column, DateTime, ForeignKey, Integer, Unicode, and_, func from sqlalchemy.orm import relationship from flexget import plugin from flexget.db_schema import versioned_base, with_session from flexget.ent...
true
true
f754b4df4871fb27652956a2db706c3f5fe1159d
1,900
py
Python
examples/ad_manager/v201905/network_service/make_test_network.py
ale180192/googleads-python-lib
783a2d40a49956fb16ed73280708f6f9e322aa09
[ "Apache-2.0" ]
1
2019-09-30T06:36:07.000Z
2019-09-30T06:36:07.000Z
examples/ad_manager/v201905/network_service/make_test_network.py
ale180192/googleads-python-lib
783a2d40a49956fb16ed73280708f6f9e322aa09
[ "Apache-2.0" ]
null
null
null
examples/ad_manager/v201905/network_service/make_test_network.py
ale180192/googleads-python-lib
783a2d40a49956fb16ed73280708f6f9e322aa09
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
35.185185
79
0.748421
from googleads import ad_manager def main(client): network_service = client.GetService('NetworkService', version='v201905') network = network_service.makeTestNetwork() print('Test network with network code "%s" and display name "%s" ' 'created.' % (network['networkCode'], n...
true
true
f754b4eef1ded224906400e7c86ef365a165ade3
4,671
py
Python
globus_cli/commands/task/show.py
glentner/globus-cli
a6542d6824cc123f60088bf2602cd7a0fdb0e64e
[ "Apache-2.0" ]
null
null
null
globus_cli/commands/task/show.py
glentner/globus-cli
a6542d6824cc123f60088bf2602cd7a0fdb0e64e
[ "Apache-2.0" ]
null
null
null
globus_cli/commands/task/show.py
glentner/globus-cli
a6542d6824cc123f60088bf2602cd7a0fdb0e64e
[ "Apache-2.0" ]
null
null
null
import click from globus_cli.parsing import command, task_id_arg from globus_cli.safeio import FORMAT_TEXT_RECORD, formatted_print from globus_cli.services.transfer import get_client, iterable_response_to_dict COMMON_FIELDS = [ ("Label", "label"), ("Task ID", "task_id"), ("Is Paused", "is_paused"), ("...
26.539773
80
0.677585
import click from globus_cli.parsing import command, task_id_arg from globus_cli.safeio import FORMAT_TEXT_RECORD, formatted_print from globus_cli.services.transfer import get_client, iterable_response_to_dict COMMON_FIELDS = [ ("Label", "label"), ("Task ID", "task_id"), ("Is Paused", "is_paused"), ("...
true
true
f754b70793fd958c5c95543d067a2dc334f4cb71
9,858
py
Python
modules/common_builder.py
Kandongwe/RunestoneServer
f555868521b3717beec0ec42dbcbcb443c64686c
[ "MIT" ]
344
2015-10-15T20:03:57.000Z
2022-03-25T18:37:42.000Z
modules/common_builder.py
Kandongwe/RunestoneServer
f555868521b3717beec0ec42dbcbcb443c64686c
[ "MIT" ]
1,170
2015-10-15T08:17:03.000Z
2022-03-28T14:32:47.000Z
modules/common_builder.py
Kandongwe/RunestoneServer
f555868521b3717beec0ec42dbcbcb443c64686c
[ "MIT" ]
278
2015-10-12T23:44:38.000Z
2022-03-19T09:22:47.000Z
# ************************************************************ # |docname| - Routines shared between the server and WAF build # ************************************************************ # # Imports # ======= # These are listed in the order prescribed by `PEP 8 # <http://www.python.org/dev/peps/pep-0008/#imports>`_. ...
34.229167
233
0.615946
texit import os from pathlib import Path import random import subprocess from tempfile import TemporaryDirectory import threading import time _tls = threading.local() def get_sim_str_sim30( sim_mcu, elf_file, uart_out_file, optional_commands="", ): ...
true
true
f754b78b35458e3b36c142e7d8fd6d42b2ba75e3
1,833
py
Python
webStorm-APICloud/python_tools/Lib/test/test_mimetools.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
81
2017-03-13T08:24:01.000Z
2021-04-02T09:48:38.000Z
webStorm-APICloud/python_tools/Lib/test/test_mimetools.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
6
2017-04-30T08:36:55.000Z
2017-09-22T01:37:28.000Z
webStorm-APICloud/python_tools/Lib/test/test_mimetools.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
41
2017-03-18T14:11:58.000Z
2021-04-14T05:06:09.000Z
import unittest from test import test_support import string import StringIO mimetools = test_support.import_module("mimetools", deprecated=True) msgtext1 = mimetools.Message(StringIO.StringIO( """Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Foo! """)) c...
33.944444
82
0.609929
import unittest from test import test_support import string import StringIO mimetools = test_support.import_module("mimetools", deprecated=True) msgtext1 = mimetools.Message(StringIO.StringIO( """Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Foo! """)) c...
true
true
f754b7937d37d93ccd574242d0758004a73fc98b
459
py
Python
setup.py
Ar4ikov/matcensor
b899e2d54539eb3a2a80c9e5f2503af4054dbcfd
[ "Apache-2.0" ]
null
null
null
setup.py
Ar4ikov/matcensor
b899e2d54539eb3a2a80c9e5f2503af4054dbcfd
[ "Apache-2.0" ]
null
null
null
setup.py
Ar4ikov/matcensor
b899e2d54539eb3a2a80c9e5f2503af4054dbcfd
[ "Apache-2.0" ]
null
null
null
from distutils.core import setup import matcensor.main setup( name='matcensor', version=matcensor.main.__version__, packages=['matcensor'], url='https://github.com/Ar4ikov/matcensor', license='Apache 2.0', author='Nikita Archikov', author_email='bizy18588@gmail.com', descript...
28.6875
79
0.684096
from distutils.core import setup import matcensor.main setup( name='matcensor', version=matcensor.main.__version__, packages=['matcensor'], url='https://github.com/Ar4ikov/matcensor', license='Apache 2.0', author='Nikita Archikov', author_email='bizy18588@gmail.com', descript...
true
true
f754b86be040314f8b2f812255b2df211167f5ca
33,518
py
Python
packages/@jsii/python-runtime/tests/test_compliance.py
NyanKiyoshi/jsii
6c7ef9d97f46537157031d51548ba8de480a59e8
[ "Apache-2.0" ]
null
null
null
packages/@jsii/python-runtime/tests/test_compliance.py
NyanKiyoshi/jsii
6c7ef9d97f46537157031d51548ba8de480a59e8
[ "Apache-2.0" ]
null
null
null
packages/@jsii/python-runtime/tests/test_compliance.py
NyanKiyoshi/jsii
6c7ef9d97f46537157031d51548ba8de480a59e8
[ "Apache-2.0" ]
null
null
null
import platform from datetime import datetime, timezone import pytest import jsii from json import loads from jsii_calc import ( AbstractClassReturner, Add, AllTypes, AllTypesEnum, AmbiguousParameters, AsyncVirtualMethods, Bell, Calculator, ClassWithPrivateConstructorAndAutomati...
29.583407
158
0.71308
import platform from datetime import datetime, timezone import pytest import jsii from json import loads from jsii_calc import ( AbstractClassReturner, Add, AllTypes, AllTypesEnum, AmbiguousParameters, AsyncVirtualMethods, Bell, Calculator, ClassWithPrivateConstructorAndAutomati...
true
true
f754b876057a1c17f486b6ee6718ef24463529f7
21
py
Python
model/__init__.py
brendan-bassett/Tiny-Ticker
955e2bf93c660dcd20a7c7f2e7fcd624fc4221d1
[ "MIT" ]
1
2020-05-22T00:51:38.000Z
2020-05-22T00:51:38.000Z
model/__init__.py
brendan-bassett/Tiny-Ticker
955e2bf93c660dcd20a7c7f2e7fcd624fc4221d1
[ "MIT" ]
17
2020-03-01T01:23:50.000Z
2021-03-31T19:47:33.000Z
model/__init__.py
brendan-bassett/Tiny-Ticker
955e2bf93c660dcd20a7c7f2e7fcd624fc4221d1
[ "MIT" ]
2
2020-04-26T18:55:13.000Z
2020-05-04T21:51:34.000Z
"""model.__init__."""
21
21
0.619048
true
true
f754b91d6930def4472fa54b32ab5d1ee48a2789
1,253
py
Python
b2sdk/v1/__init__.py
KernelErr/b2-sdk-python
5310ebdf29f073895f34ffe58893fc50ebdd8c83
[ "MIT" ]
128
2019-02-02T17:53:23.000Z
2022-03-28T09:28:35.000Z
b2sdk/v1/__init__.py
KernelErr/b2-sdk-python
5310ebdf29f073895f34ffe58893fc50ebdd8c83
[ "MIT" ]
168
2019-02-26T22:14:16.000Z
2022-03-27T06:25:28.000Z
b2sdk/v1/__init__.py
KernelErr/b2-sdk-python
5310ebdf29f073895f34ffe58893fc50ebdd8c83
[ "MIT" ]
52
2019-01-28T16:40:56.000Z
2022-03-14T19:55:05.000Z
###################################################################### # # File: b2sdk/v1/__init__.py # # Copyright 2019 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### from b2sdk.v2 import * # noqa f...
36.852941
100
0.727055
true
true
f754b94d804473be2c311d40e37ef4a5377c8c60
1,130
py
Python
test/gst-msdk/decode/av1.py
Bin-CI/vaapi-fits
9c43ea65f7fe99f11fa3c49bb14d30f5de09f010
[ "BSD-3-Clause" ]
19
2019-03-05T01:59:05.000Z
2022-01-11T15:31:49.000Z
test/gst-msdk/decode/av1.py
Bin-CI/vaapi-fits
9c43ea65f7fe99f11fa3c49bb14d30f5de09f010
[ "BSD-3-Clause" ]
213
2019-01-29T18:44:05.000Z
2022-03-30T05:57:04.000Z
test/gst-msdk/decode/av1.py
Bin-CI/vaapi-fits
9c43ea65f7fe99f11fa3c49bb14d30f5de09f010
[ "BSD-3-Clause" ]
26
2019-01-29T05:21:22.000Z
2022-02-09T00:57:35.000Z
### ### Copyright (C) 2018-2020 Intel Corporation ### ### SPDX-License-Identifier: BSD-3-Clause ### from ....lib import * from ....lib.gstreamer.msdk.util import * from ....lib.gstreamer.msdk.decoder import DecoderTest spec = load_test_spec("av1", "decode", "8bit") @slash.requires(*platform.have_caps("decode", "av1_...
28.974359
83
0.617699
slash.requires(*platform.have_caps("decode", "av1_8")) @slash.requires(*have_gst_element("msdkav1dec")) class default(DecoderTest): def before(self): super().before() vars(self).update( metric = dict(type = "ssim", miny = 1.0, minu = 1.0, minv = 1.0), caps = platform.get_caps("d...
true
true
f754ba213d58bc05e6fd9f533332c9c56e12c7c6
4,190
py
Python
src/engine/core.py
libercapital/dados_publicos_cnpj_receita_federal
a02f98ebb1e5aa64539cc371d94ba78a49647214
[ "MIT" ]
7
2022-02-04T22:02:01.000Z
2022-03-08T22:55:29.000Z
src/engine/core.py
libercapital/dados_publicos_cnpj_receita_federal
a02f98ebb1e5aa64539cc371d94ba78a49647214
[ "MIT" ]
3
2022-02-04T22:48:01.000Z
2022-02-10T01:53:00.000Z
src/engine/core.py
libercapital/dados_publicos_cnpj_receita_federal
a02f98ebb1e5aa64539cc371d94ba78a49647214
[ "MIT" ]
1
2022-03-18T17:07:18.000Z
2022-03-18T17:07:18.000Z
import json import os from abc import ABC, abstractmethod from src import DATA_FOLDER, UNZIPED_FOLDER_NAME from src import settings from src.db_models.models import dict_db_models from src.io import CNAE_JSON_NAME, NATJU_JSON_NAME, QUAL_SOCIO_JSON_NAME, MOTIVOS_JSON_NAME, PAIS_JSON_NAME, \ MUNIC_JSON_NAME ...
40.679612
245
0.670167
import json import os from abc import ABC, abstractmethod from src import DATA_FOLDER, UNZIPED_FOLDER_NAME from src import settings from src.db_models.models import dict_db_models from src.io import CNAE_JSON_NAME, NATJU_JSON_NAME, QUAL_SOCIO_JSON_NAME, MOTIVOS_JSON_NAME, PAIS_JSON_NAME, \ MUNIC_JSON_NAME ...
true
true
f754bb1299c45cad7b819d6496b66c57514162bf
9,977
py
Python
integration-test/546-road-sort-keys-roads.py
rinnyB/vector-datasource
024909ed8245a4ad4a25c908413ba3602de6c335
[ "MIT" ]
null
null
null
integration-test/546-road-sort-keys-roads.py
rinnyB/vector-datasource
024909ed8245a4ad4a25c908413ba3602de6c335
[ "MIT" ]
2
2021-03-31T20:22:37.000Z
2021-12-13T20:50:11.000Z
integration-test/546-road-sort-keys-roads.py
rinnyB/vector-datasource
024909ed8245a4ad4a25c908413ba3602de6c335
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- from shapely.wkt import loads as wkt_loads import dsl from . import FixtureTest class RoadSortKeysRoads(FixtureTest): def test_motorway(self): # regular roads self.generate_fixtures(dsl.way(26765956, wkt_loads('LINESTRING (-122.47355250051 37.80545687798148, -122.47367862...
112.101124
1,117
0.694598
from shapely.wkt import loads as wkt_loads import dsl from . import FixtureTest class RoadSortKeysRoads(FixtureTest): def test_motorway(self): self.generate_fixtures(dsl.way(26765956, wkt_loads('LINESTRING (-122.47355250051 37.80545687798148, -122.473678623976 37.8055673159144, -122.473820108633...
true
true
f754bb652248df09e814fcc0bafcaed896447f47
2,251
py
Python
prepare_data.py
rheinonen/hw_ml
516f707ef2ec2b611333df1c1f94fcab4a9e8457
[ "MIT" ]
1
2019-09-26T17:13:25.000Z
2019-09-26T17:13:25.000Z
prepare_data.py
rheinonen/hw_ml
516f707ef2ec2b611333df1c1f94fcab4a9e8457
[ "MIT" ]
null
null
null
prepare_data.py
rheinonen/hw_ml
516f707ef2ec2b611333df1c1f94fcab4a9e8457
[ "MIT" ]
null
null
null
from boutdata.collect import collect from boututils import calculus as calc import math import numpy as np import bout_field as bf phi=bf.Field(name='phi',dx=0.1) n=bf.Field(name='n',dx=0.1) vort=bf.Field(name='vort',dx=0.1) print('collecting data') phi.collect() n.collect() vort.collect() print('computing mean fie...
22.969388
137
0.768547
from boutdata.collect import collect from boututils import calculus as calc import math import numpy as np import bout_field as bf phi=bf.Field(name='phi',dx=0.1) n=bf.Field(name='n',dx=0.1) vort=bf.Field(name='vort',dx=0.1) print('collecting data') phi.collect() n.collect() vort.collect() print('computing mean fie...
true
true
f754bc2576ea950dbf3c7c62c5607d943563e6b6
421
py
Python
parser/source/base/fetcher.py
1pkg/ReRe
83f77d2cece0fb5f6d7b86a395fcca7d4e16459f
[ "MIT" ]
1
2019-12-17T10:31:48.000Z
2019-12-17T10:31:48.000Z
parser/source/base/fetcher.py
c-pkg/ReRe
83f77d2cece0fb5f6d7b86a395fcca7d4e16459f
[ "MIT" ]
null
null
null
parser/source/base/fetcher.py
c-pkg/ReRe
83f77d2cece0fb5f6d7b86a395fcca7d4e16459f
[ "MIT" ]
1
2019-04-29T08:19:36.000Z
2019-04-29T08:19:36.000Z
from fake_useragent import UserAgent class Fetcher: TYPE_GET = 'get' TYPE_POST = 'post' DEFAULT_TIMEOUT = 5.0 def __init__(self, logger): self._logger = logger self._agent = UserAgent() self._headers = { 'dnt': '1', # Do Not Track 'user-agent': self._...
21.05
45
0.574822
from fake_useragent import UserAgent class Fetcher: TYPE_GET = 'get' TYPE_POST = 'post' DEFAULT_TIMEOUT = 5.0 def __init__(self, logger): self._logger = logger self._agent = UserAgent() self._headers = { 'dnt': '1', 'user-agent': self._agent.random, ...
true
true
f754bcef95d4fba64b94f121fca4c88a644789fd
314
py
Python
week_2/45_lesson.py
SekachVitaliy/Python
4d199a571cfedca51ec6e724e4d8c98e086e984d
[ "Unlicense" ]
null
null
null
week_2/45_lesson.py
SekachVitaliy/Python
4d199a571cfedca51ec6e724e4d8c98e086e984d
[ "Unlicense" ]
null
null
null
week_2/45_lesson.py
SekachVitaliy/Python
4d199a571cfedca51ec6e724e4d8c98e086e984d
[ "Unlicense" ]
null
null
null
""" Последовательность Фибоначчи определяется так: F[0] = 0, F[1] = 1, ..., F[n] = F[n-1] + F[n-2]. По данному числу n определите n-е число Фибоначчи F[n]. Формат ввода Вводится натуральное число n. """ num1 = num2 = 1 n = int(input()) - 2 while n > 0: num1, num2 = num2, num1 + num2 n -= 1 print(num2)
18.470588
55
0.611465
num1 = num2 = 1 n = int(input()) - 2 while n > 0: num1, num2 = num2, num1 + num2 n -= 1 print(num2)
true
true
f754be069aec428e18a86b8a6f964ad90aceb614
6,256
py
Python
p_q_search.py
ehgh/product-rationalization
42aaa8167f2981a9e2d9790ff2743310acdc3f81
[ "MIT" ]
null
null
null
p_q_search.py
ehgh/product-rationalization
42aaa8167f2981a9e2d9790ff2743310acdc3f81
[ "MIT" ]
null
null
null
p_q_search.py
ehgh/product-rationalization
42aaa8167f2981a9e2d9790ff2743310acdc3f81
[ "MIT" ]
null
null
null
import basket_completion as bc import basket_generation as bg import sys import itertools import numpy as np import pandas as pd import matplotlib.pyplot as plt import os import pandas import warnings import pickle warnings.simplefilter(action='ignore', category=FutureWarning) sys.path.insert(0, "../node2vec_embedding...
34.373626
103
0.485614
import basket_completion as bc import basket_generation as bg import sys import itertools import numpy as np import pandas as pd import matplotlib.pyplot as plt import os import pandas import warnings import pickle warnings.simplefilter(action='ignore', category=FutureWarning) sys.path.insert(0, "../node2vec_embedding...
true
true
f754bf7e7001122d7ad5e6ea0b87f9562ef23f18
5,278
py
Python
src/common/graph.py
Matej-Chmel/KVContest-data-test-suite
ff6db5a16b6653a9bb85876a88451dd8b9cc8bad
[ "CC0-1.0" ]
null
null
null
src/common/graph.py
Matej-Chmel/KVContest-data-test-suite
ff6db5a16b6653a9bb85876a88451dd8b9cc8bad
[ "CC0-1.0" ]
null
null
null
src/common/graph.py
Matej-Chmel/KVContest-data-test-suite
ff6db5a16b6653a9bb85876a88451dd8b9cc8bad
[ "CC0-1.0" ]
null
null
null
from itertools import zip_longest import matplotlib.pyplot as plt import numpy as np def extract_sublist(source, idx, default=0): """Return list from elements at idx for each sublist in source or default if such element is empty string. Args: source (list): List of sublists. idx (int): Elem...
29.819209
97
0.496969
from itertools import zip_longest import matplotlib.pyplot as plt import numpy as np def extract_sublist(source, idx, default=0): return [sublist[idx] if sublist[idx] != '' else default for sublist in source] class Bar: def __init__( self, upper=None, upper_label='', bottom=None, bottom_label='', ...
true
true
f754c01f8a1dd92ed7494be24f047c0a1fef002a
994
py
Python
src/263-UglyNumber.py
Jiezhi/myleetcode
b346e94c46da2a3033ebc8ff50e621aa179c4f62
[ "MIT" ]
1
2022-03-03T15:11:48.000Z
2022-03-03T15:11:48.000Z
src/263-UglyNumber.py
Jiezhi/myleetcode
b346e94c46da2a3033ebc8ff50e621aa179c4f62
[ "MIT" ]
null
null
null
src/263-UglyNumber.py
Jiezhi/myleetcode
b346e94c46da2a3033ebc8ff50e621aa179c4f62
[ "MIT" ]
2
2022-01-20T22:49:58.000Z
2022-01-20T22:53:13.000Z
#!/usr/bin/env python """ CREATED AT: 2021/10/7 Des: https://leetcode.com/problems/ugly-number/ GITHUB: https://github.com/Jiezhi/myleetcode Difficulty: Easy """ class Solution: def isUgly(self, n: int) -> bool: """ 1013 / 1013 test cases passed. Status: Accepted Runtime: 32 ms ...
20.708333
44
0.480885
class Solution: def isUgly(self, n: int) -> bool: while True: if n == 1: return True if n == 0: return False elif n % 2 == 0: n = n / 2 elif n % 3 == 0: n = n / 3 elif n % 5 == 0: ...
true
true
f754c256f2eeb01ea536b3b835e6f91d1503cc3f
703
py
Python
pyxform/__init__.py
gushil/pyxform
d2463fcda5ca9d430c7cdfdb63461f54025fae11
[ "BSD-2-Clause" ]
null
null
null
pyxform/__init__.py
gushil/pyxform
d2463fcda5ca9d430c7cdfdb63461f54025fae11
[ "BSD-2-Clause" ]
null
null
null
pyxform/__init__.py
gushil/pyxform
d2463fcda5ca9d430c7cdfdb63461f54025fae11
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ pyxform is a Python library designed to make authoring XForms for ODK Collect easy. """ __version__ = "1.5.0" from pyxform.builder import ( SurveyElementBuilder, create_survey, create_survey_element_from_dict, create_survey_from_path, create_survey_from_xls, ) from pyxf...
28.12
76
0.803698
__version__ = "1.5.0" from pyxform.builder import ( SurveyElementBuilder, create_survey, create_survey_element_from_dict, create_survey_from_path, create_survey_from_xls, ) from pyxform.instance import SurveyInstance from pyxform.question import InputQuestion, MultipleChoiceQuestion, Question fro...
true
true
f754c2b1577335b0e6908a04053663b6396e76ef
16,517
py
Python
wge/miniwob/state.py
stanfordnlp/wge
710c6f37434c7aaad72460ee0f8df248c1c21053
[ "Apache-2.0" ]
81
2018-02-21T15:53:38.000Z
2022-03-20T21:25:49.000Z
wge/miniwob/state.py
StephennFernandes/wge
710c6f37434c7aaad72460ee0f8df248c1c21053
[ "Apache-2.0" ]
14
2018-03-09T19:04:43.000Z
2020-12-06T13:54:40.000Z
wge/miniwob/state.py
StephennFernandes/wge
710c6f37434c7aaad72460ee0f8df248c1c21053
[ "Apache-2.0" ]
38
2018-03-09T19:42:32.000Z
2022-03-15T15:39:51.000Z
import re import numpy as np from collections import namedtuple from cStringIO import StringIO from PIL import Image from selenium.webdriver.remote.webelement import WebElement from wge.rl import State from wge.utils import Phrase class MiniWoBState(State): """MiniWoB state. Warning: The return types might...
31.824663
105
0.555488
import re import numpy as np from collections import namedtuple from cStringIO import StringIO from PIL import Image from selenium.webdriver.remote.webelement import WebElement from wge.rl import State from wge.utils import Phrase class MiniWoBState(State): HEIGHT = ROWS = 210 WIDTH = COLS = 160 P...
true
true
f754c2dbb54840d7e98c6fc8bfc5d69b96651023
4,291
py
Python
src/assignment_multiArmedBandit/epsilon_greedy_agent_bandit_mingap.py
RunzeXU/dissecting-reinforcement-learning
36b418481aed016901c2da5132d44b05074929e9
[ "MIT" ]
7
2019-07-25T08:47:51.000Z
2021-02-12T04:00:36.000Z
src/assignment_multiArmedBandit/epsilon_greedy_agent_bandit_mingap.py
RunzeXU/dissecting-reinforcement-learning
36b418481aed016901c2da5132d44b05074929e9
[ "MIT" ]
null
null
null
src/assignment_multiArmedBandit/epsilon_greedy_agent_bandit_mingap.py
RunzeXU/dissecting-reinforcement-learning
36b418481aed016901c2da5132d44b05074929e9
[ "MIT" ]
6
2019-09-23T11:16:23.000Z
2021-02-12T04:00:39.000Z
#!/usr/bin/env python # MIT License # Copyright (c) 2017 Massimiliano Patacchiola # https://mpatacchiola.github.io/blog/ # # 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...
43.785714
118
0.718947
from multi_armed_bandit import MultiArmedBandit import numpy as np import random def return_rmse(predictions, targets): return np.sqrt(((predictions - targets)**2).mean()) def return_epsilon_greedy_action(epsilon, reward_counter_array): tot_actions = reward_counter_array.shape[0] ...
true
true
f754c3e80be29451e984df5769c77a4cf4a65fe1
2,088
py
Python
python/hsml/tensorflow/model.py
ravjot28/machine-learning-api
ba11c625b4890a56c34ebf68b45fedcc467ea840
[ "Apache-2.0" ]
null
null
null
python/hsml/tensorflow/model.py
ravjot28/machine-learning-api
ba11c625b4890a56c34ebf68b45fedcc467ea840
[ "Apache-2.0" ]
null
null
null
python/hsml/tensorflow/model.py
ravjot28/machine-learning-api
ba11c625b4890a56c34ebf68b45fedcc467ea840
[ "Apache-2.0" ]
null
null
null
# # Copyright 2021 Logical Clocks AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
30.26087
80
0.639368
from hsml.model import Model import humps class Model(Model): def __init__( self, id, name, version=None, created=None, environment=None, description=None, experiment_id=None, project_name=None, experiment_project_nam...
true
true
f754c6d95ad8e212dc5e1b5e12906b6137a4bc9d
2,973
py
Python
appimagebuilder/recipe/reader.py
mssalvatore/appimage-builder
2ecb7973cedfff9d03a21258419e515c48cafe84
[ "MIT" ]
null
null
null
appimagebuilder/recipe/reader.py
mssalvatore/appimage-builder
2ecb7973cedfff9d03a21258419e515c48cafe84
[ "MIT" ]
null
null
null
appimagebuilder/recipe/reader.py
mssalvatore/appimage-builder
2ecb7973cedfff9d03a21258419e515c48cafe84
[ "MIT" ]
null
null
null
# Copyright 2020 Alexis Lopez Zubieta # # 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, publi...
38.115385
112
0.669358
import os import re import yaml from appimagebuilder.recipe.errors import RecipeError def read_recipe(path=None, data=None, tag="!ENV"): pattern = re.compile(".*?\${(\w+)}.*?") loader = yaml.SafeLoader loader.add_implicit_resolver(tag, pattern, None) def constructor_env_v...
true
true
f754c72ffb9265cfed27b504d38730f5d180db82
1,743
py
Python
util.py
eth-sri/transformation-smoothing
12a653e881a6d61c5c63a3e16d58292435486cbd
[ "Apache-2.0" ]
3
2020-11-07T18:12:50.000Z
2021-06-11T22:56:09.000Z
util.py
eth-sri/transformation-smoothing
12a653e881a6d61c5c63a3e16d58292435486cbd
[ "Apache-2.0" ]
null
null
null
util.py
eth-sri/transformation-smoothing
12a653e881a6d61c5c63a3e16d58292435486cbd
[ "Apache-2.0" ]
null
null
null
import PIL import PIL.Image from functional import compose import numpy as np import argparse lmap = compose(list, map) def str2bool(v): if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() in ('no', 'false', 'f', 'n', '0'): return False else: raise argparse...
24.208333
112
0.588067
import PIL import PIL.Image from functional import compose import numpy as np import argparse lmap = compose(list, map) def str2bool(v): if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() in ('no', 'false', 'f', 'n', '0'): return False else: raise argparse...
true
true
f754c76341fe505c8769c8811be5a42ebbab7d04
212
py
Python
healthcare/healthcare/doctype/clinical_procedure_template/test_clinical_procedure_template.py
ChillarAnand/healthcare
59a79ed2e6f7175bbdb72a2592661c3a106f4108
[ "MIT" ]
null
null
null
healthcare/healthcare/doctype/clinical_procedure_template/test_clinical_procedure_template.py
ChillarAnand/healthcare
59a79ed2e6f7175bbdb72a2592661c3a106f4108
[ "MIT" ]
null
null
null
healthcare/healthcare/doctype/clinical_procedure_template/test_clinical_procedure_template.py
ChillarAnand/healthcare
59a79ed2e6f7175bbdb72a2592661c3a106f4108
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2017, earthians and Contributors # See license.txt from __future__ import unicode_literals import unittest class TestClinicalProcedureTemplate(unittest.TestCase): pass
19.272727
55
0.778302
from __future__ import unicode_literals import unittest class TestClinicalProcedureTemplate(unittest.TestCase): pass
true
true
f754c8ab10e02105708201ce30a23a87a9507f11
517
py
Python
api/farm_health/farm_health/barns/migrations/0005_sensordatapoint_barn.py
mabjardeleza/precision-farming-ph
4a3b3c52fa540630b0496895fe97e1dce8f5b823
[ "MIT" ]
null
null
null
api/farm_health/farm_health/barns/migrations/0005_sensordatapoint_barn.py
mabjardeleza/precision-farming-ph
4a3b3c52fa540630b0496895fe97e1dce8f5b823
[ "MIT" ]
17
2020-02-11T23:49:53.000Z
2022-03-08T22:39:07.000Z
api/farm_health/farm_health/barns/migrations/0005_sensordatapoint_barn.py
mabjardeleza/precision-farming-ph
4a3b3c52fa540630b0496895fe97e1dce8f5b823
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2018-11-10 16:31 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('barns', '0004_auto_20181111_0014'), ] operations = [ migrations.AddField( model_name='sensordat...
24.619048
109
0.636364
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('barns', '0004_auto_20181111_0014'), ] operations = [ migrations.AddField( model_name='sensordatapoint', name='barn', f...
true
true
f754c8aeda9e15004b1912fb1e614ba7da81aa5d
23,804
py
Python
hddcoin/full_node/mempool_manager.py
zcomputerwiz/hddcoin-light-wallet
cf059817fff9753ce4b499edefc4deb39703248c
[ "Apache-2.0" ]
null
null
null
hddcoin/full_node/mempool_manager.py
zcomputerwiz/hddcoin-light-wallet
cf059817fff9753ce4b499edefc4deb39703248c
[ "Apache-2.0" ]
null
null
null
hddcoin/full_node/mempool_manager.py
zcomputerwiz/hddcoin-light-wallet
cf059817fff9753ce4b499edefc4deb39703248c
[ "Apache-2.0" ]
null
null
null
import asyncio import collections import dataclasses import logging import time from concurrent.futures.process import ProcessPoolExecutor from typing import Dict, List, Optional, Set, Tuple from blspy import G1Element from chiabip158 import PyBIP158 from hddcoin.util import cached_bls from hddcoin.consensus.block_rec...
44.410448
118
0.639934
import asyncio import collections import dataclasses import logging import time from concurrent.futures.process import ProcessPoolExecutor from typing import Dict, List, Optional, Set, Tuple from blspy import G1Element from chiabip158 import PyBIP158 from hddcoin.util import cached_bls from hddcoin.consensus.block_rec...
true
true
f754c928c20faa0ede7f85c08ea1af323ac47a44
7,707
py
Python
losses.py
atlan-antillia/keras-efficientdet
8dd3eccd5812063927dd32ff00a6e4164904ca76
[ "Apache-2.0" ]
null
null
null
losses.py
atlan-antillia/keras-efficientdet
8dd3eccd5812063927dd32ff00a6e4164904ca76
[ "Apache-2.0" ]
null
null
null
losses.py
atlan-antillia/keras-efficientdet
8dd3eccd5812063927dd32ff00a6e4164904ca76
[ "Apache-2.0" ]
1
2021-09-23T09:24:23.000Z
2021-09-23T09:24:23.000Z
""" Copyright 2017-2018 Fizyr (https://fizyr.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agree...
40.994681
151
0.626573
from tensorflow import keras import tensorflow as tf def focal(alpha=0.25, gamma=1.5): def _focal(y_true, y_pred): labels = y_true[:, :, :-1] anchor_state = y_true[:, :, -1] classification = y_pred indices = tf.where(keras.backend.not_equal(anchor_...
true
true
f754ca1bb79708a282fa2d0d3b546ce5964bd61d
102
py
Python
pythonteste/desafio07.py
dangiotto/Python
29a9d18d7595a5c21e65dafc39f7fd4c55d8971c
[ "MIT" ]
1
2020-10-17T03:23:59.000Z
2020-10-17T03:23:59.000Z
pythonteste/desafio07.py
dangiotto/Python
29a9d18d7595a5c21e65dafc39f7fd4c55d8971c
[ "MIT" ]
null
null
null
pythonteste/desafio07.py
dangiotto/Python
29a9d18d7595a5c21e65dafc39f7fd4c55d8971c
[ "MIT" ]
null
null
null
n1 = float(input('Nota 1: ')) n2 = float(input('Nota 2 :')) print ('Média : {:.2f}'.format((n1+n2)/2))
34
42
0.558824
n1 = float(input('Nota 1: ')) n2 = float(input('Nota 2 :')) print ('Média : {:.2f}'.format((n1+n2)/2))
true
true
f754caeb7fc5ab1b724347365836db82ce124e62
3,861
py
Python
ibis/backends/base/file/__init__.py
harsharaj96/ibis
ab3de68eb6596eca5cc7cba8c3fdb583f6143a4e
[ "Apache-2.0" ]
null
null
null
ibis/backends/base/file/__init__.py
harsharaj96/ibis
ab3de68eb6596eca5cc7cba8c3fdb583f6143a4e
[ "Apache-2.0" ]
1
2021-03-25T14:07:29.000Z
2021-03-25T14:07:29.000Z
ibis/backends/base/file/__init__.py
harsharaj96/ibis
ab3de68eb6596eca5cc7cba8c3fdb583f6143a4e
[ "Apache-2.0" ]
1
2017-11-30T13:32:23.000Z
2017-11-30T13:32:23.000Z
from pathlib import Path import ibis import ibis.expr.types as ir from ibis.backends.pandas.core import execute_and_reset class FileClient(ibis.client.Client): def __init__(self, backend, root): self.dialect = backend.dialect self.extension = backend.extension self.table_class = backend.t...
29.473282
64
0.578607
from pathlib import Path import ibis import ibis.expr.types as ir from ibis.backends.pandas.core import execute_and_reset class FileClient(ibis.client.Client): def __init__(self, backend, root): self.dialect = backend.dialect self.extension = backend.extension self.table_class = backend.t...
true
true
f754cbc6fd9a1c90799c8f1645e373f095719140
4,709
py
Python
WeeklyProblems/week2(LnkedLsts)/week2.py
chandyego84/Summer22Prep
a2258939fff3762e7fbf8950e403fb54a14efb6c
[ "MIT" ]
null
null
null
WeeklyProblems/week2(LnkedLsts)/week2.py
chandyego84/Summer22Prep
a2258939fff3762e7fbf8950e403fb54a14efb6c
[ "MIT" ]
null
null
null
WeeklyProblems/week2(LnkedLsts)/week2.py
chandyego84/Summer22Prep
a2258939fff3762e7fbf8950e403fb54a14efb6c
[ "MIT" ]
null
null
null
''' Week 2 Coding Question (Isaac Chepkwony): Reversing a sublist: Given the head of a linked list and two positions 'p' and 'q', reverse the linked list from position 'p' to 'q'. Ex.: Original List 1-> 2-> 3-> 4-> 5-> null if p=2 and q=4 Resulting List 1-> 4-> 3-> 2-> 5-> null ----------------------------------------...
33.635714
104
0.53196
class node: def __init__(self, data=None): self.data = data self.next = None class linked_list: def __init__(self): self.head = node() def append(self, data): new_node = node(data) curr = self.head if (new_node != None): if (...
true
true
f754cc008a3a30ae4637e75fdbd56776b26b148b
2,972
py
Python
docs/conf.py
bgmnbear/tornado-zh
14f4412a802fbf116bac7b046739c6541623e9ba
[ "MIT" ]
184
2015-11-18T16:11:18.000Z
2021-12-27T06:22:23.000Z
docs/conf.py
buptxtc/tornado-zh
e9e8519beb147d9e1290f6a4fa7d61123d1ecb1c
[ "MIT" ]
17
2015-11-30T15:18:37.000Z
2022-02-11T03:37:50.000Z
docs/conf.py
buptxtc/tornado-zh
e9e8519beb147d9e1290f6a4fa7d61123d1ecb1c
[ "MIT" ]
84
2015-12-16T01:19:50.000Z
2022-03-10T05:52:06.000Z
# Ensure we get the local copy of tornado instead of what's on the standard path import os import sys import time sys.path.insert(0, os.path.abspath("..")) import tornado master_doc = "index" project = "Tornado" copyright = "2009-%s, The Tornado Authors" % time.strftime("%Y") version = release = tornado.version lan...
27.018182
95
0.707268
import os import sys import time sys.path.insert(0, os.path.abspath("..")) import tornado master_doc = "index" project = "Tornado" copyright = "2009-%s, The Tornado Authors" % time.strftime("%Y") version = release = tornado.version language = 'zh_CN' extensions = [ "sphinx.ext.autodoc", "sphinx.ext.covera...
true
true
f754cd9759ed43af23db7049de22326aa8b15d09
570
py
Python
BeagleBone/Black/seqLEDs.py
beagleboard/VSX-examples
85471ca029b647eb309790c3898ea79af0348f28
[ "MIT" ]
1
2021-12-14T18:15:10.000Z
2021-12-14T18:15:10.000Z
BeagleBone/Black/seqLEDs.py
silver2row/vsx-examples
3109078d473c32703a37435cee61fad14d5735fe
[ "MIT" ]
1
2021-12-14T18:11:53.000Z
2021-12-14T18:11:53.000Z
BeagleBone/Black/seqLEDs.py
silver2row/vsx-examples
3109078d473c32703a37435cee61fad14d5735fe
[ "MIT" ]
2
2021-12-17T19:05:53.000Z
2021-12-29T08:31:30.000Z
#!/usr/bin/env python3 # //////////////////////////////////////// # // seqLED.py # // Blinks the USR LEDs in sequence. # // Wiring: # // Setup: # // See: # //////////////////////////////////////// # // Tested: rcn-ee: 2021.12.15 - BBGG - 5.15.6-bone14 import Adafruit_BBIO.GPIO as GPIO import time LEDs=4 for i in ran...
21.923077
54
0.5
import Adafruit_BBIO.GPIO as GPIO import time LEDs=4 for i in range(LEDs): GPIO.setup("USR%d" % i, GPIO.OUT) while True: for i in range(LEDs): GPIO.output("USR%d" % i, GPIO.HIGH) time.sleep(0.25) for i in range(LEDs): GPIO.output("USR%d" % i, GPIO.LOW) time.sleep...
true
true
f754ce2576c007d709c30d201270cfaf6c99c22a
2,457
py
Python
userbot/modules/randompp.py
raisnug980/King-Userbot
9df9dced64e548f7b52f60862c89a8e2b66e731f
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2022-02-17T05:47:13.000Z
2022-02-17T05:47:13.000Z
userbot/modules/randompp.py
raisnug980/King-Userbot
9df9dced64e548f7b52f60862c89a8e2b66e731f
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/randompp.py
raisnug980/King-Userbot
9df9dced64e548f7b52f60862c89a8e2b66e731f
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# credits to the respective owner xD # imported by @heyworld import requests import re import random import urllib import os from telethon.tl import functions import asyncio from userbot import CMD_HELP from userbot.events import register COLLECTION_STRING = [ "epic-fantasy-wallpaper", "castle-in-the-sky-...
22.962617
82
0.655678
import requests import re import random import urllib import os from telethon.tl import functions import asyncio from userbot import CMD_HELP from userbot.events import register COLLECTION_STRING = [ "epic-fantasy-wallpaper", "castle-in-the-sky-wallpaper", "fantasy-forest-wallpaper", "fantasy-wa...
true
true
f754ce40c03b3e8cd600d566035ff43346f2f9d1
5,316
py
Python
tests/test_link.py
kaitumisuuringute-keskus/quantipy3
4066f22d1bda38a7082fb055d8a35bef8a7cd786
[ "MIT" ]
null
null
null
tests/test_link.py
kaitumisuuringute-keskus/quantipy3
4066f22d1bda38a7082fb055d8a35bef8a7cd786
[ "MIT" ]
null
null
null
tests/test_link.py
kaitumisuuringute-keskus/quantipy3
4066f22d1bda38a7082fb055d8a35bef8a7cd786
[ "MIT" ]
null
null
null
import unittest import os.path import pandas as pd # import numpy as np from quantipy import dataframe_fix_string_types from quantipy.core.link import Link from quantipy.core.stack import Stack from quantipy.core.helpers.functions import load_json from quantipy.core.view_generators.view_maps import QuantipyViews class...
32.414634
109
0.544771
import unittest import os.path import pandas as pd from quantipy import dataframe_fix_string_types from quantipy.core.link import Link from quantipy.core.stack import Stack from quantipy.core.helpers.functions import load_json from quantipy.core.view_generators.view_maps import QuantipyViews class TestLinkObject(unit...
true
true
f754ced3330fa55280376fc644baf0f503ce8914
10,741
py
Python
superset/views/database/mixins.py
dorayx/incubator-superset
8ec61d013a8078c974c8c6b268224e4af079c48b
[ "Apache-2.0" ]
null
null
null
superset/views/database/mixins.py
dorayx/incubator-superset
8ec61d013a8078c974c8c6b268224e4af079c48b
[ "Apache-2.0" ]
21
2020-04-14T21:40:35.000Z
2021-04-16T17:04:00.000Z
superset/views/database/mixins.py
dorayx/x-superset
8ec61d013a8078c974c8c6b268224e4af079c48b
[ "Apache-2.0" ]
3
2021-05-31T16:53:52.000Z
2022-02-22T06:01:11.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
40.228464
88
0.604879
import inspect from flask import Markup from flask_babel import lazy_gettext as _ from sqlalchemy import MetaData from superset import app, security_manager from superset.exceptions import CertificateException, SupersetException from superset.security.analytics_db_safety import check_sqlalchemy_uri fr...
true
true
f754cf3af6471cd137d35244c5be540222eba764
459
py
Python
webapp/apps/taxbrain/migrations/0011_taxsaveinputs_job_ids.py
OpenSourcePolicyCenter/PolicyBrain
5edffcd5cf8bb6544afc1ed982636abe66e246e1
[ "MIT" ]
13
2017-11-07T15:54:42.000Z
2018-09-27T20:56:28.000Z
webapp/apps/taxbrain/migrations/0011_taxsaveinputs_job_ids.py
OpenSourcePolicyCenter/webapp-public
5edffcd5cf8bb6544afc1ed982636abe66e246e1
[ "MIT" ]
547
2015-08-07T21:32:51.000Z
2017-09-14T21:25:43.000Z
webapp/apps/taxbrain/migrations/0011_taxsaveinputs_job_ids.py
OpenSourcePolicyCenter/webapp-public
5edffcd5cf8bb6544afc1ed982636abe66e246e1
[ "MIT" ]
23
2015-08-07T20:55:39.000Z
2017-08-25T19:20:20.000Z
# -*- coding: utf-8 -*- from django.db import models, migrations import webapp.apps.taxbrain.models class Migration(migrations.Migration): dependencies = [ ('taxbrain', '0010_auto_20151016_0302'), ] operations = [ migrations.AddField( model_name='taxsaveinputs', ...
21.857143
104
0.62963
from django.db import models, migrations import webapp.apps.taxbrain.models class Migration(migrations.Migration): dependencies = [ ('taxbrain', '0010_auto_20151016_0302'), ] operations = [ migrations.AddField( model_name='taxsaveinputs', name='job_ids', ...
true
true
f754cfaef3b936365ae5b637807b312ff4b626dd
13,688
py
Python
tb_rest_client/api/api_pe/custom_translation_controller_api.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
30
2020-06-19T06:42:50.000Z
2021-08-23T21:16:36.000Z
tb_rest_client/api/api_pe/custom_translation_controller_api.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
25
2021-08-30T01:17:27.000Z
2022-03-16T14:10:14.000Z
tb_rest_client/api/api_pe/custom_translation_controller_api.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
23
2020-07-06T13:41:54.000Z
2021-08-23T21:04:50.000Z
# coding: utf-8 """ ThingsBoard REST API ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 OpenAPI spec version: 3.3.3PAAS-RC1 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_impo...
45.174917
680
0.651227
from __future__ import absolute_import import re import six from tb_rest_client.api_client import ApiClient class CustomTranslationControllerApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def...
true
true
f754d1013780addb3d960c65d61ece49c61616f1
198,675
py
Python
test/test_jit_cuda_fuser.py
xuhancn/pytorch
5c7d916c3d287f6c86f4d59ca1e2b8cc4cd9cd3e
[ "Intel" ]
null
null
null
test/test_jit_cuda_fuser.py
xuhancn/pytorch
5c7d916c3d287f6c86f4d59ca1e2b8cc4cd9cd3e
[ "Intel" ]
null
null
null
test/test_jit_cuda_fuser.py
xuhancn/pytorch
5c7d916c3d287f6c86f4d59ca1e2b8cc4cd9cd3e
[ "Intel" ]
null
null
null
# Owner(s): ["oncall: jit"] import unittest import os import random import enum import copy from functools import reduce import operator import warnings import torch from torch.nn import functional from torch.profiler import profile, ProfilerActivity from torch.testing._internal.codegen.random_topo_test import runDe...
41.459725
124
0.589656
import unittest import os import random import enum import copy from functools import reduce import operator import warnings import torch from torch.nn import functional from torch.profiler import profile, ProfilerActivity from torch.testing._internal.codegen.random_topo_test import runDefaultTestWithSeed from torc...
true
true
f754d10faf045725d30069a95284aa1fabb422dd
2,822
py
Python
ArucoTrackerRS.py
vincent841/cameracalib
94356af0bc14c61551710acbc287fba010b87e76
[ "MIT" ]
3
2020-11-08T18:13:02.000Z
2021-01-28T14:45:09.000Z
ArucoTrackerRS.py
vincent841/cameracalib
94356af0bc14c61551710acbc287fba010b87e76
[ "MIT" ]
null
null
null
ArucoTrackerRS.py
vincent841/cameracalib
94356af0bc14c61551710acbc287fba010b87e76
[ "MIT" ]
null
null
null
import pyrealsense2 as rs import numpy as np import cv2 import cv2.aruco as aruco import glob calibFile = cv2.FileStorage("calibData.xml", cv2.FILE_STORAGE_READ) cmnode = calibFile.getNode("cameraMatrix") mtx = cmnode.mat() dcnode = calibFile.getNode("distCoeff") dist = dcnode.mat() criteria = (cv2.TERM_CRITERIA_EPS ...
31.707865
98
0.684975
import pyrealsense2 as rs import numpy as np import cv2 import cv2.aruco as aruco import glob calibFile = cv2.FileStorage("calibData.xml", cv2.FILE_STORAGE_READ) cmnode = calibFile.getNode("cameraMatrix") mtx = cmnode.mat() dcnode = calibFile.getNode("distCoeff") dist = dcnode.mat() criteria = (cv2.TERM_CRITERIA_EPS ...
true
true
f754d196a373178371dc45ac03881fe6c062ace0
256
py
Python
votainteligente_theme_red_ciudadana/urls.py
D3AH/VotaithemeGuate
f053b59414bfd4c93e0f67d22ae1ca4184949552
[ "MIT" ]
null
null
null
votainteligente_theme_red_ciudadana/urls.py
D3AH/VotaithemeGuate
f053b59414bfd4c93e0f67d22ae1ca4184949552
[ "MIT" ]
1
2021-11-15T17:48:16.000Z
2021-11-15T17:48:16.000Z
votainteligente_theme_red_ciudadana/urls.py
D3AH/VotaithemeGuate
f053b59414bfd4c93e0f67d22ae1ca4184949552
[ "MIT" ]
2
2019-02-04T20:53:46.000Z
2019-02-16T13:47:54.000Z
from django.conf.urls import include, url from django.views.generic import TemplateView urlpatterns = [ url(r'^interes_candidato/$', TemplateView.as_view(template_name='registro_interes_candidato.html'), name='interes_candidato'), ]
25.6
78
0.738281
from django.conf.urls import include, url from django.views.generic import TemplateView urlpatterns = [ url(r'^interes_candidato/$', TemplateView.as_view(template_name='registro_interes_candidato.html'), name='interes_candidato'), ]
true
true
f754d1f45eb67995ae5a4128b353b026280b3ee7
13,214
py
Python
dynatrace/configuration_v1/notifications.py
radu-stefan-dt/api-client-python
6c70301289b0a2642f0b1ad5093c1fcdd101fe57
[ "Apache-2.0" ]
23
2021-05-19T08:01:46.000Z
2022-03-31T06:33:39.000Z
dynatrace/configuration_v1/notifications.py
radu-stefan-dt/api-client-python
6c70301289b0a2642f0b1ad5093c1fcdd101fe57
[ "Apache-2.0" ]
19
2021-05-19T20:15:47.000Z
2022-03-25T20:09:13.000Z
dynatrace/configuration_v1/notifications.py
radu-stefan-dt/api-client-python
6c70301289b0a2642f0b1ad5093c1fcdd101fe57
[ "Apache-2.0" ]
10
2021-05-24T18:35:31.000Z
2022-03-13T12:47:50.000Z
""" Copyright 2021 Dynatrace LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
47.024911
125
0.695399
from typing import List from enum import Enum from requests import Response from dynatrace.pagination import PaginatedList from dynatrace.dynatrace_object import DynatraceObject from dynatrace.http_client import HttpClient class NotificationType(Enum): EMAIL = "EMAIL" PAGER_DUTY = "PAGER_DUTY" WEBHOOK =...
true
true
f754d2af2ee3502e4bae0cd841619524c4d4793f
77
py
Python
rest_scaffold/__init__.py
gregschmit/django-rest-scaffold
f40e986359c3a43846b0e72d603a9e1c855f5597
[ "MIT" ]
2
2019-09-27T00:08:30.000Z
2020-01-11T02:07:46.000Z
rest_scaffold/__init__.py
gregschmit/django-rest-scaffold
f40e986359c3a43846b0e72d603a9e1c855f5597
[ "MIT" ]
null
null
null
rest_scaffold/__init__.py
gregschmit/django-rest-scaffold
f40e986359c3a43846b0e72d603a9e1c855f5597
[ "MIT" ]
null
null
null
__version__ = "0.1.0" default_app_config = "rest_scaffold.apps.CustomConfig"
25.666667
54
0.792208
__version__ = "0.1.0" default_app_config = "rest_scaffold.apps.CustomConfig"
true
true
f754d2b46b236a0d5442244ce0951444c9567acc
104,304
py
Python
mne/source_estimate.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
null
null
null
mne/source_estimate.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
1
2020-04-24T15:35:41.000Z
2020-04-24T15:35:41.000Z
mne/source_estimate.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
null
null
null
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Mads Jensen <mje.mads@gmail.com> # # License: BSD (3-clause) import copy import os.path as op import numpy as np from scipy imp...
38.3894
89
0.588769
import copy import os.path as op import numpy as np from scipy import linalg, sparse from scipy.sparse import coo_matrix, block_diag as sparse_block_diag from .filter import resample from .fixes import einsum from .evoked import _get_peak from .surface import read_surface, _get_ico_surface, mesh_edges from .sou...
true
true
f754d4aa60d85fc6608d6da4001358335607960e
2,579
py
Python
tests/python/test_ena_api.py
mr-c/CWL-assembly
4f98aa0ff6fd9a6c0712e35869c8a36f8bb22e52
[ "Apache-2.0" ]
null
null
null
tests/python/test_ena_api.py
mr-c/CWL-assembly
4f98aa0ff6fd9a6c0712e35869c8a36f8bb22e52
[ "Apache-2.0" ]
null
null
null
tests/python/test_ena_api.py
mr-c/CWL-assembly
4f98aa0ff6fd9a6c0712e35869c8a36f8bb22e52
[ "Apache-2.0" ]
1
2021-02-22T14:59:08.000Z
2021-02-22T14:59:08.000Z
import pytest from mock import patch from src import ena_api def get_acc(l): return [r['run_accession'] for r in l] def mocked_requests_post(*args, **kwargs): class MockResponse: def __init__(self, json_data, status_code): self.json_data = json_data self.status_code = status_...
39.676923
116
0.680884
import pytest from mock import patch from src import ena_api def get_acc(l): return [r['run_accession'] for r in l] def mocked_requests_post(*args, **kwargs): class MockResponse: def __init__(self, json_data, status_code): self.json_data = json_data self.status_code = status_...
true
true
f754d4b112ff8cef000d8352ed5a88648cdbe9fe
1,073
py
Python
scripts/simutils/extract_serial_restart_configs.py
acumb/LatticeDNAOrigami
0f2522286adc9815865d4abfc55f546da40e606b
[ "MIT" ]
5
2016-04-10T21:21:52.000Z
2018-07-21T15:33:07.000Z
scripts/simutils/extract_serial_restart_configs.py
cumberworth/LatticeDNAOrigami
71570107890e5de602cee2aacf7db9aea2907892
[ "MIT" ]
2
2020-09-16T13:07:13.000Z
2020-09-16T13:08:02.000Z
scripts/simutils/extract_serial_restart_configs.py
cumberworth/LatticeDNAOrigami
71570107890e5de602cee2aacf7db9aea2907892
[ "MIT" ]
2
2020-08-19T09:49:21.000Z
2020-08-19T10:10:06.000Z
#!/usr/bin/env python """Extract final configurations for restarting serial runs.""" import argparse import pdb import sys from origamipy import files def main(): args = parse_args() for temp in args.temps: traj_inp_filename = '{}-{}.trj'.format(args.inp_filebase, temp) traj_file = files.Un...
23.844444
79
0.643989
import argparse import pdb import sys from origamipy import files def main(): args = parse_args() for temp in args.temps: traj_inp_filename = '{}-{}.trj'.format(args.inp_filebase, temp) traj_file = files.UnparsedMultiLineStepInpFile(traj_inp_filename) traj_out_filename = '{}-{}.trj...
true
true
f754d5055edb52041f63f3896e3277d1071abfb8
348
py
Python
python/filters.py
jpk2f2/CMP_SC_4650_3
2b1a84557ac280c70d7e19e4fdc6677ce10745dc
[ "MIT" ]
null
null
null
python/filters.py
jpk2f2/CMP_SC_4650_3
2b1a84557ac280c70d7e19e4fdc6677ce10745dc
[ "MIT" ]
null
null
null
python/filters.py
jpk2f2/CMP_SC_4650_3
2b1a84557ac280c70d7e19e4fdc6677ce10745dc
[ "MIT" ]
1
2019-12-17T00:36:29.000Z
2019-12-17T00:36:29.000Z
import numpy as np # prewitt x and y filters PREWITTX = np.array([[-1, 0, 1], [-1, 0, 1], [-1, 0, 1]], np.float32) PREWITTY = np.array([[-1, -1, -1], [0, 0, 0], [1, 1, 1]], np.float32) # Sobel x and y filters SOBELX = np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]], np.float32) SOBELY = np.array([[-1, -2, -1], [0, 0, 0...
31.636364
69
0.514368
import numpy as np PREWITTX = np.array([[-1, 0, 1], [-1, 0, 1], [-1, 0, 1]], np.float32) PREWITTY = np.array([[-1, -1, -1], [0, 0, 0], [1, 1, 1]], np.float32) SOBELX = np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]], np.float32) SOBELY = np.array([[-1, -2, -1], [0, 0, 0], [1, 2, 1]], np.float32)
true
true
f754d55ff2b664acf18674f9f89557b909f8fb07
2,077
py
Python
research/cv/Pix2Pix/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
1
2021-07-03T06:52:20.000Z
2021-07-03T06:52:20.000Z
research/cv/Pix2Pix/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
research/cv/Pix2Pix/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
34.04918
110
0.646124
import os import numpy as np from PIL import Image from src.utils.config import get_args from mindspore import Tensor def save_image(img, img_path): if isinstance(img, Tensor): img = img.asnumpy() elif not isinstance(img, np.ndarray): raise ValueError("img should be Tensor or nump...
true
true