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
f732a1266d5c853c67006f483f36e4ebce514789
3,923
py
Python
tests/test_nidmm.py
jonathanmendez/nitsm-python
c7bbe2e53d56cf987d2369336d32b8baf6ae806a
[ "MIT" ]
4
2021-08-21T06:21:45.000Z
2021-12-27T05:27:43.000Z
tests/test_nidmm.py
jonathanmendez/nitsm-python
c7bbe2e53d56cf987d2369336d32b8baf6ae806a
[ "MIT" ]
51
2021-07-28T14:48:04.000Z
2022-03-25T02:35:40.000Z
tests/test_nidmm.py
jonathanmendez/nitsm-python
c7bbe2e53d56cf987d2369336d32b8baf6ae806a
[ "MIT" ]
2
2021-06-23T19:53:17.000Z
2022-03-27T20:10:27.000Z
import nidmm import pytest from nitsm.codemoduleapi import SemiconductorModuleContext from nitsm.pinquerycontexts import PinQueryContext @pytest.fixture def simulated_nidmm_sessions(standalone_tsm_context): instrument_names = standalone_tsm_context.get_all_nidmm_instrument_names() sessions = [ nidmm.S...
44.579545
92
0.748917
import nidmm import pytest from nitsm.codemoduleapi import SemiconductorModuleContext from nitsm.pinquerycontexts import PinQueryContext @pytest.fixture def simulated_nidmm_sessions(standalone_tsm_context): instrument_names = standalone_tsm_context.get_all_nidmm_instrument_names() sessions = [ nidmm.S...
true
true
f732a1540ce9c9c39b99ed7b642be2f0ab715075
3,774
py
Python
dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/flink.py
tracehh/dolphinscheduler
d6fe1ccacf79d9ade3a371a0f520d7e224b40c84
[ "Apache-2.0" ]
2,086
2021-04-15T20:28:24.000Z
2022-03-31T22:30:49.000Z
dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/flink.py
tracehh/dolphinscheduler
d6fe1ccacf79d9ade3a371a0f520d7e224b40c84
[ "Apache-2.0" ]
3,789
2021-04-15T16:00:32.000Z
2022-03-31T13:38:53.000Z
dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/flink.py
tracehh/dolphinscheduler
d6fe1ccacf79d9ade3a371a0f520d7e224b40c84
[ "Apache-2.0" ]
1,170
2021-04-16T06:40:24.000Z
2022-03-31T22:30:51.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.983051
91
0.654213
from typing import Dict, Optional from pydolphinscheduler.constants import TaskType from pydolphinscheduler.core.task import Task from pydolphinscheduler.java_gateway import launch_gateway class ProgramType(str): JAVA = "JAVA" SCALA = "SCALA" PYTHON = "PYTHON" class FlinkVersion(str)...
true
true
f732a1fd5f6bba4f5da1d7a6c7fabe8eac638bb7
476
py
Python
ex100.py
arthurfas123/Curso-De-Python
c4a15d92811bd101a8562d2c3a90fe2d5a3c360d
[ "MIT" ]
null
null
null
ex100.py
arthurfas123/Curso-De-Python
c4a15d92811bd101a8562d2c3a90fe2d5a3c360d
[ "MIT" ]
null
null
null
ex100.py
arthurfas123/Curso-De-Python
c4a15d92811bd101a8562d2c3a90fe2d5a3c360d
[ "MIT" ]
null
null
null
from random import randint from time import sleep def sorteia(lista): print('=-=' * 15) for c in range(0, 5): lista.append(randint(1, 10)) print('Sorteando 5 valores da lista: ', end=' ') for c in lista: print(f'{c}', end=' ', flush=True) sleep(0.3) print() def somapar(li...
17.62963
52
0.535714
from random import randint from time import sleep def sorteia(lista): print('=-=' * 15) for c in range(0, 5): lista.append(randint(1, 10)) print('Sorteando 5 valores da lista: ', end=' ') for c in lista: print(f'{c}', end=' ', flush=True) sleep(0.3) print() def somapar(li...
true
true
f732a2a5bc2f99320a9eaba98bf163ca6ad86b20
3,257
py
Python
tests/data.py
tardyp/pyserde
2bef77d9888ffcc650f031f0e883cb2ff08cbf60
[ "MIT" ]
null
null
null
tests/data.py
tardyp/pyserde
2bef77d9888ffcc650f031f0e883cb2ff08cbf60
[ "MIT" ]
null
null
null
tests/data.py
tardyp/pyserde
2bef77d9888ffcc650f031f0e883cb2ff08cbf60
[ "MIT" ]
null
null
null
import enum from dataclasses import dataclass from typing import Dict, List, Optional, Tuple from serde import serde from . import imported @serde @dataclass(unsafe_hash=True) class Int: """ Integer. """ i: int @serde @dataclass(unsafe_hash=True) class Str: """ String. """ s: str...
13.028
67
0.562174
import enum from dataclasses import dataclass from typing import Dict, List, Optional, Tuple from serde import serde from . import imported @serde @dataclass(unsafe_hash=True) class Int: i: int @serde @dataclass(unsafe_hash=True) class Str: s: str @serde @dataclass(unsafe_hash=True) class Float: ...
true
true
f732a2b88e85016c41399879af5345c63525edb3
46
py
Python
count_loop.py
cascroydon/Flowcharts
b9a84ae4dc6c70fff907a19171a3a19bae3d1335
[ "MIT" ]
null
null
null
count_loop.py
cascroydon/Flowcharts
b9a84ae4dc6c70fff907a19171a3a19bae3d1335
[ "MIT" ]
null
null
null
count_loop.py
cascroydon/Flowcharts
b9a84ae4dc6c70fff907a19171a3a19bae3d1335
[ "MIT" ]
null
null
null
for count in range(10): print (count + 1)
15.333333
23
0.608696
for count in range(10): print (count + 1)
true
true
f732a2c5e0fd2b6e98955ccea0377372f3d5c887
14,062
py
Python
torchMoji/torchmoji/model_def.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
163
2019-06-23T14:07:57.000Z
2022-02-25T23:06:07.000Z
torchMoji/torchmoji/model_def.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
8
2019-07-24T12:41:31.000Z
2022-02-10T00:17:20.000Z
torchMoji/torchmoji/model_def.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
31
2019-06-26T01:21:07.000Z
2021-09-06T17:23:24.000Z
# -*- coding: utf-8 -*- """ Model definition functions and weight loading. """ from __future__ import print_function, division, unicode_literals from os.path import exists import torch import torch.nn as nn from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence, ...
44.5
139
0.645499
from __future__ import print_function, division, unicode_literals from os.path import exists import torch import torch.nn as nn from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence, PackedSequence from torchMoji.torchmoji.lstm import LSTMHardSigmoid from torc...
true
true
f732a342632d05f40c130c080066d38b5818a226
987
py
Python
Codewars_Python/memoized_log_cutting.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
Codewars_Python/memoized_log_cutting.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
Codewars_Python/memoized_log_cutting.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
# nlantau, 2021-01-17 INT_MIN=-32422 def cut_log(p,n): r = [0 for _ in range(n+1)] r[0] = 0 for j in range(1,n+1): q = INT_MIN for i in range(1,j+1): q = max(q, p[i] + r[j-i]) r[j] = q return r[n] # Clever solutions def cl(p,n): l = [0] for _ in range(n)...
23.5
62
0.506586
INT_MIN=-32422 def cut_log(p,n): r = [0 for _ in range(n+1)] r[0] = 0 for j in range(1,n+1): q = INT_MIN for i in range(1,j+1): q = max(q, p[i] + r[j-i]) r[j] = q return r[n] def cl(p,n): l = [0] for _ in range(n): l.append(max(pi+li for pi, li...
true
true
f732a3a89841c1d3b41f3f0c82246c1472d76f09
6,229
py
Python
myems-api/core/wechatmessage.py
hyh123a/myems
669ab8554995a622da595384698d670f9cee61f8
[ "MIT" ]
2
2021-02-19T10:22:36.000Z
2021-02-19T10:23:22.000Z
myems-api/core/wechatmessage.py
hyh123a/myems
669ab8554995a622da595384698d670f9cee61f8
[ "MIT" ]
null
null
null
myems-api/core/wechatmessage.py
hyh123a/myems
669ab8554995a622da595384698d670f9cee61f8
[ "MIT" ]
1
2022-01-29T14:18:47.000Z
2022-01-29T14:18:47.000Z
import falcon import json import mysql.connector import config from datetime import datetime, timedelta, timezone class WechatMessageCollection(object): @staticmethod def on_options(req, resp, startdate, enddate): resp.status = falcon.HTTP_200 @staticmethod def on_get(req, resp, startdate, e...
37.981707
103
0.541981
import falcon import json import mysql.connector import config from datetime import datetime, timedelta, timezone class WechatMessageCollection(object): @staticmethod def on_options(req, resp, startdate, enddate): resp.status = falcon.HTTP_200 @staticmethod def on_get(req, resp, startdate, e...
true
true
f732a4710f4e48af1d36e16ade6633b7916317d3
438
py
Python
password-maker.py
JG-Mike/password-generator
5bf5c4f8fc9387b9048ae96d7f329f4bca8028b3
[ "MIT" ]
null
null
null
password-maker.py
JG-Mike/password-generator
5bf5c4f8fc9387b9048ae96d7f329f4bca8028b3
[ "MIT" ]
null
null
null
password-maker.py
JG-Mike/password-generator
5bf5c4f8fc9387b9048ae96d7f329f4bca8028b3
[ "MIT" ]
null
null
null
import random import string # length of password length = int(input('\nEnter the length of password: ')) # define characters for making password lower = string.ascii_lowercase upper = string.ascii_uppercase num = string.digits symbols = string.punctuation all = lower + upper + num + symbols # use random temp = ra...
18.25
56
0.748858
import random import string length = int(input('\nEnter the length of password: ')) lower = string.ascii_lowercase upper = string.ascii_uppercase num = string.digits symbols = string.punctuation all = lower + upper + num + symbols temp = random.sample(all,length) password = "".join(temp) print(password)
true
true
f732a4cc35b1d21135b3bf3c9292b0a16c1ea6c5
2,842
py
Python
fastapi_module/controller.py
lqmanh/fastapi-alt-controller
b7370850f9f95e5fdebaf9c211f5dee1dc729a96
[ "MIT" ]
1
2021-06-10T08:32:32.000Z
2021-06-10T08:32:32.000Z
fastapi_module/controller.py
lqmanh/fastapi-alt-controller
b7370850f9f95e5fdebaf9c211f5dee1dc729a96
[ "MIT" ]
13
2021-08-28T08:02:52.000Z
2022-03-01T01:07:13.000Z
fastapi_module/controller.py
lqmanh/fastapi-module
b7370850f9f95e5fdebaf9c211f5dee1dc729a96
[ "MIT" ]
null
null
null
import inspect from collections.abc import Callable from inspect import Parameter from typing import Optional, TypeVar, Union from fastapi import APIRouter, Depends from starlette.routing import Route, WebSocketRoute from .types import InitializedError from .utils import make_cls_accept_cls_annotated_deps T = TypeVa...
35.525
116
0.728712
import inspect from collections.abc import Callable from inspect import Parameter from typing import Optional, TypeVar, Union from fastapi import APIRouter, Depends from starlette.routing import Route, WebSocketRoute from .types import InitializedError from .utils import make_cls_accept_cls_annotated_deps T = TypeVa...
true
true
f732a59e7fc268316b9070494224003bd1b40ac2
503
py
Python
pal/transform/make_write_only.py
mars-research/pal
5977394cda8750ff5dcb89c2bf193ec1ef4cd137
[ "MIT" ]
26
2020-01-06T23:53:17.000Z
2022-02-01T08:58:21.000Z
pal/transform/make_write_only.py
mars-research/pal
5977394cda8750ff5dcb89c2bf193ec1ef4cd137
[ "MIT" ]
30
2019-11-13T00:55:22.000Z
2022-01-06T08:09:35.000Z
pal/transform/make_write_only.py
mars-research/pal
5977394cda8750ff5dcb89c2bf193ec1ef4cd137
[ "MIT" ]
14
2019-11-15T16:56:22.000Z
2021-12-22T10:14:17.000Z
from pal.transform.abstract_transform import AbstractTransform class MakeWriteOnly(AbstractTransform): @property def description(self): d = "removing readable access mechanisms" return d def do_transform(self, reg): readable = [ "mrs_register", "mrs_banked"...
20.958333
62
0.540755
from pal.transform.abstract_transform import AbstractTransform class MakeWriteOnly(AbstractTransform): @property def description(self): d = "removing readable access mechanisms" return d def do_transform(self, reg): readable = [ "mrs_register", "mrs_banked"...
true
true
f732a62465afae0e6e49ac1c46c00ec0307e13a3
493
py
Python
pyjobs/core/migrations/0042_job_receive_emails.py
Mdslino/PyJobs
d2496d58067503c3304a6c59052238b1f097472b
[ "BSD-3-Clause" ]
132
2017-10-27T23:54:47.000Z
2022-03-15T12:10:10.000Z
pyjobs/core/migrations/0042_job_receive_emails.py
Mdslino/PyJobs
d2496d58067503c3304a6c59052238b1f097472b
[ "BSD-3-Clause" ]
129
2017-09-05T04:22:50.000Z
2022-03-12T01:06:49.000Z
pyjobs/core/migrations/0042_job_receive_emails.py
Mdslino/PyJobs
d2496d58067503c3304a6c59052238b1f097472b
[ "BSD-3-Clause" ]
82
2017-10-28T00:14:04.000Z
2021-07-27T20:00:40.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2019-10-29 17:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0041_jobapplication_output_sent"), ] operations = [ migrations.Add...
23.47619
83
0.634888
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0041_jobapplication_output_sent"), ] operations = [ migrations.AddField( model_name="job", name="receive_emails", ...
true
true
f732a7f0fd236efe6a53656d4ab41520905e53e9
20,847
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/rfc2889broadcastrate_1f8e1c7f7f9e4d711149db4a572058fb.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/rfc2889broadcastrate_1f8e1c7f7f9e4d711149db4a572058fb.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/rfc2889broadcastrate_1f8e1c7f7f9e4d711149db4a572058fb.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
43.888421
321
0.648822
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class Rfc2889broadcastRate(Base): __slots__ = () _SDM_NAME = 'rfc2889broadcastRate' _SDM_ATT_MAP = { 'ForceApplyQTConfig': 'forceApplyQTConfig', 'InputP...
true
true
f732a7f1402ea43dd9abb61ba68ef9d3a1892d30
1,392
py
Python
cube_model.py
jasonrute/puzzle_cube_code
cf0238bc333d55e3637a4a6a4f408d16d4e14418
[ "MIT" ]
2
2020-11-12T06:41:44.000Z
2022-02-27T13:50:38.000Z
cube_model.py
jasonrute/puzzle_cube_code
cf0238bc333d55e3637a4a6a4f408d16d4e14418
[ "MIT" ]
null
null
null
cube_model.py
jasonrute/puzzle_cube_code
cf0238bc333d55e3637a4a6a4f408d16d4e14418
[ "MIT" ]
2
2018-05-22T02:40:23.000Z
2018-07-28T11:14:41.000Z
""" A user-facing wrapper around the neural network models for solving the cube. """ import models from typing import Optional class CubeModel: _model = None # type: Optional[models.BaseModel] def __init__(self): pass def load_from_config(self, filepath: Optional[str] = None) -> (): ""...
31.636364
106
0.637213
import models from typing import Optional class CubeModel: _model = None def __init__(self): pass def load_from_config(self, filepath: Optional[str] = None) -> (): import config if filepath is None: assert False, "Fill in this branch" self.load(config.mod...
true
true
f732a8a11f50492a52b576b04ef8f79e805f1093
51,156
py
Python
flax/timelord/timelord.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
174
2021-06-16T17:49:22.000Z
2022-03-17T03:03:17.000Z
flax/timelord/timelord.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
49
2021-06-17T14:10:53.000Z
2022-01-31T11:04:21.000Z
flax/timelord/timelord.py
ReadyNeutron/shitcoin-blockchain
80add4e545ad22a317244f7fd958d118a5a75c5d
[ "Apache-2.0" ]
80
2021-06-17T14:23:31.000Z
2022-02-24T05:52:47.000Z
import asyncio import dataclasses import io import logging import random import time import traceback from typing import Callable, Dict, List, Optional, Tuple, Set from chiavdf import create_discriminant from flax.consensus.constants import ConsensusConstants from flax.consensus.pot_iterations import calculate_sp_ite...
49.378378
120
0.562221
import asyncio import dataclasses import io import logging import random import time import traceback from typing import Callable, Dict, List, Optional, Tuple, Set from chiavdf import create_discriminant from flax.consensus.constants import ConsensusConstants from flax.consensus.pot_iterations import calculate_sp_ite...
true
true
f732a92f6a56d1d3f0f151db59875c79d7b14b14
6,624
py
Python
files/RMFE_24.py
akiratk0355/RMFE
2cce1eb3daebc0594e0b70f60fc78d1979b507a5
[ "MIT" ]
1
2021-05-13T08:31:57.000Z
2021-05-13T08:31:57.000Z
files/RMFE_24.py
akiratk0355/RMFE
2cce1eb3daebc0594e0b70f60fc78d1979b507a5
[ "MIT" ]
null
null
null
files/RMFE_24.py
akiratk0355/RMFE
2cce1eb3daebc0594e0b70f60fc78d1979b507a5
[ "MIT" ]
null
null
null
# This file was *autogenerated* from the file RMFE_24.sage from FFTa import * from field_iso import * from FFTpreproc import * from sage.all_cmdline import * # import sage library _sage_const_2 = Integer(2) _sage_const_1 = Integer(1) _sage_const_0 = Integer(0) _sage_const_4 = Integer(4) _sage_const_128 = Integer(12...
43.012987
656
0.658816
from FFTa import * from field_iso import * from FFTpreproc import * from sage.all_cmdline import * _sage_const_2 = Integer(2) _sage_const_1 = Integer(1) _sage_const_0 = Integer(0) _sage_const_4 = Integer(4) _sage_const_128 = Integer(128) _sage_const_16 = Integer(16) _sage_const_32 = Integer(32) H = G...
true
true
f732aa6c84cffecfc28ee6c1d6e55c5c92e84145
9,150
py
Python
cctpy6_r100_wn_change/run.py
madokast/cctpy
b02c64220ea533a4fc9cad0b882d1be6edadf1c0
[ "MIT" ]
1
2021-12-27T13:20:43.000Z
2021-12-27T13:20:43.000Z
cctpy6_r100_wn_change/run.py
madokast/cctpy
b02c64220ea533a4fc9cad0b882d1be6edadf1c0
[ "MIT" ]
null
null
null
cctpy6_r100_wn_change/run.py
madokast/cctpy
b02c64220ea533a4fc9cad0b882d1be6edadf1c0
[ "MIT" ]
null
null
null
# from visdom import Visdom from cctpy import * from ccpty_cuda import * import time import numpy as np VIZ_PORT = 8098 ga32 = GPU_ACCELERATOR() momentum_dispersions = [-0.05, -0.025, 0.0, 0.025, 0.05] particle_number_per_plane_per_dp = 12 particle_number_per_gantry = len(momentum_dispersions) * particle_number_pe...
31.551724
120
0.590055
from cctpy import * from ccpty_cuda import * import time import numpy as np VIZ_PORT = 8098 ga32 = GPU_ACCELERATOR() momentum_dispersions = [-0.05, -0.025, 0.0, 0.025, 0.05] particle_number_per_plane_per_dp = 12 particle_number_per_gantry = len(momentum_dispersions) * particle_number_per_plane_per_dp * 2 default...
true
true
f732ab774f7555bf80fc97f6f5a4ed2a63925d48
3,440
py
Python
subsamplers/cldnn.py
dl4amc/dds
2d53c74ea1f1452beb2c1c52d3048e4260f22948
[ "MIT" ]
4
2020-11-05T01:36:52.000Z
2022-03-10T13:04:12.000Z
subsamplers/cldnn.py
dl4amc/dds
2d53c74ea1f1452beb2c1c52d3048e4260f22948
[ "MIT" ]
null
null
null
subsamplers/cldnn.py
dl4amc/dds
2d53c74ea1f1452beb2c1c52d3048e4260f22948
[ "MIT" ]
4
2019-08-26T08:23:13.000Z
2021-09-06T03:32:14.000Z
# coding: utf-8 # Import all the things we need --- #get_ipython().magic(u'matplotlib inline') import os,random #os.environ["KERAS_BACKEND"] = "theano" os.environ["KERAS_BACKEND"] = "tensorflow" #os.environ["THEANO_FLAGS"] = "device=gpu%d"%(1) #disabled because we do not have a hardware GPU import numpy as np from ...
36.210526
109
0.684012
import os,random os.environ["KERAS_BACKEND"] = "tensorflow" from keras.utils import np_utils from keras.models import load_model import keras.models as models from keras.layers.core import Reshape,Dense,Dropout,Activation,Flatten from keras.layers.convolutional import Conv2D, MaxPooling2D, ZeroPadding2D from kera...
true
true
f732ad2fb5d7e7d62c89efc5f6454bc26525c05a
10,402
py
Python
homeassistant/components/axis/device.py
amatas/home-assistant-core
bdbb4f939f34682b2eca993bb041cfb21214015c
[ "Apache-2.0" ]
null
null
null
homeassistant/components/axis/device.py
amatas/home-assistant-core
bdbb4f939f34682b2eca993bb041cfb21214015c
[ "Apache-2.0" ]
30
2021-04-19T09:52:11.000Z
2022-03-31T06:09:38.000Z
homeassistant/components/axis/device.py
amatas/home-assistant-core
bdbb4f939f34682b2eca993bb041cfb21214015c
[ "Apache-2.0" ]
null
null
null
"""Axis network device abstraction.""" import asyncio import async_timeout import axis from axis.configuration import Configuration from axis.errors import Unauthorized from axis.event_stream import OPERATION_INITIALIZED from axis.mqtt import mqtt_json_to_event from axis.streammanager import SIGNAL_PLAYING, STATE_STO...
32.204334
90
0.644972
import asyncio import async_timeout import axis from axis.configuration import Configuration from axis.errors import Unauthorized from axis.event_stream import OPERATION_INITIALIZED from axis.mqtt import mqtt_json_to_event from axis.streammanager import SIGNAL_PLAYING, STATE_STOPPED from homeassistant.components imp...
true
true
f732ae4687670e15c3de1e4e5c21bee291e33b6a
4,500
py
Python
webform.py
rubind/travelreform
073c5b5ab17feb495d8c3a0e55997f2f1ffd15fa
[ "BSD-3-Clause" ]
null
null
null
webform.py
rubind/travelreform
073c5b5ab17feb495d8c3a0e55997f2f1ffd15fa
[ "BSD-3-Clause" ]
null
null
null
webform.py
rubind/travelreform
073c5b5ab17feb495d8c3a0e55997f2f1ffd15fa
[ "BSD-3-Clause" ]
null
null
null
from flask import Flask, render_template, flash, request from wtforms import Form, TextField, TextAreaField from wtforms import validators, StringField, SubmitField, DateField # App config. DEBUG = True app = Flask(__name__) app.config.from_object(__name__) app.config['SECRET_KEY'] = '7d441f27d441f27567d441f2b6176a' ...
40.178571
107
0.637556
from flask import Flask, render_template, flash, request from wtforms import Form, TextField, TextAreaField from wtforms import validators, StringField, SubmitField, DateField DEBUG = True app = Flask(__name__) app.config.from_object(__name__) app.config['SECRET_KEY'] = '7d441f27d441f27567d441f2b6176a' class Travel...
true
true
f732afab2b623525ae2d42767da48fdf8cb24eb0
8,986
py
Python
api/open_general_licences/views.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
api/open_general_licences/views.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
api/open_general_licences/views.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
from django.contrib.contenttypes.models import ContentType from django.db.models import F from django.http import JsonResponse from rest_framework import status from rest_framework.generics import ListCreateAPIView, RetrieveUpdateAPIView from rest_framework.views import APIView from api.audit_trail import service as a...
45.383838
119
0.662586
from django.contrib.contenttypes.models import ContentType from django.db.models import F from django.http import JsonResponse from rest_framework import status from rest_framework.generics import ListCreateAPIView, RetrieveUpdateAPIView from rest_framework.views import APIView from api.audit_trail import service as a...
true
true
f732afd0af1724a0a5302530af48ae4acd5a254a
1,482
py
Python
Lesson08/elevatorEx.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
1
2021-04-23T14:01:56.000Z
2021-04-23T14:01:56.000Z
Lesson08/elevatorEx.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
null
null
null
Lesson08/elevatorEx.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
4
2021-06-29T05:57:44.000Z
2021-09-02T10:14:55.000Z
class Elevator: occupancy_limit = 8 def __init__(self, occupants=0): self.floor = 0 if occupants <= Elevator.occupancy_limit: self.occupants = occupants else: self.occupants = Elevator.occupancy_limit print('too many occupants', occupants - Elevator.o...
27.962264
98
0.647099
class Elevator: occupancy_limit = 8 def __init__(self, occupants=0): self.floor = 0 if occupants <= Elevator.occupancy_limit: self.occupants = occupants else: self.occupants = Elevator.occupancy_limit print('too many occupants', occupants - Elevator.o...
true
true
f732b2e9fd2f67c62643b7cae833d2d028d7a955
1,179
py
Python
piwars/core/config.py
westpark/robotics
62546d0b2235b9ab73ec7968e2167f516a664c58
[ "MIT" ]
null
null
null
piwars/core/config.py
westpark/robotics
62546d0b2235b9ab73ec7968e2167f516a664c58
[ "MIT" ]
null
null
null
piwars/core/config.py
westpark/robotics
62546d0b2235b9ab73ec7968e2167f516a664c58
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os, sys import configparser import warnings # # Look for a global .ini in the current directory. If none is # there, raise an exception and exit. Look for a local .ini # in the same directory. If that isn't present, issue a warning # but carry on and use the global values # gl...
36.84375
84
0.729432
import os, sys import configparser import warnings # but carry on and use the global values # global_filepath = os.path.abspath("piwars.ini") if not os.path.isfile(global_filepath): warnings("No global ini found at %s" % global_filepath) local_filepath = os.path.join(os.path.dirname(global_filepath),...
true
true
f732b2ec2b02ec6fa26f1db75dfbaa8d9869b735
290
py
Python
nutshell_api/conftest.py
garguelles/nutshell-api
df6e68ca1919b9c0fc63db89f528800aadbab596
[ "MIT" ]
null
null
null
nutshell_api/conftest.py
garguelles/nutshell-api
df6e68ca1919b9c0fc63db89f528800aadbab596
[ "MIT" ]
null
null
null
nutshell_api/conftest.py
garguelles/nutshell-api
df6e68ca1919b9c0fc63db89f528800aadbab596
[ "MIT" ]
null
null
null
import pytest from nutshell_api.users.models import User from nutshell_api.users.tests.factories import UserFactory @pytest.fixture(autouse=True) def media_storage(settings, tmpdir): settings.MEDIA_ROOT = tmpdir.strpath @pytest.fixture def user() -> User: return UserFactory()
19.333333
58
0.782759
import pytest from nutshell_api.users.models import User from nutshell_api.users.tests.factories import UserFactory @pytest.fixture(autouse=True) def media_storage(settings, tmpdir): settings.MEDIA_ROOT = tmpdir.strpath @pytest.fixture def user() -> User: return UserFactory()
true
true
f732b4f7255e2997817c6d6f96024eef94c92523
398
py
Python
examples/prototype_build_all.py
zorbathut/vespid
a2a66a21118a572570557aa50386f3e80de94f08
[ "MIT" ]
null
null
null
examples/prototype_build_all.py
zorbathut/vespid
a2a66a21118a572570557aa50386f3e80de94f08
[ "MIT" ]
null
null
null
examples/prototype_build_all.py
zorbathut/vespid
a2a66a21118a572570557aa50386f3e80de94f08
[ "MIT" ]
null
null
null
import vespidlib from util import log log("Creating task . . .") task = vespidlib.task_create( executable_pyscript = open("prototype_build_all_start.py", "r").read(), name = "fullbuild_project_main_dev", requirements = {"memory": 0, "cores": 0}, repositories = {"env": {"request": "project_main_dev", "local":...
20.947368
73
0.673367
import vespidlib from util import log log("Creating task . . .") task = vespidlib.task_create( executable_pyscript = open("prototype_build_all_start.py", "r").read(), name = "fullbuild_project_main_dev", requirements = {"memory": 0, "cores": 0}, repositories = {"env": {"request": "project_main_dev", "local":...
true
true
f732b5ecf89394ec2482495f04a428476df90f10
6,455
py
Python
src/nox_alarm/noxGateway.py
cheperboy/home_alarm
27a8f68f32be054ee61f5a53fdb9026c026b592c
[ "MIT" ]
null
null
null
src/nox_alarm/noxGateway.py
cheperboy/home_alarm
27a8f68f32be054ee61f5a53fdb9026c026b592c
[ "MIT" ]
null
null
null
src/nox_alarm/noxGateway.py
cheperboy/home_alarm
27a8f68f32be054ee61f5a53fdb9026c026b592c
[ "MIT" ]
null
null
null
import sys import prctl # Used to set thread name (visible in htop) import zmq from time import sleep from threading import Thread, Event, current_thread from datetime import datetime from flask import current_app as app from . import zmq_socket_config context = zmq.Context() """ Configure logger """ import logging ...
51.64
121
0.670798
import sys import prctl import zmq from time import sleep from threading import Thread, Event, current_thread from datetime import datetime from flask import current_app as app from . import zmq_socket_config context = zmq.Context() import logging logger = logging.getLogger('alarm.thread') class ThreadNoxAlarmGate...
true
true
f732b677283ef4032ae1d98e9bc65f18beaa27f8
564
py
Python
ap_server/common/schemas.py
phelipealves/CreateAPServer
c6775631ff075b0c29ce8a81ea55ffe76327d924
[ "MIT" ]
1
2019-06-04T15:27:40.000Z
2019-06-04T15:27:40.000Z
ap_server/common/schemas.py
phelipealves/CreateAPServer
c6775631ff075b0c29ce8a81ea55ffe76327d924
[ "MIT" ]
null
null
null
ap_server/common/schemas.py
phelipealves/CreateAPServer
c6775631ff075b0c29ce8a81ea55ffe76327d924
[ "MIT" ]
null
null
null
from marshmallow import Schema, fields, post_load from ap_server.common.models import CreateApModel class CreateApSchema(Schema): wiface = fields.Str(required=True) bridge = fields.Str(required=True) ssid = fields.Str(required=True) virt_prefix = fields.Str(required=True) password = fields.Str() ...
28.2
49
0.703901
from marshmallow import Schema, fields, post_load from ap_server.common.models import CreateApModel class CreateApSchema(Schema): wiface = fields.Str(required=True) bridge = fields.Str(required=True) ssid = fields.Str(required=True) virt_prefix = fields.Str(required=True) password = fields.Str() ...
true
true
f732b7368ff49758dfdfd0112cbb2153c70ab6af
4,957
py
Python
harness/tests/storage/test_gcs.py
johnkim-det/determined
7af3cfe48d26a23702a260f73ca5090b13625cb7
[ "Apache-2.0" ]
null
null
null
harness/tests/storage/test_gcs.py
johnkim-det/determined
7af3cfe48d26a23702a260f73ca5090b13625cb7
[ "Apache-2.0" ]
null
null
null
harness/tests/storage/test_gcs.py
johnkim-det/determined
7af3cfe48d26a23702a260f73ca5090b13625cb7
[ "Apache-2.0" ]
null
null
null
import os import uuid from pathlib import Path from typing import Dict, Iterator, List, Optional import google.auth.exceptions import google.cloud.storage import pytest from determined.common import storage from determined.tensorboard.fetchers.gcs import GCSFetcher from tests.storage import util BUCKET_NAME = "stora...
34.908451
100
0.713536
import os import uuid from pathlib import Path from typing import Dict, Iterator, List, Optional import google.auth.exceptions import google.cloud.storage import pytest from determined.common import storage from determined.tensorboard.fetchers.gcs import GCSFetcher from tests.storage import util BUCKET_NAME = "stora...
true
true
f732b7817804b70eb53719b94f151119e3902335
23,548
py
Python
rlax/_src/mpo_ops_test.py
ofantomas/rlax
7bf3bf13d4496f1b708f4ccb5865215a16c618d6
[ "Apache-2.0" ]
1
2022-01-13T22:29:15.000Z
2022-01-13T22:29:15.000Z
rlax/_src/mpo_ops_test.py
shinriny0ku/rlax
58b3672b2f7ac1a400b3934ae9888c677f39b9e2
[ "Apache-2.0" ]
null
null
null
rlax/_src/mpo_ops_test.py
shinriny0ku/rlax
58b3672b2f7ac1a400b3934ae9888c677f39b9e2
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 DeepMind Technologies Limited. 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 ...
42.200717
80
0.691439
import functools import math from absl.testing import absltest from absl.testing import parameterized import haiku as hk import jax import jax.numpy as jnp import numpy as np import optax from rlax._src import distributions from rlax._src import mpo_ops NUM_SAMPLES = 10 ACTION_DIM = 3 TIME_DIM = 8 BATC...
true
true
f732b7be8051fddbc0b2bdf37076cfe3133c14cd
708
py
Python
setup.py
cirlabs/django-boundaryservice
28eb9d4ee29b207eaff99edf88d3474feee44575
[ "MIT" ]
null
null
null
setup.py
cirlabs/django-boundaryservice
28eb9d4ee29b207eaff99edf88d3474feee44575
[ "MIT" ]
null
null
null
setup.py
cirlabs/django-boundaryservice
28eb9d4ee29b207eaff99edf88d3474feee44575
[ "MIT" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup setup( name="django-boundaryservice", version="0.2.2", description="A reusable system for aggregating and providing API access to regional boundary data.", long_description='See `django-boundaryservice <https://github.com/newsapps/django-boundarys...
30.782609
138
0.693503
from distutils.core import setup setup( name="django-boundaryservice", version="0.2.2", description="A reusable system for aggregating and providing API access to regional boundary data.", long_description='See `django-boundaryservice <https://github.com/newsapps/django-boundaryservice>`_ on Github f...
true
true
f732b878e84f37a96691cbacccaafc907bef9926
1,449
py
Python
mytube/posts/migrations/0007_auto_20200220_1822.py
ashowlsky/mytube_c
122d75d7dcd23ed0240448e5db5ca130266d26a2
[ "MIT" ]
null
null
null
mytube/posts/migrations/0007_auto_20200220_1822.py
ashowlsky/mytube_c
122d75d7dcd23ed0240448e5db5ca130266d26a2
[ "MIT" ]
null
null
null
mytube/posts/migrations/0007_auto_20200220_1822.py
ashowlsky/mytube_c
122d75d7dcd23ed0240448e5db5ca130266d26a2
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-02-20 15:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('posts', '0006_auto_2020022...
39.162162
143
0.625259
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('posts', '0006_auto_20200220_1709'), ] operations = [ m...
true
true
f732b9bf73ac7cd7a54b1d584223565e68a99e91
3,889
py
Python
configs/top_down/resnetv1d/coco/resnetv1d152_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
5
2022-01-13T15:06:45.000Z
2022-01-28T19:39:54.000Z
configs/top_down/resnetv1d/coco/resnetv1d152_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnetv1d/coco/resnetv1d152_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
1
2021-06-17T13:56:23.000Z
2021-06-17T13:56:23.000Z
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) # learning...
27.778571
79
0.628182
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) lr_config...
true
true
f732ba71e63e92ed77053f94229fdb7e2b543af1
425
py
Python
examples/puma_fdyn.py
tavo-robotas/robotics-toolbox-python
6b822df875c58f5e3c80288442796172321cab5b
[ "MIT" ]
1
2021-05-14T09:58:10.000Z
2021-05-14T09:58:10.000Z
examples/puma_fdyn.py
tavo-robotas/robotics-toolbox-python
6b822df875c58f5e3c80288442796172321cab5b
[ "MIT" ]
null
null
null
examples/puma_fdyn.py
tavo-robotas/robotics-toolbox-python
6b822df875c58f5e3c80288442796172321cab5b
[ "MIT" ]
null
null
null
import roboticstoolbox as rtb # load a model with inertial parameters p560 = rtb.models.DH.Puma560() # remove Coulomb friction p560 = p560.nofriction() # print the kinematic & dynamic parameters p560.printdyn() # simulate motion over 5s with zero torque input d = p560.fdyn(5, p560.qr, dt=0.05) # show the joint ang...
21.25
48
0.745882
import roboticstoolbox as rtb p560 = rtb.models.DH.Puma560() p560 = p560.nofriction() p560.printdyn() d = p560.fdyn(5, p560.qr, dt=0.05) rtb.tools.trajectory.qplot(d.q) p560.plot(d.q.T)
true
true
f732bac4f94c8eb49d9d1b3cde6dce862da152ea
2,625
py
Python
property/forms.py
dmitryro/zrealtycorp.com
22cb52187b3787676c0ad4ca278189323cec8f24
[ "MIT" ]
1
2018-02-21T21:25:40.000Z
2018-02-21T21:25:40.000Z
property/forms.py
dmitryro/zrealtycorp.com
22cb52187b3787676c0ad4ca278189323cec8f24
[ "MIT" ]
null
null
null
property/forms.py
dmitryro/zrealtycorp.com
22cb52187b3787676c0ad4ca278189323cec8f24
[ "MIT" ]
null
null
null
from django import forms from django import template from django.forms import ModelForm from django.template import loader, Context from django.core.context_processors import media as media_processor from djangular.forms import NgFormValidationMixin, NgModelFormMixin from property.models import Property, Borough, Neigh...
36.971831
111
0.692571
from django import forms from django import template from django.forms import ModelForm from django.template import loader, Context from django.core.context_processors import media as media_processor from djangular.forms import NgFormValidationMixin, NgModelFormMixin from property.models import Property, Borough, Neigh...
true
true
f732baf10d5767e849b93e2c2732e51ee1fccc79
307
py
Python
src/employer/admin.py
vladimirtkach/yesjob
83800f4d29bf2dab30b14fc219d3150e3bc51e15
[ "MIT" ]
null
null
null
src/employer/admin.py
vladimirtkach/yesjob
83800f4d29bf2dab30b14fc219d3150e3bc51e15
[ "MIT" ]
18
2020-02-12T00:41:40.000Z
2022-02-10T12:00:03.000Z
src/employer/admin.py
vladimirtkach/yesjob
83800f4d29bf2dab30b14fc219d3150e3bc51e15
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Employer, ContactPerson, Language, Expenses, Vacancy from django.contrib.auth.models import Permission admin.site.register(Permission) @admin.register(Employer, ContactPerson, Language, Expenses, Vacancy) class AuthorAdmin(admin.ModelAdmin): pass
27.909091
72
0.814332
from django.contrib import admin from .models import Employer, ContactPerson, Language, Expenses, Vacancy from django.contrib.auth.models import Permission admin.site.register(Permission) @admin.register(Employer, ContactPerson, Language, Expenses, Vacancy) class AuthorAdmin(admin.ModelAdmin): pass
true
true
f732bb13283a50ad6c9ec3907e83c55333398612
1,405
py
Python
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/bin/scrape_software_versions.py
matq007/tools
54e233a4c167f515b6f616b3c5a8a9bd660861c0
[ "MIT" ]
null
null
null
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/bin/scrape_software_versions.py
matq007/tools
54e233a4c167f515b6f616b3c5a8a9bd660861c0
[ "MIT" ]
null
null
null
nf_core/pipeline-template/{{cookiecutter.name_noslash}}/bin/scrape_software_versions.py
matq007/tools
54e233a4c167f515b6f616b3c5a8a9bd660861c0
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function from collections import OrderedDict import re # TODO nf-core: Add additional regexes for new tools in process get_software_versions regexes = { '{{ cookiecutter.name }}': ['v_pipeline.txt', r"(\S+)"], 'Nextflow': ['v_nextflow.txt', r"(\S+)"], 'Fas...
35.125
85
0.626335
from __future__ import print_function from collections import OrderedDict import re regexes = { '{{ cookiecutter.name }}': ['v_pipeline.txt', r"(\S+)"], 'Nextflow': ['v_nextflow.txt', r"(\S+)"], 'FastQC': ['v_fastqc.txt', r"FastQC v(\S+)"], 'MultiQC': ['v_multiqc.txt', r"multiqc, version (\S+)"], } r...
true
true
f732bba51315ed9d0c5f332bedef6621c95e71a9
87
py
Python
awardz/apps.py
chelseaayoo/Awards
229764c16f80b0c0a5573d7ff9f6b4b655fe4a91
[ "Unlicense" ]
null
null
null
awardz/apps.py
chelseaayoo/Awards
229764c16f80b0c0a5573d7ff9f6b4b655fe4a91
[ "Unlicense" ]
null
null
null
awardz/apps.py
chelseaayoo/Awards
229764c16f80b0c0a5573d7ff9f6b4b655fe4a91
[ "Unlicense" ]
null
null
null
from django.apps import AppConfig class AwardzConfig(AppConfig): name = 'awardz'
14.5
33
0.747126
from django.apps import AppConfig class AwardzConfig(AppConfig): name = 'awardz'
true
true
f732bbb506a036e4c216f8930233cbf27232b515
1,464
py
Python
azure-mgmt-web/azure/mgmt/web/models/stack_minor_version.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
null
null
null
azure-mgmt-web/azure/mgmt/web/models/stack_minor_version.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
1
2018-11-29T14:46:42.000Z
2018-11-29T14:46:42.000Z
azure-mgmt-web/azure/mgmt/web/models/stack_minor_version.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
38.526316
78
0.620219
from msrest.serialization import Model class StackMinorVersion(Model): _attribute_map = { 'display_version': {'key': 'displayVersion', 'type': 'str'}, 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, 'is_default': {'key': 'isDefault', 'type': 'bool'}, } def...
true
true
f732bbb92f282cd482c93861370a133e8d34af91
1,609
py
Python
modules/ws_dual_camera.py
wesmith/CSI-Camera
8bcb7c58f3546dbe8c1c81054185d347056b4ff6
[ "BSD-3-Clause" ]
null
null
null
modules/ws_dual_camera.py
wesmith/CSI-Camera
8bcb7c58f3546dbe8c1c81054185d347056b4ff6
[ "BSD-3-Clause" ]
null
null
null
modules/ws_dual_camera.py
wesmith/CSI-Camera
8bcb7c58f3546dbe8c1c81054185d347056b4ff6
[ "BSD-3-Clause" ]
null
null
null
# ws_dual_camera.py # WSmith 12/23/20 # utilize modified module ws_csi_camera for the camera class import cv2 import numpy as np import ws_csi_camera as ws from importlib import reload reload(ws) # ws is under development def display(sensor_mode=ws.S_MODE_3_1280_720_60, dispW=ws.DISP_W_M3_M4_one_half, ...
25.539683
92
0.655687
import cv2 import numpy as np import ws_csi_camera as ws from importlib import reload reload(ws) def display(sensor_mode=ws.S_MODE_3_1280_720_60, dispW=ws.DISP_W_M3_M4_one_half, dispH=ws.DISP_H_M3_M4_one_half, display_fps=True): picam = ws.CSI_Camera(display_fps...
true
true
f732bbc00351376db5365fb58a5cf2d923279112
2,816
py
Python
mosqito/sq_metrics/tonality/tone_to_noise_ecma/_spectrum_smoothing.py
MitchellAcoustics/MoSQITo
15e45888d08b2932909f50fd6af0ef9d5595a588
[ "Apache-2.0" ]
null
null
null
mosqito/sq_metrics/tonality/tone_to_noise_ecma/_spectrum_smoothing.py
MitchellAcoustics/MoSQITo
15e45888d08b2932909f50fd6af0ef9d5595a588
[ "Apache-2.0" ]
null
null
null
mosqito/sq_metrics/tonality/tone_to_noise_ecma/_spectrum_smoothing.py
MitchellAcoustics/MoSQITo
15e45888d08b2932909f50fd6af0ef9d5595a588
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Dec 21 16:44:36 2020 @author: wantysal """ # Standard library import import numpy as np # Local import from mosqito.sound_level_meter.noct_spectrum._getFrequencies import _getFrequencies def _spectrum_smoothing(freqs_in, spec, noct, low_freq, high_freq, freqs_out): """...
32.744186
98
0.638494
import numpy as np from mosqito.sound_level_meter.noct_spectrum._getFrequencies import _getFrequencies def _spectrum_smoothing(freqs_in, spec, noct, low_freq, high_freq, freqs_out): filter_freqs = _getFrequencies( low_freq, high_freq, noct, G=10, fr=1000)["f"] filter_freqs[len(filter_freqs) ...
true
true
f732bc1b7ca91f3afc2f231955f65cca8899c654
4,498
py
Python
predictor.py
maltius/tf_blazeface_training
c4c73590f5084fcac56fa1625d227acf45a918ae
[ "Apache-2.0" ]
null
null
null
predictor.py
maltius/tf_blazeface_training
c4c73590f5084fcac56fa1625d227acf45a918ae
[ "Apache-2.0" ]
null
null
null
predictor.py
maltius/tf_blazeface_training
c4c73590f5084fcac56fa1625d227acf45a918ae
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf from utils import bbox_utils, data_utils, drawing_utils, io_utils, train_utils, landmark_utils import blazeface args = io_utils.handle_args() if args.handle_gpu: io_utils.handle_gpu_compatibility() batch_size = 1 use_custom_images = False custom_image_path = "data/images/" hyper_params = t...
42.037383
115
0.769898
import tensorflow as tf from utils import bbox_utils, data_utils, drawing_utils, io_utils, train_utils, landmark_utils import blazeface args = io_utils.handle_args() if args.handle_gpu: io_utils.handle_gpu_compatibility() batch_size = 1 use_custom_images = False custom_image_path = "data/images/" hyper_params = t...
true
true
f732bcc0d4b85468209c6e2f8da783ae8aaaf116
33,473
py
Python
glycan_profiling/piped_deconvolve.py
mstim/glycresoft
1d305c42c7e6cba60326d8246e4a485596a53513
[ "Apache-2.0" ]
null
null
null
glycan_profiling/piped_deconvolve.py
mstim/glycresoft
1d305c42c7e6cba60326d8246e4a485596a53513
[ "Apache-2.0" ]
null
null
null
glycan_profiling/piped_deconvolve.py
mstim/glycresoft
1d305c42c7e6cba60326d8246e4a485596a53513
[ "Apache-2.0" ]
null
null
null
'''Implements a multiprocessing deconvolution algorithm ''' import os import multiprocessing from collections import deque import ms_peak_picker import ms_deisotope import traceback from ms_deisotope.processor import ( ScanProcessor, MSFileLoader, NoIsotopicClustersError, EmptyScanError) from ms_deisotope...
36.662651
120
0.603561
import os import multiprocessing from collections import deque import ms_peak_picker import ms_deisotope import traceback from ms_deisotope.processor import ( ScanProcessor, MSFileLoader, NoIsotopicClustersError, EmptyScanError) from ms_deisotope.feature_map.quick_index import index as build_scan_index f...
true
true
f732bd25316f39b9733cdf670d1130073262f447
10,310
py
Python
py/src/ram.py
canh/rosettaboy
c5b8afd91d5c9f58bdd414e5fbd88f67acfbdc30
[ "MIT" ]
null
null
null
py/src/ram.py
canh/rosettaboy
c5b8afd91d5c9f58bdd414e5fbd88f67acfbdc30
[ "MIT" ]
null
null
null
py/src/ram.py
canh/rosettaboy
c5b8afd91d5c9f58bdd414e5fbd88f67acfbdc30
[ "MIT" ]
null
null
null
from typing import List from .cart import Cart from .consts import * ROM_BANK_SIZE = 0x4000 RAM_BANK_SIZE = 0x2000 class RAM: def __init__(self, cart: Cart, debug: bool = False) -> None: self.cart = cart self.boot = self.get_boot() self.data = [0] * (0xFFFF + 1) self.debug = debug ...
33.365696
94
0.476819
from typing import List from .cart import Cart from .consts import * ROM_BANK_SIZE = 0x4000 RAM_BANK_SIZE = 0x2000 class RAM: def __init__(self, cart: Cart, debug: bool = False) -> None: self.cart = cart self.boot = self.get_boot() self.data = [0] * (0xFFFF + 1) self.debug = debug ...
true
true
f732bd351d8106b5bcfd1e2148709586288dfb53
604
py
Python
ftd_auth/serializers/userSerializer.py
Shanaka11/ftd_auth
5e73f6f909235a5f7ec932b7e78a15544ba31731
[ "MIT" ]
null
null
null
ftd_auth/serializers/userSerializer.py
Shanaka11/ftd_auth
5e73f6f909235a5f7ec932b7e78a15544ba31731
[ "MIT" ]
null
null
null
ftd_auth/serializers/userSerializer.py
Shanaka11/ftd_auth
5e73f6f909235a5f7ec932b7e78a15544ba31731
[ "MIT" ]
null
null
null
# Python # Django # Rest Framework from django.contrib.auth.models import User from rest_framework.serializers import ModelSerializer from rest_framework_simplejwt.serializers import TokenObtainPairSerializer # Local class LoginSerializer(TokenObtainPairSerializer): @classmethod def get_token(cls, user): ...
26.26087
74
0.716887
from django.contrib.auth.models import User from rest_framework.serializers import ModelSerializer from rest_framework_simplejwt.serializers import TokenObtainPairSerializer class LoginSerializer(TokenObtainPairSerializer): @classmethod def get_token(cls, user): token = super().get_token(user) ...
true
true
f732bda9d958fb505e55bb197410b6a4a1479d11
4,093
py
Python
stubs.min/System/Windows/__init___parts/PresentationSource.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/System/Windows/__init___parts/PresentationSource.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/__init___parts/PresentationSource.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class PresentationSource(DispatcherObject): """ Provides an abstract base for classes that present content from another technology as part of an interoperation scenario. In addition,this class provides static methods for working with these sources,as well as the basic visual-layer presentation architecture. """ def...
35.284483
270
0.73247
class PresentationSource(DispatcherObject): def AddSource(self,*args): def AddSourceChangedHandler(element,handler): """ AddSourceChangedHandler(element: IInputElement,handler: SourceChangedEventHandler) """ pass dependencyObject: The System.Windows.DependencyObject to find the source for...
true
true
f732be464c39bd36540dc0b26a3934915abf2bbd
22,729
py
Python
monitors/windows_event_log_monitor.py
Kami/scalyr-monitor-tester
e6eec21ded2896152e1a648a8bfab8a72f60a3d2
[ "Apache-2.0" ]
null
null
null
monitors/windows_event_log_monitor.py
Kami/scalyr-monitor-tester
e6eec21ded2896152e1a648a8bfab8a72f60a3d2
[ "Apache-2.0" ]
null
null
null
monitors/windows_event_log_monitor.py
Kami/scalyr-monitor-tester
e6eec21ded2896152e1a648a8bfab8a72f60a3d2
[ "Apache-2.0" ]
null
null
null
# Copyright 2105 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
40.953153
251
0.626468
import datetime import os import scalyr_agent.util as scalyr_util import threading import time try: import win32api import win32evtlog import win32evtlogutil import win32con from ctypes import windll except ImportError: win32evtlog = None win32evtlogutil = None win32con ...
false
true
f732bec74dcddfb3566db113df4dbc1bbceb9f8b
920
py
Python
src/SortedList/SortedList.py
berkayaslan/Sorting_Simulation
16cfcd404063b060191dab244025012271edacd8
[ "MIT" ]
2
2020-01-26T09:42:03.000Z
2020-05-26T13:57:02.000Z
src/SortedList/SortedList.py
berkayaslan/Sorting_Simulation
16cfcd404063b060191dab244025012271edacd8
[ "MIT" ]
null
null
null
src/SortedList/SortedList.py
berkayaslan/Sorting_Simulation
16cfcd404063b060191dab244025012271edacd8
[ "MIT" ]
null
null
null
class SortedList: """ This is a list object which is sorted. Actually this is not sorted now. Because this is a parent class. """ _list = list() def __init__(self, arg: list or tuple) -> None: try: if type(arg) == list: self._list = arg elif ...
23.589744
70
0.553261
class SortedList: _list = list() def __init__(self, arg: list or tuple) -> None: try: if type(arg) == list: self._list = arg elif type(arg) == tuple: self._list = self.tuple_to_list(arg) except: raise TypeError("It is not a li...
true
true
f732bedfa6b474867fbed972f4231446ce6fd48e
1,899
py
Python
astropy/io/misc/asdf/tags/unit/tests/test_quantity.py
rkiman/astropy
99de28bc0dbfe2ee0bef95b67f5619e03d22cc06
[ "BSD-3-Clause" ]
1
2022-03-02T17:07:20.000Z
2022-03-02T17:07:20.000Z
astropy/io/misc/asdf/tags/unit/tests/test_quantity.py
rkiman/astropy
99de28bc0dbfe2ee0bef95b67f5619e03d22cc06
[ "BSD-3-Clause" ]
null
null
null
astropy/io/misc/asdf/tags/unit/tests/test_quantity.py
rkiman/astropy
99de28bc0dbfe2ee0bef95b67f5619e03d22cc06
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import io import pytest from astropy import units asdf = pytest.importorskip('asdf', minversion='2.0.0') from asdf.tests import helpers def roundtrip_quantity(yaml, quantity): buff = helpers.yaml_to_asdf(yaml) with asdf...
24.986842
63
0.651922
import io import pytest from astropy import units asdf = pytest.importorskip('asdf', minversion='2.0.0') from asdf.tests import helpers def roundtrip_quantity(yaml, quantity): buff = helpers.yaml_to_asdf(yaml) with asdf.AsdfFile.open(buff) as ff: assert (ff.tree['quantity'] == quantity).all() ...
true
true
f732bee2606f2745c1d111d3ebc4dd6ef6abd1c1
2,097
py
Python
packages/py-ab-testing/ABTesting/controller.py
ramon-villain/ab-testing
e8e449db3083a5c147f32c47b8f24a7dc2d6eda3
[ "MIT" ]
null
null
null
packages/py-ab-testing/ABTesting/controller.py
ramon-villain/ab-testing
e8e449db3083a5c147f32c47b8f24a7dc2d6eda3
[ "MIT" ]
null
null
null
packages/py-ab-testing/ABTesting/controller.py
ramon-villain/ab-testing
e8e449db3083a5c147f32c47b8f24a7dc2d6eda3
[ "MIT" ]
null
null
null
import logging from typing import Union, Dict from crc32c import crc32 logger = logging.getLogger(__name__) def get_modulo_value(experiment, user_id): # type: (str, Union[str, int]) -> int return crc32(str(user_id).encode(), crc32(experiment.encode())) % 100 def match_user_cohort( experiment_config, ...
36.789474
106
0.641392
import logging from typing import Union, Dict from crc32c import crc32 logger = logging.getLogger(__name__) def get_modulo_value(experiment, user_id): return crc32(str(user_id).encode(), crc32(experiment.encode())) % 100 def match_user_cohort( experiment_config, user_id, user_profile ): ...
true
true
f732bf6018c59a91c6096b9f3ad73ef8d80a1a09
1,301
py
Python
external_apps/docutils-snapshot/test/test_parsers/test_rst/test_directives/test_date.py
spreeker/democracygame
525139955cb739c295051f317ab670049511bcf8
[ "BSD-3-Clause" ]
2
2016-05-09T04:57:34.000Z
2017-03-03T14:22:24.000Z
external_apps/docutils-snapshot/test/test_parsers/test_rst/test_directives/test_date.py
spreeker/democracygame
525139955cb739c295051f317ab670049511bcf8
[ "BSD-3-Clause" ]
null
null
null
external_apps/docutils-snapshot/test/test_parsers/test_rst/test_directives/test_date.py
spreeker/democracygame
525139955cb739c295051f317ab670049511bcf8
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python # $Id: test_date.py 4667 2006-07-12 21:40:56Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Tests for the misc.py "date" directive. """ from __init__ import DocutilsTestSupport import time def suite(): s = Docuti...
20.650794
100
0.602613
from __init__ import DocutilsTestSupport import time def suite(): s = DocutilsTestSupport.ParserTestSuite() s.generateTests(totest) return s totest = {} totest['date'] = [ ["""\ .. |date| date:: Today's date is |date|. """, """\ <document source="test data"> <substitution_definition names="d...
true
true
f732bffb35f6dd8dc2be50226e4bb1b83ba91bd4
4,471
py
Python
fn_sentinelone/fn_sentinelone/lib/jinja_common.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
null
null
null
fn_sentinelone/fn_sentinelone/lib/jinja_common.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
null
null
null
fn_sentinelone/fn_sentinelone/lib/jinja_common.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # pragma pylint: disable=unused-argument, no-self-use # (c) Copyright IBM Corp. 2010, 2022. All Rights Reserved. import calendar import logging import json import os import time from resilient_circuits.template_functions import render_json, environment LOG = logging.getLogger(__name__) class J...
34.929688
99
0.638336
import calendar import logging import json import os import time from resilient_circuits.template_functions import render_json, environment LOG = logging.getLogger(__name__) class JinjaEnvironment(): def __init__(self): env = environment() env.globals.update({ "resilient_da...
true
true
f732c1edd35a9e7a115cc899a6c993664cd84b79
2,096
py
Python
tests/tests_geomstats/test_estimators.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
10
2018-01-28T17:16:44.000Z
2022-02-27T02:42:41.000Z
tests/tests_geomstats/test_estimators.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
67
2018-01-05T17:15:32.000Z
2018-05-11T18:50:30.000Z
tests/tests_geomstats/test_estimators.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
3
2021-11-12T23:57:46.000Z
2021-12-04T10:05:42.000Z
"""Template unit tests for scikit-learn estimators.""" import pytest from sklearn.datasets import load_iris import geomstats.backend as gs import geomstats.tests from geomstats.learning._template import ( TemplateClassifier, TemplateEstimator, TemplateTransformer, ) ESTIMATORS = (TemplateClassifier, Temp...
28.712329
73
0.660305
import pytest from sklearn.datasets import load_iris import geomstats.backend as gs import geomstats.tests from geomstats.learning._template import ( TemplateClassifier, TemplateEstimator, TemplateTransformer, ) ESTIMATORS = (TemplateClassifier, TemplateEstimator, TemplateTransformer) class TestEstimat...
true
true
f732c2114718cf313a270ef92c60532874848e61
1,001
py
Python
src/wta/nupic/functions/__init__.py
kaist-irnlp/SparseColBERT
f0f0ed4acff5dc3c747f13315de0fe7ea50b5b70
[ "MIT" ]
null
null
null
src/wta/nupic/functions/__init__.py
kaist-irnlp/SparseColBERT
f0f0ed4acff5dc3c747f13315de0fe7ea50b5b70
[ "MIT" ]
null
null
null
src/wta/nupic/functions/__init__.py
kaist-irnlp/SparseColBERT
f0f0ed4acff5dc3c747f13315de0fe7ea50b5b70
[ "MIT" ]
null
null
null
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2019, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
45.5
72
0.654346
from .k_winners import *
true
true
f732c3adce2518a59f9b1dbfa47490c062436e61
2,509
py
Python
IPProxyPool/db/MongoHelper.py
zyhibook/igotolibrary
b35ff3b9b3c5c938dfa0a1b62f6d94faef47925a
[ "MIT" ]
171
2018-08-01T15:05:06.000Z
2022-03-28T04:14:54.000Z
IPProxyPool/db/MongoHelper.py
zyhibook/igotolibrary
b35ff3b9b3c5c938dfa0a1b62f6d94faef47925a
[ "MIT" ]
19
2018-09-11T13:29:57.000Z
2021-12-13T20:31:38.000Z
IPProxyPool/db/MongoHelper.py
zyhibook/igotolibrary
b35ff3b9b3c5c938dfa0a1b62f6d94faef47925a
[ "MIT" ]
55
2018-08-23T01:11:37.000Z
2022-03-26T11:31:38.000Z
import pymongo from config import DB_CONFIG, DEFAULT_SCORE from db.ISqlHelper import ISqlHelper class MongoHelper(ISqlHelper): def __init__(self): self.client = pymongo.MongoClient(DB_CONFIG['DB_CONNECT_STRING'], connect=False) def init_db(self): self.db = self.client.proxy self.prox...
33.453333
110
0.570745
import pymongo from config import DB_CONFIG, DEFAULT_SCORE from db.ISqlHelper import ISqlHelper class MongoHelper(ISqlHelper): def __init__(self): self.client = pymongo.MongoClient(DB_CONFIG['DB_CONNECT_STRING'], connect=False) def init_db(self): self.db = self.client.proxy self.prox...
true
true
f732c465ee2c93c9054318c972450ddfd9dabd88
140
py
Python
HanderCode/aidaiwangApp/aidaiwangApp/RealName_Auth_from_aidaiwangApp.py
mocne/PycharmProjects
b009e530f4f01e5b1826bbe2364d86b65bcd66e3
[ "MIT" ]
null
null
null
HanderCode/aidaiwangApp/aidaiwangApp/RealName_Auth_from_aidaiwangApp.py
mocne/PycharmProjects
b009e530f4f01e5b1826bbe2364d86b65bcd66e3
[ "MIT" ]
null
null
null
HanderCode/aidaiwangApp/aidaiwangApp/RealName_Auth_from_aidaiwangApp.py
mocne/PycharmProjects
b009e530f4f01e5b1826bbe2364d86b65bcd66e3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'aidai_TEC_QA' # -*- date:'2017/8/1 0001' -*- def start_to_realnameauth(): print(u'realname auth')
23.333333
30
0.628571
__author__ = 'aidai_TEC_QA' def start_to_realnameauth(): print(u'realname auth')
true
true
f732c46e706e04c5e83092616d66d56c27e1cdc3
1,027
py
Python
test/testing.py
MuhammadEzzatHBK/CyclopeptideSequencing
cd07045169758478b4845a54d5710bd329a836ca
[ "CC0-1.0" ]
null
null
null
test/testing.py
MuhammadEzzatHBK/CyclopeptideSequencing
cd07045169758478b4845a54d5710bd329a836ca
[ "CC0-1.0" ]
null
null
null
test/testing.py
MuhammadEzzatHBK/CyclopeptideSequencing
cd07045169758478b4845a54d5710bd329a836ca
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun May 16 09:31:53 2021 @author: Muhammad Ayman Ezzat Youmna Magdy Abdullah """ from algorithms import branch_and_bound import timeit import pandas as pd ''' Accuracy Testing ''' LabSpectrum = [97, 97, 99, 101, 103, 196, 198, 198, 200, 202, 295, 297, 29...
27.756757
66
0.666991
from algorithms import branch_and_bound import timeit import pandas as pd LabSpectrum = [97, 97, 99, 101, 103, 196, 198, 198, 200, 202, 295, 297, 299, 299, 301, 394, 396, 398, 400, 400, 497] LabResults = sorted(['PVCPT', 'PTPVC', 'PTPCV', 'PCVPT', 'VPTPC', 'VCPTP', 'TPVCP', 'TPCVP', 'CPT...
true
true
f732c4f61e4dffe5db7fa1534fa658cd243adfea
11,214
py
Python
utils/metrics.py
Vizards8/pytorch-spine-segmentation
588b7e7b09c5a370e337e2f12614df69d177ccaa
[ "MIT" ]
null
null
null
utils/metrics.py
Vizards8/pytorch-spine-segmentation
588b7e7b09c5a370e337e2f12614df69d177ccaa
[ "MIT" ]
null
null
null
utils/metrics.py
Vizards8/pytorch-spine-segmentation
588b7e7b09c5a370e337e2f12614df69d177ccaa
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import numpy as np import math import scipy.spatial import scipy.ndimage.morphology """ True Positive (真正, TP)预测为正的正样本 True Negative(真负 , TN)预测为负的负样本 False Positive (假正, FP)预测为正的负样本 False Negative(假负 , FN)预测为负的正样本 """ def metrics(predict, label, out_class): """Calculate the re...
29.588391
152
0.537364
import torch import torch.nn as nn import numpy as np import math import scipy.spatial import scipy.ndimage.morphology def metrics(predict, label, out_class): IOU_list = [] Dice_list = [] false_positive_rate_list = [] false_negative_rate_list = [] acc = [] for i in range(1, out_class): ...
true
true
f732c55636971d95bc30b141fcff95a039ed75ef
11,896
py
Python
src/MML-CG/train.py
AIM3-RUC/VideoIC
ea324938e839a679324f42161d195f5bef3db26f
[ "MIT" ]
4
2021-03-24T12:30:46.000Z
2021-12-26T02:57:37.000Z
src/MML-CG/train.py
AIM3-RUC/VideoIC
ea324938e839a679324f42161d195f5bef3db26f
[ "MIT" ]
2
2020-10-19T02:53:32.000Z
2021-05-10T15:03:42.000Z
src/MML-CG/train.py
AIM3-RUC/VideoIC
ea324938e839a679324f42161d195f5bef3db26f
[ "MIT" ]
1
2021-03-06T06:38:34.000Z
2021-03-06T06:38:34.000Z
''' Re-organize the MMIG model 2021-09-20 ''' import os import sys import time import json import logging import argparse import torch import torch.optim as Optim from torch.autograd import Variable import utils import modules import dataset import metrics # set gpu os.environ["CUDA_VISIBLE_DEVICES"] = '0,...
37.64557
144
0.557751
import os import sys import time import json import logging import argparse import torch import torch.optim as Optim from torch.autograd import Variable import utils import modules import dataset import metrics os.environ["CUDA_VISIBLE_DEVICES"] = '0,1,2,3' parser = argparse.ArgumentParser(description='train.py'...
true
true
f732c7f175da6d44c51ab5467b59b053313e1112
3,670
py
Python
sandworks/generators/splines.py
Caged/splineworks
0fad1e98ba6928f6ffeef0018a4d52696a38cce2
[ "MIT" ]
2
2017-11-10T18:32:31.000Z
2017-11-12T10:12:03.000Z
sandworks/generators/splines.py
Caged/sandworks
0fad1e98ba6928f6ffeef0018a4d52696a38cce2
[ "MIT" ]
null
null
null
sandworks/generators/splines.py
Caged/sandworks
0fad1e98ba6928f6ffeef0018a4d52696a38cce2
[ "MIT" ]
null
null
null
from numpy import pi from numpy import array from numpy import linspace from numpy import arange from numpy import zeros from numpy import column_stack from numpy import array from time import time from math import radians import cairocffi as cairo from sand import Sand from ..lib.sand_spline import SandSpline from .....
29.837398
97
0.631608
from numpy import pi from numpy import array from numpy import linspace from numpy import arange from numpy import zeros from numpy import column_stack from numpy import array from time import time from math import radians import cairocffi as cairo from sand import Sand from ..lib.sand_spline import SandSpline from .....
true
true
f732c923533d29817b7676a497807aaef900c5c1
24,341
py
Python
src/ramstk/views/gtk3/pof/panel.py
TahaEntezari/ramstk
f82e5b31ef5c4e33cc02252263247b99a9abe129
[ "BSD-3-Clause" ]
26
2019-05-15T02:03:47.000Z
2022-02-21T07:28:11.000Z
src/ramstk/views/gtk3/pof/panel.py
TahaEntezari/ramstk
f82e5b31ef5c4e33cc02252263247b99a9abe129
[ "BSD-3-Clause" ]
815
2019-05-10T12:31:52.000Z
2022-03-31T12:56:26.000Z
src/ramstk/views/gtk3/pof/panel.py
TahaEntezari/ramstk
f82e5b31ef5c4e33cc02252263247b99a9abe129
[ "BSD-3-Clause" ]
9
2019-04-20T23:06:29.000Z
2022-01-24T21:21:04.000Z
# -*- coding: utf-8 -*- # # ramstk.views.gtk3.pof.panel.py is part of the RAMSTK Project # # All rights reserved. # Copyright since 2007 Doyle "weibullguy" Rowland doyle.rowland <AT> reliaqual <DOT> com """GTK3 PoF Panels.""" # Standard Library Imports from typing import Any, Dict, List # Third Party Imports im...
31.652796
88
0.467976
from typing import Any, Dict, List import treelib from pubsub import pub from ramstk.views.gtk3 import GdkPixbuf, Gtk, _ from ramstk.views.gtk3.widgets import RAMSTKTreePanel class PoFTreePanel(RAMSTKTreePanel): _select_msg = "succeed_retrieve_modes" _tag = "pof" _title = _("...
true
true
f732ca4155b6b2c7b793f1b680b41826f03b7a9e
547
py
Python
main.py
ray2060/mathquiz
ebe0952f1768f382d0c4ae50c470a045a3446e0c
[ "MIT" ]
null
null
null
main.py
ray2060/mathquiz
ebe0952f1768f382d0c4ae50c470a045a3446e0c
[ "MIT" ]
null
null
null
main.py
ray2060/mathquiz
ebe0952f1768f382d0c4ae50c470a045a3446e0c
[ "MIT" ]
null
null
null
import logging from flask import Flask import google.cloud.logging from settings import DEBUG from views import * app = Flask(__name__) app.add_url_rule('/', \ view_func=IndexView.as_view('index')) app.add_url_rule('/a_plus_b', \ view_func=APlusBView.as_view('a_plus_b')) if __name__ == '__main_...
18.233333
53
0.696527
import logging from flask import Flask import google.cloud.logging from settings import DEBUG from views import * app = Flask(__name__) app.add_url_rule('/', \ view_func=IndexView.as_view('index')) app.add_url_rule('/a_plus_b', \ view_func=APlusBView.as_view('a_plus_b')) if __name__ == '__main_...
true
true
f732ca70a09568775aaad2535f0cab6bc3141d59
365
py
Python
skstan/model/estimator.py
stenoritama/scikit-stan
bcc641689b7f795d3ffd4b9c8e0b0d3c315d3032
[ "MIT" ]
29
2017-04-13T00:06:47.000Z
2022-01-11T04:56:26.000Z
skstan/model/estimator.py
stenoritama/scikit-stan
bcc641689b7f795d3ffd4b9c8e0b0d3c315d3032
[ "MIT" ]
51
2017-04-12T01:12:34.000Z
2022-02-10T00:33:06.000Z
skstan/model/estimator.py
stenoritama/scikit-stan
bcc641689b7f795d3ffd4b9c8e0b0d3c315d3032
[ "MIT" ]
3
2017-04-10T02:33:37.000Z
2019-01-08T18:13:33.000Z
from abc import ABCMeta class BaseEstimator(metaclass=ABCMeta): """ Abstract base class for all estimators in scikit-stan. """ def get_params(self, deep=True): """ Parameters ---------- deep Returns ------- """ pass @classmethod...
14.038462
58
0.509589
from abc import ABCMeta class BaseEstimator(metaclass=ABCMeta): def get_params(self, deep=True): pass @classmethod def _get_param_names(cls): pass
true
true
f732caff4bd4df01236d7fd78294a1a3d97ea44b
17,394
py
Python
readthedocs/search/tests/test_views.py
mforbes/readthedocs.org
92f6224a67648a6d27e7a295973c2718d07cee11
[ "MIT" ]
null
null
null
readthedocs/search/tests/test_views.py
mforbes/readthedocs.org
92f6224a67648a6d27e7a295973c2718d07cee11
[ "MIT" ]
null
null
null
readthedocs/search/tests/test_views.py
mforbes/readthedocs.org
92f6224a67648a6d27e7a295973c2718d07cee11
[ "MIT" ]
null
null
null
import re import pytest from django.contrib.auth.models import User from django.test import override_settings from django.urls import reverse from django_dynamic_fixture import get from readthedocs.builds.constants import LATEST from readthedocs.builds.models import Version from readthedocs.projects.models import Pro...
36.389121
92
0.61044
import re import pytest from django.contrib.auth.models import User from django.test import override_settings from django.urls import reverse from django_dynamic_fixture import get from readthedocs.builds.constants import LATEST from readthedocs.builds.models import Version from readthedocs.projects.models import Pro...
true
true
f732cb73a738f5a5f977c299883d8a8ebefb1984
25,080
py
Python
tpapi/tests.py
ash30/tpapi
b3758b609c58487052db5830ffe42ab6888187b1
[ "MIT" ]
null
null
null
tpapi/tests.py
ash30/tpapi
b3758b609c58487052db5830ffe42ab6888187b1
[ "MIT" ]
null
null
null
tpapi/tests.py
ash30/tpapi
b3758b609c58487052db5830ffe42ab6888187b1
[ "MIT" ]
null
null
null
import unittest import re import json import collections from collections import namedtuple import client,api,entities # TODO: # Test multiple get_entities calls # so that the second one uses the cached value # Really - the class factory needs a delegate to call inorder to get # the meta data. THE CLIENT SHOULDN"T N...
35.879828
95
0.697648
import unittest import re import json import collections from collections import namedtuple import client,api,entities # MOCKS class MockCallable(object): fcall = namedtuple('fcall',['args','kwargs']) def __init__(self,response=None): self.last_call = None self.response = response def __call__(sel...
true
true
f732cd273d3829dde453019955cd5cbce3682a02
185
py
Python
locale/pot/api/core/_autosummary/pyvista-MultiBlock-copy-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/core/_autosummary/pyvista-MultiBlock-copy-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
locale/pot/api/core/_autosummary/pyvista-MultiBlock-copy-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
import pyvista as pv data = [pv.Sphere(center=(2, 0, 0)), pv.Cube(center=(0, 2, 0)), pv.Cone()] blocks = pv.MultiBlock(data) new_blocks = blocks.copy() len(new_blocks) # Expected: ## 3
23.125
74
0.664865
import pyvista as pv data = [pv.Sphere(center=(2, 0, 0)), pv.Cube(center=(0, 2, 0)), pv.Cone()] blocks = pv.MultiBlock(data) new_blocks = blocks.copy() len(new_blocks)
true
true
f732cd50a300c1c0e734cd8f4825eebe37114460
3,665
py
Python
lite/tests/unittest_py/op/test_layer_norm_op.py
devchai123/Paddle-Lite
442d6996a59c3498eae27610d49a0d5b2c320f24
[ "Apache-2.0" ]
3
2021-06-17T11:00:13.000Z
2021-08-10T10:28:59.000Z
lite/tests/unittest_py/op/test_layer_norm_op.py
devchai123/Paddle-Lite
442d6996a59c3498eae27610d49a0d5b2c320f24
[ "Apache-2.0" ]
1
2021-01-06T10:21:22.000Z
2021-01-06T10:21:22.000Z
lite/tests/unittest_py/op/test_layer_norm_op.py
yingshengBD/Paddle-Lite
eea59b66f61bb2acad471010c9526eeec43a15ca
[ "Apache-2.0" ]
1
2021-12-03T10:07:54.000Z
2021-12-03T10:07:54.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
34.252336
125
0.616644
import sys sys.path.append('../') from auto_scan_test import AutoScanTest, IgnoreReasons from program_config import TensorConfig, ProgramConfig, OpConfig, CxxConfig, TargetType, PrecisionType, DataLayoutType, Place import unittest import hypothesis from hypothesis import given, settings, seed, example, ...
true
true
f732cdb437936108c6fb25425952cbf403c695aa
17,619
py
Python
tabular/src/autogluon/tabular/trainer/model_presets/presets.py
daobook/autogluon
7309118f2ab1c9519f25acf61a283a95af95842b
[ "Apache-2.0" ]
1
2020-09-02T01:10:25.000Z
2020-09-02T01:10:25.000Z
tabular/src/autogluon/tabular/trainer/model_presets/presets.py
daobook/autogluon
7309118f2ab1c9519f25acf61a283a95af95842b
[ "Apache-2.0" ]
null
null
null
tabular/src/autogluon/tabular/trainer/model_presets/presets.py
daobook/autogluon
7309118f2ab1c9519f25acf61a283a95af95842b
[ "Apache-2.0" ]
null
null
null
import copy import inspect import logging from collections import defaultdict from autogluon.core.constants import AG_ARGS, AG_ARGS_FIT, AG_ARGS_ENSEMBLE, BINARY, MULTICLASS, REGRESSION, SOFTCLASS, QUANTILE from autogluon.core.models import AbstractModel, GreedyWeightedEnsembleModel, StackerEnsembleModel, SimpleWeight...
48.671271
209
0.704296
import copy import inspect import logging from collections import defaultdict from autogluon.core.constants import AG_ARGS, AG_ARGS_FIT, AG_ARGS_ENSEMBLE, BINARY, MULTICLASS, REGRESSION, SOFTCLASS, QUANTILE from autogluon.core.models import AbstractModel, GreedyWeightedEnsembleModel, StackerEnsembleModel, SimpleWeight...
true
true
f732cdbc39f357c77e6db21d1ffa502e1539509b
11,384
py
Python
fastai2/text/data.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
fastai2/text/data.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
fastai2/text/data.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/31_text.data.ipynb (unless otherwise specified). __all__ = ['make_vocab', 'TensorText', 'LMTensorText', 'Numericalize', 'LMDataLoader', 'pad_input', 'pad_input_chunk', 'SortedDL', 'TextBlock', 'TextDataLoaders'] # Cell from ..torch_basics import * from ..data...
47.831933
145
0.664353
__all__ = ['make_vocab', 'TensorText', 'LMTensorText', 'Numericalize', 'LMDataLoader', 'pad_input', 'pad_input_chunk', 'SortedDL', 'TextBlock', 'TextDataLoaders'] from ..torch_basics import * from ..data.all import * from .core import * def make_vocab(count, min_freq=3, max_vocab=60000): vocab = [o...
true
true
f732ce8ca51d97443ee8ac411a259cde1c44e316
17,344
py
Python
tutorial/cytoscape/events_chapter.py
blozano824/dash-docs
f2b5a9dcbf60603aa0d0caabcfa31dccc6face7d
[ "MIT" ]
1
2019-03-04T03:17:19.000Z
2019-03-04T03:17:19.000Z
tutorial/cytoscape/events_chapter.py
blozano824/dash-docs
f2b5a9dcbf60603aa0d0caabcfa31dccc6face7d
[ "MIT" ]
null
null
null
tutorial/cytoscape/events_chapter.py
blozano824/dash-docs
f2b5a9dcbf60603aa0d0caabcfa31dccc6face7d
[ "MIT" ]
null
null
null
from textwrap import dedent import dash_cytoscape as cyto import dash_core_components as dcc import dash_html_components as html from .utils import CreateDisplay, PythonSnippet from tutorial import tools, styles examples = { example: tools.load_example( 'tutorial/examples/cytoscape/{}'.format(example) ...
37.298925
148
0.531135
from textwrap import dedent import dash_cytoscape as cyto import dash_core_components as dcc import dash_html_components as html from .utils import CreateDisplay, PythonSnippet from tutorial import tools, styles examples = { example: tools.load_example( 'tutorial/examples/cytoscape/{}'.format(example) ...
true
true
f732cf174e123aeeea17cb7f4063e9983ee4077c
538
py
Python
onem2m/types.py
franjial/ghostm2m
2e7898761237cb12f4fddd55665b3a15fb84dddc
[ "MIT" ]
null
null
null
onem2m/types.py
franjial/ghostm2m
2e7898761237cb12f4fddd55665b3a15fb84dddc
[ "MIT" ]
null
null
null
onem2m/types.py
franjial/ghostm2m
2e7898761237cb12f4fddd55665b3a15fb84dddc
[ "MIT" ]
null
null
null
from enum import Enum class Operation(Enum): Create = 1 Retrieve = 2 Update = 3 Delete = 4 Notify = 5 class ResourceType(Enum): container = 3 contentInstance = 4 AE = 1 CSEBase = 5 class cseTypeID(Enum): IN_CSE = 1 MN_CSE = 2 ASN_CSE = 3 class ResponseStatusCode(Enum): ACCEPTED = 1000 OK = 2000 CREATE...
16.8125
37
0.728625
from enum import Enum class Operation(Enum): Create = 1 Retrieve = 2 Update = 3 Delete = 4 Notify = 5 class ResourceType(Enum): container = 3 contentInstance = 4 AE = 1 CSEBase = 5 class cseTypeID(Enum): IN_CSE = 1 MN_CSE = 2 ASN_CSE = 3 class ResponseStatusCode(Enum): ACCEPTED = 1000 OK = 2000 CREATE...
true
true
f732cf1ed25b8fe09d9e4e4b25a89c2a8dd209f4
1,630
py
Python
models.py
navi25/VQA
75942972f414aa6cfb43e2e35905b7773ba035e7
[ "MIT" ]
181
2016-10-03T12:50:37.000Z
2022-03-23T04:45:22.000Z
models.py
navi25/VQA
75942972f414aa6cfb43e2e35905b7773ba035e7
[ "MIT" ]
6
2017-05-05T06:35:18.000Z
2020-11-03T23:20:47.000Z
models.py
navi25/VQA
75942972f414aa6cfb43e2e35905b7773ba035e7
[ "MIT" ]
64
2016-10-03T23:03:31.000Z
2021-07-23T02:21:50.000Z
from keras.models import Sequential from keras.layers import Dense, Activation, Dropout, LSTM, Flatten, Embedding, Merge from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D import h5py def Word2VecModel(embedding_matrix, num_words, embedding_dim, seq_length, dropout_rate): print "Crea...
42.894737
100
0.75092
from keras.models import Sequential from keras.layers import Dense, Activation, Dropout, LSTM, Flatten, Embedding, Merge from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D import h5py def Word2VecModel(embedding_matrix, num_words, embedding_dim, seq_length, dropout_rate): print "Crea...
false
true
f732cf9a08983af0b4335a385f968d4495d7b53f
646
py
Python
shared/packet.py
Tookmund/hackerforce
d757910db1631e26e489a10a99fa67cd74292c4e
[ "Apache-2.0" ]
null
null
null
shared/packet.py
Tookmund/hackerforce
d757910db1631e26e489a10a99fa67cd74292c4e
[ "Apache-2.0" ]
null
null
null
shared/packet.py
Tookmund/hackerforce
d757910db1631e26e489a10a99fa67cd74292c4e
[ "Apache-2.0" ]
1
2021-06-15T21:04:14.000Z
2021-06-15T21:04:14.000Z
import os from django.conf import settings import requests def get_packet_file_path(): return os.path.join(settings.PROJECT_ROOT, 'static', settings.SPONSORSHIP_PACKET_FILE) if settings.SPONSORSHIP_PACKET_FILE else None def fetch_packet(): if settings.SPONSORSHIP_PACKET_FILE and settings.SPONSORSHIP_PACKET_UR...
40.375
136
0.688854
import os from django.conf import settings import requests def get_packet_file_path(): return os.path.join(settings.PROJECT_ROOT, 'static', settings.SPONSORSHIP_PACKET_FILE) if settings.SPONSORSHIP_PACKET_FILE else None def fetch_packet(): if settings.SPONSORSHIP_PACKET_FILE and settings.SPONSORSHIP_PACKET_UR...
true
true
f732d1d252b489d46ac5e35870d59d9c9c635d67
3,452
py
Python
mapclientplugins/coordinateframeselectorstep/configuredialog.py
tsalemink/hoofcoordinateframeselector
aebdad1759de58a6888966e94b2771a0bea0e105
[ "Apache-2.0" ]
null
null
null
mapclientplugins/coordinateframeselectorstep/configuredialog.py
tsalemink/hoofcoordinateframeselector
aebdad1759de58a6888966e94b2771a0bea0e105
[ "Apache-2.0" ]
null
null
null
mapclientplugins/coordinateframeselectorstep/configuredialog.py
tsalemink/hoofcoordinateframeselector
aebdad1759de58a6888966e94b2771a0bea0e105
[ "Apache-2.0" ]
null
null
null
from PySide2 import QtWidgets from mapclientplugins.coordinateframeselectorstep.ui_configuredialog import Ui_ConfigureDialog INVALID_STYLE_SHEET = 'background-color: rgba(239, 0, 0, 50)' DEFAULT_STYLE_SHEET = '' class ConfigureDialog(QtWidgets.QDialog): ''' Configure dialog to present the user with the optio...
40.139535
194
0.643105
from PySide2 import QtWidgets from mapclientplugins.coordinateframeselectorstep.ui_configuredialog import Ui_ConfigureDialog INVALID_STYLE_SHEET = 'background-color: rgba(239, 0, 0, 50)' DEFAULT_STYLE_SHEET = '' class ConfigureDialog(QtWidgets.QDialog): def __init__(self, parent=None): QtWidgets.QDialog...
true
true
f732d262a5c402980f88711bf712e94e3b49e08e
7,685
py
Python
URDF_Exporter/core/Joint.py
romzn/fusion2urdf
006a97d498267d5209436eaad37a940326c911d5
[ "MIT" ]
9
2020-11-15T11:05:59.000Z
2022-03-13T10:38:32.000Z
URDF_Exporter/core/Joint.py
nksas/fusion2urdf
22df00ddef567ad87c6f4f3f2e391f8d461e6afa
[ "MIT" ]
null
null
null
URDF_Exporter/core/Joint.py
nksas/fusion2urdf
22df00ddef567ad87c6f4f3f2e391f8d461e6afa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun May 12 20:17:17 2019 @author: syuntoku """ import adsk, re from xml.etree.ElementTree import Element, SubElement from ..utils import utils class Joint: def __init__(self, name, xyz, axis, parent, child, joint_type, upper_limit, lower_limit): """ Attribut...
39.818653
106
0.575927
import adsk, re from xml.etree.ElementTree import Element, SubElement from ..utils import utils class Joint: def __init__(self, name, xyz, axis, parent, child, joint_type, upper_limit, lower_limit): self.name = name self.type = joint_type self.xyz = xyz self.parent = parent ...
true
true
f732d2f81e76fb029eac6e1333e8799856fc9049
18,027
py
Python
qutip/cy/br_codegen.py
camponogaraviera/qutip
1b1f6dffcb3ab97f11b8c6114293e09f378d2e8f
[ "BSD-3-Clause" ]
1,205
2015-01-02T16:23:42.000Z
2022-03-31T03:21:21.000Z
qutip/cy/br_codegen.py
camponogaraviera/qutip
1b1f6dffcb3ab97f11b8c6114293e09f378d2e8f
[ "BSD-3-Clause" ]
1,361
2015-01-09T23:38:25.000Z
2022-03-31T12:26:07.000Z
qutip/cy/br_codegen.py
camponogaraviera/qutip
1b1f6dffcb3ab97f11b8c6114293e09f378d2e8f
[ "BSD-3-Clause" ]
569
2015-01-19T06:15:33.000Z
2022-03-28T20:43:39.000Z
import os import numpy as np import qutip.settings as qset from qutip.interpolate import Cubic_Spline _cython_path = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/") _include_string = "'"+_cython_path+"/complex_math.pxi'" __all__ = ['BR_Codegen'] class BR_Codegen(object): """ Class for generating...
42.718009
183
0.520885
import os import numpy as np import qutip.settings as qset from qutip.interpolate import Cubic_Spline _cython_path = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/") _include_string = "'"+_cython_path+"/complex_math.pxi'" __all__ = ['BR_Codegen'] class BR_Codegen(object): def __init__(self, h_terms=N...
true
true
f732d31c68384f61be8ec811efa39446d1f8762e
19,429
py
Python
fitlins/interfaces/bids.py
yarikoptic/fitlins
ee7e06330b9cdd5a9b812d51eb545daa84b0d066
[ "Apache-2.0" ]
null
null
null
fitlins/interfaces/bids.py
yarikoptic/fitlins
ee7e06330b9cdd5a9b812d51eb545daa84b0d066
[ "Apache-2.0" ]
null
null
null
fitlins/interfaces/bids.py
yarikoptic/fitlins
ee7e06330b9cdd5a9b812d51eb545daa84b0d066
[ "Apache-2.0" ]
null
null
null
import os from functools import reduce from pathlib import Path from gzip import GzipFile import json import shutil import numpy as np import nibabel as nb from collections import defaultdict from nipype import logging from nipype.utils.filemanip import makedirs, copyfile from nipype.interfaces.base import ( Base...
37.799611
90
0.583664
import os from functools import reduce from pathlib import Path from gzip import GzipFile import json import shutil import numpy as np import nibabel as nb from collections import defaultdict from nipype import logging from nipype.utils.filemanip import makedirs, copyfile from nipype.interfaces.base import ( Base...
true
true
f732d3664f0d0ae0783bf8569434f0a8352bf12d
172
py
Python
06-args.py
ghost098/LearnPythonTheHardWay
93fd4f116e09d15ecea637a74f8216be135d3af8
[ "MIT" ]
null
null
null
06-args.py
ghost098/LearnPythonTheHardWay
93fd4f116e09d15ecea637a74f8216be135d3af8
[ "MIT" ]
null
null
null
06-args.py
ghost098/LearnPythonTheHardWay
93fd4f116e09d15ecea637a74f8216be135d3af8
[ "MIT" ]
null
null
null
from sys import argv script, first, second = argv print "This script is called: ", script print "The first variable is: ", first print "The second variable is: ", second
21.5
40
0.726744
from sys import argv script, first, second = argv print "This script is called: ", script print "The first variable is: ", first print "The second variable is: ", second
false
true
f732d44d2f7a146365d6b31adb45ce306427680e
3,780
py
Python
setup.py
wkerzendorf/wsynphot
1770ebe0d44a729753f9fd2e535803fcf2a4ad33
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2019-06-25T17:39:08.000Z
2022-02-11T08:41:06.000Z
setup.py
wkerzendorf/wsynphot
1770ebe0d44a729753f9fd2e535803fcf2a4ad33
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
23
2019-02-26T22:31:56.000Z
2022-01-04T21:27:28.000Z
setup.py
wkerzendorf/wsynphot
1770ebe0d44a729753f9fd2e535803fcf2a4ad33
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
9
2018-10-18T19:02:40.000Z
2021-01-28T08:42:58.000Z
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap from setuptools import setup #A dirty hack to get around some early import/configurations ambiguities if sys.version_info[0] >= 3: import builtins else: import __builtin_...
32.586207
106
0.742328
import glob import os import sys import ah_bootstrap from setuptools import setup if sys.version_info[0] >= 3: import builtins else: import __builtin__ as builtins builtins._ASTROPY_SETUP_ = True from astropy_helpers.setup_helpers import ( register_commands, adjust_compiler, get_debug_option, get_pac...
true
true
f732d4512c69c0e652073c1835ee841350b02bfd
8,873
py
Python
rhyme.py
qkhy/poetry-seq2seq
6fa4959ac489c5615008156cbf88817bba8d98be
[ "MIT" ]
186
2017-09-05T06:48:14.000Z
2022-02-26T15:25:44.000Z
rhyme.py
ZhanHaolan316/poetry-seq2seq
6fa4959ac489c5615008156cbf88817bba8d98be
[ "MIT" ]
2
2018-06-28T13:41:45.000Z
2021-03-17T02:51:58.000Z
rhyme.py
ZhanHaolan316/poetry-seq2seq
6fa4959ac489c5615008156cbf88817bba8d98be
[ "MIT" ]
67
2017-11-02T08:45:45.000Z
2021-09-27T05:38:18.000Z
#! /usr/bin/env python #-*- coding:utf-8 -*- from utils import * import pypinyin py_raw = os.path.join(DATA_RAW_DIR, 'pinyin.txt') _rhy_path = os.path.join(DATA_PROCESSED_DIR, 'rhy_dict.json') ''' Tonal and rhyming reference from: https://baike.baidu.com/item/绝句律诗格律 ''' ''' 类型一 ⊙平平仄仄,⊙仄仄平平。(韵)⊙仄平平仄,平平仄仄平。(韵)...
22.577608
149
0.548518
from utils import * import pypinyin py_raw = os.path.join(DATA_RAW_DIR, 'pinyin.txt') _rhy_path = os.path.join(DATA_PROCESSED_DIR, 'rhy_dict.json') five_char_type_a = { 'tone': [ '*ppzz', '*zzpp', '*zppz', 'ppzzp' ], 'rhyme': [1, 3] } five_char_type_b = { 'tone'...
true
true
f732d466d9a9cefc73ad200dd12017111ad59fb6
994
py
Python
benchmarks/pcap_gen.py
Nic30/pclass-vectorized
33bc92c66f717896fb48bd5c382729f8c76bc882
[ "MIT" ]
1
2020-07-14T17:24:33.000Z
2020-07-14T17:24:33.000Z
benchmarks/pcap_gen.py
Nic30/pclass-vectorized
33bc92c66f717896fb48bd5c382729f8c76bc882
[ "MIT" ]
14
2019-03-14T09:24:37.000Z
2019-12-19T17:44:21.000Z
benchmarks/pcap_gen.py
Nic30/pclass-vectorized
33bc92c66f717896fb48bd5c382729f8c76bc882
[ "MIT" ]
null
null
null
from scapy.all import * def basic_flows(): flow_numbers = [ #1, #100, #5000, 10000, 50000, 75000, 85000, 95000, #100000 ] for f_n in flow_numbers: pkts = [] rules = [] for i in range(f_n): a, b, c ...
23.666667
104
0.454728
from scapy.all import * def basic_flows(): flow_numbers = [ 10000, 50000, 75000, 85000, 95000, ] for f_n in flow_numbers: pkts = [] rules = [] for i in range(f_n): a, b, c = ((i >> 16) & 0xff, ...
true
true
f732d525d6d359c0b4bcf626a94760f71d7e2b2a
5,458
py
Python
deephyper/search/nas/model/space/keras_search_space.py
jtchilders/deephyper
06f9653599757a69fa5720820f4de3a1f154b081
[ "BSD-3-Clause" ]
null
null
null
deephyper/search/nas/model/space/keras_search_space.py
jtchilders/deephyper
06f9653599757a69fa5720820f4de3a1f154b081
[ "BSD-3-Clause" ]
null
null
null
deephyper/search/nas/model/space/keras_search_space.py
jtchilders/deephyper
06f9653599757a69fa5720820f4de3a1f154b081
[ "BSD-3-Clause" ]
null
null
null
from collections.abc import Iterable from functools import reduce import networkx as nx from tensorflow import keras from tensorflow.python.keras.utils.vis_utils import model_to_dot from deephyper.core.exceptions.nas.space import (InputShapeOfWrongType, NodeAlreadyAdde...
37.383562
96
0.62697
from collections.abc import Iterable from functools import reduce import networkx as nx from tensorflow import keras from tensorflow.python.keras.utils.vis_utils import model_to_dot from deephyper.core.exceptions.nas.space import (InputShapeOfWrongType, NodeAlreadyAdde...
true
true
f732d581aecc523acc849434530948fe5a2db09a
622
py
Python
config.py
YannickBezes/android_server
08cd8de5d59e92c98ae476935f324a56e88216dc
[ "MIT" ]
null
null
null
config.py
YannickBezes/android_server
08cd8de5d59e92c98ae476935f324a56e88216dc
[ "MIT" ]
null
null
null
config.py
YannickBezes/android_server
08cd8de5d59e92c98ae476935f324a56e88216dc
[ "MIT" ]
null
null
null
import os from flask import Flask from flask_sqlalchemy import SQLAlchemy # Get base directory base_dir = os.path.abspath(os.path.dirname(__file__)) base_url = '' # Base url app = Flask(__name__) # CONFIG app.config['SECRET_KEY'] = '$tfx37h5kqv*!$4hMfHAvrfEZQFyz0e4r6$49$t3-i0(uN1uwSBQKh!y%6HVnw4n' app.config['SQLALC...
32.736842
98
0.779743
import os from flask import Flask from flask_sqlalchemy import SQLAlchemy base_dir = os.path.abspath(os.path.dirname(__file__)) base_url = '' app = Flask(__name__) app.config['SECRET_KEY'] = '$tfx37h5kqv*!$4hMfHAvrfEZQFyz0e4r6$49$t3-i0(uN1uwSBQKh!y%6HVnw4n' app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:////" + ...
true
true
f732d7d713d9fbb434e3c5215b1dcb388f829866
6,960
py
Python
display3d/msic.py
leon-liangwu/PillarsRNN
b6e7d64af4e2819098ae9a87a9dd676ee8288874
[ "MIT" ]
1
2019-07-30T08:09:24.000Z
2019-07-30T08:09:24.000Z
display3d/msic.py
leon-liangwu/second.pytorch
b6e7d64af4e2819098ae9a87a9dd676ee8288874
[ "MIT" ]
null
null
null
display3d/msic.py
leon-liangwu/second.pytorch
b6e7d64af4e2819098ae9a87a9dd676ee8288874
[ "MIT" ]
null
null
null
from __future__ import division, print_function import numpy as np from shapely.geometry import Polygon import cv2 from collections import defaultdict from kitti import Calibration def camera_to_lidar(points, r_rect, velo2cam): points_shape = list(points.shape[0:-1]) if points.shape[-1] == 3: point...
32.372093
102
0.590086
from __future__ import division, print_function import numpy as np from shapely.geometry import Polygon import cv2 from collections import defaultdict from kitti import Calibration def camera_to_lidar(points, r_rect, velo2cam): points_shape = list(points.shape[0:-1]) if points.shape[-1] == 3: point...
true
true
f732d7f3a8fb5a1b8081d2dda04b1b24da73078f
12,981
py
Python
farm/file_utils.py
cregouby/FARM
552bc07acffbce4f1f84d926c040fdd17b4ddeb3
[ "Apache-2.0" ]
null
null
null
farm/file_utils.py
cregouby/FARM
552bc07acffbce4f1f84d926c040fdd17b4ddeb3
[ "Apache-2.0" ]
null
null
null
farm/file_utils.py
cregouby/FARM
552bc07acffbce4f1f84d926c040fdd17b4ddeb3
[ "Apache-2.0" ]
null
null
null
""" Utilities for working with the local dataset cache. This file is adapted from the AllenNLP library at https://github.com/allenai/allennlp Copyright by the AllenNLP authors. """ from __future__ import absolute_import, division, print_function, unicode_literals import fnmatch import json import logging import os imp...
33.716883
124
0.616748
from __future__ import absolute_import, division, print_function, unicode_literals import fnmatch import json import logging import os import shutil import sys import tempfile from functools import wraps from hashlib import sha256 from io import open import boto3 import numpy as np import requests from botocore.excep...
true
true
f732d8e088970f5fe7578bbc230db3fe4c52c08e
34,023
py
Python
swift/proxy/controllers/oio/obj.py
open-io/swift
267940e6d581ab689c575b4dfaa422eed93bec49
[ "Apache-2.0" ]
1
2021-09-30T14:00:22.000Z
2021-09-30T14:00:22.000Z
swift/proxy/controllers/oio/obj.py
open-io/swift
267940e6d581ab689c575b4dfaa422eed93bec49
[ "Apache-2.0" ]
2
2020-10-09T13:20:33.000Z
2020-10-28T16:02:16.000Z
swift/proxy/controllers/oio/obj.py
open-io/swift
267940e6d581ab689c575b4dfaa422eed93bec49
[ "Apache-2.0" ]
2
2020-09-21T14:24:56.000Z
2020-10-01T10:08:46.000Z
# Copyright (c) 2010-2020 OpenStack Foundation # # 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 t...
41.390511
79
0.604473
import json import mimetypes import time import math from swift import gettext_ as _ from swift.common.utils import ( clean_content_type, config_true_value, Timestamp, public, close_if_possible, closing_if_possible) from swift.common.constraints import check_metadata, check_object_creation from ...
true
true
f732d8f8a85b16ceadc7a8193c88c59ad20ada7e
4,204
py
Python
airflow/operators/__init__.py
bertrand-caron/incubator-airflow
56bae60c139036ab506af595bd44b31eb21967df
[ "Apache-2.0" ]
1
2019-05-16T02:21:21.000Z
2019-05-16T02:21:21.000Z
airflow/operators/__init__.py
bertrand-caron/incubator-airflow
56bae60c139036ab506af595bd44b31eb21967df
[ "Apache-2.0" ]
6
2018-02-10T20:25:16.000Z
2019-11-20T03:01:03.000Z
airflow/operators/__init__.py
bertrand-caron/incubator-airflow
56bae60c139036ab506af595bd44b31eb21967df
[ "Apache-2.0" ]
1
2018-12-05T06:59:07.000Z
2018-12-05T06:59:07.000Z
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
38.568807
74
0.653901
import sys import os from airflow.models import BaseOperator tor': ['BashOperator'], 'check_operator': [ 'CheckOperator', 'ValueCheckOperator', 'IntervalCheckOperator', ], 'python_operator': [ 'PythonOperator', 'BranchPythonOperator', '...
true
true
f732d938c1d2aa8152d53902e46983e5dea7784e
3,749
py
Python
nodes/views.py
Indigo-Uliv/indigo-web
49674b531830d7f85763c40bac5fe2a50d32690c
[ "Apache-2.0" ]
null
null
null
nodes/views.py
Indigo-Uliv/indigo-web
49674b531830d7f85763c40bac5fe2a50d32690c
[ "Apache-2.0" ]
2
2020-06-05T16:51:50.000Z
2021-06-10T17:30:26.000Z
nodes/views.py
Indigo-Uliv/indigo-web
49674b531830d7f85763c40bac5fe2a50d32690c
[ "Apache-2.0" ]
null
null
null
"""Node views Copyright 2015 Archive Analytics Solutions 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 ...
33.473214
112
0.697786
import uuid import datetime from django.core.exceptions import PermissionDenied from django.shortcuts import render from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.contrib import messages from .forms impo...
true
true
f732d949806d43a9326f403dea3fed61e187fc24
11,441
py
Python
alex/applications/PublicTransportInfoCS/slu/prepare_data.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
184
2015-02-11T04:14:41.000Z
2022-03-24T21:43:58.000Z
alex/applications/PublicTransportInfoCS/slu/prepare_data.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
69
2015-01-11T04:57:22.000Z
2019-04-24T10:25:56.000Z
alex/applications/PublicTransportInfoCS/slu/prepare_data.py
oplatek/alex
73af644ec35c8a1cd0c37cd478c2afc1db717e0b
[ "Apache-2.0" ]
61
2015-03-04T10:52:13.000Z
2022-03-04T12:14:06.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals if __name__ == '__main__': import autopath import argparse import glob import os import xml.dom.minidom import random import sys import multiprocessing import alex.utils.various as various from alex.utils.config import as_proj...
34.050595
162
0.598724
from __future__ import unicode_literals if __name__ == '__main__': import autopath import argparse import glob import os import xml.dom.minidom import random import sys import multiprocessing import alex.utils.various as various from alex.utils.config import as_project_path from alex.corpustools.text_norm_cs ...
false
true
f732d957829b1f9689fdb5846bd224af1e8a3a25
1,040
py
Python
scriptures/canons/base.py
beatitud/bible-ref-py
506a634b6ed7b6ac503eda5bea02be0fb801ed63
[ "MIT" ]
6
2019-10-11T14:53:16.000Z
2021-02-06T14:17:57.000Z
scriptures/canons/base.py
beatitud/bible-ref-parser-py
506a634b6ed7b6ac503eda5bea02be0fb801ed63
[ "MIT" ]
null
null
null
scriptures/canons/base.py
beatitud/bible-ref-parser-py
506a634b6ed7b6ac503eda5bea02be0fb801ed63
[ "MIT" ]
1
2020-12-27T01:14:01.000Z
2020-12-27T01:14:01.000Z
from __future__ import unicode_literals import re class CanonBase: single_verse_re = { 'en': 'v[.]*', 'fr': '[v]{1,2}[.]?\s{0,2}', } def __init__(self, language='en'): self.language = language # We check for books if hasattr(self, 'books'): # We it is ...
34.666667
115
0.586538
from __future__ import unicode_literals import re class CanonBase: single_verse_re = { 'en': 'v[.]*', 'fr': '[v]{1,2}[.]?\s{0,2}', } def __init__(self, language='en'): self.language = language if hasattr(self, 'books'): if not isinstance(...
true
true
f732da0eb421d7b008a1c22b5d7e08c26fd66fe9
153
py
Python
test/run_all_tests.py
sgowris2/sigfig
299806b548be1ae282077a7b2d8faf2c6ca57f52
[ "MIT" ]
null
null
null
test/run_all_tests.py
sgowris2/sigfig
299806b548be1ae282077a7b2d8faf2c6ca57f52
[ "MIT" ]
4
2021-03-30T15:54:47.000Z
2021-03-30T16:10:13.000Z
test/run_all_tests.py
sgowris2/sigfig
299806b548be1ae282077a7b2d8faf2c6ca57f52
[ "MIT" ]
null
null
null
import unittest loader = unittest.TestLoader() start_dir = '.' suite = loader.discover(start_dir) runner = unittest.TextTestRunner() runner.run(suite)
17
34
0.764706
import unittest loader = unittest.TestLoader() start_dir = '.' suite = loader.discover(start_dir) runner = unittest.TextTestRunner() runner.run(suite)
true
true
f732db32f65923c4102d7721ea10a815b6d8c226
6,957
py
Python
tornado/utils/commonUtil.py
maqg/wcrobot
7d026c1a34362c5434105c27c5bd25f08c6fabe2
[ "MIT" ]
null
null
null
tornado/utils/commonUtil.py
maqg/wcrobot
7d026c1a34362c5434105c27c5bd25f08c6fabe2
[ "MIT" ]
null
null
null
tornado/utils/commonUtil.py
maqg/wcrobot
7d026c1a34362c5434105c27c5bd25f08c6fabe2
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import base64 import json import os import socket import struct import uuid import time from hashlib import md5 as MD5 from binascii import crc32 from random import Random from core.err_code import err_desc_en, err_desc_ch from utils.timeUtil import get_current_time DEBIAN_VE...
18.07013
80
0.633319
import base64 import json import os import socket import struct import uuid import time from hashlib import md5 as MD5 from binascii import crc32 from random import Random from core.err_code import err_desc_en, err_desc_ch from utils.timeUtil import get_current_time DEBIAN_VERSION_FILE = "/etc/debian_version" CENTO...
true
true
f732ddbc9b17eacc53c342a4a9303bc33ce1d7ad
4,891
py
Python
alpha-zero-general_one_step/MCTS_Bleu.py
rubenrtorrado/NLP
2ba6f153e428227fcf6f27080bdd0183d395ef64
[ "Apache-2.0" ]
null
null
null
alpha-zero-general_one_step/MCTS_Bleu.py
rubenrtorrado/NLP
2ba6f153e428227fcf6f27080bdd0183d395ef64
[ "Apache-2.0" ]
null
null
null
alpha-zero-general_one_step/MCTS_Bleu.py
rubenrtorrado/NLP
2ba6f153e428227fcf6f27080bdd0183d395ef64
[ "Apache-2.0" ]
1
2021-09-22T17:43:26.000Z
2021-09-22T17:43:26.000Z
import math import numpy as np EPS = 1e-8 class MCTS(): """ This class handles the MCTS tree. """ def __init__(self, game, nnet, args): self.game = game self.nnet = nnet self.args = args self.Qsa = {} # stores Q values for s,a (as defined in the paper) sel...
35.70073
145
0.553261
import math import numpy as np EPS = 1e-8 class MCTS(): def __init__(self, game, nnet, args): self.game = game self.nnet = nnet self.args = args self.Qsa = {} self.Nsa = {} self.Es = {} self.Vs = {} def getActionProb(...
true
true
f732df450eec8a2ee95c3a675afe0a7ccec9eb4f
6,604
py
Python
bentoml/adapters/multi_file_input.py
HenryDashwood/BentoML
49709c72dd8f3f45659e860ff751b1d191fa1fb4
[ "Apache-2.0" ]
null
null
null
bentoml/adapters/multi_file_input.py
HenryDashwood/BentoML
49709c72dd8f3f45659e860ff751b1d191fa1fb4
[ "Apache-2.0" ]
null
null
null
bentoml/adapters/multi_file_input.py
HenryDashwood/BentoML
49709c72dd8f3f45659e860ff751b1d191fa1fb4
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Atalaya Tech, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, ...
35.12766
86
0.600545
from typing import Iterator, Sequence, Tuple from bentoml.adapters.base_input import BaseInputAdapter, parse_cli_inputs from bentoml.adapters.utils import decompress_gzip_request from bentoml.types import AwsLambdaEvent, FileLike, HTTPRequest, InferenceTask ApiFuncArgs = Tuple[Sequence[FileLike], ...] M...
true
true
f732df8d85325a052e8c49eb6f8cf957fd1c3a01
26,500
py
Python
lib/googlecloudsdk/command_lib/artifacts/docker_util.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/googlecloudsdk/command_lib/artifacts/docker_util.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/artifacts/docker_util.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
34.237726
95
0.701698
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import re from apitools.base.py import exceptions as api_exceptions from googlecloudsdk.api_lib.artifacts import exceptions as ar_exceptions from googlecloudsdk.api_lib.util import common_args ...
true
true
f732e030f11d4a52981ec1e7bf19a8c4446b2ab8
127
py
Python
java/spark/python/whyspark/udt/__init__.py
cswarth/whylogs
6805b252f1d07efde84836d3924949f7ec2d97b1
[ "Apache-2.0" ]
603
2020-07-31T23:26:10.000Z
2022-03-31T23:05:36.000Z
java/spark/python/whyspark/udt/__init__.py
cswarth/whylogs
6805b252f1d07efde84836d3924949f7ec2d97b1
[ "Apache-2.0" ]
284
2021-03-02T21:28:03.000Z
2022-03-31T22:36:08.000Z
java/spark/python/whyspark/udt/__init__.py
jamie256/whylogs
e4b8288a61c00fbe033c0248a015e6e91ee6c8b0
[ "Apache-2.0" ]
39
2020-08-14T21:22:08.000Z
2022-03-29T20:24:54.000Z
from .profile import WhyProfileSession, new_profiling_session __ALL__ = [ WhyProfileSession, new_profiling_session, ]
18.142857
61
0.787402
from .profile import WhyProfileSession, new_profiling_session __ALL__ = [ WhyProfileSession, new_profiling_session, ]
true
true
f732e0afc2f03a5d0b1ff38a52ac0c46ceaeea7f
1,477
py
Python
Projects/Hongbog/EyeVerification_v2/native/constant.py
Tim232/Python-Things
05f0f373a4cf298e70d9668c88a6e3a9d1cd8146
[ "MIT" ]
2
2020-12-05T07:42:55.000Z
2021-01-06T23:23:18.000Z
Projects/Hongbog/EyeVerification_v2/native/constant.py
Tim232/Python-Things
05f0f373a4cf298e70d9668c88a6e3a9d1cd8146
[ "MIT" ]
null
null
null
Projects/Hongbog/EyeVerification_v2/native/constant.py
Tim232/Python-Things
05f0f373a4cf298e70d9668c88a6e3a9d1cd8146
[ "MIT" ]
null
null
null
import tensorflow as tf flags = tf.app.flags '''학습 데이터 경로''' flags.DEFINE_string('train_data_path', 'G:/04_dataset/eye_verification/pair_eye/train', '눈 학습 데이터 경로') flags.DEFINE_string('test_data_path', 'G:/04_dataset/eye_verification/pair_eye/test', ...
32.108696
112
0.560596
import tensorflow as tf flags = tf.app.flags flags.DEFINE_string('train_data_path', 'G:/04_dataset/eye_verification/pair_eye/train', '눈 학습 데이터 경로') flags.DEFINE_string('test_data_path', 'G:/04_dataset/eye_verification/pair_eye/test', '눈 ...
true
true
f732e2af65f2973557c266ea96c1f221e8325720
64
py
Python
tfc_web/authmultitoken/__init__.py
SmartCambridge/tfc_web
ac16b3c2aa5200320e9ffa9d270fb409b98ed55d
[ "MIT" ]
2
2018-10-28T20:15:23.000Z
2019-03-29T09:06:09.000Z
tfc_web/authmultitoken/__init__.py
SmartCambridge/tfc_web
ac16b3c2aa5200320e9ffa9d270fb409b98ed55d
[ "MIT" ]
107
2018-10-22T06:57:07.000Z
2020-09-15T14:43:03.000Z
tfc_web/authmultitoken/__init__.py
SmartCambridge/tfc_web
ac16b3c2aa5200320e9ffa9d270fb409b98ed55d
[ "MIT" ]
1
2020-03-20T19:49:29.000Z
2020-03-20T19:49:29.000Z
default_app_config = 'authmultitoken.apps.AuthMultiTokenConfig'
32
63
0.875
default_app_config = 'authmultitoken.apps.AuthMultiTokenConfig'
true
true
f732e2ef2581e1694ecea051a931a38d7b2a6e81
46,858
py
Python
exarl/candlelib/uq_utils.py
schr476/EXARL
7f4596bd8b3d7960aaf52bc677ceac4f37029834
[ "BSD-3-Clause" ]
2
2022-02-03T20:33:17.000Z
2022-02-10T22:43:32.000Z
exarl/candlelib/uq_utils.py
schr476/EXARL
7f4596bd8b3d7960aaf52bc677ceac4f37029834
[ "BSD-3-Clause" ]
40
2022-01-25T18:03:12.000Z
2022-03-31T21:43:32.000Z
exarl/candlelib/uq_utils.py
schr476/EXARL
7f4596bd8b3d7960aaf52bc677ceac4f37029834
[ "BSD-3-Clause" ]
1
2022-02-10T14:33:30.000Z
2022-02-10T14:33:30.000Z
from __future__ import absolute_import import numpy as np from scipy.stats import pearsonr, spearmanr from scipy import signal from scipy.interpolate import InterpolatedUnivariateSpline def generate_index_distribution(numTrain, numTest, numValidation, params): """ Generates a vector of indices to partition the d...
43.187097
146
0.646272
from __future__ import absolute_import import numpy as np from scipy.stats import pearsonr, spearmanr from scipy import signal from scipy.interpolate import InterpolatedUnivariateSpline def generate_index_distribution(numTrain, numTest, numValidation, params): if all(k in params for k in ('uq_train_fr', 'uq_vali...
true
true
f732e5668b65d11b93bd117e38193c3912a37e5a
3,589
py
Python
pyasstosrt/pyasstosrt.py
GitBib/pyasstosrt
fb69d88b56a25e7cc00a098311a0f19aec05419f
[ "Apache-2.0" ]
6
2020-04-15T01:46:00.000Z
2021-09-29T05:16:19.000Z
pyasstosrt/pyasstosrt.py
GitBib/pyasstosrt
fb69d88b56a25e7cc00a098311a0f19aec05419f
[ "Apache-2.0" ]
2
2020-11-15T01:29:58.000Z
2022-02-08T18:47:03.000Z
pyasstosrt/pyasstosrt.py
GitBib/pyasstosrt
fb69d88b56a25e7cc00a098311a0f19aec05419f
[ "Apache-2.0" ]
1
2021-10-18T07:26:22.000Z
2021-10-18T07:26:22.000Z
import os import re from os.path import isfile from pathlib import Path from typing import AnyStr, List, Union, Optional from .dialogue import Dialogue class Subtitle: """ Converting ass to art. :type filepath: Path to a file that contains text in Advanced SubStation Alpha format """ dialog_mask...
33.542056
118
0.600167
import os import re from os.path import isfile from pathlib import Path from typing import AnyStr, List, Union, Optional from .dialogue import Dialogue class Subtitle: dialog_mask = re.compile(r"Dialogue: \d+?,(\d:\d{2}:\d{2}.\d{2}),(\d:\d{2}:\d{2}.\d{2}),.*?,\d+,\d+,\d+,.*?,(.*)") def __init__(self, filepa...
true
true
f732e5b07ff3a53f8f9e92219e9ef7d5237d6a1e
2,449
py
Python
neutron_lib/api/definitions/__init__.py
starlingx-staging/stx-neutron-lib
a0e07ae87ad0cfb5df8b72aed63bc8cb9a9d92b9
[ "Apache-2.0" ]
null
null
null
neutron_lib/api/definitions/__init__.py
starlingx-staging/stx-neutron-lib
a0e07ae87ad0cfb5df8b72aed63bc8cb9a9d92b9
[ "Apache-2.0" ]
null
null
null
neutron_lib/api/definitions/__init__.py
starlingx-staging/stx-neutron-lib
a0e07ae87ad0cfb5df8b72aed63bc8cb9a9d92b9
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
34.492958
75
0.811352
from neutron_lib.api.definitions import address_scope from neutron_lib.api.definitions import agent from neutron_lib.api.definitions import auto_allocated_topology from neutron_lib.api.definitions import bgpvpn from neutron_lib.api.definitions import bgpvpn_routes_control from neutron_lib.api.definitions im...
true
true