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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c3eea8396057943c4ed0c68011b18c7115b86f1
8,057
py
Python
Main_.py
snehasharma0707/License-Plate-Recognition
433251795c5fdef06ab07497d5d13537a89c1a41
[ "CNRI-Python" ]
null
null
null
Main_.py
snehasharma0707/License-Plate-Recognition
433251795c5fdef06ab07497d5d13537a89c1a41
[ "CNRI-Python" ]
null
null
null
Main_.py
snehasharma0707/License-Plate-Recognition
433251795c5fdef06ab07497d5d13537a89c1a41
[ "CNRI-Python" ]
null
null
null
import cv2 import numpy as np import os from skimage import io import requests import random import numpy as np # linear algebra import pandas as pd # data processing from tqdm import tqdm from PIL import Image import matplotlib.pyplot as plt import urllib3 import json import cv2 import matplotlib.pyplot as plt import ...
42.856383
185
0.616358
import cv2 import numpy as np import os from skimage import io import requests import random import numpy as np import pandas as pd from tqdm import tqdm from PIL import Image import matplotlib.pyplot as plt import urllib3 import json import cv2 import matplotlib.pyplot as plt import matplotlib.patches as patches fro...
true
true
1c3eeb41decde1233b668ef798b96a68f902c70a
74
py
Python
pyjsviz/lib/python3.4/weakref.py
Geege/dataviz-with-python-and-js
2cb40ae243298d22ee98675692b44e8da950a812
[ "MIT" ]
null
null
null
pyjsviz/lib/python3.4/weakref.py
Geege/dataviz-with-python-and-js
2cb40ae243298d22ee98675692b44e8da950a812
[ "MIT" ]
15
2017-03-21T00:46:04.000Z
2017-03-21T00:53:13.000Z
pyjsviz/lib/python3.4/weakref.py
Geege/dataviz-with-python-and-js
2cb40ae243298d22ee98675692b44e8da950a812
[ "MIT" ]
null
null
null
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/weakref.py
74
74
0.837838
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/weakref.py
false
true
1c3eec849a00dba654771c573292ef1c74284641
796
py
Python
celeba/networks/ConvNetworkImgClfCelebA.py
thomassutter/MoPoE
477a441ecb6c735a0b8af4d643fe3ac04c58171f
[ "MIT" ]
3
2021-05-06T18:29:09.000Z
2022-01-13T03:23:25.000Z
celeba/networks/ConvNetworkImgClfCelebA.py
thomassutter/MoPoE
477a441ecb6c735a0b8af4d643fe3ac04c58171f
[ "MIT" ]
1
2022-02-02T07:49:59.000Z
2022-02-16T08:16:20.000Z
celeba/networks/ConvNetworkImgClfCelebA.py
thomassutter/MoPoE
477a441ecb6c735a0b8af4d643fe3ac04c58171f
[ "MIT" ]
2
2021-05-13T02:20:42.000Z
2022-03-30T04:05:43.000Z
import torch import torch.nn as nn from celeba.networks.FeatureExtractorImg import FeatureExtractorImg class ClfImg(nn.Module): def __init__(self, flags): super(ClfImg, self).__init__(); self.feature_extractor = FeatureExtractorImg(flags, a=2.0, b=0.3); self.dropout = nn.Dropout(p=0.5, in...
30.615385
108
0.639447
import torch import torch.nn as nn from celeba.networks.FeatureExtractorImg import FeatureExtractorImg class ClfImg(nn.Module): def __init__(self, flags): super(ClfImg, self).__init__(); self.feature_extractor = FeatureExtractorImg(flags, a=2.0, b=0.3); self.dropout = nn.Dropout(p=0.5, in...
true
true
1c3eef416f2f4b2e50f755eea0af040fb2ac3e74
305
py
Python
2015/12/death-states-20151124/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2015/12/death-states-20151124/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2015/12/death-states-20151124/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python import base_filters COPY_GOOGLE_DOC_KEY = '1s9AJPa3Tyim5sl5xA1U0Rn3imyJ8Ycy0pjM9zNYje2A' USE_ASSETS = False # Use these variables to override the default cache timeouts for this graphic # DEFAULT_MAX_AGE = 20 # ASSETS_MAX_AGE = 300 JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
21.785714
77
0.819672
import base_filters COPY_GOOGLE_DOC_KEY = '1s9AJPa3Tyim5sl5xA1U0Rn3imyJ8Ycy0pjM9zNYje2A' USE_ASSETS = False JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
true
true
1c3eef61636dfc6d89773110c3f2c0042d21da47
5,720
py
Python
prompty/vcs.py
tnhung2011/prompty
e2a08b235675d469153b233b86e535551b54fba6
[ "MIT" ]
5
2016-01-07T15:15:48.000Z
2018-04-04T11:32:06.000Z
prompty/vcs.py
tnhung2011/prompty
e2a08b235675d469153b233b86e535551b54fba6
[ "MIT" ]
21
2015-05-20T11:30:43.000Z
2020-08-01T14:09:19.000Z
prompty/vcs.py
tnhung2011/prompty
e2a08b235675d469153b233b86e535551b54fba6
[ "MIT" ]
1
2021-12-18T13:25:25.000Z
2021-12-18T13:25:25.000Z
#!/usr/bin/env python # vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc ABC = abc.ABCMeta(str('ABC'), (object,), {'__slots__': ()}) # noqa, compatible...
29.637306
101
0.589685
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc ABC = abc.ABCMeta(str('ABC'), (object,), {'__slots__': ()}) from builtins import str import subprocess from prompty import functionBase class VCS(objec...
true
true
1c3eef73558629c63b8748c6c61ec75dac6338d5
338
py
Python
votepredictapp/urls.py
davidhammaker/votepredictbackend
766467f85faf8a1d11da8c798b30904af9268504
[ "MIT" ]
null
null
null
votepredictapp/urls.py
davidhammaker/votepredictbackend
766467f85faf8a1d11da8c798b30904af9268504
[ "MIT" ]
null
null
null
votepredictapp/urls.py
davidhammaker/votepredictbackend
766467f85faf8a1d11da8c798b30904af9268504
[ "MIT" ]
null
null
null
from django.urls import include, path from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.register(r"questions", views.QuestionViewSet) urlpatterns = [ path("", include(router.urls)), path("reply/", views.ReplyView.as_view()), path("totals/", views.TotalsV...
24.142857
52
0.730769
from django.urls import include, path from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.register(r"questions", views.QuestionViewSet) urlpatterns = [ path("", include(router.urls)), path("reply/", views.ReplyView.as_view()), path("totals/", views.TotalsV...
true
true
1c3eef7ba4a7c4fdc2c91473e4bd1ee6d01d74ee
672
py
Python
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/fileinput/fileinput_change_subnet_noisy.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/fileinput/fileinput_change_subnet_noisy.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/fileinput/fileinput_change_subnet_noisy.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
# Copyright (c) 2010 Doug Hellmann. All rights reserved. # """Simplistic sed implementation """ # end_pymotw_header import fileinput import glob import sys from_base = sys.argv[1] to_base = sys.argv[2] files = sys.argv[3:] for line in fileinput.input(files, inplace=True): if fileinput.isfirstline(): sys...
28
88
0.709821
import fileinput import glob import sys from_base = sys.argv[1] to_base = sys.argv[2] files = sys.argv[3:] for line in fileinput.input(files, inplace=True): if fileinput.isfirstline(): sys.stderr.write("Started processing {}\n".format(fileinput.filename())) sys.stderr.write("Directory contains...
true
true
1c3eefbea593be09972f9ea725f0661fe763ffae
723
py
Python
generators/simple/templates/src/platform/extensionRunner/util.py
jfallaire/generator-ps-boilerplate-project
36f544a54442c191430451715425da98ea76a63e
[ "MIT" ]
2
2019-07-24T16:00:51.000Z
2019-10-03T18:36:20.000Z
generators/simple/templates/src/platform/extensionRunner/util.py
jfallaire/generator-ps-boilerplate-project
36f544a54442c191430451715425da98ea76a63e
[ "MIT" ]
19
2019-06-20T21:58:44.000Z
2020-11-05T13:48:42.000Z
generators/simple/templates/src/platform/extensionRunner/util.py
jfallaire/generator-ps-boilerplate-project
36f544a54442c191430451715425da98ea76a63e
[ "MIT" ]
1
2019-06-22T17:30:42.000Z
2019-06-22T17:30:42.000Z
import os import json import tempfile import zlib import base64 import urllib.request def zlib_compress_str(content): outdata = zlib.compress(content, zlib.Z_BEST_COMPRESSION) encodedData = base64.encodebytes(outdata) #print('zlib compressed >>> {}'.format(encodedData)) return encodedData ...
27.807692
149
0.672199
import os import json import tempfile import zlib import base64 import urllib.request def zlib_compress_str(content): outdata = zlib.compress(content, zlib.Z_BEST_COMPRESSION) encodedData = base64.encodebytes(outdata) return encodedData def get_html_content(url): hdr = {'User-Agent...
true
true
1c3ef042bcfda68952527fd044dab09d320c8203
13,289
py
Python
configs/example/memtest.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
765
2015-01-14T16:17:04.000Z
2022-03-28T07:46:28.000Z
configs/example/memtest.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
30
2015-01-01T21:49:38.000Z
2021-04-20T19:01:54.000Z
configs/example/memtest.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
807
2015-01-06T09:55:38.000Z
2022-03-30T10:23:36.000Z
# Copyright (c) 2015, 2018 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the function...
41.270186
79
0.662503
import argparse import random import sys import m5 from m5.objects import * parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("-a", "--atomic", action="store_true", help="Use atomic (non-...
true
true
1c3ef05626d3001d6615345a37559166642dbf90
2,329
py
Python
src/tt_xsolla/tt_xsolla/service.py
Alacrate/the-tale
43b211f3a99e93964e95abc20a8ed649a205ffcf
[ "BSD-3-Clause" ]
85
2017-11-21T12:22:02.000Z
2022-03-27T23:07:17.000Z
src/tt_xsolla/tt_xsolla/service.py
Alacrate/the-tale
43b211f3a99e93964e95abc20a8ed649a205ffcf
[ "BSD-3-Clause" ]
545
2017-11-04T14:15:04.000Z
2022-03-27T14:19:27.000Z
src/tt_xsolla/tt_xsolla/service.py
Alacrate/the-tale
43b211f3a99e93964e95abc20a8ed649a205ffcf
[ "BSD-3-Clause" ]
45
2017-11-11T12:36:30.000Z
2022-02-25T06:10:44.000Z
import logging import asyncio from aiohttp import web from tt_web import log from tt_web import postgresql from tt_web.common import event from . import conf from . import logic PAYMENT_PROCESSING_TASK = None async def start_payment_processing(config): global PAYMENT_PROCESSING_TASK async def process_p...
22.833333
95
0.738085
import logging import asyncio from aiohttp import web from tt_web import log from tt_web import postgresql from tt_web.common import event from . import conf from . import logic PAYMENT_PROCESSING_TASK = None async def start_payment_processing(config): global PAYMENT_PROCESSING_TASK async def process_p...
true
true
1c3ef07816a957f2cca01e78a60ccc6f7ff6c908
3,936
py
Python
tests/rbac/common/addresser/task_admin_tests.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
75
2018-04-06T09:13:34.000Z
2020-05-18T18:59:47.000Z
tests/rbac/common/addresser/task_admin_tests.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
989
2018-04-18T21:01:56.000Z
2019-10-23T15:37:09.000Z
tests/rbac/common/addresser/task_admin_tests.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
72
2018-04-13T18:29:12.000Z
2020-05-29T06:00:33.000Z
# Copyright 2019 Contributors to Hyperledger Sawtooth # # 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 ...
40.163265
88
0.689278
import pytest from rbac.common import addresser from rbac.common.logs import get_default_logger from tests.rbac.common.assertions import TestAssertions LOGGER = get_default_logger(__name__) @pytest.mark.addressing @pytest.mark.library class TestTaskAdminAddresser(TestAssertions): def test_address...
true
true
1c3ef0d84790c32f8626dfe621ea95c9af18d260
1,646
py
Python
logging/logging.py
badgeteam/micropython-lib
fca0235c166ebbada489d88c42fc549267832797
[ "PSF-2.0" ]
6
2017-12-31T16:19:16.000Z
2021-04-26T02:03:30.000Z
logging/logging.py
badgeteam/micropython-lib
fca0235c166ebbada489d88c42fc549267832797
[ "PSF-2.0" ]
1
2020-06-24T02:37:58.000Z
2020-06-24T02:37:58.000Z
logging/logging.py
badgeteam/micropython-lib
fca0235c166ebbada489d88c42fc549267832797
[ "PSF-2.0" ]
3
2019-07-01T18:29:54.000Z
2020-06-24T20:15:10.000Z
import sys CRITICAL = 50 ERROR = 40 WARNING = 30 INFO = 20 DEBUG = 10 NOTSET = 0 _level_dict = { CRITICAL: "CRIT", ERROR: "ERROR", WARNING: "WARN", INFO: "INFO", DEBUG: "DEBUG", } _stream = sys.stderr class Logger: def __init__(self, name): self.level = NOTSET s...
21.657895
96
0.595383
import sys CRITICAL = 50 ERROR = 40 WARNING = 30 INFO = 20 DEBUG = 10 NOTSET = 0 _level_dict = { CRITICAL: "CRIT", ERROR: "ERROR", WARNING: "WARN", INFO: "INFO", DEBUG: "DEBUG", } _stream = sys.stderr class Logger: def __init__(self, name): self.level = NOTSET s...
true
true
1c3ef0d87119236f2d3e758926f3d1b3c3e375d9
625
py
Python
lab/refactoring/decompose_conditional.py
ikejs/SPD-2.31-Testing-and-Architecture
0f1cc3dc726d748cbd3ae75b336c42697a4b9d82
[ "MIT" ]
null
null
null
lab/refactoring/decompose_conditional.py
ikejs/SPD-2.31-Testing-and-Architecture
0f1cc3dc726d748cbd3ae75b336c42697a4b9d82
[ "MIT" ]
null
null
null
lab/refactoring/decompose_conditional.py
ikejs/SPD-2.31-Testing-and-Architecture
0f1cc3dc726d748cbd3ae75b336c42697a4b9d82
[ "MIT" ]
null
null
null
# By Kami Bigdely # Decompose conditional: You have a complicated conditional(if-then-else) statement. Extract # methods from the condition, then part, and else part(s). def make_alert_sound(): print('made alert sound.') def make_accept_sound(): print('made acceptance sound') ingredients = [ 'sodium benzo...
21.551724
92
0.6432
def make_alert_sound(): print('made alert sound.') def make_accept_sound(): print('made acceptance sound') ingredients = [ 'sodium benzoate' ] toxins = [ 'sodium nitrate', 'sodium benzoate', 'sodium oxide' ] if toxins in ingredients: print('!!!') print('there is a toxin in the fo...
true
true
1c3ef25388e77a1795dd23955ad7fc87a0bb0ddd
12,693
py
Python
torch/tensor.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
null
null
null
torch/tensor.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
null
null
null
torch/tensor.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
null
null
null
import torch from . import _tensor_str from ._utils import _type, _cuda, _range, _rebuild_tensor import sys class _TensorBase(object): #: bool: True if this is a CUDA tensor is_cuda = False is_sparse = False def new(self, *args, **kwargs): """Constructs a new tensor of the same data type.""" ...
32.134177
105
0.573308
import torch from . import _tensor_str from ._utils import _type, _cuda, _range, _rebuild_tensor import sys class _TensorBase(object): is_cuda = False is_sparse = False def new(self, *args, **kwargs): return self.__class__(*args, **kwargs) def type_as(self, tensor): return self....
true
true
1c3ef48bc5e3786c556eee182690af45b40856ac
1,854
py
Python
secao04_factory/abstract_factory.py
ravellys/design_patterns_python
6c29d1d77d4522255e10eca237f8f95b69d7210c
[ "MIT" ]
null
null
null
secao04_factory/abstract_factory.py
ravellys/design_patterns_python
6c29d1d77d4522255e10eca237f8f95b69d7210c
[ "MIT" ]
null
null
null
secao04_factory/abstract_factory.py
ravellys/design_patterns_python
6c29d1d77d4522255e10eca237f8f95b69d7210c
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod # Abstract factory class PizzaFactory(ABC): @abstractmethod def criar_pizza(self): pass @abstractmethod def criar_pizza_vegana(self): pass # Concrect Factory class PizzaBrasileiraFactory(PizzaFactory): def criar_pizza(self): return Pi...
22.888889
106
0.686084
from abc import ABC, abstractmethod class PizzaFactory(ABC): @abstractmethod def criar_pizza(self): pass @abstractmethod def criar_pizza_vegana(self): pass class PizzaBrasileiraFactory(PizzaFactory): def criar_pizza(self): return PizzaCamarao() def criar_pizza_ve...
true
true
1c3ef51e2c749fd5a1651a2c69a1893b34771000
3,136
py
Python
examples/item.py
djeebus/couchbase-python-client
fee7a4ea368d4d606601821973e5675b90ff0f7c
[ "Apache-2.0" ]
null
null
null
examples/item.py
djeebus/couchbase-python-client
fee7a4ea368d4d606601821973e5675b90ff0f7c
[ "Apache-2.0" ]
null
null
null
examples/item.py
djeebus/couchbase-python-client
fee7a4ea368d4d606601821973e5675b90ff0f7c
[ "Apache-2.0" ]
null
null
null
# Copyright 2013, Couchbase, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
27.508772
74
0.644452
from couchbase.items import Item, ItemSequence from couchbase.bucket import Bucket from pprint import pprint from random import randint class Player(Item): def __init__(self, name, create_structure=False): super(Player, self).__init__(name) if create_structure: self.value...
false
true
1c3ef5954090ff2844946ed9928596b498fc65ba
3,200
py
Python
sqlalchemy_collectd/client/tests/test_plugin.py
jvanasco/sqlalchemy-collectd
8fb2aa04aa66b3b4edfdf04dce1eca70b4a1ab5e
[ "MIT" ]
null
null
null
sqlalchemy_collectd/client/tests/test_plugin.py
jvanasco/sqlalchemy-collectd
8fb2aa04aa66b3b4edfdf04dce1eca70b4a1ab5e
[ "MIT" ]
null
null
null
sqlalchemy_collectd/client/tests/test_plugin.py
jvanasco/sqlalchemy-collectd
8fb2aa04aa66b3b4edfdf04dce1eca70b4a1ab5e
[ "MIT" ]
null
null
null
import unittest import mock from sqlalchemy.engine import url as sqla_url from .. import plugin class PluginTest(unittest.TestCase): def test_start_no_args(self): with mock.patch.object(plugin, "start_plugin") as start_plugin: url = sqla_url.URL("mysql+pymysql://scott:tiger@localhost/") ...
36.781609
79
0.584688
import unittest import mock from sqlalchemy.engine import url as sqla_url from .. import plugin class PluginTest(unittest.TestCase): def test_start_no_args(self): with mock.patch.object(plugin, "start_plugin") as start_plugin: url = sqla_url.URL("mysql+pymysql://scott:tiger@localhost/") ...
true
true
1c3ef6016330ed5b1789e5f911abf858f0b1bf46
8,016
py
Python
homeassistant/components/tibber/sensor.py
kdschlosser/home-assistant
a94a24f6f83508642e220fadf2799789dc32a25b
[ "Apache-2.0" ]
2
2020-06-17T01:23:01.000Z
2020-06-18T22:17:14.000Z
homeassistant/components/tibber/sensor.py
kdschlosser/home-assistant
a94a24f6f83508642e220fadf2799789dc32a25b
[ "Apache-2.0" ]
1
2019-02-09T15:44:11.000Z
2019-02-09T15:44:11.000Z
homeassistant/components/tibber/sensor.py
kdschlosser/home-assistant
a94a24f6f83508642e220fadf2799789dc32a25b
[ "Apache-2.0" ]
1
2019-08-13T11:54:30.000Z
2019-08-13T11:54:30.000Z
""" Support for Tibber. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.tibber/ """ import asyncio import logging from datetime import timedelta import aiohttp from homeassistant.components.tibber import DOMAIN as TIBBER_DOMAIN from homeassistan...
33.261411
78
0.631362
import asyncio import logging from datetime import timedelta import aiohttp from homeassistant.components.tibber import DOMAIN as TIBBER_DOMAIN from homeassistant.exceptions import PlatformNotReady from homeassistant.helpers.entity import Entity from homeassistant.util import dt as dt_util from homeassistant.util im...
true
true
1c3ef6e63a51101f65832c61279954bc32fb9cee
432
py
Python
src/0973_K_closest_points_to_origin.py
hariharanragothaman/leetcode-solutions
44e759f80d3c9df382fdf8d694d6378881e3649d
[ "Apache-2.0" ]
2
2021-04-21T07:59:42.000Z
2021-06-17T17:14:26.000Z
src/0973_K_closest_points_to_origin.py
hariharanragothaman/pyrevise-leetcode
44e759f80d3c9df382fdf8d694d6378881e3649d
[ "Apache-2.0" ]
null
null
null
src/0973_K_closest_points_to_origin.py
hariharanragothaman/pyrevise-leetcode
44e759f80d3c9df382fdf8d694d6378881e3649d
[ "Apache-2.0" ]
null
null
null
""" Given an array of points, find the number of closest points to origin """ from typing import List import heapq def KClosest_using_sort(points: List[List[int]], k: int) -> List[List[int]]: points = sorted(points, lambda P: P[0] ** 2 + P[1] ** 2) return points[:k] def KClosest_using_heap(points: List[Lis...
27
76
0.652778
from typing import List import heapq def KClosest_using_sort(points: List[List[int]], k: int) -> List[List[int]]: points = sorted(points, lambda P: P[0] ** 2 + P[1] ** 2) return points[:k] def KClosest_using_heap(points: List[List[int]], k: int) -> List[List[int]]: return heapq.nsmallest(k, points, key...
true
true
1c3ef75effc0c8895dcb921e1215e239572fd9cc
4,592
py
Python
python/oneflow/compatible/single_client/nn/optimizer/sgd.py
mosout/oneflow
afbb221d900f1a340568ae2462b2022f8fcc4b3d
[ "Apache-2.0" ]
1
2022-01-19T07:50:28.000Z
2022-01-19T07:50:28.000Z
python/oneflow/compatible/single_client/nn/optimizer/sgd.py
mosout/oneflow
afbb221d900f1a340568ae2462b2022f8fcc4b3d
[ "Apache-2.0" ]
null
null
null
python/oneflow/compatible/single_client/nn/optimizer/sgd.py
mosout/oneflow
afbb221d900f1a340568ae2462b2022f8fcc4b3d
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
37.639344
135
0.564895
import collections from typing import Callable, Dict, Iterator, List, Union from oneflow.compatible import single_client as flow from oneflow.compatible.single_client.nn.parameter import Parameter from .optimizer import Optimizer, ParamGroup class SGD(Optimizer): def __init__( self, parameters:...
true
true
1c3ef780c4c334aeb6fe7c61688c81c9940bc419
14,109
py
Python
test/search_api/filters/test_search_api_where_filter.py
antolinos/datagateway-api
c6aa15ea01545f7a8e58e656c569523c60f7e4ef
[ "Apache-2.0" ]
null
null
null
test/search_api/filters/test_search_api_where_filter.py
antolinos/datagateway-api
c6aa15ea01545f7a8e58e656c569523c60f7e4ef
[ "Apache-2.0" ]
null
null
null
test/search_api/filters/test_search_api_where_filter.py
antolinos/datagateway-api
c6aa15ea01545f7a8e58e656c569523c60f7e4ef
[ "Apache-2.0" ]
null
null
null
import pytest from datagateway_api.src.common.date_handler import DateHandler from datagateway_api.src.common.filter_order_handler import FilterOrderHandler from datagateway_api.src.search_api.filters import SearchAPIWhereFilter from datagateway_api.src.search_api.nested_where_filters import NestedWhereFilters from da...
44.507886
88
0.495995
import pytest from datagateway_api.src.common.date_handler import DateHandler from datagateway_api.src.common.filter_order_handler import FilterOrderHandler from datagateway_api.src.search_api.filters import SearchAPIWhereFilter from datagateway_api.src.search_api.nested_where_filters import NestedWhereFilters from da...
true
true
1c3ef815b3a802937a031342ebb24aaf30ca0421
406,377
py
Python
Data/scigrid-de/pypower/scigrid_2011_01_06_19.py
thanever/SOC
9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4
[ "MIT" ]
null
null
null
Data/scigrid-de/pypower/scigrid_2011_01_06_19.py
thanever/SOC
9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4
[ "MIT" ]
null
null
null
Data/scigrid-de/pypower/scigrid_2011_01_06_19.py
thanever/SOC
9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4
[ "MIT" ]
null
null
null
from numpy import array def scigrid_2011_01_06_19(): ppc = {"version": '2'} ppc["baseMVA"] = 100.0 ppc["bus"] = array([ [586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ], [589, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ], [590, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1,...
70.933322
137
0.463252
from numpy import array def scigrid_2011_01_06_19(): ppc = {"version": '2'} ppc["baseMVA"] = 100.0 ppc["bus"] = array([ [586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ], [589, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ], [590, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1,...
true
true
1c3ef8d5d2ecd45e965099d0b652f213cd2a3600
1,333
py
Python
var/spack/repos/builtin/packages/gnat/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2018-11-27T03:39:44.000Z
2021-09-06T15:50:35.000Z
var/spack/repos/builtin/packages/gnat/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-01-11T20:11:52.000Z
2019-01-11T20:11:52.000Z
var/spack/repos/builtin/packages/gnat/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-10-14T14:20:17.000Z
2020-10-14T14:20:17.000Z
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Gnat(MakefilePackage): """The GNAT Ada compiler. Ada is a modern programming language desi...
40.393939
79
0.71943
from spack import * class Gnat(MakefilePackage): homepage = "https://libre.adacore.com/tools/gnat-gpl-edition/" # There may actually be a way to install GNAT from source. If you go to # the GNAT Download page: https://libre.adacore.com/download/ # select "Free Software or Academic Develop...
true
true
1c3ef8da034054faf6b90a5fb4f4bab244f16ddb
8,709
py
Python
nncf/torch/tensor_statistics/collectors.py
MaximProshin/nncf
2290d2f4cebcf6749e419dc76850e7bd8b7d8da1
[ "Apache-2.0" ]
null
null
null
nncf/torch/tensor_statistics/collectors.py
MaximProshin/nncf
2290d2f4cebcf6749e419dc76850e7bd8b7d8da1
[ "Apache-2.0" ]
null
null
null
nncf/torch/tensor_statistics/collectors.py
MaximProshin/nncf
2290d2f4cebcf6749e419dc76850e7bd8b7d8da1
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2022 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
43.328358
104
0.722701
from typing import Union, List, Deque import torch from nncf.common.tensor import NNCFTensor from nncf.common.tensor import TensorElementsType from nncf.common.tensor_statistics.collectors import MinMaxStatisticCollector from nncf.common.tensor_statistics.collectors import NNCFCollectorTensorProcessor from nncf.comm...
true
true
1c3efa4ec23c095d461e41407238996c900843aa
548
py
Python
logic-programming/11-lesson/homework.py
BrendanGlancy/akron
3e067ce2e622f4c6d18aecb62402eb888b0bdb7a
[ "MIT" ]
3
2021-12-07T22:24:09.000Z
2022-02-25T01:11:40.000Z
logic-programming/11-lesson/homework.py
BrendanGlancy/akron
3e067ce2e622f4c6d18aecb62402eb888b0bdb7a
[ "MIT" ]
null
null
null
logic-programming/11-lesson/homework.py
BrendanGlancy/akron
3e067ce2e622f4c6d18aecb62402eb888b0bdb7a
[ "MIT" ]
null
null
null
""" Complete Programming Review Questions 1-10 page 464 Programming Exercises 1 on page 467. 1. B 2. C 3. D 4. A 5. B 6. C 7. A 8. B 9. A 10. B """ # Design a program that asks the user to enter 10 golf scores. The scores should be stored in an Integer array. Sort the array in ascending order and display its content...
18.896552
171
0.638686
def main(): scores = [] for i in range(10): print('Enter golf score ',i) score = int(input(" ")) scores.append(score) scores.sort() print(scores) if __name__ == "__main__": main()
true
true
1c3efabc4da2175b4ec67c8a48bd257fa8e46bd9
5,107
py
Python
action_prediction_dataset.py
yukw777/GATA-public
e8c424093377874b395abaf9662f6fb2c553e0f5
[ "MIT" ]
26
2020-02-24T01:35:32.000Z
2022-02-17T03:57:06.000Z
action_prediction_dataset.py
yukw777/GATA-public
e8c424093377874b395abaf9662f6fb2c553e0f5
[ "MIT" ]
21
2020-03-11T20:07:01.000Z
2021-11-14T03:12:17.000Z
action_prediction_dataset.py
yukw777/GATA-public
e8c424093377874b395abaf9662f6fb2c553e0f5
[ "MIT" ]
12
2020-03-02T22:50:35.000Z
2022-03-08T19:10:51.000Z
import os import json from os.path import join as pjoin from tqdm import tqdm import numpy as np import gym from graph_dataset import GraphDataset class APData(gym.Env): FILENAMES_MAP = { "full": { "train": "train.full.json", "valid": "valid.full.json", "test": "tes...
37.277372
108
0.60329
import os import json from os.path import join as pjoin from tqdm import tqdm import numpy as np import gym from graph_dataset import GraphDataset class APData(gym.Env): FILENAMES_MAP = { "full": { "train": "train.full.json", "valid": "valid.full.json", "test": "tes...
true
true
1c3efb94a5faeb625776595e939cf45335985bee
161
py
Python
tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_LinearTrend_BestCycle_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_LinearTrend_BestCycle_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_LinearTrend_BestCycle_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Integration'] , ['LinearTrend'] , ['BestCycle'] , ['MLP'] );
40.25
83
0.751553
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Integration'] , ['LinearTrend'] , ['BestCycle'] , ['MLP'] );
true
true
1c3efbd6ca771f960b74e6c39b6eb04038e73e32
2,519
py
Python
experiments/06_preprocessing/plot_histograms.py
fsschneider/cockpit-experiments
a9eaf3dc5da5a58356ac0eef25a11235bf0891c4
[ "MIT" ]
7
2021-11-02T11:23:49.000Z
2022-02-16T13:25:47.000Z
experiments/06_preprocessing/plot_histograms.py
fsschneider/cockpit-experiments
a9eaf3dc5da5a58356ac0eef25a11235bf0891c4
[ "MIT" ]
null
null
null
experiments/06_preprocessing/plot_histograms.py
fsschneider/cockpit-experiments
a9eaf3dc5da5a58356ac0eef25a11235bf0891c4
[ "MIT" ]
2
2021-11-02T11:23:54.000Z
2022-02-02T15:56:03.000Z
"""Plot the histograms for different pre-processing strategies.""" import os import sys import matplotlib as mpl import matplotlib.pyplot as plt import run_histograms_cifar10 import run_histograms_imagenet import seaborn as sns from cockpit import CockpitPlotter from cockpit.instruments.histogram_2d_gauge import _get...
27.681319
79
0.709408
import os import sys import matplotlib as mpl import matplotlib.pyplot as plt import run_histograms_cifar10 import run_histograms_imagenet import seaborn as sns from cockpit import CockpitPlotter from cockpit.instruments.histogram_2d_gauge import _get_xmargin_histogram_data sys.path.append(os.getcwd()) from experime...
true
true
1c3efc920c9907cf51d01d38531a5b3c94401441
1,139
py
Python
plot.py
s-gv/pymotoplus
873b967747d98d9c9e066496547aa09ce164c8a1
[ "BSD-2-Clause" ]
2
2021-08-16T07:07:43.000Z
2022-01-24T16:05:35.000Z
plot.py
s-gv/pymotoplus
873b967747d98d9c9e066496547aa09ce164c8a1
[ "BSD-2-Clause" ]
null
null
null
plot.py
s-gv/pymotoplus
873b967747d98d9c9e066496547aa09ce164c8a1
[ "BSD-2-Clause" ]
1
2021-07-19T02:28:10.000Z
2021-07-19T02:28:10.000Z
# Copyright (c) 2019 Sagar Gubbi. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import numpy as np import matplotlib import json matplotlib.use('Agg') import matplotlib.pyplot as plt def main(): rows = [] with open('log.txt') as f: ...
30.783784
118
0.565408
import numpy as np import matplotlib import json matplotlib.use('Agg') import matplotlib.pyplot as plt def main(): rows = [] with open('log.txt') as f: for line in f: if line.startswith(':u_fx:'): txt = '{"' + line[1:].strip().replace(': ', '": ').replace(', ', ', "') + ...
true
true
1c3efd1348ec046804b606eac521ae4e8ed3cb77
7,645
py
Python
src/json_utils.py
moreymat/demi-ou-moitie
72e3cf4a4a4db082969b5c33152ecca389214eab
[ "MIT" ]
null
null
null
src/json_utils.py
moreymat/demi-ou-moitie
72e3cf4a4a4db082969b5c33152ecca389214eab
[ "MIT" ]
4
2021-01-12T18:24:20.000Z
2021-01-20T16:03:07.000Z
src/json_utils.py
moreymat/demi-ou-moitie
72e3cf4a4a4db082969b5c33152ecca389214eab
[ "MIT" ]
null
null
null
# functions to manipulate the datas import json import io import os from pathlib import Path import json # Parameter: json_path: path to json file # # Output: a string representing the data def extract_text_from_json(json_path): with open(json_path) as json_file: data = json.load(json_file)...
31.590909
87
0.398169
import json import io import os from pathlib import Path import json def extract_text_from_json(json_path): with open(json_path) as json_file: data = json.load(json_file) result = "" print("Nombre d'arrété dans ", json_path, ": ", len(data["arretes"])) for arrete in dat...
true
true
1c3efe1206769bebd4f2f227ff1d560751c18fc7
3,245
py
Python
training/word_vectors.py
howl-anderson/spacy-dev-resources
4ba4bea947c4bb6779066f4ef6a30decaad304e4
[ "MIT" ]
2
2018-03-14T08:49:07.000Z
2019-05-20T02:31:38.000Z
training/word_vectors.py
howl-anderson/spacy-dev-resources
4ba4bea947c4bb6779066f4ef6a30decaad304e4
[ "MIT" ]
null
null
null
training/word_vectors.py
howl-anderson/spacy-dev-resources
4ba4bea947c4bb6779066f4ef6a30decaad304e4
[ "MIT" ]
1
2020-11-06T06:02:20.000Z
2020-11-06T06:02:20.000Z
#!/usr/bin/env python from __future__ import print_function, unicode_literals, division import io import bz2 import logging from os import path import os import random from collections import defaultdict import plac try: import ujson as json except ImportError: import json from gensim.models import Word2Vec fr...
31.504854
102
0.639137
from __future__ import print_function, unicode_literals, division import io import bz2 import logging from os import path import os import random from collections import defaultdict import plac try: import ujson as json except ImportError: import json from gensim.models import Word2Vec from preshed.counter im...
true
true
1c3efe168a0e06acb0d1c01f34daba0d3e09ab59
3,817
py
Python
fastreid/data/build.py
tenghehan/reid_without_id
d1d0ff273b1ef19fc6da8cbbf210527779b37455
[ "MIT" ]
null
null
null
fastreid/data/build.py
tenghehan/reid_without_id
d1d0ff273b1ef19fc6da8cbbf210527779b37455
[ "MIT" ]
null
null
null
fastreid/data/build.py
tenghehan/reid_without_id
d1d0ff273b1ef19fc6da8cbbf210527779b37455
[ "MIT" ]
null
null
null
# encoding: utf-8 """ @author: l1aoxingyu @contact: sherlockliao01@gmail.com """ import os import torch from torch._six import container_abcs, string_classes, int_classes from torch.utils.data import DataLoader from fastreid.utils import comm from . import samplers from .common import CommDataset from .datasets impo...
33.482456
124
0.698192
import os import torch from torch._six import container_abcs, string_classes, int_classes from torch.utils.data import DataLoader from fastreid.utils import comm from . import samplers from .common import CommDataset from .datasets import DATASET_REGISTRY from .transforms import build_transforms _root = os.getenv("...
true
true
1c3efe56717d90a8d09328f57a5bc578273d39ac
9,089
py
Python
vpc-flow-logs/enable-vpc-flowlogs.py
adamgilman/aws-fast-fixes
ace2ee78f19ea9555d4e2314c049a0df741b406a
[ "Apache-2.0" ]
null
null
null
vpc-flow-logs/enable-vpc-flowlogs.py
adamgilman/aws-fast-fixes
ace2ee78f19ea9555d4e2314c049a0df741b406a
[ "Apache-2.0" ]
null
null
null
vpc-flow-logs/enable-vpc-flowlogs.py
adamgilman/aws-fast-fixes
ace2ee78f19ea9555d4e2314c049a0df741b406a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import boto3 from botocore.exceptions import ClientError import logging def main(args, logger): '''Executes the Primary Logic''' # If they specify a profile use it. Otherwise do the normal thing if args.profile: session = boto3.Session(profile_name=args.profile) else: ...
40.395556
154
0.601276
import boto3 from botocore.exceptions import ClientError import logging def main(args, logger): if args.profile: session = boto3.Session(profile_name=args.profile) else: session = boto3.Session() all_regions = get_regions(session, args) for region in all_regions: ...
true
true
1c3efe5ec2a1831555eaf795850e6be08dadf58f
844
bzl
Python
build/go_binary.bzl
xybots/cert-manager
cdccb752ff98219a1995fce2c6f797c450437805
[ "Apache-2.0" ]
1
2021-04-01T04:14:36.000Z
2021-04-01T04:14:36.000Z
build/go_binary.bzl
xybots/cert-manager
cdccb752ff98219a1995fce2c6f797c450437805
[ "Apache-2.0" ]
1
2021-02-24T00:42:10.000Z
2021-02-24T00:42:10.000Z
build/go_binary.bzl
xybots/cert-manager
cdccb752ff98219a1995fce2c6f797c450437805
[ "Apache-2.0" ]
3
2020-06-17T19:04:26.000Z
2021-02-11T14:29:09.000Z
# Copyright 2020 The Jetstack cert-manager contributors. # # 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 l...
35.166667
74
0.726303
load(":version.bzl", "version_x_defs") load("@io_bazel_rules_go//go:def.bzl", real_go_binary = "go_binary") def go_binary(name, **kwargs): real_go_binary( name = name, x_defs = version_x_defs(), **kwargs, )
true
true
1c3efe89d4fd8bd65e289ed402cd959cacff3f4c
58,338
py
Python
salt/modules/dockerio.py
bruce-one/salt
0715f6c29a8e19c3cf7a67ad41aff84801c9f5ae
[ "Apache-2.0" ]
1
2016-04-20T08:18:07.000Z
2016-04-20T08:18:07.000Z
salt/modules/dockerio.py
quantonganh/salt
8f1df678573153970c08b33978fe185d9ed1b71c
[ "Apache-2.0" ]
null
null
null
salt/modules/dockerio.py
quantonganh/salt
8f1df678573153970c08b33978fe185d9ed1b71c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Management of dockers ===================== .. versionadded:: 2014.1.0 (Hydrogen) .. note:: The DockerIO integration is still in beta; the API is subject to change General notes ------------- - As we use states, we don't want to pop continuously dockers, we will map each container...
26.945958
81
0.536957
''' Management of dockers ===================== .. versionadded:: 2014.1.0 (Hydrogen) .. note:: The DockerIO integration is still in beta; the API is subject to change General notes ------------- - As we use states, we don't want to pop continuously dockers, we will map each container id (or image) with a ...
false
true
1c3efe945ce0be96d2fe3fb29a37f0bac9cd0d9d
6,302
py
Python
idm_lp/database/database.py
hfek/hfek
ecafcd177bf5a4af1f499180a2230985bd953863
[ "MIT" ]
null
null
null
idm_lp/database/database.py
hfek/hfek
ecafcd177bf5a4af1f499180a2230985bd953863
[ "MIT" ]
null
null
null
idm_lp/database/database.py
hfek/hfek
ecafcd177bf5a4af1f499180a2230985bd953863
[ "MIT" ]
null
null
null
import asyncio import json import os import typing from typing import List from pydantic import BaseModel, validator, Field from idm_lp import const from . import ( Alias, ChatEnterModel, IgnoredMembers, IgnoredGlobalMembers, MutedMembers, ContextInstanceMixin, RegexDeleter, RolePlayCo...
39.142857
110
0.643923
import asyncio import json import os import typing from typing import List from pydantic import BaseModel, validator, Field from idm_lp import const from . import ( Alias, ChatEnterModel, IgnoredMembers, IgnoredGlobalMembers, MutedMembers, ContextInstanceMixin, RegexDeleter, RolePlayCo...
true
true
1c3efe98da4095058df9a4d3135d99eecccd4a74
575
py
Python
config/celery_app.py
Dm1tryD/estore_api
1b944d2c3c47303e312581c3fc1a8af658eb3d06
[ "MIT" ]
null
null
null
config/celery_app.py
Dm1tryD/estore_api
1b944d2c3c47303e312581c3fc1a8af658eb3d06
[ "MIT" ]
null
null
null
config/celery_app.py
Dm1tryD/estore_api
1b944d2c3c47303e312581c3fc1a8af658eb3d06
[ "MIT" ]
null
null
null
import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") app = Celery("estore_api") # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. #...
31.944444
72
0.782609
import os from celery import Celery os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") app = Celery("estore_api") # the configuration object to child processes. # - namespace='CELERY' means all celery-related configuration keys # should have a `CELERY_` prefix. app.config_from_object("djan...
true
true
1c3efea36189ce256d13e4e745168bf3a12a3f29
779
py
Python
Validation/CTPPS/python/simu_config/year_2018_postTS2_cff.py
rishabhCMS/cmssw
77d83fe564dd8f598d0bb09da8388445d6f4126e
[ "Apache-2.0" ]
1
2020-10-08T06:48:26.000Z
2020-10-08T06:48:26.000Z
Validation/CTPPS/python/simu_config/year_2018_postTS2_cff.py
rishabhCMS/cmssw
77d83fe564dd8f598d0bb09da8388445d6f4126e
[ "Apache-2.0" ]
null
null
null
Validation/CTPPS/python/simu_config/year_2018_postTS2_cff.py
rishabhCMS/cmssw
77d83fe564dd8f598d0bb09da8388445d6f4126e
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms from Validation.CTPPS.simu_config.year_2018_cff import * # alignment from CalibPPS.ESProducers.ctppsRPAlignmentCorrectionsDataESSourceXML_cfi import * alignmentFile = "Validation/CTPPS/alignment/2018_postTS2.xml" ctppsRPAlignmentCorrectionsDataESSourceXML.MisalignedFiles = [al...
43.277778
131
0.802311
import FWCore.ParameterSet.Config as cms from Validation.CTPPS.simu_config.year_2018_cff import * from CalibPPS.ESProducers.ctppsRPAlignmentCorrectionsDataESSourceXML_cfi import * alignmentFile = "Validation/CTPPS/alignment/2018_postTS2.xml" ctppsRPAlignmentCorrectionsDataESSourceXML.MisalignedFiles = [alignmentFile...
true
true
1c3f000beb71bb40696ed111f073504de119b2eb
12,313
py
Python
assignment3/cs231n/classifiers/rnn.py
kandluis/cs231n
88afdbc37189f54803f361b9812f48843357349e
[ "MIT" ]
null
null
null
assignment3/cs231n/classifiers/rnn.py
kandluis/cs231n
88afdbc37189f54803f361b9812f48843357349e
[ "MIT" ]
null
null
null
assignment3/cs231n/classifiers/rnn.py
kandluis/cs231n
88afdbc37189f54803f361b9812f48843357349e
[ "MIT" ]
null
null
null
from builtins import range from builtins import object import numpy as np from cs231n.layers import * from cs231n.rnn_layers import * class CaptioningRNN(object): """ A CaptioningRNN produces captions from image features using a recurrent neural network. The RNN receives input vectors of size D, has...
51.304167
84
0.56282
from builtins import range from builtins import object import numpy as np from cs231n.layers import * from cs231n.rnn_layers import * class CaptioningRNN(object): def __init__(self, word_to_idx, input_dim=512, wordvec_dim=128, hidden_dim=128, cell_type='rnn', dtype=np.float32): if cell_...
true
true
1c3f01950869cfecf6380046a2eb24ec7d0d2cea
6,929
py
Python
research/delf/delf/python/feature_io.py
hamediramin/ObjectDetectionAPI
38638ce126ab708b1eb22a3cf40d4c7713cc535f
[ "Apache-2.0" ]
3,326
2018-01-26T22:42:25.000Z
2022-02-16T13:16:39.000Z
research/delf/delf/python/feature_io.py
lianlengyunyu/models
984fbc754943c849c55a57923f4223099a1ff88c
[ "Apache-2.0" ]
150
2017-08-28T14:59:36.000Z
2022-03-11T23:21:35.000Z
research/delf/delf/python/feature_io.py
lianlengyunyu/models
984fbc754943c849c55a57923f4223099a1ff88c
[ "Apache-2.0" ]
1,474
2018-02-01T04:33:18.000Z
2022-03-08T07:02:20.000Z
# Copyright 2017 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
34.994949
80
0.693895
from __future__ import absolute_import from __future__ import division from __future__ import print_function from delf import feature_pb2 from delf import datum_io import numpy as np from six.moves import xrange import tensorflow as tf def ArraysToDelfFeatures(locations, scal...
true
true
1c3f0197b9aad6e08ff29278749e9495d7b8f1f4
846
py
Python
apis/alembic/versions/d10a9ad9f863_add_restart_number_for_deploy_.py
iii-org/devops-system
71f938c9e225ac24ab9102a8221dc5341a01889c
[ "Apache-2.0" ]
4
2021-07-15T15:59:01.000Z
2022-02-24T02:58:52.000Z
apis/alembic/versions/d10a9ad9f863_add_restart_number_for_deploy_.py
iii-org/devops-system
71f938c9e225ac24ab9102a8221dc5341a01889c
[ "Apache-2.0" ]
4
2020-06-12T04:05:46.000Z
2021-11-09T03:53:13.000Z
apis/alembic/versions/d10a9ad9f863_add_restart_number_for_deploy_.py
iii-org/devops-system
71f938c9e225ac24ab9102a8221dc5341a01889c
[ "Apache-2.0" ]
2
2020-09-29T05:39:28.000Z
2021-11-26T09:52:17.000Z
"""add restart number for deploy application Revision ID: d10a9ad9f863 Revises: 90a8f40d4f2c Create Date: 2021-09-06 10:33:18.670376 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd10a9ad9f863' down_revision = '90a8f40d4f2c' branch_labels = None depends_on = ...
27.290323
90
0.710402
from alembic import op import sqlalchemy as sa revision = 'd10a9ad9f863' down_revision = '90a8f40d4f2c' branch_labels = None depends_on = None def upgrade(): )
true
true
1c3f024bb5c2bb49fd2bbfa7cfe9f781f205d339
47,928
py
Python
Algorithm.Python/PL_Stat6_fx/hp3.py
pasztorlacos/Lean
ca204c07d9bb390f853eb2f3da0ebc08150fef36
[ "Apache-2.0" ]
null
null
null
Algorithm.Python/PL_Stat6_fx/hp3.py
pasztorlacos/Lean
ca204c07d9bb390f853eb2f3da0ebc08150fef36
[ "Apache-2.0" ]
null
null
null
Algorithm.Python/PL_Stat6_fx/hp3.py
pasztorlacos/Lean
ca204c07d9bb390f853eb2f3da0ebc08150fef36
[ "Apache-2.0" ]
null
null
null
### <summary> ### Helpers ### ### </summary> from QuantConnect.Orders import * from QuantConnect.Orders.Fills import * from QuantConnect.Orders.Fees import * import tensorflow as tf from QuantConnect.Orders import OrderStatus from QuantConnect import Resolution, SecurityType #import math from math import log #import ...
60.899619
2,637
0.571378
ort * from QuantConnect.Orders.Fees import * import tensorflow as tf from QuantConnect.Orders import OrderStatus from QuantConnect import Resolution, SecurityType from math import log import pandas as pd import numpy as np from datetime import datetime, timedelta import tensorflow import json import pickle import co...
true
true
1c3f02f8e5985d6b7670531f93bdfb106a93f89f
2,070
py
Python
dataloader.py
JayD1912/image_outpaint
0b47d94c6cbd10f749ed717d7d5f76bba03c0d9d
[ "MIT" ]
null
null
null
dataloader.py
JayD1912/image_outpaint
0b47d94c6cbd10f749ed717d7d5f76bba03c0d9d
[ "MIT" ]
null
null
null
dataloader.py
JayD1912/image_outpaint
0b47d94c6cbd10f749ed717d7d5f76bba03c0d9d
[ "MIT" ]
null
null
null
import numpy as np import os from random import shuffle DATA_PATH = "train" TEST_PATH = "test" class Data(): def __init__(self): self.X_counter = 0 self.file_counter = 0 self.files = os.listdir(DATA_PATH) self.files = [file for file in self.files if '.npy' in file] shuffle(self.files) s...
24.069767
74
0.644928
import numpy as np import os from random import shuffle DATA_PATH = "train" TEST_PATH = "test" class Data(): def __init__(self): self.X_counter = 0 self.file_counter = 0 self.files = os.listdir(DATA_PATH) self.files = [file for file in self.files if '.npy' in file] shuffle(self.files) s...
true
true
1c3f04dfed6c101a659c0d01e90716a188f78071
4,533
py
Python
sourcecode/usb-example/python/face_detect.py
HeavenFish/Face-Recognition-Check-in-with-Line-API
06f5fb635ce606f225ef24aac8270d689dd68cbc
[ "MIT" ]
null
null
null
sourcecode/usb-example/python/face_detect.py
HeavenFish/Face-Recognition-Check-in-with-Line-API
06f5fb635ce606f225ef24aac8270d689dd68cbc
[ "MIT" ]
null
null
null
sourcecode/usb-example/python/face_detect.py
HeavenFish/Face-Recognition-Check-in-with-Line-API
06f5fb635ce606f225ef24aac8270d689dd68cbc
[ "MIT" ]
null
null
null
import time import cv2 as cv import smtplib as sm import os from practicum import find_mcu_boards, McuBoard, PeriBoard from requests import get, post from line_notify import LineNotify def notifymessage(message): payload = {"message": message} sendnotify(payload) def notifypic(message, url): ...
35.414063
116
0.554379
import time import cv2 as cv import smtplib as sm import os from practicum import find_mcu_boards, McuBoard, PeriBoard from requests import get, post from line_notify import LineNotify def notifymessage(message): payload = {"message": message} sendnotify(payload) def notifypic(message, url): ...
true
true
1c3f056eef1798da8fcdf25ae23b87f8e864b8e9
2,616
py
Python
src/scheduler/domain/operation/commands/SendSchedulerErrorMailCommand.py
jedicontributors/pythondataintegrator
3e877b367ab9b20185476128ec053db41087879f
[ "MIT" ]
null
null
null
src/scheduler/domain/operation/commands/SendSchedulerErrorMailCommand.py
jedicontributors/pythondataintegrator
3e877b367ab9b20185476128ec053db41087879f
[ "MIT" ]
null
null
null
src/scheduler/domain/operation/commands/SendSchedulerErrorMailCommand.py
jedicontributors/pythondataintegrator
3e877b367ab9b20185476128ec053db41087879f
[ "MIT" ]
null
null
null
from injector import inject from IocManager import IocManager from infrastructor.configuration.ConfigService import ConfigService from infrastructor.data.RepositoryProvider import RepositoryProvider from infrastructor.delivery.EmailProvider import EmailProvider from infrastructor.exceptions.OperationalException import...
51.294118
116
0.713303
from injector import inject from IocManager import IocManager from infrastructor.configuration.ConfigService import ConfigService from infrastructor.data.RepositoryProvider import RepositoryProvider from infrastructor.delivery.EmailProvider import EmailProvider from infrastructor.exceptions.OperationalException import...
true
true
1c3f05ecf7911afc61827af6e5458a756c303ca1
9,582
py
Python
Parsers.py
rambasnet/EVENT
dd3a6507112e4adc054481608d8968706f80d23f
[ "MIT" ]
null
null
null
Parsers.py
rambasnet/EVENT
dd3a6507112e4adc054481608d8968706f80d23f
[ "MIT" ]
null
null
null
Parsers.py
rambasnet/EVENT
dd3a6507112e4adc054481608d8968706f80d23f
[ "MIT" ]
null
null
null
#----------------------------------------------------------------------------- # Name: Parsers.py # Purpose: # # Author: Ram Basnet # # Created: 2008/01/17 # Modified: 10/1/2009 # RCS-ID: $Id: Parsers.py $ # Copyright: (c) 2008 # Licence: All Rights Reserved. #-------------...
34.221429
134
0.531831
import string, re, shutil, os import xml.sax.handler import time import pylab from SqliteDatabase import * import xml.sax import os.path from NessusXML import * from LanguardXML import * from RetinaHTML import * from NmapXML import * from Config import * import Global def InitTables(db, sca...
false
true
1c3f06668e685207312debef13aeb5f3ad782b94
437
py
Python
rubicon_ml/ui/__init__.py
capitalone/rubicon
b784cd2e28c68bc44d04317b7acc1eaadda7e4eb
[ "Apache-2.0" ]
42
2021-02-23T23:30:49.000Z
2021-05-01T02:54:03.000Z
rubicon_ml/ui/__init__.py
capitalone/rubicon-ml
b784cd2e28c68bc44d04317b7acc1eaadda7e4eb
[ "Apache-2.0" ]
56
2021-05-13T13:47:50.000Z
2022-03-24T13:46:49.000Z
rubicon_ml/ui/__init__.py
capitalone/rubicon
b784cd2e28c68bc44d04317b7acc1eaadda7e4eb
[ "Apache-2.0" ]
9
2021-02-23T23:30:51.000Z
2021-04-24T16:42:28.000Z
def _check_for_ui_extras(): try: import dash # noqa F401 import dash_html_components as html # noqa F401 except ImportError: install_command = "pip install rubicon[ui]" message = f"Install the packages required for the UI with `{install_command}`." raise ImportError(me...
25.705882
87
0.693364
def _check_for_ui_extras(): try: import dash import dash_html_components as html except ImportError: install_command = "pip install rubicon[ui]" message = f"Install the packages required for the UI with `{install_command}`." raise ImportError(message) _check_for_ui...
true
true
1c3f08346d19b97e95a22306a1f67375c392273a
227
py
Python
sequential/audioset/__init__.py
mariacer/cl_in_rnns
333b8e03391600a8e3df7d684a3f171b135d273a
[ "Apache-2.0" ]
26
2020-06-17T08:44:15.000Z
2022-03-20T04:21:13.000Z
sequential/audioset/__init__.py
mariacer/cl_in_rnns
333b8e03391600a8e3df7d684a3f171b135d273a
[ "Apache-2.0" ]
null
null
null
sequential/audioset/__init__.py
mariacer/cl_in_rnns
333b8e03391600a8e3df7d684a3f171b135d273a
[ "Apache-2.0" ]
4
2020-10-26T02:19:38.000Z
2021-12-26T02:26:05.000Z
import os import sys curr_dir = os.path.basename(os.path.abspath(os.curdir)) # See __init__.py in folder "toy_example" for an explanation. if curr_dir == 'audioset' and '../..' not in sys.path: sys.path.insert(0, '../..')
28.375
61
0.682819
import os import sys curr_dir = os.path.basename(os.path.abspath(os.curdir)) if curr_dir == 'audioset' and '../..' not in sys.path: sys.path.insert(0, '../..')
true
true
1c3f0914bb047b56ded0096975ff401e24cd96e5
7,279
py
Python
lte/gateway/python/magma/pipelined/rule_mappers.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
null
null
null
lte/gateway/python/magma/pipelined/rule_mappers.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
72
2021-03-08T09:37:52.000Z
2022-03-29T23:20:10.000Z
lte/gateway/python/magma/pipelined/rule_mappers.py
kkahrs/magma
73e666627dc28e0c492feab7321bb7d6dd433b09
[ "BSD-3-Clause" ]
1
2021-07-07T14:26:13.000Z
2021-07-07T14:26:13.000Z
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
34.334906
84
0.660393
import json import threading from collections import namedtuple from typing import Optional from lte.protos.mobilityd_pb2 import IPAddress from magma.pipelined.imsi import encode_imsi from magma.common.redis.client import get_default_client from magma.common.redis.containers import RedisHashDict from magma.common.redi...
true
true
1c3f0a0c86d47e00c83a25b03533a6f7098b15d8
927
py
Python
etc/v3/lib.py
timm/au
14b6ae77cf12c746c1dbad3d35a3dca874fc8d41
[ "MIT" ]
null
null
null
etc/v3/lib.py
timm/au
14b6ae77cf12c746c1dbad3d35a3dca874fc8d41
[ "MIT" ]
14
2020-05-24T19:22:20.000Z
2021-01-01T03:50:26.000Z
etc/v3/lib.py
timm/gold
14b6ae77cf12c746c1dbad3d35a3dca874fc8d41
[ "MIT" ]
null
null
null
import pprint import re import random import sys class Thing: "Classes that can pretty print themselves." def __repr__(i): return re.sub(r"'", ' ', pprint.pformat(dicts(i.__dict__), compact=True)) def dicts(i, seen=None): " Converts `i` into a nested dictionary, then pretty-prints that."...
22.609756
68
0.606257
import pprint import re import random import sys class Thing: def __repr__(i): return re.sub(r"'", ' ', pprint.pformat(dicts(i.__dict__), compact=True)) def dicts(i, seen=None): if isinstance(i, (tuple, list)): return [dicts(v, seen) for v in i] elif isinstance(i, dict): return {...
true
true
1c3f0a791361f1bf2f0d720fe7fdd421e3085d21
283
py
Python
compiler_gym/util/flags/episode_length.py
thecoblack/CompilerGym
ade54e2f1829cf41722decb0942a4d6fd3102c2c
[ "MIT" ]
562
2020-12-21T14:10:20.000Z
2022-03-31T21:23:55.000Z
compiler_gym/util/flags/episode_length.py
thecoblack/CompilerGym
ade54e2f1829cf41722decb0942a4d6fd3102c2c
[ "MIT" ]
433
2020-12-22T03:40:41.000Z
2022-03-31T18:16:17.000Z
compiler_gym/util/flags/episode_length.py
thecoblack/CompilerGym
ade54e2f1829cf41722decb0942a4d6fd3102c2c
[ "MIT" ]
88
2020-12-22T08:22:00.000Z
2022-03-20T19:00:40.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from absl import flags flags.DEFINE_integer("episode_length", 5, "The number of steps in each episode.")
35.375
81
0.763251
from absl import flags flags.DEFINE_integer("episode_length", 5, "The number of steps in each episode.")
true
true
1c3f0a9ccd8484cdf510ff5f2a5708936bfbae13
139
py
Python
tinychronicler/__init__.py
adzialocha/tinychronicler
0a3fb213536dd7fc2af490c027a189fb2810903f
[ "MIT" ]
4
2021-08-16T17:22:25.000Z
2022-02-21T14:38:17.000Z
tinychronicler/__init__.py
adzialocha/tinychronicler
0a3fb213536dd7fc2af490c027a189fb2810903f
[ "MIT" ]
null
null
null
tinychronicler/__init__.py
adzialocha/tinychronicler
0a3fb213536dd7fc2af490c027a189fb2810903f
[ "MIT" ]
null
null
null
from .main import main from .server import server from .version import version as __version__ __all__ = ["__version__", "main", "server"]
23.166667
43
0.755396
from .main import main from .server import server from .version import version as __version__ __all__ = ["__version__", "main", "server"]
true
true
1c3f0b2a01834fec9d729e03253215c8a0748774
500
py
Python
migrations/versions/26e69577923_.py
Summerotter/furryyellowpages
7e10786a39ddae9de5dad0236191a6258b527be8
[ "MIT" ]
null
null
null
migrations/versions/26e69577923_.py
Summerotter/furryyellowpages
7e10786a39ddae9de5dad0236191a6258b527be8
[ "MIT" ]
1
2021-02-02T21:46:02.000Z
2021-02-02T21:46:02.000Z
migrations/versions/26e69577923_.py
Summerotter/furryyellowpages
7e10786a39ddae9de5dad0236191a6258b527be8
[ "MIT" ]
null
null
null
"""empty message Revision ID: 26e69577923 Revises: cd1d14e435 Create Date: 2017-03-08 18:18:30.706551 """ # revision identifiers, used by Alembic. revision = '26e69577923' down_revision = 'cd1d14e435' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please...
18.518519
63
0.686
revision = '26e69577923' down_revision = 'cd1d14e435' from alembic import op import sqlalchemy as sa def upgrade():
true
true
1c3f0b739199b034e4405680127f28833ab4e5ff
3,077
py
Python
flask_admin/helpers.py
pashcovich/flask-admin
f5748f25b91392012be536a81dc23fd92e5e791d
[ "BSD-3-Clause" ]
2
2015-01-04T15:56:55.000Z
2015-06-23T19:55:07.000Z
flask_admin/helpers.py
pawl/flask-admin
700b8f4313b12d46d79d55f434db44d794fffb7d
[ "BSD-3-Clause" ]
null
null
null
flask_admin/helpers.py
pawl/flask-admin
700b8f4313b12d46d79d55f434db44d794fffb7d
[ "BSD-3-Clause" ]
null
null
null
from re import sub from jinja2 import contextfunction from flask import g, request, url_for from wtforms.validators import DataRequired, InputRequired from flask.ext.admin._compat import urljoin, urlparse from ._compat import string_types def set_current_view(view): g._admin_view = view def get_current_view(...
22.792593
95
0.637634
from re import sub from jinja2 import contextfunction from flask import g, request, url_for from wtforms.validators import DataRequired, InputRequired from flask.ext.admin._compat import urljoin, urlparse from ._compat import string_types def set_current_view(view): g._admin_view = view def get_current_view(...
true
true
1c3f0b974b912a60861d9ae2ced14645b28dda03
100
py
Python
tracker/app/models/__init__.py
skielred/FairyJokeAPI
71228e477bc6dd259e6f5f7e09b30c1e23ab96a3
[ "MIT" ]
3
2021-12-18T11:09:08.000Z
2022-03-31T22:42:19.000Z
tracker/app/models/__init__.py
skielred/FairyJokeAPI
71228e477bc6dd259e6f5f7e09b30c1e23ab96a3
[ "MIT" ]
null
null
null
tracker/app/models/__init__.py
skielred/FairyJokeAPI
71228e477bc6dd259e6f5f7e09b30c1e23ab96a3
[ "MIT" ]
null
null
null
from .user import User from .game import Game from .ddr import DDRLocalChart, DDRScore, DDRScoreMod
25
53
0.81
from .user import User from .game import Game from .ddr import DDRLocalChart, DDRScore, DDRScoreMod
true
true
1c3f0bfc5a08d4f9a4674c31951e141174c4e72b
7,890
py
Python
examples/lstm_stateful.py
asanoboy/keras
e467ee5a1a00afdfa1cb7f5508fdbfd2c5eab1e5
[ "MIT" ]
1
2017-11-01T19:10:35.000Z
2017-11-01T19:10:35.000Z
examples/lstm_stateful.py
dmaniry/keras
32aa192548b6b59bf407e583fbd246ba9f5f5676
[ "MIT" ]
null
null
null
examples/lstm_stateful.py
dmaniry/keras
32aa192548b6b59bf407e583fbd246ba9f5f5676
[ "MIT" ]
1
2019-11-19T12:13:27.000Z
2019-11-19T12:13:27.000Z
'''Example script showing how to use a stateful LSTM model and how its stateless counterpart performs. More documentation about the Keras LSTM model can be found at https://keras.io/layers/recurrent/#lstm The models are trained on an input/output pair, where the input is a generated uniformly distributed random seque...
32.603306
79
0.685805
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt import pandas as pd from keras.models import Sequential from keras.layers import Dense, LSTM input_len = 1000 tsteps = 2 lahead = 1 batch_size = 1 epochs = 10 print("*" * 33) if lahead >= tsteps: print("ST...
true
true
1c3f0d1dcf080b615a73e5f6e831b8581fc6ca4a
597
py
Python
tadataka/decorator.py
IshitaTakeshi/Tadataka
852c7afb904503005e51884408e1492ef0be836f
[ "Apache-2.0" ]
54
2019-11-15T16:30:34.000Z
2022-01-13T15:18:54.000Z
tadataka/decorator.py
IshitaTakeshi/Tadataka
852c7afb904503005e51884408e1492ef0be836f
[ "Apache-2.0" ]
11
2019-02-28T08:28:24.000Z
2020-04-07T04:47:12.000Z
tadataka/decorator.py
IshitaTakeshi/Tadataka
852c7afb904503005e51884408e1492ef0be836f
[ "Apache-2.0" ]
1
2020-02-26T13:59:40.000Z
2020-02-26T13:59:40.000Z
import numpy as np def allow_1d(which_argument): def allow_1d_(function): def decorated(*args, **kwargs): args = list(args) ndim = np.ndim(args[which_argument]) if ndim == 1: args[which_argument] = np.atleast_2d(args[which_argument]) ret...
27.136364
76
0.544389
import numpy as np def allow_1d(which_argument): def allow_1d_(function): def decorated(*args, **kwargs): args = list(args) ndim = np.ndim(args[which_argument]) if ndim == 1: args[which_argument] = np.atleast_2d(args[which_argument]) ret...
true
true
1c3f0d534ffb999c7a8ad354a71e615c40bb1fb1
6,166
py
Python
test/countries/test_singapore.py
hugovk/python-holidays
e22c667a159c959d81b512cc354910fc5c6653a9
[ "MIT" ]
48
2016-11-22T09:18:50.000Z
2018-01-14T14:06:49.000Z
test/countries/test_singapore.py
hugovk/python-holidays
e22c667a159c959d81b512cc354910fc5c6653a9
[ "MIT" ]
59
2016-12-03T15:52:36.000Z
2018-01-16T09:37:15.000Z
test/countries/test_singapore.py
hugovk/python-holidays
e22c667a159c959d81b512cc354910fc5c6653a9
[ "MIT" ]
51
2016-11-25T14:53:55.000Z
2018-01-16T09:58:56.000Z
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Authors: dr-prodigy <maurizio....
45.007299
78
0.614175
import sys import unittest from datetime import date import holidays class TestSingapore(unittest.TestCase): def setUp(self): self.holidays = holidays.Singapore() def test_Singapore(self): self.assertIn(date(1968, 4, 13), self.holidays) self.assertIn(date(1968,...
true
true
1c3f0d91ed6ea18b6fa39386621d4fef7c35b322
10,747
py
Python
graph_updater.py
xingdi-eric-yuan/gata
059cd2e486adfdb5edc3e2df628d573ee9a3796b
[ "MIT" ]
1
2021-04-28T03:31:07.000Z
2021-04-28T03:31:07.000Z
graph_updater.py
xingdi-eric-yuan/gata
059cd2e486adfdb5edc3e2df628d573ee9a3796b
[ "MIT" ]
null
null
null
graph_updater.py
xingdi-eric-yuan/gata
059cd2e486adfdb5edc3e2df628d573ee9a3796b
[ "MIT" ]
1
2021-04-28T03:32:57.000Z
2021-04-28T03:32:57.000Z
import torch import torch.nn as nn from typing import Optional, Dict from layers import GraphEncoder, TextEncoder, ReprAggregator, EncoderMixin from utils import masked_mean class GraphUpdater(EncoderMixin, nn.Module): def __init__( self, hidden_dim: int, word_emb_dim: int, num_n...
38.658273
87
0.626966
import torch import torch.nn as nn from typing import Optional, Dict from layers import GraphEncoder, TextEncoder, ReprAggregator, EncoderMixin from utils import masked_mean class GraphUpdater(EncoderMixin, nn.Module): def __init__( self, hidden_dim: int, word_emb_dim: int, num_n...
true
true
1c3f0f516f199958c86634276a1edb4466568970
1,189
py
Python
test.py
nathan-gilbert/graphworks-test
46840288bf58f726cca1f0756fa7e86457dd6768
[ "Unlicense" ]
null
null
null
test.py
nathan-gilbert/graphworks-test
46840288bf58f726cca1f0756fa7e86457dd6768
[ "Unlicense" ]
null
null
null
test.py
nathan-gilbert/graphworks-test
46840288bf58f726cca1f0756fa7e86457dd6768
[ "Unlicense" ]
null
null
null
import json from graphworks.algorithms.basic import find_isolated_vertices from graphworks.algorithms.basic import generate_edges from graphworks.export.graphviz_utils import save_to_dot from graphworks.export.json_utils import save_to_json from graphworks.graph import Graph if __name__ == "__main__": json_graph ...
23.78
70
0.668629
import json from graphworks.algorithms.basic import find_isolated_vertices from graphworks.algorithms.basic import generate_edges from graphworks.export.graphviz_utils import save_to_dot from graphworks.export.json_utils import save_to_json from graphworks.graph import Graph if __name__ == "__main__": json_graph ...
true
true
1c3f0f5c4ee5b5fd5a03fa9630986bf135acaa7c
21,599
py
Python
py/nightwatch/script.py
sbailey/nightwatch
09c2218afd529384866e103b96aa6ed555aef85e
[ "BSD-3-Clause" ]
null
null
null
py/nightwatch/script.py
sbailey/nightwatch
09c2218afd529384866e103b96aa6ed555aef85e
[ "BSD-3-Clause" ]
null
null
null
py/nightwatch/script.py
sbailey/nightwatch
09c2218afd529384866e103b96aa6ed555aef85e
[ "BSD-3-Clause" ]
null
null
null
""" nightwatch command line script """ import os, sys, time, glob import argparse import traceback import subprocess from desimodel.io import load_tiles import desispec.io from . import run, plots, io from .run import timestamp, get_ncpu from .qa.runner import QARunner from desiutil.log import get_logger import temp...
40.829868
240
0.6304
import os, sys, time, glob import argparse import traceback import subprocess from desimodel.io import load_tiles import desispec.io from . import run, plots, io from .run import timestamp, get_ncpu from .qa.runner import QARunner from desiutil.log import get_logger import tempfile import shutil import contextlib i...
true
true
1c3f0f72545da6d3e28a8e03cb7dc5cd6805e0ef
16,612
py
Python
monitor.py
Eternity-luo/JDC
5356f2ea27490364342dc7a0118455bb6dfab485
[ "MIT" ]
8
2021-03-12T23:03:42.000Z
2021-05-06T22:43:49.000Z
monitor.py
Eternity-luo/JDC
5356f2ea27490364342dc7a0118455bb6dfab485
[ "MIT" ]
1
2021-07-03T19:07:47.000Z
2021-07-17T05:27:33.000Z
monitor.py
Eternity-luo/JDC
5356f2ea27490364342dc7a0118455bb6dfab485
[ "MIT" ]
6
2021-03-15T12:43:20.000Z
2021-05-07T02:23:41.000Z
from telethon import TelegramClient, events import time, os, sys, datetime, requests, random, string, re, json, httpx, asyncio from jsonpath import jsonpath import importlib importlib.reload(sys) requests.packages.urllib3.disable_warnings() ckss = 'pt_key=AAJhVrPQADBghACD7FWhN04rKpDsLjchHHP8cUUCfaHBAtYDmzvaFzievcdaI3L...
40.517073
492
0.561642
from telethon import TelegramClient, events import time, os, sys, datetime, requests, random, string, re, json, httpx, asyncio from jsonpath import jsonpath import importlib importlib.reload(sys) requests.packages.urllib3.disable_warnings() ckss = 'pt_key=AAJhVrPQADBghACD7FWhN04rKpDsLjchHHP8cUUCfaHBAtYDmzvaFzievcdaI3L...
true
true
1c3f10bc81bda7a0b5af1626ea1a5161acb6d1d9
537
py
Python
adv_train/model/mnist_net.py
busycalibrating/Adversarial-Training
e1fe4061f72e1379d9920b02c1cc281e1be2606f
[ "MIT" ]
null
null
null
adv_train/model/mnist_net.py
busycalibrating/Adversarial-Training
e1fe4061f72e1379d9920b02c1cc281e1be2606f
[ "MIT" ]
null
null
null
adv_train/model/mnist_net.py
busycalibrating/Adversarial-Training
e1fe4061f72e1379d9920b02c1cc281e1be2606f
[ "MIT" ]
1
2022-01-31T06:14:41.000Z
2022-01-31T06:14:41.000Z
import torch.nn as nn from adv_train.utils import Flatten def build_model_mnist(device=None): model = nn.Sequential( nn.Conv2d(1, 32, 3, padding=1), nn.ReLU(), nn.Conv2d(32, 32, 3, padding=1, stride=2), nn.ReLU(), nn.Conv2d(32, 64, 3, padding=1), nn.ReLU(), ...
23.347826
50
0.532588
import torch.nn as nn from adv_train.utils import Flatten def build_model_mnist(device=None): model = nn.Sequential( nn.Conv2d(1, 32, 3, padding=1), nn.ReLU(), nn.Conv2d(32, 32, 3, padding=1, stride=2), nn.ReLU(), nn.Conv2d(32, 64, 3, padding=1), nn.ReLU(), ...
true
true
1c3f112efb580d4f1117769784b589751471e3b0
16,989
py
Python
mujoco/setup4/main_gailfo.py
EvieQ01/Learning-Feasibility-Different-Dynamics
73786b11137b8ba9840d00ec4d258c1296b0a595
[ "MIT" ]
null
null
null
mujoco/setup4/main_gailfo.py
EvieQ01/Learning-Feasibility-Different-Dynamics
73786b11137b8ba9840d00ec4d258c1296b0a595
[ "MIT" ]
null
null
null
mujoco/setup4/main_gailfo.py
EvieQ01/Learning-Feasibility-Different-Dynamics
73786b11137b8ba9840d00ec4d258c1296b0a595
[ "MIT" ]
null
null
null
import argparse from itertools import count import gym import gym.spaces import scipy.optimize import numpy as np import math import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from models.old_models import * from replay_memory import Memory from running_state import ZFilte...
42.901515
206
0.660663
import argparse from itertools import count import gym import gym.spaces import scipy.optimize import numpy as np import math import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from models.old_models import * from replay_memory import Memory from running_state import ZFilte...
true
true
1c3f115aa78e8cbc7c892e6d2132d4943dd4af80
1,527
py
Python
projekt/backend/biljnevrste/biljnevrsteapp/views.py
toni4848/biljnevrste_repo
8d48a75c67a0208ddad1be78284d653fb2303c94
[ "MIT" ]
null
null
null
projekt/backend/biljnevrste/biljnevrsteapp/views.py
toni4848/biljnevrste_repo
8d48a75c67a0208ddad1be78284d653fb2303c94
[ "MIT" ]
51
2019-04-01T14:56:31.000Z
2022-03-21T00:35:42.000Z
projekt/backend/biljnevrste/biljnevrsteapp/views.py
toni4848/biljnevrste_repo
8d48a75c67a0208ddad1be78284d653fb2303c94
[ "MIT" ]
14
2019-04-02T15:22:06.000Z
2019-06-09T13:09:40.000Z
from rest_framework import viewsets from .serializers import * ''' API endpoint za unos, uredjivanje uporabnih dijelova ''' class UporabniDioViewSet(viewsets.ModelViewSet): queryset = UporabniDio.objects.all() serializer_class = UporabniDioSerializer ''' API endpint za unos, uredjivanje slika ''' class ...
18.39759
52
0.756385
from rest_framework import viewsets from .serializers import * class UporabniDioViewSet(viewsets.ModelViewSet): queryset = UporabniDio.objects.all() serializer_class = UporabniDioSerializer class SlikaViewSet(viewsets.ModelViewSet): queryset = Slika.objects.all() serializer_class = SlikaSerializ...
true
true
1c3f115fb666122c3ba070c75129db276760345b
4,123
py
Python
app/update_scheduler/views.py
AndrewLester/schedule-updates
37ea9df14f01f7b8e7850a883760d4a692724c83
[ "MIT" ]
6
2021-02-17T03:23:18.000Z
2021-04-09T14:35:42.000Z
app/update_scheduler/views.py
AndrewLester/schedule-updates
37ea9df14f01f7b8e7850a883760d4a692724c83
[ "MIT" ]
6
2021-03-10T04:04:40.000Z
2021-12-17T08:13:45.000Z
app/update_scheduler/views.py
AndrewLester/update-scheduler
37ea9df14f01f7b8e7850a883760d4a692724c83
[ "MIT" ]
null
null
null
from datetime import date, datetime, timedelta from flask.globals import current_app from flask_login.utils import login_required from isodate.duration import Duration import pytz from rq.job import Job from rq.exceptions import NoSuchJobError from app.update_scheduler.scheduler import schedule_update from typing impor...
30.094891
92
0.634732
from datetime import date, datetime, timedelta from flask.globals import current_app from flask_login.utils import login_required from isodate.duration import Duration import pytz from rq.job import Job from rq.exceptions import NoSuchJobError from app.update_scheduler.scheduler import schedule_update from typing impor...
true
true
1c3f117b7554b5c24faba0e6bbfc5cd2f0e1466d
720
py
Python
mysite/polls/models.py
yangyi-d/django_base
b59543143156c1a011d31026af6de05e79aa0ce3
[ "MIT" ]
null
null
null
mysite/polls/models.py
yangyi-d/django_base
b59543143156c1a011d31026af6de05e79aa0ce3
[ "MIT" ]
null
null
null
mysite/polls/models.py
yangyi-d/django_base
b59543143156c1a011d31026af6de05e79aa0ce3
[ "MIT" ]
null
null
null
from django.db import models import datetime # Create your models here. from django.utils import timezone class Question(models.Model): """问题模型类""" question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('datepublished') def was_published_recently(self): now = timez...
23.225806
68
0.706944
from django.db import models import datetime from django.utils import timezone class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('datepublished') def was_published_recently(self): now = timezone.now() return now-datetime.tim...
true
true
1c3f11e69fe04bfb2afc4ce32bfeb9113d316cc8
3,109
py
Python
classes_base/Peca.py
lffloyd/TrabalhoIA1_Domino
b78a9cbc3ff043cedda8118741bc5fbc42ee7010
[ "MIT" ]
null
null
null
classes_base/Peca.py
lffloyd/TrabalhoIA1_Domino
b78a9cbc3ff043cedda8118741bc5fbc42ee7010
[ "MIT" ]
null
null
null
classes_base/Peca.py
lffloyd/TrabalhoIA1_Domino
b78a9cbc3ff043cedda8118741bc5fbc42ee7010
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018 Luiz Felipe de Melo (lffloyd), Vítor Costa (vitorhardoim), Renato Bastos (RenatoBastos33) # # 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 restri...
43.788732
120
0.685751
true
true
1c3f12aef0a7e4cc86449e49fc4fb21fe710fa91
1,579
py
Python
get_largest_cc.py
uniooo/graph_tools
5cbd5f69d2a7304225b1126bbf25431cdd5bf5bf
[ "MIT" ]
null
null
null
get_largest_cc.py
uniooo/graph_tools
5cbd5f69d2a7304225b1126bbf25431cdd5bf5bf
[ "MIT" ]
null
null
null
get_largest_cc.py
uniooo/graph_tools
5cbd5f69d2a7304225b1126bbf25431cdd5bf5bf
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 ''' Author: uniooo Date: 2021-06-01 11:28:56 LastEditors: uniooo LastEditTime: 2021-06-03 10:15:06 FilePath: /graph_tools/get_largest_cc.py Description: ''' import sys from count_ccs import get_ccs from collections import Counter from check_edge_consecutive import GraphChecker d...
31.58
108
0.632046
import sys from count_ccs import get_ccs from collections import Counter from check_edge_consecutive import GraphChecker def get_largest_cc(filename): cnt, n, cc_id = get_ccs(filename) if cnt == 1: print("Only 1 connected components\n") return result = Counter(cc_id[1:]) largest_id ...
true
true
1c3f139daa73f91c5326ea382d5f0a2c6f80ede0
11,332
py
Python
src/relstorage/adapters/mysql/locker.py
mamico/relstorage
2df5fb721d75efad3395f34f4d6c7c34826bc56c
[ "ZPL-2.1" ]
null
null
null
src/relstorage/adapters/mysql/locker.py
mamico/relstorage
2df5fb721d75efad3395f34f4d6c7c34826bc56c
[ "ZPL-2.1" ]
null
null
null
src/relstorage/adapters/mysql/locker.py
mamico/relstorage
2df5fb721d75efad3395f34f4d6c7c34826bc56c
[ "ZPL-2.1" ]
null
null
null
############################################################################## # # Copyright (c) 2009 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
43.752896
103
0.677639
true
true
1c3f150a285c70c43f3e81dc32a10b36249db1d5
1,442
py
Python
ftrace/parsers/binder_transaction_buffer_release.py
bagobor/ftrace
a41bfff97447ff6503b80ffc60111cd7e53fed86
[ "Apache-2.0" ]
62
2016-05-29T15:20:15.000Z
2022-03-11T11:40:48.000Z
ftrace/parsers/binder_transaction_buffer_release.py
bagobor/ftrace
a41bfff97447ff6503b80ffc60111cd7e53fed86
[ "Apache-2.0" ]
2
2017-12-12T09:37:40.000Z
2018-05-09T10:29:05.000Z
ftrace/parsers/binder_transaction_buffer_release.py
bagobor/ftrace
a41bfff97447ff6503b80ffc60111cd7e53fed86
[ "Apache-2.0" ]
32
2016-08-01T08:33:22.000Z
2021-11-03T02:18:38.000Z
import re from ftrace.common import ParserError from .register import register_parser from .binder import parse_binder_cmd from collections import namedtuple TRACEPOINT = 'binder_transaction_buffer_release' __all__ = [TRACEPOINT] #binder_transaction_buffer_release: transaction=135918 data_size=28 offsets_size=0 Bin...
28.27451
112
0.701803
import re from ftrace.common import ParserError from .register import register_parser from .binder import parse_binder_cmd from collections import namedtuple TRACEPOINT = 'binder_transaction_buffer_release' __all__ = [TRACEPOINT] BinderTransactionBufferReleaseBase = namedtuple(TRACEPOINT, [ 'transaction', ...
true
true
1c3f16320503ca99d928935dbc29cde267f411f5
3,030
py
Python
Library/Utilities/fftw++-2.05/mpi/testfft2.py
stevend12/SolutioCpp
6fa8a12207cd1e7e806a8ef5de93dc137c33856e
[ "Apache-2.0" ]
9
2017-06-27T14:04:46.000Z
2022-02-17T17:38:03.000Z
Library/Utilities/fftw++-2.05/mpi/testfft2.py
stevend12/SolutioCpp
6fa8a12207cd1e7e806a8ef5de93dc137c33856e
[ "Apache-2.0" ]
null
null
null
Library/Utilities/fftw++-2.05/mpi/testfft2.py
stevend12/SolutioCpp
6fa8a12207cd1e7e806a8ef5de93dc137c33856e
[ "Apache-2.0" ]
3
2017-06-23T20:10:44.000Z
2021-01-13T10:09:46.000Z
#!/usr/bin/python -u import sys # so that we can return a value at the end. import random # for randum number generators import time import getopt import os.path from testutils import * pname = "fft2" timeout = 300 # cutoff time in seconds def main(argv): print "MPI fft2 unit test" retval = 0 usage = "Us...
28.584906
70
0.445875
import sys import random import time import getopt import os.path from testutils import * pname = "fft2" timeout = 300 def main(argv): print "MPI fft2 unit test" retval = 0 usage = "Usage:\n"\ "./testfft2.py\n"\ "\t-s\t\tSpecify a short run\n"\ "\t-h\t\tShow usage"...
false
true
1c3f1699444b065053d57adfdbab207347f98fb0
6,786
py
Python
models/run_gecsmt.py
SnakeA/baselines-emnlp2016
59562391e5b2978fce4bd76d9d230847db45d99e
[ "MIT" ]
76
2016-10-15T10:53:13.000Z
2021-12-28T22:14:56.000Z
models/run_gecsmt.py
SnakeA/baselines-emnlp2016
59562391e5b2978fce4bd76d9d230847db45d99e
[ "MIT" ]
9
2016-12-03T16:20:14.000Z
2019-07-24T12:11:31.000Z
models/run_gecsmt.py
SnakeA/baselines-emnlp2016
59562391e5b2978fce4bd76d9d230847db45d99e
[ "MIT" ]
23
2016-11-20T00:15:05.000Z
2021-09-15T04:23:37.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import argparse import yaml import re MOSES = "/data/smt/mosesdecoder" LAZY = "/data/smt/lazy" SCRIPTS = "/work/gec/repos/baselines-emnlp2016/train/scripts" THREADS = 16 def main(): args = parse_user_args() LM, WC, use_sparse = parse_config...
35.160622
84
0.574565
import os import sys import argparse import yaml import re MOSES = "/data/smt/mosesdecoder" LAZY = "/data/smt/lazy" SCRIPTS = "/work/gec/repos/baselines-emnlp2016/train/scripts" THREADS = 16 def main(): args = parse_user_args() LM, WC, use_sparse = parse_config_ini(args.config) TOK = "{}/scripts/tok...
false
true
1c3f19073431df2b28400012e478f30fb7f8f0de
406
py
Python
testjtyon.py
SupakornYu/ImageProcessingHW1
39e9931b49372a3295513f553a04f7ea717dc9cf
[ "MIT" ]
null
null
null
testjtyon.py
SupakornYu/ImageProcessingHW1
39e9931b49372a3295513f553a04f7ea717dc9cf
[ "MIT" ]
null
null
null
testjtyon.py
SupakornYu/ImageProcessingHW1
39e9931b49372a3295513f553a04f7ea717dc9cf
[ "MIT" ]
null
null
null
j = 2.0 for i in range(100): j*=i+1 j/=32323 print j print "dfdfdfdfgdfdfdfgdf" from javax.swing import JButton, JFrame frame = JFrame('Hello, Jython!', defaultCloseOperation = JFrame.EXIT_ON_CLOSE, size = (300, 300) ) def change_text(event): print 'Clicked!' button = JBu...
16.24
58
0.657635
j = 2.0 for i in range(100): j*=i+1 j/=32323 print j print "dfdfdfdfgdfdfdfgdf" from javax.swing import JButton, JFrame frame = JFrame('Hello, Jython!', defaultCloseOperation = JFrame.EXIT_ON_CLOSE, size = (300, 300) ) def change_text(event): print 'Clicked!' button = JBu...
false
true
1c3f1a2fe6124f3558400ab87736acd636988b9e
7,649
py
Python
simtools/simtel/simtel_runner_array.py
gammasim/gammasim-tools
0b746254916f4c2e2a3fbd1854c565c3bc90d493
[ "BSD-3-Clause" ]
5
2020-06-02T09:46:38.000Z
2022-03-26T16:42:26.000Z
simtools/simtel/simtel_runner_array.py
gammasim/gammasim-tools
0b746254916f4c2e2a3fbd1854c565c3bc90d493
[ "BSD-3-Clause" ]
166
2020-04-24T10:22:16.000Z
2022-03-31T12:51:02.000Z
simtools/simtel/simtel_runner_array.py
gammasim/gammasim-tools
0b746254916f4c2e2a3fbd1854c565c3bc90d493
[ "BSD-3-Clause" ]
null
null
null
import logging import os from pathlib import Path import simtools.io_handler as io import simtools.util.general as gen from simtools.util import names from simtools.simtel.simtel_runner import SimtelRunner, InvalidOutputFile __all__ = ['SimtelRunnerArray'] class SimtelRunnerArray(SimtelRunner): ''' SimtelRu...
36.251185
97
0.6359
import logging import os from pathlib import Path import simtools.io_handler as io import simtools.util.general as gen from simtools.util import names from simtools.simtel.simtel_runner import SimtelRunner, InvalidOutputFile __all__ = ['SimtelRunnerArray'] class SimtelRunnerArray(SimtelRunner): def __init__( ...
true
true
1c3f1a31f04942811db0866efc38f49a7509460b
13,577
py
Python
optibot/casadi.py
AunSiro/optibot
186c9556473071b583f1ed677e2e1a647aeb0513
[ "MIT" ]
1
2021-06-01T15:58:45.000Z
2021-06-01T15:58:45.000Z
optibot/casadi.py
AunSiro/optibot
186c9556473071b583f1ed677e2e1a647aeb0513
[ "MIT" ]
null
null
null
optibot/casadi.py
AunSiro/optibot
186c9556473071b583f1ed677e2e1a647aeb0513
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon May 31 12:52:24 2021 @author: Siro Moreno sympy2casadi function original author: Joris Gillis https://gist.github.com/jgillis/80bb594a6c8fcf55891d1d88b12b68b8 """ import casadi as cas from casadi import sin, cos def get_str(x): return x.__str__() def list2casadi(va...
31.945882
126
0.592399
import casadi as cas from casadi import sin, cos def get_str(x): return x.__str__() def list2casadi(vallist): return cas.horzcat(*vallist).T def sympy2casadi(sympy_expr, sympy_var, casadi_var): from sympy.utilities.lambdify import lambdify mapping = { "ImmutableDense...
true
true
1c3f1ac5e6b0cb7fbf8d419b4d3a085f34c38922
6,867
py
Python
pokecord/dev.py
qenu/pokecord-red
35007e83297e1bf7430aa318a7d58745e2c1943c
[ "MIT" ]
9
2020-06-06T20:17:01.000Z
2021-10-10T18:28:54.000Z
pokecord/dev.py
flaree/pokecord-red
6810b45f3a2608c2726664b5d3d96b90c401e7b1
[ "MIT" ]
12
2020-07-09T00:32:49.000Z
2021-11-09T20:21:02.000Z
pokecord/dev.py
qenu/pokecord-red
35007e83297e1bf7430aa318a7d58745e2c1943c
[ "MIT" ]
12
2020-07-24T15:44:15.000Z
2022-03-14T10:14:19.000Z
import json import pprint from typing import Optional import discord import tabulate from redbot.core import commands from redbot.core.i18n import Translator from redbot.core.utils.chat_formatting import * from .abc import MixinMeta from .pokemixin import poke from .statements import * _ = Translator("Pokecord", __f...
33.661765
121
0.541139
import json import pprint from typing import Optional import discord import tabulate from redbot.core import commands from redbot.core.i18n import Translator from redbot.core.utils.chat_formatting import * from .abc import MixinMeta from .pokemixin import poke from .statements import * _ = Translator("Pokecord", __f...
true
true
1c3f1c778320fa7c201b58bb02189d6858253a62
609
py
Python
spacy_ann/types.py
StanciuMarius/spacy-ann-linker
d889a15b877c153269bc3068c8c4ed32773b182a
[ "MIT" ]
null
null
null
spacy_ann/types.py
StanciuMarius/spacy-ann-linker
d889a15b877c153269bc3068c8c4ed32773b182a
[ "MIT" ]
null
null
null
spacy_ann/types.py
StanciuMarius/spacy-ann-linker
d889a15b877c153269bc3068c8c4ed32773b182a
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from pydantic import BaseModel class AliasCandidate(BaseModel): """A data class representing a candidate alias that a NER mention may be linked to. """ alias: str similarity: float class KnowledgeBase...
21
74
0.686371
from pydantic import BaseModel class AliasCandidate(BaseModel): alias: str similarity: float class KnowledgeBaseCandidate(BaseModel): entity: str context_similarity: float prior_probability: float type_label: str index_vs_kb_type = { 0: 'UNK', 1: 'ORG', 2: 'GPE', 3: 'PER...
true
true
1c3f1c80099f18839d7e33b327db7ad92b8d4137
3,908
py
Python
tests/bugs/core_1512_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_1512_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_1512_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_1512 # title: Connection lost running script # decription: # tracker_id: CORE-1512 # min_versions: ['2.5.0'] # versions: 2.5 # qmid: None import pytest from firebird.qa import db_factory, isql_act, Action # version: 2.5 # resources: None substitutions...
30.771654
185
0.487462
import pytest from firebird.qa import db_factory, isql_act, Action substitutions_1 = [] init_script_1 = """""" db_1 = db_factory(page_size=4096, charset='ISO8859_1', sql_dialect=3, init=init_script_1) test_script_1 = """ -- Confirmed crash on WI-V2.1.7.18553 for: CREATE TABLE FHO_OS(...) CREAT...
true
true
1c3f1fed977056deaa2fd347e047dfdb1294474b
901
py
Python
language/mentionmemory/utils/custom_types.py
greck2908/language
61fa7260ac7d690d11ef72ca863e45a37c0bdc80
[ "Apache-2.0" ]
1,199
2018-10-16T01:30:18.000Z
2022-03-31T21:05:24.000Z
language/mentionmemory/utils/custom_types.py
greck2908/language
61fa7260ac7d690d11ef72ca863e45a37c0bdc80
[ "Apache-2.0" ]
116
2018-10-18T03:31:46.000Z
2022-03-24T13:40:50.000Z
language/mentionmemory/utils/custom_types.py
greck2908/language
61fa7260ac7d690d11ef72ca863e45a37c0bdc80
[ "Apache-2.0" ]
303
2018-10-22T12:35:12.000Z
2022-03-27T17:38:17.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 ...
34.653846
74
0.755827
from typing import Any, Callable, Dict, Iterable import jax.numpy as jnp Array = jnp.ndarray PRNGKey = jnp.ndarray Dtype = Any Shape = Iterable[int] InitType = Callable[[PRNGKey, Shape, Dtype], Array] MetricGroups = Dict[str, Dict[str, Array]]
true
true
1c3f2005445b5e5e44f4e6b24656f8c6abadab1b
2,913
py
Python
elo_system/elo_recolection_scripts/getTemporalelo.py
rafaOrtega14/tennisStats
4f4f92532f6437a24e6c51b8aa5ac106b5d25102
[ "MIT" ]
null
null
null
elo_system/elo_recolection_scripts/getTemporalelo.py
rafaOrtega14/tennisStats
4f4f92532f6437a24e6c51b8aa5ac106b5d25102
[ "MIT" ]
null
null
null
elo_system/elo_recolection_scripts/getTemporalelo.py
rafaOrtega14/tennisStats
4f4f92532f6437a24e6c51b8aa5ac106b5d25102
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import multiprocessing pd.options.mode.chained_assignment = None games=pd.read_csv("TrainsetGrass.csv",low_memory=False) players=pd.read_csv("eloCourt.csv",low_memory=False) def find_eloplayer(ID): hard=[] clay=[] grass=[] pos=934959345 for j in range(len(pl...
37.831169
136
0.604188
import pandas as pd import numpy as np import multiprocessing pd.options.mode.chained_assignment = None games=pd.read_csv("TrainsetGrass.csv",low_memory=False) players=pd.read_csv("eloCourt.csv",low_memory=False) def find_eloplayer(ID): hard=[] clay=[] grass=[] pos=934959345 for j in range(len(pl...
true
true
1c3f2068c085fd74540f04a5223b2307409fabb5
2,835
py
Python
setup-release.py
namuyan/electrum-fjc
1a5c4a582f0fcdbaeca2b721ee729f43cd7915a2
[ "MIT" ]
1
2017-07-06T03:03:25.000Z
2017-07-06T03:03:25.000Z
setup-release.py
namuyan/electrum-fjc
1a5c4a582f0fcdbaeca2b721ee729f43cd7915a2
[ "MIT" ]
null
null
null
setup-release.py
namuyan/electrum-fjc
1a5c4a582f0fcdbaeca2b721ee729f43cd7915a2
[ "MIT" ]
null
null
null
""" py2app/py2exe build script for Electrum Usage (Mac OS X): python setup.py py2app Usage (Windows): python setup.py py2exe """ from setuptools import setup import os import re import shutil import sys from lib.util import print_error from lib.version import ELECTRUM_VERSION as version name = "Electrum...
30.483871
118
0.611287
""" py2app/py2exe build script for Electrum Usage (Mac OS X): python setup.py py2app Usage (Windows): python setup.py py2exe """ from setuptools import setup import os import re import shutil import sys from lib.util import print_error from lib.version import ELECTRUM_VERSION as version name = "Electrum...
false
true
1c3f21c6980082d2b5b98180066cf9ba8b94eb50
156
py
Python
utils/runtime_mode.py
omiderfanmanesh/dengue-infections-prediction
6b4e4aa4af6f6e2cc581fd7828634bbfdc446340
[ "Apache-2.0" ]
null
null
null
utils/runtime_mode.py
omiderfanmanesh/dengue-infections-prediction
6b4e4aa4af6f6e2cc581fd7828634bbfdc446340
[ "Apache-2.0" ]
null
null
null
utils/runtime_mode.py
omiderfanmanesh/dengue-infections-prediction
6b4e4aa4af6f6e2cc581fd7828634bbfdc446340
[ "Apache-2.0" ]
1
2021-06-05T10:05:44.000Z
2021-06-05T10:05:44.000Z
# Copyright (c) 2021, Omid Erfanmanesh, All rights reserved. class RuntimeMode: TRAIN = 0 TUNING = 1 CROSS_VAL = 2 FEATURE_IMPORTANCE = 3
19.5
61
0.666667
class RuntimeMode: TRAIN = 0 TUNING = 1 CROSS_VAL = 2 FEATURE_IMPORTANCE = 3
true
true
1c3f21e25d49d260b961e83632b06c4e38d57eec
42,191
py
Python
pykotor/common/stream.py
NickHugi/PyKotor
cab1089f8a8a135861bef45340203718d39f5e1f
[ "MIT" ]
1
2022-02-21T15:17:28.000Z
2022-02-21T15:17:28.000Z
pykotor/common/stream.py
NickHugi/PyKotor
cab1089f8a8a135861bef45340203718d39f5e1f
[ "MIT" ]
1
2022-03-12T16:06:23.000Z
2022-03-12T16:06:23.000Z
pykotor/common/stream.py
NickHugi/PyKotor
cab1089f8a8a135861bef45340203718d39f5e1f
[ "MIT" ]
null
null
null
""" This module holds classes relating to read and write operations. """ from __future__ import annotations import io import struct from abc import ABC, abstractmethod from typing import BinaryIO, Union, TextIO, List, overload, Optional from pykotor.common.geometry import Vector3, Vector4, Vector2 from pykotor.common.l...
31.770331
120
0.572492
from __future__ import annotations import io import struct from abc import ABC, abstractmethod from typing import BinaryIO, Union, TextIO, List, overload, Optional from pykotor.common.geometry import Vector3, Vector4, Vector2 from pykotor.common.language import LocalizedString def _endian_char(big) -> str: return...
true
true
1c3f2211b675a7a05e8ac50df4265131fc2f31c0
127
py
Python
install.py
dmdhrumilmistry/Termux-SSH
65ba7868a0e8961f9a262a85e79b56f8b8a65b9e
[ "MIT" ]
5
2021-07-17T20:40:42.000Z
2022-02-27T09:41:19.000Z
install.py
dmdhrumilmistry/Termux-SSH
65ba7868a0e8961f9a262a85e79b56f8b8a65b9e
[ "MIT" ]
null
null
null
install.py
dmdhrumilmistry/Termux-SSH
65ba7868a0e8961f9a262a85e79b56f8b8a65b9e
[ "MIT" ]
1
2021-07-17T22:36:39.000Z
2021-07-17T22:36:39.000Z
#!usr/bin/env python3 from termux import get_user, generate_passwd, install_termux_req install_termux_req() generate_passwd()
21.166667
64
0.834646
from termux import get_user, generate_passwd, install_termux_req install_termux_req() generate_passwd()
true
true
1c3f23d96ace4872083b8af2bc17ca07cccb8d00
3,082
py
Python
socialite/jython/Lib/test/test_pkg_jy.py
Wangqge/PowerLog_ae
8546afbcb9a77d516e8c3f0dfbaf2041a4b888f9
[ "Apache-2.0" ]
49
2015-03-10T17:34:19.000Z
2021-11-10T22:23:18.000Z
socialite/jython/Lib/test/test_pkg_jy.py
Wangqge/PowerLog_ae
8546afbcb9a77d516e8c3f0dfbaf2041a4b888f9
[ "Apache-2.0" ]
null
null
null
socialite/jython/Lib/test/test_pkg_jy.py
Wangqge/PowerLog_ae
8546afbcb9a77d516e8c3f0dfbaf2041a4b888f9
[ "Apache-2.0" ]
32
2015-02-06T12:10:32.000Z
2019-06-18T03:21:36.000Z
# Test packages (dotted-name import) # XXX: This test is borrowed from CPython 2.7 as it tickles # http://bugs.jython.org/issue1871 so it should be removed in Jython 2.7 import sys import os import tempfile import textwrap import unittest from test import test_support # Helpers to create and destroy hierarchies. de...
29.352381
72
0.524984
import sys import os import tempfile import textwrap import unittest from test import test_support def cleanout(root): names = os.listdir(root) for name in names: fullname = os.path.join(root, name) if os.path.isdir(fullname) and not os.path.islink(fullname): cleanout(fullnam...
true
true
1c3f2546f93edc21097975e658b41e2c47bd89f7
4,392
py
Python
BackpackTF/currency.py
Epicalert/BackpackTf-API
dca4b3e1e6b2ada5f7357c929bd729d673310b57
[ "MIT" ]
null
null
null
BackpackTF/currency.py
Epicalert/BackpackTf-API
dca4b3e1e6b2ada5f7357c929bd729d673310b57
[ "MIT" ]
null
null
null
BackpackTF/currency.py
Epicalert/BackpackTf-API
dca4b3e1e6b2ada5f7357c929bd729d673310b57
[ "MIT" ]
1
2020-03-15T21:11:33.000Z
2020-03-15T21:11:33.000Z
class Currency: # # Documentation for the backpack.tf API https://backpack.tf/api/index.html#/ # def __init__(self, apikey=""): import requests import json if apikey == "": print("Error, you need to specify an API key") else: self.api_key = apike...
32.776119
110
0.574454
class Currency: def __init__(self, apikey=""): import requests import json if apikey == "": print("Error, you need to specify an API key") else: self.api_key = apikey def getCurrencies(self): import requests ...
true
true
1c3f25eeb542dd19eee2427b9f519e968190dd43
1,401
py
Python
tkinter/terminal_like.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
tkinter/terminal_like.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
tkinter/terminal_like.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
import tkinter from tkinter import * import subprocess import os from os import system as cmd WINDOW_SIZE = "600x400" top = tkinter.Tk() top.geometry(WINDOW_SIZE) def helloCallBack(): print ("Below is the output from the shell script in terminal") subprocess.call('perl /projects/tfs/users/$USER/scripts_coverage...
31.840909
98
0.745896
import tkinter from tkinter import * import subprocess import os from os import system as cmd WINDOW_SIZE = "600x400" top = tkinter.Tk() top.geometry(WINDOW_SIZE) def helloCallBack(): print ("Below is the output from the shell script in terminal") subprocess.call('perl /projects/tfs/users/$USER/scripts_coverage...
true
true
1c3f26c3a61647c9d8ad935235cfb46395852a3b
3,674
py
Python
Gse/src/models/serialize/serializable_type.py
lydiaxing/fprime
f6b3e03f89e9aca1614243c9896d4a72aa0cc726
[ "Apache-2.0" ]
2
2020-09-08T05:39:05.000Z
2021-05-04T14:58:51.000Z
Gse/src/models/serialize/serializable_type.py
JPLOpenSource/fprime-sw-Rel1.0
18364596c24fa369c938ef8758e5aa945ecc6a9b
[ "Apache-2.0" ]
2
2019-02-27T03:17:15.000Z
2019-03-01T22:34:30.000Z
Gse/src/models/serialize/serializable_type.py
JPLOpenSource/fprime-sw-Rel1.0
18364596c24fa369c938ef8758e5aa945ecc6a9b
[ "Apache-2.0" ]
3
2019-02-17T20:41:15.000Z
2019-02-26T21:06:50.000Z
''' Created on Dec 18, 2014 @author: tcanham ''' import struct from type_exceptions import * import type_base import u32_type import string_type import enum_type @type_base.serialize @type_base.deserialize class SerializableType(type_base.BaseType): """ Representation of the Serializable type (comparable to ...
30.616667
87
0.622482
''' Created on Dec 18, 2014 @author: tcanham ''' import struct from type_exceptions import * import type_base import u32_type import string_type import enum_type @type_base.serialize @type_base.deserialize class SerializableType(type_base.BaseType): """ Representation of the Serializable type (comparable to ...
false
true
1c3f28246dcadec804bcbfc32bf5b0c6e925821b
1,238
py
Python
Python/standardDeviation.py
giandrea77/RExercises
d435e303775b154d4cbbc25f990eb4b23272039d
[ "MIT" ]
null
null
null
Python/standardDeviation.py
giandrea77/RExercises
d435e303775b154d4cbbc25f990eb4b23272039d
[ "MIT" ]
null
null
null
Python/standardDeviation.py
giandrea77/RExercises
d435e303775b154d4cbbc25f990eb4b23272039d
[ "MIT" ]
null
null
null
# # Exerciese from book Data Science - Sinan Ozdemir # # @since : Fri Apr 9 14:41:38 CEST 2021 # ### Calculate standard deviance # # Distanza di un punto dei dati rispetto alla media # import numpy temps = [32, 32, 31, 28, 29, 31, 39, 32, 32, 35, 26, 29] # Calculate mean of values mean = numpy.mean(temps) square...
24.76
60
0.703554
, 35, 26, 29] mean = numpy.mean(temps) squared_differences = [] num_items = len(temps) products = 1 for temperature in temps: products *= temperature geometric_mean = products ** (1./num_items) difference = temperature - mean squared_difference = difference ** 2 squared...
true
true
1c3f283673b6f1a01e98e29d842f6d08e7c0768c
880
py
Python
common/ciphers/block/counter.py
lukius/mts
96d3d8b28742a474aca67bfcb079577c878bbb4c
[ "MIT" ]
2
2015-04-04T01:44:11.000Z
2017-11-04T11:59:27.000Z
common/ciphers/block/counter.py
lukius/mts
96d3d8b28742a474aca67bfcb079577c878bbb4c
[ "MIT" ]
null
null
null
common/ciphers/block/counter.py
lukius/mts
96d3d8b28742a474aca67bfcb079577c878bbb4c
[ "MIT" ]
null
null
null
from modes import CTR from common.tools.endianness import LittleEndian class CTRModeCounter(object): def __init__(self, block_size): self.block_size = block_size if block_size is not None\ else CTR.DEFAULT_BLOCK_SIZE def count(self, index): raise NotImpleme...
27.5
73
0.663636
from modes import CTR from common.tools.endianness import LittleEndian class CTRModeCounter(object): def __init__(self, block_size): self.block_size = block_size if block_size is not None\ else CTR.DEFAULT_BLOCK_SIZE def count(self, index): raise NotImpleme...
true
true
1c3f2a0faae6c5df9633a8467f5fe3dafec0dc15
1,911
py
Python
murano/cmd/engine.py
ISCAS-VDI/murano-base
34287bd9109b32a2bb0960c0428fe402dee6d9b2
[ "Apache-2.0" ]
1
2021-07-28T23:19:49.000Z
2021-07-28T23:19:49.000Z
murano/cmd/engine.py
ISCAS-VDI/murano-base
34287bd9109b32a2bb0960c0428fe402dee6d9b2
[ "Apache-2.0" ]
null
null
null
murano/cmd/engine.py
ISCAS-VDI/murano-base
34287bd9109b32a2bb0960c0428fe402dee6d9b2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2013 Mirantis, 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 re...
28.954545
79
0.685505
import os import eventlet if os.name == 'nt': eventlet.monkey_patch(os=False) else: eventlet.monkey_patch() import sys from oslo_concurrency import processutils from oslo_log import log as logging from oslo_service import service from murano.common import config from murano.commo...
true
true
1c3f2a49078e66fc5cfdd4857b54f8ca97fad00f
1,788
py
Python
jdcloud_sdk/services/instancevoucher/apis/ModifyInstanceVoucherAttributeRequest.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
jdcloud_sdk/services/instancevoucher/apis/ModifyInstanceVoucherAttributeRequest.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
jdcloud_sdk/services/instancevoucher/apis/ModifyInstanceVoucherAttributeRequest.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.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 agreed ...
29.8
128
0.69519
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest class ModifyInstanceVoucherAttributeRequest(JDCloudRequest): def __init__(self, parameters, header=None, version="v1"): super(ModifyInstanceVoucherAttributeRequest, self).__init__( '/regions/{regionId}/instanceVouche...
true
true
1c3f2d68127480af3fb83070c185d89fb58175a4
6,917
py
Python
test/test_commands.py
MicrohexHQ/supybot_fixes
f14e51f0379eee641c8b9c80a9259628f509f832
[ "BSD-3-Clause" ]
5
2016-06-26T01:25:21.000Z
2021-10-31T06:10:01.000Z
test/test_commands.py
prashantpawar/supybot-rothbot
dc04c133bec01574057a37d105c93c6076daccfc
[ "BSD-3-Clause" ]
1
2015-02-16T16:56:10.000Z
2015-02-16T16:56:10.000Z
test/test_commands.py
prashantpawar/supybot-rothbot
dc04c133bec01574057a37d105c93c6076daccfc
[ "BSD-3-Clause" ]
5
2015-08-23T22:59:26.000Z
2021-10-31T06:10:18.000Z
### # Copyright (c) 2002-2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of co...
39.752874
79
0.590863
rom supybot.test import * from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.callbacks as callbacks class CommandsTestCase(SupyTestCase): def assertState(self, spec, given, expected, target='test', **kwargs): msg = ircms...
false
true
1c3f2d7330211692e7ce6d41afd076ec8b682f77
16,747
py
Python
GUI/PyQt/utils/CNN_main.py
thomaskuestner/CNNArt
c2fc639dd2ce035f6ca90113290682a0ccd26fb8
[ "Apache-2.0" ]
22
2018-04-27T21:28:46.000Z
2021-12-24T06:44:55.000Z
GUI/PyQt/utils/CNN_main.py
thomaskuestner/CNNArt
c2fc639dd2ce035f6ca90113290682a0ccd26fb8
[ "Apache-2.0" ]
81
2017-11-09T17:23:15.000Z
2020-01-28T22:54:13.000Z
GUI/PyQt/utils/CNN_main.py
thomaskuestner/CNNArt
c2fc639dd2ce035f6ca90113290682a0ccd26fb8
[ "Apache-2.0" ]
18
2017-11-13T16:12:17.000Z
2020-08-27T10:17:34.000Z
# -*- coding: utf-8 -*- """ ---------------------------------- Main function for calling the CNNs ---------------------------------- Created on Wed Jan 27 16:57:10 2016 Copyright: 2016, 2017 Thomas Kuestner (thomas.kuestner@med.uni-tuebingen.de) under Apache2 license @author: Thomas Kuestner """ from tensorflow.python....
46.519444
153
0.526482
from tensorflow.python.keras.models import load_model from config.PATH import CNN_PATH import sys import numpy as np import h5py import scipy.io as sio import os.path import argparse import keras.backend as K from networks.motion.CNN2D import * from networks.motion.CNN3D import * from networks.motion.MNetAr...
true
true
1c3f2f8cea0a7ff37db06a263707542c416d7769
1,614
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/15_features/numtrees_30/rule_22.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/15_features/numtrees_30/rule_22.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/15_features/numtrees_30/rule_22.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Coupon_validity, obj[4]: Gender, obj[5]: Age, obj[6]: Children, obj[7]: Education, obj[8]: Occupation, obj[9]: Income, obj[10]: Bar, obj[11]: Coffeehouse, obj[12]: Restaurant20to50, obj[13]: Direction_same, obj[14]: Distance # {"feature":...
37.534884
305
0.581784
def findDecision(obj): if obj[9]<=6: if obj[0]>1: if obj[4]>0: return 'True' elif obj[4]<=0: if obj[7]>0: if obj[5]<=3: return 'False' elif obj[5]>3: return 'True' else: return 'True' elif obj[7]<=0: return 'True' else: return 'True' else:...
true
true
1c3f3071b3c658bb957cf41a58de0fac4bd47b97
2,081
py
Python
tests/python/gaia-ui-tests/gaiatest/tests/functional/ftu/test_ftu_with_tour.py
woslinux/gaia
eb6766d52c64a906101e548550cf09c23dad15e8
[ "Apache-2.0" ]
1
2019-04-26T21:30:24.000Z
2019-04-26T21:30:24.000Z
tests/python/gaia-ui-tests/gaiatest/tests/functional/ftu/test_ftu_with_tour.py
woslinux/gaia
eb6766d52c64a906101e548550cf09c23dad15e8
[ "Apache-2.0" ]
null
null
null
tests/python/gaia-ui-tests/gaiatest/tests/functional/ftu/test_ftu_with_tour.py
woslinux/gaia
eb6766d52c64a906101e548550cf09c23dad15e8
[ "Apache-2.0" ]
1
2021-09-03T10:18:22.000Z
2021-09-03T10:18:22.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from gaiatest import GaiaTestCase from gaiatest.apps.ftu.app import Ftu from gaiatest.apps.homescreen.app import Homescr...
43.354167
158
0.697261
from gaiatest import GaiaTestCase from gaiatest.apps.ftu.app import Ftu from gaiatest.apps.homescreen.app import Homescreen class TestFtu(GaiaTestCase): def setUp(self): GaiaTestCase.setUp(self) self.ftu = Ftu(self.marionette) self.ftu.launch() def test_ftu_with_tour(self): ...
true
true
1c3f308f7b065668e6fc003f90ec9a6cac71a721
1,611
py
Python
Detectors/analyzer.py
marcusbotacin/Anti.Analysis
a92d5850a921b9d76f546af6a1d52e9cf9f658f7
[ "MIT" ]
37
2017-09-08T18:59:47.000Z
2022-01-01T07:55:38.000Z
Detectors/analyzer.py
marcusbotacin/Anti.Analysis
a92d5850a921b9d76f546af6a1d52e9cf9f658f7
[ "MIT" ]
null
null
null
Detectors/analyzer.py
marcusbotacin/Anti.Analysis
a92d5850a921b9d76f546af6a1d52e9cf9f658f7
[ "MIT" ]
15
2018-02-02T10:45:06.000Z
2021-03-11T23:54:36.000Z
#!/usr/bin/env python # Implemented by Vitor Falcão da Rocha from sys import argv, path from os import listdir, getcwd from os.path import isfile, join from disassembler import Disassembler class Analyzer: def __init__(self, n): # n -> Max number of instructions self.detectors = [] self.impo...
27.305085
93
0.633768
from sys import argv, path from os import listdir, getcwd from os.path import isfile, join from disassembler import Disassembler class Analyzer: def __init__(self, n): self.detectors = [] self.import_detectors() self.max_number_of_instructions = n self.number_of_instructio...
false
true
1c3f30fcc910ed268fb074d46de85f5729d9d8ae
859
py
Python
utils/vocab_utils.py
sciforce/phones-las
f95523fbbdf1dd7f1acce5b25c37b620f3eb8e9b
[ "Apache-2.0" ]
35
2019-07-04T10:13:29.000Z
2022-02-22T03:41:39.000Z
utils/vocab_utils.py
sciforce/phones-las
f95523fbbdf1dd7f1acce5b25c37b620f3eb8e9b
[ "Apache-2.0" ]
7
2019-11-04T15:34:03.000Z
2020-06-21T04:30:22.000Z
utils/vocab_utils.py
sciforce/phones-las
f95523fbbdf1dd7f1acce5b25c37b620f3eb8e9b
[ "Apache-2.0" ]
5
2019-07-15T20:09:46.000Z
2021-08-05T09:55:29.000Z
import tensorflow as tf import pickle __all__ = [ 'create_vocab_table', 'load_vocab', 'UNK', 'SOS', 'EOS', 'UNK_ID', 'SOS_ID', 'EOS_ID', ] UNK = '<unk>' SOS = '<s>' EOS = '</s>' UNK_ID = 0 SOS_ID = 1 EOS_ID = 2 def load_vocab(filename): if not '.pickle' in filename: with...
20.452381
73
0.605355
import tensorflow as tf import pickle __all__ = [ 'create_vocab_table', 'load_vocab', 'UNK', 'SOS', 'EOS', 'UNK_ID', 'SOS_ID', 'EOS_ID', ] UNK = '<unk>' SOS = '<s>' EOS = '</s>' UNK_ID = 0 SOS_ID = 1 EOS_ID = 2 def load_vocab(filename): if not '.pickle' in filename: with...
true
true
1c3f334e33497dd3183a46e03be879ae0cc7ebf6
5,664
py
Python
tf_slim/nets/overfeat.py
adrianc-a/tf-slim
4d4496e5ad26747f0d9f7b8af754ed73d56cede5
[ "Apache-2.0" ]
4
2019-11-07T09:20:52.000Z
2022-01-04T22:38:22.000Z
tf_slim/nets/overfeat.py
adrianc-a/tf-slim
4d4496e5ad26747f0d9f7b8af754ed73d56cede5
[ "Apache-2.0" ]
1
2019-12-02T10:10:58.000Z
2019-12-02T10:10:58.000Z
tf_slim/nets/overfeat.py
adrianc-a/tf-slim
4d4496e5ad26747f0d9f7b8af754ed73d56cede5
[ "Apache-2.0" ]
6
2019-11-27T19:25:58.000Z
2022-01-26T07:54:22.000Z
# coding=utf-8 # Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
42.268657
80
0.707627
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib import layers from tensorflow.contrib.framework.python.ops import arg_scope from tensorflow.contrib.layers.python.layers import layers as layers_lib from tensorflow.contr...
true
true