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
22e987fdaffc1da25e1f0e351d6a5f530f8a1785
48
py
Python
sensor/__init__.py
Boquete/smoger
ceb25137684334cba0625ca669c6e786c27bbb06
[ "Apache-2.0" ]
2
2018-03-13T18:22:18.000Z
2018-03-24T16:48:26.000Z
sensor/__init__.py
Boquete/smoger
ceb25137684334cba0625ca669c6e786c27bbb06
[ "Apache-2.0" ]
null
null
null
sensor/__init__.py
Boquete/smoger
ceb25137684334cba0625ca669c6e786c27bbb06
[ "Apache-2.0" ]
null
null
null
default_app_config = 'sensor.apps.SmogerConfig'
24
47
0.833333
default_app_config = 'sensor.apps.SmogerConfig'
0
0
0
0
0
0
0
0
0
63a39dd2b74d99d3ae37afd2f983746c46666c93
67
py
Python
lectures/code/list_filter.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
4
2015-08-10T17:46:55.000Z
2020-04-18T21:09:03.000Z
lectures/code/list_filter.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
null
null
null
lectures/code/list_filter.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
2
2019-04-24T03:31:02.000Z
2019-05-13T07:36:06.000Z
l = range(8) print filter(lambda x: x % 2 == 0, l) # [0, 2, 4, 6]
13.4
37
0.492537
l = range(8) print filter(lambda x: x % 2 == 0, l) # [0, 2, 4, 6]
0
0
0
0
0
0
0
0
0
5df99fe4deec0c6b7e42e4e7c61cbe46113104c4
3,014
py
Python
tests/pystrings/test_lineup_students.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
tests/pystrings/test_lineup_students.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
tests/pystrings/test_lineup_students.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
s1 = "Tadashi Takahiro Takao Takashi Takayuki Takehiko Takeo Takeshi Takeshi" lst1 = [ "Takehiko", "Takayuki", "Takahiro", "Takeshi", "Takeshi", "Takashi", "Tadashi", "Takeo", "Takao", ] s2 = "Michio Miki Mikio Minori Minoru Mitsuo Mitsuru Nao Naoki Naoko Noboru Nobu Nobuo ,Nobuyu...
19.828947
747
0.585601
import unittest from pystrings.lineup_students import lineup_students s1 = "Tadashi Takahiro Takao Takashi Takayuki Takehiko Takeo Takeshi Takeshi" lst1 = [ "Takehiko", "Takayuki", "Takahiro", "Takeshi", "Takeshi", "Takashi", "Tadashi", "Takeo", "Takao", ] s2 = "Michio Miki Mikio...
0
0
0
239
0
0
0
26
68
2a7726202ca6d690fb3d53d3381336f8576ffc4e
4,179
py
Python
unittest/scripts/auto/py_shell/validation/plugin_cli_integration_norecord.py
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
null
null
null
unittest/scripts/auto/py_shell/validation/plugin_cli_integration_norecord.py
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
1
2021-09-12T22:07:06.000Z
2021-09-12T22:07:06.000Z
unittest/scripts/auto/py_shell/validation/plugin_cli_integration_norecord.py
mueller/mysql-shell
29bafc5692bd536a12c4e41c54cb587375fe52cf
[ "Apache-2.0" ]
null
null
null
#@<OUT> CLI --help The following objects provide command line operations: cli_tester CLI Integration Testing Plugin cluster Represents an InnoDB cluster. dba InnoDB cluster and replicaset management functions. rs Represents an InnoDB ReplicaSet. shell Gives access to ge...
25.796296
81
0.734865
#@<OUT> CLI --help The following objects provide command line operations: cli_tester CLI Integration Testing Plugin cluster Represents an InnoDB cluster. dba InnoDB cluster and replicaset management functions. rs Represents an InnoDB ReplicaSet. shell Gives access to ge...
0
0
0
0
0
0
0
0
0
36840bcc724e35743cfcc58a05740a503f98cad9
2,507
py
Python
neurons/form/test/__init__.py
plq/neurons
f3627975daa3662e3a14265dca1150799ca0d27a
[ "BSD-3-Clause" ]
4
2015-07-14T09:37:11.000Z
2017-01-07T09:55:59.000Z
neurons/form/test/__init__.py
arskom/neurons
d969dbac6c10a5cc1da32031740883e450889414
[ "BSD-3-Clause" ]
3
2016-06-02T13:52:38.000Z
2018-11-22T08:55:20.000Z
neurons/form/test/__init__.py
plq/neurons
f3627975daa3662e3a14265dca1150799ca0d27a
[ "BSD-3-Clause" ]
7
2015-02-01T14:02:33.000Z
2016-07-21T20:14:23.000Z
# encoding: utf8 # # This file is part of the Neurons project. # Copyright (c), Arskom Ltd. (arskom.com.tr), # Burak Arslan <burak.arslan@arskom.com.tr>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following...
38.569231
80
0.69645
# encoding: utf8 # # This file is part of the Neurons project. # Copyright (c), Arskom Ltd. (arskom.com.tr), # Burak Arslan <burak.arslan@arskom.com.tr>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following...
0
0
0
0
0
763
0
1
46
c1ed7b55dbc27e47f041d53b097d4e35886d4daf
779
py
Python
storagedef/tests/test_session.py
gjo/storagedef
f5574378220369441c5480cb10d77f7b739e25be
[ "BSD-3-Clause" ]
null
null
null
storagedef/tests/test_session.py
gjo/storagedef
f5574378220369441c5480cb10d77f7b739e25be
[ "BSD-3-Clause" ]
null
null
null
storagedef/tests/test_session.py
gjo/storagedef
f5574378220369441c5480cb10d77f7b739e25be
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*-
31.16
74
0.657253
# -*- coding: utf-8 -*- import unittest class SessionTestCase(unittest.TestCase): def test_load_localmemory(self): from ..session import Session from ..engines.localmemory import LocalMemoryStorageEngine session = Session.from_config({ 'provider': 'storagedef....
0
0
0
714
0
0
0
-6
46
658e89ebe4dc3efb089e3dfff25af7b188ed2930
1,922
py
Python
python/gini.py
bpalmer4/code-snippets
e87f7baade69ff25e062f54d58b3f6f611c4c283
[ "MIT" ]
null
null
null
python/gini.py
bpalmer4/code-snippets
e87f7baade69ff25e062f54d58b3f6f611c4c283
[ "MIT" ]
null
null
null
python/gini.py
bpalmer4/code-snippets
e87f7baade69ff25e062f54d58b3f6f611c4c283
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np def gini(x): """Calculate the Gini coefficient for series of observed values (x). where: * x is the array of observed values (and all x are positive, non-zero values) Note: x must be a numpy array or a pandas series See: https://www.statsdirect.com/help/def...
33.137931
84
0.631113
import pandas as pd import numpy as np def gini(x): """Calculate the Gini coefficient for series of observed values (x). where: * x is the array of observed values (and all x are positive, non-zero values) Note: x must be a numpy array or a pandas series See: https://www.statsdirect.com/help/def...
0
0
0
0
0
0
0
0
0
c9a2aaa41b86faa1fb98953ab14ca22b8ca32369
3,160
py
Python
plugins/data/extract/link/referer-parser/sync_data.py
sniperkit/colly
4d1ea7dfb014b9ef4857bd9f24cad223a723938f
[ "Apache-2.0" ]
2
2020-11-07T14:45:16.000Z
2020-12-19T20:26:15.000Z
plugins/data/extract/link/referer-parser/sync_data.py
sniperkit/colly
4d1ea7dfb014b9ef4857bd9f24cad223a723938f
[ "Apache-2.0" ]
5
2021-03-10T09:06:43.000Z
2022-02-27T00:15:52.000Z
vendor/snowplow/referer-parser/sync_data.py
Jihun0109/marketing
c34f3a67cfbb2f7ea004cef9ac210c0eb5e4893c
[ "MIT" ]
1
2019-09-20T20:44:02.000Z
2019-09-20T20:44:02.000Z
#!/usr/bin/env python # Copyright (c) 2013 Martin Katrenik, Snowplow Analytics Ltd. All rights reserved. # # This program is licensed to you under the Apache License Version 2.0, # and you may not use this file except in compliance with the Apache # License Version 2.0. # You may obtain a copy of the Apache License Ve...
30.384615
139
0.713291
#!/usr/bin/env python # Copyright (c) 2013 Martin Katrenik, Snowplow Analytics Ltd. All rights reserved. # # This program is licensed to you under the Apache License Version 2.0, # and you may not use this file except in compliance with the Apache # License Version 2.0. # You may obtain a copy of the Apache License Ve...
0
0
0
0
0
575
0
-28
178
1aad48197290a7a10b69c9b0eba6aad4a26e0194
476
py
Python
core/handle_config.py
willdx/sensor_agent
28eebc8cb17dc53b5657d3898a196724da882ac8
[ "MIT" ]
null
null
null
core/handle_config.py
willdx/sensor_agent
28eebc8cb17dc53b5657d3898a196724da882ac8
[ "MIT" ]
null
null
null
core/handle_config.py
willdx/sensor_agent
28eebc8cb17dc53b5657d3898a196724da882ac8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' File Name: handle_config.py Author: WillDX mail: xiang.dai@shuyun.com Created Time: 20160419 093658 '''
23.8
61
0.701681
# -*- coding: utf-8 -*- ''' File Name: handle_config.py Author: WillDX mail: xiang.dai@shuyun.com Created Time: 2016年04月19日 星期二 09时36分58秒 ''' import json from ConfigParser import ConfigParser def handle(configfile,item_name): #print "[configfile]:%s" % configfile cp = ConfigParser() cp.read(configfile) ...
69
0
0
0
0
246
0
6
67
010a24de4b223fa7a4bf486d182055d2f5cfb459
88,207
py
Python
main.py
JunweiLiang/Object_Detection_Tracking
f86caaec97669a6da56f1b402cca4e179a85d2f0
[ "MIT" ]
328
2019-05-27T03:09:02.000Z
2022-03-31T05:12:04.000Z
main.py
AnjaliPC/Object_Detection_Tracking
f86caaec97669a6da56f1b402cca4e179a85d2f0
[ "MIT" ]
43
2019-06-05T14:04:09.000Z
2022-01-25T03:16:39.000Z
main.py
AnjaliPC/Object_Detection_Tracking
f86caaec97669a6da56f1b402cca4e179a85d2f0
[ "MIT" ]
107
2019-05-27T06:26:38.000Z
2022-03-25T03:32:58.000Z
# coding=utf-8 """ main script for training and testing mask rcnn on MSCOCO/DIVA/MEVA dataset multi gpu version """ import time import os import threading # so here won"t have poll allocator info os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # solve the issue of a bug in while loop, when you import the graph in # multi-...
38.704256
131
0.612831
# coding=utf-8 """ main script for training and testing mask rcnn on MSCOCO/DIVA/MEVA dataset multi gpu version """ import argparse import cv2 import math import json import random import operator import time import os import pickle import sys import threading # so here won"t have poll allocator info os.environ["T...
0
0
0
0
0
83,635
0
326
1,241
e161d2751528bb56774b08bbf120664eaeffc03a
1,929
py
Python
estimators/single_ix_stratification.py
saadlabyad/aslsd
95a1cc660079972b45a77ec6dc587d9225489212
[ "BSD-3-Clause" ]
null
null
null
estimators/single_ix_stratification.py
saadlabyad/aslsd
95a1cc660079972b45a77ec6dc587d9225489212
[ "BSD-3-Clause" ]
null
null
null
estimators/single_ix_stratification.py
saadlabyad/aslsd
95a1cc660079972b45a77ec6dc587d9225489212
[ "BSD-3-Clause" ]
null
null
null
# License: BSD 3 clause
35.072727
75
0.567652
# License: BSD 3 clause import numpy as np class SingleIxStratification: def __init__(self, n_events_i, **kwargs): self.n_events_i = n_events_i self.n_exact = kwargs.get('n_exact', 10**4) self.strata = kwargs.get('strata', None) self.n_strata = kwargs.get('n_strata', Non...
0
0
0
1,855
0
0
0
-3
50
7cdbc9bb02cf3f232c29d81fee332bc8cb2ff426
10,611
py
Python
tests/integration/resources_permissions/test_modules_resources.py
aavcc/taiga-openshift
7c33284573ceed38f755b8159ad83f3f68d2f7cb
[ "MIT" ]
null
null
null
tests/integration/resources_permissions/test_modules_resources.py
aavcc/taiga-openshift
7c33284573ceed38f755b8159ad83f3f68d2f7cb
[ "MIT" ]
12
2019-11-25T14:08:32.000Z
2021-06-24T10:35:51.000Z
tests/integration/resources_permissions/test_modules_resources.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
1
2018-06-07T10:58:15.000Z
2018-06-07T10:58:15.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jess Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragn <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2017 Anler Hernndez <he...
46.336245
113
0.628499
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2017 Anler Hernández ...
6
4,152
0
0
0
4,716
0
286
408
cd2800c70b3b2e622fe1914ac86a58e45bb8462d
5,068
py
Python
rssdldmng/rssdldapi.py
alexpayne482/rssdldmng
4428f10171902861702fc0f528d3d9576923541a
[ "MIT" ]
null
null
null
rssdldmng/rssdldapi.py
alexpayne482/rssdldmng
4428f10171902861702fc0f528d3d9576923541a
[ "MIT" ]
1
2019-11-25T15:54:02.000Z
2019-11-25T15:54:02.000Z
rssdldmng/rssdldapi.py
alexpayne482/rssdldmng
4428f10171902861702fc0f528d3d9576923541a
[ "MIT" ]
null
null
null
import logging _LOGGER = logging.getLogger(__name__)
38.687023
112
0.545185
import logging from rssdldmng.utils.restserver import RESTHttpServer _LOGGER = logging.getLogger(__name__) class ApiServer(RESTHttpServer): def __init__(self, port, mng): self.routes = { r'^/$': {'file': '/index.html', 'media_type': 'text/html'}, r'^\/(...
0
0
0
4,927
0
0
0
32
50
c67749db26476426cc9820a06907a762ef3a4bc1
4,477
py
Python
vimeoct/settings.py
nkawa/vimeo-coursetool
729215fe23b1bf05918a38d21e585a7b8862e75a
[ "Apache-2.0" ]
null
null
null
vimeoct/settings.py
nkawa/vimeo-coursetool
729215fe23b1bf05918a38d21e585a7b8862e75a
[ "Apache-2.0" ]
null
null
null
vimeoct/settings.py
nkawa/vimeo-coursetool
729215fe23b1bf05918a38d21e585a7b8862e75a
[ "Apache-2.0" ]
null
null
null
""" Django settings for vimeoct project. Generated by 'django-admin startproject' using Django 3.2.8. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from dotenv ...
26.181287
91
0.715881
""" Django settings for vimeoct project. Generated by 'django-admin startproject' using Django 3.2.8. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from dotenv ...
0
0
0
0
0
0
0
0
0
170b9d642252f24e9587f0ac465d2676a5e83e22
478
py
Python
discord/ext/wizard/__init__.py
Makiyu-py/discord-ext-wizard
59bd066ab451ee41d267aefe5f71e8485f6bc4a0
[ "MIT" ]
4
2021-04-02T16:16:50.000Z
2021-08-03T13:21:45.000Z
discord/ext/wizard/__init__.py
Makiyu-py/discord-ext-wizard
59bd066ab451ee41d267aefe5f71e8485f6bc4a0
[ "MIT" ]
7
2021-05-14T11:31:50.000Z
2021-05-27T09:06:45.000Z
discord/ext/wizard/__init__.py
Makiyu-py/discord-ext-wizard
59bd066ab451ee41d267aefe5f71e8485f6bc4a0
[ "MIT" ]
1
2021-05-18T23:58:23.000Z
2021-05-18T23:58:23.000Z
from collections import namedtuple _VersionInfo = namedtuple("_VersionInfo", "major minor patch") version_info = _VersionInfo(0, 3, 0) __version__ = ".".join(str(v) for v in version_info) __license__ = "MIT" __author__ = "FalseDev" __title__ = "discord-ext-wizard" __copyright__ = "Copyright 2021 {}".format(__author__...
28.117647
66
0.738494
from collections import namedtuple _VersionInfo = namedtuple("_VersionInfo", "major minor patch") version_info = _VersionInfo(0, 3, 0) __version__ = ".".join(str(v) for v in version_info) __license__ = "MIT" __author__ = "FalseDev" __title__ = "discord-ext-wizard" __copyright__ = "Copyright 2021 {}".format(__author__...
0
0
0
0
0
0
0
0
89
d2a1e5d665881867fbf743ab4d526c8f32e55e2d
14,088
py
Python
trans_ms/transport_management/doctype/transportation_order/transportation_order.py
mohsinalimat/transport
3d32bd27f505f64b948f48d0bfc5c7ccaf61c4a2
[ "MIT" ]
null
null
null
trans_ms/transport_management/doctype/transportation_order/transportation_order.py
mohsinalimat/transport
3d32bd27f505f64b948f48d0bfc5c7ccaf61c4a2
[ "MIT" ]
null
null
null
trans_ms/transport_management/doctype/transportation_order/transportation_order.py
mohsinalimat/transport
3d32bd27f505f64b948f48d0bfc5c7ccaf61c4a2
[ "MIT" ]
null
null
null
# Copyright (c) 2021, Aakvatech Limited and contributors # For license information, please see license.txt # import frappe from __future__ import unicode_literals
37.870968
158
0.565233
# Copyright (c) 2021, Aakvatech Limited and contributors # For license information, please see license.txt # import frappe from __future__ import unicode_literals import frappe import time import datetime from frappe.model.document import Document from frappe import _ import json from frappe.utils import nowdate from ...
0
6,309
0
7,293
0
0
0
26
291
c94324dc07f3d22abb00e60ed1680dcaf4d026ca
2,149
py
Python
vc3/preprocess.py
ta1fukawa/vc-beta
c3a80c44be90f72bfe0bcac08f27c4882700c9b6
[ "MIT" ]
null
null
null
vc3/preprocess.py
ta1fukawa/vc-beta
c3a80c44be90f72bfe0bcac08f27c4882700c9b6
[ "MIT" ]
null
null
null
vc3/preprocess.py
ta1fukawa/vc-beta
c3a80c44be90f72bfe0bcac08f27c4882700c9b6
[ "MIT" ]
null
null
null
import argparse import pathlib import sys if __name__ == '__main__': parser = argparse.ArgumentParser(description='Convert wav to mel spectrogram') parser.add_argument('wav_dir', type=pathlib.Path, help='path to directory of speaker directories containing wav files') parser.add_argument('mel_dir', ...
33.578125
128
0.642624
import argparse import pathlib import sys import torch import torchaudio import yaml import common def main(wav_dir, mel_dir, embed_dir, encoder_path, config_path): device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') encoder = torch.load(encoder_path).to(device).eval() config = yaml.l...
0
0
0
0
0
1,091
0
-31
113
6d53251e78bb7ec25c3252e40a239ccdb6143e6e
5,948
py
Python
docweb/views_wiki.py
pv/pydocweb
05c7b69c3903e2bb90cca511f18f9c10d7926cc6
[ "BSD-3-Clause" ]
2
2016-07-26T17:13:00.000Z
2017-12-13T12:46:46.000Z
docweb/views_wiki.py
pv/pydocweb
05c7b69c3903e2bb90cca511f18f9c10d7926cc6
[ "BSD-3-Clause" ]
null
null
null
docweb/views_wiki.py
pv/pydocweb
05c7b69c3903e2bb90cca511f18f9c10d7926cc6
[ "BSD-3-Clause" ]
null
null
null
import pydocweb.docweb.rst as rst #------------------------------------------------------------------------------ # Wiki #------------------------------------------------------------------------------ WIKI_CACHE_AGE = 60
37.408805
118
0.535138
import pydocweb.docweb.rst as rst from pydocweb.docweb.utils import * from pydocweb.docweb.models import * from views_docstring import EditForm #------------------------------------------------------------------------------ # Wiki #------------------------------------------------------------------------------ WIKI_C...
0
2,424
0
0
0
3,052
0
44
205
32b11fcdda72235ee222465e07bdb3c68d9c7cb7
3,006
py
Python
src/app.py
colin-chang/md2html
9fba39ee309c61515955090690b801fc37845e91
[ "MIT" ]
1
2020-01-06T10:07:17.000Z
2020-01-06T10:07:17.000Z
src/app.py
colin-chang/md2html
9fba39ee309c61515955090690b801fc37845e91
[ "MIT" ]
null
null
null
src/app.py
colin-chang/md2html
9fba39ee309c61515955090690b801fc37845e91
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from platform import system input_arg = output_arg = None if __name__ == "__main__": if system() != 'Linux' and system() != 'Darwin': print('only linux is supported currently') else: main()
31.978723
86
0.57352
# -*- coding:utf-8 -*- import shutil import os import sys import subprocess from platform import system input_arg = output_arg = None def main(): args = sys.argv if len(args) < 3: print('missing 2 required positional argument:"input","output"') return global input_arg, output_arg in...
0
0
0
0
0
2,641
0
-35
157
a61f85fa9ce56be8d28765166b20414be4530278
2,571
py
Python
church/cli.py
mdickinson/alonzo
a66d4c253c9f4338ebf1177a0b0e84bf7cc9c0f6
[ "Apache-2.0" ]
null
null
null
church/cli.py
mdickinson/alonzo
a66d4c253c9f4338ebf1177a0b0e84bf7cc9c0f6
[ "Apache-2.0" ]
null
null
null
church/cli.py
mdickinson/alonzo
a66d4c253c9f4338ebf1177a0b0e84bf7cc9c0f6
[ "Apache-2.0" ]
null
null
null
""" To do: - catch KeyboardInterrupt while evaluating - show all? - show statistics - fix up exception handling; decorator? """ INTRO_TEXT = """\ Welcome to the interactive lambda calculus interpreter. Type 'help' to see supported commands. """
23.587156
65
0.580319
""" To do: - catch KeyboardInterrupt while evaluating - show all? - show statistics - fix up exception handling; decorator? """ import cmd from church.ast import ParseError from church.environment import ( UndefinedNameError, ) from church.eval import ( environment, reduce, Suspension, ) from church....
0
0
0
1,999
0
0
0
166
156
d1fae01ff815b39362b9f115804b8421474f2b1b
600
py
Python
big_data/maps/convert_rates_tsv_to_json.py
paulhtremblay/big-data
dfa2aa9877300a57e7a9368af59c07fcc5841b4f
[ "MIT" ]
null
null
null
big_data/maps/convert_rates_tsv_to_json.py
paulhtremblay/big-data
dfa2aa9877300a57e7a9368af59c07fcc5841b4f
[ "MIT" ]
7
2020-06-05T18:13:25.000Z
2022-03-11T23:19:48.000Z
big_data/maps/convert_rates_tsv_to_json.py
paulhtremblay/big-data
dfa2aa9877300a57e7a9368af59c07fcc5841b4f
[ "MIT" ]
1
2020-11-25T18:24:37.000Z
2020-11-25T18:24:37.000Z
import pprint pp = pprint.PrettyPrinter(indent = 4) if __name__ == '__main__': pp.pprint(main())
23.076923
71
0.506667
import pprint import json pp = pprint.PrettyPrinter(indent = 4) def convert(path): with open(path, 'r') as read_obj: line = 'init' counter = 0 l = [] while line: line = read_obj.readline() counter += 1 if counter == 1: continue ...
0
0
0
0
0
440
0
-10
68
4330ac10e234b0ed1e230392a489121eb2e4a3a4
610
py
Python
9/9-1-2.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
9/9-1-2.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
9/9-1-2.py
liuhanyu200/pygame
38a68e779e6b0a63edb1758fca98ebbf40bb0444
[ "BSD-3-Clause" ]
null
null
null
# coding:utf-8 restaurant = Restaurant('', 'duck') print(restaurant.restaurant_name) print(restaurant.cuisine_type) restaurant.describe_restaurant() restaurant.open_restaurant()
27.727273
59
0.72623
# coding:utf-8 class Restaurant(object): def __init__(self, restaurant_name, cuisine_type): self.restaurant_name = restaurant_name self.cuisine_type = cuisine_type def describe_restaurant(self): print("restaurant name is " + self.restaurant_name) print("cuisine_type is " + self...
21
76
0
324
0
0
0
0
23
534ab4de75347d1cad8852248bb5bb829a73b542
2,351
py
Python
sprocket/util/hdf5.py
zhouming-hfut/sprocket
68d4005284b72a891d0c0f81afabea087fc45960
[ "MIT" ]
null
null
null
sprocket/util/hdf5.py
zhouming-hfut/sprocket
68d4005284b72a891d0c0f81afabea087fc45960
[ "MIT" ]
null
null
null
sprocket/util/hdf5.py
zhouming-hfut/sprocket
68d4005284b72a891d0c0f81afabea087fc45960
[ "MIT" ]
1
2020-06-29T03:09:23.000Z
2020-06-29T03:09:23.000Z
# -*- coding: utf-8 -*-
22.825243
69
0.518503
# -*- coding: utf-8 -*- import os import h5py class HDF5(object): """HDF5 handler Offer the hdf5 format file handler Parameters --------- fpath : str, Path of hdf5 file mode : str, Open h5 as write and/or read mode `a` : open as read/write (Default) `w` : ope...
0
0
0
2,280
0
0
0
-22
68
24b126d6fe31cd3452fad67f497ed45acbd26584
2,370
py
Python
neuronit/play/migrations/0019_auto_20170406_1114.py
neuronit/pfa
6483f23de3ac43ae1121760ab44a2cae1f2cc901
[ "MIT" ]
null
null
null
neuronit/play/migrations/0019_auto_20170406_1114.py
neuronit/pfa
6483f23de3ac43ae1121760ab44a2cae1f2cc901
[ "MIT" ]
null
null
null
neuronit/play/migrations/0019_auto_20170406_1114.py
neuronit/pfa
6483f23de3ac43ae1121760ab44a2cae1f2cc901
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2017-04-06 09:14 from __future__ import unicode_literals
40.862069
410
0.596624
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2017-04-06 09:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('play', '0018_auto_20170331_1014'), ] operations = [ migrations.DeleteModel( ...
0
0
0
2,192
0
0
0
19
46
3ddda6b61449da34e0f8e8b290c8f652cbcfea85
187
py
Python
example.py
RangeHighGuestTeacher/Hello-World-Template
34e786df22b29c92d0a44f79405e689f66c7d244
[ "MIT" ]
null
null
null
example.py
RangeHighGuestTeacher/Hello-World-Template
34e786df22b29c92d0a44f79405e689f66c7d244
[ "MIT" ]
null
null
null
example.py
RangeHighGuestTeacher/Hello-World-Template
34e786df22b29c92d0a44f79405e689f66c7d244
[ "MIT" ]
null
null
null
print("Hello World") ########## Edit below this line # print your name to the console ########## Edit above this line # Once you've finished save and commit your changes to GitHub
15.583333
61
0.657754
print("Hello World") ########## Edit below this line # print your name to the console ########## Edit above this line # Once you've finished save and commit your changes to GitHub
0
0
0
0
0
0
0
0
0
ca3eed6733efd71c4cd494c8c7e0014f4a43becf
7,720
py
Python
CBHelper-evaluateCallBack/lambda_function.py
aws-samples/amazon-connect-callback-helper
9aff8bb69ae03d948d38cfa9b128d80c847b3a13
[ "MIT-0" ]
2
2021-12-18T00:15:09.000Z
2022-03-26T09:49:25.000Z
CBHelper-evaluateCallBack/lambda_function.py
aws-samples/amazon-connect-callback-helper
9aff8bb69ae03d948d38cfa9b128d80c847b3a13
[ "MIT-0" ]
1
2021-12-30T13:44:44.000Z
2021-12-30T13:44:44.000Z
CBHelper-evaluateCallBack/lambda_function.py
aws-samples/amazon-connect-callback-helper
9aff8bb69ae03d948d38cfa9b128d80c847b3a13
[ "MIT-0" ]
null
null
null
##CBWitness-EvaluateCallBack Function #===============================
34.774775
163
0.630829
##CBWitness-EvaluateCallBack Function import json import boto3 import os import datetime import pytz import base64 from botocore.exceptions import ClientError from boto3.dynamodb.conditions import Key def lambda_handler(event, context): print(event) CONTACTS_TABLE= os.environ['CONTACTS_TABLE'] contactPhon...
0
0
0
0
0
7,289
0
-13
364
946672f5a6656cc681f0ef3ce0dcf3df218f6871
284
py
Python
passenger_wsgi.py
pilnujemy/foundation-manager
1f1d6afcbb408c87a171bcbe3f9e58570eb478b6
[ "BSD-3-Clause" ]
1
2016-01-04T06:30:24.000Z
2016-01-04T06:30:24.000Z
passenger_wsgi.py
pilnujemy/foundation-manager
1f1d6afcbb408c87a171bcbe3f9e58570eb478b6
[ "BSD-3-Clause" ]
36
2015-11-27T14:17:34.000Z
2016-07-14T10:23:52.000Z
passenger_wsgi.py
pilnujemy/foundation-manager
1f1d6afcbb408c87a171bcbe3f9e58570eb478b6
[ "BSD-3-Clause" ]
1
2016-05-14T01:11:28.000Z
2016-05-14T01:11:28.000Z
import sys, os sys.path.append(os.getcwd()) import ConfigParser cp = ConfigParser.ConfigParser(); cp.read('../.environ') os.environ.update({key.upper():value for key, value in cp.items('env')}) from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
25.818182
73
0.757042
import sys, os sys.path.append(os.getcwd()) import ConfigParser cp = ConfigParser.ConfigParser(); cp.read('../.environ') os.environ.update({key.upper():value for key, value in cp.items('env')}) from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
0
0
0
0
0
0
0
0
0
4278806ab1065f5c0bd76d9bd9e691ed2d94f3c0
1,113
py
Python
src/osyris/core/base.py
osyris-project/osyris
bff42d864a7d5d248f7023216e32fe97bc06dca6
[ "BSD-3-Clause" ]
2
2022-02-08T14:41:19.000Z
2022-02-08T14:41:51.000Z
src/osyris/core/base.py
osyris-project/osyris
bff42d864a7d5d248f7023216e32fe97bc06dca6
[ "BSD-3-Clause" ]
20
2022-01-24T09:34:14.000Z
2022-03-30T20:01:39.000Z
src/osyris/core/base.py
osyris-project/osyris
bff42d864a7d5d248f7023216e32fe97bc06dca6
[ "BSD-3-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Osyris contributors (https://github.com/osyris-project/osyris)
25.883721
83
0.625337
# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Osyris contributors (https://github.com/osyris-project/osyris) from .tools import make_label import numpy as np class Base: def __repr__(self): return str(self) def __copy__(self): return self.copy() def __deepcopy__(self, mem...
0
67
0
848
0
0
0
5
68
4032a6cd71d1138bf43cdaa8fa18e442760dd786
492
py
Python
Fourteen/verify.py
tbjoern/adventofcode
3fb8b4e18f03825c448d8935ab39b8bf08202d90
[ "MIT" ]
null
null
null
Fourteen/verify.py
tbjoern/adventofcode
3fb8b4e18f03825c448d8935ab39b8bf08202d90
[ "MIT" ]
null
null
null
Fourteen/verify.py
tbjoern/adventofcode
3fb8b4e18f03825c448d8935ab39b8bf08202d90
[ "MIT" ]
null
null
null
muster = open("muster.txt", "r") output = open("output.txt", "r") mustervals = [] outputvals = [] for line in muster: a,b,val = line.split(" ") mustervals.append(int(val)) for line in output: outputvals.append(int(line)) print len(mustervals) print len(outputvals) length = min(len(mustervals), len...
21.391304
47
0.644309
muster = open("muster.txt", "r") output = open("output.txt", "r") mustervals = [] outputvals = [] for line in muster: a,b,val = line.split(" ") mustervals.append(int(val)) for line in output: outputvals.append(int(line)) print len(mustervals) print len(outputvals) length = min(len(mustervals), len...
0
0
0
0
0
0
0
0
0
de7d0dd2eb661fd9591ad6ff497fdd859aff26f0
2,014
py
Python
python_src/032.py
BurnySc2/leetcode-solutions
db86cc945f81d2b84891c5446f4887253011890e
[ "MIT" ]
null
null
null
python_src/032.py
BurnySc2/leetcode-solutions
db86cc945f81d2b84891c5446f4887253011890e
[ "MIT" ]
1
2021-08-01T09:56:31.000Z
2021-08-01T09:56:31.000Z
python_src/032.py
BurnySc2/leetcode-solutions
db86cc945f81d2b84891c5446f4887253011890e
[ "MIT" ]
null
null
null
""" Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. https://leetcode.com/problems/longest-valid-parentheses/ """ test_cases = ["(()", ")()())", "())()()()", "())((())()", "())((()))", "()(()", "))(()))()"] results = [2, 4, 6, 6, 6,...
35.964286
132
0.551639
""" Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. https://leetcode.com/problems/longest-valid-parentheses/ """ class Solution: def validParentheses(self, s: str) -> bool: open_parentheses = 0 for i in s: ...
0
0
0
1,342
0
0
0
0
23
81c4df0259303ed60ceeedb1ad263c6f1e994a54
1,294
py
Python
setup.py
racitup/djangoshop-subscribe
ecc4ca1656a74cae279fa5af5fe1d6864d935cc1
[ "BSD-3-Clause" ]
null
null
null
setup.py
racitup/djangoshop-subscribe
ecc4ca1656a74cae279fa5af5fe1d6864d935cc1
[ "BSD-3-Clause" ]
null
null
null
setup.py
racitup/djangoshop-subscribe
ecc4ca1656a74cae279fa5af5fe1d6864d935cc1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from setuptools import setup, find_packages import shop_subscribe with open('README.rst') as fd: README = fd.read() CLASSIFIERS = [ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Deve...
29.409091
75
0.66306
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from setuptools import setup, find_packages import shop_subscribe with open('README.rst') as fd: README = fd.read() CLASSIFIERS = [ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Deve...
0
0
0
0
0
0
0
0
0
1c8c055cc9d8cafce62eefcecb12eaad504ef9b2
13,934
py
Python
pyathena/sqlalchemy_athena.py
l1x/PyAthena
7aa94a85bf194b1c0c08048a1562bfb43ef6b3fb
[ "MIT" ]
null
null
null
pyathena/sqlalchemy_athena.py
l1x/PyAthena
7aa94a85bf194b1c0c08048a1562bfb43ef6b3fb
[ "MIT" ]
null
null
null
pyathena/sqlalchemy_athena.py
l1x/PyAthena
7aa94a85bf194b1c0c08048a1562bfb43ef6b3fb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from sqlalchemy.sql.sqltypes import (BIGINT, BINARY, BOOLEAN, DATE, DECIMAL, FLOAT, INTEGER, STRINGTYPE, TIMESTAMP) _TYPE_MAPPINGS = { "boolean": BOOLEAN, "real": FLOAT, "float": FLOAT, "double": FLOAT, "tinyint": INTEGER, "smallint": INTEGER, "integer": INTEG...
31.453725
95
0.600617
# -*- coding: utf-8 -*- import math import numbers import re import tenacity from sqlalchemy import exc, util from sqlalchemy.engine import Engine, reflection from sqlalchemy.engine.default import DefaultDialect from sqlalchemy.exc import NoSuchTableError, OperationalError from sqlalchemy.sql.compiler import ( DDL...
0
3,059
0
9,612
0
0
0
278
405
d3da38f2d666dcc506c3bf9f7ca5edfd4290743f
279
py
Python
test.py
callumfrance/ThisPersonDoesNotExistAPI
8aaf83a65f3d527be087610ee3758d665babf657
[ "Apache-2.0", "MIT" ]
2
2020-11-05T19:01:03.000Z
2021-01-19T19:58:48.000Z
test.py
callumfrance/ThisPersonDoesNotExistAPI
8aaf83a65f3d527be087610ee3758d665babf657
[ "Apache-2.0", "MIT" ]
null
null
null
test.py
callumfrance/ThisPersonDoesNotExistAPI
8aaf83a65f3d527be087610ee3758d665babf657
[ "Apache-2.0", "MIT" ]
1
2021-03-16T11:02:26.000Z
2021-03-16T11:02:26.000Z
import asyncio loop = asyncio.get_event_loop() loop.run_until_complete(main())
19.928571
72
0.767025
import asyncio from thispersondoesnotexist import get_online_person, save_online_person async def main(): # picture = await get_online_person() # print(picture) await save_online_person('test.png') loop = asyncio.get_event_loop() loop.run_until_complete(main())
0
0
101
0
0
0
0
51
46
bf99192e6c6314c0c50f380e59c48b9b0a88a055
1,502
py
Python
python/lad/tests/test_lad.py
mirca/least-absolute-deviations
d6e8463e0bfd38000e4696c7048f5935df6b304e
[ "MIT" ]
4
2018-07-14T02:56:25.000Z
2019-10-12T10:12:30.000Z
python/lad/tests/test_lad.py
mirca/least-absolute-deviations
d6e8463e0bfd38000e4696c7048f5935df6b304e
[ "MIT" ]
5
2018-06-10T13:11:39.000Z
2019-03-19T16:14:59.000Z
python/lad/tests/test_lad.py
mirca/least-absolute-deviations
d6e8463e0bfd38000e4696c7048f5935df6b304e
[ "MIT" ]
2
2019-03-19T16:11:17.000Z
2019-07-01T08:46:53.000Z
import tensorflow as tf import numpy as np sess = tf.Session() true_params = np.array([3, 10]) x = np.linspace(-1, 1, 10000) y = np.random.laplace(loc=x * true_params[0] + true_params[1], scale=1.)
38.512821
103
0.627164
import tensorflow as tf import numpy as np import pytest from ..lad import lad, lad_polyfit sess = tf.Session() true_params = np.array([3, 10]) x = np.linspace(-1, 1, 10000) y = np.random.laplace(loc=x * true_params[0] + true_params[1], scale=1.) @pytest.mark.parametrize("yerr", [(None), (np.ones(len(y))), (np.std(...
0
1,160
0
0
0
0
0
5
136
ba31972842ede1fcd2bfaff44d561f3756b6c72a
2,319
py
Python
venv/lib/python3.9/site-packages/pydata_google_auth/_webserver.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
32
2018-09-14T23:31:00.000Z
2022-03-28T16:02:37.000Z
venv/lib/python3.9/site-packages/pydata_google_auth/_webserver.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
38
2018-08-14T20:52:52.000Z
2022-03-10T21:02:35.000Z
venv/lib/python3.9/site-packages/pydata_google_auth/_webserver.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
10
2018-08-19T01:39:34.000Z
2022-02-28T14:26:33.000Z
"""Helpers for running a local webserver to receive authorization code.""" import socket from contextlib import closing from pydata_google_auth import exceptions LOCALHOST = "localhost" DEFAULT_PORTS_TO_TRY = 100 def is_port_open(port): """Check if a port is open on localhost. Based on StackOverflow answ...
25.766667
78
0.641656
"""Helpers for running a local webserver to receive authorization code.""" import socket from contextlib import closing from pydata_google_auth import exceptions LOCALHOST = "localhost" DEFAULT_PORTS_TO_TRY = 100 def is_port_open(port): """Check if a port is open on localhost. Based on StackOverflow answ...
0
0
0
0
0
0
0
0
0
e16a1165292bbf1bedad6c78d031716220a41e24
5,380
py
Python
campaigns/models.py
alimahdiyar/Developing-Community-Web
a663a687e0f286f197d4a7bf347f67cd130275f7
[ "MIT" ]
2
2018-06-02T12:30:00.000Z
2018-07-19T14:41:39.000Z
campaigns/models.py
Developing-Community/Developing-Community-Web
a663a687e0f286f197d4a7bf347f67cd130275f7
[ "MIT" ]
5
2021-06-08T19:09:00.000Z
2022-03-11T23:25:14.000Z
campaigns/models.py
Developing-Community/web
a663a687e0f286f197d4a7bf347f67cd130275f7
[ "MIT" ]
2
2018-05-27T14:58:34.000Z
2018-05-27T15:03:04.000Z
# Create your models here. # Sales Campaign
35.163399
115
0.686803
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils import timezone from enumfields import Enum # Uses Ethan Furman's "enum34" backport from enumfields import EnumField from sorl.thumbnail import Imag...
0
34
0
4,468
0
119
0
166
537
3b3e51bbf94b1d39d45c67a57ee1414456ec670b
181,187
py
Python
src/cplex/_internal/_pycplex.py
tfang94/paql-project
0848d13a0f2489349d196a596cc1a1a1f2ee1bfe
[ "MIT" ]
1
2021-04-28T21:30:39.000Z
2021-04-28T21:30:39.000Z
src/cplex/_internal/_pycplex.py
tfang94/paql-project
0848d13a0f2489349d196a596cc1a1a1f2ee1bfe
[ "MIT" ]
null
null
null
src/cplex/_internal/_pycplex.py
tfang94/paql-project
0848d13a0f2489349d196a596cc1a1a1f2ee1bfe
[ "MIT" ]
3
2021-04-25T16:51:47.000Z
2022-02-03T21:04:34.000Z
# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.0 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise Runtime...
60.577399
1,804
0.802933
# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.0 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise Runtime...
0
1,088
0
12,917
0
82,406
0
-3
11,639
22e20f03dc46b1e9d6eade314e381279b10a06e0
1,703
py
Python
GenerIter/processor/Mix.py
GridPresence/GenerIter
f0b74cd6c1d1bb9a23fccb28fa8b972f9eeccaf8
[ "MIT" ]
7
2021-01-07T19:03:10.000Z
2021-03-05T08:05:17.000Z
GenerIter/processor/Mix.py
GridPresence/GenerIter
f0b74cd6c1d1bb9a23fccb28fa8b972f9eeccaf8
[ "MIT" ]
2
2021-01-26T12:45:58.000Z
2021-02-15T11:06:14.000Z
GenerIter/processor/Mix.py
GridPresence/GenerIter
f0b74cd6c1d1bb9a23fccb28fa8b972f9eeccaf8
[ "MIT" ]
1
2021-01-24T05:21:28.000Z
2021-01-24T05:21:28.000Z
""" Generator class for some Process-based mixing algorithms. Copyright 2020 Thomas Jackson Park & Jeremy Pavier """
30.410714
100
0.598356
""" Generator class for some Process-based mixing algorithms. Copyright 2020 Thomas Jackson Park & Jeremy Pavier """ import os import random import inspect from pydub import AudioSegment from GenerIter.process import Process from GenerIter.util import debug, nextPowerOf2 import GenerIter.excepts as robox class Mix(P...
0
0
0
1,372
0
0
0
35
177
7f18aacd0cfd85d08e6a79111b1cccd0674a4fce
19,492
py
Python
misc/deep_learning_notes/Ch4_Recurrent_Networks/002_vanila_RNN_with_edf/edf.py
tmjnow/MoocX
52c8450ff7ecc8450a8adc2457233d5777a3d5bb
[ "MIT" ]
7
2017-06-13T05:24:15.000Z
2022-01-09T01:10:28.000Z
misc/deep_learning_notes/Ch4_Recurrent_Networks/002_vanila_RNN_with_edf/edf.py
kinshuk4/Coursera
52c8450ff7ecc8450a8adc2457233d5777a3d5bb
[ "MIT" ]
11
2017-05-08T23:30:50.000Z
2017-06-24T21:57:42.000Z
misc/deep_learning_notes/Ch4_Recurrent_Networks/002_vanila_RNN_with_edf/edf.py
kinshuk4/MoocX
52c8450ff7ecc8450a8adc2457233d5777a3d5bb
[ "MIT" ]
4
2017-10-05T12:56:53.000Z
2020-06-14T17:01:32.000Z
import numpy as np DT = np.float32 eps = 1e-12 # Globals components = [] params = [] # Global forward/backward # Optimization functions # Values # Parameters # Xavier initializer # Utility function for shape inference with broadcasting #### Actual components # clip the gradient if...
30.314152
360
0.579776
import numpy as np DT = np.float32 eps = 1e-12 # Globals components = [] params = [] # Global forward/backward def Forward(): for c in components: c.forward() def Backward(loss): for c in components: if c.grad is not None: c.grad = DT(0) loss.grad = np.ones_like(loss.value) for c in...
0
0
0
16,153
0
2,085
0
0
729
2471ad588b4c0f46ff2f08f2c04ab2774fa69018
1,661
py
Python
pymoira/utils.py
vasilvv/pymoira
27facba223c220bf4c55d9b7e799a2ff951eef13
[ "MIT" ]
2
2015-11-13T23:03:12.000Z
2015-12-19T02:43:20.000Z
pymoira/utils.py
vasilvv/pymoira
27facba223c220bf4c55d9b7e799a2ff951eef13
[ "MIT" ]
null
null
null
pymoira/utils.py
vasilvv/pymoira
27facba223c220bf4c55d9b7e799a2ff951eef13
[ "MIT" ]
1
2019-10-23T06:26:13.000Z
2019-10-23T06:26:13.000Z
# ## PyMoira client library ## ## This file contains the utility functions common for multiple modules. # import datetime from .errors import UserError def convertToMoiraValue(val): """Converts data from Python to Moira protocol representation.""" if type(val) == bool: return '1' if val else '0' ...
29.140351
93
0.635762
# ## PyMoira client library ## ## This file contains the utility functions common for multiple modules. # import datetime from .errors import UserError def convertMoiraBool(val): if val == '1': return True if val == '0': return False raise UserError("Invalid boolean value received from Moi...
0
0
0
0
0
309
0
0
69
fa6009dfdc1734e54f9947589f388129abb13195
1,072
py
Python
lambda/test.py
p1ass/emojic.ch
5dace9d4ba6f6a46cfbd29746c74964ad8ba1822
[ "MIT" ]
14
2020-04-03T04:14:49.000Z
2021-08-12T04:24:43.000Z
lambda/test.py
p1ass/emojic.ch
5dace9d4ba6f6a46cfbd29746c74964ad8ba1822
[ "MIT" ]
78
2020-04-03T04:02:31.000Z
2021-06-04T01:18:24.000Z
lambda/test.py
naoki-kishi/emojic.ch
5dace9d4ba6f6a46cfbd29746c74964ad8ba1822
[ "MIT" ]
1
2020-05-09T12:24:08.000Z
2020-05-09T12:24:08.000Z
import unittest if __name__ == "__main__": unittest.main()
26.8
62
0.650187
import unittest import base64 from detect_face import lambda_handler class TestLambdaHandler(unittest.TestCase): def setUp(self): self.IMAGE_DIRECTORY = "./test_images/" def getResponse(self, filename): with open(self.IMAGE_DIRECTORY + filename, "rb") as f: img_binary = f.read() ...
150
0
0
880
0
0
0
9
67
28112880e291a8479345abe72ce6130d81553134
3,232
py
Python
mkt/api/base.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
mkt/api/base.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
mkt/api/base.py
oremj/zamboni
a751dc6d22f7af947da327b0a091cbab0a999f49
[ "BSD-3-Clause" ]
null
null
null
import commonware.log log = commonware.log.getLogger('z.api')
34.752688
78
0.626238
import json from django.core.exceptions import ObjectDoesNotExist from tastypie import http from tastypie.bundle import Bundle from tastypie.exceptions import ImmediateHttpResponse from tastypie.resources import ModelResource import commonware.log import oauth2 from translations.fields import PurifiedField, Translat...
0
227
0
2,612
0
0
0
127
201
0ff92fee0b03da94feeb1de00edd583d81887727
953
py
Python
instagramApp/migrations/0002_auto_20211016_1005.py
Tito-74/Instagram-App
b44f21fb0c7aa5f8e978194814e603b8f9c66592
[ "MIT" ]
null
null
null
instagramApp/migrations/0002_auto_20211016_1005.py
Tito-74/Instagram-App
b44f21fb0c7aa5f8e978194814e603b8f9c66592
[ "MIT" ]
null
null
null
instagramApp/migrations/0002_auto_20211016_1005.py
Tito-74/Instagram-App
b44f21fb0c7aa5f8e978194814e603b8f9c66592
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-10-16 07:05
32.862069
117
0.60021
# Generated by Django 3.2.8 on 2021-10-16 07:05 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('instagramApp', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='post', ...
0
0
0
806
0
0
0
30
68
bdbc3c77437b54a570ec5093b2f5ef0704bf1f22
929
py
Python
tools/cardiac_py/DMD/JParser.py
paulkefer/cardioid
59c07b714d8b066b4f84eb50487c36f6eadf634c
[ "MIT-0", "MIT" ]
33
2018-12-12T20:05:06.000Z
2021-09-26T13:30:16.000Z
tools/cardiac_py/DMD/JParser.py
paulkefer/cardioid
59c07b714d8b066b4f84eb50487c36f6eadf634c
[ "MIT-0", "MIT" ]
5
2019-04-25T11:34:43.000Z
2021-11-14T04:35:37.000Z
tools/cardiac_py/DMD/JParser.py
paulkefer/cardioid
59c07b714d8b066b4f84eb50487c36f6eadf634c
[ "MIT-0", "MIT" ]
15
2018-12-21T22:44:59.000Z
2021-08-29T10:30:25.000Z
''' Created on 27/02/2013 @author: butler '''
23.225
60
0.518837
''' Created on 27/02/2013 @author: butler ''' import json class JParser(object): ''' Parser for json config file. As this is designed to be ' ''' def __init__(self, file_name): ''' ''' self.file_name = file_name """ self.delta_t_ms self.sample_rate ...
0
0
0
846
0
0
0
-10
45
dfaaf65c142c6efc4c3a5d05426059f979f9b07b
418
py
Python
practice.py
narayanants/python-mega-course
2ba2980ab21dfbed5f86f00695559f7831b5c566
[ "MIT" ]
null
null
null
practice.py
narayanants/python-mega-course
2ba2980ab21dfbed5f86f00695559f7831b5c566
[ "MIT" ]
null
null
null
practice.py
narayanants/python-mega-course
2ba2980ab21dfbed5f86f00695559f7831b5c566
[ "MIT" ]
null
null
null
x = 1 y = 'Hello' z = 10.123 d = x + z print(d) print(type(x)) print(type(y)) print(y.upper()) print(y.lower()) print(type(z)) a = [1,2,3,4,5,6,6,7,8] print(len(a)) print(a.count(6)) b = list(range(10,100,10)) print(b) stud_marks = {"Madhan":90, "Raj":25,"Mani":80} print(stud_marks.keys()) print(stud_marks.va...
11.611111
46
0.617225
x = 1 y = 'Hello' z = 10.123 d = x + z print(d) print(type(x)) print(type(y)) print(y.upper()) print(y.lower()) print(type(z)) a = [1,2,3,4,5,6,6,7,8] print(len(a)) print(a.count(6)) b = list(range(10,100,10)) print(b) stud_marks = {"Madhan":90, "Raj":25,"Mani":80} print(stud_marks.keys()) print(stud_marks.va...
0
0
0
0
0
0
0
0
0
7fb662a179c9be0efb6d3755e45803047f17796c
1,347
py
Python
telegram/main.py
hakierspejs/mierzyciel
bb680854fd351820c45415b8e85702ea60851b0d
[ "WTFPL" ]
null
null
null
telegram/main.py
hakierspejs/mierzyciel
bb680854fd351820c45415b8e85702ea60851b0d
[ "WTFPL" ]
null
null
null
telegram/main.py
hakierspejs/mierzyciel
bb680854fd351820c45415b8e85702ea60851b0d
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python import logging LOGGER = logging.getLogger('mierzyciel.telegram') if __name__ == '__main__': fmt = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' logging.basicConfig(level='INFO', format=fmt) main()
30.613636
78
0.604306
#!/usr/bin/env python import logging import socket import urllib.request import time LOGGER = logging.getLogger('mierzyciel.telegram') def get_telegram_stats(chat_name): s = urllib.request.urlopen('https://t.me/' + chat_name).read().decode() prefix = '<div class="tgme_page_extra">' line = [x for x in s.s...
0
0
0
0
0
987
0
-18
135
2cfaac913c747cb5c044f427f461fb959f263be3
4,312
py
Python
tests/test_utils.py
dbluhm/aries-staticagent-python
1f27f85cf72cc6a2e10a6495c85f2b21462362cd
[ "Apache-2.0" ]
18
2019-06-20T18:19:36.000Z
2022-01-17T04:30:18.000Z
tests/test_utils.py
dbluhm/aries-staticagent-python
1f27f85cf72cc6a2e10a6495c85f2b21462362cd
[ "Apache-2.0" ]
16
2019-06-20T18:24:49.000Z
2021-05-19T17:38:40.000Z
tests/test_utils.py
dbluhm/aries-staticagent-python
1f27f85cf72cc6a2e10a6495c85f2b21462362cd
[ "Apache-2.0" ]
20
2019-06-20T16:54:13.000Z
2021-12-03T00:08:37.000Z
""" Test utilities. """ import pytest from aries_staticagent import utils from aries_staticagent.mtc import (AUTHCRYPT_AFFIRMED, AUTHCRYPT_DENIED, ANONCRYPT_AFFIRMED, ANONCRYPT_DENIED) def test_preprocess(): """Test preprocessing decorator.""" handled = test_handler({}) assert handled["preprocessed"] ...
21.668342
81
0.666744
""" Test utilities. """ import pytest from aries_staticagent import utils, Message from aries_staticagent.mtc import ( AUTHCRYPT_AFFIRMED, AUTHCRYPT_DENIED, ANONCRYPT_AFFIRMED, ANONCRYPT_DENIED, ) @pytest.fixture def message(): yield Message.parse_obj( {"@type": "doc_uri/protocol/0.1/tes...
0
1,395
0
0
0
274
0
28
505
12015e477b8e55a091fff7f2d84582fa6e3275ff
1,486
py
Python
HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidation_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidation_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidation_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms heavyFlavorValidation = cms.EDAnalyzer("HeavyFlavorValidation", DQMFolder = cms.untracked.string("HLT/HeavyFlavor"), TriggerProcessName = cms.untracked.string("HLT"), TriggerPathName = cms.untracked.string("HLT_Mu5"), TriggerSummaryRAW = cms.untracked.string("hl...
55.037037
105
0.697174
import FWCore.ParameterSet.Config as cms heavyFlavorValidation = cms.EDAnalyzer("HeavyFlavorValidation", DQMFolder = cms.untracked.string("HLT/HeavyFlavor"), TriggerProcessName = cms.untracked.string("HLT"), TriggerPathName = cms.untracked.string("HLT_Mu5"), TriggerSummaryRAW = cms.untracked.string("hl...
0
0
0
0
0
0
0
0
0
9809ab5317cd085c73700d8f77b21ca36ba30fc5
1,292
py
Python
utils/config.py
ogrenenmakine/VCL-PL-Semi-Supervised-Learning-from-Noisy-Web-Data-with-Variational-Contrastive-Learning
baef25837ce7e073d03f69a095d1992aa18dd2d5
[ "MIT" ]
null
null
null
utils/config.py
ogrenenmakine/VCL-PL-Semi-Supervised-Learning-from-Noisy-Web-Data-with-Variational-Contrastive-Learning
baef25837ce7e073d03f69a095d1992aa18dd2d5
[ "MIT" ]
null
null
null
utils/config.py
ogrenenmakine/VCL-PL-Semi-Supervised-Learning-from-Noisy-Web-Data-with-Variational-Contrastive-Learning
baef25837ce7e073d03f69a095d1992aa18dd2d5
[ "MIT" ]
null
null
null
""" Authors: Wouter Van Gansbeke, Simon Vandenhende Licensed under the CC BY-NC 4.0 license (https://creativecommons.org/licenses/by-nc/4.0/) """
36.914286
92
0.706656
""" Authors: Wouter Van Gansbeke, Simon Vandenhende Licensed under the CC BY-NC 4.0 license (https://creativecommons.org/licenses/by-nc/4.0/) """ import os import yaml from easydict import EasyDict from utils.utils import mkdir_if_missing def create_config(config_file_env, config_file_exp, batch_size, epochs): # C...
0
0
0
0
0
1,029
0
5
112
24dea8c23635079d76503504a11ec99b74c28151
1,839
py
Python
fuzzytools/matplotlib/lims.py
oscarpimentel/fuzzy-tools
edbde6a1e56c1c564cca609e4d0cc9cda906b992
[ "MIT" ]
null
null
null
fuzzytools/matplotlib/lims.py
oscarpimentel/fuzzy-tools
edbde6a1e56c1c564cca609e4d0cc9cda906b992
[ "MIT" ]
null
null
null
fuzzytools/matplotlib/lims.py
oscarpimentel/fuzzy-tools
edbde6a1e56c1c564cca609e4d0cc9cda906b992
[ "MIT" ]
null
null
null
from __future__ import print_function from __future__ import division EXTENDED_PERCENT = 0.1 ################################################################################################################################################### ############################################################################...
35.365385
163
0.650353
from __future__ import print_function from __future__ import division from . import _C import matplotlib.pyplot as plt import numpy as np from copy import copy, deepcopy EXTENDED_PERCENT = 0.1 ############################################################################################################################...
0
0
0
1,021
0
280
0
12
135
34463d3a7056ec3ca5a9a4b2f7a2cc3412f5557e
1,127
py
Python
emg_analyzer/argparse_utils.py
freeh4cker/emg_analyser
63ab91aaa7c9b36959e1d1038c89108fbce821f5
[ "BSD-3-Clause" ]
1
2020-07-29T19:07:55.000Z
2020-07-29T19:07:55.000Z
emg_analyzer/argparse_utils.py
freeh4cker/emg_analyser
63ab91aaa7c9b36959e1d1038c89108fbce821f5
[ "BSD-3-Clause" ]
7
2017-12-16T23:25:18.000Z
2018-01-24T22:04:09.000Z
emg_analyzer/argparse_utils.py
freeh4cker/emg_analyser
63ab91aaa7c9b36959e1d1038c89108fbce821f5
[ "BSD-3-Clause" ]
null
null
null
########################################################################## # Copyright (c) 2017-2018 Bertrand Nron. All rights reserved. # # Use of this source code is governed by a BSD-style license that can be # # found in the LICENSE file. # ################...
40.25
86
0.568767
########################################################################## # Copyright (c) 2017-2018 Bertrand Néron. All rights reserved. # # Use of this source code is governed by a BSD-style license that can be # # found in the LICENSE file. # ###############...
2
0
0
703
0
0
0
-6
46
0e91c58634a794d0f8effa722b00f5f2c6a299c5
852
py
Python
main.py
pratyushravishankar/audio-recognition
403a527906601b23716cc4b0136d4bf3ddcb3bc8
[ "MIT" ]
null
null
null
main.py
pratyushravishankar/audio-recognition
403a527906601b23716cc4b0136d4bf3ddcb3bc8
[ "MIT" ]
null
null
null
main.py
pratyushravishankar/audio-recognition
403a527906601b23716cc4b0136d4bf3ddcb3bc8
[ "MIT" ]
null
null
null
import pickle build_model() with open('lsh.pkl', 'rb') as input: lsh = pickle.load(input) # lsh.get()
24.342857
73
0.712441
import utils from sklearn.model_selection import train_test_split import lsh_random_projection as LSH import pickle def build_model(): features = utils.load("data/fma_metadata/features.csv") tracks = utils.load('data/fma_metadata/tracks.csv') non_nulls_tracks = tracks[tracks['track']['genre_top'].notnul...
0
0
0
0
0
589
0
36
112
13404955476ece8a5721e805c365b907490b523b
3,264
py
Python
pyprobml-master/examples/keras/vgg-keras.py
storopoli/Machine-Learning-Probalistic
f8617e7b81f4d6c71e72edc40ba11ac746794a95
[ "MIT" ]
1
2019-03-04T05:43:10.000Z
2019-03-04T05:43:10.000Z
Old/examples/keras/vgg-keras.py
tywang89/pyprobml
82cfdcb8daea653cda8f77e8737e585418476ca7
[ "MIT" ]
null
null
null
Old/examples/keras/vgg-keras.py
tywang89/pyprobml
82cfdcb8daea653cda8f77e8737e585418476ca7
[ "MIT" ]
null
null
null
# Example of applying VGG16 classifier # Based on Keras book sec 5.4.3. from keras.applications.vgg16 import VGG16 from keras.applications.vgg16 import preprocess_input, decode_predictions from keras.preprocessing import image #import matplotlib.pyplot as plt import numpy as np #import urllib #from keras.application...
39.804878
141
0.747855
# Example of applying VGG16 classifier # Based on Keras book sec 5.4.3. from keras.applications.vgg16 import VGG16 from keras.applications.vgg16 import preprocess_input, decode_predictions from keras.preprocessing import image #import matplotlib.pyplot as plt import numpy as np #import urllib #from keras.application...
0
0
0
0
0
0
0
0
0
02ab5ac38323d1a54c6ec402c2b0af7e9a378c0b
12,767
py
Python
robot.py
recantha/RedBoard
b47e3085d7550318473c73aaf2f089b950b6934a
[ "MIT" ]
21
2019-10-07T22:55:36.000Z
2020-12-09T20:07:03.000Z
robot.py
recantha/RedBoard
b47e3085d7550318473c73aaf2f089b950b6934a
[ "MIT" ]
5
2019-09-05T14:15:36.000Z
2020-03-17T20:21:42.000Z
robot.py
recantha/RedBoard
b47e3085d7550318473c73aaf2f089b950b6934a
[ "MIT" ]
5
2018-05-02T16:38:28.000Z
2020-01-02T15:06:02.000Z
# This is an example program showing different methods of controlling motors, servos, and Neopixels. # It works with a Rock Candy or PiHut PS3 controller. # The left stick controls the speed and direction of both motors - push up to go forwards, down for backwards and left or right to steer. # The right stick directly ...
31.9175
173
0.524242
# This is an example program showing different methods of controlling motors, servos, and Neopixels. # It works with a Rock Candy or PiHut PS3 controller. # The left stick controls the speed and direction of both motors - push up to go forwards, down for backwards and left or right to steer. # The right stick directly ...
0
0
0
0
0
252
0
-10
44
a8e53e3b4dbf4f5115d1ab434dfe78e4bddcfa5a
3,429
py
Python
iceprod/server/globus.py
WIPACrepo/iceprod
83615da9b0e764bc2498ac588cc2e2b3f5277235
[ "MIT" ]
2
2017-01-23T17:12:41.000Z
2019-01-14T13:38:17.000Z
iceprod/server/globus.py
WIPACrepo/iceprod
83615da9b0e764bc2498ac588cc2e2b3f5277235
[ "MIT" ]
242
2016-05-09T18:46:51.000Z
2022-03-31T22:02:29.000Z
iceprod/server/globus.py
WIPACrepo/iceprod
83615da9b0e764bc2498ac588cc2e2b3f5277235
[ "MIT" ]
2
2017-03-27T09:13:40.000Z
2019-01-27T10:55:30.000Z
""" Tools to help manage Globus proxies """ import logging logger = logging.getLogger('globus')
37.681319
99
0.534267
""" Tools to help manage Globus proxies """ import os import subprocess import logging from iceprod.server.config import IceProdConfig logger = logging.getLogger('globus') class SiteGlobusProxy(object): """ Manage site-wide globus proxy :param cfgfile: cfgfile location (optional) :param duration: p...
0
0
0
3,231
0
0
0
10
91
718f6a531ed9f39d127e9a33e63589d99008dec5
2,268
py
Python
percy/resource_loader.py
robopsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
1
2017-10-31T11:29:24.000Z
2017-10-31T11:29:24.000Z
percy/resource_loader.py
robopsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
1
2021-03-26T00:50:40.000Z
2021-03-26T00:50:40.000Z
percy/resource_loader.py
rob-opsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
2
2018-06-05T02:33:05.000Z
2021-03-02T11:17:47.000Z
try: from urllib.parse import urlparse except ImportError: __all__ = ['ResourceLoader'] MAX_FILESIZE_BYTES = 15 * 1024**2 # 15 MiB.
32.869565
85
0.593915
import os import percy from percy import utils try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse __all__ = ['ResourceLoader'] MAX_FILESIZE_BYTES = 15 * 1024**2 # 15 MiB. class BaseResourceLoader(object): @property def build_resources(self): raise NotI...
0
1,490
0
456
0
0
0
-11
191
b963a238595dc05d6bc40e6f5888099b52a8fc14
20,515
py
Python
tests/testing_server.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
null
null
null
tests/testing_server.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
null
null
null
tests/testing_server.py
ImportTaste/WebRequest
0cc385622624de16ec980e0c12d9080d593cab74
[ "WTFPL" ]
null
null
null
import time import WebRequest if __name__ == '__main__': wg = WebRequest.WebGetRobust() srv = start_server( assertion_class = None, from_wg = wg, skip_header_checks = True) print("running server on port: ", srv) while 1: time.sleep(1)
32.929374
165
0.640653
import traceback import uuid import socket import logging import os import base64 import zlib import gzip import time import datetime from http import cookies from http.server import BaseHTTPRequestHandler from http.server import HTTPServer from threading import Thread import WebRequest def capture_expected_headers...
0
0
0
17,780
0
2,138
0
-28
356
67270613f64a8a2bf43b95c90d08c32285cdbd1c
20,081
py
Python
modules/music/music.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
21
2017-08-06T02:47:05.000Z
2022-03-13T17:39:00.000Z
modules/music/music.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
87
2017-12-26T17:07:59.000Z
2022-03-11T01:31:48.000Z
modules/music/music.py
naschorr/hawking
cdc98b7bc90c72d634f1fe877c34e7f9908ec4a8
[ "MIT" ]
7
2019-10-23T17:30:34.000Z
2022-03-31T05:56:43.000Z
import logging from common import utilities ## Config CONFIG_OPTIONS = utilities.load_config() ## Logging logger = utilities.initialize_logging(logging.getLogger(__name__))
38.617308
120
0.598377
import re import math import random import logging from collections import OrderedDict from discord.ext import commands from common import utilities from common import dynamo_manager from common.module.discoverable_module import DiscoverableCog from common.module.module_initialization_container import ModuleInitializ...
0
4,225
0
15,203
0
91
0
113
269
16d91b413c5b0ff989f0583278802423f8821a13
7,359
py
Python
tests/keras/preprocessing/test_image.py
cnvrg/keras
7f9bea44d5d4512fe21d0263d00fd39a9fb5c671
[ "MIT" ]
1
2020-12-08T14:29:08.000Z
2020-12-08T14:29:08.000Z
tests/keras/preprocessing/test_image.py
cnvrg/keras
7f9bea44d5d4512fe21d0263d00fd39a9fb5c671
[ "MIT" ]
null
null
null
tests/keras/preprocessing/test_image.py
cnvrg/keras
7f9bea44d5d4512fe21d0263d00fd39a9fb5c671
[ "MIT" ]
null
null
null
import pytest if __name__ == '__main__': pytest.main([__file__])
37.738462
107
0.555646
import pytest from keras.preprocessing import image from PIL import Image import numpy as np import os import shutil import tempfile class TestImage: def setup_class(cls): img_w = img_h = 20 rgb_images = [] gray_images = [] for n in range(8): bias = np....
0
0
0
7,131
0
0
0
-13
163
d6583013d9b22bea192d0a72428b5f4e35977e91
1,132
py
Python
setup.py
zuiwan/CodingHub-CLI
9ced732de351412f1fd32b3a5eb67117e42779f6
[ "Apache-2.0" ]
null
null
null
setup.py
zuiwan/CodingHub-CLI
9ced732de351412f1fd32b3a5eb67117e42779f6
[ "Apache-2.0" ]
null
null
null
setup.py
zuiwan/CodingHub-CLI
9ced732de351412f1fd32b3a5eb67117e42779f6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from setuptools import find_packages, setup project = "ch-cli" version = "0.1.0" setup( name=project, version=version, description="Command line tool for ch", author="Zuiwan", author_email="danceiny@gmail.com", url="https://github.com/zuiwan/CodingHub-CLI.git", package...
24.608696
81
0.539753
#!/usr/bin/env python from setuptools import find_packages, setup project = "ch-cli" version = "0.1.0" setup( name=project, version=version, description="Command line tool for ch", author="Zuiwan", author_email="danceiny@gmail.com", url="https://github.com/zuiwan/CodingHub-CLI.git", package...
0
0
0
0
0
0
0
0
0
c6781e3b5409730674626896503725c3c53ad9cf
4,135
py
Python
tronx/helpers/filters.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
null
null
null
tronx/helpers/filters.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
null
null
null
tronx/helpers/filters.py
JayPatel1314/Tron
d8f2d799eea344c0d76f0fe758ce385c7ceceea7
[ "MIT" ]
null
null
null
from config import Config from tronx.database.postgres.dv_sql import DVSQL dv = DVSQL() # custom regex filter def MyPrefix(): """Multiple prefix support function""" return dv.getdv("PREFIX").split() or Config.PREFIX.split() or "." # custom command filter
23.494318
106
0.685127
import os import re from typing import ( Union, List, Dict, Pattern ) from pyrogram.filters import create from pyrogram import filters, Client from pyrogram.types import ( Message, CallbackQuery, InlineQuery, InlineKeyboardMarkup, ReplyKeyboardMarkup, Update ) from config import Config from tronx.da...
0
0
2,599
0
0
942
0
147
178
897bbc983e66081213620110e136f15fdd0ac12c
1,071
py
Python
train_vqvae.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
6
2021-09-14T07:04:54.000Z
2022-03-24T16:07:41.000Z
train_vqvae.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
4
2021-10-14T22:18:47.000Z
2022-03-30T13:03:07.000Z
train_vqvae.py
bipashasen/How2Sign-Blob
6e2af881d96d477fdb93104b8e53d943765c64ff
[ "MIT" ]
3
2022-01-13T20:22:39.000Z
2022-03-03T12:52:44.000Z
import torch from dataset import DrivingDataset from vidvqvae import VQVAE from torch.utils.data import DataLoader from torch.utils.data import random_split import pytorch_lightning as pl dataset = DrivingDataset("./generative", frames=16, skip=16) print(len(dataset)) train_set, val_set = random_split(dataset, [10000...
31.5
102
0.782446
import torch from dataset import DrivingDataset from vidvqvae import VQVAE from torch.utils.data import DataLoader from torch.utils.data import random_split import pytorch_lightning as pl from pytorch_lightning.loggers import WandbLogger from pytorch_lightning.callbacks import ModelCheckpoint dataset = DrivingDataset...
0
0
0
0
0
0
0
62
44
16460dd8cef3c4ca6e999f16951e9835cac32996
3,369
py
Python
euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
salewski/euca2ools
6b3f62f2cb1c54f14d3bfa5fd92dab3c0ecafecb
[ "BSD-2-Clause" ]
30
2015-02-10T05:47:38.000Z
2022-01-20T08:48:43.000Z
euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
salewski/euca2ools
6b3f62f2cb1c54f14d3bfa5fd92dab3c0ecafecb
[ "BSD-2-Clause" ]
16
2015-01-08T23:24:34.000Z
2018-07-18T07:15:40.000Z
euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py
salewski/euca2ools
6b3f62f2cb1c54f14d3bfa5fd92dab3c0ecafecb
[ "BSD-2-Clause" ]
19
2015-05-07T05:34:42.000Z
2020-12-13T10:50:14.000Z
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 conditions and t...
48.826087
79
0.666667
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 conditions and t...
0
0
0
1,817
0
0
0
96
114
c055b680671015ae685487c0a21864dbeeb5d7bc
100
py
Python
Test.py
JonatasMSS/PythonProjects
795218987a4b50e7b4f62aa910d6647b8f91593b
[ "MIT" ]
null
null
null
Test.py
JonatasMSS/PythonProjects
795218987a4b50e7b4f62aa910d6647b8f91593b
[ "MIT" ]
null
null
null
Test.py
JonatasMSS/PythonProjects
795218987a4b50e7b4f62aa910d6647b8f91593b
[ "MIT" ]
null
null
null
from ColorText import ColorText Texto = ColorText.mudaCor('Ol Mundo!','blue','lo') print(Texto)
25
52
0.73
from ColorText import ColorText Texto = ColorText.mudaCor('Olá Mundo!','blue','lo') print(Texto)
2
0
0
0
0
0
0
0
0
3b94585921a2a79178522ecf37a1d9d48c8968b5
5,484
py
Python
test/test_colors.py
braniii/prettypyplot
39d7d133fe0dc6699fafd57e00a0ec07672fd344
[ "BSD-3-Clause" ]
null
null
null
test/test_colors.py
braniii/prettypyplot
39d7d133fe0dc6699fafd57e00a0ec07672fd344
[ "BSD-3-Clause" ]
null
null
null
test/test_colors.py
braniii/prettypyplot
39d7d133fe0dc6699fafd57e00a0ec07672fd344
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for the color module. BSD 3-Clause License Copyright (c) 2020-2021, Daniel Nagel All rights reserved. """ import prettypyplot # dummy coverage tests def test_load_colors(): """Check that no error get raised.""" prettypyplot.colors.load_colors() def test_load_cmaps(...
28.712042
76
0.539752
# -*- coding: utf-8 -*- """Tests for the color module. BSD 3-Clause License Copyright (c) 2020-2021, Daniel Nagel All rights reserved. """ import numpy as np import pytest from matplotlib import colors as clr import prettypyplot @pytest.mark.parametrize('num, kwargs, error', [ (1, {}, None), (2, {'high': 2...
0
4,851
0
0
0
0
0
4
227
3d3b585878eec40a93008097771d36002f81b5a6
1,157
py
Python
test/test_01_decode_encode.py
hashberg-io/bases
9306573ee3794947efb91b70087d62f98607cadc
[ "MIT" ]
1
2021-12-31T19:29:55.000Z
2021-12-31T19:29:55.000Z
test/test_01_decode_encode.py
hashberg-io/bases
9306573ee3794947efb91b70087d62f98607cadc
[ "MIT" ]
null
null
null
test/test_01_decode_encode.py
hashberg-io/bases
9306573ee3794947efb91b70087d62f98607cadc
[ "MIT" ]
null
null
null
# pylint: disable = missing-docstring from bases import random random.set_options(min_bytes=0, max_bytes=16) nsamples = 1024
34.029412
82
0.666379
# pylint: disable = missing-docstring import pytest from bases import encoding from bases.encoding import BaseEncoding from bases import random from bases.random import rand_str random.set_options(min_bytes=0, max_bytes=16) nsamples = 1024 def _test_decode_encode(i: int, s: str, enc_name: str, enc: BaseEncoding) ->...
0
245
0
0
0
623
0
27
136
f184523890bcf9b76f0ab06d67dc6de838d0acf5
710
py
Python
pystratis/api/connectionmanager/requestmodels/addnoderequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
8
2021-06-30T20:44:22.000Z
2021-12-07T14:42:22.000Z
pystratis/api/connectionmanager/requestmodels/addnoderequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
2
2021-07-01T11:50:18.000Z
2022-01-25T18:39:49.000Z
pystratis/api/connectionmanager/requestmodels/addnoderequest.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
4
2021-07-01T04:36:42.000Z
2021-09-17T10:54:19.000Z
# noinspection PyUnresolvedReferences
26.296296
68
0.625352
from pydantic import validator, Field from pystratis.api import Model # noinspection PyUnresolvedReferences class AddNodeRequest(Model): """A request model for the connectionmanager/addnode endpoint. Args: ipaddr (str): The endpoint. command (str): Allowed commands [add, remove, onetry] "...
0
249
0
329
0
0
0
26
66
3f510b14969b96c8ab32bc2699f596314fa605f0
61
py
Python
project.py
paraizofelipe/kong-wrapper
798917292cb089f98548af0098387c3a5d00f3ba
[ "BSD-3-Clause" ]
1
2017-10-18T03:21:40.000Z
2017-10-18T03:21:40.000Z
project.py
paraizofelipe/kong-wrapper
798917292cb089f98548af0098387c3a5d00f3ba
[ "BSD-3-Clause" ]
null
null
null
project.py
paraizofelipe/kong-wrapper
798917292cb089f98548af0098387c3a5d00f3ba
[ "BSD-3-Clause" ]
null
null
null
import os PATH = os.path.abspath(os.path.dirname(__file__))
15.25
49
0.754098
import os PATH = os.path.abspath(os.path.dirname(__file__))
0
0
0
0
0
0
0
0
0
213f2cd6824b25ae045c553e6540cce858ad3289
3,084
py
Python
gen_page.py
scristall/poe_gen_gwennen
6579424a382ecfb332c4f5aa48ba3b789e1d8079
[ "MIT" ]
null
null
null
gen_page.py
scristall/poe_gen_gwennen
6579424a382ecfb332c4f5aa48ba3b789e1d8079
[ "MIT" ]
null
null
null
gen_page.py
scristall/poe_gen_gwennen
6579424a382ecfb332c4f5aa48ba3b789e1d8079
[ "MIT" ]
null
null
null
from browser import document as doc from browser.html import DIV # Create the static elements of the home page init_page() doc['loading'] <= DIV(Id='prerendered')
68.533333
345
0.690013
from browser import document as doc from browser.html import TABLE, TR, TH, TD, INPUT, SELECT, OPTION, DIV, BUTTON, SPAN, LI, H2, H3, IMG, COLGROUP, COL, P, SECTION, BR from json import load from last_update import time # Create the static elements of the home page def init_page(): doc['time'].text = f"poe.ninja dat...
0
0
0
0
0
2,740
0
111
66
5acacf353c21991d44914adbe24f3d385bb6a103
2,944
py
Python
pyoptflow/utils.py
juhi24/fmio-server
3add2a2faab06637b6cf0a4ed337ef62b8188e0f
[ "MIT" ]
null
null
null
pyoptflow/utils.py
juhi24/fmio-server
3add2a2faab06637b6cf0a4ed337ef62b8188e0f
[ "MIT" ]
null
null
null
pyoptflow/utils.py
juhi24/fmio-server
3add2a2faab06637b6cf0a4ed337ef62b8188e0f
[ "MIT" ]
2
2017-10-28T18:41:40.000Z
2020-05-12T12:50:52.000Z
"""Conversion functions for weather radar and rainfall data.""" from numpy import isfinite, log, ubyte from scipy.ndimage import gaussian_filter def dBZ_to_ubyte(I, dBZ_min=-10.0, dBZ_max=50.0, filter_stddev=3.0): """Convert a dBZ field into a 8-bit image, as required by Optflow. Optionally, apply a Gaussian smo...
27.259259
83
0.647079
"""Conversion functions for weather radar and rainfall data.""" from numpy import isfinite, log, ubyte from scipy.ndimage import gaussian_filter from skimage.exposure import equalize_hist, rescale_intensity def dBZ_to_ubyte(I, dBZ_min=-10.0, dBZ_max=50.0, filter_stddev=3.0): """Convert a dBZ field into a 8-bit imag...
0
0
0
0
0
0
0
40
22
39ad90663cac888e7ef286d5a052d4d945b5475e
1,152
py
Python
scripts/fbx_importer/fbx_helper.py
tm8r/MayaFBXImporter
591bff828021e4ba03d05e9afc9016eaf2641967
[ "MIT" ]
2
2019-10-25T17:11:33.000Z
2021-05-21T06:45:45.000Z
scripts/fbx_importer/fbx_helper.py
tm8r/MayaFBXImporter
591bff828021e4ba03d05e9afc9016eaf2641967
[ "MIT" ]
null
null
null
scripts/fbx_importer/fbx_helper.py
tm8r/MayaFBXImporter
591bff828021e4ba03d05e9afc9016eaf2641967
[ "MIT" ]
2
2020-05-13T18:07:02.000Z
2020-05-13T19:54:37.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from .vendor.Qt import QtWidgets from .libs.maya import fbx from .libs.maya import namespace from . import history_helper def import_fbx(path, import_mode, parent): """import fbx Args: path (unicode): path ...
31.135135
82
0.547743
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from .vendor.Qt import QtWidgets from .libs.maya import fbx from .libs.maya import namespace from . import history_helper def import_fbx(path, import_mode, parent): """import fbx Args: path (unicode): path ...
0
0
0
0
0
0
0
0
0
85bd09bc7858e6df3f0144f0d023684434a7438d
1,065
py
Python
app/routers/auth.py
JuanDM93/fcc-fastapi-demo
7d20f91fa96989d22426632c1ab2550f62898789
[ "MIT" ]
null
null
null
app/routers/auth.py
JuanDM93/fcc-fastapi-demo
7d20f91fa96989d22426632c1ab2550f62898789
[ "MIT" ]
null
null
null
app/routers/auth.py
JuanDM93/fcc-fastapi-demo
7d20f91fa96989d22426632c1ab2550f62898789
[ "MIT" ]
null
null
null
from fastapi import APIRouter from .. import db, models, schemas, utils, oauth2 router = APIRouter( tags=["Authentication"], )
32.272727
101
0.709859
from sqlalchemy import schema from sqlalchemy.orm import Session from fastapi import Depends, APIRouter, HTTPException, status from fastapi.security.oauth2 import OAuth2PasswordRequestForm from .. import db, models, schemas, utils, oauth2 router = APIRouter( tags=["Authentication"], ) @router.post("/login", re...
0
748
0
0
0
0
0
93
89
714353cdd4eee160fe40085bfeaee7eb35bfec53
2,739
py
Python
agent/sn_agent/api/__init__.py
akolonin/singnet
3be30d40a2394325dc14bb55ea2871fe463b9405
[ "MIT" ]
null
null
null
agent/sn_agent/api/__init__.py
akolonin/singnet
3be30d40a2394325dc14bb55ea2871fe463b9405
[ "MIT" ]
null
null
null
agent/sn_agent/api/__init__.py
akolonin/singnet
3be30d40a2394325dc14bb55ea2871fe463b9405
[ "MIT" ]
1
2020-10-27T01:32:15.000Z
2020-10-27T01:32:15.000Z
import logging import os logger = logging.getLogger(__name__) WS_FILE = os.path.join(os.path.dirname(__file__), 'websocket.html')
26.852941
89
0.686017
import logging import os from aiohttp import web, WSMsgType from aiohttp.web_response import Response from jsonrpcserver.aio import methods from sn_agent import ontology from sn_agent.api.job import can_perform_service, perform_job from sn_agent.job.job_descriptor import JobDescriptor from sn_agent.ontology.service_d...
0
543
1,436
0
0
154
0
174
294
f67cc3a36214f247ea7458d7048481056a241c09
384
py
Python
Python_Ex_vazio/ex055.py
matheusmiguelsa/Exerc-cios-de-Python
53387266b747f79e67964356993b38c2267ac04a
[ "MIT" ]
null
null
null
Python_Ex_vazio/ex055.py
matheusmiguelsa/Exerc-cios-de-Python
53387266b747f79e67964356993b38c2267ac04a
[ "MIT" ]
null
null
null
Python_Ex_vazio/ex055.py
matheusmiguelsa/Exerc-cios-de-Python
53387266b747f79e67964356993b38c2267ac04a
[ "MIT" ]
null
null
null
maior = 0 menor = 0 for p in range(1, 6): peso = float(input(f'Digite a massa da {p} pessoa em quilos: ')) if p == 1: maior = peso menor = peso else: if peso > maior: maior = peso if peso < menor: menor = peso print('O maior peso lido foi de {}Kg'.form...
27.428571
69
0.546875
maior = 0 menor = 0 for p in range(1, 6): peso = float(input(f'Digite a massa da {p}º pessoa em quilos: ')) if p == 1: maior = peso menor = peso else: if peso > maior: maior = peso if peso < menor: menor = peso print('O maior peso lido foi de {}Kg'.for...
2
0
0
0
0
0
0
0
0
ef94fa3cdab88cb3c5513b937bac0106e56972d2
1,803
py
Python
userlixo/utils/patches.py
annihilatorrrr/UserLixo
d9d9bdcdab6c7489c41f2658b288e1f59674d3b3
[ "MIT" ]
1
2022-03-28T15:38:27.000Z
2022-03-28T15:38:27.000Z
userlixo/utils/patches.py
Smartgirl2/UserLixo
73c900e0488239ff9330efb1cf9e939e7f43c496
[ "MIT" ]
null
null
null
userlixo/utils/patches.py
Smartgirl2/UserLixo
73c900e0488239ff9330efb1cf9e939e7f43c496
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2022 Amano Team
30.05
86
0.693844
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2022 Amano Team from pyrogram import types from pyrogram.helpers import bki, ikb from userlixo.database import Message async def query_edit( self, text: str, reply_markup=None, answer_kwargs={}, *args, **kwargs ): try: await self.answer(**answer_kw...
0
0
1,382
0
0
152
0
37
160
beffdc1038d5ff506f4d888b134dc83884effb8f
1,245
py
Python
src/methodComparison/plotResultsGraph.py
UMCUGenetics/svMIL
b17f9b34702aac976dd5e233cb4e1ce051d19bbf
[ "MIT" ]
null
null
null
src/methodComparison/plotResultsGraph.py
UMCUGenetics/svMIL
b17f9b34702aac976dd5e233cb4e1ce051d19bbf
[ "MIT" ]
null
null
null
src/methodComparison/plotResultsGraph.py
UMCUGenetics/svMIL
b17f9b34702aac976dd5e233cb4e1ce051d19bbf
[ "MIT" ]
1
2021-01-19T09:25:47.000Z
2021-01-19T09:25:47.000Z
import matplotlib.pyplot as plt import sys import os outDir = sys.argv[1] finalOutDir = outDir + '/figure3d/' if not os.path.exists(finalOutDir): os.makedirs(finalOutDir) #make a plot showing the true positive and false positive rates of each method. #each sv type will get its own icon, and methods can be labeled b...
31.125
89
0.711647
import matplotlib.pyplot as plt import sys import os outDir = sys.argv[1] finalOutDir = outDir + '/figure3d/' if not os.path.exists(finalOutDir): os.makedirs(finalOutDir) #make a plot showing the true positive and false positive rates of each method. #each sv type will get its own icon, and methods can be labeled b...
0
0
0
0
0
0
0
0
0
48f5c233085c88dc7df004bb3107e6ba9e591625
3,203
py
Python
kicad_bom_seeedstudio.py
ahmetcumhurarslan/kicad-bom-seeedstudio
cdd97327dbdce0f143a272f82b4a8b05e0aabbfe
[ "Apache-2.0" ]
19
2017-07-31T09:33:34.000Z
2021-05-19T03:18:11.000Z
kicad_bom_seeedstudio.py
ahmetcumhurarslan/kicad-bom-seeedstudio
cdd97327dbdce0f143a272f82b4a8b05e0aabbfe
[ "Apache-2.0" ]
2
2017-10-19T22:03:33.000Z
2019-05-11T19:56:51.000Z
kicad_bom_seeedstudio.py
imrehg/kicad-bom-seeedstudio
cdd97327dbdce0f143a272f82b4a8b05e0aabbfe
[ "Apache-2.0" ]
7
2017-10-19T20:38:24.000Z
2021-02-26T00:55:06.000Z
#!/usr/bin/env python3 import csv import sys import xml.etree.ElementTree as ET ### Natural key sorting for orders like : C1, C5, C10, C12 ... (instead of C1, C10, C12, C5...) # http://stackoverflow.com/a/5967539 import re def natural_keys(text): ''' alist.sort(key=natural_keys) sorts in human order http:...
33.020619
95
0.597877
#!/usr/bin/env python3 import csv import sys import xml.etree.ElementTree as ET ### Natural key sorting for orders like : C1, C5, C10, C12 ... (instead of C1, C10, C12, C5...) # http://stackoverflow.com/a/5967539 import re def atoi(text): return int(text) if text.isdigit() else text def natural_keys(text): '...
0
0
0
0
0
43
0
0
23
2a3ed8a00c44639bcf90af5b5d1068dde31685b4
61
py
Python
ace/samples/__init__.py
partofthething/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
47
2015-04-29T06:52:03.000Z
2022-03-15T11:05:01.000Z
ace/samples/__init__.py
Jimmy-INL/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
12
2015-05-29T15:21:25.000Z
2020-10-08T15:03:41.000Z
ace/samples/__init__.py
Jimmy-INL/ace
689d0caac3ba0708444be6ebf62627137b08ae46
[ "MIT" ]
22
2015-06-02T17:30:35.000Z
2022-02-16T20:46:24.000Z
"""Sample ace and supersmoother problems from literature."""
30.5
60
0.770492
"""Sample ace and supersmoother problems from literature."""
0
0
0
0
0
0
0
0
0
e716e82f1750b35f58a08d3424c1fe6702b9bd50
8,630
py
Python
restApp/tests.py
ibamacsr/painelmma_api
a11a6cd63e312f09f445b139fcff8c11ab383764
[ "MIT" ]
null
null
null
restApp/tests.py
ibamacsr/painelmma_api
a11a6cd63e312f09f445b139fcff8c11ab383764
[ "MIT" ]
null
null
null
restApp/tests.py
ibamacsr/painelmma_api
a11a6cd63e312f09f445b139fcff8c11ab383764
[ "MIT" ]
null
null
null
#from django.test import TestCase
37.359307
79
0.626188
#from django.test import TestCase from datetime import date from decimal import * from django.core.urlresolvers import reverse from django.contrib.auth.models import User from rest_framework.test import APITestCase from rest_framework.authtoken.models import Token from .models import * from .mommy_recipes import * ...
0
0
0
8,095
0
97
0
106
294
cc4b92f8c2b0fb7e78022602f5dcd214422a4189
27,874
py
Python
sdk/python/pulumi_rancher2/namespace.py
pulumi/pulumi-rancher2
7a98af8cf598b711084a7f46c0fe71b43ed7a8ac
[ "ECL-2.0", "Apache-2.0" ]
3
2020-03-23T15:59:11.000Z
2021-01-29T00:37:32.000Z
sdk/python/pulumi_rancher2/namespace.py
pulumi/pulumi-rancher2
7a98af8cf598b711084a7f46c0fe71b43ed7a8ac
[ "ECL-2.0", "Apache-2.0" ]
76
2020-01-16T20:00:25.000Z
2022-03-31T20:30:08.000Z
sdk/python/pulumi_rancher2/namespace.py
pulumi/pulumi-rancher2
7a98af8cf598b711084a7f46c0fe71b43ed7a8ac
[ "ECL-2.0", "Apache-2.0" ]
2
2020-03-27T17:39:59.000Z
2020-11-24T23:09:24.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 __all__ = ['NamespaceArgs', 'Namespace']
44.958065
268
0.643431
# 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
24,505
0
2,879
0
0
0
45
202
04240f905ddfcb37b6a4655974a95272768d65ab
1,791
py
Python
cortex_DIM/evaluation_models/msssim_eval.py
Soapy-Salted-Fish-King/DIM
bac4765a8126746675f517c7bfa1b04b88044d51
[ "BSD-3-Clause" ]
749
2018-08-24T13:55:34.000Z
2022-03-29T20:30:59.000Z
cortex_DIM/evaluation_models/msssim_eval.py
Soapy-Salted-Fish-King/DIM
bac4765a8126746675f517c7bfa1b04b88044d51
[ "BSD-3-Clause" ]
50
2018-09-09T13:27:40.000Z
2022-01-25T16:45:28.000Z
cortex_DIM/evaluation_models/msssim_eval.py
Soapy-Salted-Fish-King/DIM
bac4765a8126746675f517c7bfa1b04b88044d51
[ "BSD-3-Clause" ]
98
2018-08-24T15:55:23.000Z
2022-01-05T14:40:58.000Z
'''Encoder eval for MS-SSIM ''' from cortex.main import run if __name__ == '__main__': run(MSSSIMEval())
29.360656
83
0.61474
'''Encoder eval for MS-SSIM ''' from cortex.main import run from cortex_DIM.configs.deconvnets import configs as decoder_configs from cortex_DIM.models.decoder import Decoder class MSSSIMEval(Decoder): '''Measure MS-SSIM through a decoder trained with reconstruction. ''' defaults = dict( data=...
0
0
0
1,539
0
0
0
71
68
8d0910cd5960f52a9db19fe70f314beaa84f3f9b
3,742
py
Python
btsprice/yahoo.py
pch957/btsprice
8a6913dfc0d74e668e116855ea8bb1caf3af6c04
[ "MIT" ]
18
2016-09-16T16:07:35.000Z
2020-08-03T13:14:56.000Z
btsprice/yahoo.py
roelandp/btsprice
ad2f4d6d694a4ac71d5b227a22731160f700323b
[ "MIT" ]
5
2017-08-31T00:14:02.000Z
2019-10-18T12:44:22.000Z
btsprice/yahoo.py
roelandp/btsprice
ad2f4d6d694a4ac71d5b227a22731160f700323b
[ "MIT" ]
20
2016-06-27T09:46:18.000Z
2020-10-26T05:17:47.000Z
# -*- coding: utf-8 -*- import asyncio if __name__ == "__main__": loop = asyncio.get_event_loop() yahoo = Yahoo() loop.run_until_complete(yahoo.fetch_price()) loop.run_forever()
35.638095
80
0.512293
# -*- coding: utf-8 -*- import asyncio import aiohttp def is_float_try(str): try: float(str) return True except ValueError: return False class Yahoo(object): def __init__(self): header = { 'content-type': 'application/json', 'User-Agent': 'Mozilla/...
0
1,546
0
1,845
0
93
0
-7
68
cd03445dfd6bb3e838191ac085b921cb783539d5
322
py
Python
divik/core/io/__init__.py
Hirni-Meshram/divik
0f542ec2669428458a4ecf6bb450dc90c33b0653
[ "Apache-2.0" ]
10
2020-01-10T13:10:38.000Z
2022-03-17T05:08:40.000Z
divik/core/io/__init__.py
Hirni-Meshram/divik
0f542ec2669428458a4ecf6bb450dc90c33b0653
[ "Apache-2.0" ]
45
2019-10-26T12:42:50.000Z
2022-03-12T07:50:40.000Z
divik/core/io/__init__.py
Hirni-Meshram/divik
0f542ec2669428458a4ecf6bb450dc90c33b0653
[ "Apache-2.0" ]
5
2021-11-24T04:55:45.000Z
2021-12-17T23:38:19.000Z
"""Reusable utilities for data and model I/O""" from ._data_io import (load_data, save_csv, try_load_data, try_load_xy) from ._model_io import save, saver DIVIK_RESULT_FNAME = "result.pkl" __all__ = [ "load_data", "save_csv", "try_load_data", "try_load_xy", "save", "saver", ]
16.1
47
0.636646
"""Reusable utilities for data and model I/O""" from ._data_io import ( load_data, save_csv, try_load_data, try_load_xy, ) from ._model_io import save, saver DIVIK_RESULT_FNAME = "result.pkl" __all__ = [ "load_data", "save_csv", "try_load_data", "try_load_xy", "save", "saver", ...
0
0
0
0
0
0
0
19
0
76bd6d76686e284e16cd6ff1f9bb9c73128a6fce
843
py
Python
data_cleaning/create_png_dataset.py
bioinfoUQAM/Canadian-cropland-dataset
bfac01c80e20f6eb224e446e480b16dc5fed2547
[ "MIT" ]
2
2021-09-15T02:36:53.000Z
2022-03-30T16:05:07.000Z
data_cleaning/create_png_dataset.py
bioinfoUQAM/Canadian-cropland-dataset
bfac01c80e20f6eb224e446e480b16dc5fed2547
[ "MIT" ]
null
null
null
data_cleaning/create_png_dataset.py
bioinfoUQAM/Canadian-cropland-dataset
bfac01c80e20f6eb224e446e480b16dc5fed2547
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Apr 30 22:41:09 2021 @author: amanda """ # loop through the .zip files and create images in .png format # import necessary libraries import os import image_to_png directory = "dataset_zip" #file_extensions = ["OSAVI", "NDVI", "GNDVI", "PSRI", "NDVI45"] extension = "OSAVI" ...
27.193548
66
0.688019
# -*- coding: utf-8 -*- """ Created on Fri Apr 30 22:41:09 2021 @author: amanda """ # loop through the .zip files and create images in .png format # import necessary libraries import os import image_to_png directory = "dataset_zip" #file_extensions = ["OSAVI", "NDVI", "GNDVI", "PSRI", "NDVI45"] extension = "OSAVI" ...
0
0
0
0
0
0
0
0
0
4ce5ed3f89af7fd520b5af53b81ee7407fa15d83
938
py
Python
analytics/utils.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
analytics/utils.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
analytics/utils.py
iamnkc/tournesol
4a09985f494577917c357783a37dfae02c57fd82
[ "CC0-1.0" ]
null
null
null
import pandas as pd CRITERIA = [ "largely_recommended", "reliability", "importance", "engaging", "pedagogy", "layman_friendly", "entertaining_relaxing", "better_habits", "diversity_inclusion", "backfire_risk", ] TCOLOR = [ "#1282b2", "#DC8A5D", "#C28BED", "#4C7...
18.038462
80
0.602345
import pandas as pd CRITERIA = [ "largely_recommended", "reliability", "importance", "engaging", "pedagogy", "layman_friendly", "entertaining_relaxing", "better_habits", "diversity_inclusion", "backfire_risk", ] TCOLOR = [ "#1282b2", "#DC8A5D", "#C28BED", "#4C7...
0
0
0
0
0
80
0
0
23
e0249aa077ed0d6f12ca41eadfc35b890bcae4a2
21,271
py
Python
networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe.py
openstack/networking-bgpvpn
1789824ec90505d7d67c3b624d318c36b798fb12
[ "Apache-2.0" ]
38
2015-06-23T08:06:16.000Z
2022-01-25T16:03:10.000Z
networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe.py
openstack/networking-bgpvpn
1789824ec90505d7d67c3b624d318c36b798fb12
[ "Apache-2.0" ]
null
null
null
networking_bgpvpn/neutron/services/service_drivers/bagpipe/bagpipe.py
openstack/networking-bgpvpn
1789824ec90505d7d67c3b624d318c36b798fb12
[ "Apache-2.0" ]
17
2015-11-28T00:45:22.000Z
2021-07-22T09:22:30.000Z
# Copyright (c) 2015 Orange. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
38.744991
79
0.593249
# Copyright (c) 2015 Orange. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
0
19,206
0
0
0
394
0
375
588
3bf82136b95654948d1c922678337c70dedf2483
857
py
Python
doc/snippets/rph_deserializer.py
michael-the1/diepvries
ddba9c91ee5fb2014dc576ffb74faa40c3d0d04f
[ "MIT" ]
67
2021-08-20T14:30:49.000Z
2022-03-22T23:37:08.000Z
doc/snippets/rph_deserializer.py
michael-the1/diepvries
ddba9c91ee5fb2014dc576ffb74faa40c3d0d04f
[ "MIT" ]
1
2022-01-22T08:19:38.000Z
2022-02-02T08:48:34.000Z
doc/snippets/rph_deserializer.py
michael-the1/diepvries
ddba9c91ee5fb2014dc576ffb74faa40c3d0d04f
[ "MIT" ]
6
2021-09-03T17:21:16.000Z
2021-12-22T12:11:51.000Z
if __name__ == "__main__": deserialize()
26.78125
83
0.667445
from diepvries.deserializers.snowflake_deserializer import ( DatabaseConfiguration, SnowflakeDeserializer, ) def deserialize(): database_configuration = DatabaseConfiguration( database="<DB>", user="<USER>", password="<PASSWORD>", warehouse="<WAREHOUSE>", account="<...
0
0
0
0
0
669
0
95
45
caa7fc2ab467b003c39e1164d5b171219ed1bd62
1,073
py
Python
metrics/uncertainty_confidence.py
Karthik-Ragunath/DDU
b9daae9304bdeb222857884ef8cb3b6b3d004d33
[ "MIT" ]
43
2021-05-20T14:07:53.000Z
2022-03-23T12:58:26.000Z
metrics/uncertainty_confidence.py
Karthik-Ragunath/DDU
b9daae9304bdeb222857884ef8cb3b6b3d004d33
[ "MIT" ]
3
2021-09-19T20:49:21.000Z
2022-03-07T10:25:47.000Z
metrics/uncertainty_confidence.py
Karthik-Ragunath/DDU
b9daae9304bdeb222857884ef8cb3b6b3d004d33
[ "MIT" ]
8
2021-06-26T15:28:45.000Z
2022-02-19T02:07:05.000Z
""" Metrics measuring either uncertainty or confidence of a model. """
21.897959
63
0.664492
""" Metrics measuring either uncertainty or confidence of a model. """ import torch import torch.nn.functional as F def entropy(logits): p = F.softmax(logits, dim=1) logp = F.log_softmax(logits, dim=1) plogp = p * logp entropy = -torch.sum(plogp, dim=1) return entropy def logsumexp(logits): ...
0
0
0
0
0
837
0
1
159
4bd8f34b13a613b9fbf79810fcb40ce5c3a6a951
3,717
py
Python
pysnmp-with-texts/TUBS-IBR-AGENT-CAPABILITIES.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/TUBS-IBR-AGENT-CAPABILITIES.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/TUBS-IBR-AGENT-CAPABILITIES.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module TUBS-IBR-AGENT-CAPABILITIES (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TUBS-IBR-AGENT-CAPABILITIES # Produced by pysmi-0.3.4 at Wed May 1 15:27:47 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python versio...
97.815789
477
0.769438
# # PySNMP MIB module TUBS-IBR-AGENT-CAPABILITIES (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TUBS-IBR-AGENT-CAPABILITIES # Produced by pysmi-0.3.4 at Wed May 1 15:27:47 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python versio...
0
0
0
0
0
0
0
0
0
7075d8ceddff8373d1448de790f5c8e02b65488c
2,373
py
Python
generate_letter.py
drewlinsley/cabc
74726509e542d5f0f04bf297c211cca9f6e87b56
[ "MIT" ]
2
2020-04-19T01:19:10.000Z
2021-06-08T02:04:48.000Z
generate_letter.py
drewlinsley/cabc
74726509e542d5f0f04bf297c211cca9f6e87b56
[ "MIT" ]
null
null
null
generate_letter.py
drewlinsley/cabc
74726509e542d5f0f04bf297c211cca9f6e87b56
[ "MIT" ]
null
null
null
from PIL import ImageFont from PIL import Image from PIL import ImageDraw import numpy as np import matplotlib.pyplot as plt import os import scipy import preprocess if __name__ == "__main__": # DEFINE AND LOAD FONT script_root = '/Users/junkyungkim/Documents/PycharmProjects/cluttered_nist' fontnames = ['FUTRFW.t...
32.958333
115
0.710072
import PIL from PIL import ImageFont from PIL import Image from PIL import ImageDraw import numpy as np import matplotlib.pyplot as plt import os from skimage.filters import threshold_otsu import scipy from scipy import ndimage from scipy.interpolate import griddata import cv2 import preprocess if __name__ == "__ma...
0
0
0
0
0
0
0
20
111
2bf52aa5f62814599fc3741d49983e8f1296f5e3
3,503
py
Python
qlknn/plots/load_data.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
null
null
null
qlknn/plots/load_data.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
null
null
null
qlknn/plots/load_data.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
2
2018-02-28T14:18:43.000Z
2018-11-26T11:06:08.000Z
import scipy.stats as stats shortname = {'Ate': '$R/L_{T_e}$', 'Ati': '$R/L_{T_i}$'} longname ={ 'Ate': 'Normalized electron temperature gradient $R/L_{T_e}$', 'Ati': 'Normalized ion temperature gradient $R/L_{T_i}$'} nameconvert = { 'An': '$R/L_n$', #'Nustar': '$\\nu^*$', 'Nustar'...
29.940171
89
0.586355
import os import sys import numpy as np import scipy.stats as stats import pandas as pd from IPython import embed from qlknn.NNDB.model import Network, NetworkJSON from qlknn.models.ffnn import QuaLiKizNDNN def load_data(id): store = pd.HDFStore('../7D_nions0_flat.h5') input = store['megarun1/input'] dat...
0
0
0
0
0
1,801
0
25
224
2bcc82625a9e7a68e52a4eca462930e5ea09cbb5
4,424
py
Python
src/arclet/alconna/builtin/actions.py
ArcletProject/Alconna
e7532fe04a425ac2a1f64a0604017194f7cdc535
[ "MIT" ]
13
2021-12-14T05:47:03.000Z
2022-03-10T15:52:27.000Z
src/arclet/alconna/builtin/actions.py
ArcletProject/Alconna
e7532fe04a425ac2a1f64a0604017194f7cdc535
[ "MIT" ]
31
2021-12-14T15:16:01.000Z
2022-03-27T16:51:33.000Z
src/arclet/alconna/builtin/actions.py
ArcletProject/Alconna
e7532fe04a425ac2a1f64a0604017194f7cdc535
[ "MIT" ]
1
2022-03-22T13:33:04.000Z
2022-03-22T13:33:04.000Z
"""Alconna ArgAction""" from typing import Any, Optional, TYPE_CHECKING, Literal def store_value(value: Any): """""" return _StoreValue(value) if TYPE_CHECKING: from arclet.alconna import alconna_version def version(value: Optional[tuple]): """""" return _StoreValue(value) if valu...
32.291971
105
0.618445
"""Alconna ArgAction相关""" from datetime import datetime from typing import Any, Optional, TYPE_CHECKING, Literal from arclet.alconna.components.action import ArgAction from arclet.alconna.components.behavior import ArpamarBehavior from arclet.alconna.exceptions import BehaveCancelled, OutBoundsBehavior from arclet.alc...
465
0
0
2,781
0
0
0
173
268
a49de0f42e9244dddb80c5007220619b2b81057e
142
py
Python
notification/admin.py
tiagocdr/twitter-clone
53737774f2f7766c69f9f9d96458a630124fa6d8
[ "MIT" ]
null
null
null
notification/admin.py
tiagocdr/twitter-clone
53737774f2f7766c69f9f9d96458a630124fa6d8
[ "MIT" ]
null
null
null
notification/admin.py
tiagocdr/twitter-clone
53737774f2f7766c69f9f9d96458a630124fa6d8
[ "MIT" ]
null
null
null
from django.contrib import admin from notification.models import Notifications # Register your models here. admin.site.register(Notifications)
35.5
45
0.852113
from django.contrib import admin from notification.models import Notifications # Register your models here. admin.site.register(Notifications)
0
0
0
0
0
0
0
0
0
3eb8467a6d27f9eb162881b64089f508aede1b60
5,742
py
Python
src/main.py
westernmagic/outer_ear
a2d193c6c2ddb22f0aee8ad6971b019d1096c114
[ "Apache-2.0" ]
null
null
null
src/main.py
westernmagic/outer_ear
a2d193c6c2ddb22f0aee8ad6971b019d1096c114
[ "Apache-2.0" ]
null
null
null
src/main.py
westernmagic/outer_ear
a2d193c6c2ddb22f0aee8ad6971b019d1096c114
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' Outer ear simulator Author: Michal Sudwoj <msudwoj@student.ethz.ch> Version: 1.0.0 Data: 2019-09-09 ''' from typing import Tuple import numpy as np import scipy.io.wavfile as wav import scipy.signal as ss from pysofaconventions import SOFAFile def head(data : np.ndarray, sofa : SOFAFile, az...
24.965217
114
0.574713
#!/usr/bin/env python ''' Outer ear simulator Author: Michal Sudwoj <msudwoj@student.ethz.ch> Version: 1.0.0 Data: 2019-09-09 ''' from typing import Tuple import numpy as np import scipy.io.wavfile as wav import scipy.signal as ss from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from pysofaconventio...
0
0
0
0
0
2,691
0
45
114
03ee90dbd506d67950bf67048c286a932430249f
2,549
py
Python
auth.py
Yodart/banky
604c37ab80d95bb9f81d91534df512b20df5cd10
[ "MIT" ]
1
2021-04-23T10:51:26.000Z
2021-04-23T10:51:26.000Z
auth.py
Yodart/banky
604c37ab80d95bb9f81d91534df512b20df5cd10
[ "MIT" ]
null
null
null
auth.py
Yodart/banky
604c37ab80d95bb9f81d91534df512b20df5cd10
[ "MIT" ]
null
null
null
from flask import Blueprint auth = Blueprint('auth', __name__)
39.828125
137
0.608474
from flask import Flask, Blueprint, request, jsonify, make_response, redirect, url_for from werkzeug.security import generate_password_hash, check_password_hash from functools import wraps from db import db_connect import datetime import jwt import sys auth = Blueprint('auth', __name__) def require_auth_token(f): ...
0
2,160
0
0
0
52
0
93
178
bd3f48038a738c477c55e470123e442f51b07416
361
py
Python
yelp/urls.py
elizabethts/tally_ai_ds
20c63420a532d277e8832a11af75d5c4ffa9215c
[ "MIT" ]
3
2020-04-01T22:17:48.000Z
2021-01-24T19:04:19.000Z
yelp/urls.py
elizabethts/tally_ai_ds
20c63420a532d277e8832a11af75d5c4ffa9215c
[ "MIT" ]
8
2020-06-05T21:05:14.000Z
2021-12-13T20:43:05.000Z
yelp/urls.py
elizabethts/tally_ai_ds
20c63420a532d277e8832a11af75d5c4ffa9215c
[ "MIT" ]
2
2020-04-11T20:14:13.000Z
2021-01-06T01:06:10.000Z
# yelp/urls.py from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns # view functions from .views import hello from .views import home urlpatterns = { path('', hello, name='hello'), path('<slug:business_id>', home, name='home'), } urlpatterns = format_suffix_patterns(urlp...
24.066667
61
0.759003
# yelp/urls.py from django.urls import path from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns # view functions from .views import hello from .views import home urlpatterns = { path('', hello, name='hello'), path('<slug:business_id>', home, name='home'), } urlpatte...
0
0
0
0
0
0
0
11
22
1e220db752c0243838f7243836c9a10b0fa287c8
3,661
py
Python
mini-projects/aic-15-image-search-engine/utils/model.py
elbertsoftware/SpringboardAIC
54278548c94d1a7a61ab977ecb47d96f73f94060
[ "Unlicense" ]
3
2019-04-06T12:37:55.000Z
2021-01-28T01:38:45.000Z
mini-projects/aic-15-image-search-engine/utils/model.py
elbertsoftware/SpringboardAIC
54278548c94d1a7a61ab977ecb47d96f73f94060
[ "Unlicense" ]
16
2020-03-24T18:22:38.000Z
2022-01-13T02:24:27.000Z
mini-projects/aic-15-image-search-engine/utils/model.py
elbertsoftware/SpringboardAIC
54278548c94d1a7a61ab977ecb47d96f73f94060
[ "Unlicense" ]
1
2019-11-30T09:06:46.000Z
2019-11-30T09:06:46.000Z
import tensorflow as tf def model_inputs(image_size): ''' Defines CNN inputs (placeholders). :param image_size: tuple, (height, width) of an image ''' #-> [Batch_size, image_size[0], image_size[1], 3] inputs = tf.placeholder(dtype=tf.float32, shape=[None, image_size[0], image_si...
35.543689
108
0.556405
import tensorflow as tf def model_inputs(image_size): ''' Defines CNN inputs (placeholders). :param image_size: tuple, (height, width) of an image ''' #-> [Batch_size, image_size[0], image_size[1], 3] inputs = tf.placeholder(dtype=tf.float32, shape=[None, image_size[0], image_si...
0
0
0
0
0
0
0
0
0
49d827b18611982ce6bdabdd882d794ee52b953a
12,001
py
Python
QC/datasets/utils.py
phcavelar/graph-odenet
cba1224c041e53ea221e31bf9103ef950b8bd460
[ "MIT" ]
4
2019-12-10T18:49:03.000Z
2022-02-16T03:21:30.000Z
QC/datasets/utils.py
phcavelar/graph-odenet
cba1224c041e53ea221e31bf9103ef950b8bd460
[ "MIT" ]
1
2020-11-04T04:41:09.000Z
2021-01-07T18:52:37.000Z
QC/datasets/utils.py
phcavelar/graph-odenet
cba1224c041e53ea221e31bf9103ef950b8bd460
[ "MIT" ]
2
2020-04-03T12:05:33.000Z
2020-10-10T11:57:48.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Adapted from https://github.com/priba/nmp_qc """ utils.py: Functions to process dataset graphs. Usage: """ from __future__ import print_function __author__ = "Pedro HC Avelar, Pau Riba, Anjan Dutta" __email__ = "phcavelar@inf.ufrgs.br, priba@cvc.uab.cat, adutta@...
31.664908
177
0.548371
#!/usr/bin/python # -*- coding: utf-8 -*- # Adapted from https://github.com/priba/nmp_qc """ utils.py: Functions to process dataset graphs. Usage: """ from __future__ import print_function import rdkit import torch from joblib import Parallel, delayed import multiprocessing import networkx as nx import nu...
0
0
0
0
0
10,692
0
-25
407
50691cf6b0a343a60746294d17b9d62fdcf4fa2d
675
py
Python
__init__.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
__init__.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
__init__.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
''' ############################################################################### Ultrafast Quantum Optics Package ############################################################################### Quantum Optics and Quantum Information Group Written by > Jean-Philippe MacLean: jpmaclean@uwaterloo.ca > Sacha Schwarz s...
27
79
0.601481
''' ############################################################################### Ultrafast Quantum Optics Package ############################################################################### Quantum Optics and Quantum Information Group Written by > Jean-Philippe MacLean: jpmaclean@uwaterloo.ca > Sacha Schwarz s...
0
0
0
0
0
0
0
70
115
840d8ae323c0daf347b4937320a2c80c2d7c1d9f
7,645
py
Python
app/switch/controller.py
conatel-i-d/sm-api
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
[ "MIT" ]
1
2020-09-20T07:44:33.000Z
2020-09-20T07:44:33.000Z
app/switch/controller.py
conatel-i-d/sm-api
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
[ "MIT" ]
2
2019-12-10T13:00:36.000Z
2021-04-30T21:04:42.000Z
app/switch/controller.py
conatel-i-d/sm-api
1a57e8303ae5f33ae4c8ac8247449fac5b0c848d
[ "MIT" ]
null
null
null
from flask_restplus import Namespace from .interfaces import SwitchInterfaces api_description = """ Representacin de los switches de la empresa. """ api = Namespace('Switch', description=api_description) interfaces = SwitchInterfaces(api)
35.230415
106
0.63898
import os, sys from flask import request from flask_restplus import Namespace, Resource, fields from flask.wrappers import Response from app.utils.async_action import async_action from app.api_response import ApiResponse from app.errors import ApiException, JobTemplateNotFound, PlaybookFailure, PlaybookTimeout, Switch...
36
6,789
0
0
0
0
0
240
357