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
c99df33ef3173736e323be22afd14fcd3e379231
5,762
py
Python
fragresp/scripts/run_check.py
wutobias/fragresp
57ecd73b9f056812752ce6f00b6456b532311c76
[ "MIT" ]
1
2020-07-22T13:55:20.000Z
2020-07-22T13:55:20.000Z
fragresp/scripts/run_check.py
wutobias/fragresp
57ecd73b9f056812752ce6f00b6456b532311c76
[ "MIT" ]
null
null
null
fragresp/scripts/run_check.py
wutobias/fragresp
57ecd73b9f056812752ce6f00b6456b532311c76
[ "MIT" ]
null
null
null
import matplotlib as mpl mpl.use('Agg')
30.812834
73
0.566644
import os import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import numpy as np import pickle from collections import OrderedDict from fragresp.gaussian_tools import check_opt as _check_opt from fragresp.gaussian_tools import check_esp as _check_esp from fragresp.gaussian_tools import get_energy a...
0
0
0
0
0
5,312
0
142
268
fdead8cdb2770e15490a8872b628ae1a8cf86c76
2,057
py
Python
examples/market.py
paulorauber/pgm
6d5af508b0fa48e475b8a54c7dce8e1515f6a50e
[ "MIT" ]
19
2015-04-28T18:23:18.000Z
2022-01-27T10:20:44.000Z
examples/market.py
paulorauber/pgm
6d5af508b0fa48e475b8a54c7dce8e1515f6a50e
[ "MIT" ]
1
2020-10-16T04:24:26.000Z
2020-10-16T04:24:26.000Z
examples/market.py
paulorauber/pgm
6d5af508b0fa48e475b8a54c7dce8e1515f6a50e
[ "MIT" ]
11
2017-08-01T17:11:05.000Z
2021-11-26T14:48:40.000Z
if __name__ == '__main__': main()
26.371795
60
0.562956
from model.factor import RandomVar from model.factor import CPD from model.factor import Factor from model.influence import InfluenceDiagram from inference.exact import ExpectedUtility def three_variables(): M = RandomVar('Market', 3) F = RandomVar('Found', 2) uMF = Factor([M, F], [0, -7, 0, 5, 0, 20]) ...
0
0
0
0
0
1,761
0
75
179
578135e235807cfcab22851a2858d9e073215126
6,116
py
Python
zanichelli_parola_del_giorno/zanichelli_parola_del_giorno.py
cipz/InstagramBots
c9e391633684ae17aa8c6edf5b8d854e27b89bcc
[ "MIT" ]
3
2020-10-28T09:51:14.000Z
2020-10-29T08:22:50.000Z
zanichelli_parola_del_giorno/zanichelli_parola_del_giorno.py
cipz/InstagramBots
c9e391633684ae17aa8c6edf5b8d854e27b89bcc
[ "MIT" ]
null
null
null
zanichelli_parola_del_giorno/zanichelli_parola_del_giorno.py
cipz/InstagramBots
c9e391633684ae17aa8c6edf5b8d854e27b89bcc
[ "MIT" ]
null
null
null
#!/usr/bin/python # Importing custom files import sys sys.path.insert(1, '../') if __name__ == "__main__": if "--debug" in sys.argv[1:]: debug=True elif "-d" in sys.argv[1:]: debug=True else: debug=False main(debug) print("\nDONE")
33.059459
244
0.631295
#!/usr/bin/python # Importing custom files import sys sys.path.insert(1, '../') import utils import instagram from datetime import date from PIL import Image, ImageDraw from bs4 import BeautifulSoup import urllib.request import requests import time import wget import json import os def main(debug): ## -- #...
2
0
0
0
0
5,604
0
-39
270
78dcceb9d60795c264aadbff9ec8b0ea045d40a1
2,850
py
Python
fusion/experiment/pe_array.py
SheaCai/optimus
e9a9a2354376c786d7e6c64e34dee2c2010e5585
[ "MIT" ]
3
2021-05-05T06:55:38.000Z
2022-02-19T06:19:59.000Z
fusion/experiment/pe_array.py
SheaCai/optimus
e9a9a2354376c786d7e6c64e34dee2c2010e5585
[ "MIT" ]
null
null
null
fusion/experiment/pe_array.py
SheaCai/optimus
e9a9a2354376c786d7e6c64e34dee2c2010e5585
[ "MIT" ]
null
null
null
import sys import os sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('../')) sys.path.append(os.path.abspath('../../')) import matplotlib.pyplot as plt import numpy as np from fusion.scheduling import batch_size from fusion.scheduling import Resource from fusion.scheduling import LoopLowerBound ...
32.022472
110
0.631579
import sys import os sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('../')) sys.path.append(os.path.abspath('../../')) import matplotlib.pyplot as plt import numpy as np from fusion.scheduling import batch_size from fusion.scheduling import Resource from fusion.scheduling import LoopLowerBound ...
0
0
0
0
0
0
0
0
0
907aad0046071a3624c9516fbf2c4978313c69da
202
py
Python
MyPython/test.py
LairdStreak/MyPyPlayGround
e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc
[ "MIT" ]
null
null
null
MyPython/test.py
LairdStreak/MyPyPlayGround
e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc
[ "MIT" ]
null
null
null
MyPython/test.py
LairdStreak/MyPyPlayGround
e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc
[ "MIT" ]
null
null
null
"""This module does blah blah.""" import httplib2 resp, content = httplib2.Http().request("http://myip.dk") #start = content.find("ipv4address") #end = start + 100 print (content) #[start:end].strip())
28.857143
57
0.688119
"""This module does blah blah.""" import httplib2 resp, content = httplib2.Http().request("http://myip.dk") #start = content.find("ipv4address") #end = start + 100 print (content) #[start:end].strip())
0
0
0
0
0
0
0
0
0
71902b1fce8341e9f2e83921f553231c3a499893
1,708
py
Python
dict_tiny/util.py
louieh/dict-tiny
afa3eb9c5e5e00a103799e2b76c16819736d756e
[ "MIT" ]
8
2018-06-28T09:17:18.000Z
2022-01-12T03:22:05.000Z
dict_tiny/util.py
louieh/dict-tiny
afa3eb9c5e5e00a103799e2b76c16819736d756e
[ "MIT" ]
1
2021-12-17T17:06:11.000Z
2021-12-17T17:06:11.000Z
dict_tiny/util.py
louieh/dict-tiny
afa3eb9c5e5e00a103799e2b76c16819736d756e
[ "MIT" ]
null
null
null
from collections import defaultdict from lxml import html import requests from plumbum import colors from dict_tiny.setting import TIME_OUT def is_alphabet(word): """ return the word is English or Chinese :param word: :return: """ is_alphabet = defaultdict(int) word = word.replace(' ', '')...
26.6875
71
0.595433
from collections import defaultdict from lxml import html import requests from plumbum import colors from dict_tiny.setting import TIME_OUT def is_alphabet(word): """ return the word is English or Chinese :param word: :return: """ is_alphabet = defaultdict(int) word = word.replace(' ', '')...
0
0
0
0
0
0
0
0
0
e16f51347983756b0b65cbcd4ff05bed86cadb4a
341
py
Python
recipe/run_test.py
conda-forge/cmlgenerator-feedstock
ad4662b2bcc6a7c1de69ed365e14cf4f34773b00
[ "BSD-3-Clause" ]
null
null
null
recipe/run_test.py
conda-forge/cmlgenerator-feedstock
ad4662b2bcc6a7c1de69ed365e14cf4f34773b00
[ "BSD-3-Clause" ]
null
null
null
recipe/run_test.py
conda-forge/cmlgenerator-feedstock
ad4662b2bcc6a7c1de69ed365e14cf4f34773b00
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """ Created on Thr Apr 8 18:00:00 2021 :Authors: Mark Driver <mdd31> Mark J. Williamson <mjw99> """ import logging from cmlgenerator.test.cmlgeneratortests import run_tests logging.basicConfig() LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.WARN) if __name__ == "__main...
17.05
57
0.730205
#!/usr/bin/env python3 """ Created on Thr Apr 8 18:00:00 2021 :Authors: Mark Driver <mdd31> Mark J. Williamson <mjw99> """ import logging from cmlgenerator.test.cmlgeneratortests import run_tests logging.basicConfig() LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.WARN) if __name__ == "__main...
0
0
0
0
0
0
0
0
0
15e5add04b2bb411cd8af5ed528e6fddb6ed8c75
8,045
py
Python
05 Heap/canonical_heap.py
XuuRee/python-data-structures
a3972f5781d666d15d61c0d474877880d1b7c483
[ "MIT" ]
null
null
null
05 Heap/canonical_heap.py
XuuRee/python-data-structures
a3972f5781d666d15d61c0d474877880d1b7c483
[ "MIT" ]
null
null
null
05 Heap/canonical_heap.py
XuuRee/python-data-structures
a3972f5781d666d15d61c0d474877880d1b7c483
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # IB002 Domaci uloha 6. # # V nasledujicim textu pouzivame pojem "halda" ve vyznamu "binarni halda". # # Minimova halda je v kanonickem tvaru, pokud pro kazdy jeji prvek se dvema # potomky plati, ze jeho levy potomek je mensi nez ten pravy nebo se oba # rovnaji. # # Je v kanonickem tvaru | Neni...
30.589354
79
0.592915
#!/usr/bin/env python3 # IB002 Domaci uloha 6. # # V nasledujicim textu pouzivame pojem "halda" ve vyznamu "binarni halda". # # Minimova halda je v kanonickem tvaru, pokud pro kazdy jeji prvek se dvema # potomky plati, ze jeho levy potomek je mensi nez ten pravy nebo se oba # rovnaji. # # Je v kanonickem tvaru | Neni...
0
0
0
63
0
1,083
0
0
115
0723c0fb5653e3940416fc37c1548f5e66e2068a
1,201
py
Python
data_helpers/decode_index_files.py
ArvinZhuang/COIL
5cb492f2dcffe594d2be0ae4d4d557056051ffca
[ "Apache-2.0" ]
null
null
null
data_helpers/decode_index_files.py
ArvinZhuang/COIL
5cb492f2dcffe594d2be0ae4d4d557056051ffca
[ "Apache-2.0" ]
null
null
null
data_helpers/decode_index_files.py
ArvinZhuang/COIL
5cb492f2dcffe594d2be0ae4d4d557056051ffca
[ "Apache-2.0" ]
null
null
null
import os, glob import json from transformers import BertTokenizer from tqdm import tqdm from argparse import ArgumentParser if __name__ == "__main__": parser = ArgumentParser() parser.add_argument('--file_path', type=str, required=True) parser.add_argument('--output_path', type=str, required=True) ...
34.314286
103
0.625312
import os, glob import json from transformers import BertTokenizer from tqdm import tqdm from argparse import ArgumentParser if __name__ == "__main__": parser = ArgumentParser() parser.add_argument('--file_path', type=str, required=True) parser.add_argument('--output_path', type=str, required=True) ...
0
0
0
0
0
0
0
0
0
b7c8b8db359b5c382b1b5f6804afa09f814e349b
329
py
Python
chapter/urls.py
0lidaxiang/WeArt
088bc2cdc7c653d4e4a84dea8f70cc86e12a8db9
[ "BSD-3-Clause" ]
1
2017-07-12T14:53:45.000Z
2017-07-12T14:53:45.000Z
chapter/urls.py
0lidaxiang/WeArt
088bc2cdc7c653d4e4a84dea8f70cc86e12a8db9
[ "BSD-3-Clause" ]
null
null
null
chapter/urls.py
0lidaxiang/WeArt
088bc2cdc7c653d4e4a84dea8f70cc86e12a8db9
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import url urlpatterns = [ # url('^login/$', login), url('^createAChapter/$', createAChapter), url('^getChapter/$', getChapter), url('^bookChapter/$', bookChapter), ]
27.416667
45
0.699088
from django.conf.urls import include, url from django.contrib import admin from chapter.view.createChapter import * from chapter.view.getChapter import * urlpatterns = [ # url('^login/$', login), url('^createAChapter/$', createAChapter), url('^getChapter/$', getChapter), url('^bookChapter/$', bookCha...
0
0
0
0
0
0
0
57
66
d148ed2e786ff5cc4c8278daf1b9318f71b5f6e0
15,641
py
Python
yggdrasil/config.py
astro-friedel/yggdrasil
5ecbfd083240965c20c502b4795b6dc93d94b020
[ "BSD-3-Clause" ]
null
null
null
yggdrasil/config.py
astro-friedel/yggdrasil
5ecbfd083240965c20c502b4795b6dc93d94b020
[ "BSD-3-Clause" ]
null
null
null
yggdrasil/config.py
astro-friedel/yggdrasil
5ecbfd083240965c20c502b4795b6dc93d94b020
[ "BSD-3-Clause" ]
null
null
null
""" This module imports the configuration for yggdrasil. .. todo:: Remove reference to environment variables for accessing config options. """ import os import sys import shutil import logging import warnings import subprocess from yggdrasil import platform, tools conda_prefix = os.environ.get('CONDA_PREFIX', '') ...
36.802353
84
0.592353
""" This module imports the configuration for yggdrasil. .. todo:: Remove reference to environment variables for accessing config options. """ import os import sys import json import shutil import logging import warnings import subprocess from yggdrasil.backwards import configparser from yggdrasil import platform,...
0
807
0
3,362
0
0
0
13
67
169cbc55b107d627e16e8d100c9590e216f3c200
253
py
Python
226-invert-binary-tree/solution.py
phenix3443/leetcode
b6d8486e859b2db0bf3d58f55a6e1d439b0b891a
[ "MIT" ]
null
null
null
226-invert-binary-tree/solution.py
phenix3443/leetcode
b6d8486e859b2db0bf3d58f55a6e1d439b0b891a
[ "MIT" ]
null
null
null
226-invert-binary-tree/solution.py
phenix3443/leetcode
b6d8486e859b2db0bf3d58f55a6e1d439b0b891a
[ "MIT" ]
null
null
null
# -*- coding:utf-8; -*-
15.8125
87
0.541502
# -*- coding:utf-8; -*- class Solution: """ 解题思路:递归 """ def invertTree(self, root): if not root: return root.left, root.right = self.invertTree(root.right), self.invertTree(root.left) return root
21
0
0
198
0
0
0
0
23
d907e264b8481d24b1f44bc322e576f547d94156
35,143
py
Python
domonit/inspect.py
riley022/DoMonit
4ba0e9b145db03db579e38a126929c29f6f64e6c
[ "MIT" ]
null
null
null
domonit/inspect.py
riley022/DoMonit
4ba0e9b145db03db579e38a126929c29f6f64e6c
[ "MIT" ]
1
2018-05-22T09:50:35.000Z
2018-05-22T09:50:35.000Z
domonit/inspect.py
riley022/DoMonit
4ba0e9b145db03db579e38a126929c29f6f64e6c
[ "MIT" ]
null
null
null
from utils.utils import Utils u = Utils() #https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/
30.29569
95
0.561477
import requests_unixsocket import json from errors import NoSuchContainerError, ServerErrorError from utils.utils import Utils u = Utils() #https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/ class Inspect(): def __init__(self, container_id): self.container_id = container_id ...
0
0
0
34,908
0
0
0
31
88
cb142d0c8442e3a75243e7defedf02e5725aacae
518
py
Python
iniciante/python/1099-soma-de-impares-consecutivos-ii.py
tfn10/beecrowd
1ebf19ca9a253eb326160f03145d20be33064969
[ "MIT" ]
null
null
null
iniciante/python/1099-soma-de-impares-consecutivos-ii.py
tfn10/beecrowd
1ebf19ca9a253eb326160f03145d20be33064969
[ "MIT" ]
null
null
null
iniciante/python/1099-soma-de-impares-consecutivos-ii.py
tfn10/beecrowd
1ebf19ca9a253eb326160f03145d20be33064969
[ "MIT" ]
null
null
null
quant_de_testes = int(input()) soma_de_impares_consecutivos(quant_de_testes)
22.521739
55
0.552124
def entrada(): numeros = list(map(int, input().split(' '))) n1 = numeros[0] n2 = numeros[1] return n1, n2 def soma_de_impares_consecutivos(quantidade_de_testes): while quantidade_de_testes > 0: x, y = entrada() if x > y: x, y = y, x soma = 0 for i in ran...
0
0
0
0
0
393
0
0
45
500f0fc8f62478583876b9768e5dd75780ba3038
2,856
py
Python
components/bigquery/query/src/query.py
xieqihui/pipelines
a39ae8eb779e69e4e85e424abba8ecac3f60435f
[ "Apache-2.0" ]
9
2019-03-28T02:20:45.000Z
2021-12-01T22:43:36.000Z
components/bigquery/query/src/query.py
xieqihui/pipelines
a39ae8eb779e69e4e85e424abba8ecac3f60435f
[ "Apache-2.0" ]
21
2020-01-28T22:48:55.000Z
2022-03-08T22:48:12.000Z
components/bigquery/query/src/query.py
xieqihui/pipelines
a39ae8eb779e69e4e85e424abba8ecac3f60435f
[ "Apache-2.0" ]
4
2019-04-11T12:09:59.000Z
2020-10-11T15:53:53.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
28
81
0.708333
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
0
0
1,299
0
-5
136
c54d1d9204fda34b28ecde787fd15c640bd4234a
3,885
py
Python
gs_pip_install/gs_pip_install.py
cseHdz/gs_pip_install
743e572bf53d01ddbce35d93f740c224d08a494c
[ "MIT" ]
null
null
null
gs_pip_install/gs_pip_install.py
cseHdz/gs_pip_install
743e572bf53d01ddbce35d93f740c224d08a494c
[ "MIT" ]
null
null
null
gs_pip_install/gs_pip_install.py
cseHdz/gs_pip_install
743e572bf53d01ddbce35d93f740c224d08a494c
[ "MIT" ]
null
null
null
import os import subprocess import sys import logging from typing import Optional, List from google.cloud import storage def install_packages(packages_download_dir: str, target_dir: Optional[str] = None): """Install packages found in local directory. Do not install dependencies if target directory is specifi...
31.08
85
0.615444
import os import subprocess import sys import shutil import logging from typing import Optional, List import click from google.cloud import storage @click.command() @click.option('-b', "--bucket_name", help="(str) Name of GCS bucket") @click.option( '-r', "--requirement", help="(str) Name of Python packa...
0
1,368
0
0
0
0
0
-17
68
3c6c46496a0c4eb7347942566a531f86dc598146
118
py
Python
scripts/generate_secret_key.py
dimadk24/english-fight-api
506a3eb2cb4cb91203b1e023b5248c27975df075
[ "MIT" ]
2
2015-10-04T09:00:19.000Z
2019-06-07T18:59:41.000Z
tools/django_new_secretkey.py
VlasovVitaly/internal
3cb382ddd34f89ff10bb31537658114722084468
[ "MIT" ]
null
null
null
tools/django_new_secretkey.py
VlasovVitaly/internal
3cb382ddd34f89ff10bb31537658114722084468
[ "MIT" ]
null
null
null
#!/usr/bin/env python from django.core.management.utils import get_random_secret_key print(get_random_secret_key())
19.666667
62
0.822034
#!/usr/bin/env python from django.core.management.utils import get_random_secret_key print(get_random_secret_key())
0
0
0
0
0
0
0
0
0
56403e9193d1094b1cd5383247457c75f4873f69
230
py
Python
commonuicomponents/ttk/containers/labeledwidget/labeledcontainer.py
RobinBobin/python3-common-ui-components
281936a3bf6f1a366eeaaf8f177c0fae9ef24389
[ "MIT" ]
2
2020-08-04T16:30:13.000Z
2020-10-28T14:23:33.000Z
commonuicomponents/ttk/containers/labeledwidget/labeledcontainer.py
RobinBobin/python3-common-ui-components
281936a3bf6f1a366eeaaf8f177c0fae9ef24389
[ "MIT" ]
null
null
null
commonuicomponents/ttk/containers/labeledwidget/labeledcontainer.py
RobinBobin/python3-common-ui-components
281936a3bf6f1a366eeaaf8f177c0fae9ef24389
[ "MIT" ]
null
null
null
from .. import LabeledContainer
25.555556
54
0.769565
from .basecontainer import inflateChildren from .. import LabeledContainer class LabeledWidgetLabeledContainer(LabeledContainer): def _inflateChildren(self): inflateChildren(self) super()._inflateChildren()
0
0
0
132
0
0
0
21
45
d204be1e4997608731daf912c09b1dfd1b309e6e
1,665
py
Python
python/ldtui/__init__.py
ezequielmastrasso/EZLookdevTools
4914d8f92b1ff195aeb4b15b277035c61a235ae1
[ "MIT" ]
45
2019-07-12T16:03:20.000Z
2022-03-04T06:03:48.000Z
python/ldtui/__init__.py
ezequielmastrasso/EZLookdevTools
4914d8f92b1ff195aeb4b15b277035c61a235ae1
[ "MIT" ]
115
2019-05-22T09:10:38.000Z
2020-03-25T11:01:35.000Z
python/ldtui/__init__.py
ezequielmastrasso/EZLookdevTools
4914d8f92b1ff195aeb4b15b277035c61a235ae1
[ "MIT" ]
8
2019-12-03T07:19:37.000Z
2021-12-13T10:31:15.000Z
""" .. module:: ldtui :synopsis: Main tools UI. .. moduleauthor:: Ezequiel Mastrasso """ import logging logger = logging.getLogger(__name__)
29.210526
75
0.671471
""" .. module:: ldtui :synopsis: Main tools UI. .. moduleauthor:: Ezequiel Mastrasso """ from Qt import QtGui, QtWidgets, QtCore from Qt.QtWidgets import QApplication, QWidget, QLabel, QMainWindow import sys import imp import os import logging from functools import partial from ldtui import qtutils import ldt ...
0
0
0
1,284
0
0
0
31
202
f4c3f100fa81a8416efb0fabbb2f62c7fe084acb
5,754
py
Python
solutions/poker/poker_test.py
mesmacosta/python-ciandt-intership
65a8941997eee5d683e56de55d33423b2566b7d0
[ "MIT" ]
1
2020-08-31T23:06:43.000Z
2020-08-31T23:06:43.000Z
solutions/poker/poker_test.py
mesmacosta/python-ciandt-intership
65a8941997eee5d683e56de55d33423b2566b7d0
[ "MIT" ]
null
null
null
solutions/poker/poker_test.py
mesmacosta/python-ciandt-intership
65a8941997eee5d683e56de55d33423b2566b7d0
[ "MIT" ]
null
null
null
import unittest if __name__ == "__main__": unittest.main()
33.453488
110
0.521724
import unittest from poker import best_hands class PokerTest(unittest.TestCase): def test_single_hand_always_wins(self): self.assertEqual(best_hands(["4♠ 5♠ 7♥ 8♦ J♣"]), ["4♠ 5♠ 7♥ 8♦ J♣"]) def test_highest_card_out_of_all_hands_wins(self): self.assertEqual( best_hands(["4♦ 5♠ 6♠ ...
1,305
0
0
5,201
0
0
0
7
46
c97ebed6e5aaf12aba02f2562b55b162f1f5033c
10,230
py
Python
optimum/utils/runs.py
huggingface/optimum
65bb7fa4f635c6d2e6734485f1b8be58cb690fd0
[ "Apache-2.0" ]
414
2021-09-14T11:39:36.000Z
2022-03-31T19:10:45.000Z
optimum/utils/runs.py
huggingface/optimum
65bb7fa4f635c6d2e6734485f1b8be58cb690fd0
[ "Apache-2.0" ]
49
2021-09-14T11:29:52.000Z
2022-03-31T14:02:34.000Z
optimum/utils/runs.py
huggingface/optimum
65bb7fa4f635c6d2e6734485f1b8be58cb690fd0
[ "Apache-2.0" ]
29
2021-09-15T01:51:54.000Z
2022-03-23T08:20:17.000Z
from . import is_pydantic_available if is_pydantic_available(): from pydantic.dataclasses import dataclass else:
38.458647
241
0.672434
from dataclasses import field from enum import Enum from typing import Dict, List, Optional, Union from . import is_pydantic_available from .doc import generate_doc_dataclass if is_pydantic_available(): from pydantic.dataclasses import dataclass else: from dataclasses import dataclass class APIFeaturesMana...
0
9,205
0
344
0
0
0
63
482
43ed48598a6360fbe18f54e747aef536f3e3507a
3,111
py
Python
examples/visualization/roi_erpimage_by_rt.py
andylikescodes/mne-python
79ea57a4318d8d045f5966c26360b079f40a4865
[ "BSD-3-Clause" ]
1
2022-02-19T08:13:49.000Z
2022-02-19T08:13:49.000Z
examples/visualization/roi_erpimage_by_rt.py
LiFeng-SECUC/mne-python
732bb1f994e64e41a8e95dcc10dc98c22cac95c0
[ "BSD-3-Clause" ]
null
null
null
examples/visualization/roi_erpimage_by_rt.py
LiFeng-SECUC/mne-python
732bb1f994e64e41a8e95dcc10dc98c22cac95c0
[ "BSD-3-Clause" ]
null
null
null
""" =========================================================== Plot single trial activity, grouped by ROI and sorted by RT =========================================================== This will produce what is sometimes called an event related potential / field (ERP/ERF) image. The EEGLAB example file, which contains...
35.758621
78
0.630023
""" =========================================================== Plot single trial activity, grouped by ROI and sorted by RT =========================================================== This will produce what is sometimes called an event related potential / field (ERP/ERF) image. The EEGLAB example file, which contains...
0
0
0
0
0
0
0
0
0
0cff792743ec078792babef838eedd3ca579a76c
1,407
py
Python
local_test.py
invenia/GitLabChangelog
00d832e0552f3e6647a0030f3b3e0669d828b766
[ "MIT" ]
null
null
null
local_test.py
invenia/GitLabChangelog
00d832e0552f3e6647a0030f3b3e0669d828b766
[ "MIT" ]
10
2021-01-22T23:15:31.000Z
2022-03-08T10:26:10.000Z
local_test.py
invenia/GitLabChangelog
00d832e0552f3e6647a0030f3b3e0669d828b766
[ "MIT" ]
1
2021-03-17T06:03:23.000Z
2021-03-17T06:03:23.000Z
# This file is intended for local testing when contributing to this repository # Do not commit any changes # You will need to generate a GitLab Personal Access Token to use this from os import environ as env import gitlab from gitlabchangelog.changelog import Changelog env["GITLAB_URL"] = "https://gitlab.invenia.ca" e...
31.977273
92
0.655295
# This file is intended for local testing when contributing to this repository # Do not commit any changes # You will need to generate a GitLab Personal Access Token to use this from os import environ as env import gitlab from gitlabchangelog.changelog import Changelog env["GITLAB_URL"] = "https://gitlab.invenia.ca" e...
0
0
0
0
0
0
0
0
0
fb31d59284b6c9978be82fc5fa54580a4046af2c
2,117
py
Python
tree.py
Crowley-VS/Tree
eec5be3adb00aa8a9f0a4d1131bf36d2121271be
[ "MIT" ]
null
null
null
tree.py
Crowley-VS/Tree
eec5be3adb00aa8a9f0a4d1131bf36d2121271be
[ "MIT" ]
null
null
null
tree.py
Crowley-VS/Tree
eec5be3adb00aa8a9f0a4d1131bf36d2121271be
[ "MIT" ]
null
null
null
if __name__ == '__main__': Tree().main()
44.104167
129
0.552197
import os from pathlib import Path from colorama import Fore, init class Tree: def __init__(self): '''Initialize Tree with rendering chars and colors.''' self.rendering_chars = {'line': '│ ', 'middle': '├───', 'last': '└───', 'space': ' '} self.dir_color = Fore.CYAN self.dir_c...
27
0
0
1,964
0
0
0
1
89
e02d3f9446fae3b0835e7a0a413eec780fc039ae
647
py
Python
setup.py
Lokaltog/axis
f602ef8089ed0332317274e0433f4ede75109533
[ "MIT" ]
null
null
null
setup.py
Lokaltog/axis
f602ef8089ed0332317274e0433f4ede75109533
[ "MIT" ]
null
null
null
setup.py
Lokaltog/axis
f602ef8089ed0332317274e0433f4ede75109533
[ "MIT" ]
null
null
null
"""Setup for Axis.""" from setuptools import setup setup( name="axis", packages=["axis"], version="33", description="A Python library for communicating with devices from Axis Communications", author="Robert Svensson", author_email="Kane610@users.noreply.github.com", license="MIT", url=...
34.052632
91
0.676971
"""Setup for Axis.""" from setuptools import setup setup( name="axis", packages=["axis"], version="33", description="A Python library for communicating with devices from Axis Communications", author="Robert Svensson", author_email="Kane610@users.noreply.github.com", license="MIT", url=...
0
0
0
0
0
0
0
0
0
ce0390b04788ff18fa95b1ea11e3466267edb6f8
3,742
py
Python
Research/squeezenet.py
ALEXKIRNAS/Kaggle-C-CORE-Iceberg-Classifier-Challenge
d8b06969c9393cfce6d9ac96b58c9d365ff4369d
[ "MIT" ]
null
null
null
Research/squeezenet.py
ALEXKIRNAS/Kaggle-C-CORE-Iceberg-Classifier-Challenge
d8b06969c9393cfce6d9ac96b58c9d365ff4369d
[ "MIT" ]
null
null
null
Research/squeezenet.py
ALEXKIRNAS/Kaggle-C-CORE-Iceberg-Classifier-Challenge
d8b06969c9393cfce6d9ac96b58c9d365ff4369d
[ "MIT" ]
null
null
null
from keras.layers import Input, Convolution2D, MaxPooling2D, Activation, Dense, add from keras.layers import GlobalAveragePooling2D from keras.models import Model from keras.regularizers import l2 sq1x1 = "squeeze1x1" exp1x1 = "expand1x1" exp3x3 = "expand3x3" selu = "selu_" # Modular function for Fire Node # Origi...
36.686275
111
0.616782
from keras import backend as K from keras.layers import Input, Convolution2D, MaxPooling2D, Activation, concatenate, Dense, add, GaussianNoise from keras.layers import GlobalAveragePooling2D from keras.models import Model from keras.regularizers import l2 sq1x1 = "squeeze1x1" exp1x1 = "expand1x1" exp3x3 = "expand3x3" ...
0
0
0
0
0
1,089
0
37
44
c1cd1f7d29474ae84a34ff288a63dd82125505f9
178
py
Python
EX017.py
gjaosdij/PythonProject
ae27990efa93462b632f165d13c08c7fd93beb38
[ "MIT" ]
null
null
null
EX017.py
gjaosdij/PythonProject
ae27990efa93462b632f165d13c08c7fd93beb38
[ "MIT" ]
null
null
null
EX017.py
gjaosdij/PythonProject
ae27990efa93462b632f165d13c08c7fd93beb38
[ "MIT" ]
null
null
null
co = float(input('Medida do cateto oposto: ')) ca = float(input('Medida do cateto adjacente:')) hi = ((co**2) + (ca**2)) ** (1/2) print('A hipotenusa mede {:.2f}.'.format(hi))
25.428571
48
0.601124
co = float(input('Medida do cateto oposto: ')) ca = float(input('Medida do cateto adjacente:')) hi = ((co**2) + (ca**2)) ** (1/2) print('A hipotenusa mede {:.2f}.'.format(hi))
0
0
0
0
0
0
0
0
0
59bffbb2c39024844234f6defe4253e770fb15bf
1,892
py
Python
MoTrackSemanticSegmentation/scripts/testMTurk.py
ryerrabelli/MoTrackTherapyMobilePublic
6c554854aec43ab030e1f884b639a2ed72847646
[ "MIT" ]
2
2020-04-18T22:13:47.000Z
2020-04-23T15:08:05.000Z
MoTrackSemanticSegmentation/scripts/testMTurk.py
ryerrabelli/MoTrackTherapyMobilePublic
6c554854aec43ab030e1f884b639a2ed72847646
[ "MIT" ]
null
null
null
MoTrackSemanticSegmentation/scripts/testMTurk.py
ryerrabelli/MoTrackTherapyMobilePublic
6c554854aec43ab030e1f884b639a2ed72847646
[ "MIT" ]
null
null
null
''' import boto3 from boto.mturk.connection import MTurkConnection from boto.mturk.question import HTMLQuestion from boto.mturk.layoutparam import LayoutParameter from boto.mturk.layoutparam import LayoutParameters import json # Create your connection to MTurk mtc = MTurkConnection(aws_access_key_id='AKIAIBPHQKOJQZULH...
34.4
82
0.786998
''' import boto3 from boto.mturk.connection import MTurkConnection from boto.mturk.question import HTMLQuestion from boto.mturk.layoutparam import LayoutParameter from boto.mturk.layoutparam import LayoutParameters import json # Create your connection to MTurk mtc = MTurkConnection(aws_access_key_id='AKIAIBPHQKOJQZULH...
0
0
0
0
0
0
0
0
0
e961b2c04df86d84fc7b10231a7e759b601bdbc9
5,694
py
Python
final_model/space_recognition_original.py
AEyeAlliance/aeye-alliance
cd01f46e7d404558f034dd5e8eb7f251e2f4c7aa
[ "MIT" ]
6
2018-06-08T19:08:58.000Z
2019-09-07T14:15:10.000Z
final_model/space_recognition_original.py
sanglhx/aeye-alliance
ed5052af4a2130ed88604049d338adfd162a3b64
[ "MIT" ]
null
null
null
final_model/space_recognition_original.py
sanglhx/aeye-alliance
ed5052af4a2130ed88604049d338adfd162a3b64
[ "MIT" ]
4
2018-06-22T16:17:11.000Z
2019-09-22T13:28:55.000Z
import torch import torch.nn as nn # import torch.onnx # import onnx # import onnx_caffe2.backend # from onnx import checker, helper import torch.optim as optim import torch.utils.model_zoo as model_zoo # print(make_prediction("test/Prairie.jpg")) # print(make_prediction("test/He_was_happy..png")) # print(make_predi...
31.285714
115
0.537232
import torch import torch.nn as nn # import torch.onnx # import onnx # import onnx_caffe2.backend # from onnx import checker, helper import torch.optim as optim import numpy as np import cv2 from PIL import Image import torch.utils.model_zoo as model_zoo import torch.onnx def export_model(): model = CNN() mod...
0
0
0
1,200
0
3,819
0
-18
180
6528503a87be4a0b325028a625a1f3fc3d7c48e0
998
py
Python
src/MOSIM/abstraction/access/local/local_adapter_client.py
dfki-asr/MMIPython-Core
2f4b51ffde606c45661d9dbd5153576f919bdb8b
[ "MIT" ]
null
null
null
src/MOSIM/abstraction/access/local/local_adapter_client.py
dfki-asr/MMIPython-Core
2f4b51ffde606c45661d9dbd5153576f919bdb8b
[ "MIT" ]
null
null
null
src/MOSIM/abstraction/access/local/local_adapter_client.py
dfki-asr/MMIPython-Core
2f4b51ffde606c45661d9dbd5153576f919bdb8b
[ "MIT" ]
null
null
null
## SPDX-License-Identifier: MIT ## The content of this file has been developed in the context of the MOSIM research project. ## Original author(s): Jannes Lehwald # -*- coding: utf-8 -*- """ """ #from MMIStandard import MMIAdapter
24.341463
92
0.632265
## SPDX-License-Identifier: MIT ## The content of this file has been developed in the context of the MOSIM research project. ## Original author(s): Jannes Lehwald # -*- coding: utf-8 -*- """ """ from MOSIM.mmi.register import MMIAdapter #from MMIStandard import MMIAdapter from MOSIM.abstraction.access.interface.ad...
0
0
0
620
0
0
0
75
69
4d013ccbd7526b2b29195f2123aa1bda69e2eba7
3,028
py
Python
src/cli/cli.py
simondotsh/SidResolver
4435970199fcb9aeeab836393782f9924a4a6872
[ "MIT" ]
null
null
null
src/cli/cli.py
simondotsh/SidResolver
4435970199fcb9aeeab836393782f9924a4a6872
[ "MIT" ]
null
null
null
src/cli/cli.py
simondotsh/SidResolver
4435970199fcb9aeeab836393782f9924a4a6872
[ "MIT" ]
null
null
null
# This does not validate much other than to avoid sending complete # gibberish in the case where a random file with no valid SIDs is given.
30.28
79
0.575297
from argparse import ArgumentParser from getpass import getpass from os.path import isfile, expanduser from sys import exit class Cli: @classmethod def parse_and_validate(cls): parser = cls.__get_parser() args = parser.parse_args() args.sids = cls.__parse_sids(args.sids) if (a...
0
2,637
0
-11
0
0
0
36
217
74ce49e76df3702caf440a65b380e7e8353b2302
12,447
py
Python
tests/test_tree.py
biomadeira/taxonomy-resolver
ce7a264c2b8b552dde6284b4a74821184be8e489
[ "Apache-2.0" ]
null
null
null
tests/test_tree.py
biomadeira/taxonomy-resolver
ce7a264c2b8b552dde6284b4a74821184be8e489
[ "Apache-2.0" ]
null
null
null
tests/test_tree.py
biomadeira/taxonomy-resolver
ce7a264c2b8b552dde6284b4a74821184be8e489
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 """ Taxonomy Resolver :copyright: (c) 2020-2021. :license: Apache 2.0, see LICENSE for more details. """
47.507634
99
0.651884
#!/usr/bin/env python # -*- coding: utf-8 """ Taxonomy Resolver :copyright: (c) 2020-2021. :license: Apache 2.0, see LICENSE for more details. """ import os import pytest from taxonresolver import TaxonResolver from taxonresolver.utils import load_logging @pytest.fixture def context(): return load_logging("IN...
0
686
0
11,429
0
0
0
21
159
53dd6eb163acaeef6aac44598d96fbcbb35fb393
961
py
Python
src/learning/DecisionTreeEntropy.py
alexandrabenamar/Who-Wins
23df54f98286e67aab39e92ac746bccf6916c231
[ "MIT" ]
3
2018-04-10T21:52:57.000Z
2018-08-22T15:41:58.000Z
src/learning/DecisionTreeEntropy.py
alexandrabenamar/Who-Wins
23df54f98286e67aab39e92ac746bccf6916c231
[ "MIT" ]
null
null
null
src/learning/DecisionTreeEntropy.py
alexandrabenamar/Who-Wins
23df54f98286e67aab39e92ac746bccf6916c231
[ "MIT" ]
1
2020-05-18T15:46:23.000Z
2020-05-18T15:46:23.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pyspark.mllib.tree import DecisionTree from functions_MLlib import spark_context, training_set, test_set, write_result, brexit_labeled_data, mode_predict if __name__ == "__main__" : sc = spark_context() numFeatures = 10000 print("Trainin...
31
124
0.671176
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pyspark.mllib.tree import DecisionTree from functions_MLlib import spark_context, training_set, test_set, write_result, brexit_labeled_data, mode_predict if __name__ == "__main__" : sc = spark_context() numFeatures = 10000 print("Trainin...
0
0
0
0
0
0
0
0
0
8a62452bd2c0e39afcbd171cc50d1d0a21550d89
13,646
py
Python
lib/keybow2040/keybow2040.py
bschapendonk/pim551
277b7eddb744ed2733a854bb8e96cd66ec05bd0c
[ "MIT" ]
47
2021-04-28T15:55:29.000Z
2022-03-18T02:04:10.000Z
lib/keybow2040/keybow2040.py
bschapendonk/pim551
277b7eddb744ed2733a854bb8e96cd66ec05bd0c
[ "MIT" ]
12
2021-04-30T19:22:35.000Z
2022-02-09T10:16:57.000Z
lib/keybow2040/keybow2040.py
bschapendonk/pim551
277b7eddb744ed2733a854bb8e96cd66ec05bd0c
[ "MIT" ]
19
2021-04-28T15:43:56.000Z
2022-03-20T20:42:43.000Z
# SPDX-FileCopyrightText: 2021 Sandy Macdonald # # SPDX-License-Identifier: MIT """ `Keybow 2040 CircuitPython library` ==================================================== CircuitPython driver for the Pimoroni Keybow 2040 and Pico RGB Keypad Base. Drop the `lib` contents (`keybow2040.py` file and `keybow_hardware` ...
30.324444
114
0.589843
# SPDX-FileCopyrightText: 2021 Sandy Macdonald # # SPDX-License-Identifier: MIT """ `Keybow 2040 CircuitPython library` ==================================================== CircuitPython driver for the Pimoroni Keybow 2040 and Pico RGB Keypad Base. Drop the `lib` contents (`keybow2040.py` file and `keybow_hardware` ...
0
0
0
11,673
0
672
0
-10
138
e84367d8ec44da8b98fb3bfd77ea2cb55820c6e8
492
py
Python
simp_py_examples/course/SM001_old/t216.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
simp_py_examples/course/SM001_old/t216.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
simp_py_examples/course/SM001_old/t216.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
import urequests from simp_py import lcd, mon while 1: try: response = urequests.get('http://api.coindesk.com/v1/bpi/currentprice.json') if response.reason==b'OK': data= response.json() updated=data['time']['updatedISO'] btc = data['bpi']['USD']['rate_float'] lcd.text(0,140,updated) ...
25.894737
80
0.609756
import urequests from simp_py import lcd, mon while 1: try: response = urequests.get('http://api.coindesk.com/v1/bpi/currentprice.json') if response.reason==b'OK': data= response.json() updated=data['time']['updatedISO'] btc = data['bpi']['USD']['rate_float'] lcd.text(0,140,updated) ...
0
0
0
0
0
0
0
0
0
ac98afe8378bea03f864f4493a06e66e2834e9bb
3,384
py
Python
Chapter 08/Windows/DISTAL/cgi-bin/mapGenerator.py
PacktPublishing/Python-Geospatial-Development-Third-Edition
e1e1f52da8509876e8576e081de9d5f251a21f77
[ "MIT" ]
44
2016-06-14T05:36:10.000Z
2022-01-30T18:29:44.000Z
Chapter 09/Windows/cgi-bin/mapGenerator.py
KonstantinKlepikov/Python-Geospatial-Development-Third-Edition
ca3545dbab75dac63080582538de40d4d1c15dab
[ "MIT" ]
null
null
null
Chapter 09/Windows/cgi-bin/mapGenerator.py
KonstantinKlepikov/Python-Geospatial-Development-Third-Edition
ca3545dbab75dac63080582538de40d4d1c15dab
[ "MIT" ]
48
2016-12-11T08:53:46.000Z
2022-02-10T12:10:34.000Z
# mapGenerator.py import os, sys # NOTE: The following needs to be added to fix a problem with my path and # Python3. Remove to make this work generally. sys.path.insert(0, "/usr/local/lib/python3.3/site-packages") # End of fix.
31.333333
73
0.5724
# mapGenerator.py import os, os.path, sys, tempfile # NOTE: The following needs to be added to fix a problem with my path and # Python3. Remove to make this work generally. sys.path.insert(0, "/usr/local/lib/python3.3/site-packages") # End of fix. import mapnik def generateMap(tableName, minX, minY, maxX, maxY, ...
0
0
0
0
0
3,095
0
11
46
9016f832d87f6b1b4790287aa9974c1686f5ad77
2,151
py
Python
dataset/transforms/builder.py
TencentYoutuResearch/Classification-SemiCLS
ceb5546f8d8ba08e18de3b5d9426e6cda177e55e
[ "Apache-2.0" ]
4
2022-03-23T05:16:15.000Z
2022-03-31T07:33:26.000Z
dataset/transforms/builder.py
TencentYoutuResearch/Classification-SemiCLS
ceb5546f8d8ba08e18de3b5d9426e6cda177e55e
[ "Apache-2.0" ]
2
2022-03-23T08:21:13.000Z
2022-03-30T04:24:53.000Z
dataset/transforms/builder.py
TencentYoutuResearch/Classification-SemiCLS
ceb5546f8d8ba08e18de3b5d9426e6cda177e55e
[ "Apache-2.0" ]
null
null
null
""" The Code is under Tencent Youtu Public Rule builder for transforms transforms from torch or home-made """ from .randaugment import RandAugmentMC from .gaussian_blur import GaussianBlur other_func = {"RandAugmentMC": RandAugmentMC,"GaussianBlur":GaussianBlur}
28.302632
73
0.654579
""" The Code is under Tencent Youtu Public Rule builder for transforms transforms from torch or home-made """ import copy from torchvision import transforms from .randaugment import RandAugmentMC from .gaussian_blur import GaussianBlur other_func = {"RandAugmentMC": RandAugmentMC,"GaussianBlur":GaussianBlur} def ...
0
0
0
1,121
0
644
0
3
115
d003406a8dae70ef44094ac0e756847f1bec276e
1,919
py
Python
startServer.py
MuddSub/labelImg
b77641207329b2be08e4d71306b36efee2ac7e50
[ "MIT" ]
3
2021-01-05T02:51:09.000Z
2022-01-30T00:53:30.000Z
startServer.py
MuddSub/labelImg
b77641207329b2be08e4d71306b36efee2ac7e50
[ "MIT" ]
null
null
null
startServer.py
MuddSub/labelImg
b77641207329b2be08e4d71306b36efee2ac7e50
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """ ssh cvteam1@134.173.43.20 cd compData python startServer.py """ if __name__ == '__main__': # i.e. if this file is being run directly, not as imported module main()
26.652778
69
0.620115
#!/usr/bin/python3 """ ssh cvteam1@134.173.43.20 cd compData python startServer.py """ from http.server import HTTPServer, SimpleHTTPRequestHandler from os import curdir import json from copy import deepcopy class requestHandler(SimpleHTTPRequestHandler): def _set_headers(self): self.send_response(200) ...
0
0
0
1,409
0
143
0
33
135
2ac32a412dafa9bce712cbc3d292c036f1066547
885
py
Python
server/extractor/serializers.py
lucmichalski/seo-audits-toolkit
d7a81d2ac1019f60268bad40dff6b0a475f46b1a
[ "MIT" ]
null
null
null
server/extractor/serializers.py
lucmichalski/seo-audits-toolkit
d7a81d2ac1019f60268bad40dff6b0a475f46b1a
[ "MIT" ]
null
null
null
server/extractor/serializers.py
lucmichalski/seo-audits-toolkit
d7a81d2ac1019f60268bad40dff6b0a475f46b1a
[ "MIT" ]
null
null
null
from extractor.models import Extractor
36.875
168
0.703955
from extractor.models import Extractor from rest_framework import serializers from datetime import datetime from .tasks import extractor_job from .models import Extractor from django.utils import timezone import pytz class ExtractorSerializer(serializers.ModelSerializer): class Meta: model = Extractor ...
0
0
0
646
0
0
0
46
155
fa94d442e625eda0e7b3b0718993bcbcb294bb1e
1,582
py
Python
Leetcode/Python Solutions/Dynamic Programming/IsSubsequence.py
Mostofa-Najmus-Sakib/Applied-Algorithm
bc656fd655617407856e0ce45b68585fa81c5035
[ "MIT" ]
1
2020-01-06T02:21:56.000Z
2020-01-06T02:21:56.000Z
Leetcode/Python Solutions/Dynamic Programming/IsSubsequence.py
Mostofa-Najmus-Sakib/Applied-Algorithm
bc656fd655617407856e0ce45b68585fa81c5035
[ "MIT" ]
null
null
null
Leetcode/Python Solutions/Dynamic Programming/IsSubsequence.py
Mostofa-Najmus-Sakib/Applied-Algorithm
bc656fd655617407856e0ce45b68585fa81c5035
[ "MIT" ]
3
2021-02-22T17:41:01.000Z
2022-01-13T05:03:19.000Z
""" LeetCode Problem: 392. Is Subsequence Link: https://leetcode.com/problems/is-subsequence/ Written by: Mostofa Adib Shakib Language: Python """ """ Recursion + Memoization[Built-in function] Time Complexity: O(n*m) Space Complexity: O(n*m) """ """ Dynamic Programming Time Complexity: O(n*m) Space Complexity: O(n*...
24.71875
90
0.48799
""" LeetCode Problem: 392. Is Subsequence Link: https://leetcode.com/problems/is-subsequence/ Written by: Mostofa Adib Shakib Language: Python """ """ Recursion + Memoization[Built-in function] Time Complexity: O(n*m) Space Complexity: O(n*m) """ from functools import lru_cache class Solution: def isSubsequence...
0
317
0
851
0
0
0
10
69
f832979e5111d8b798e7e68dcd21027570803401
5,339
py
Python
geospacelab/datahub/sources/jhuapl/dmsp/ssusi/edraur/loader.py
JouleCai/GeoSpaceLab
6cc498d3c32501e946931de596a840c73e83edb3
[ "BSD-3-Clause" ]
19
2021-08-07T08:49:22.000Z
2022-03-02T18:26:30.000Z
geospacelab/datahub/sources/jhuapl/dmsp/ssusi/edraur/loader.py
JouleCai/GeoSpaceLab
6cc498d3c32501e946931de596a840c73e83edb3
[ "BSD-3-Clause" ]
4
2021-11-09T05:53:42.000Z
2022-03-25T11:49:37.000Z
geospacelab/datahub/sources/jhuapl/dmsp/ssusi/edraur/loader.py
JouleCai/GeoSpaceLab
6cc498d3c32501e946931de596a840c73e83edb3
[ "BSD-3-Clause" ]
3
2021-11-07T11:41:20.000Z
2022-02-14T13:43:11.000Z
# Licensed under the BSD 3-Clause License # Copyright (C) 2021 GeospaceLab (geospacelab) # Author: Lei Cai, Space Physics and Astronomy, University of Oulu if __name__ == "__main__": import pathlib fp = pathlib.Path('/Users/lcai/Geospacelab/Data/JHUAPL/DMSP/SSUSI/f17/20151205/' + 'PS.AP...
46.833333
118
0.648623
# Licensed under the BSD 3-Clause License # Copyright (C) 2021 GeospaceLab (geospacelab) # Author: Lei Cai, Space Physics and Astronomy, University of Oulu import netCDF4 import datetime import numpy as np import geospacelab.toolbox.utilities.pydatetime as dttool class Loader(object): def __init__(self, file_pa...
0
0
0
4,674
0
0
0
20
112
e0b61c3b9fecec287da5c0f5895fe0dc1c55db51
153
py
Python
src/kaggle_web_traffic_forecasting/__init__.py
DSmmartin/KaggleTimeSeries
54a6627487070b28b2eea4e27bcb35c48acedf19
[ "MIT" ]
null
null
null
src/kaggle_web_traffic_forecasting/__init__.py
DSmmartin/KaggleTimeSeries
54a6627487070b28b2eea4e27bcb35c48acedf19
[ "MIT" ]
null
null
null
src/kaggle_web_traffic_forecasting/__init__.py
DSmmartin/KaggleTimeSeries
54a6627487070b28b2eea4e27bcb35c48acedf19
[ "MIT" ]
null
null
null
""" My init to load all main process around my ML project """
38.25
61
0.810458
""" My init to load all main process around my ML project """ from .spark_manage import spark_start from .data_processing import dataset_train_transpose
0
0
0
0
0
0
0
47
45
d9bd4c79b64fa98e00b319bfb3427cb6b71d06ab
21,549
py
Python
conans/test/unittests/model/build_info/components_test.py
ninjayash/conan
00fbc925fde93a148abfbcebf236c6b4f2da0572
[ "MIT" ]
1
2020-11-07T21:25:57.000Z
2020-11-07T21:25:57.000Z
conans/test/unittests/model/build_info/components_test.py
ttencate/conan
3dc4fb35cc3be9865f0ae480c89e6a58813d5076
[ "MIT" ]
null
null
null
conans/test/unittests/model/build_info/components_test.py
ttencate/conan
3dc4fb35cc3be9865f0ae480c89e6a58813d5076
[ "MIT" ]
null
null
null
# coding=utf-8
51.676259
101
0.62388
# coding=utf-8 import os import unittest import six from conans.errors import ConanException from conans.model.build_info import CppInfo, DepsCppInfo, DepCppInfo from conans.test.utils.test_files import temp_folder from conans.util.files import save class CppInfoComponentsTest(unittest.TestCase): def test_comp...
0
0
0
21,273
0
0
0
81
179
2d71e7d9c1a86726265aa5646e677037196bd2a0
2,596
py
Python
release/stubs.min/Wms/RemotingImplementation/Activities/Renderers.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
release/stubs.min/Wms/RemotingImplementation/Activities/Renderers.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
release/stubs.min/Wms/RemotingImplementation/Activities/Renderers.py
tranconbv/ironpython-stubs
a601759e6c6819beff8e6b639d18a24b7e351851
[ "MIT" ]
null
null
null
# encoding: utf-8 # module Wms.RemotingImplementation.Activities.Renderers calls itself Renderers # from Wms.RemotingImplementation,Version=1.23.1.0,Culture=neutral,PublicKeyToken=null # by generator 1.145 # no doc # no important # no functions # classes
35.561644
215
0.720339
# encoding: utf-8 # module Wms.RemotingImplementation.Activities.Renderers calls itself Renderers # from Wms.RemotingImplementation,Version=1.23.1.0,Culture=neutral,PublicKeyToken=null # by generator 1.145 # no doc # no important from __init__ import * # no functions # classes class MobileProgressBarRender...
0
181
0
2,095
0
0
0
1
48
913fccc0de77123589023d5f87c6e399d7e50a20
7,384
py
Python
tools/ports/regal.py
undeadinu/emscripten
e9d8b5c4b62c2b27b92cb7635590238a39310aa0
[ "MIT" ]
1
2019-01-06T09:32:11.000Z
2019-01-06T09:32:11.000Z
tools/ports/regal.py
undeadinu/emscripten
e9d8b5c4b62c2b27b92cb7635590238a39310aa0
[ "MIT" ]
null
null
null
tools/ports/regal.py
undeadinu/emscripten
e9d8b5c4b62c2b27b92cb7635590238a39310aa0
[ "MIT" ]
null
null
null
# Copyright 2015 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. TAG = 'version_4'
43.692308
149
0.551598
# Copyright 2015 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. import os, shutil, logging, subprocess, sys, stat TAG = 'version_4' ...
0
0
0
0
0
6,968
0
28
115
3ec8e4b9a94e2276fc35dc4cd360cde128b72c63
2,402
py
Python
dvol_python/testtools.py
ClusterHQ/dvol
adf6c49bbf74d26fbc802a3cdd02ee47e18ad934
[ "Apache-2.0" ]
276
2015-11-03T23:14:11.000Z
2021-11-08T11:05:57.000Z
dvol_python/testtools.py
ClusterHQ/dvol
adf6c49bbf74d26fbc802a3cdd02ee47e18ad934
[ "Apache-2.0" ]
62
2015-11-12T02:02:14.000Z
2022-02-02T21:10:05.000Z
dvol_python/testtools.py
ClusterHQ/dvol
adf6c49bbf74d26fbc802a3cdd02ee47e18ad934
[ "Apache-2.0" ]
19
2015-11-14T08:17:14.000Z
2017-07-19T13:32:57.000Z
""" Common test tools. """ from os import environ from semver import compare from unittest import skipIf import requests import subprocess import time TEST_GOLANG_VERSION = environ.get("TEST_GOLANG_VERSION", False) DOCKER_VERSION = environ.get("DOCKER_VERSION", "") skip_if_go_version = skipIf( TEST_GOLANG_VERSIO...
27.295455
77
0.636137
""" Common test tools. """ from os import environ from semver import compare from unittest import skipIf import requests import subprocess import time TEST_GOLANG_VERSION = environ.get("TEST_GOLANG_VERSION", False) DOCKER_VERSION = environ.get("DOCKER_VERSION", "") skip_if_go_version = skipIf( TEST_GOLANG_VERSIO...
0
0
0
34
0
389
0
0
92
5811d4052a2da8a0c989ae54eefbdd10c28952bc
6,675
py
Python
disputatio/routines/vanes/front.py
nicholasmalaya/paleologos
11959056caa80d3c910759b714a0f8e42f986f0f
[ "MIT" ]
1
2021-11-04T17:49:42.000Z
2021-11-04T17:49:42.000Z
disputatio/routines/vanes/front.py
nicholasmalaya/paleologos
11959056caa80d3c910759b714a0f8e42f986f0f
[ "MIT" ]
null
null
null
disputatio/routines/vanes/front.py
nicholasmalaya/paleologos
11959056caa80d3c910759b714a0f8e42f986f0f
[ "MIT" ]
2
2019-01-04T16:08:18.000Z
2019-12-16T19:34:24.000Z
#!/bin/py # # interpolate over data field with 2d polynomial fit # # fit a 2D, 3rd order polynomial to data # estimate the 16 coefficients using all of your data points. # # http://stackoverflow.com/questions/18832763/drawing-directions-fields # # import matplotlib matplotlib.use('Agg') hprime = -4.5 # # # # # # ...
21.190476
93
0.497978
#!/bin/py # # interpolate over data field with 2d polynomial fit # # fit a 2D, 3rd order polynomial to data # estimate the 16 coefficients using all of your data points. # # http://stackoverflow.com/questions/18832763/drawing-directions-fields # # import numpy as np import matplotlib matplotlib.use('Agg') import iter...
0
0
0
0
0
5,796
0
18
361
9c3b8eda5d94d6304e5ca32a9a4f89b5936e41a2
214
py
Python
UdemyMegaCourse/cv2/galaxy.py
JeremyPie/PythonCourse1
5dd4c417c70c4ade5bb137ea8bdbb56d7d6c71c7
[ "MIT" ]
null
null
null
UdemyMegaCourse/cv2/galaxy.py
JeremyPie/PythonCourse1
5dd4c417c70c4ade5bb137ea8bdbb56d7d6c71c7
[ "MIT" ]
null
null
null
UdemyMegaCourse/cv2/galaxy.py
JeremyPie/PythonCourse1
5dd4c417c70c4ade5bb137ea8bdbb56d7d6c71c7
[ "MIT" ]
null
null
null
import cv2 from matplotlib import pyplot as plt img = cv2.imread('galaxy.jpg', 0) img = cv2.resize(img, (int(img.shape[1]/2), int(img.shape[0]/2))) cv2.imwrite('GlaxyResized.jpg', img) plt.imshow(img) plt.show()
21.4
65
0.700935
import cv2 from matplotlib import pyplot as plt img = cv2.imread('galaxy.jpg', 0) img = cv2.resize(img, (int(img.shape[1]/2), int(img.shape[0]/2))) cv2.imwrite('GlaxyResized.jpg', img) plt.imshow(img) plt.show()
0
0
0
0
0
0
0
0
0
f5cf2fe8c3a53755d9392bd7e7eed0997ae7b6c5
1,052
py
Python
setup.py
privatwolke/eclipse-profile-selector
e295e0589356aba51fa141420994793bfa62aaa8
[ "MIT" ]
1
2015-12-18T01:27:37.000Z
2015-12-18T01:27:37.000Z
setup.py
privatwolke/eclipseprofileselector
e295e0589356aba51fa141420994793bfa62aaa8
[ "MIT" ]
null
null
null
setup.py
privatwolke/eclipseprofileselector
e295e0589356aba51fa141420994793bfa62aaa8
[ "MIT" ]
null
null
null
from setuptools import setup version = '0.2.2' setup(name = 'eclipseprofileselector', version = version, description = 'Manage separate Eclipse profiles and workspaces with a nice graphical user interface.', long_description = open('README.rst', 'r').read(), keywords = 'eclipse profile', classifiers = [ 'Devel...
28.432432
103
0.695817
from setuptools import setup, find_packages import sys, os version = '0.2.2' setup(name = 'eclipseprofileselector', version = version, description = 'Manage separate Eclipse profiles and workspaces with a nice graphical user interface.', long_description = open('README.rst', 'r').read(), keywords = 'eclipse profi...
0
0
0
0
0
0
0
8
22
0a6e54573a790fabc971c11e4a1a22c66eac3489
100
py
Python
django_app/contributors/admin.py
ASRG/asrg.io
de29552096505ac03a4ec2602873ba0f688b7072
[ "MIT" ]
8
2020-04-03T19:33:37.000Z
2022-01-10T18:46:49.000Z
django_app/contributors/admin.py
ASRG/asrg.io
de29552096505ac03a4ec2602873ba0f688b7072
[ "MIT" ]
359
2019-08-07T13:31:24.000Z
2022-03-29T22:45:49.000Z
django_app/contributors/admin.py
ASRG/asrg.io
de29552096505ac03a4ec2602873ba0f688b7072
[ "MIT" ]
3
2020-08-07T20:43:24.000Z
2020-08-20T20:54:30.000Z
from django.contrib import admin from .models import Contributor admin.site.register(Contributor)
16.666667
32
0.83
from django.contrib import admin from .models import Contributor admin.site.register(Contributor)
0
0
0
0
0
0
0
0
0
f4110ee3e6aea36c216c4a811e8afcc766ec14e2
2,600
py
Python
tests/uuidt/migrations/0001_initial.py
OlgaBorisova/django-pgfields
fc21efc116d017f1bf75c88fa3502cc23f8923b3
[ "BSD-3-Clause" ]
1
2015-03-26T09:34:32.000Z
2015-03-26T09:34:32.000Z
tests/uuidt/migrations/0001_initial.py
elbaschid/django-pgfields
37915b92349c392ed4980d255225e991be3463d6
[ "BSD-3-Clause" ]
null
null
null
tests/uuidt/migrations/0001_initial.py
elbaschid/django-pgfields
37915b92349c392ed4980d255225e991be3463d6
[ "BSD-3-Clause" ]
1
2018-10-23T21:31:29.000Z
2018-10-23T21:31:29.000Z
# -*- coding: utf-8 -*-
38.80597
128
0.565
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Movie' db.create_table('uuidt_movie', ( ('id', self.gf('django_pg.models.fields....
0
0
0
2,446
0
0
0
18
111
88cc6c11608e5ecae6a01861ea3c8f6aaf96bc47
3,679
py
Python
commissioning/doscalars.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
24
2015-01-04T23:38:21.000Z
2022-02-01T00:11:07.000Z
commissioning/doscalars.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
126
2015-01-29T14:50:37.000Z
2022-02-15T01:58:13.000Z
commissioning/doscalars.py
dobos/pysynphot
5d2e0b52ceda78890940ac9239c2d88e149e0bed
[ "BSD-3-Clause" ]
25
2015-02-09T12:12:02.000Z
2021-09-09T13:06:54.000Z
from __future__ import print_function import sys def reverse(d): """Return a reverse lookup dictionary for the input dictionary""" r={} for k in d: r[d[k]]=k return r if __name__ == '__main__': #dirpath, fieldname, instr=sys.argv[1:] try: run(*sys.argv[1:]) except TypeErro...
28.3
79
0.572982
from __future__ import print_function import kwfile_dict import glob, os, sys import numpy as N from astropy.io import fits as pyfits import pylab as P import matplotlib from pysynphot.compat import ASTROPY_LT_1_3 def getdata(dirpath,fieldname,instr,save=True): #get the list of files flist=glob.glob("%s/*.lo...
0
0
0
0
0
3,054
0
33
202
7cec0f109dc0a38586ada7f4713451e263fe1ec9
5,408
py
Python
flask-server/app.py
michael-conrad/neuspell
f1d1a8b4efa7c6aa6e0564ea17db152905f4c7dc
[ "MIT" ]
1
2021-05-21T09:39:50.000Z
2021-05-21T09:39:50.000Z
flask-server/app.py
michael-conrad/neuspell
f1d1a8b4efa7c6aa6e0564ea17db152905f4c7dc
[ "MIT" ]
null
null
null
flask-server/app.py
michael-conrad/neuspell
f1d1a8b4efa7c6aa6e0564ea17db152905f4c7dc
[ "MIT" ]
null
null
null
""" Usage ----- CUDA_VISIBLE_DEVICES=0 python app.py """ import os from time import time # from neuspell import AspellChecker, JamspellChecker from flask import Flask from flask_cors import CORS TOKENIZE = True PRELOADED_MODELS = {} CURR_MODEL_KEYWORD = "elmosc-rnn" CURR_MODEL = None TOPK = 1 LOGS_...
36.789116
109
0.645155
""" Usage ----- CUDA_VISIBLE_DEVICES=0 python app.py """ import os from time import time # from neuspell import AspellChecker, JamspellChecker from neuspell import BertsclstmChecker, CnnlstmChecker, ElmosclstmChecker, NestedlstmChecker from neuspell import SclstmChecker, SclstmbertChecker, SclstmelmoChecke...
0
1,916
0
0
0
2,355
0
170
221
77594b0aae3b85456427f41cabbaffe0102750d9
24,707
py
Python
dist/ba_data/python/bastd/ui/helpui.py
Bartixxx32/Bombsquad-Ballistica-Modded-Server
26d36f07a5b96702e4fbdf172c0d66671f1ee0bd
[ "MIT" ]
317
2020-04-04T00:33:10.000Z
2022-03-28T01:07:09.000Z
assets/src/ba_data/python/bastd/ui/helpui.py
Alshahriah/ballistica
326f6677a0118667e93ce9034849622ebef706fa
[ "MIT" ]
315
2020-04-04T22:33:10.000Z
2022-03-31T22:50:02.000Z
assets/src/ba_data/python/bastd/ui/helpui.py
Alshahriah/ballistica
326f6677a0118667e93ce9034849622ebef706fa
[ "MIT" ]
97
2020-04-04T01:32:17.000Z
2022-03-16T19:02:59.000Z
# Released under the MIT License. See LICENSE for details. # """Provides help related ui.""" from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING:
41.594276
79
0.442709
# Released under the MIT License. See LICENSE for details. # """Provides help related ui.""" from __future__ import annotations from typing import TYPE_CHECKING import _ba import ba if TYPE_CHECKING: from typing import Optional class HelpWindow(ba.Window): """A window providing help on how to play.""" ...
0
0
0
24,447
0
0
0
-17
94
53880225806a57b224015eb20089f09627c278cd
5,153
py
Python
spyder/utils/switcher.py
suokunlong/spyder
2d5d450fdcef232fb7f38e7fefc27f0e7f704c9a
[ "MIT" ]
3
2019-09-27T21:00:00.000Z
2021-03-07T23:28:32.000Z
spyder/utils/switcher.py
jastema/spyder
0ef48ea227c53f57556cd8002087dc404b0108b0
[ "MIT" ]
3
2021-10-06T22:49:31.000Z
2022-02-27T12:28:12.000Z
spyder/utils/switcher.py
jastema/spyder
0ef48ea227c53f57556cd8002087dc404b0108b0
[ "MIT" ]
2
2021-04-30T01:18:22.000Z
2021-09-19T06:31:42.000Z
# -*- coding: utf-8 -*- # # Copyright Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Utils to handle Switcher elements. """ # Standard library imports import os import os.path as osp import sys # Local imports from spyder.config.base import _ fro...
35.294521
79
0.55948
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Utils to handle Switcher elements. """ # Standard library imports import os import os.path as osp import sys # Local imports from spyder.config.base import _ fr...
2
0
0
0
0
2,763
0
11
27
43f80d8042c492af4852a86396089d057c3c0ea6
448
py
Python
ml-framework/batch_training.py
JetBrains-Research/extract-method-experiments
c733f6af32de2df9c1a00aa714cca11447ac2518
[ "Apache-2.0" ]
2
2021-07-01T16:46:13.000Z
2022-01-22T09:28:25.000Z
ml-framework/batch_training.py
JetBrains-Research/extract-method-experiments
c733f6af32de2df9c1a00aa714cca11447ac2518
[ "Apache-2.0" ]
4
2021-07-12T07:02:06.000Z
2022-03-09T09:52:06.000Z
ml-framework/batch_training.py
JetBrains-Research/extract-method-experiments
c733f6af32de2df9c1a00aa714cca11447ac2518
[ "Apache-2.0" ]
null
null
null
import os import logging from src.trainer import train_by_config logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) directory = 'train_settings/' for filename in os.listdir(directory): config_path = os.path.join(directory, filename) logging.info(f'Training model in accordance w...
29.866667
76
0.712054
import os import logging from src.trainer import train_by_config logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO) directory = 'train_settings/' for filename in os.listdir(directory): config_path = os.path.join(directory, filename) logging.info(f'Training model in accordance w...
0
0
0
0
0
0
0
0
0
2b3b046d327cdb1666c09c8e99e70ac3d58c6717
952
py
Python
freezeword/names.py
mattfister/freezeword
74025da9e9a811e24b2cb0cfb77717d5eafd0283
[ "MIT" ]
10
2015-12-04T19:48:15.000Z
2019-12-26T07:03:13.000Z
freezeword/names.py
mattfister/freezeword
74025da9e9a811e24b2cb0cfb77717d5eafd0283
[ "MIT" ]
null
null
null
freezeword/names.py
mattfister/freezeword
74025da9e9a811e24b2cb0cfb77717d5eafd0283
[ "MIT" ]
2
2017-07-28T21:20:58.000Z
2019-02-26T21:57:43.000Z
""" Simple utility to get random names. I think it uses data from a US census, located in the words folder. """ import random import os.path __author__ = "Matt Fister" maleFirsts = [line.rstrip('\n').title() for line in open(os.path.join(os.path.dirname(__file__), (os.path.join('words', 'maleFirstNames.txt'))))] fem...
30.709677
149
0.682773
""" Simple utility to get random names. I think it uses data from a US census, located in the words folder. """ import random import os.path __author__ = "Matt Fister" maleFirsts = [line.rstrip('\n').title() for line in open(os.path.join(os.path.dirname(__file__), (os.path.join('words', 'maleFirstNames.txt'))))] fem...
0
0
0
0
0
194
0
0
69
aca2a4e1e23df5e70e73318fb26040b11d54ca14
522
py
Python
access/privileges.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
null
null
null
access/privileges.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
null
null
null
access/privileges.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
null
null
null
from core.utils import ensure_user_group_membership def invite_to_slack(privilege, person): """ Invites the user to Slack. """ privilege.slack_access.grant(person) def add_to_group(privilege, person): """ Generic "add person to group" privilege. The group to add is taken from the privilege...
22.695652
95
0.733716
from django.conf import settings from core.utils import ensure_user_group_membership from .models import SlackAccess def invite_to_slack(privilege, person): """ Invites the user to Slack. """ privilege.slack_access.grant(person) def add_to_group(privilege, person): """ Generic "add person...
0
0
0
0
0
0
0
21
45
041159ae6b0c366db4204359e5e1da904e817c77
201
py
Python
reports/admin.py
dgmarko/zach_p_eq_database
ffb69b84645695fe85c77129381fade5e39628d2
[ "MIT" ]
null
null
null
reports/admin.py
dgmarko/zach_p_eq_database
ffb69b84645695fe85c77129381fade5e39628d2
[ "MIT" ]
null
null
null
reports/admin.py
dgmarko/zach_p_eq_database
ffb69b84645695fe85c77129381fade5e39628d2
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Transaction, Header, Ticker # Register your models here. admin.site.register(Transaction) admin.site.register(Header) admin.site.register(Ticker)
22.333333
47
0.810945
from django.contrib import admin from .models import Transaction, Header, Ticker # Register your models here. admin.site.register(Transaction) admin.site.register(Header) admin.site.register(Ticker)
0
0
0
0
0
0
0
0
0
181bb70f734ef532b0fb1a6ac83432c9a5343330
3,030
py
Python
tests/operators/vector/test_ssd_all.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
1
2020-08-31T02:43:43.000Z
2020-08-31T02:43:43.000Z
tests/operators/vector/test_ssd_all.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
null
null
null
tests/operators/vector/test_ssd_all.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37.407407
170
0.609901
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
0
154
0
1,514
0
0
0
126
213
a3960d16f61c3d52f45afc8d25e8cb8c2a0a5a3e
519
py
Python
supplier/urls.py
CrownKira/digitalace-backend
9489b3dc4b856688360b60a7dca040c945faab74
[ "MIT" ]
1
2021-05-28T05:22:54.000Z
2021-05-28T05:22:54.000Z
supplier/urls.py
CrownKira/digitalace-backend
9489b3dc4b856688360b60a7dca040c945faab74
[ "MIT" ]
3
2021-05-31T15:44:14.000Z
2021-06-29T07:48:13.000Z
supplier/urls.py
CrownKira/digitalace-backend
9489b3dc4b856688360b60a7dca040c945faab74
[ "MIT" ]
1
2021-05-30T07:42:54.000Z
2021-05-30T07:42:54.000Z
from django.urls import path, include from rest_framework.routers import DefaultRouter from rest_framework_bulk.routes import BulkRouter from supplier import views router = DefaultRouter() bulk_router = BulkRouter() bulk_router.register("receives", views.ReceiveViewSet) bulk_router.register("suppliers", views.Suppl...
24.714286
67
0.789981
from django.urls import path, include from rest_framework.routers import DefaultRouter from rest_framework_bulk.routes import BulkRouter from supplier import views router = DefaultRouter() bulk_router = BulkRouter() bulk_router.register("receives", views.ReceiveViewSet) bulk_router.register("suppliers", views.Suppl...
0
0
0
0
0
0
0
0
0
b4ebdd7e5b3a3d2cc1c95090b70f472364b115d9
957
py
Python
CheckIfPangram.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
14
2020-10-15T21:47:18.000Z
2021-12-01T06:06:51.000Z
CheckIfPangram.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
null
null
null
CheckIfPangram.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
4
2020-06-15T14:40:45.000Z
2021-06-15T06:22:03.000Z
''' A pangram is a sentence where every letter of the English alphabet appears at least once. Given a string sentence containing only lowercase English letters, return true if sentence is a pangram, or false otherwise. Example 1: Input: sentence = "thequickbrownfoxjumpsoverthelazydog" Output: true Explanation: sente...
28.147059
124
0.607106
''' A pangram is a sentence where every letter of the English alphabet appears at least once. Given a string sentence containing only lowercase English letters, return true if sentence is a pangram, or false otherwise. Example 1: Input: sentence = "thequickbrownfoxjumpsoverthelazydog" Output: true Explanation: sente...
0
0
0
488
0
0
0
0
23
69611705ef9ded51b631df10fca6237883ab4cac
9,208
py
Python
free_hand.py
orenber/Widgets
0df26370d9ac4d805d5c644f6db432c6732846d9
[ "BSD-2-Clause" ]
2
2019-08-31T05:15:22.000Z
2019-09-19T20:27:21.000Z
free_hand.py
orenber/Widgets
0df26370d9ac4d805d5c644f6db432c6732846d9
[ "BSD-2-Clause" ]
null
null
null
free_hand.py
orenber/Widgets
0df26370d9ac4d805d5c644f6db432c6732846d9
[ "BSD-2-Clause" ]
null
null
null
if __name__ == "__main__": main()
29.703226
93
0.590356
import matplotlib.pyplot as plt import numpy as np from PyQt5.QtCore import Qt from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import QApplication from draw_binary_image import plot_binary_image class AxesEvent: def __init__(self, *args, **kwargs): self.ax = plt.axes(*args, **kwargs) self.f...
0
395
0
8,413
0
65
0
68
224
b945b76ccccdb43041716831f0119db495983ba8
5,921
py
Python
src/legacy/evaluate.py
christear/APAIQ_release
5a5031e69cabd4dbcf1d44ef05a7097cbb1e5c35
[ "MIT" ]
null
null
null
src/legacy/evaluate.py
christear/APAIQ_release
5a5031e69cabd4dbcf1d44ef05a7097cbb1e5c35
[ "MIT" ]
null
null
null
src/legacy/evaluate.py
christear/APAIQ_release
5a5031e69cabd4dbcf1d44ef05a7097cbb1e5c35
[ "MIT" ]
null
null
null
import re #from extract_coverage_from_scanGenome import check #def dataProcessing(scan_file,window,rst): if __name__ == "__main__": Evaluate(*args())
32.894444
108
0.576254
from PolyAModel import * import re import os, sys, copy, getopt, re, argparse import random import pandas as pd import numpy as np from Bio.Seq import Seq from TrimmedMean import TrimmedMean import gc #from extract_coverage_from_scanGenome import check def check(line1,line2,window): #_,pos1,_ = line1[...
0
0
0
0
0
5,408
0
15
309
bf4a6fef0a07d3313320f3e022cb1693d9674103
473
py
Python
tools/vagrant/data/scripts/apply_env.py
hsong-rh/pinakes
2f08cb757ca64c866af3244686b92a3074fc7571
[ "Apache-2.0" ]
2
2022-03-17T18:53:58.000Z
2022-03-17T22:04:22.000Z
tools/vagrant/data/scripts/apply_env.py
hsong-rh/pinakes
2f08cb757ca64c866af3244686b92a3074fc7571
[ "Apache-2.0" ]
9
2022-03-18T08:22:57.000Z
2022-03-30T17:14:49.000Z
tools/vagrant/data/scripts/apply_env.py
hsong-rh/pinakes
2f08cb757ca64c866af3244686b92a3074fc7571
[ "Apache-2.0" ]
7
2022-03-17T22:03:08.000Z
2022-03-28T21:28:34.000Z
import sys import os from jinja2 import Template # Apply environment variables to a Jinga2 Template file # Save the results into an output file specified by the caller if __name__ == "__main__": if len(sys.argv) != 3: print("usage: python apply_env.py input_file output_file") sys.exit(1) with ...
26.277778
66
0.651163
import sys import os from jinja2 import Template # Apply environment variables to a Jinga2 Template file # Save the results into an output file specified by the caller if __name__ == "__main__": if len(sys.argv) != 3: print("usage: python apply_env.py input_file output_file") sys.exit(1) with ...
0
0
0
0
0
0
0
0
0
f4d3e2fa9b5d5a03e3d66a3a1060b0253a42f444
1,666
py
Python
lab4/image_stats.py
CG2016/barkovsky_3
784bb3e419736cd11b9bc84b3055b8a4b9ec57e6
[ "MIT" ]
null
null
null
lab4/image_stats.py
CG2016/barkovsky_3
784bb3e419736cd11b9bc84b3055b8a4b9ec57e6
[ "MIT" ]
null
null
null
lab4/image_stats.py
CG2016/barkovsky_3
784bb3e419736cd11b9bc84b3055b8a4b9ec57e6
[ "MIT" ]
null
null
null
#!/usr/bin/env python import PIL.Image if __name__ == '__main__': main()
26.03125
97
0.605642
#!/usr/bin/env python import os import argparse import PIL.Image import PIL.ExifTags def get_image_paths(path): if os.path.isdir(path): for dirpath, dirnames, filenames in os.walk(path): for filename in filenames: yield os.path.join(dirpath, filename) else: yield p...
0
0
0
0
214
1,254
0
-20
135
1f016bf5c421cd9b6e7ae9b9544f42ef7a8267f7
5,733
py
Python
Tail/plugin.py
hacklab/doorbot
a0837505beedab8436bc6d451644eb18dde0a31d
[ "BSD-3-Clause" ]
1
2016-05-09T01:55:04.000Z
2016-05-09T01:55:04.000Z
Tail/plugin.py
hacklab/doorbot
a0837505beedab8436bc6d451644eb18dde0a31d
[ "BSD-3-Clause" ]
null
null
null
Tail/plugin.py
hacklab/doorbot
a0837505beedab8436bc6d451644eb18dde0a31d
[ "BSD-3-Clause" ]
null
null
null
### # Copyright (c) 2004-2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of co...
35.83125
79
0.631258
### # Copyright (c) 2004-2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of co...
0
0
0
3,854
0
0
0
3
68
0f64541f7886f83908fd68e4ab290832262593f2
4,229
py
Python
fusion_pickles_probability_3.py
pdturney/management-theory-revised
12ac601658fec7001817bc981e8e851e853d4803
[ "MIT" ]
null
null
null
fusion_pickles_probability_3.py
pdturney/management-theory-revised
12ac601658fec7001817bc981e8e851e853d4803
[ "MIT" ]
null
null
null
fusion_pickles_probability_3.py
pdturney/management-theory-revised
12ac601658fec7001817bc981e8e851e853d4803
[ "MIT" ]
null
null
null
# # Fusion Pickles Probability 3 Parts # # Peter Turney, July 14, 2021 # # From the 20 runs, extract all of the pickled three-part seeds # that are stored in the 20 "fusion_storage.bin" pickle files. # Read the pickles and run each pickle, recording the results in # a numpy tensor: # # tensor = num_seeds x nu...
33.832
77
0.674391
# # Fusion Pickles Probability 3 Parts # # Peter Turney, July 14, 2021 # # From the 20 runs, extract all of the pickled three-part seeds # that are stored in the 20 "fusion_storage.bin" pickle files. # Read the pickles and run each pickle, recording the results in # a numpy tensor: # # tensor = num_seeds x nu...
0
0
0
0
0
0
0
-45
207
65ac9cb1a116de9b39966c6fe34e3dcee6cf7692
8,839
py
Python
cli/aws_ddk/__main__.py
vemel/aws-ddk
d34bd1d98f5a170026a1b65f9629e909ca839930
[ "Apache-2.0" ]
null
null
null
cli/aws_ddk/__main__.py
vemel/aws-ddk
d34bd1d98f5a170026a1b65f9629e909ca839930
[ "Apache-2.0" ]
null
null
null
cli/aws_ddk/__main__.py
vemel/aws-ddk
d34bd1d98f5a170026a1b65f9629e909ca839930
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2022 Amazon.com, Inc. or its affiliates. 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...
26.703927
115
0.663084
#!/usr/bin/env python3 # Copyright 2022 Amazon.com, Inc. or its affiliates. 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...
0
6,043
0
452
0
749
0
184
472
2caf5d5429d89c7da649be2382fb440d0361ac1a
1,950
py
Python
scrape_twitter.py
Aiyubi/twitter-analyzer
108e4fbf485594a5a9135ca422131423a90302d8
[ "MIT" ]
null
null
null
scrape_twitter.py
Aiyubi/twitter-analyzer
108e4fbf485594a5a9135ca422131423a90302d8
[ "MIT" ]
null
null
null
scrape_twitter.py
Aiyubi/twitter-analyzer
108e4fbf485594a5a9135ca422131423a90302d8
[ "MIT" ]
null
null
null
if __name__ == "__main__": fill_database()
28.26087
96
0.547179
import database_model as db from database_model import Politician, Tweet, Hashtag import sqlalchemy import twint import arrow def get_tweets(twitter_handle,since,until): c = twint.Config() c.Username = twitter_handle c.Pandas = True c.Hide_output = True #c.Retries_count = 1 c.Retweets = True ...
0
0
0
0
0
1,727
0
16
157
6ab436fc56656bd0a166758dd3675cc7c4ea8e81
153,705
py
Python
Lib/site-packages/IPython/core/interactiveshell.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
3
2021-03-29T19:21:08.000Z
2021-12-31T09:30:11.000Z
Lib/site-packages/IPython/core/interactiveshell.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
2
2021-12-04T12:51:07.000Z
2021-12-04T16:49:18.000Z
Lib/site-packages/IPython/core/interactiveshell.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
1
2021-03-30T05:02:53.000Z
2021-03-30T05:02:53.000Z
# -*- coding: utf-8 -*- """Main IPython class.""" #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # Copyright (C) 2008-2011 The IPython Development Team # # Distribu...
40.236911
147
0.592076
# -*- coding: utf-8 -*- """Main IPython class.""" #----------------------------------------------------------------------------- # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # Copyright (C) 2008-2011 The IPython Development Team # # Distribu...
0
8,312
16,650
119,992
0
172
0
1,367
1,673
c1200136115196f12f5dc1202f6193b76d966255
6,935
py
Python
predict/gpt_predict.py
yyht/gpt2_ml_my
e0a5fae90022ecf97c4f244cfd3aa8a418787296
[ "Apache-2.0" ]
null
null
null
predict/gpt_predict.py
yyht/gpt2_ml_my
e0a5fae90022ecf97c4f244cfd3aa8a418787296
[ "Apache-2.0" ]
null
null
null
predict/gpt_predict.py
yyht/gpt2_ml_my
e0a5fae90022ecf97c4f244cfd3aa8a418787296
[ "Apache-2.0" ]
null
null
null
import sys, os father_path = os.path.join(os.getcwd()) print(father_path, "==father path==") bert_path = find_bert(father_path) # t2t_bert_path = os.path.join(bert_path, "t2t_bert") # sys.path.extend([bert_path, t2t_bert_path]) sys.path.extend([bert_path]) print(sys.path) from predict import AppPredictor from pred...
44.455128
133
0.65119
import sys,os father_path = os.path.join(os.getcwd()) print(father_path, "==father path==") def find_bert(father_path): if father_path.split("/")[-1] == "gpt2_ml_my": return father_path output_path = "" for fi in os.listdir(father_path): if fi == "gpt2_ml_my": output_path = o...
0
0
0
3,700
0
448
0
76
112
ccd87448f7fcf54feb0817a1ca3ee00d9ad0bc89
1,930
py
Python
order-1_voronoi/core/geometry/Ray.py
bzliu94/algorithms
43ccefd7ea1fd88339bf2afa0b35b0a3bdf6acff
[ "MIT" ]
null
null
null
order-1_voronoi/core/geometry/Ray.py
bzliu94/algorithms
43ccefd7ea1fd88339bf2afa0b35b0a3bdf6acff
[ "MIT" ]
null
null
null
order-1_voronoi/core/geometry/Ray.py
bzliu94/algorithms
43ccefd7ea1fd88339bf2afa0b35b0a3bdf6acff
[ "MIT" ]
null
null
null
# constrained version of a line # has direction """ ray1 = Ray((0, 0), (0, 1)) print ray1.getBase() print ray1.getDirectionVector() ray2 = Ray((1, 1), (-1, 0)) print ray1.doesIntersectWithRay(ray2) print ray1.intersectWithRay(ray2) """
17.87037
96
0.646632
# constrained version of a line # has direction from Line import * class Ray: def __init__(self, base, direction_vector): self.base = base self.direction_vector = direction_vector self.line = Line(base, direction_vector) def getBase(self): return self.base def setBase...
0
0
0
1,615
0
0
0
-3
50
f704f29d917dfbd51e439f0dd5292f602da50c6f
8,655
py
Python
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
170
2020-06-08T18:30:52.000Z
2022-03-28T12:08:11.000Z
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
146
2020-06-14T18:56:27.000Z
2022-02-27T21:15:59.000Z
modelci/experimental/model/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
36
2020-06-08T18:30:56.000Z
2022-03-07T18:10:19.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Author: Li Yuanming Email: yli056@e.ntu.edu.sg Date: 1/27/2021 ML model structure definitions. """ from typing import Union _LayerType = Union[Linear, Conv1d, Conv2d, ReLU, Tanh, BatchNorm1d, BatchNorm2d, MaxPool1d, MaxPool2d, Ada...
34.209486
115
0.669324
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Author: Li Yuanming Email: yli056@e.ntu.edu.sg Date: 1/27/2021 ML model structure definitions. """ import abc import inspect from enum import Enum from typing import Optional, Union, Tuple, Dict, OrderedDict from pydantic import BaseModel, PositiveInt, conint, Positiv...
0
1,818
0
5,836
0
0
0
97
548
b504e628f2cdcc4f38f3aade7b0ba05e7c24f2f0
1,646
py
Python
A_Web_Crawler_With_asyncio_Coroutines/simple_epoll.py
czs0x55aa/500lines_homework
a67a144181afadae387e2889f5ae29565e76cdad
[ "MIT" ]
null
null
null
A_Web_Crawler_With_asyncio_Coroutines/simple_epoll.py
czs0x55aa/500lines_homework
a67a144181afadae387e2889f5ae29565e76cdad
[ "MIT" ]
null
null
null
A_Web_Crawler_With_asyncio_Coroutines/simple_epoll.py
czs0x55aa/500lines_homework
a67a144181afadae387e2889f5ae29565e76cdad
[ "MIT" ]
null
null
null
# coding=utf8 from selectors2 import DefaultSelector url = 'xkcd.com' selector = DefaultSelector() stopped = False res = [] loop()
25.323077
78
0.58627
# coding=utf8 import socket from selectors2 import DefaultSelector, EVENT_READ, EVENT_WRITE import time url = 'xkcd.com' selector = DefaultSelector() stopped = False res = [] def log_time(func): def wrapper(*args, **kw): start_time = time.time() func(*args, **kw) print(time.time() - start...
0
264
0
981
0
146
0
7
113
e3221b92d4c086b255ccba4f1681b82d8200ae10
111
py
Python
plydata/tidy/__init__.py
has2k1/plydata
d9d022def44ade656fbb39c16d2f7fe45e9e96da
[ "BSD-3-Clause" ]
247
2017-05-06T08:56:29.000Z
2022-03-16T00:36:35.000Z
plydata/tidy/__init__.py
sthagen/plydata
7ecbabaae8af68e9d9b094ba1830cf8008746eca
[ "BSD-3-Clause" ]
28
2017-05-19T06:52:32.000Z
2022-02-17T10:41:47.000Z
plydata/tidy/__init__.py
sthagen/plydata
7ecbabaae8af68e9d9b094ba1830cf8008746eca
[ "BSD-3-Clause" ]
14
2017-05-14T11:47:16.000Z
2020-11-20T18:07:49.000Z
from .. import _get_all_imports __all__ = _get_all_imports(globals())
18.5
38
0.720721
from .tidy_verbs import * # noqa from .. import _get_all_imports __all__ = _get_all_imports(globals())
0
0
0
0
0
0
0
4
35
b0d8d503d87f4c7477bf414c0a0b0d08d59bc8a0
321
py
Python
SoftUni-Basic/conditional_statements/exercises/sum_seconds.py
Darkartt/SoftUni
23d65ddb9f1e454c9b1338a60dc52f5a64c30bc9
[ "MIT" ]
null
null
null
SoftUni-Basic/conditional_statements/exercises/sum_seconds.py
Darkartt/SoftUni
23d65ddb9f1e454c9b1338a60dc52f5a64c30bc9
[ "MIT" ]
null
null
null
SoftUni-Basic/conditional_statements/exercises/sum_seconds.py
Darkartt/SoftUni
23d65ddb9f1e454c9b1338a60dc52f5a64c30bc9
[ "MIT" ]
null
null
null
import math time_first = int(input()) time_second = int(input()) time_third = int(input()) time_total = time_first + time_second + time_third minutes = time_total / 60 seconds = time_total % 60 minutes = math.floor(minutes) if seconds < 10: print(f"{minutes}:0{seconds}") else: print(f"{minutes}:{seconds}"...
17.833333
50
0.694704
import math time_first = int(input()) time_second = int(input()) time_third = int(input()) time_total = time_first + time_second + time_third minutes = time_total / 60 seconds = time_total % 60 minutes = math.floor(minutes) if seconds < 10: print(f"{minutes}:0{seconds}") else: print(f"{minutes}:{seconds}"...
0
0
0
0
0
0
0
0
0
1b497317ae49a6c90d84306a0a250f271b310138
1,103
py
Python
arrays/knapsack.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
arrays/knapsack.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
arrays/knapsack.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
""" Problem below is i did not know what is the return, return list of items or return maximum def knapsack(items, cur_items_index, capacity, weights, profits, cur_items, cur_profit, cur_weight, max_items, max_profit): if (cur_items_index > len(items)-1) or \ cur_weight < ca...
19.017241
59
0.572983
""" Problem below is i did not know what is the return, return list of items or return maximum def knapsack(items, cur_items_index, capacity, weights, profits, cur_items, cur_profit, cur_weight, max_items, max_profit): if (cur_items_index > len(items)-1) or \ cur_weight < ca...
0
0
0
0
0
448
0
0
92
9a86321bc99e59584ded292cf3d45149e72fc968
18
py
Python
alphastarmini/core/rl/__init__.py
liuruoze/mini-AlphaStar
cf9de2507d526a5fb8ef67676aab2ffb92738640
[ "Apache-2.0" ]
108
2021-02-10T13:24:56.000Z
2022-03-21T09:58:28.000Z
alphastarmini/core/rl/__init__.py
liuruoze/mini-AlphaStar
cf9de2507d526a5fb8ef67676aab2ffb92738640
[ "Apache-2.0" ]
21
2021-04-09T18:46:05.000Z
2022-03-29T02:44:15.000Z
alphastarmini/core/rl/__init__.py
liuruoze/mini-AlphaStar
cf9de2507d526a5fb8ef67676aab2ffb92738640
[ "Apache-2.0" ]
19
2021-08-03T01:49:02.000Z
2022-03-30T10:21:13.000Z
print("rl init")
9
17
0.611111
print("rl init")
0
0
0
0
0
0
0
0
0
9a09ebfa2f810688ce7260dec841f4fdfca5030f
1,418
py
Python
src/aeat/zeep_plugins.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
7
2018-01-04T10:57:54.000Z
2021-07-30T09:56:22.000Z
src/aeat/zeep_plugins.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
18
2018-01-04T10:27:01.000Z
2018-02-20T13:56:19.000Z
src/aeat/zeep_plugins.py
initios/aeat-web-services
3e9533c6f5675df679ea6b42b07304ba938ebcb5
[ "MIT" ]
2
2018-11-07T09:07:50.000Z
2020-12-10T09:47:00.000Z
import logging logger = logging.getLogger(__name__)
28.938776
84
0.669958
import logging from lxml import etree from zeep import Plugin from aeat import utils, xml_signing logger = logging.getLogger(__name__) class SignMessagePlugin(Plugin): def __init__(self, cert_path, key_path): self.cert_path = cert_path self.key_path = key_path def egress(self, envelope, ht...
0
0
0
1,232
0
0
0
17
114
0299cbaad215befbf276c561c700aae7ec4b67af
400
py
Python
ProjectEuler/python/prob5.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
null
null
null
ProjectEuler/python/prob5.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
1
2015-03-25T22:35:52.000Z
2015-03-25T22:35:52.000Z
ProjectEuler/python/prob5.py
yuriyshapovalov/Prototypes
1fc4af4434440a8f59a4bcb486e79fd53d199a7d
[ "Apache-2.0" ]
null
null
null
# projecteuler.net/problem=5 if __name__ == '__main__': main()
19.047619
32
0.4625
# projecteuler.net/problem=5 def main(): answer = SmallestMultiple() print(answer) def SmallestMultiple(): num = 1 while True: found = True for i in range(1, 20): if num % i != 0: found = False break if found: ...
0
0
0
0
0
278
0
0
50
3c03c6604a634b3a6acbad3e149fefccfb24ec00
4,251
py
Python
src/sardana/taurus/core/tango/sardana/test/test_measgrpstress.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
43
2016-11-25T15:21:23.000Z
2021-08-20T06:09:40.000Z
src/sardana/taurus/core/tango/sardana/test/test_measgrpstress.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
1,263
2016-11-25T15:58:37.000Z
2021-11-02T22:23:47.000Z
src/sardana/taurus/core/tango/sardana/test/test_measgrpstress.py
marc2332/sardana
48dc9191baaa63f6c714d8c025e8f3f96548ad26
[ "CC-BY-3.0" ]
58
2016-11-21T11:33:55.000Z
2021-09-01T06:21:21.000Z
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
43.377551
78
0.646201
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
0
2,896
0
0
0
0
0
143
246
c968e0d7921d29de8adfe7443a130ae7c6d0a721
989
py
Python
bot_functions.py
lozik4/telegram_forward_message_bot
c38938e9cc54c3e460c0da84f62788a028d59a7c
[ "MIT" ]
null
null
null
bot_functions.py
lozik4/telegram_forward_message_bot
c38938e9cc54c3e460c0da84f62788a028d59a7c
[ "MIT" ]
null
null
null
bot_functions.py
lozik4/telegram_forward_message_bot
c38938e9cc54c3e460c0da84f62788a028d59a7c
[ "MIT" ]
null
null
null
import config import telebot bot = telebot.TeleBot(config.BOT_TOKEN) if __name__ == '__main__': bot.polling(none_stop=True)
32.966667
111
0.613751
import config import telebot bot = telebot.TeleBot(config.BOT_TOKEN) @bot.message_handler(commands=['start']) def welcome(message): if int(message.chat.id) not in config.CHAT_LIST: bot.send_message(config.OWNER_CHAT_ID, str(message.chat.id) + ': ' + f"{message.text} {message.fro...
4
810
0
0
0
0
0
0
46
d3e6742cee38d98b12987dc06da9bcb0ebcd9f0c
1,535
py
Python
src/simulation.py
bok/AI-with-Pyke
f56314679b7ade698237e585152b52a81d8ffbd4
[ "WTFPL" ]
10
2016-03-23T10:14:17.000Z
2022-01-18T09:04:02.000Z
src/simulation.py
mhbashari/AI-with-Pyke
f56314679b7ade698237e585152b52a81d8ffbd4
[ "WTFPL" ]
null
null
null
src/simulation.py
mhbashari/AI-with-Pyke
f56314679b7ade698237e585152b52a81d8ffbd4
[ "WTFPL" ]
3
2016-01-18T04:42:20.000Z
2019-11-09T19:36:23.000Z
#!/usr/bin/python2 # -*- coding: utf-8 -*- ##################################################################### # This program is free software. It comes without any warranty, to # # the extent permitted by applicable law. You can redistribute it # # and/or modify it under the terms of the Do What The Fuck You Wan...
26.465517
72
0.50684
#!/usr/bin/python2 # -*- coding: utf-8 -*- ##################################################################### # This program is free software. It comes without any warranty, to # # the extent permitted by applicable law. You can redistribute it # # and/or modify it under the terms of the Do What The Fuck You Wan...
2
0
0
0
0
0
0
0
0
d23ecf42866090a56ff27064afd591e5b295d316
296
py
Python
exercise063.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
exercise063.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
exercise063.py
AlissonRaphael/python_exercises
3f1185c4f2fff24c9fa2ffd6b60f90599044c985
[ "MIT" ]
null
null
null
n = int(input('---- Sequncia Fibonacci ----\nInsira a quantidade de termos: ')) t1 = 0 t2 = 1 print('{} -> {}'.format(t1, t2), end='') contador = 3 while contador <= n+1: t3 = t1 + t2 print(' -> {}'.format(t3) if contador != n+1 else ' -> Fim', end='') t1 = t2 t2 = t3 contador += 1
21.142857
80
0.537162
n = int(input('---- Sequência Fibonacci ----\nInsira a quantidade de termos: ')) t1 = 0 t2 = 1 print('{} -> {}'.format(t1, t2), end='') contador = 3 while contador <= n+1: t3 = t1 + t2 print(' -> {}'.format(t3) if contador != n+1 else ' -> Fim', end='') t1 = t2 t2 = t3 contador += 1
2
0
0
0
0
0
0
0
0
bcea2a15e3045a7bb54691ccb2044393f7af6f60
5,506
py
Python
pages/admin_pages.py
wilsonpe66/server-backend
16665d810fe1829f5dacc67f396b7cecf5af042f
[ "BSD-3-Clause" ]
1
2019-09-26T04:00:55.000Z
2019-09-26T04:00:55.000Z
pages/admin_pages.py
wilsonpe66/server-backend
16665d810fe1829f5dacc67f396b7cecf5af042f
[ "BSD-3-Clause" ]
2
2020-06-05T21:58:55.000Z
2021-06-10T21:45:08.000Z
pages/admin_pages.py
wilsonpe66/server-backend
16665d810fe1829f5dacc67f396b7cecf5af042f
[ "BSD-3-Clause" ]
1
2019-09-26T03:55:06.000Z
2019-09-26T03:55:06.000Z
from flask import Blueprint admin_pages = Blueprint('admin_pages', __name__) # TODO: Document. """########################## Login/Logoff ##################################"""
37.202703
115
0.710316
import json from flask import Blueprint, flash, Markup, redirect, render_template, request,\ session from libs import admin_authentication from libs.admin_authentication import authenticate_admin_login,\ authenticate_admin_study_access, get_admins_allowed_studies, get_admins_allowed_studies_as_query_set,\ ...
0
4,693
0
0
0
0
0
303
319
b697b66b0470d29f2c00ec28a6bf80479e97e41a
1,047
py
Python
thelma/repositories/rdb/mappers/stocksamplecreationiso.py
fogathmann/TheLMA
ac330a0005da4fea2f1387da9ff9938611ad1481
[ "MIT" ]
1
2020-07-12T22:47:58.000Z
2020-07-12T22:47:58.000Z
thelma/repositories/rdb/mappers/stocksamplecreationiso.py
papagr/TheLMA
d2dc7a478ee5d24ccf3cc680888e712d482321d0
[ "MIT" ]
null
null
null
thelma/repositories/rdb/mappers/stocksamplecreationiso.py
papagr/TheLMA
d2dc7a478ee5d24ccf3cc680888e712d482321d0
[ "MIT" ]
1
2020-07-12T22:40:36.000Z
2020-07-12T22:40:36.000Z
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Stock sample creation ISO mapper. """ from sqlalchemy.orm import relationship from everest.repositories.rdb.utils import mapper from thelma.entities.iso im...
33.774194
80
0.719198
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Stock sample creation ISO mapper. """ from sqlalchemy.orm import relationship from everest.repositories.rdb.utils import mapper from thelma.entities.iso im...
0
0
0
0
0
0
0
0
0
8dd65d8ff868d942dd315277a04f874fe386cf3e
2,154
py
Python
tls.py
0x1F9F1/binja-msvc
be2577c22c8d37fd1e2e211f80b1c9a920705bd2
[ "MIT" ]
9
2019-02-08T10:01:39.000Z
2021-04-29T12:27:34.000Z
tls.py
DatBrick/binja-msvc
751ffc1450c569bad23ac67a761d0f1fbd4ca4c4
[ "MIT" ]
1
2019-07-04T20:09:57.000Z
2019-07-12T11:10:15.000Z
tls.py
DatBrick/binja-msvc
751ffc1450c569bad23ac67a761d0f1fbd4ca4c4
[ "MIT" ]
2
2019-03-03T13:00:14.000Z
2020-05-01T05:35:04.000Z
from .utils import BinjaStruct IMAGE_TLS_DIRECTORY32_t = BinjaStruct('<IIIIII', names = ('StartAddressOfRawData', 'EndAddressOfRawData', 'AddressOfIndex', 'AddressOfCallBacks', 'SizeOfZeroFill', 'Characteristics')) IMAGE_TLS_DIRECTORY64_t = BinjaStruct('<QQQQII', names = ('StartAddressOfRawData', 'EndAddressOfRawDat...
46.826087
183
0.730269
from binaryninja import Symbol, Type, log from binaryninja.enums import SymbolType from .utils import BinjaStruct, read_pe_header, check_address IMAGE_TLS_DIRECTORY32_t = BinjaStruct('<IIIIII', names = ('StartAddressOfRawData', 'EndAddressOfRawData', 'AddressOfIndex', 'AddressOfCallBacks', 'SizeOfZeroFill', 'Charact...
0
0
0
0
0
1,591
0
70
90
c726280e9627ceab9a71757a18662167f8f69d59
4,097
py
Python
api/modules/categories.py
petrstehlik/pyngShop
61591b9982742bf9aad9a0e270737415e5649fbb
[ "MIT" ]
1
2018-02-07T19:22:38.000Z
2018-02-07T19:22:38.000Z
api/modules/categories.py
petrstehlik/pyngShop
61591b9982742bf9aad9a0e270737415e5649fbb
[ "MIT" ]
null
null
null
api/modules/categories.py
petrstehlik/pyngShop
61591b9982742bf9aad9a0e270737415e5649fbb
[ "MIT" ]
null
null
null
""" Author: Frederik Muller, xmulle20@stud.fit.vutbr.cz Author: Matej Vido, xvidom00@stud.fit.vutbr.cz Date: 04/2017 """ from api.module import Module category = Module('categories', __name__, url_prefix='/categories', no_version=True) category.add_url_rule('', view_func=get_categories, methods=['GET']) category.ad...
29.056738
93
0.742006
""" Author: Frederik Muller, xmulle20@stud.fit.vutbr.cz Author: Matej Vido, xvidom00@stud.fit.vutbr.cz Date: 04/2017 """ import bcrypt from flask import request from bson import json_util, ObjectId import pymongo from slugify import slugify from api import auth, db from api.module import Module from api.models.mode...
0
2,561
0
0
0
542
0
53
293
4cef688f598302dd4fb8215e03856c14259b75f8
314
py
Python
models/amenity.py
jj131204/AirBnB_clone
c07cc6c08c6d20df3fc0551ce36b7aa4b828e051
[ "MIT" ]
null
null
null
models/amenity.py
jj131204/AirBnB_clone
c07cc6c08c6d20df3fc0551ce36b7aa4b828e051
[ "MIT" ]
null
null
null
models/amenity.py
jj131204/AirBnB_clone
c07cc6c08c6d20df3fc0551ce36b7aa4b828e051
[ "MIT" ]
1
2021-07-07T21:37:54.000Z
2021-07-07T21:37:54.000Z
#!/usr/bin/python3 """ Amenity module """
20.933333
48
0.595541
#!/usr/bin/python3 """ Amenity module """ from models.base_model import BaseModel class Amenity(BaseModel): """ Amenity class implementation """ name = "" def __init__(self, *args, **kwargs): """ Initialize in parent class """ super().__init__(self, *args, **kwargs)
0
0
0
200
0
0
0
18
50
90378822fa36a0f7b05207caf56d8e08472ffb30
2,839
py
Python
runner/notes/task.py
makeshmakesh/copper-sdk
c938adb39737822d0bfe17c052ca43898eb2a1c3
[ "MIT" ]
null
null
null
runner/notes/task.py
makeshmakesh/copper-sdk
c938adb39737822d0bfe17c052ca43898eb2a1c3
[ "MIT" ]
1
2021-04-15T00:10:50.000Z
2021-04-15T00:10:50.000Z
runner/notes/task.py
makeshmakesh/copper-sdk
c938adb39737822d0bfe17c052ca43898eb2a1c3
[ "MIT" ]
4
2021-01-07T05:30:49.000Z
2021-09-13T08:08:54.000Z
from copper_sdk.notes import NoteTarget import names_generator import json import shared_procs def create_task_note(copper_client, task_id, user_id): """Create a note for a Task Attributes: copper_client (copper_sdk.copper): The CopperSDK client. task_id (str): The ...
25.123894
69
0.659035
from copper_sdk.notes import NoteTarget import names_generator import json import shared_procs def create_task_note(copper_client, task_id, user_id): """Create a note for a Task Attributes: copper_client (copper_sdk.copper): The CopperSDK client. task_id (str): The ...
0
0
0
0
0
453
0
0
23
224035c0366a11ebad1bfd43ff365d8376f86e1c
328
py
Python
editquality/codegen/tests/test_generate.py
paulkernfeld/editquality
029f21278d89d6e50b0eac7b39d8355f8e4686f4
[ "MIT" ]
18
2019-03-13T23:26:07.000Z
2021-12-31T00:57:16.000Z
editquality/codegen/tests/test_generate.py
paulkernfeld/editquality
029f21278d89d6e50b0eac7b39d8355f8e4686f4
[ "MIT" ]
98
2015-12-13T12:18:24.000Z
2018-08-07T21:10:46.000Z
editquality/codegen/tests/test_generate.py
paulkernfeld/editquality
029f21278d89d6e50b0eac7b39d8355f8e4686f4
[ "MIT" ]
17
2015-09-29T20:52:12.000Z
2018-08-20T11:33:30.000Z
import os.path from .. import generate TEST_PATH = os.path.dirname(__file__)
17.263158
59
0.594512
import os.path from .. import generate TEST_PATH = os.path.dirname(__file__) def test_generate_params(): params = { 'foo': 'abc', 'bar': 'def', } template = "{{ foo }}{{ bar }}" expected = "abcdef\n" actual = generate.generate(params, TEST_PATH, template) assert expected ==...
0
0
0
0
0
224
0
0
23
1419fdc8d5e49e33480adbbeae6baecc459e36d8
2,477
py
Python
test/cli_test/base.py
nprint/nPrintML
69e56036fd7ab6b050cbe81b31309c06f166f0f2
[ "Apache-2.0" ]
13
2020-11-04T14:57:12.000Z
2021-11-18T08:50:00.000Z
test/cli_test/base.py
nprint/nPrintML
69e56036fd7ab6b050cbe81b31309c06f166f0f2
[ "Apache-2.0" ]
60
2020-10-22T16:08:14.000Z
2021-12-14T23:00:36.000Z
test/cli_test/base.py
nprint/nprintml
69e56036fd7ab6b050cbe81b31309c06f166f0f2
[ "Apache-2.0" ]
1
2021-12-16T01:10:18.000Z
2021-12-16T01:10:18.000Z
import pathlib TEST_ROOT = pathlib.Path(__file__).parent.parent TEST_DATA = TEST_ROOT / 'data' def testdir(func): """Decorator to wrap given function such that a temporary directory is created and destroyed for each invocation. """ return wrapper
27.21978
82
0.603553
import contextlib import functools import io import pathlib import sys import typing import unittest from nprintml import cli from test.base import mktestdir TEST_ROOT = pathlib.Path(__file__).parent.parent TEST_DATA = TEST_ROOT / 'data' def testdir(func): """Decorator to wrap given function such that a temp...
0
376
0
1,612
0
0
0
-33
250
490e5c475bc83d2f42ea4de089689f8d1276f355
5,941
py
Python
python/sparkts/datetimeindex.py
ypramos1986/spark-timeseries
e81bebd2d158477c077a5e35d048f4c90b991154
[ "Apache-2.0" ]
1
2018-01-30T18:32:07.000Z
2018-01-30T18:32:07.000Z
python/sparkts/datetimeindex.py
ypramos1986/spark-timeseries
e81bebd2d158477c077a5e35d048f4c90b991154
[ "Apache-2.0" ]
null
null
null
python/sparkts/datetimeindex.py
ypramos1986/spark-timeseries
e81bebd2d158477c077a5e35d048f4c90b991154
[ "Apache-2.0" ]
null
null
null
from .utils import datetime_to_nanos def uniform(start, end=None, periods=None, freq=None, sc=None): """ Instantiates a uniform DateTimeIndex. Either end or periods must be specified. Parameters ---------- start : string, long (nanos from epoch), or Pandas Timestamp end : stri...
34.74269
101
0.66504
from py4j.java_gateway import java_import from .utils import datetime_to_nanos import numpy as np import pandas as pd class DateTimeIndex(object): """ A DateTimeIndex maintains a bi-directional mapping between integers and an ordered collection of date-times. Multiple date-times may correspond to the same ...
0
0
0
4,153
0
0
0
15
181
c1e20d70880881a9bc4a9d9ab9bb1e131bcbe8a5
22,838
py
Python
MainWindow.py
Linzecong/ExcelDiffer
97ee053cf29f70e401e9ddc65fc2f79d5da2d923
[ "Apache-2.0" ]
20
2019-03-04T11:11:30.000Z
2022-03-14T06:52:46.000Z
MainWindow.py
hubuyaolian/ExcelDiffer-1
97ee053cf29f70e401e9ddc65fc2f79d5da2d923
[ "Apache-2.0" ]
3
2019-03-04T11:12:44.000Z
2022-01-12T18:06:15.000Z
MainWindow.py
hubuyaolian/ExcelDiffer-1
97ee053cf29f70e401e9ddc65fc2f79d5da2d923
[ "Apache-2.0" ]
8
2019-03-28T11:07:39.000Z
2022-01-03T19:45:52.000Z
#-*- codingg:utf8 -*- from PyQt5.QtWidgets import QApplication from PyQt5.QtGui import QIcon import sys if __name__=="__main__": app = QApplication(sys.argv) main = MainWindow() main.setWindowIcon(QIcon("icon/opennew.ico")) main.show() sys.exit(app.exec_())
43.500952
193
0.645853
#-*- codingg:utf8 -*- from PyQt5.QtWidgets import QMainWindow,QFontDialog, QApplication,QMenu,QAction,QFileDialog,QDockWidget,QMessageBox,QDesktopWidget,QTableWidget from PyQt5.QtGui import QIcon,QFont,QKeySequence from PyQt5.QtCore import Qt,QSettings,QThread,pyqtSignal from ViewWidget import ViewWidget from DiffWidge...
1,800
0
0
21,494
0
0
0
261
202
00cc25d42e5c0a922ec20410dc202c6de8269caf
2,130
py
Python
core/layers/convolutional.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
core/layers/convolutional.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
core/layers/convolutional.py
luckylwk/neural-network-theano
420c89e7028fcd9671866918c22a837d04387012
[ "MIT" ]
null
null
null
__all__ = [ "Convolutional2DLayer" ]
29.178082
119
0.624883
import numpy as np import theano from ..utils.activation import * from ..utils import weights from .base import Layer __all__ = [ "Convolutional2DLayer" ] class Convolutional2DLayer(Layer): ''' Standard Convolutional 2D Layer ''' def __init__( self, kernels=8, kernelSize=(3,3), kernelStride=1, **kwargs )...
0
0
0
1,943
0
0
0
8
135
1f1bf8f5346cc8b928d9001b4cf006dae1340144
10,791
py
Python
sdk/python/pulumi_okta/idp/get_oidc.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
5
2019-10-29T21:59:22.000Z
2021-11-08T12:00:24.000Z
sdk/python/pulumi_okta/idp/get_oidc.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
109
2020-01-06T10:28:09.000Z
2022-03-25T19:52:40.000Z
sdk/python/pulumi_okta/idp/get_oidc.py
pulumi/pulumi-okta
83f7617a85b3d05213901773fa4e6a151ab6076b
[ "ECL-2.0", "Apache-2.0" ]
2
2020-09-11T16:31:04.000Z
2020-11-24T12:23:17.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi import pulumi.runtime from typing import Optional from .. import _utilities __all__ = [ 'GetOidcResult', 'Awaitab...
36.456081
349
0.643963
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
0
7,783
0
913
0
0
0
35
69
78649f653658eb525ecfda8006945a0bc03fb895
430
py
Python
python_practice/python_tricks/chp3/decorator/example_5-1.py
sokunmin/deep_learning_practices
49e1a08adbfcd2054adb1c08236d57405fad14d3
[ "Apache-2.0" ]
null
null
null
python_practice/python_tricks/chp3/decorator/example_5-1.py
sokunmin/deep_learning_practices
49e1a08adbfcd2054adb1c08236d57405fad14d3
[ "Apache-2.0" ]
null
null
null
python_practice/python_tricks/chp3/decorator/example_5-1.py
sokunmin/deep_learning_practices
49e1a08adbfcd2054adb1c08236d57405fad14d3
[ "Apache-2.0" ]
null
null
null
# ----------------- Debuggable Decorators ----------------- # # [1] metadata attached to original function is hidden def greet(): """return a friendly greeting. """ return 'Hi, there!' print(greet.__name__) print(greet.__doc__) decorated_greet = uppercase(greet) print(decorated_greet.__name__) print(deco...
19.545455
61
0.651163
# ----------------- Debuggable Decorators ----------------- # def uppercase(func): def wrapper(): return func().upper() return wrapper # [1] metadata attached to original function is hidden def greet(): """return a friendly greeting. """ return 'Hi, there!' print(greet.__name__) print(gree...
0
0
0
0
0
67
0
0
22
34146f89f88df887ca2126f16ca343ed46b8ebce
37,694
py
Python
qiskit/ignis/verification/nonlocality/bell_nonlocality.py
anndero/qiskit-ignis
7e4619dfdcb00e5c601e035083c6ea709b23b075
[ "Apache-2.0" ]
null
null
null
qiskit/ignis/verification/nonlocality/bell_nonlocality.py
anndero/qiskit-ignis
7e4619dfdcb00e5c601e035083c6ea709b23b075
[ "Apache-2.0" ]
null
null
null
qiskit/ignis/verification/nonlocality/bell_nonlocality.py
anndero/qiskit-ignis
7e4619dfdcb00e5c601e035083c6ea709b23b075
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modi...
44.714116
119
0.532048
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modi...
0
2,467
0
33,711
0
0
0
74
183
965c347bd3b26e1f4421f05b0bae79f27969df24
1,491
py
Python
repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
21
2018-11-20T15:58:39.000Z
2022-03-15T19:57:24.000Z
repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
732
2018-11-21T18:33:26.000Z
2022-03-31T16:16:24.000Z
repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/tests/test_load_tasks_rpmtransactionconfigtaskscollector.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
85
2018-11-20T17:55:00.000Z
2022-03-29T09:40:31.000Z
RH_PACKAGER = 'Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>'
39.236842
106
0.657277
import logging from leapp.libraries.actor.rpmtransactionconfigtaskscollector import load_tasks, load_tasks_file from leapp.libraries.stdlib import api from leapp.models import RPM, InstalledRedHatSignedRPM RH_PACKAGER = 'Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>' def test_load_tasks(tmpdir, monkeypatch): ...
0
0
0
0
891
276
0
118
135