hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9616439ff18b54e00a3206ca495982c6b272882d | 135 | py | Python | tests/benchmarks/string-methods/replace.py | abeaumont/Dictu | e7fe088ca12538582c836d4ddaf09120b2cd2810 | [
"MIT"
] | 116 | 2020-07-30T22:09:20.000Z | 2022-03-09T11:08:10.000Z | tests/benchmarks/string-methods/replace.py | abeaumont/Dictu | e7fe088ca12538582c836d4ddaf09120b2cd2810 | [
"MIT"
] | 130 | 2020-08-02T19:30:51.000Z | 2022-03-27T01:13:50.000Z | tests/benchmarks/string-methods/replace.py | abeaumont/Dictu | e7fe088ca12538582c836d4ddaf09120b2cd2810 | [
"MIT"
] | 50 | 2020-08-01T12:27:01.000Z | 2022-02-24T03:46:52.000Z | import time
start = time.perf_counter()
for i in range(10000):
x = "aaaaa".replace("a", "e")
print(time.perf_counter() - start)
| 15 | 34 | 0.651852 | import time
start = time.perf_counter()
for i in range(10000):
x = "aaaaa".replace("a", "e")
print(time.perf_counter() - start)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ffdae825e26bc549d342f19910f444b1c36d78ae | 463 | py | Python | CCF/CSP/2019/19125s20.py | cnsteven/online-judge | 60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7 | [
"MIT"
] | 1 | 2019-05-04T10:28:32.000Z | 2019-05-04T10:28:32.000Z | CCF/CSP/2019/19125s20.py | cnsteven/online-judge | 60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7 | [
"MIT"
] | null | null | null | CCF/CSP/2019/19125s20.py | cnsteven/online-judge | 60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7 | [
"MIT"
] | 3 | 2020-12-31T04:36:38.000Z | 2021-07-25T07:39:31.000Z | U = [314882150829468584,
427197303358170108,
1022292690726729920,
1698479428772363217,
2006101093849356424]
n, q = map(int, input().split())
A = [i for i in range(n + 1)]
FA = [f(i) for i in A]
for _ in range(q):
l, r = map(int, input().split())
s = sum(FA[l:r + 1])
print(s)
t =... | 18.52 | 43 | 0.533477 | U = [314882150829468584,
427197303358170108,
1022292690726729920,
1698479428772363217,
2006101093849356424]
def f(x):
return (x % 2009731336725594113) % 2019
n, q = map(int, input().split())
A = [i for i in range(n + 1)]
FA = [f(i) for i in A]
for _ in range(q):
l, r = map(int, input()... | 0 | 0 | 0 | 0 | 0 | 32 | 0 | 0 | 23 |
ed27dcb9d987d156f46bfde90df3fd2aec7505d1 | 705 | py | Python | venv/lib/python3.5/site-packages/MDAnalysis/migration/fixes/fix_numframes.py | dtklinh/Protein-Rigid-Domains-Estimation | a27152ef5437eb87ee31c317091356c4787f82a4 | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/MDAnalysis/migration/fixes/fix_numframes.py | dtklinh/Protein-Rigid-Domains-Estimation | a27152ef5437eb87ee31c317091356c4787f82a4 | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/MDAnalysis/migration/fixes/fix_numframes.py | dtklinh/Protein-Rigid-Domains-Estimation | a27152ef5437eb87ee31c317091356c4787f82a4 | [
"MIT"
] | null | null | null | '''
run with: python ten2eleven.py -f numframes test_dummy_old_MDA_code.py
Author: Tyler Reddy
'''
from __future__ import absolute_import
| 27.115385 | 71 | 0.648227 | '''
run with: python ten2eleven.py -f numframes test_dummy_old_MDA_code.py
Author: Tyler Reddy
'''
from __future__ import absolute_import
from lib2to3.fixer_base import BaseFix
from lib2to3.fixer_util import Name, Dot
from lib2to3 import pytree
class FixNumframes(BaseFix):
PATTERN = """
trailer<... | 0 | 0 | 0 | 435 | 0 | 0 | 0 | 41 | 90 |
7c608c7d4673a73a333dbf760774500641dd55f7 | 1,679 | py | Python | actiereg/copyover.py | albertvisser/actiereg | dfbab5ad1989532421e452ee9233ba5822bc4d40 | [
"MIT"
] | null | null | null | actiereg/copyover.py | albertvisser/actiereg | dfbab5ad1989532421e452ee9233ba5822bc4d40 | [
"MIT"
] | null | null | null | actiereg/copyover.py | albertvisser/actiereg | dfbab5ad1989532421e452ee9233ba5822bc4d40 | [
"MIT"
] | null | null | null | """Copy actions from ProbReg project into ActieReg project
"""
import dml
import _basic.models as my
from django.contrib.auth.models import User
def main(fnaam):
"""Main function
"""
data = [actie[0] for actie in dml.Acties(fnaam, arch="alles").lijst]
for item in data:
actie = dml.Actie(fnaam,... | 43.051282 | 89 | 0.431805 | """Copy actions from ProbReg project into ActieReg project
"""
import dml
import _basic.models as my
from django.contrib.auth.models import User
def main(fnaam):
"""Main function
"""
data = [actie[0] for actie in dml.Acties(fnaam, arch="alles").lijst]
for item in data:
actie = dml.Actie(fnaam,... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f9fc4e9e23f7f72e07b69019985bd84e30b18eb8 | 3,862 | py | Python | gui/tabpicture.py | hawwestin/MSR.APO | 5e150a8058b0789996f702e03936037ce3da9e73 | [
"Apache-2.0"
] | 1 | 2020-11-21T19:53:58.000Z | 2020-11-21T19:53:58.000Z | gui/tabpicture.py | hawwestin/MSR.APO | 5e150a8058b0789996f702e03936037ce3da9e73 | [
"Apache-2.0"
] | 64 | 2017-09-02T16:51:48.000Z | 2018-02-23T13:56:24.000Z | gui/tabpicture.py | hawwestin/MSR.APO | 5e150a8058b0789996f702e03936037ce3da9e73 | [
"Apache-2.0"
] | 1 | 2019-10-12T20:09:12.000Z | 2019-10-12T20:09:12.000Z |
import matplotlib
matplotlib.use("TkAgg")
| 29.937984 | 110 | 0.610823 | import tkinter as tk
import matplotlib
import matplotlib.pyplot as plt
from gui.histogram import Histogram
from gui.operations.computer_vision import Vision
from gui.image_frame import ImageFrame
import app_config
matplotlib.use("TkAgg")
class TabPicture:
"""
Kompozycja obiektów Vision przechowujących obra... | 4 | 257 | 0 | 3,338 | 0 | 0 | 0 | 64 | 156 |
93da73e4af7ab0a2245f36218666e9c53ea0147b | 3,396 | py | Python | lccs/class_system.py | fabianazioti/lccs.py | 225d9e70d4e15b7cbb8f05fcb6e2bcf6dbf37793 | [
"MIT"
] | 4 | 2020-02-25T20:02:13.000Z | 2022-02-09T15:23:55.000Z | lccs/class_system.py | fabianazioti/lccs.py | 225d9e70d4e15b7cbb8f05fcb6e2bcf6dbf37793 | [
"MIT"
] | 29 | 2019-12-14T16:36:22.000Z | 2022-02-07T12:16:11.000Z | lccs/class_system.py | fabianazioti/lccs.py | 225d9e70d4e15b7cbb8f05fcb6e2bcf6dbf37793 | [
"MIT"
] | 5 | 2019-11-23T23:59:17.000Z | 2021-11-17T15:51:23.000Z | #
# This file is part of Python Client Library for the LCCS Web Service.
# Copyright (C) 2019-2020 INPE.
#
# Python Client Library for the LCCS Web Service is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""Python Client Library for t... | 36.12766 | 118 | 0.636926 | #
# This file is part of Python Client Library for the LCCS Web Service.
# Copyright (C) 2019-2020 INPE.
#
# Python Client Library for the LCCS Web Service is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""Python Client Library for t... | 0 | 635 | 0 | 2,295 | 0 | 0 | 0 | 29 | 90 |
821a4dfc206e79739cc2e63f1fd9070e9f593e04 | 257 | py | Python | 9012.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | 9012.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | 9012.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | # 9012.py
for _ in range(int(input())):
string = input()
while string.find("()") != -1:
index = string.find("()")
string = string[:index] + string[index+2:]
if len(string) == 0:
print("YES")
else:
print("NO") | 25.7 | 50 | 0.494163 | # 9012.py
for _ in range(int(input())):
string = input()
while string.find("()") != -1:
index = string.find("()")
string = string[:index] + string[index+2:]
if len(string) == 0:
print("YES")
else:
print("NO") | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e2deb2a64f9eaeace7ba873de66a6879f22a062a | 2,119 | py | Python | deepchem/dock/tests/test_binding_pocket.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 3,782 | 2016-02-21T03:53:11.000Z | 2022-03-31T16:10:26.000Z | deepchem/dock/tests/test_binding_pocket.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 2,666 | 2016-02-11T01:54:54.000Z | 2022-03-31T11:14:33.000Z | deepchem/dock/tests/test_binding_pocket.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 1,597 | 2016-02-21T03:10:08.000Z | 2022-03-30T13:21:28.000Z | """
Tests for binding pocket detection.
"""
import logging
logger = logging.getLogger(__name__)
| 34.177419 | 82 | 0.749882 | """
Tests for binding pocket detection.
"""
import os
import logging
import unittest
import numpy as np
import deepchem as dc
from deepchem.utils import rdkit_utils
from deepchem.utils import coordinate_box_utils as box_utils
logger = logging.getLogger(__name__)
class TestBindingPocket(unittest.TestCase):
"""
D... | 0 | 0 | 0 | 1,830 | 0 | 0 | 0 | 35 | 156 |
a3c48157c6334362536b21bb5cf26e70d0c9a17f | 9,658 | py | Python | agent.py | AdamMiltonBarker/HIAS-Bluetooth-IoT-Agent | 7345c376ef8cda7ec1e2dc5c50fd7b7f656a91ab | [
"MIT"
] | 1 | 2021-06-20T03:43:52.000Z | 2021-06-20T03:43:52.000Z | agent.py | AdamMiltonBarker/HIAS-Bluetooth-IoT-Agent | 7345c376ef8cda7ec1e2dc5c50fd7b7f656a91ab | [
"MIT"
] | 2 | 2021-08-02T14:39:11.000Z | 2021-08-02T15:48:56.000Z | agent.py | AdamMiltonBarker/HIAS-Bluetooth-IoT-Agent | 7345c376ef8cda7ec1e2dc5c50fd7b7f656a91ab | [
"MIT"
] | 1 | 2021-06-20T03:43:56.000Z | 2021-06-20T03:43:56.000Z | #!/usr/bin/env python3
""" HIAS Bluetooth IoT Agent Class
HIAS Bluetooth IoT Agents are bridges between HIAS devices that support
Bluetooth/Bluetooth Low Energy protocol and the HIASCDI Context Broker.
MIT License
Copyright (c) 2021 Asociacin de Investigacion en Inteligencia Artificial
Para la Leucemia Peter Moss
P... | 29.445122 | 132 | 0.685339 | #!/usr/bin/env python3
""" HIAS Bluetooth IoT Agent Class
HIAS Bluetooth IoT Agents are bridges between HIAS devices that support
Bluetooth/Bluetooth Low Energy protocol and the HIASCDI Context Broker.
MIT License
Copyright (c) 2021 Asociación de Investigacion en Inteligencia Artificial
Para la Leucemia Peter Moss
... | 2 | 509 | 0 | 6,098 | 0 | 1,141 | 0 | 23 | 359 |
2b85d33f49234d98bd1bbfd2c865237117d23549 | 9,115 | py | Python | prescient/gosm/structures/partitions.py | iSoron/Prescient | a3c1d7c5840893ff43dca48c40dc90f083292d26 | [
"BSD-3-Clause"
] | 21 | 2020-06-03T13:54:22.000Z | 2022-02-27T18:20:35.000Z | prescient/gosm/structures/partitions.py | iSoron/Prescient | a3c1d7c5840893ff43dca48c40dc90f083292d26 | [
"BSD-3-Clause"
] | 79 | 2020-07-30T17:29:04.000Z | 2022-03-09T00:06:39.000Z | prescient/gosm/structures/partitions.py | bknueven/Prescient | 6289c06a5ea06c137cf1321603a15e0c96ddfb85 | [
"BSD-3-Clause"
] | 16 | 2020-07-14T17:05:56.000Z | 2022-02-17T17:51:13.000Z | # ___________________________________________________________________________
#
# Prescient
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
# This software is ... | 30.690236 | 79 | 0.561053 | # ___________________________________________________________________________
#
# Prescient
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
# This software is ... | 0 | 0 | 0 | 4,864 | 0 | 0 | 0 | 0 | 23 |
c8d89c3b0c5c8fdb3e201ce814c12117432e775e | 778 | py | Python | setup.py | Ciantic/pytagger | 919d017ab77485d758e991333c55f1805af300ef | [
"BSD-3-Clause"
] | 3 | 2016-08-18T22:10:55.000Z | 2022-03-12T15:19:52.000Z | setup.py | Ciantic/pytagger | 919d017ab77485d758e991333c55f1805af300ef | [
"BSD-3-Clause"
] | null | null | null | setup.py | Ciantic/pytagger | 919d017ab77485d758e991333c55f1805af300ef | [
"BSD-3-Clause"
] | 3 | 2015-04-30T22:35:26.000Z | 2019-06-11T13:06:48.000Z | #!/usr/bin/env python
import sys
assert sys.version >= '2.3', "Requires Python v2.3 or above"
from distutils.core import setup
setup(
name = "pytagger",
version = "0.5",
author = "Alastair Tse",
author_email = "alastair@liquidx.net",
url = "http://www.liquidx.net/pytagger/",
description = "Python... | 37.047619 | 164 | 0.683805 | #!/usr/bin/env python
import sys
assert sys.version >= '2.3', "Requires Python v2.3 or above"
from distutils.core import setup, Extension
setup(
name = "pytagger",
version = "0.5",
author = "Alastair Tse",
author_email = "alastair@liquidx.net",
url = "http://www.liquidx.net/pytagger/",
descriptio... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0 |
f543cbb71cb16fef89ed69bb9eb42fe5fb6d29a0 | 4,024 | py | Python | CURE_robustness_mod/utils/visualization.py | rudolfwilliam/higher_order_adversarial_robustness | 0d389debe727fbb30ce11832d28d207bf207705b | [
"MIT"
] | 1 | 2022-01-03T10:22:42.000Z | 2022-01-03T10:22:42.000Z | CURE_robustness_mod/utils/visualization.py | rudolfwilliam/higher_order_adversarial_robustness | 0d389debe727fbb30ce11832d28d207bf207705b | [
"MIT"
] | null | null | null | CURE_robustness_mod/utils/visualization.py | rudolfwilliam/higher_order_adversarial_robustness | 0d389debe727fbb30ce11832d28d207bf207705b | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from getter import getter
from CURE.CURE import CURELearner
import numpy as np
from matplotlib import pyplot as plt
from pathlib import Path
def lossplot(config: dict, save_path: str = None) -> None:
"""Plots the negative of the loss surface. One... | 38.692308 | 186 | 0.615308 | import torch
import torch.nn as nn
import torch.nn.functional as F
from getter import getter
from CURE.CURE import CURELearner
import numpy as np
from matplotlib import pyplot as plt
from pathlib import Path
def lossplot(config: dict, save_path: str = None) -> None:
"""Plots the negative of the loss surface. One... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a245d94f412789a312fde1fb3148354669d434a | 8,120 | py | Python | api/__init__.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | null | null | null | api/__init__.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | 4 | 2021-06-08T22:58:13.000Z | 2022-03-12T00:53:18.000Z | api/__init__.py | GetmeUK/h51 | 17d4003336857514765a42a0853995fbe3da6525 | [
"MIT"
] | null | null | null |
__all__ = [
'APIError',
'APIHandler',
'APIErrorHandler',
]
# API handlers should be imported here
| 28.591549 | 79 | 0.594212 | import asyncio
import json
import time
import uuid
from manhattan.utils.chrono import today_tz
from mongoframes import Q
import swm
import tornado.web
__all__ = [
'APIError',
'APIHandler',
'APIErrorHandler',
]
class APIError(tornado.web.HTTPError):
"""
Use `APIError` instead of `HTTPError` to ra... | 0 | 250 | 2,688 | 4,823 | 0 | 0 | 0 | -26 | 269 |
6799484fa6e40303a910700bfd298a06671b90d3 | 6,133 | py | Python | p2ner/core/statsFunctions.py | schristakidis/p2ner | 46694a41e8c1ebdc28f520b58c126da8785f3eed | [
"Apache-2.0"
] | 2 | 2015-06-01T22:04:34.000Z | 2017-07-06T09:35:00.000Z | p2ner/core/statsFunctions.py | schristakidis/p2ner | 46694a41e8c1ebdc28f520b58c126da8785f3eed | [
"Apache-2.0"
] | null | null | null | p2ner/core/statsFunctions.py | schristakidis/p2ner | 46694a41e8c1ebdc28f520b58c126da8785f3eed | [
"Apache-2.0"
] | 1 | 2019-11-26T10:22:35.000Z | 2019-11-26T10:22:35.000Z | # -*- coding: utf-8 -*-
# Copyright 2012 Loris Corazza, Sakis Christakidis
#
# 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
#
# U... | 27.502242 | 165 | 0.636067 | # -*- coding: utf-8 -*-
# Copyright 2012 Loris Corazza, Sakis Christakidis
#
# 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
#
# U... | 0 | 0 | 0 | 0 | 0 | 329 | 0 | -10 | 69 |
0bbb8306f493f89523384d01fcd06432b3f49ba5 | 1,123 | py | Python | pony/orm/tests/test_relations_one2one4.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | 1 | 2019-08-02T12:06:24.000Z | 2019-08-02T12:06:24.000Z | pony/orm/tests/test_relations_one2one4.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | null | null | null | pony/orm/tests/test_relations_one2one4.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | 1 | 2020-07-20T17:25:48.000Z | 2020-07-20T17:25:48.000Z | from __future__ import absolute_import, print_function, division
import unittest
if __name__ == '__main__':
unittest.main()
| 28.075 | 145 | 0.631345 | from __future__ import absolute_import, print_function, division
import unittest
from pony.orm.core import *
from pony.orm.tests.testutils import *
class TestOneToOne4(unittest.TestCase):
def setUp(self):
self.db = Database('sqlite', ':memory:')
class Person(self.db.Entity):
name = R... | 0 | 340 | 0 | 562 | 0 | 0 | 0 | 23 | 68 |
44b4c76ac3bccd6d0344221eb6bd58cf43370b1a | 2,623 | py | Python | migrations/versions/52b9095d9dff_v21_12_0_feature_207.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 2 | 2021-08-19T12:35:25.000Z | 2022-02-16T04:13:38.000Z | migrations/versions/52b9095d9dff_v21_12_0_feature_207.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 46 | 2021-09-02T03:22:05.000Z | 2022-03-31T09:20:00.000Z | migrations/versions/52b9095d9dff_v21_12_0_feature_207.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 1 | 2021-11-17T23:18:27.000Z | 2021-11-17T23:18:27.000Z | """v21.12.0_feature/#207
Revision ID: 52b9095d9dff
Revises: 05eab8fbc21b
Create Date: 2021-10-08 13:40:57.416791
"""
from alembic import op
import sqlalchemy as sa
from app.database import get_db_schema, engine
from config import MAX_UPLOAD_FILE_SIZE
# revision identifiers, used by Alembic.
revision = '52b9095d9dff... | 41.634921 | 106 | 0.6504 | """v21.12.0_feature/#207
Revision ID: 52b9095d9dff
Revises: 05eab8fbc21b
Create Date: 2021-10-08 13:40:57.416791
"""
from alembic import op
import sqlalchemy as sa
from app.database import get_db_schema, engine
from config import MAX_UPLOAD_FILE_SIZE
# revision identifiers, used by Alembic.
revision = '52b9095d9dff... | 3 | 0 | 0 | 0 | 0 | 153 | 0 | 0 | 23 |
b1cc50dd86ac4735186715386f9f6ff3fae54303 | 31 | py | Python | notebooks/_solutions/case1_bike_count3.py | rprops/Python_DS-WS | b2fc449a74be0c82863e5fcf1ddbe7d64976d530 | [
"BSD-3-Clause"
] | 3 | 2019-07-23T15:14:03.000Z | 2020-11-10T06:12:18.000Z | notebooks/_solutions/case1_bike_count3.py | rprops/Python_DS-WS | b2fc449a74be0c82863e5fcf1ddbe7d64976d530 | [
"BSD-3-Clause"
] | null | null | null | notebooks/_solutions/case1_bike_count3.py | rprops/Python_DS-WS | b2fc449a74be0c82863e5fcf1ddbe7d64976d530 | [
"BSD-3-Clause"
] | 3 | 2020-03-04T23:40:20.000Z | 2021-11-04T16:41:10.000Z | df = pd.read_csv(link, sep=';') | 31 | 31 | 0.612903 | df = pd.read_csv(link, sep=';') | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f8a5da44ab7c7f5eb5fc59fd0b9c2dc4c9dea6d9 | 9,772 | py | Python | util/dbinfo.py | Thuamo/RYANSQL | d6c03c07db52cbca76b5b935843a39da90636280 | [
"Apache-2.0"
] | 21 | 2020-07-10T01:13:29.000Z | 2021-11-22T08:24:12.000Z | util/dbinfo.py | Thuamo/RYANSQL | d6c03c07db52cbca76b5b935843a39da90636280 | [
"Apache-2.0"
] | 2 | 2021-10-14T04:54:57.000Z | 2021-10-14T05:01:10.000Z | util/dbinfo.py | Thuamo/RYANSQL | d6c03c07db52cbca76b5b935843a39da90636280 | [
"Apache-2.0"
] | 8 | 2020-11-09T04:01:26.000Z | 2021-12-26T13:29:47.000Z |
from nltk.stem import PorterStemmer
stemmer = PorterStemmer()
| 47.901961 | 727 | 0.550655 | import sys
from nltk.stem import PorterStemmer
from nltk.tokenize import TreebankWordTokenizer
stemmer = PorterStemmer()
class ColumnInfo:
def __init__( self, col_name, col_name_orig, col_type ):
self.col_name = col_name
self.col_name_orig = col_name_orig
self.col_type ... | 0 | 0 | 0 | 9,551 | 0 | 0 | 0 | 21 | 117 |
163f46742c5d9071e4db61264be24a690d5b9c5c | 7,750 | py | Python | bb/master/master.py | eponomar/infrastructure | 89971b602b396981c6105a8b44949c293568f421 | [
"MIT"
] | null | null | null | bb/master/master.py | eponomar/infrastructure | 89971b602b396981c6105a8b44949c293568f421 | [
"MIT"
] | null | null | null | bb/master/master.py | eponomar/infrastructure | 89971b602b396981c6105a8b44949c293568f421 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | 41.891892 | 100 | 0.667355 | # Copyright (c) 2020 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | 0 | 0 | 0 | 1,201 | 0 | 121 | 0 | 11 | 69 |
de10a76259eb6629d25f69ca8d149528447e9111 | 2,818 | py | Python | 3_transform.py | sywh/pytorch | 3ca035274e78237210009a711fda06ab2fd6993c | [
"MIT"
] | null | null | null | 3_transform.py | sywh/pytorch | 3ca035274e78237210009a711fda06ab2fd6993c | [
"MIT"
] | null | null | null | 3_transform.py | sywh/pytorch | 3ca035274e78237210009a711fda06ab2fd6993c | [
"MIT"
] | null | null | null |
# CenterCrop
# RandomCrop
# transforms.RandomCrop(size, padding=None, pad_if_needed=False, fill=0, padding_mode='constant')
# RandomResizedCrop
# transforms.RandomResizedCrop(size, scale=(0.08, 1.0), ratio=(3/4, 4/3), interpolation)
# FiveCrop, TenCrop
# transforms.FiveCrop(size)
# t... | 26.838095 | 107 | 0.612136 | from torchvision import transforms
def raw_transform():
# CenterCrop
# RandomCrop
# transforms.RandomCrop(size, padding=None, pad_if_needed=False, fill=0, padding_mode='constant')
# RandomResizedCrop
# transforms.RandomResizedCrop(size, scale=(0.08, 1.0), ratio=(3/4, 4/3), interpolation)
# ... | 0 | 0 | 0 | 924 | 0 | 0 | 0 | 13 | 91 |
6b2fd46de8ef465ee95db7722776eaebffc74083 | 1,716 | py | Python | ricochet/main.py | davidcaball/daily-ricochet | 55729477ac214a30fe821ae0a6c4eb2a6ac39a3f | [
"MIT"
] | null | null | null | ricochet/main.py | davidcaball/daily-ricochet | 55729477ac214a30fe821ae0a6c4eb2a6ac39a3f | [
"MIT"
] | null | null | null | ricochet/main.py | davidcaball/daily-ricochet | 55729477ac214a30fe821ae0a6c4eb2a6ac39a3f | [
"MIT"
] | null | null | null | from flask import Blueprint
main = Blueprint('main', __name__)
| 23.506849 | 147 | 0.680653 | from flask import Flask, Blueprint, render_template, request, url_for, redirect
from flask_sqlalchemy import SQLAlchemy
from flask_login import login_required, current_user
from .models import User, Scores, Board
from datetime import datetime
from . import db
main = Blueprint('main', __name__)
@main.route("/")
d... | 0 | 1,339 | 0 | 0 | 0 | 0 | 0 | 122 | 179 |
2eff9a236433b2f7bfe117d798700d1c22b7297e | 662 | py | Python | user/migrations/0002_auto_20090101_0118.py | satyamtiwari1004/incognito-beta | b0e2200b425dfe11e219bff8b4952acc9cc90c69 | [
"MIT"
] | null | null | null | user/migrations/0002_auto_20090101_0118.py | satyamtiwari1004/incognito-beta | b0e2200b425dfe11e219bff8b4952acc9cc90c69 | [
"MIT"
] | null | null | null | user/migrations/0002_auto_20090101_0118.py | satyamtiwari1004/incognito-beta | b0e2200b425dfe11e219bff8b4952acc9cc90c69 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2008-12-31 19:48
| 21.354839 | 45 | 0.537764 | # Generated by Django 3.1 on 2008-12-31 19:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('user', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='beginnerskill',
name='psb',
),
mi... | 0 | 0 | 0 | 558 | 0 | 0 | 0 | 11 | 46 |
7ce10542f6e287b3d4ed4f24136e284a89bcdc11 | 983 | py | Python | JumpScale9Lib/clients/mongodbclient/MongoEngineClient.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 2 | 2017-06-07T08:11:47.000Z | 2017-11-10T02:19:48.000Z | JumpScale9Lib/clients/mongodbclient/MongoEngineClient.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 188 | 2017-06-21T06:16:13.000Z | 2020-06-17T14:20:24.000Z | JumpScale9Lib/clients/mongodbclient/MongoEngineClient.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 3 | 2018-06-12T05:18:28.000Z | 2019-09-24T06:49:17.000Z | from js9 import j
JSConfigFactory = j.tools.configmanager.base_class_configs
JSConfigClient = j.tools.configmanager.base_class_config
TEMPLATE = """
host = "localhost"
port = 27017
username = ""
password_ = ""
alias = ""
db = ""
authentication_source = ""
authentication_mechanism = ""
ssl = false # Boolean
replicaset ... | 28.085714 | 113 | 0.68057 | from js9 import j
JSConfigFactory = j.tools.configmanager.base_class_configs
JSConfigClient = j.tools.configmanager.base_class_config
TEMPLATE = """
host = "localhost"
port = 27017
username = ""
password_ = ""
alias = ""
db = ""
authentication_source = ""
authentication_mechanism = ""
ssl = false # Boolean
replicaset ... | 0 | 0 | 0 | 607 | 0 | 0 | 0 | 0 | 46 |
aa7a86cf831f5498db3c83a7b335bc91a901f6e9 | 739 | py | Python | day06/light_switch_part2.py | JulienCote/advent_of_code_2015 | 567a589c6b1c161ebfba8dcf1b9f3bc1bf6e0d00 | [
"MIT"
] | null | null | null | day06/light_switch_part2.py | JulienCote/advent_of_code_2015 | 567a589c6b1c161ebfba8dcf1b9f3bc1bf6e0d00 | [
"MIT"
] | null | null | null | day06/light_switch_part2.py | JulienCote/advent_of_code_2015 | 567a589c6b1c161ebfba8dcf1b9f3bc1bf6e0d00 | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
import re
import numpy
light_matrix = numpy.zeros((1000,1000), dtype= numpy.int)
regex = '^([a-z ]+)(\d+)(?:,)(\d+)(?: \w+ )(\d+)(?:,)(\d+)'
with open('input.txt') as fp:
for line in fp:
instructions = re.search(regex, line)
for x_axis in range(int(instructions.group(2)), int(instructions... | 29.56 | 83 | 0.645467 | #!/usr/bin/python2.7
import re
import numpy
light_matrix = numpy.zeros((1000,1000), dtype= numpy.int)
regex = '^([a-z ]+)(\d+)(?:,)(\d+)(?: \w+ )(\d+)(?:,)(\d+)'
with open('input.txt') as fp:
for line in fp:
instructions = re.search(regex, line)
for x_axis in range(int(instructions.group(2)), int(instructions... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
df152c5c8c05ec9a871748019dff63538b0ffaa6 | 2,120 | py | Python | flask_monitoringdashboard/test/core/profiler/util/test_pathhash.py | timgates42/Flask-MonitoringDashboard | 0404b05b9a8f1917796e0f314a77a53a754a0b15 | [
"MIT"
] | 3 | 2020-07-17T05:37:41.000Z | 2021-09-06T19:46:15.000Z | flask_monitoringdashboard/test/core/profiler/util/test_pathhash.py | timgates42/Flask-MonitoringDashboard | 0404b05b9a8f1917796e0f314a77a53a754a0b15 | [
"MIT"
] | null | null | null | flask_monitoringdashboard/test/core/profiler/util/test_pathhash.py | timgates42/Flask-MonitoringDashboard | 0404b05b9a8f1917796e0f314a77a53a754a0b15 | [
"MIT"
] | 1 | 2020-03-29T17:01:07.000Z | 2020-03-29T17:01:07.000Z | from flask_monitoringdashboard.database import StackLine, CodeLine
FN = 'filename0'
LN = 42
STACK_LINES = [
StackLine(
request_id=0,
position=0,
indent=0,
duration=1010,
code=CodeLine(filename=FN, line_number=0, function_name='None', code='f()'),
),
StackLine(
... | 31.176471 | 89 | 0.644811 | import unittest
from flask_monitoringdashboard.core.profiler.util import PathHash
from flask_monitoringdashboard.database import StackLine, CodeLine
FN = 'filename0'
LN = 42
STACK_LINES = [
StackLine(
request_id=0,
position=0,
indent=0,
duration=1010,
code=CodeLine(filenam... | 0 | 0 | 0 | 1,326 | 0 | 0 | 0 | 38 | 68 |
48eccdad40c0d2ff2144668edf8928d69bea2b16 | 765 | py | Python | Desafios/desafio098.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | Desafios/desafio098.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | Desafios/desafio098.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null |
contador(1, 10, 1)
print()
contador(10, 0, 2)
print()
print('<>'*15)
i = int(input('Nmero inicial: '))
f = int(input('Nmero final: '))
p = abs(int(input('Passo: '))) # Pega o nmero inteiro, sem sinal (positivo)
contador(i, f, p)
print()
print('<>'*15)
| 23.181818 | 77 | 0.418301 | from time import sleep
def contador(i, f, p):
while True:
if p == 0:
p += 1
if p != 0:
print('<>'*15)
print(f'Contagem de {i} a {f} de {p} em {p}')
if i < f:
for c in range(i, f + 1, p):
print(f'{c:^2}', end=' ')
... | 6 | 0 | 0 | 0 | 0 | 460 | 0 | 1 | 45 |
e1d4bf2cc1c5458b8c4b2e35485fd63cf4aea637 | 2,771 | bzl | Python | proto/repositories.bzl | MatthieuCoder/rules_rust | 0368f750a221e949bd0392af0ce0fd3d28132fec | [
"Apache-2.0"
] | null | null | null | proto/repositories.bzl | MatthieuCoder/rules_rust | 0368f750a221e949bd0392af0ce0fd3d28132fec | [
"Apache-2.0"
] | null | null | null | proto/repositories.bzl | MatthieuCoder/rules_rust | 0368f750a221e949bd0392af0ce0fd3d28132fec | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 43.296875 | 131 | 0.7048 | # Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
00a23b44d3aae0b73f55bb2e7076ae3e32625f9a | 2,433 | py | Python | test/strategy.py | strengthening/pyghostbt | d2322527c8433fcfeaf03df1ecec9c679d348578 | [
"BSD-3-Clause"
] | null | null | null | test/strategy.py | strengthening/pyghostbt | d2322527c8433fcfeaf03df1ecec9c679d348578 | [
"BSD-3-Clause"
] | null | null | null | test/strategy.py | strengthening/pyghostbt | d2322527c8433fcfeaf03df1ecec9c679d348578 | [
"BSD-3-Clause"
] | 2 | 2019-12-16T02:30:13.000Z | 2021-12-14T00:24:34.000Z |
strategy_1st_config = {
"mode": "backtest",
"symbol": "btc_usd",
"exchange": "okex",
"contract_type": "quarter",
"trade_type": "future",
"unit_amount": 100,
"lever": 10,
"interval": "1min",
"db_name": "test",
"db_name_kline": "ghost-etl",
"timezone": "Asia/Shanghai",
"p... | 27.337079 | 97 | 0.610769 | import unittest
import json
from pyanalysis.mysql import Conn
from pyanalysis.moment import moment as m
from pyghostbt.strategy import Strategy
from pyghostbt.tool.order import *
from pyghostbt.tool.runtime import Runtime
from pyghostbt.const import *
from dateutil import tz
strategy_1st_config = {
"mode": "backt... | 0 | 0 | 0 | 1,699 | 0 | 0 | 0 | 78 | 245 |
5761d98edffc14adfae81ee664f78769dc3d261b | 1,094 | py | Python | StRoot/StSpinPool/StChargedPionAnalysisMaker/scripts/config/ptprofiles/mcz.py | xiaohaijin/RHIC-STAR | a305cb0a6ac15c8165bd8f0d074d7075d5e58752 | [
"MIT"
] | 2 | 2018-12-24T19:37:00.000Z | 2022-02-28T06:57:20.000Z | StRoot/StSpinPool/StChargedPionAnalysisMaker/scripts/config/ptprofiles/mcz.py | xiaohaijin/RHIC-STAR | a305cb0a6ac15c8165bd8f0d074d7075d5e58752 | [
"MIT"
] | null | null | null | StRoot/StSpinPool/StChargedPionAnalysisMaker/scripts/config/ptprofiles/mcz.py | xiaohaijin/RHIC-STAR | a305cb0a6ac15c8165bd8f0d074d7075d5e58752 | [
"MIT"
] | null | null | null | name = '_'.join(__name__.split('.')[-2:])
VERSION = '$Id: mcz.py,v 1.1 2009/04/07 16:35:31 kocolosk Exp $'[5:-2]
import ROOT
class_ = ROOT.TProfile
binning = {
'nbinsx': 60,
'xbins': (0.0, 15.0)
}
props = {
'SetXTitle': ('MC #pi p_{T}',),
'SetYTitle': ('<MC #pi p_{T} / particle jet p_{T}>',)
}
b... | 26.682927 | 75 | 0.567642 | name = '_'.join(__name__.split('.')[-2:])
VERSION = '$Id: mcz.py,v 1.1 2009/04/07 16:35:31 kocolosk Exp $'[5:-2]
import ROOT
class_ = ROOT.TProfile
binning = {
'nbinsx': 60,
'xbins': (0.0, 15.0)
}
props = {
'SetXTitle': ('MC #pi p_{T}',),
'SetYTitle': ('<MC #pi p_{T} / particle jet p_{T}>',)
}
b... | 0 | 0 | 0 | 0 | 457 | 187 | 0 | 0 | 69 |
b7300583289a9609db03c4847be88b49c2f4b18d | 1,594 | py | Python | fluid/runnner.py | AmberLJC/Fluid | 85dee374eb2a1c96fecea83d5484ad83d1739e95 | [
"Apache-2.0"
] | 1 | 2021-01-23T05:02:29.000Z | 2021-01-23T05:02:29.000Z | fluid/runnner.py | AmberLJC/Fluid | 85dee374eb2a1c96fecea83d5484ad83d1739e95 | [
"Apache-2.0"
] | null | null | null | fluid/runnner.py | AmberLJC/Fluid | 85dee374eb2a1c96fecea83d5484ad83d1739e95 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 21 01:51:33 2020
@author: liujiachen
"""
| 30.653846 | 69 | 0.646173 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 21 01:51:33 2020
@author: liujiachen
"""
from ray.tune.schedulers import FIFOScheduler, TrialScheduler
from ray.tune.trial import Trial
from ray.tune.trial_runner import TrialRunner
from ray.tune.web_server import TuneServer
class MyTrialRunner(Tr... | 0 | 0 | 0 | 1,274 | 0 | 0 | 0 | 96 | 111 |
16584ee50081ae0150c004b214e0b94c495fbd73 | 2,817 | py | Python | python/paddle/fluid/tests/unittests/test_dist_fleet_ps10.py | OuyangChao/Paddle | cac9635a6733ffbbd816b33e21c3054e0cd81ab1 | [
"Apache-2.0"
] | 2 | 2021-02-04T15:04:21.000Z | 2021-02-07T14:20:00.000Z | python/paddle/fluid/tests/unittests/test_dist_fleet_ps10.py | OuyangChao/Paddle | cac9635a6733ffbbd816b33e21c3054e0cd81ab1 | [
"Apache-2.0"
] | 1 | 2021-03-01T18:17:48.000Z | 2021-03-01T18:17:48.000Z | python/paddle/fluid/tests/unittests/test_dist_fleet_ps10.py | OuyangChao/Paddle | cac9635a6733ffbbd816b33e21c3054e0cd81ab1 | [
"Apache-2.0"
] | 1 | 2021-03-16T13:40:08.000Z | 2021-03-16T13:40:08.000Z | # Copyright (c) 2018 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 app... | 32.755814 | 77 | 0.670572 | # Copyright (c) 2018 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 app... | 0 | 0 | 0 | 1,689 | 0 | 0 | 0 | 0 | 23 |
d425ac5a8191400afa962edc0ee26bd7674dd201 | 298 | py | Python | config.py | worenga/wafanalyzer | 4ee175889b9a2aea0105e12ca62c8518ef14af9b | [
"BSD-3-Clause"
] | 1 | 2020-01-21T13:17:51.000Z | 2020-01-21T13:17:51.000Z | config.py | worenga/wafanalyzer | 4ee175889b9a2aea0105e12ca62c8518ef14af9b | [
"BSD-3-Clause"
] | null | null | null | config.py | worenga/wafanalyzer | 4ee175889b9a2aea0105e12ca62c8518ef14af9b | [
"BSD-3-Clause"
] | 1 | 2020-07-08T12:30:56.000Z | 2020-07-08T12:30:56.000Z | # Define values in the following fields. Arguments can also be passed via the command line
USER = "" # Your email address
KEY = "" # Your API Key
ZONE = "" # Your zone ID (optional)
ORG = "" # Your organization ID (optional)
MAXP = 10 # Number of pages in the traffic tab the script will inspect | 42.571429 | 90 | 0.708054 | # Define values in the following fields. Arguments can also be passed via the command line
USER = "" # Your email address
KEY = "" # Your API Key
ZONE = "" # Your zone ID (optional)
ORG = "" # Your organization ID (optional)
MAXP = 10 # Number of pages in the traffic tab the script will inspect | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
459f59a4d7af0fac2c51c819ef4b7bd4f1e559bd | 2,264 | py | Python | regression_experimets_regularization_effect.py | altosaar/fair_dummies | 33b64e6a468e4d38c8992db637a9156effe3f556 | [
"MIT"
] | 1 | 2021-02-15T23:48:54.000Z | 2021-02-15T23:48:54.000Z | regression_experimets_regularization_effect.py | altosaar/fair_dummies | 33b64e6a468e4d38c8992db637a9156effe3f556 | [
"MIT"
] | null | null | null | regression_experimets_regularization_effect.py | altosaar/fair_dummies | 33b64e6a468e4d38c8992db637a9156effe3f556 | [
"MIT"
] | 3 | 2020-08-03T13:18:07.000Z | 2022-01-13T15:08:16.000Z |
# Code to reproduce the regression experiments in the paper
import numpy as np
from fair_dummies.cf_regression import run_experiment
# parameters are tuned on training set
# choose test=True to evaluate training performance
# test seed
random_state_train_test = 123
# repeat the experiments for num_experiments times
... | 29.789474 | 80 | 0.534452 |
# Code to reproduce the regression experiments in the paper
import numpy as np
from fair_dummies.cf_regression import run_experiment
# parameters are tuned on training set
# choose test=True to evaluate training performance
# test seed
random_state_train_test = 123
# repeat the experiments for num_experiments times
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8fccefb09eed88ba5b4ca830eb7f130d4fc94168 | 659 | py | Python | backend/coronastats/routes.py | Adman/koronaslovakia | 434d418e5a1fad3589a8449669d40789fc1ccb99 | [
"MIT"
] | 3 | 2020-05-07T07:35:34.000Z | 2021-03-17T13:13:28.000Z | backend/coronastats/routes.py | Adman/koronaslovakia | 434d418e5a1fad3589a8449669d40789fc1ccb99 | [
"MIT"
] | 5 | 2020-03-27T21:50:39.000Z | 2022-02-13T09:20:34.000Z | backend/coronastats/routes.py | Adman/koronaslovakia | 434d418e5a1fad3589a8449669d40789fc1ccb99 | [
"MIT"
] | 1 | 2020-11-24T21:50:34.000Z | 2020-11-24T21:50:34.000Z | from flask import current_app
app = current_app
| 24.407407 | 61 | 0.728376 | from flask import current_app
from coronastats import db, cache
app = current_app
@app.route("/api/infected_log/", methods=["GET"])
@cache.cached(timeout=3600)
def infected_log():
results = db.get_infected_log()
return {"results": list(results)}
@app.route("/api/infected_increase_log/", methods=["GET"])
@... | 0 | 503 | 0 | 0 | 0 | 0 | 0 | 12 | 92 |
358fa6ab6936d8655149f96161bdaf9770478914 | 18,045 | py | Python | unittests/models.py | lspestrip/stdb2 | 80703385f6e681962140d82a4991878a995c90fd | [
"MIT"
] | 1 | 2018-03-07T10:13:12.000Z | 2018-03-07T10:13:12.000Z | unittests/models.py | lspestrip/stdb2 | 80703385f6e681962140d82a4991878a995c90fd | [
"MIT"
] | 31 | 2017-10-28T07:17:38.000Z | 2018-05-11T11:28:02.000Z | unittests/models.py | lspestrip/stdb2 | 80703385f6e681962140d82a4991878a995c90fd | [
"MIT"
] | 1 | 2017-11-28T21:50:27.000Z | 2017-11-28T21:50:27.000Z | # -*- encoding: utf-8 -*-
'''Database model for the "unittest" application
This module provides the definition of the database tables and fields used by
"unittest", the application which keeps track of the raw data and the analysis
results of the polarimetric unit tests done in Bicocca.
The core of the module is the... | 34.701923 | 97 | 0.658853 | # -*- encoding: utf-8 -*-
'''Database model for the "unittest" application
This module provides the definition of the database tables and fields used by
"unittest", the application which keeps track of the raw data and the analysis
results of the polarimetric unit tests done in Bicocca.
The core of the module is the... | 0 | 238 | 0 | 11,422 | 0 | 2,509 | 0 | 118 | 523 |
607bdfdbc12eefcdcce61e015122cf0c0626ab05 | 1,089 | py | Python | mindsdb/api/mongo/responders/company_id.py | mindsdb/main | 2c7c09a756c17a47f2ff4a38bf45203d706240ee | [
"MIT"
] | 261 | 2018-09-28T02:32:17.000Z | 2018-12-10T06:30:54.000Z | mindsdb/api/mongo/responders/company_id.py | mindsdb/main | 2c7c09a756c17a47f2ff4a38bf45203d706240ee | [
"MIT"
] | 27 | 2018-09-26T08:49:11.000Z | 2018-12-10T14:42:52.000Z | mindsdb/api/mongo/responders/company_id.py | mindsdb/main | 2c7c09a756c17a47f2ff4a38bf45203d706240ee | [
"MIT"
] | 46 | 2018-10-06T10:11:18.000Z | 2018-12-10T04:02:17.000Z |
responder = Responce()
| 30.25 | 67 | 0.651974 | from mindsdb.api.mongo.classes import Responder
from mindsdb.utilities.with_kwargs_wrapper import WithKWArgsWrapper
class Responce(Responder):
def when(self, query):
return 'company_id' in query
def result(self, query, request_env, mindsdb_env, session):
company_id = query.get('company_id')
... | 0 | 0 | 0 | 924 | 0 | 0 | 0 | 72 | 67 |
7da5167ee0195cb9f79e07e53930005738e807b5 | 8,251 | py | Python | backend/lib/nwv/validators/test_added_object_validator.py | jonbeeler/openweave-wdlc | 1609918e46393f22a3e29796adbd91f539c3d883 | [
"Apache-2.0"
] | 1 | 2019-07-16T17:41:15.000Z | 2019-07-16T17:41:15.000Z | backend/lib/nwv/validators/test_added_object_validator.py | jonbeeler/openweave-wdlc | 1609918e46393f22a3e29796adbd91f539c3d883 | [
"Apache-2.0"
] | 25 | 2019-07-01T01:56:52.000Z | 2021-09-29T19:18:56.000Z | backend/lib/nwv/validators/test_added_object_validator.py | jonbeeler/openweave-wdlc | 1609918e46393f22a3e29796adbd91f539c3d883 | [
"Apache-2.0"
] | 8 | 2019-07-02T17:39:49.000Z | 2021-09-27T23:49:23.000Z | #
# Copyright (c) 2019-2020 Google LLC. All Rights Reserved.
# Copyright (c) 2016-2018 Nest Labs Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | 38.919811 | 80 | 0.718095 | #
# Copyright (c) 2019-2020 Google LLC. All Rights Reserved.
# Copyright (c) 2016-2018 Nest Labs Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | 0 | 0 | 0 | 6,970 | 0 | 0 | 0 | 33 | 89 |
7beb5ef10ccbc87cfc454effc12e3dbef0596c8b | 5,812 | py | Python | objectModel/Python/cdm/persistence/syms/document_persistence.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 884 | 2019-05-10T02:09:10.000Z | 2022-03-31T14:02:00.000Z | objectModel/Python/cdm/persistence/syms/document_persistence.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 171 | 2019-06-10T11:34:37.000Z | 2022-03-31T22:50:12.000Z | objectModel/Python/cdm/persistence/syms/document_persistence.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 340 | 2019-05-07T18:00:16.000Z | 2022-03-31T12:00:15.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
_TAG = 'DocumentPersistence' | 57.544554 | 399 | 0.724708 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
import json
from typing import List
from cdm.enums import CdmObjectType
from cdm.persistence import PersistenceLayer
from cdm.objectmodel import CdmCorpusContext, ... | 3 | 4,266 | 0 | 5 | 0 | 0 | 0 | 850 | 506 |
3765ef135012eb6d031eb1d12cf728eb83a2d088 | 782 | py | Python | services/face_services.py | HoangTienDuc/tf-insightface | 2e10818b77261f85905bc25548b95997b04e6321 | [
"MIT"
] | 212 | 2018-06-10T06:12:58.000Z | 2022-03-11T01:07:49.000Z | services/face_services.py | HoangTienDuc/tf-insightface | 2e10818b77261f85905bc25548b95997b04e6321 | [
"MIT"
] | 28 | 2018-06-13T05:52:53.000Z | 2021-09-06T15:46:37.000Z | services/face_services.py | HoangTienDuc/tf-insightface | 2e10818b77261f85905bc25548b95997b04e6321 | [
"MIT"
] | 68 | 2018-06-10T07:44:46.000Z | 2021-11-26T09:38:12.000Z | '''
Some of below services are referring:
http://face-recognition.readthedocs.io/en/latest/_modules/face_recognition/api.html
'''
| 34 | 109 | 0.773657 | '''
Some of below services are referring:
http://face-recognition.readthedocs.io/en/latest/_modules/face_recognition/api.html
'''
import numpy as np
from configs import configs
def face_distance(face_encodings, face_to_compare):
if len(face_encodings) == 0:
return np.empty((0))
face_dist_value = np.... | 0 | 0 | 0 | 0 | 0 | 555 | 0 | 3 | 91 |
a6b41214f167b96a0428333ee4a552cd445f7329 | 3,568 | py | Python | bcs-ui/backend/container_service/observability/metric/constants.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 599 | 2019-06-25T03:20:46.000Z | 2022-03-31T12:14:33.000Z | bcs-ui/backend/container_service/observability/metric/constants.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 537 | 2019-06-27T06:03:44.000Z | 2022-03-31T12:10:01.000Z | bcs-ui/backend/container_service/observability/metric/constants.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 214 | 2019-06-25T03:26:05.000Z | 2022-03-31T07:52:03.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making PaaS (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance ... | 26.626866 | 115 | 0.726738 | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 783 | 0 | 0 | 262 | 0 | 0 | 0 | 60 | 45 |
85ba7657674c515ed70c3bc88a44505e96f771cd | 212 | py | Python | uavcan_gui_tool/thirdparty/__init__.py | akkawimo/gui_tool | a4316a912eb1286f39a8f2dceecda2fd6d424f45 | [
"MIT"
] | 79 | 2016-02-13T01:57:48.000Z | 2022-03-20T05:40:31.000Z | uavcan_gui_tool/thirdparty/__init__.py | akkawimo/gui_tool | a4316a912eb1286f39a8f2dceecda2fd6d424f45 | [
"MIT"
] | 49 | 2016-07-05T20:07:42.000Z | 2022-02-15T12:29:19.000Z | uavcan_gui_tool/thirdparty/__init__.py | akkawimo/gui_tool | a4316a912eb1286f39a8f2dceecda2fd6d424f45 | [
"MIT"
] | 59 | 2016-02-28T08:47:47.000Z | 2022-03-23T10:23:12.000Z | #
# Copyright (C) 2016 UAVCAN Development Team <uavcan.org>
#
# This software is distributed under the terms of the MIT License.
#
# Author: Pavel Kirienko <pavel.kirienko@zubax.com>
#
| 21.2 | 66 | 0.735849 | #
# Copyright (C) 2016 UAVCAN Development Team <uavcan.org>
#
# This software is distributed under the terms of the MIT License.
#
# Author: Pavel Kirienko <pavel.kirienko@zubax.com>
#
from . import pyqtgraph
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 23 |
6f53001eac3d77f76bcec14904946326ad00e6e0 | 10,674 | py | Python | src/python/gem5/components/boards/x86_board.py | hyu-iot/gem5 | aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5 | [
"BSD-3-Clause"
] | 765 | 2015-01-14T16:17:04.000Z | 2022-03-28T07:46:28.000Z | src/python/gem5/components/boards/x86_board.py | hyu-iot/gem5 | aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5 | [
"BSD-3-Clause"
] | 30 | 2015-01-01T21:49:38.000Z | 2021-04-20T19:01:54.000Z | src/python/gem5/components/boards/x86_board.py | hyu-iot/gem5 | aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5 | [
"BSD-3-Clause"
] | 807 | 2015-01-06T09:55:38.000Z | 2022-03-30T10:23:36.000Z | # Copyright (c) 2021 The Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this lis... | 33.671924 | 79 | 0.634626 | # Copyright (c) 2021 The Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this lis... | 0 | 1,955 | 0 | 6,264 | 0 | 0 | 0 | 612 | 292 |
ddbca74c630fc6afd8895ccaa0a72bccefc59f9e | 11,350 | py | Python | src/model.py | ClashLuke/olmax | 0813f57214ab67f12de1c64aaf3ca22015e2796a | [
"BSD-2-Clause"
] | 2 | 2021-07-20T10:19:09.000Z | 2021-07-21T08:55:03.000Z | src/model.py | ClashLuke/olmax | 0813f57214ab67f12de1c64aaf3ca22015e2796a | [
"BSD-2-Clause"
] | 1 | 2021-07-20T22:20:42.000Z | 2021-07-20T22:20:42.000Z | src/model.py | ClashLuke/olmax | 0813f57214ab67f12de1c64aaf3ca22015e2796a | [
"BSD-2-Clause"
] | 1 | 2021-07-20T00:28:58.000Z | 2021-07-20T00:28:58.000Z | import typing
import jax._src.util as util
from jax import numpy as jnp
REVERSIBLE_CTX = typing.Tuple[typing.Dict[str, jnp.ndarray], jnp.ndarray, jnp.ndarray, jnp.ndarray, jnp.ndarray]
| 41.423358 | 117 | 0.662026 | import copy
import math
import typing
import jax
import jax._src.util as util
from jax import lax, numpy as jnp
from src.backend import get_param, shard, dims_to_shape, INT_OR_TUPLE, dot, matmul, transpose
from src.context import Context
REVERSIBLE_CTX = typing.Tuple[typing.Dict[str, jnp.ndarray], jnp.ndarray, jnp.n... | 0 | 1,882 | 0 | 0 | 0 | 8,658 | 0 | 56 | 549 |
6f313dbae44fd5d3106632a43af154bb27da97ab | 3,135 | py | Python | _old/ErroneousQuotes/erroneousquotes.py | tigefa4u/reddit | 8b448979340955e544af31333eaba30c3c5a060d | [
"BSD-3-Clause"
] | 444 | 2015-01-04T02:31:53.000Z | 2022-03-22T05:57:08.000Z | _old/ErroneousQuotes/erroneousquotes.py | tigefa4u/reddit | 8b448979340955e544af31333eaba30c3c5a060d | [
"BSD-3-Clause"
] | 12 | 2015-05-21T07:56:59.000Z | 2020-02-18T06:26:39.000Z | _old/ErroneousQuotes/erroneousquotes.py | tigefa4u/reddit | 8b448979340955e544af31333eaba30c3c5a060d | [
"BSD-3-Clause"
] | 199 | 2015-01-02T14:14:07.000Z | 2022-02-12T14:00:09.000Z | #/u/GoldenSights
import praw # simple interface to the reddit API, also handles rate limiting of requests
import time
import sqlite3
'''USER CONFIGURATION'''
USERNAME = ""
#This is the bot's Username. In order to send mail, he must have some amount of Karma.
PASSWORD = ""
#This is the bot's Password.
USERAGENT = "... | 34.076087 | 149 | 0.617225 | #/u/GoldenSights
import praw # simple interface to the reddit API, also handles rate limiting of requests
import time
import sqlite3
import random
'''USER CONFIGURATION'''
USERNAME = ""
#This is the bot's Username. In order to send mail, he must have some amount of Karma.
PASSWORD = ""
#This is the bot's Password. ... | 0 | 0 | 0 | 0 | 0 | 1,200 | 0 | -8 | 45 |
4e3cb9d3958d98c6820079e67a4d6986d99a8994 | 286 | py | Python | grammar/expansions/deff.py | xurxodiz/cardwalker | 110e391d71854aaaa6d2b231d6c29f7d4f2d1dfa | [
"MIT"
] | 1 | 2018-07-22T22:52:12.000Z | 2018-07-22T22:52:12.000Z | grammar/expansions/deff.py | xurxodiz/cardwalker | 110e391d71854aaaa6d2b231d6c29f7d4f2d1dfa | [
"MIT"
] | null | null | null | grammar/expansions/deff.py | xurxodiz/cardwalker | 110e391d71854aaaa6d2b231d6c29f7d4f2d1dfa | [
"MIT"
] | null | null | null | import string
from ..constants.punctuation.deff import DASH
from ..constants.types.deff import FREQUENCY
frequency << FREQUENCY
expcode << Word(string.digits + string.uppercase)
expansion << expcode + Suppress(DASH) + frequency
| 23.833333 | 57 | 0.772727 | import string
from pyparsing import *
from ..constants.punctuation.deff import DASH, COMMA, EOL
from ..constants.types.deff import FREQUENCY
from decl import *
frequency << FREQUENCY
expcode << Word(string.digits + string.uppercase)
expansion << expcode + Suppress(DASH) + frequency
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 45 |
1c814e06411f8b7ed26915ae417cd7542cbf8b36 | 775 | py | Python | teslakit/io/getinfo.py | teslakit/teslak | 3f3dda08c5c5998cb2a7debbf22f2be675a4ff8b | [
"MIT"
] | 12 | 2019-11-14T22:19:12.000Z | 2022-03-04T01:25:33.000Z | teslakit/io/getinfo.py | anderdyl/teslaCoSMoS | 1495bfa2364ddbacb802d145b456a35213abfb7c | [
"MIT"
] | 5 | 2020-03-24T18:21:41.000Z | 2021-08-23T20:39:43.000Z | teslakit/io/getinfo.py | anderdyl/teslaCoSMoS | 1495bfa2364ddbacb802d145b456a35213abfb7c | [
"MIT"
] | 2 | 2021-03-06T07:54:41.000Z | 2021-06-30T14:33:22.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# common
import os
import os.path as op
# pip
import netCDF4 as nc
# tk
from ..io.matlab import ReadMatfile
def description(p):
'returns description of the file'
print('getting info... {0}'.format(p))
txt = '\n\n\n-->{0}'.format(p)
if op.isdir(p):
... | 20.394737 | 54 | 0.500645 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# common
import os
import os.path as op
# pip
import netCDF4 as nc
# tk
from ..io.matlab import ReadMatfile
def description(p):
'returns description of the file'
print('getting info... {0}'.format(p))
txt = '\n\n\n-->{0}'.format(p)
if op.isdir(p):
... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1d722b6a5dc5b85f27f7e8318cfe2992c4afa71e | 776 | py | Python | azure/python/print.py | dspim/call-center-optimization- | 76ef9bd8350db15525f0289afb9f1ef05ed8b1ef | [
"MIT"
] | 2 | 2017-06-15T19:36:10.000Z | 2020-05-06T19:39:15.000Z | azure/python/print.py | dspim/call-center-optimization | 76ef9bd8350db15525f0289afb9f1ef05ed8b1ef | [
"MIT"
] | 7 | 2016-05-14T08:40:35.000Z | 2016-05-20T08:45:44.000Z | azure/python/print.py | dspim/visually-impaired-masseurs | 996d420f9ec117a8ab33257b67a55f68fbcdfe9c | [
"MIT"
] | null | null | null |
# print "This is testing value in for loop\n\n"
# fruits = '<div id="b87bfc25-3cce-44f0-9948-a4f4f55a1b9f" style="height: 525; width: 100%;" class="plotly-graph-div"></div><script type="text/javascript">window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL="https://plot.ly";Plotly.newPlot("b87bfc25-3cce-4... | 86.222222 | 556 | 0.661082 |
# print "This is testing value in for loop\n\n"
# fruits = '<div id="b87bfc25-3cce-44f0-9948-a4f4f55a1b9f" style="height: 525; width: 100%;" class="plotly-graph-div"></div><script type="text/javascript">window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL="https://plot.ly";Plotly.newPlot("b87bfc25-3cce-4... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9a4ae5cc0c46a1c4570de99559ef80a99714dd8 | 6,581 | py | Python | tests/unit/utils/test_xmlutil.py | waynegemmell/salt | 88056db3589cccab8956c2ae4f9b733acce89461 | [
"Apache-2.0"
] | 9,425 | 2015-01-01T05:59:24.000Z | 2022-03-31T20:44:05.000Z | tests/unit/utils/test_xmlutil.py | waynegemmell/salt | 88056db3589cccab8956c2ae4f9b733acce89461 | [
"Apache-2.0"
] | 33,507 | 2015-01-01T00:19:56.000Z | 2022-03-31T23:48:20.000Z | tests/unit/utils/test_xmlutil.py | waynegemmell/salt | 88056db3589cccab8956c2ae4f9b733acce89461 | [
"Apache-2.0"
] | 5,810 | 2015-01-01T19:11:45.000Z | 2022-03-31T02:37:20.000Z | """
tests.unit.xmlutil_test
~~~~~~~~~~~~~~~~~~~~
"""
| 37.180791 | 94 | 0.512992 | """
tests.unit.xmlutil_test
~~~~~~~~~~~~~~~~~~~~
"""
import xml.etree.ElementTree as ET
import salt.utils.xmlutil as xml
from tests.support.unit import TestCase
class XMLUtilTestCase(TestCase):
"""
Tests that salt.utils.xmlutil properly parses XML data and returns as a properly formatted
dictiona... | 0 | 0 | 0 | 6,387 | 0 | 0 | 0 | 42 | 90 |
c5d1dc7d1bc045fb14840efc80c34f90e2dd00db | 1,225 | py | Python | api/meetup.py | ipedrazas/hashicorp-meetup3 | 17c893c1693bd43a3ad4380d2f5316e4b2c06c4d | [
"MIT"
] | 1 | 2016-06-06T18:43:42.000Z | 2016-06-06T18:43:42.000Z | api/meetup.py | ipedrazas/hashicorp-meetup3 | 17c893c1693bd43a3ad4380d2f5316e4b2c06c4d | [
"MIT"
] | null | null | null | api/meetup.py | ipedrazas/hashicorp-meetup3 | 17c893c1693bd43a3ad4380d2f5316e4b2c06c4d | [
"MIT"
] | 1 | 2016-05-19T19:20:30.000Z | 2016-05-19T19:20:30.000Z | """Meetup API."""
from flask import Flask
app = Flask(__name__, static_folder='img')
if __name__ == '__main__':
app.run(
host='0.0.0.0',
port=5000,
debug=True,
threaded=True)
| 23.557692 | 70 | 0.597551 | """Meetup API."""
from flask import Flask, render_template, request, send_from_directory
import json
import os
app = Flask(__name__, static_folder='img')
@app.route('/img/<path:path>')
def send_img(path):
"""Send image from dir."""
app.logger.debug(path)
return send_from_directory('', path)
@app.route... | 0 | 869 | 0 | 0 | 0 | 0 | 0 | 25 | 113 |
8247f5557a6a85654bc7312c5dd2555ee1ab6e77 | 1,276 | py | Python | old/BlastJobSplit.py | orionzhou/biolib | 940fb66f1b2608d34a2d00ebdf41dc84c6381f42 | [
"BSD-2-Clause"
] | 3 | 2019-02-22T20:35:23.000Z | 2021-11-25T10:01:50.000Z | old/BlastJobSplit.py | orionzhou/biolib | 940fb66f1b2608d34a2d00ebdf41dc84c6381f42 | [
"BSD-2-Clause"
] | null | null | null | old/BlastJobSplit.py | orionzhou/biolib | 940fb66f1b2608d34a2d00ebdf41dc84c6381f42 | [
"BSD-2-Clause"
] | 1 | 2021-02-19T03:10:14.000Z | 2021-02-19T03:10:14.000Z | '''
Created on Aug 3, 2009
@author: rb
'''
import os;
import os.path;
if __name__ == '__main__':
blastPath = "/export/lab/programs/blast";
qryPath = os.path.join(blastPath, "q/mtgi9not_az");
outPath = os.path.join(blastPath, "out/mtgi9not_az2.txt");
batchSize = 20;
main(blastPath, qryPath, outPath, batchSize)... | 25.52 | 85 | 0.634796 | '''
Created on Aug 3, 2009
@author: rb
'''
import os;
import os.path;
import tempfile;
def main(blastPath, qryPath, outPath, batchSize):
blastCmd = "{0}/bin/blastall -p blastx -d {0}/db/nr -i {1} -o {2} -e 1e-5 -m 8 -a 6"
fOut = open(outPath, 'w');
with open(qryPath, 'r') as fQry:
hdr = None;
cnt = 0;
while... | 0 | 0 | 0 | 0 | 0 | 910 | 0 | -6 | 46 |
0db77d29817eea58373942dff3c4cc22b6edd8d2 | 190 | py | Python | hard-gists/837538/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/837538/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/837538/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | import operator
from haystack.query import SearchQuerySet, SQ
query = 'lil way'
sqs = SearchQuerySet().filter(reduce(operator.__and__, [SQ(name=word.strip()) for word in query.split(' ')])) | 38 | 109 | 0.747368 | import operator
from haystack.query import SearchQuerySet, SQ
query = 'lil way'
sqs = SearchQuerySet().filter(reduce(operator.__and__, [SQ(name=word.strip()) for word in query.split(' ')])) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ef4d5036c8c6f55ba44b92e0472eccbca6edac89 | 256 | py | Python | lib/model/__init__.py | aaman123/faceswap | a5825c3457b062c1824ef3f8b02e4f3fa4c2217f | [
"MIT"
] | 2 | 2021-11-11T08:29:01.000Z | 2021-11-11T08:34:50.000Z | lib/model/__init__.py | aaman123/faceswap | a5825c3457b062c1824ef3f8b02e4f3fa4c2217f | [
"MIT"
] | null | null | null | lib/model/__init__.py | aaman123/faceswap | a5825c3457b062c1824ef3f8b02e4f3fa4c2217f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
""" Conditional imports depending on whether the AMD version is installed or not """
from lib.utils import get_backend
if get_backend() == "amd":
from . import losses_plaid as losses
else:
| 25.6 | 84 | 0.730469 | #!/usr/bin/env python3
""" Conditional imports depending on whether the AMD version is installed or not """
from lib.utils import get_backend
if get_backend() == "amd":
from . import losses_plaid as losses
else:
from . import losses_tf as losses
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 26 |
fae1d295b35738983d5f8504abac315549ce662a | 1,626 | py | Python | udp_control.py | TrashRobotics/AlarmClockTurret | 17fcc23dcae9015460bce01499ddcb36175a8eae | [
"MIT"
] | 5 | 2021-12-18T16:57:46.000Z | 2021-12-19T05:00:03.000Z | udp_control.py | TrashRobotics/AlarmClockTurret | 17fcc23dcae9015460bce01499ddcb36175a8eae | [
"MIT"
] | null | null | null | udp_control.py | TrashRobotics/AlarmClockTurret | 17fcc23dcae9015460bce01499ddcb36175a8eae | [
"MIT"
] | null | null | null | import socket
import json
from pynput import keyboard #
import time
msg = {
"x_dir": 0,
"y_dir": 0,
"shot": 0
}
host = ("192.168.1.1", 5000)
sendFreq = 15 # 15
def onPress(key):
""" """
global msg
if key == keyboard.Key.up: #
msg["y_dir"] = 1
el... | 28.526316 | 124 | 0.614391 | import socket
import json
from pynput import keyboard # нужно установить для управления с клавиатуры
import time
msg = {
"x_dir": 0,
"y_dir": 0,
"shot": 0
}
host = ("192.168.1.1", 5000)
sendFreq = 15 # слать 15 пакетов в секунду
def onPress(key):
""" вызывается при нажатии какой либо клави... | 604 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
07b726bd0cc9d7b41dd272d04b5c7be89141ab88 | 1,245 | py | Python | investors/migrations/0048_auto_20200607_0724.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | null | null | null | investors/migrations/0048_auto_20200607_0724.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | 3 | 2021-07-15T13:23:28.000Z | 2021-12-09T03:32:16.000Z | investors/migrations/0048_auto_20200607_0724.py | bizeasy17/investtrack | 3840948896573f3906a5df80ea80859a492f4133 | [
"MIT"
] | 1 | 2021-08-19T14:42:59.000Z | 2021-08-19T14:42:59.000Z | # Generated by Django 3.0.2 on 2020-06-06 23:24
| 41.5 | 271 | 0.603213 | # Generated by Django 3.0.2 on 2020-06-06 23:24
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('investors', '0047_auto_20200607_0720'),
]
operations = [
migrations.AddField(
model_name='trade... | 171 | 0 | 0 | 1,041 | 0 | 0 | 0 | 30 | 68 |
16b51ff756dabbe68de3754875b0b3b7bc21ce1b | 770 | py | Python | backend/allApis/models.py | geraintcjy/jiayuanchen.com | 9ae0a4234317c6902452d47e07768738eb8e33c5 | [
"MIT"
] | null | null | null | backend/allApis/models.py | geraintcjy/jiayuanchen.com | 9ae0a4234317c6902452d47e07768738eb8e33c5 | [
"MIT"
] | null | null | null | backend/allApis/models.py | geraintcjy/jiayuanchen.com | 9ae0a4234317c6902452d47e07768738eb8e33c5 | [
"MIT"
] | null | null | null |
# Create your models here.
| 33.478261 | 91 | 0.749351 | from django.db import models
# Create your models here.
class Messages(models.Model):
id = models.AutoField(primary_key=True) # 自增主键, 这里不能设置default属性,负责执行save的时候就不会新增而是修改元素
name = models.CharField('姓名', max_length=30, null=True)
content = models.CharField('content', max_length=5000)
createTime = mode... | 192 | 0 | 0 | 602 | 0 | 0 | 0 | 7 | 67 |
4257d0abf1c3a0348c9e0ccb68f0be4cad278e50 | 1,873 | py | Python | p_bulk/compose_wf.py | freude/p_dopant | 85c744eb31d9e0edbba0c801aff33060df709046 | [
"MIT"
] | null | null | null | p_bulk/compose_wf.py | freude/p_dopant | 85c744eb31d9e0edbba0c801aff33060df709046 | [
"MIT"
] | null | null | null | p_bulk/compose_wf.py | freude/p_dopant | 85c744eb31d9e0edbba0c801aff33060df709046 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
if __name__ == "__main__":
F = compose_wf(kk, bands, eigen_val, eigen_vec)
plt.imshow(F[0])
plt.draw()
plt.savefig("out.png")
| 27.955224 | 83 | 0.491191 | import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import simps
from read_env import read_env1
from abi_read import abi_read
from coordsys import CoordSys
def compose_wf(path, kk, bands, eigen_val, eigen_vec):
num_cells = 14
T = 9
coorsys = CoordSys(num_cells, T, 'au')
coorsys.se... | 0 | 0 | 0 | 0 | 0 | 1,528 | 0 | 34 | 133 |
b396d2503402f081567b75c5e8d7c5d59f317037 | 8,031 | py | Python | biointeract/hub/dataload/sources/ctdchemgene/parser.py | biothings/biothings_interactions | 7a8b16e8119d6505b6b5d89623051c11f3649430 | [
"Apache-2.0"
] | null | null | null | biointeract/hub/dataload/sources/ctdchemgene/parser.py | biothings/biothings_interactions | 7a8b16e8119d6505b6b5d89623051c11f3649430 | [
"Apache-2.0"
] | null | null | null | biointeract/hub/dataload/sources/ctdchemgene/parser.py | biothings/biothings_interactions | 7a8b16e8119d6505b6b5d89623051c11f3649430 | [
"Apache-2.0"
] | null | null | null | """
CTD parses the CTD data file and yields
a generated dictionary of record values.
For a description of the CTD file format see the
following link:
http://ctdbase.org/downloads/;jsessionid=0BD8D8C07B7661002359C02D7C0275F8
Source Project: biothings.interactions
Author: Greg Taylor: greg.k.taylor@gmail.com
"""
| 35.852679 | 116 | 0.535674 | """
CTD parses the CTD data file and yields
a generated dictionary of record values.
For a description of the CTD file format see the
following link:
http://ctdbase.org/downloads/;jsessionid=0BD8D8C07B7661002359C02D7C0275F8
Source Project: biothings.interactions
Author: Greg Taylor: greg.k.taylor@gmail.com
"""
i... | 0 | 6,605 | 0 | 921 | 0 | 0 | 0 | 30 | 156 |
c90bc525a57e09619e8869d47873929d319f4c19 | 1,417 | py | Python | share/setwinborder.py | AckslD/barpyrus | a89ef3b1453b27998940137b1ccee47d23a19612 | [
"BSD-2-Clause-FreeBSD"
] | 23 | 2016-07-12T19:04:51.000Z | 2022-03-29T01:55:31.000Z | share/setwinborder.py | AckslD/barpyrus | a89ef3b1453b27998940137b1ccee47d23a19612 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2017-02-16T21:03:51.000Z | 2021-12-04T08:28:13.000Z | share/setwinborder.py | AckslD/barpyrus | a89ef3b1453b27998940137b1ccee47d23a19612 | [
"BSD-2-Clause-FreeBSD"
] | 9 | 2016-12-15T13:46:48.000Z | 2021-07-27T22:11:47.000Z | #!/usr/bin/env python3
import sys
import os
# Change path so we find Xlib
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
if __name__ == '__main__':
main(sys.argv)
# vim: noet ts=4
| 24.431034 | 77 | 0.719831 | #!/usr/bin/env python3
import sys
import os
# Change path so we find Xlib
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from Xlib import X, display, Xutil
from Xlib.protocol import request
def setborder(winid_int, border_width, border_color):
d = display.Display();
window = d.create_resource_obje... | 0 | 0 | 0 | 0 | 0 | 1,077 | 0 | 25 | 114 |
88c0c95bcb85a5c40d9d131bf02b21079097c27f | 2,950 | py | Python | idcount.py | chuigda/Kits | 2fb70d2d566dea555323561768bf008363f58161 | [
"Unlicense"
] | 7 | 2019-04-16T19:10:30.000Z | 2020-12-27T06:27:51.000Z | idcount.py | yundanfengqingdandan/Kits | 9c62a7ce8285eb7b8ba84112a3039a832001cf09 | [
"Unlicense"
] | null | null | null | idcount.py | yundanfengqingdandan/Kits | 9c62a7ce8285eb7b8ba84112a3039a832001cf09 | [
"Unlicense"
] | 1 | 2019-06-02T03:04:04.000Z | 2019-06-02T03:04:04.000Z | # idcount : enumerate identifiers in files.
import os
rwordSet = set(["asm", "auto", "bool", "break", "case", "catch", "char", "class",
"const", "constexpr", "const_cast", "continue", "decltype", "default", "delete",
"do", "double", "dynamic_cast", "else", "enum", "explicit", "exte... | 32.777778 | 97 | 0.505424 | # idcount : enumerate identifiers in files.
import os
import os.path
rwordSet = set(["asm", "auto", "bool", "break", "case", "catch", "char", "class",
"const", "constexpr", "const_cast", "continue", "decltype", "default", "delete",
"do", "double", "dynamic_cast", "else", "enum", "... | 0 | 0 | 0 | 0 | 0 | 1,459 | 0 | -7 | 148 |
61db065ed2a5d88cc429cecb312d0fcc2dd8fba0 | 1,071 | py | Python | test/perf_tests/groupby_perfprobe.py | btc-ag/revengtools | d58680ef7d6bdc8ef518860d5d13a5acc0d01758 | [
"Apache-2.0"
] | 2 | 2019-07-15T14:59:59.000Z | 2022-01-18T14:23:54.000Z | test/perf_tests/groupby_perfprobe.py | btc-ag/revengtools | d58680ef7d6bdc8ef518860d5d13a5acc0d01758 | [
"Apache-2.0"
] | 10 | 2018-05-03T13:25:07.000Z | 2021-06-25T15:14:55.000Z | test/perf_tests/groupby_perfprobe.py | btc-ag/revengtools | d58680ef7d6bdc8ef518860d5d13a5acc0d01758 | [
"Apache-2.0"
] | 1 | 2018-05-02T13:59:27.000Z | 2018-05-02T13:59:27.000Z | '''
Created on 25.05.2011
@author: SIGIESEC
'''
from timeit import Timer
import platform
KEY_COLUMN="key_column"
VALUE_COLUMN="value_column"
if __name__ == "__main__":
print "Python version %s (%s)" % (platform.python_version(), getattr(platform, "python_implementation", lambda: "Unknown")())
print platform... | 38.25 | 249 | 0.719888 | '''
Created on 25.05.2011
@author: SIGIESEC
'''
from timeit import Timer
import platform
KEY_COLUMN="key_column"
VALUE_COLUMN="value_column"
def generate_input_data(keys, values_per_key):
for i in range(keys):
for j in range(values_per_key):
yield dict({KEY_COLUMN: "key%i" % i, VALUE_COLUMN:... | 0 | 0 | 0 | 0 | 170 | 360 | 0 | 0 | 50 |
7f6762779aa9e77624fdf69e868023f727739729 | 20,846 | py | Python | project/bin/dinkum-install-from-git.py | dinkumsoftware/dinkum | 57fd217b81a5c95b08653977c8df17f7783ae3f6 | [
"Apache-2.0"
] | null | null | null | project/bin/dinkum-install-from-git.py | dinkumsoftware/dinkum | 57fd217b81a5c95b08653977c8df17f7783ae3f6 | [
"Apache-2.0"
] | null | null | null | project/bin/dinkum-install-from-git.py | dinkumsoftware/dinkum | 57fd217b81a5c95b08653977c8df17f7783ae3f6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#filename: dinkum-install-from-git.py
#path: project/bin/
#repo: http://github.com/dinkumsoftware/dinkum.git
"""
This installs all the dinkumsoftware programs & code in ~/.dinkum/git-copy
by copying files from the git clone of dinkumsoftware.
It puts symbolic links in ~/doc/dinkum/* to all ... | 44.926724 | 102 | 0.697592 | #!/usr/bin/env python
#filename: dinkum-install-from-git.py
#path: project/bin/
#repo: http://github.com/dinkumsoftware/dinkum.git
"""
This installs all the dinkumsoftware programs & code in ~/.dinkum/git-copy
by copying files from the git clone of dinkumsoftware.
It puts symbolic links in ~/doc/dinkum/* to all ... | 0 | 0 | 0 | 63 | 0 | 0 | 0 | 0 | 98 |
e7541e90aae6724fc21be662cfca2ab9529171ad | 3,548 | py | Python | jikanvision/FaceMeshModule.py | JikanDev/jikanvision | 09cd4ecdbfe6423cdf2c6f4ae064fcafae576eb0 | [
"Apache-2.0"
] | 1 | 2021-09-02T09:03:53.000Z | 2021-09-02T09:03:53.000Z | jikanvision/FaceMeshModule.py | JikanDev/jikanvision | 09cd4ecdbfe6423cdf2c6f4ae064fcafae576eb0 | [
"Apache-2.0"
] | 1 | 2021-10-21T14:50:06.000Z | 2021-10-21T14:50:06.000Z | jikanvision/FaceMeshModule.py | JikanDev/jikanvision | 09cd4ecdbfe6423cdf2c6f4ae064fcafae576eb0 | [
"Apache-2.0"
] | null | null | null | """
Face Mesh Module
By : JikanDev
Website : https://jikandev.xyz/
"""
import cv2
def main():
"""
Example code to use the module.
"""
cap = cv2.VideoCapture(0) # Get your camera
detector = FaceMeshDetector() # Call the FaceMeshDetector class
while True:
success, im... | 35.48 | 112 | 0.592728 | """
Face Mesh Module
By : JikanDev
Website : https://jikandev.xyz/
"""
import cv2
import mediapipe as mp
class FaceMeshDetector():
"""
Find 468 Landmarks using the mediapipe library. Exports the landmarks in pixel format.
"""
def __init__(self, mode=False, maxFaces=1, refine_lm=False, m... | 0 | 0 | 0 | 2,579 | 0 | 0 | 0 | 1 | 48 |
f671fb7ff4cc00e3c7bf3684758c630ff72741d0 | 3,276 | py | Python | Chapter09/02_cartpole_reinforce.py | svenkilian/Deep-Reinforcement-Learning-Hands-On | b9ab995722bd692828ce3e6f50026fa87e5f924b | [
"MIT"
] | null | null | null | Chapter09/02_cartpole_reinforce.py | svenkilian/Deep-Reinforcement-Learning-Hands-On | b9ab995722bd692828ce3e6f50026fa87e5f924b | [
"MIT"
] | null | null | null | Chapter09/02_cartpole_reinforce.py | svenkilian/Deep-Reinforcement-Learning-Hands-On | b9ab995722bd692828ce3e6f50026fa87e5f924b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import gym
import ptan
import numpy as np
from tensorboardX import SummaryWriter
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
GAMMA = 0.99
LEARNING_RATE = 0.01
EPISODES_TO_TRAIN = 4
if __name__ == "__main__":
env = gym.make("CartPole-v0"... | 27.762712 | 72 | 0.616911 | #!/usr/bin/env python3
import gym
import ptan
import numpy as np
from tensorboardX import SummaryWriter
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
GAMMA = 0.99
LEARNING_RATE = 0.01
EPISODES_TO_TRAIN = 4
class PGN(nn.Module):
def __init__(self, input_size, n_ac... | 0 | 0 | 0 | 283 | 0 | 163 | 0 | 0 | 46 |
693597a775ac173b1603da32779ef4f3e72e7139 | 5,640 | py | Python | packages/syft/src/syft/core/node/common/action/smpc_action_message.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 8,428 | 2017-08-10T09:17:49.000Z | 2022-03-31T08:20:14.000Z | packages/syft/src/syft/core/node/common/action/smpc_action_message.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 4,779 | 2017-08-09T23:19:00.000Z | 2022-03-29T11:49:36.000Z | packages/syft/src/syft/core/node/common/action/smpc_action_message.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 2,307 | 2017-08-10T08:52:12.000Z | 2022-03-30T05:36:07.000Z | # future
from __future__ import annotations
# stdlib
# third party
# syft absolute
# relative
| 35.696203 | 95 | 0.649645 | # future
from __future__ import annotations
# stdlib
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
# third party
from google.protobuf.reflection import GeneratedProtocolMessageType
# syft absolute
import syft as sy
# relative
from .....proto.core.node.common.acti... | 0 | 5,026 | 0 | 0 | 0 | 0 | 0 | 250 | 265 |
b2ff610eecf87bebe409c7246c08ff833c73d3e8 | 10,441 | py | Python | tracra_guimain.py | yohainetz/tracra | 38cbad40beafb0ae501cb52f00d9270d79b587e1 | [
"MIT"
] | null | null | null | tracra_guimain.py | yohainetz/tracra | 38cbad40beafb0ae501cb52f00d9270d79b587e1 | [
"MIT"
] | null | null | null | tracra_guimain.py | yohainetz/tracra | 38cbad40beafb0ae501cb52f00d9270d79b587e1 | [
"MIT"
] | null | null | null | from __future__ import print_function, unicode_literals
import sys
from multiprocessing import freeze_support
if __name__ == "__main__":
freeze_support()
app = QApplication(sys.argv)
tracra_main = TracraMain()
tracra_main.show()
exit_code = app.exec_()
sys.exit(exit_code)
| 38.527675 | 210 | 0.685088 | from __future__ import print_function, unicode_literals
from datetime import datetime
from pathlib import Path
from PyQt5 import QtWidgets
from PyQt5.QtCore import QThread
from PyQt5.QtGui import QTextDocument, QTextBlock
import tracra_export
from mailbox import MailboxAnalyzeObject
from oauth_utils import openOauth... | 12 | 0 | 0 | 9,699 | 0 | 0 | 0 | 162 | 269 |
c1a831d0bbd28b8e6db10db3029c7beff006087d | 4,181 | py | Python | gnuradio-3.7.13.4/gr-trellis/docs/test_viterbi_equalization1.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | 1 | 2021-03-09T07:32:37.000Z | 2021-03-09T07:32:37.000Z | gnuradio-3.7.13.4/gr-trellis/docs/test_viterbi_equalization1.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | gnuradio-3.7.13.4/gr-trellis/docs/test_viterbi_equalization1.py | v1259397/cosmic-gnuradio | 64c149520ac6a7d44179c3f4a38f38add45dd5dc | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
try:
except ImportError:
sys.stderr.write("Error: Program requires gr-analog.\n")
sys.exit(1)
if __name__ == '__main__':
main (sys.argv[1:])
| 38.357798 | 325 | 0.679742 | #!/usr/bin/env python
from gnuradio import gr
from gnuradio import audio
from gnuradio import trellis, digital, filter, blocks
from gnuradio import eng_notation
import math
import sys
import random
import fsm_utils
try:
from gnuradio import analog
except ImportError:
sys.stderr.write("Error: Program requires ... | 0 | 0 | 0 | 0 | 0 | 3,730 | 0 | 34 | 227 |
61529dd85b13063ab33e965dc1a7a59615f097d4 | 282 | py | Python | traffic_stops/utils.py | OpenDataPolicingNC/Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 25 | 2015-09-12T23:10:52.000Z | 2021-03-24T08:39:46.000Z | traffic_stops/utils.py | OpenDataPolicingNC/Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 159 | 2015-07-01T03:57:23.000Z | 2021-04-17T21:09:19.000Z | traffic_stops/utils.py | copelco/NC-Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 8 | 2015-10-02T16:56:40.000Z | 2020-10-18T01:16:29.000Z | import math
def get_chunks(xs, chunk_count=3):
"""
Helper function to split a list into roughly equally sized chunks.
"""
chunk_width = math.ceil(len(xs) / chunk_count)
ranges = range(0, len(xs), chunk_width)
return [xs[x:x + chunk_width] for x in ranges]
| 25.636364 | 70 | 0.666667 | import math
def get_chunks(xs, chunk_count=3):
"""
Helper function to split a list into roughly equally sized chunks.
"""
chunk_width = math.ceil(len(xs) / chunk_count)
ranges = range(0, len(xs), chunk_width)
return [xs[x:x + chunk_width] for x in ranges]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
869d105f0b6b1b18be5e25b7aa42d86620f5f9f9 | 3,171 | py | Python | algoritmos_procesamiento/generar_grafica_historica_anio_area.py | jorgemauricio/proyectoGranizo | 380c8660da2775cc4ac594fcb02a1ee0f37e6503 | [
"MIT"
] | null | null | null | algoritmos_procesamiento/generar_grafica_historica_anio_area.py | jorgemauricio/proyectoGranizo | 380c8660da2775cc4ac594fcb02a1ee0f37e6503 | [
"MIT"
] | null | null | null | algoritmos_procesamiento/generar_grafica_historica_anio_area.py | jorgemauricio/proyectoGranizo | 380c8660da2775cc4ac594fcb02a1ee0f37e6503 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
#######################################
# Script que permite crear grfica histrica
# a partir de datos de precipitacin de la NASA
# Author: Jorge Mauricio
# Email: jorge.ernesto.mauricio@gmail.com
# Date: 2018-02-01
# Version: 1.0
######################################... | 29.635514 | 118 | 0.584043 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
#######################################
# Script que permite crear gráfica histórica
# a partir de datos de precipitación de la NASA
# Author: Jorge Mauricio
# Email: jorge.ernesto.mauricio@gmail.com
# Date: 2018-02-01
# Version: 1.0
###################################... | 32 | 0 | 0 | 0 | 0 | 2,490 | 0 | -17 | 201 |
87a7a5a455773a2830eecd85f18579f1935a4094 | 20,715 | py | Python | antipetros_discordbot/cogs/general_cogs/image_manipulation_cog.py | Giddius/Antipetros_Discord_Bot | 2c139a5c0fc410385e936999989513fc1e7ebc8b | [
"MIT"
] | null | null | null | antipetros_discordbot/cogs/general_cogs/image_manipulation_cog.py | Giddius/Antipetros_Discord_Bot | 2c139a5c0fc410385e936999989513fc1e7ebc8b | [
"MIT"
] | 13 | 2021-02-19T02:22:28.000Z | 2021-02-20T03:19:11.000Z | antipetros_discordbot/cogs/general_cogs/image_manipulation_cog.py | Giddius/Antipetros_Discord_Bot | 2c139a5c0fc410385e936999989513fc1e7ebc8b | [
"MIT"
] | 2 | 2020-11-19T10:21:06.000Z | 2021-12-14T00:27:45.000Z |
# region [Imports]
# * Standard Library Imports ---------------------------------------------------------------------------->
import os
# * Third Party Imports --------------------------------------------------------------------------------->
# * Gid Imports ----------------------------------------------------------... | 50.647922 | 200 | 0.662901 |
# region [Imports]
# * Standard Library Imports ---------------------------------------------------------------------------->
import os
import asyncio
from io import BytesIO
from pathlib import Path
from datetime import datetime
from tempfile import TemporaryDirectory
from textwrap import dedent
# * Third Party Impo... | 0 | 6,217 | 1,544 | 10,544 | 0 | 0 | 0 | 378 | 353 |
316cbec88014b02f6c649435d922bfbccc7adbc5 | 5,878 | py | Python | src/script.py | Programmer-Edilson/advaced-calc-using-tkinter | d77422eb8fffaa95047388a32ee5d9c75a67796e | [
"MIT"
] | 1 | 2022-01-30T17:04:41.000Z | 2022-01-30T17:04:41.000Z | src/script.py | Programmer-Edilson/advaced-calc-using-tkinter | d77422eb8fffaa95047388a32ee5d9c75a67796e | [
"MIT"
] | null | null | null | src/script.py | Programmer-Edilson/advaced-calc-using-tkinter | d77422eb8fffaa95047388a32ee5d9c75a67796e | [
"MIT"
] | null | null | null |
root = Tk()
root.title("Calculadora")
root['bg'] = "cyan"
f_num = DoubleVar()
l_num = DoubleVar()
operation = StringVar()
label_value = StringVar()
singal = IntVar()
singal.set(0)
# declaring widgets
label = Label(root, textvariable = label_value, bg = "cyan", font = ("anonymous", 10))
entry = Entry(root, font = ('... | 40.260274 | 106 | 0.615856 | from tkinter import *
from math import sqrt
def percent():
first_number = entry.get()
f_num.set(float(first_number))
delete_entry()
label_value.set(str(first_number) + " % of ")
singal.set(1)
def type_number(number):
first_number = entry.get()
if ("." in first_number) and (number == "."):... | 12 | 0 | 0 | 0 | 0 | 1,436 | 0 | 0 | 209 |
cc732ba73710ac0593815dce746777f0febcc36c | 1,431 | py | Python | rnacentral_pipeline/databases/data/ontology_term.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 1 | 2018-08-09T14:41:16.000Z | 2018-08-09T14:41:16.000Z | rnacentral_pipeline/databases/data/ontology_term.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 60 | 2015-02-04T16:43:53.000Z | 2022-01-27T10:28:43.000Z | rnacentral_pipeline/databases/data/ontology_term.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by... | 30.446809 | 72 | 0.699511 | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by... | 0 | 697 | 0 | 0 | 0 | 0 | 0 | 31 | 90 |
8400e0856ecafa324ecb3e7112f9084a15e6990f | 192 | py | Python | src/cocoscore/tools/constants.py | JungeAlexander/cocosco | 81ba561f6f16b43cfbd1b6d119e042bb640da23d | [
"MIT"
] | 15 | 2018-01-06T19:34:12.000Z | 2021-02-15T21:58:11.000Z | src/cocoscore/tools/constants.py | JungeAlexander/cocosco | 81ba561f6f16b43cfbd1b6d119e042bb640da23d | [
"MIT"
] | 3 | 2017-11-11T15:46:29.000Z | 2018-11-16T13:14:46.000Z | src/cocoscore/tools/constants.py | JungeAlexander/cocosco | 81ba561f6f16b43cfbd1b6d119e042bb640da23d | [
"MIT"
] | 2 | 2018-06-10T18:43:14.000Z | 2021-03-11T15:28:17.000Z | SACCHAROMYCES_CEREVISIAE_TAXONOMY_ID = 4932
DROSOPHILA_MELANOGASTER_TAXONOMY_ID = 7227
HOMO_SAPIENS_TAXONOMY_ID = 9606
GENE_PLACEHOLDER = 'MYGENETOKEN'
DISEASE_PLACEHOLDER = 'MYDISEASETOKEN'
| 27.428571 | 43 | 0.869792 | SACCHAROMYCES_CEREVISIAE_TAXONOMY_ID = 4932
DROSOPHILA_MELANOGASTER_TAXONOMY_ID = 7227
HOMO_SAPIENS_TAXONOMY_ID = 9606
GENE_PLACEHOLDER = 'MYGENETOKEN'
DISEASE_PLACEHOLDER = 'MYDISEASETOKEN'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f2c08ac7876e5dab46d55b29530ee272f3be503e | 1,907 | py | Python | model/ctr/fnn.py | zeroized/DeepRec-torch | 2957f65501243107284f3a43735b77b3e89ce684 | [
"MIT"
] | 29 | 2020-06-09T16:41:21.000Z | 2022-03-23T02:21:25.000Z | model/ctr/fnn.py | zeroized/DeepRec-torch | 2957f65501243107284f3a43735b77b3e89ce684 | [
"MIT"
] | null | null | null | model/ctr/fnn.py | zeroized/DeepRec-torch | 2957f65501243107284f3a43735b77b3e89ce684 | [
"MIT"
] | 5 | 2020-06-09T16:41:24.000Z | 2022-01-27T01:24:14.000Z | import torch.nn as nn
"""
Model: FNN: Factorization-machine supported Neural Network
Version: arXiv [v1] Mon, 11 Jan 2016 10:04:40 UTC
Reference: Zhang, W., Du, T., & Wang, J. (2016).
Deep Learning over Multi-field Categorical Data: A Case Study on User Response Prediction.
arXiv: Learning,.
""... | 30.758065 | 118 | 0.632407 | import torch
import torch.nn as nn
from model.ctr.fm import FM
from model.basic.mlp import MLP
from model.basic.output_layer import OutputLayer
"""
Model: FNN: Factorization-machine supported Neural Network
Version: arXiv [v1] Mon, 11 Jan 2016 10:04:40 UTC
Reference: Zhang, W., Du, T., & Wang, J. (2016).
D... | 0 | 0 | 0 | 1,439 | 0 | 0 | 0 | 34 | 111 |
efad4e0db8284d13a8ea62c2c10f6d69f7968d9e | 313 | py | Python | Ex1.py | EduarTeixeira/Exercicios_LP_3B | dfbbd58e1a1c2033ee4f643cc5b60a86a7213f0a | [
"MIT"
] | null | null | null | Ex1.py | EduarTeixeira/Exercicios_LP_3B | dfbbd58e1a1c2033ee4f643cc5b60a86a7213f0a | [
"MIT"
] | null | null | null | Ex1.py | EduarTeixeira/Exercicios_LP_3B | dfbbd58e1a1c2033ee4f643cc5b60a86a7213f0a | [
"MIT"
] | null | null | null | n1 = int(input("Digite um nmero inteiro: "))
n2 = int(input("Digite um nmero inteiro: "))
n3 = int(input("Digite um nmero inteiro: "))
n4 = int(input("Digite um nmero inteiro: "))
n5 = int(input("Digite um nmero inteiro: "))
lista1 = [n1, n2, n3, n4, n5]
print(lista1)
lista2 = [1, 2, 3, 4, 5]
print(lista2) | 31.3 | 45 | 0.651757 | n1 = int(input("Digite um número inteiro: "))
n2 = int(input("Digite um número inteiro: "))
n3 = int(input("Digite um número inteiro: "))
n4 = int(input("Digite um número inteiro: "))
n5 = int(input("Digite um número inteiro: "))
lista1 = [n1, n2, n3, n4, n5]
print(lista1)
lista2 = [1, 2, 3, 4, 5]
print(lista2) | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1d0e183755ea07a0c80752bab68fc3e962675535 | 3,163 | py | Python | qiita_db/test/test_reference.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | qiita_db/test/test_reference.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | qiita_db/test/test_reference.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 37.211765 | 79 | 0.578248 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 0 | 2,483 | 0 | 0 | 0 | 0 | 0 | 107 | 156 |
0cdfbff669e6267e7481565b3e99d87f0d58d1b0 | 4,321 | py | Python | gastrometry/plotting/plot_full_survey.py | PFLeget/gastrometry | a1b7f49037957eaf5667d328e4b461e28490a142 | [
"BSD-3-Clause"
] | null | null | null | gastrometry/plotting/plot_full_survey.py | PFLeget/gastrometry | a1b7f49037957eaf5667d328e4b461e28490a142 | [
"BSD-3-Clause"
] | null | null | null | gastrometry/plotting/plot_full_survey.py | PFLeget/gastrometry | a1b7f49037957eaf5667d328e4b461e28490a142 | [
"BSD-3-Clause"
] | null | null | null |
if __name__ == "__main__":
#stat = plot_distribution_residuals(path='../data/', stat = 'stat.pkl', mas=3600.*1e3)
#plt.savefig('../../../../Dropbox/hsc_astro/figures/histo_stds_full_survey_no_corrections.pdf')
plot_eb_mode_full_survey('../data/final_gp_outputs_all.pkl')
| 38.927928 | 99 | 0.51863 | import numpy as np
import pylab as plt
import os
from gastrometry import biweight_median, biweight_mad
from gastrometry import median_check_finite
import pickle
def plot_distribution_residuals(path='../data/', stat = None,
filters=['g', 'r', 'i', 'z', 'y'],
... | 0 | 0 | 0 | 0 | 0 | 3,823 | 0 | 29 | 178 |
b10860e74fc7ea550e2762ed613527e9901bf4e5 | 3,856 | py | Python | teams.py | Azazi/epl-stats | e31cf98688b8c777d5ca86e6075401aba644f957 | [
"MIT"
] | 1 | 2020-09-11T22:24:49.000Z | 2020-09-11T22:24:49.000Z | teams.py | Azazi/epl-stats | e31cf98688b8c777d5ca86e6075401aba644f957 | [
"MIT"
] | 1 | 2021-06-02T00:55:24.000Z | 2021-06-02T00:55:24.000Z | teams.py | Azazi/epl-stats | e31cf98688b8c777d5ca86e6075401aba644f957 | [
"MIT"
] | null | null | null | FORMER_TEAM_NAME_MAP = {
'AFC Bournemouth': 'AFC Bournemouth',
'Accrington FC': 'Accrington FC',
'Arsenal FC': 'Arsenal FC',
'Aston Villa': 'Aston Villa',
'Barnsley FC': 'Barnsley FC',
'Birmingham City': 'Birmingham City',
'Birmingham FC': 'Birmingham City',
'Blackburn Rovers': 'Blackbur... | 39.346939 | 61 | 0.638226 | FORMER_TEAM_NAME_MAP = {
'AFC Bournemouth': 'AFC Bournemouth',
'Accrington FC': 'Accrington FC',
'Arsenal FC': 'Arsenal FC',
'Aston Villa': 'Aston Villa',
'Barnsley FC': 'Barnsley FC',
'Birmingham City': 'Birmingham City',
'Birmingham FC': 'Birmingham City',
'Blackburn Rovers': 'Blackbur... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8931da686ef9652d3d4f086b987bc32ff0a786ef | 475 | py | Python | ICOSSAR_2021/publication/ClosePDF.py | KyleAnthonyShepherd/SISRRA_tensor_contraction | df631076b88fb12c562950790e96b359b0962d46 | [
"MIT"
] | null | null | null | ICOSSAR_2021/publication/ClosePDF.py | KyleAnthonyShepherd/SISRRA_tensor_contraction | df631076b88fb12c562950790e96b359b0962d46 | [
"MIT"
] | null | null | null | ICOSSAR_2021/publication/ClosePDF.py | KyleAnthonyShepherd/SISRRA_tensor_contraction | df631076b88fb12c562950790e96b359b0962d46 | [
"MIT"
] | null | null | null | import sys
import win32gui
win32gui.EnumWindows( winEnumHandler, sys.argv[1] )
print(sys.argv)
# Manuscript_Dec_30.pdf - Adobe Reader
sys.exit()
| 21.590909 | 86 | 0.701053 | import os
import sys
import win32gui
import win32con
import time
def winEnumHandler( hwnd, ctx ):
# print(ctx)
if win32gui.IsWindowVisible( hwnd ):
if ctx+ ' - Adobe Acrobat Reader DC (64-bit)'==win32gui.GetWindowText( hwnd ):
win32gui.PostMessage(hwnd,win32con.WM_CLOSE,0,0)
print... | 0 | 0 | 0 | 0 | 0 | 264 | 0 | -28 | 89 |
bb4093605041c09679ce343e7b8d36a669e4f05e | 403 | py | Python | Lambda_Func-1.py | praabindhp/Lambda_Functions | c78dbb6b521998ab4681e4e644eb246985ed8355 | [
"MIT"
] | 1 | 2021-07-23T08:07:51.000Z | 2021-07-23T08:07:51.000Z | Lambda_Func-1.py | praabindhp/Lambda_Functions | c78dbb6b521998ab4681e4e644eb246985ed8355 | [
"MIT"
] | null | null | null | Lambda_Func-1.py | praabindhp/Lambda_Functions | c78dbb6b521998ab4681e4e644eb246985ed8355 | [
"MIT"
] | null | null | null | # Normal Incremental Function
# Lambda Expression
incrementLamba = lambda x : x * 3
print("The Increment Normal : ", incrementNormal(50))
print("The Increment Lamba : ", incrementLamba(15))
productLamba = lambda x, y : x * y
print("The Produt Lamba : ", productLamba(15, 3))
# # Printing The Type
# print(type(increm... | 25.1875 | 53 | 0.71464 | # Normal Incremental Function
def incrementNormal(x):
return x + 20
# Lambda Expression
incrementLamba = lambda x : x * 3
print("The Increment Normal : ", incrementNormal(50))
print("The Increment Lamba : ", incrementLamba(15))
productLamba = lambda x, y : x * y
print("The Produt Lamba : ", productLamba(15, 3))
... | 0 | 0 | 0 | 0 | 0 | 20 | 0 | 0 | 22 |
82ba2315504b2eff84cff1644e46abaea2827630 | 455 | py | Python | dynamic_databases/receivers.py | sligodave/dynamic_databases | 8bb85d59ef5ad6b0176b192a82ec457fb00601c5 | [
"MIT"
] | 4 | 2017-05-14T23:45:42.000Z | 2020-12-21T06:33:15.000Z | dynamic_databases/receivers.py | sligodave/dynamic_databases | 8bb85d59ef5ad6b0176b192a82ec457fb00601c5 | [
"MIT"
] | 2 | 2017-05-14T22:47:40.000Z | 2018-04-19T11:01:29.000Z | dynamic_databases/receivers.py | sligodave/dynamic_databases | 8bb85d59ef5ad6b0176b192a82ec457fb00601c5 | [
"MIT"
] | 3 | 2017-05-26T22:42:25.000Z | 2021-10-21T01:14:23.000Z |
from logging import getLogger
logger = getLogger('dynamic_databases.receivers')
| 26.764706 | 66 | 0.789011 |
from logging import getLogger
from django.db.models.signals import pre_save, pre_delete
from django.dispatch import receiver
from dynamic_databases.models import DynamicDatabaseConfig
logger = getLogger('dynamic_databases.receivers')
@receiver([pre_save, pre_delete], sender=DynamicDatabaseConfig)
def unregister_... | 0 | 192 | 0 | 0 | 0 | 0 | 0 | 88 | 91 |
7a5a2069192625d5639699a2d9a74a124e6e186e | 2,268 | py | Python | application/autoML/main.py | Basvanstein/MIP-EGO | e1ed0b0ea020850c72c4de5efd5dda0a99de571f | [
"MIT"
] | 23 | 2018-07-20T17:22:28.000Z | 2022-02-23T15:41:30.000Z | application/autoML/main.py | Basvanstein/MIP-EGO | e1ed0b0ea020850c72c4de5efd5dda0a99de571f | [
"MIT"
] | 5 | 2019-03-05T22:09:13.000Z | 2021-10-08T08:48:43.000Z | application/autoML/main.py | Basvanstein/MIP-EGO | e1ed0b0ea020850c72c4de5efd5dda0a99de571f | [
"MIT"
] | 14 | 2018-05-15T21:47:57.000Z | 2021-12-07T02:04:38.000Z | """
Created on 08 Okt. 2021
@author: Bas van Stein
This example shows how you can use MiP-EGO in order to perform hyper-parameter optimization for machine learning tasks.
"""
#import packages
from sklearn.datasets import load_iris
#import our package, the surrogate model and the search space classes
from mipego imp... | 32.869565 | 119 | 0.723104 | """
Created on 08 Okt. 2021
@author: Bas van Stein
This example shows how you can use MiP-EGO in order to perform hyper-parameter optimization for machine learning tasks.
"""
#import packages
from sklearn.datasets import load_iris
from sklearn.svm import SVC
from sklearn.model_selection import cross_val_score, KFold... | 0 | 0 | 0 | 0 | 0 | 411 | 0 | 40 | 88 |
efd5faf0eb0dce6584c730b7d393858dae521408 | 4,527 | py | Python | SRC/engine/profilefunction.py | usnistgov/OOF3D | 4fd423a48aea9c5dc207520f02de53ae184be74c | [
"X11"
] | 31 | 2015-04-01T15:59:36.000Z | 2022-03-18T20:21:47.000Z | SRC/engine/profilefunction.py | usnistgov/OOF3D | 4fd423a48aea9c5dc207520f02de53ae184be74c | [
"X11"
] | 3 | 2015-02-06T19:30:24.000Z | 2017-05-25T14:14:31.000Z | SRC/engine/profilefunction.py | usnistgov/OOF3D | 4fd423a48aea9c5dc207520f02de53ae184be74c | [
"X11"
] | 7 | 2015-01-23T15:19:22.000Z | 2021-06-09T09:03:59.000Z | # -*- python -*-
# This software was produced by NIST, an agency of the U.S. government,
# and by statute is not subject to copyright in the United States.
# Recipients of this software assume all responsibilities associated
# with its operation, modification and maintenance. However, to
# facilitate maintenance we as... | 42.308411 | 79 | 0.678816 | # -*- python -*-
# This software was produced by NIST, an agency of the U.S. government,
# and by statute is not subject to copyright in the United States.
# Recipients of this software assume all responsibilities associated
# with its operation, modification and maintenance. However, to
# facilitate maintenance we as... | 0 | 0 | 0 | 3,123 | 0 | 0 | 0 | 32 | 226 |
49170ffc97868db5d308cf530fd9155ea6a12621 | 4,679 | py | Python | src/spaceone/core/celery/tasks.py | jihyungSong/python-core | 898ead301363d3e599ecd645b73071e639f886b0 | [
"Apache-2.0"
] | 14 | 2020-06-01T08:17:43.000Z | 2022-01-13T22:37:50.000Z | src/spaceone/core/celery/tasks.py | jihyungSong/python-core | 898ead301363d3e599ecd645b73071e639f886b0 | [
"Apache-2.0"
] | 7 | 2020-08-11T23:05:59.000Z | 2022-01-12T05:08:49.000Z | src/spaceone/core/celery/tasks.py | jihyungSong/python-core | 898ead301363d3e599ecd645b73071e639f886b0 | [
"Apache-2.0"
] | 11 | 2020-06-01T08:17:49.000Z | 2021-11-25T08:26:37.000Z | from celery.utils.log import get_logger
_LOGGER = get_logger(__name__)
| 33.905797 | 108 | 0.618722 | from celery import Task, shared_task
from celery.utils.log import get_logger
from spaceone.core.error import ERROR_TASK_LOCATOR, ERROR_TASK_METHOD
from spaceone.core.locator import Locator
from spaceone.core.logger import set_logger
from spaceone.core.transaction import Transaction
_LOGGER = get_logger(__name__)
cl... | 0 | 692 | 0 | 3,551 | 0 | 0 | 0 | 133 | 226 |
b0b73a078bbba71ce874a624e91c1d308731bbf5 | 1,063 | py | Python | homedisplay/info_transportation/migrations/0004_auto_20150225_2202.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 1 | 2016-11-28T04:35:06.000Z | 2016-11-28T04:35:06.000Z | homedisplay/info_transportation/migrations/0004_auto_20150225_2202.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 160 | 2015-01-01T20:59:29.000Z | 2016-04-25T13:36:52.000Z | homedisplay/info_transportation/migrations/0004_auto_20150225_2202.py | ojarva/home-info-display | 873d022308732baff94d0dc2381cf9dc7dce23b7 | [
"BSD-3-Clause"
] | 1 | 2015-02-25T21:24:01.000Z | 2015-02-25T21:24:01.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
| 27.973684 | 76 | 0.581373 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('info_transportation', '0003_line_show_line'),
]
operations = [
migrati... | 0 | 0 | 0 | 879 | 0 | 0 | 0 | 29 | 90 |
77bdefd7c2577886e76775539f2ef2e83d78522c | 912 | py | Python | setup.py | watsosc/strivial | aa7efe889227650d8f39b247fd0208deb71d246b | [
"Apache-2.0"
] | null | null | null | setup.py | watsosc/strivial | aa7efe889227650d8f39b247fd0208deb71d246b | [
"Apache-2.0"
] | null | null | null | setup.py | watsosc/strivial | aa7efe889227650d8f39b247fd0208deb71d246b | [
"Apache-2.0"
] | null | null | null | import io
import os.path
from setuptools import find_packages, setup
version = '0.0.1-alpha'
def parse_requirements(filename):
''' load requirements from a pip requirements file'''
lineiter = (line.strip() for line in open(filename))
return [line for line in lineiter if line and not line.startswith('#')]
... | 26.057143 | 86 | 0.658991 | import io
import os.path
from setuptools import find_packages, setup
version = '0.0.1-alpha'
def parse_requirements(filename):
''' load requirements from a pip requirements file'''
lineiter = (line.strip() for line in open(filename))
return [line for line in lineiter if line and not line.startswith('#')]
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d3e935a39fe8f2fd1ecd56fa87a0e614feac8163 | 4,210 | py | Python | Nets/Nodule.py | vessemer/LungCancerDetection | b1810c608896406abf8964298c0dd9ccf4816008 | [
"MIT"
] | 18 | 2017-05-08T23:50:53.000Z | 2020-12-10T19:34:42.000Z | Nets/Nodule.py | vessemer/LungCancerDetection | b1810c608896406abf8964298c0dd9ccf4816008 | [
"MIT"
] | 1 | 2018-09-03T08:15:22.000Z | 2019-04-02T12:38:26.000Z | Nets/Nodule.py | vessemer/LungCancerDetection | b1810c608896406abf8964298c0dd9ccf4816008 | [
"MIT"
] | 13 | 2017-05-08T23:51:10.000Z | 2021-09-27T05:44:36.000Z | from __future__ import print_function
| 30.28777 | 99 | 0.527078 | from __future__ import print_function
import numpy as np
import warnings
from keras.layers import merge, Input
from keras.layers import Dense, Activation, Flatten, Dropout
from keras.layers import Convolution3D, MaxPooling3D, ZeroPadding3D, AveragePooling3D, UpSampling3D
from keras.layers import BatchNormalization
fr... | 0 | 0 | 0 | 0 | 0 | 3,654 | 0 | 224 | 291 |
7c5b33ebbe820c878775d5119b6733148ad0cec9 | 14,234 | py | Python | aleph/views/serializers.py | catskillmarina/aleph | 02f8a6c66739053eaff625537cf8834cb31a3892 | [
"MIT"
] | null | null | null | aleph/views/serializers.py | catskillmarina/aleph | 02f8a6c66739053eaff625537cf8834cb31a3892 | [
"MIT"
] | null | null | null | aleph/views/serializers.py | catskillmarina/aleph | 02f8a6c66739053eaff625537cf8834cb31a3892 | [
"MIT"
] | null | null | null | import logging
log = logging.getLogger(__name__)
| 36.875648 | 88 | 0.604819 | import logging
from pprint import pprint, pformat # noqa
from flask import request
from pantomime.types import PDF, CSV
from banal import ensure_list
from followthemoney import model
from followthemoney.types import registry
from followthemoney.helpers import entity_filename
from aleph.core import url_for
from aleph.... | 0 | 299 | 0 | 12,897 | 0 | 0 | 0 | 335 | 639 |
37652592fc204c93dfc3b8f6ddcf88bab130e7e1 | 6,606 | py | Python | Outils/views/evaluation.py | Inedit20/Climatelabs | 5621a0eb7a0aa634b5203c172edbe65706537a31 | [
"bzip2-1.0.6"
] | null | null | null | Outils/views/evaluation.py | Inedit20/Climatelabs | 5621a0eb7a0aa634b5203c172edbe65706537a31 | [
"bzip2-1.0.6"
] | null | null | null | Outils/views/evaluation.py | Inedit20/Climatelabs | 5621a0eb7a0aa634b5203c172edbe65706537a31 | [
"bzip2-1.0.6"
] | null | null | null | from django.shortcuts import redirect, render
#from stories.filters import CasesFilter
# View pour la cration du Profile de l'expert
# View pour la cration de l'quipe
# Equipe name
# View pour la cration du Profile de l'expert
# View pour la cration formulaire
... | 28.110638 | 185 | 0.675447 | from django.db.models import fields
from django.db.models.expressions import ExpressionWrapper
from django.db.models.fields import IntegerField
from django.http.response import HttpResponse
from django.shortcuts import redirect, render
from django.views.generic import TemplateView
from django.utils import timezone
from... | 16 | 0 | 0 | 838 | 0 | 4,154 | 0 | 545 | 739 |
ec7ef08239cd7d790e4a8cceaefc32ca646e0933 | 1,016 | py | Python | Grafos/Python language/mainGrafo.py | alysonvale/grafos | 9218dd9212c9edbe1a1f5f98e535ca34d4765b5c | [
"MIT"
] | null | null | null | Grafos/Python language/mainGrafo.py | alysonvale/grafos | 9218dd9212c9edbe1a1f5f98e535ca34d4765b5c | [
"MIT"
] | null | null | null | Grafos/Python language/mainGrafo.py | alysonvale/grafos | 9218dd9212c9edbe1a1f5f98e535ca34d4765b5c | [
"MIT"
] | null | null | null | from grafo import Grafo
vertices = ['J', 'C', 'E', 'P', 'M', 'T', 'Z']
arestas = {'a1': 'J-C', 'a2': 'C-E', 'a3': 'C-E', 'a4': 'C-P', 'a5': 'C-P', 'a6': 'C-M',
'a7': 'C-T', 'a8': 'M-T', 'a9': 'T-Z'}
paraiba = Grafo(vertices, arestas)
grafo = Grafo(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K'],
... | 30.787879 | 88 | 0.454724 | from grafo import Grafo
vertices = ['J', 'C', 'E', 'P', 'M', 'T', 'Z']
arestas = {'a1': 'J-C', 'a2': 'C-E', 'a3': 'C-E', 'a4': 'C-P', 'a5': 'C-P', 'a6': 'C-M',
'a7': 'C-T', 'a8': 'M-T', 'a9': 'T-Z'}
paraiba = Grafo(vertices, arestas)
grafo = Grafo(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K'],
... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d663d9ceaf73bb1ccbc812d3c7371a7997a2b5f7 | 993 | py | Python | scrapli_community/scrapli/genericdriver/sync.py | jefvantongerloo/scrapli_community | 4db21ca6b6791eb3ba2bff0c368c1b64585c03c8 | [
"MIT"
] | null | null | null | scrapli_community/scrapli/genericdriver/sync.py | jefvantongerloo/scrapli_community | 4db21ca6b6791eb3ba2bff0c368c1b64585c03c8 | [
"MIT"
] | null | null | null | scrapli_community/scrapli/genericdriver/sync.py | jefvantongerloo/scrapli_community | 4db21ca6b6791eb3ba2bff0c368c1b64585c03c8 | [
"MIT"
] | null | null | null | """scrapli_community.scrapli.genericdriver.sync"""
import time
from scrapli.driver import NetworkDriver
def default_sync_on_open(conn: NetworkDriver) -> None:
"""
scrapli_genericdriver default on_open callable
This is tested with a cisco wlc using auth_bypass so we have to send creds during on open
... | 21.586957 | 93 | 0.682779 | """scrapli_community.scrapli.genericdriver.sync"""
import time
from scrapli.driver import NetworkDriver
def default_sync_on_open(conn: NetworkDriver) -> None:
"""
scrapli_genericdriver default on_open callable
This is tested with a cisco wlc using auth_bypass so we have to send creds during on open
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dc58cb7dddd083772e55dc54ced49efc992737a1 | 26 | py | Python | simulator/instructions/__init__.py | adimaini/comp_arch_computer | 2de48f0fc7657f43753ded364712b464ab7db783 | [
"MIT"
] | null | null | null | simulator/instructions/__init__.py | adimaini/comp_arch_computer | 2de48f0fc7657f43753ded364712b464ab7db783 | [
"MIT"
] | null | null | null | simulator/instructions/__init__.py | adimaini/comp_arch_computer | 2de48f0fc7657f43753ded364712b464ab7db783 | [
"MIT"
] | null | null | null | __all__ = ['instructions'] | 26 | 26 | 0.730769 | __all__ = ['instructions'] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
954f13ab90d0e9f718b28858511efd30eb792655 | 167 | py | Python | src/metricFormat.py | private-octopus/diana | af8ffaac4a8fad26bf78104e5238e358a5ad8b21 | [
"MIT"
] | 3 | 2018-02-15T20:00:44.000Z | 2020-07-16T06:08:20.000Z | src/metricFormat.py | private-octopus/diana | af8ffaac4a8fad26bf78104e5238e358a5ad8b21 | [
"MIT"
] | 111 | 2017-11-04T23:13:38.000Z | 2021-05-20T00:12:28.000Z | src/metricFormat.py | private-octopus/dianal | af8ffaac4a8fad26bf78104e5238e358a5ad8b21 | [
"MIT"
] | 5 | 2018-06-21T08:18:26.000Z | 2021-10-11T02:02:54.000Z | #!/usr/bin/python
# coding=utf-8
#
# This scripts reformats old metric files by adding a version number and a date
| 16.7 | 79 | 0.748503 | #!/usr/bin/python
# coding=utf-8
#
# This scripts reformats old metric files by adding a version number and a date
def get_date_from_file_name(file_name):
pass
| 0 | 0 | 0 | 0 | 0 | 27 | 0 | 0 | 23 |
d9f583180016ce436efe3c3a2d4e30da13e90c9c | 1,072 | py | Python | bench/plot_bench.py | nagataaaas/fast-ulid | e98ba28be25e3403c7ce9535c8a3dcfb311f4fd8 | [
"MIT"
] | 1 | 2022-03-20T08:56:27.000Z | 2022-03-20T08:56:27.000Z | bench/plot_bench.py | nagataaaas/fast-ulid | e98ba28be25e3403c7ce9535c8a3dcfb311f4fd8 | [
"MIT"
] | null | null | null | bench/plot_bench.py | nagataaaas/fast-ulid | e98ba28be25e3403c7ce9535c8a3dcfb311f4fd8 | [
"MIT"
] | null | null | null | import os
bench_result = f'{os.path.dirname(__file__)}/bench_result.txt'
if __name__ == '__main__':
load_df()
| 28.972973 | 82 | 0.597015 | import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
import os
bench_result = f'{os.path.dirname(__file__)}/bench_result.txt'
def load_df():
with open(bench_result, 'r') as f:
lines = f.read()
results = lines.split('\n\n')
print(results)
result_list = []
i = 0
fo... | 0 | 0 | 0 | 0 | 0 | 857 | 0 | 8 | 89 |
27c641c54fd32bb28f2e08abcb6a66ca639fc138 | 692 | py | Python | setup.py | elkebir-group/Jumper | f786902f165e516ae02ad10e01cf9fbf43f1d72f | [
"MIT"
] | null | null | null | setup.py | elkebir-group/Jumper | f786902f165e516ae02ad10e01cf9fbf43f1d72f | [
"MIT"
] | null | null | null | setup.py | elkebir-group/Jumper | f786902f165e516ae02ad10e01cf9fbf43f1d72f | [
"MIT"
] | 1 | 2020-11-08T03:08:56.000Z | 2020-11-08T03:08:56.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools
with open('README.md') as f:
long_description = f.read()
setuptools.setup(
name='jumper',
packages=["jumper"],
description="Discontinuous transcript assembly for coronaviruses",
long_description=long_description,
long_description... | 23.862069 | 70 | 0.647399 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools
with open('README.md') as f:
long_description = f.read()
setuptools.setup(
name='jumper',
packages=["jumper"],
description="Discontinuous transcript assembly for coronaviruses",
long_description=long_description,
long_description... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0a02b80a1c06f2664e216935f554e261932b1c27 | 41,904 | py | Python | python/mxnet/metric.py | cjmcv/mini-mxnet | 11423d0f62e93286c06b1a2062bd4511bad9aff7 | [
"Apache-2.0"
] | 2 | 2018-05-08T12:52:28.000Z | 2018-07-22T05:51:37.000Z | python/mxnet/metric.py | UNIXCODERS/incubator-mxnet | 5c5a904209900e21b20ca206b043ea7a8252ebfc | [
"Apache-2.0"
] | null | null | null | python/mxnet/metric.py | UNIXCODERS/incubator-mxnet | 5c5a904209900e21b20ca206b043ea7a8252ebfc | [
"Apache-2.0"
] | null | null | null | # 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... | 33.099526 | 100 | 0.597031 | # 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... | 0 | 31,799 | 0 | 5,161 | 0 | 354 | 0 | 19 | 526 |
a8f11f345f97765d5119e8bd53626668f1a58cc1 | 424 | py | Python | Crypto-baigeiRSA/ans/get.py | scnu-sloth/hsctf-2021-freshmen | 251d3e9d13e0d430eb5b76775acde519648b401f | [
"MIT"
] | null | null | null | Crypto-baigeiRSA/ans/get.py | scnu-sloth/hsctf-2021-freshmen | 251d3e9d13e0d430eb5b76775acde519648b401f | [
"MIT"
] | null | null | null | Crypto-baigeiRSA/ans/get.py | scnu-sloth/hsctf-2021-freshmen | 251d3e9d13e0d430eb5b76775acde519648b401f | [
"MIT"
] | 1 | 2021-11-26T14:35:18.000Z | 2021-11-26T14:35:18.000Z | from gmpy2 import invert
import libnum
e = 65537
n = 88503001447845031603457048661635807319447136634748350130947825183012205093541
c = 40876621398366534035989065383910105526025410999058860023908252093679681817257
# from yafu
p = 274539690398523616505159415195049044439
q = 322368694010594584041053487661458382819
asser... | 23.555556 | 81 | 0.808962 | from gmpy2 import invert
import libnum
e = 65537
n = 88503001447845031603457048661635807319447136634748350130947825183012205093541
c = 40876621398366534035989065383910105526025410999058860023908252093679681817257
# from yafu
p = 274539690398523616505159415195049044439
q = 322368694010594584041053487661458382819
asser... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dde563d0172154dc3ad26a963e6ac291aaf30072 | 2,525 | py | Python | yearn/prices/incidents.py | pmdaly/yearn-exporter | d1e7697f8bf12cdb1126ea86fa350a26aea23cf8 | [
"MIT"
] | 1 | 2022-03-29T01:04:27.000Z | 2022-03-29T01:04:27.000Z | yearn/prices/incidents.py | pmdaly/yearn-exporter | d1e7697f8bf12cdb1126ea86fa350a26aea23cf8 | [
"MIT"
] | null | null | null | yearn/prices/incidents.py | pmdaly/yearn-exporter | d1e7697f8bf12cdb1126ea86fa350a26aea23cf8 | [
"MIT"
] | 1 | 2022-03-24T20:54:50.000Z | 2022-03-24T20:54:50.000Z | from collections import defaultdict
from brownie import chain
from yearn.networks import Network
INCIDENTS = defaultdict(list)
INCIDENTS.update({
Network.Mainnet: {
# yUSDC getPricePerFullShare reverts from block 10532764 to block 10532775 because all liquidity was removed for testing
"0x597aD1e... | 50.5 | 128 | 0.678416 | from collections import defaultdict
from brownie import chain
from yearn.networks import Network
INCIDENTS = defaultdict(list)
INCIDENTS.update({
Network.Mainnet: {
# yUSDC getPricePerFullShare reverts from block 10532764 to block 10532775 because all liquidity was removed for testing
"0x597aD1e... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7310bee52f94a49ff9cac195ae344da073399a9f | 6,398 | py | Python | generated/python/googleapis-common-protos/google/api/system_parameter_pb2.py | software-dov/api-client-staging | bbd2a32529bba73e26ac430b745360b4a8af0c53 | [
"BSD-3-Clause"
] | 18 | 2016-12-08T20:47:57.000Z | 2022-01-29T19:36:04.000Z | generated/python/googleapis-common-protos/google/api/system_parameter_pb2.py | software-dov/api-client-staging | bbd2a32529bba73e26ac430b745360b4a8af0c53 | [
"BSD-3-Clause"
] | 252 | 2016-09-21T20:51:36.000Z | 2021-03-25T23:02:36.000Z | generated/python/googleapis-common-protos/google/api/system_parameter_pb2.py | software-dov/api-client-staging | bbd2a32529bba73e26ac430b745360b4a8af0c53 | [
"BSD-3-Clause"
] | 37 | 2016-09-19T21:13:16.000Z | 2022-01-29T19:36:07.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/system_parameter.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from... | 36.982659 | 611 | 0.760081 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/system_parameter.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8a3e28d402555880ee081f9e00c187ef91fd4f34 | 13,878 | py | Python | src/pymetanode/scripts/pymetanode/core.py | PerBlue/maya-pymetanode | d678d4082ac0d8bbc168ad4e44b5f7499eecc447 | [
"MIT"
] | null | null | null | src/pymetanode/scripts/pymetanode/core.py | PerBlue/maya-pymetanode | d678d4082ac0d8bbc168ad4e44b5f7499eecc447 | [
"MIT"
] | null | null | null | src/pymetanode/scripts/pymetanode/core.py | PerBlue/maya-pymetanode | d678d4082ac0d8bbc168ad4e44b5f7499eecc447 | [
"MIT"
] | null | null | null |
import ast
import re
import pymel.core as pm
import maya.cmds as cmds
import maya.OpenMaya as api
import utils
__all__ = [
'decodeMetaData',
'decodeMetaDataValue',
'encodeMetaData',
'encodeMetaDataValue',
'findMetaNodes',
'getMetaClasses',
'getMetaData',
'hasMetaClass',
'isMetaN... | 29.216842 | 80 | 0.642384 |
import ast
import re
import pymel.core as pm
import maya.cmds as cmds
import maya.OpenMaya as api
import utils
__all__ = [
'decodeMetaData',
'decodeMetaDataValue',
'encodeMetaData',
'encodeMetaDataValue',
'findMetaNodes',
'getMetaClasses',
'getMetaData',
'hasMetaClass',
'isMetaN... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f90b0cbac08b825cd5279de3523fac9dca390136 | 1,035 | py | Python | main.py | hackstock/faceoff | bde559707f22a1d3e143dd59b354406def6bbb33 | [
"MIT"
] | 2 | 2020-04-15T20:05:07.000Z | 2020-06-02T04:40:23.000Z | main.py | hackstock/faceoff | bde559707f22a1d3e143dd59b354406def6bbb33 | [
"MIT"
] | null | null | null | main.py | hackstock/faceoff | bde559707f22a1d3e143dd59b354406def6bbb33 | [
"MIT"
] | null | null | null | import argparse
import os
from model import build_face_encoder
from recognizer import FaceRecognizer
if __name__ == "__main__":
parser = argparse.ArgumentParser(description = "")
parser.add_argument("--weights", dest="weights", required=True, help="path to pre-train vgg-face weights file")
parser.add_arg... | 36.964286 | 128 | 0.745894 | import argparse
import os
from model import build_face_encoder
from recognizer import FaceRecognizer
if __name__ == "__main__":
parser = argparse.ArgumentParser(description = "")
parser.add_argument("--weights", dest="weights", required=True, help="path to pre-train vgg-face weights file")
parser.add_arg... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |