hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
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.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
1d73f68f5fdde19e76c3d09d7604ff232b8d082d
1,261
py
Python
icarus_simulator/sat_core/coordinate_util.py
RubenFr/ICARUS-framework
e57a1f50c3bb9522b2a279fee6b625628afd056f
[ "MIT" ]
5
2021-08-31T08:07:41.000Z
2022-01-04T02:09:25.000Z
icarus_simulator/sat_core/coordinate_util.py
RubenFr/ICARUS-framework
e57a1f50c3bb9522b2a279fee6b625628afd056f
[ "MIT" ]
3
2021-09-23T09:06:35.000Z
2021-12-08T04:53:01.000Z
icarus_simulator/sat_core/coordinate_util.py
RubenFr/ICARUS-framework
e57a1f50c3bb9522b2a279fee6b625628afd056f
[ "MIT" ]
2
2022-01-19T17:50:56.000Z
2022-03-06T18:59:41.000Z
# 2020 Tommaso Ciussani and Giacomo Giuliari """ This file contains the type definitions and conversions between coordinate schemes. All length values in m """ import numpy as np from typing import Tuple from typing_extensions import TypedDict from icarus_simulator.sat_core.planetary_const import EARTH_RADIUS C...
25.22
83
0.681205
# 2020 Tommaso Ciussani and Giacomo Giuliari """ This file contains the type definitions and conversions between coordinate schemes. All length values in m """ import numpy as np from typing import Tuple from typing_extensions import TypedDict from icarus_simulator.sat_core.planetary_const import EARTH_RADIUS cla...
0
162
46
0a0267d5dc5af5883c61f4d96b1b3eaeb3197231
220
py
Python
src/cmd_help.py
parsecmonkey/RepoMainForPy
e07ef5358723c384ca8d233e42dc8580e761867e
[ "MIT" ]
6
2021-11-26T21:57:35.000Z
2022-01-23T12:40:35.000Z
src/cmd_help.py
parsecmonkey/RepoMainForPy
e07ef5358723c384ca8d233e42dc8580e761867e
[ "MIT" ]
46
2021-11-18T17:32:47.000Z
2022-01-10T12:26:56.000Z
src/cmd_help.py
parsecmonkey/RepoMainForPy
e07ef5358723c384ca8d233e42dc8580e761867e
[ "MIT" ]
1
2021-11-19T03:16:16.000Z
2021-11-19T03:16:16.000Z
# help
22
33
0.590909
# help def run(): print("help : コマンド一覧を表示") print("clone: リポジトリをクローン") print("log : ログを確認") print("diff : ファイルの差分を確認") print("plot : グラフを描画") print("message:コミットメッセージを解析") print("exit : 終了")
301
0
23
09d701a9f15c22b38883e7c39e11f536f6754a18
104
py
Python
entity/cards/LETLT_060/__init__.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
102
2021-10-20T09:06:39.000Z
2022-03-28T13:35:11.000Z
entity/cards/LETLT_060/__init__.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
98
2021-10-19T16:13:27.000Z
2022-03-27T13:27:49.000Z
entity/cards/LETLT_060/__init__.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
55
2021-10-19T03:56:50.000Z
2022-03-25T08:25:26.000Z
# -*- coding: utf-8 -*- import entity.cards.LETLT_060.LETLT_060 import entity.cards.LETLT_060.LETLT_060
26
39
0.769231
# -*- coding: utf-8 -*- import entity.cards.LETLT_060.LETLT_060 import entity.cards.LETLT_060.LETLT_060
0
0
0
7752f4522648507d97542e729853ad5868334402
1,503
py
Python
blog_app/blog/migrations/0011_auto_20190216_1124.py
flxj/Django_blog
01eb12553335115fee5faecafe8cacf2f0615135
[ "MIT" ]
1
2019-03-27T02:24:22.000Z
2019-03-27T02:24:22.000Z
blog_app/blog/migrations/0011_auto_20190216_1124.py
flxj/Django_blog
01eb12553335115fee5faecafe8cacf2f0615135
[ "MIT" ]
null
null
null
blog_app/blog/migrations/0011_auto_20190216_1124.py
flxj/Django_blog
01eb12553335115fee5faecafe8cacf2f0615135
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-02-16 03:24 from django.db import migrations, models
27.833333
65
0.540253
# Generated by Django 2.1.5 on 2019-02-16 03:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0010_auto_20190213_1925'), ] operations = [ migrations.AlterField( model_name='book', name='created_time', ...
0
1,389
23
429ee136ee6e644765bfba03ee4ed907a9f58777
416
py
Python
rules/LineTooLongRule.py
rvben/galaxy-lint-rules
aa014ea79ce1eaf3a5e6be187fd6d3cc1617fea4
[ "Apache-2.0" ]
null
null
null
rules/LineTooLongRule.py
rvben/galaxy-lint-rules
aa014ea79ce1eaf3a5e6be187fd6d3cc1617fea4
[ "Apache-2.0" ]
null
null
null
rules/LineTooLongRule.py
rvben/galaxy-lint-rules
aa014ea79ce1eaf3a5e6be187fd6d3cc1617fea4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Ansible, Inc. # All Rights Reserved. from ansiblelint import AnsibleLintRule
26
62
0.661058
# Copyright (c) 2018 Ansible, Inc. # All Rights Reserved. from ansiblelint import AnsibleLintRule class LineTooLongRule(AnsibleLintRule): id = '204' shortdesc = 'Lines should be no longer than 120 chars' description = 'Long lines make code harder to read and ' \ 'code review more diffic...
38
255
23
bd43ad78f3ba7e5d3ac09df61846ff56d8bd6cec
827
py
Python
recruiter/convertPDFToText.py
bhagvank/BankingChatbot
0a320176cdef41605ed8cbe3471a61815a769f29
[ "Apache-2.0" ]
null
null
null
recruiter/convertPDFToText.py
bhagvank/BankingChatbot
0a320176cdef41605ed8cbe3471a61815a769f29
[ "Apache-2.0" ]
null
null
null
recruiter/convertPDFToText.py
bhagvank/BankingChatbot
0a320176cdef41605ed8cbe3471a61815a769f29
[ "Apache-2.0" ]
null
null
null
import PyPDF2 import textract #from nltk.tokenize import word_tokenize #from nltk.corpus import stopwords
41.35
163
0.708585
import PyPDF2 import textract #from nltk.tokenize import word_tokenize #from nltk.corpus import stopwords def convertPDFToText(path): filename = path #open allows you to read the file pdfFileObj = open(filename,'rb')#The pdfReader variable is a readable object that will be parsed pdfReader = PyPDF2.PdfFi...
698
0
23
43eb5bd1e21c18789dba4a888e8bc24b516d544f
5,066
py
Python
BLSeg/blseg/backbone/mobilenet.py
ForrestPi/semanticSegmentation
1e5519279e2a9574f09eaf91439138b74b0f860c
[ "MIT" ]
7
2020-04-06T10:25:30.000Z
2021-02-24T14:51:22.000Z
BLSeg/blseg/backbone/mobilenet.py
ForrestPi/semanticSegmentation
1e5519279e2a9574f09eaf91439138b74b0f860c
[ "MIT" ]
null
null
null
BLSeg/blseg/backbone/mobilenet.py
ForrestPi/semanticSegmentation
1e5519279e2a9574f09eaf91439138b74b0f860c
[ "MIT" ]
2
2020-04-08T14:43:21.000Z
2020-12-11T03:03:37.000Z
import torch from torch import nn from .utils import conv3x3, DepthwiseSeparableConv from .base import BackboneBaseModule
38.969231
78
0.536715
import torch from torch import nn from .utils import conv3x3, DepthwiseSeparableConv from .base import BackboneBaseModule class LinearBottleneck(nn.Module): def __init__(self, in_ch, out_ch, t, stride): super(LinearBottleneck, self).__init__() self.do_residual = in_ch == out_ch and stride == 1 ...
4,555
47
339
860ae04a58c63c4e628e9f219b834f014c47ea76
2,174
py
Python
coreRelback/urls.py
supernoi/relback
b4f04d7ed5cb315e9c862fbd82291ada8fb5af08
[ "MIT" ]
null
null
null
coreRelback/urls.py
supernoi/relback
b4f04d7ed5cb315e9c862fbd82291ada8fb5af08
[ "MIT" ]
null
null
null
coreRelback/urls.py
supernoi/relback
b4f04d7ed5cb315e9c862fbd82291ada8fb5af08
[ "MIT" ]
1
2019-06-25T13:27:40.000Z
2019-06-25T13:27:40.000Z
from django.contrib import admin from django.urls import path from coreRelback import views app_name = 'coreRelback' urlpatterns = [ path('', views.index, name='index'), path('admin/', admin.site.urls), path('creators/', views.creators, name='creators'), # Routes - Clients path('client/', views....
46.255319
134
0.699632
from django.contrib import admin from django.urls import path from coreRelback import views app_name = 'coreRelback' urlpatterns = [ path('', views.index, name='index'), path('admin/', admin.site.urls), path('creators/', views.creators, name='creators'), # Routes - Clients path('client/', views....
0
0
0
b900d8747d0d6c2c0034ef9bc48889dd61f44eaa
1,181
py
Python
angr/analyses/reaching_definitions/__init__.py
Will03/angr
2a3a67f38aaeb4dbd5cc4ed0d5b9057c8739ca80
[ "BSD-2-Clause" ]
1
2021-05-21T02:41:28.000Z
2021-05-21T02:41:28.000Z
angr/analyses/reaching_definitions/__init__.py
FDlucifer/angr
598f18a39c98d853a91f6880d25df2c528d3b312
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/reaching_definitions/__init__.py
FDlucifer/angr
598f18a39c98d853a91f6880d25df2c528d3b312
[ "BSD-2-Clause" ]
null
null
null
from typing import Set, Optional, TYPE_CHECKING from ...knowledge_plugins.key_definitions import LiveDefinitions from .. import register_analysis from .reaching_definitions import ReachingDefinitionsAnalysis if TYPE_CHECKING: from angr.knowledge_plugins.key_definitions.definition import Definition from angr....
33.742857
76
0.73497
from typing import Set, Optional, TYPE_CHECKING from ...knowledge_plugins.key_definitions import LiveDefinitions from .. import register_analysis from .reaching_definitions import ReachingDefinitionsAnalysis if TYPE_CHECKING: from angr.knowledge_plugins.key_definitions.definition import Definition from angr....
586
0
23
8dac0f518ca1a8ddf8cf6e572b444e406a6bfe5b
1,843
py
Python
viewer.py
ramankh/Smartcab
0044bbc61b2ade7170115271e7f6ec590ed0e298
[ "MIT" ]
null
null
null
viewer.py
ramankh/Smartcab
0044bbc61b2ade7170115271e7f6ec590ed0e298
[ "MIT" ]
null
null
null
viewer.py
ramankh/Smartcab
0044bbc61b2ade7170115271e7f6ec590ed0e298
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt
36.86
141
0.605534
import numpy as np import matplotlib.pyplot as plt class Plotter(): def __init__(self, e, g, a): self.e = e self.g = g self.a = a def plot_success(self): result = np.load("result.npy").item() stats = np.load("stats.npy").item() colors = list("rgbcmyk") print stats x = result.keys() ...
1,679
-5
119
145812906c5f285067f65f7a95625e19b7a51831
6,009
py
Python
okcupyd/profile_copy.py
sphericalcow/okcupyd
ae0a99d248c515eea9a6d21a9c89f51e299b33f5
[ "MIT" ]
89
2015-01-09T19:58:07.000Z
2022-03-03T21:56:50.000Z
okcupyd/profile_copy.py
sphericalcow/okcupyd
ae0a99d248c515eea9a6d21a9c89f51e299b33f5
[ "MIT" ]
51
2015-01-18T23:09:35.000Z
2017-04-24T03:16:03.000Z
okcupyd/profile_copy.py
sphericalcow/okcupyd
ae0a99d248c515eea9a6d21a9c89f51e299b33f5
[ "MIT" ]
24
2015-01-16T17:43:21.000Z
2020-09-18T12:19:15.000Z
import logging import time from .profile import Profile from .question import Questions log = logging.getLogger(__name__) class Copy(object): """Copy photos, essays and other attributes from one profile to another.""" copy_methods = ['photos', 'essays', 'looking_for', 'details', 'questions'] def __in...
41.157534
80
0.579963
import logging import time from .profile import Profile from .question import Questions log = logging.getLogger(__name__) class Copy(object): """Copy photos, essays and other attributes from one profile to another.""" copy_methods = ['photos', 'essays', 'looking_for', 'details', 'questions'] def __in...
2,516
0
54
fb07d1f256a2f6d7a6cc9dbdf801ef7f4558d52a
323
py
Python
TP_ALGO_3/convert.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
TP_ALGO_3/convert.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
TP_ALGO_3/convert.py
PierreLeGuen/ALGO_S5
9067e887d14fe997c6944292a0cff23ceda47b6e
[ "MIT" ]
null
null
null
print(convert(10,2)) print(convert_inv(10,2))
16.15
49
0.544892
def convert(n,base): if n < base: res = str(n) else: res = convert(n//base,base) + str(n%base) return res print(convert(10,2)) def convert_inv(n,base): if n < base: res = str(n) else: res = str(n%base) + convert(n//base,base) return res print(convert_inv(10,2...
228
0
45
87c1757d37d96b9139b1f04cc9caf72ffd1cad94
208
py
Python
{{cookiecutter.repo_name}}/tests/conftest.py
digitalr00ts/cookiecutter-sphinx-docs
0311e0de0978662fa4f129a4598ffe6dfc2340ea
[ "Apache-2.0" ]
1
2018-11-10T23:45:10.000Z
2018-11-10T23:45:10.000Z
{{cookiecutter.repo_name}}/tests/conftest.py
digitalr00ts/cookiecutter-sphinx-docs
0311e0de0978662fa4f129a4598ffe6dfc2340ea
[ "Apache-2.0" ]
null
null
null
{{cookiecutter.repo_name}}/tests/conftest.py
digitalr00ts/cookiecutter-sphinx-docs
0311e0de0978662fa4f129a4598ffe6dfc2340ea
[ "Apache-2.0" ]
3
2019-03-15T20:28:29.000Z
2020-10-10T04:32:53.000Z
"""Configuration for tests.""" import {{ cookiecutter.project_slug }} def pytest_report_header(): """Additional report header.""" return f"version: { {{- cookiecutter.project_slug -}}.__version__}"
26
71
0.697115
"""Configuration for tests.""" import {{ cookiecutter.project_slug }} def pytest_report_header(): """Additional report header.""" return f"version: { {{- cookiecutter.project_slug -}}.__version__}"
0
0
0
fcbd9e1e6136d72f930126d932e00b32886b9ef2
30
py
Python
bluespot/guest/settings.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
21
2015-11-10T11:40:39.000Z
2021-12-02T22:58:45.000Z
bluespot/guest/settings.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
null
null
null
bluespot/guest/settings.py
unifispot/unifispot-free
186c906aa79e8671e03d0808469a3f27d67e34e1
[ "MIT" ]
10
2016-02-03T14:45:41.000Z
2019-11-08T08:21:25.000Z
GUEST_URL_PREFIX = '/guest'
7.5
27
0.7
GUEST_URL_PREFIX = '/guest'
0
0
0
e2f86cad37bb3bfbf46641c1ad6cb78d3514bb2b
957
py
Python
python/tour/asyncio/lib01.py
supeterlau/bedev
c134875eae37d265936199fda278416e2a3c1224
[ "MIT" ]
null
null
null
python/tour/asyncio/lib01.py
supeterlau/bedev
c134875eae37d265936199fda278416e2a3c1224
[ "MIT" ]
null
null
null
python/tour/asyncio/lib01.py
supeterlau/bedev
c134875eae37d265936199fda278416e2a3c1224
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2021 Peter Lau <superpeterlau@outlook.com> # # Distributed under terms of the MIT license. import time import asyncio # method 1 # asyncio.run(main()) # print(main()) # asyncio.run(main2()) asyncio.run(main3())
19.530612
56
0.634274
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2021 Peter Lau <superpeterlau@outlook.com> # # Distributed under terms of the MIT license. import time import asyncio async def main1(): print("Hello") await asyncio.sleep(1) print("DONE") # method 1 # asyncio.run(main()) # ...
569
0
92
2e123e19d0b2552573d4e4c4cd2e18ff38b0b711
1,212
py
Python
prpe9/collect_prpe_ne.py
zuters/prpene
d76d6203e366c91efc1d1ae7ecee4c73e80e38d2
[ "MIT" ]
1
2020-12-02T09:00:49.000Z
2020-12-02T09:00:49.000Z
prpe9/collect_prpe_ne.py
zuters/prpene
d76d6203e366c91efc1d1ae7ecee4c73e80e38d2
[ "MIT" ]
null
null
null
prpe9/collect_prpe_ne.py
zuters/prpene
d76d6203e366c91efc1d1ae7ecee4c73e80e38d2
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Jānis Zuters from __future__ import unicode_literals, division import sys import argparse from io import open argparse.open = open from prpe_ne import collect_ne_pairs if __name__ == '__main__': parser = create_parser() args = parser.parse_args() co...
28.186047
91
0.65429
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Jānis Zuters from __future__ import unicode_literals, division import sys import argparse from io import open argparse.open = open from prpe_ne import collect_ne_pairs def create_parser(): parser = argparse.ArgumentParser( formatter_class=argparse.Raw...
783
0
23
0d87be926ab4f43c42524a34778fe6bbfbd0404e
4,188
py
Python
versions/2.0/karma/python/geo.py
Lituta/dig-alignment
812ab0e4a181953d23024ef9df92eec1d40559cb
[ "Apache-2.0" ]
5
2015-04-26T19:39:44.000Z
2018-12-24T13:17:42.000Z
versions/2.0/karma/python/geo.py
Lituta/dig-alignment
812ab0e4a181953d23024ef9df92eec1d40559cb
[ "Apache-2.0" ]
7
2016-03-23T16:52:32.000Z
2018-07-24T03:08:05.000Z
versions/2.0/karma/python/geo.py
Lituta/dig-alignment
812ab0e4a181953d23024ef9df92eec1d40559cb
[ "Apache-2.0" ]
28
2015-04-08T22:39:07.000Z
2021-12-25T22:16:36.000Z
def gn_place_uri(geonamesid,fcode,country,admin1,admin2,admin3,admin4): "Return URI of place from a geonames id" if fcode=="PCLI": return "geonames/place/Country/"+country elif fcode=="ADM1": return "geonames/place/State1stDiv/"+country+"_"+admin1 elif fcode=="ADM2": return "geo...
37.392857
133
0.724928
def gn_place_uri(geonamesid,fcode,country,admin1,admin2,admin3,admin4): "Return URI of place from a geonames id" if fcode=="PCLI": return "geonames/place/Country/"+country elif fcode=="ADM1": return "geonames/place/State1stDiv/"+country+"_"+admin1 elif fcode=="ADM2": return "geo...
0
0
0
b9aee1236e3f5bb69bd587db78f5680abfa332d5
11,346
py
Python
volttrontesting/fixtures/volttron_platform_fixtures.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
null
null
null
volttrontesting/fixtures/volttron_platform_fixtures.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
null
null
null
volttrontesting/fixtures/volttron_platform_fixtures.py
rmay-intwine/volttron
a449f70e32f73ff0136a838d0feddb928ede6298
[ "Apache-2.0" ]
null
null
null
import os import pytest from random import randint import socket import uuid from volttrontesting.utils.platformwrapper import PlatformWrapper from volttrontesting.utils.utils import get_hostname_and_random_port, get_rand_vip, get_rand_ip_and_port from volttron.platform import is_rabbitmq_available PRINT_LOG_ON_SHUTD...
35.679245
108
0.632822
import os import pytest from random import randint import socket import uuid from volttrontesting.utils.platformwrapper import PlatformWrapper from volttrontesting.utils.utils import get_hostname_and_random_port, get_rand_vip, get_rand_ip_and_port from volttron.platform import is_rabbitmq_available PRINT_LOG_ON_SHUTD...
4,122
0
234
a705e3342019f5dbc9e7c2702cdad80b86ca87ab
592
py
Python
touches/migrations/0002_auto_20170713_0001.py
brains-on-art/touch-helsinki-web
87d12d1f0a4d0b0d2754bd7ccb7a19b4b0f68061
[ "MIT" ]
null
null
null
touches/migrations/0002_auto_20170713_0001.py
brains-on-art/touch-helsinki-web
87d12d1f0a4d0b0d2754bd7ccb7a19b4b0f68061
[ "MIT" ]
null
null
null
touches/migrations/0002_auto_20170713_0001.py
brains-on-art/touch-helsinki-web
87d12d1f0a4d0b0d2754bd7ccb7a19b4b0f68061
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-12 21:01 from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models
26.909091
164
0.66723
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-12 21:01 from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('touches', '0001_initial'), ] operations = [ ...
0
375
23
670fba351ef929c641d2ec1a4368fad39a96acf1
6,869
py
Python
tests/test_genome_tools.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
17
2020-09-21T20:04:43.000Z
2022-01-15T11:25:41.000Z
tests/test_genome_tools.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
5
2020-09-24T22:08:54.000Z
2021-07-24T02:45:53.000Z
tests/test_genome_tools.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
5
2021-02-16T13:16:34.000Z
2022-03-08T16:15:25.000Z
import unittest from lisa.core import genome_tools import numpy as np if __name__ == '__main__': unittest.main()
32.709524
146
0.596885
import unittest from lisa.core import genome_tools import numpy as np class TestRegionObject(unittest.TestCase): def test_invalid_region(self): with self.assertRaises(AssertionError): genome_tools.Region('chr1',10, 5) def test_overlap_different_chr(self): self.assertFalse( ...
6,104
60
586
fc2712a021a30d0196ad358b3f8763ba6dee7663
1,982
py
Python
examples/filter_examples/run_rotate_MNIST_example.py
ohtu-projekti-dataproblemsemulator/dataproblemsemulator
58170716b44c4e4dee639451977f352b3c68053c
[ "MIT" ]
2
2019-12-13T09:58:49.000Z
2020-02-10T10:37:17.000Z
examples/filter_examples/run_rotate_MNIST_example.py
ohtu-projekti-dataproblemsemulator/dataproblemsemulator
58170716b44c4e4dee639451977f352b3c68053c
[ "MIT" ]
199
2019-05-19T17:48:39.000Z
2022-03-11T23:56:15.000Z
examples/filter_examples/run_rotate_MNIST_example.py
thalvari/dpEmu-AutoML
b24eac686fae4147264c1ccc8169fd96b1875577
[ "MIT" ]
5
2019-10-02T23:14:05.000Z
2020-05-28T16:23:22.000Z
# MIT License # # Copyright (c) 2019 Tuomas Halvari, Juha Harviainen, Juha Mylläri, Antti Röyskö, Juuso Silvennoinen # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inc...
38.115385
100
0.729566
# MIT License # # Copyright (c) 2019 Tuomas Halvari, Juha Harviainen, Juha Mylläri, Antti Röyskö, Juuso Silvennoinen # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inc...
0
0
0
842f6805d9c28ae285c0a1c754ce08a421ea33e9
869
py
Python
meta.py
Muroger/SVHNClassifier_pytorch
608e2fc4d7eee0966949533195ad91abca6cf323
[ "MIT" ]
177
2017-04-02T18:13:13.000Z
2022-02-22T05:51:06.000Z
meta.py
Muroger/SVHNClassifier_pytorch
608e2fc4d7eee0966949533195ad91abca6cf323
[ "MIT" ]
9
2018-01-03T13:52:52.000Z
2022-02-28T09:03:01.000Z
meta.py
Muroger/SVHNClassifier_pytorch
608e2fc4d7eee0966949533195ad91abca6cf323
[ "MIT" ]
47
2017-04-05T09:02:14.000Z
2021-12-27T05:41:23.000Z
import json
32.185185
70
0.560414
import json class Meta(object): def __init__(self): self.num_train_examples = None self.num_val_examples = None self.num_test_examples = None def save(self, path_to_json_file): with open(path_to_json_file, 'w') as f: content = { 'num_examples': { ...
755
-2
103
fc5338c0a141643d797fc75f3db3886647efd1e0
2,091
py
Python
observation/tests/StoreObsTest.py
CUrW-SL/cfcwm-cms
3888e724800395c478f1b63dab9f77d0afa3b2c4
[ "Apache-2.0" ]
null
null
null
observation/tests/StoreObsTest.py
CUrW-SL/cfcwm-cms
3888e724800395c478f1b63dab9f77d0afa3b2c4
[ "Apache-2.0" ]
null
null
null
observation/tests/StoreObsTest.py
CUrW-SL/cfcwm-cms
3888e724800395c478f1b63dab9f77d0afa3b2c4
[ "Apache-2.0" ]
null
null
null
import datetime import json import logging import logging.config import os import sys import traceback from os.path import join as pjoin from subprocess import Popen, PIPE import unittest2 as unittest
35.440678
106
0.599235
import datetime import json import logging import logging.config import os import sys import traceback from os.path import join as pjoin from subprocess import Popen, PIPE import unittest2 as unittest class StoreObsTest(unittest.TestCase): @classmethod def setUpClass(cls): try: cls.root_d...
1,680
185
23
92e9b61ef393b8e0b1994c6564135ea55fd6308a
3,896
py
Python
emmet/workflows/tests/test_property_workflows.py
kmu/emmet
97d48616da5890ad3d44c9bfd6e65696449105b4
[ "BSD-3-Clause-LBNL" ]
2
2020-04-08T19:01:16.000Z
2020-04-26T04:09:53.000Z
emmet/workflows/tests/test_property_workflows.py
kmu/emmet
97d48616da5890ad3d44c9bfd6e65696449105b4
[ "BSD-3-Clause-LBNL" ]
null
null
null
emmet/workflows/tests/test_property_workflows.py
kmu/emmet
97d48616da5890ad3d44c9bfd6e65696449105b4
[ "BSD-3-Clause-LBNL" ]
1
2021-09-30T16:57:19.000Z
2021-09-30T16:57:19.000Z
import os import unittest from maggma.stores import MemoryStore from maggma.runner import Runner from maggma.builders import Builder from emmet.workflows.property_workflows import PropertyWorkflowBuilder,\ get_elastic_wf_builder from pymatgen.util.testing import PymatgenTest from atomate.vasp.workflows.presets.cor...
36.411215
113
0.665041
import os import unittest from maggma.stores import MemoryStore from maggma.runner import Runner from maggma.builders import Builder from emmet.workflows.property_workflows import PropertyWorkflowBuilder,\ get_elastic_wf_builder from pymatgen.util.testing import PymatgenTest from atomate.vasp.workflows.presets.cor...
2,950
264
23
0a95d4a1567f2240b60061ccfe32a3b346555780
57
py
Python
p97.py
brandonpelfrey/project-euler
2004720e1545e554bdefc0de3898f6dbddf731f8
[ "MIT" ]
null
null
null
p97.py
brandonpelfrey/project-euler
2004720e1545e554bdefc0de3898f6dbddf731f8
[ "MIT" ]
null
null
null
p97.py
brandonpelfrey/project-euler
2004720e1545e554bdefc0de3898f6dbddf731f8
[ "MIT" ]
null
null
null
n = 28433 * pow(2,7830457,10**10) + 1 print str(n)[-10:]
19
37
0.578947
n = 28433 * pow(2,7830457,10**10) + 1 print str(n)[-10:]
0
0
0
2e620c4667c5e606e3b7a171d1cd8ca4819552f8
4,848
py
Python
backend/app/core/routers/logic/tag_logic.py
Hawangledt/template-projeto-selecao-back
2c90236ebac48c7018b8a36562aec1eb3b200825
[ "MIT" ]
null
null
null
backend/app/core/routers/logic/tag_logic.py
Hawangledt/template-projeto-selecao-back
2c90236ebac48c7018b8a36562aec1eb3b200825
[ "MIT" ]
null
null
null
backend/app/core/routers/logic/tag_logic.py
Hawangledt/template-projeto-selecao-back
2c90236ebac48c7018b8a36562aec1eb3b200825
[ "MIT" ]
null
null
null
from fastapi import HTTPException from sqlalchemy.orm import Session from core.models.table import TagDB, TagInRepoDB, RepoDB from core.models.schema import TagCreate from core.models.schema import TagInRepoCreate def _create_tag(db: Session, tag_name: str, user_id: int): """ Creates a new tag in the database ...
28.186047
76
0.634901
from fastapi import HTTPException from sqlalchemy.orm import Session from core.models.table import TagDB, TagInRepoDB, RepoDB from core.models.schema import TagCreate from core.models.schema import TagInRepoCreate def _create_tag(db: Session, tag_name: str, user_id: int): """ Creates a new tag in the database ...
0
0
0
900b7b58989ee5ac8c73cc3d74714e26e9cfe22b
218
py
Python
overtime/algorithms/centrality/__init__.py
overtime3/overtime
ed3ae6877894f4d2c9f8473a885698e1622be3bd
[ "MIT" ]
9
2020-10-15T13:53:36.000Z
2022-03-08T12:08:09.000Z
overtime/algorithms/centrality/__init__.py
overtime3/overtime
ed3ae6877894f4d2c9f8473a885698e1622be3bd
[ "MIT" ]
6
2021-02-07T15:43:12.000Z
2021-04-24T04:03:39.000Z
overtime/algorithms/centrality/__init__.py
overtime3/overtime
ed3ae6877894f4d2c9f8473a885698e1622be3bd
[ "MIT" ]
7
2020-10-15T13:55:12.000Z
2022-03-12T03:54:02.000Z
from overtime.algorithms.centrality.betweenness import * from overtime.algorithms.centrality.closeness import * from overtime.algorithms.centrality.pagerank import * from overtime.algorithms.centrality.degree import *
43.6
56
0.853211
from overtime.algorithms.centrality.betweenness import * from overtime.algorithms.centrality.closeness import * from overtime.algorithms.centrality.pagerank import * from overtime.algorithms.centrality.degree import *
0
0
0
b1b4d73668dbdada7333dd77a3679b727c4d1bf8
840
py
Python
prefs.py
filippobuletto/DropLink
6a2dcaaf6fef071df23b32ee1ced09df526448a6
[ "MIT" ]
1
2017-08-08T10:49:28.000Z
2017-08-08T10:49:28.000Z
prefs.py
filippobuletto/DropLink
6a2dcaaf6fef071df23b32ee1ced09df526448a6
[ "MIT" ]
null
null
null
prefs.py
filippobuletto/DropLink
6a2dcaaf6fef071df23b32ee1ced09df526448a6
[ "MIT" ]
null
null
null
#!/usr/bin/python # This sample code is for use with Dropbox desktop client # versions 1.2 and below. It is likely to be deprecated in all # other future releases. Use it at your own risk. # Read more at http://www.dropbox.com/developers/desktop_apps import base64 import os.path import platform if platform.syste...
28
67
0.684524
#!/usr/bin/python # This sample code is for use with Dropbox desktop client # versions 1.2 and below. It is likely to be deprecated in all # other future releases. Use it at your own risk. # Read more at http://www.dropbox.com/developers/desktop_apps import base64 import os.path import platform if platform.syste...
279
0
25
be9445878d8d1a7d3745931c73412eb85d987bda
9,851
py
Python
seafileapi/files.py
vincentrou/python-seafile
e75afb1618203e120b43ba3ab1b40e3736aac320
[ "Apache-2.0" ]
null
null
null
seafileapi/files.py
vincentrou/python-seafile
e75afb1618203e120b43ba3ab1b40e3736aac320
[ "Apache-2.0" ]
null
null
null
seafileapi/files.py
vincentrou/python-seafile
e75afb1618203e120b43ba3ab1b40e3736aac320
[ "Apache-2.0" ]
null
null
null
import io import os import posixpath import re from urllib import urlencode from seafileapi.utils import querystr, utf8lize,raise_does_not_exist ZERO_OBJ_ID = '0000000000000000000000000000000000000000' class _SeafDirentBase(object): """Base class for :class:`SeafFile` and :class:`SeafDir`. It provides implem...
34.086505
101
0.607857
import io import os import posixpath import re from urllib import urlencode from seafileapi.utils import querystr, utf8lize,raise_does_not_exist ZERO_OBJ_ID = '0000000000000000000000000000000000000000' class _SeafDirentBase(object): """Base class for :class:`SeafFile` and :class:`SeafDir`. It provides implem...
2,465
4,170
234
7173ecd00afa5901a031f66d359c45f5c9dc2ffd
7,584
py
Python
Predictive models/Product/predictive_Models.py
Shelbyyyy/Python
4bb6d9025f1fa7d066cecd0849cc561a5432d7cd
[ "Apache-2.0" ]
null
null
null
Predictive models/Product/predictive_Models.py
Shelbyyyy/Python
4bb6d9025f1fa7d066cecd0849cc561a5432d7cd
[ "Apache-2.0" ]
null
null
null
Predictive models/Product/predictive_Models.py
Shelbyyyy/Python
4bb6d9025f1fa7d066cecd0849cc561a5432d7cd
[ "Apache-2.0" ]
null
null
null
import pandas as p#导入目前所需要的库并给与简称 data_train = '../homework/train.csv' #查看基本数据 data_train = p.read_csv(data_train)#导入训练模型 print(data_train.info())#查看数据类型 print(data_train.describe())#粗略查看基本数据 ###导入并且查看原始数据 import matplotlib.pyplot as pt import numpy as n pt.rcParams['font.sans-serif']=['Simhei'] #解决...
29.509728
126
0.692906
import pandas as p#导入目前所需要的库并给与简称 data_train = '../homework/train.csv' #查看基本数据 data_train = p.read_csv(data_train)#导入训练模型 print(data_train.info())#查看数据类型 print(data_train.describe())#粗略查看基本数据 ###导入并且查看原始数据 import matplotlib.pyplot as pt import numpy as n pt.rcParams['font.sans-serif']=['Simhei'] #解决...
2,842
0
144
2230f1c0b0526112ff87b859b1aa753e56ca180b
685
py
Python
chemreg/substance/urls.py
Chemical-Curation/chemcurator
bcd7fab84e407f06502e6873c38820724d4e54e7
[ "MIT" ]
1
2020-10-05T18:02:24.000Z
2020-10-05T18:02:24.000Z
chemreg/substance/urls.py
Chemical-Curation/chemcurator_django
bcd7fab84e407f06502e6873c38820724d4e54e7
[ "MIT" ]
207
2020-01-30T19:17:44.000Z
2021-02-24T19:45:29.000Z
chemreg/substance/urls.py
Chemical-Curation/chemcurator_django
bcd7fab84e407f06502e6873c38820724d4e54e7
[ "MIT" ]
null
null
null
from django.urls import include, path from chemreg.jsonapi.routers import SimpleRouter from chemreg.substance import views # Create a router and register our viewsets with it. router = SimpleRouter() router.register(views.QCLevelsTypeViewSet, "qcLevels") router.register(views.RelationshipTypeViewSet) router.register(...
31.136364
71
0.830657
from django.urls import include, path from chemreg.jsonapi.routers import SimpleRouter from chemreg.substance import views # Create a router and register our viewsets with it. router = SimpleRouter() router.register(views.QCLevelsTypeViewSet, "qcLevels") router.register(views.RelationshipTypeViewSet) router.register(...
0
0
0
874a1f7796f20abe02230f9fc1c8771629b0380a
829
py
Python
tests/cases/issues/test_issue_179.py
broglep-work/python-pytest-cases
4976c0073a2fad5fbe5de34a5d1199efda0b7da9
[ "BSD-3-Clause" ]
213
2018-07-05T21:21:21.000Z
2022-03-22T04:54:53.000Z
tests/cases/issues/test_issue_179.py
broglep-work/python-pytest-cases
4976c0073a2fad5fbe5de34a5d1199efda0b7da9
[ "BSD-3-Clause" ]
259
2018-06-22T16:46:33.000Z
2022-03-23T19:39:15.000Z
tests/cases/issues/test_issue_179.py
broglep-work/python-pytest-cases
4976c0073a2fad5fbe5de34a5d1199efda0b7da9
[ "BSD-3-Clause" ]
27
2019-03-26T12:46:49.000Z
2022-02-21T16:56:23.000Z
import pytest_cases as pytest @pytest.fixture @pytest.parametrize_with_cases("x,y", cases=CaseY, debug=True)
21.25641
64
0.677925
import pytest_cases as pytest @pytest.fixture def db_dep(): return None class CaseX: def case_one(self, db_dep): return 1 def case_two(self, db_dep): return 2 class CaseY: @pytest.parametrize_with_cases("x", cases=CaseX, debug=True) def case_x_one(self,db_dep,x): retur...
382
165
166
d33d27398db1a78287309315d309d2df91c6dc08
4,889
py
Python
plugins/sign-in/utils.py
fz6m/tomon-naixue
dfbdd69836f26d160cece34e204f9fb2ed731607
[ "MIT" ]
3
2020-08-23T17:43:09.000Z
2020-08-31T04:43:42.000Z
plugins/sign-in/utils.py
fz6m/tomon-naixue
dfbdd69836f26d160cece34e204f9fb2ed731607
[ "MIT" ]
null
null
null
plugins/sign-in/utils.py
fz6m/tomon-naixue
dfbdd69836f26d160cece34e204f9fb2ed731607
[ "MIT" ]
null
null
null
import os import random import datetime import aiofiles from enum import Enum from dateutil.parser import parse import aiohttp try: import ujson as json except: import json
26.284946
133
0.566578
import os import random import datetime import aiofiles from enum import Enum from dateutil.parser import parse import aiohttp try: import ujson as json except: import json class Model(Enum): ALL = '_all' BLURRY = '_blurry' SEND_AT = '_send_at' SEND_DEFAULT = '_send_default' class...
3,408
1,177
115
f68376b8ba9a2f5f86ba491fadf18c096dac11db
2,033
py
Python
tests/utils/kmp_tests.py
SteelPh0enix/pySerialMonitor
d8504da1ba08669ac466e1c78d75d15d803540fd
[ "MIT" ]
1
2022-02-17T07:18:37.000Z
2022-02-17T07:18:37.000Z
tests/utils/kmp_tests.py
SteelPh0enix/pySerialMonitor
d8504da1ba08669ac466e1c78d75d15d803540fd
[ "MIT" ]
null
null
null
tests/utils/kmp_tests.py
SteelPh0enix/pySerialMonitor
d8504da1ba08669ac466e1c78d75d15d803540fd
[ "MIT" ]
null
null
null
import unittest from app.utils import KMP
29.463768
88
0.579439
import unittest from app.utils import KMP class KMPTests(unittest.TestCase): def test_string_pattern_matching(self): kmp = KMP() pattern_1 = "abc" dataset_1 = "abbabbabbcbabcaabbababcababa" expected_1 = [11, 20] self.assertListEqual(kmp.search(dataset_1, pattern_1), expec...
1,901
13
76
f01ecbdf7e1871505f0a10215d7b342df4553e67
3,669
py
Python
carplay/generate_index.py
waha0506/keras_yolo_v2
3575201fd09bec7dee6abf956d737d08c17c6086
[ "MIT" ]
null
null
null
carplay/generate_index.py
waha0506/keras_yolo_v2
3575201fd09bec7dee6abf956d737d08c17c6086
[ "MIT" ]
4
2020-09-25T22:32:42.000Z
2022-02-09T23:34:48.000Z
carplay/generate_index.py
waha0506/keras_yolo_v2
3575201fd09bec7dee6abf956d737d08c17c6086
[ "MIT" ]
null
null
null
import cv2 import numpy as np from matplotlib import pyplot as plt import argparse from itertools import permutations from lxml import etree as ET ap=argparse.ArgumentParser() ap.add_argument('-i', '--image', type=str) args=vars(ap.parse_args()) image = cv2.imread(args['image']) source = image.copy() target = image.c...
30.322314
99
0.676751
import cv2 import numpy as np from matplotlib import pyplot as plt import argparse from itertools import permutations from lxml import etree as ET ap=argparse.ArgumentParser() ap.add_argument('-i', '--image', type=str) args=vars(ap.parse_args()) image = cv2.imread(args['image']) source = image.copy() target = image.c...
1,908
0
46
fad4b0e4d3b1b5fdd64fe0d2b39bf829079b205e
7,749
py
Python
data/external/repositories_2to3/163451/kaggle_diabetic_retinopathy-master/utils.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/163451/kaggle_diabetic_retinopathy-master/utils.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/163451/kaggle_diabetic_retinopathy-master/utils.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
import re import glob import os import sys import skimage import numpy as np import theano.tensor as T from sklearn.cross_validation import StratifiedShuffleSplit import string import lasagne as nn # TODO clean this mess up # TODO: very ugly stuff here, can probably be done a lot better ...
34.44
77
0.550136
import re import glob import os import sys import skimage import numpy as np import theano.tensor as T from sklearn.cross_validation import StratifiedShuffleSplit import string import lasagne as nn def padtosquare(im): w, l = im.shape if w < l: pad_size = (l - w) / 2.0 im...
7,175
0
246
1c7f325c5890cb1a60510f4fab30b2de39a8c405
1,109
py
Python
server.py
Guozhongyuan/insurtechapp
e7591944d9d2f0dfc447be5d2d71240f67b4661f
[ "MIT" ]
201
2018-10-25T06:17:48.000Z
2022-03-30T08:41:27.000Z
server.py
Guozhongyuan/insurtechapp
e7591944d9d2f0dfc447be5d2d71240f67b4661f
[ "MIT" ]
10
2019-04-07T22:44:49.000Z
2021-07-03T03:52:53.000Z
server.py
Guozhongyuan/insurtechapp
e7591944d9d2f0dfc447be5d2d71240f67b4661f
[ "MIT" ]
69
2018-10-25T20:28:25.000Z
2021-12-22T01:27:50.000Z
# Dash app initialization import dash # User management initialization import os from flask_login import LoginManager, UserMixin from users_mgt import db, User as base from config import config app = dash.Dash( __name__, meta_tags=[ { 'charset': 'utf-8', }, { 'n...
21.326923
78
0.707845
# Dash app initialization import dash # User management initialization import os from flask_login import LoginManager, UserMixin from users_mgt import db, User as base from config import config app = dash.Dash( __name__, meta_tags=[ { 'charset': 'utf-8', }, { 'n...
42
16
44
d241f7c6226d200d83a89227e0cf209a29c2c07b
634
py
Python
heuristic/functions/remove_empty_routes.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
7
2020-04-12T14:02:08.000Z
2021-10-09T07:52:08.000Z
heuristic/functions/remove_empty_routes.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
11
2020-02-16T22:15:28.000Z
2020-03-28T09:35:38.000Z
heuristic/functions/remove_empty_routes.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
2
2020-05-21T23:19:44.000Z
2020-09-04T05:22:45.000Z
from functools import wraps from typing import Callable from heuristic.classes import Solution def remove_empty_routes(operator: Callable[..., Solution]): """ Wrapper function that removes empty routes from the returned solution instance. These routes may come into existence because all customers have ...
28.818182
77
0.676656
from functools import wraps from typing import Callable from heuristic.classes import Solution def remove_empty_routes(operator: Callable[..., Solution]): """ Wrapper function that removes empty routes from the returned solution instance. These routes may come into existence because all customers have ...
194
0
26
dcb952173008ca18cc782038e7b5a875d693a727
1,893
py
Python
utilities/foto-files/manage-duplicates.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
1
2020-01-19T01:21:56.000Z
2020-01-19T01:21:56.000Z
utilities/foto-files/manage-duplicates.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
null
null
null
utilities/foto-files/manage-duplicates.py
davemungo/various
ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce
[ "MIT" ]
1
2021-07-02T14:40:01.000Z
2021-07-02T14:40:01.000Z
''' Compare File Contents and remove duplicate files get sha256 hash for each file found use dictionary to check for duplicates delete duplicates Dave Cuthbert (C) 2021-02-12 MIT License ''' import os from collections import defaultdict import hashlib import sys if "__main__" ...
25.581081
78
0.56841
''' Compare File Contents and remove duplicate files get sha256 hash for each file found use dictionary to check for duplicates delete duplicates Dave Cuthbert (C) 2021-02-12 MIT License ''' import os from collections import defaultdict import hashlib import sys def get_hash(file_name): BLOCK_SIZE =...
1,404
0
124
7a1e0e617105d2a68e3ed32c5ac41dc253446f33
1,855
py
Python
utils/prepare_models.py
kerryeon/rust-sbert
067c35008368a9e4c0cd130cffd65d26f4d5d47b
[ "Apache-2.0" ]
null
null
null
utils/prepare_models.py
kerryeon/rust-sbert
067c35008368a9e4c0cd130cffd65d26f4d5d47b
[ "Apache-2.0" ]
null
null
null
utils/prepare_models.py
kerryeon/rust-sbert
067c35008368a9e4c0cd130cffd65d26f4d5d47b
[ "Apache-2.0" ]
null
null
null
import sys import os import numpy as np import torch import subprocess from pathlib import Path import requests import zipfile import shutil if __name__ == "__main__": url = "https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/distiluse-base-multilingual-cased.zip" path = dow...
28.984375
130
0.661995
import sys import os import numpy as np import torch import subprocess from pathlib import Path import requests import zipfile import shutil def download_model(url, filename): print("Downloading model...") r = requests.get(url, allow_redirects=True) zip_filename = filename + ".zip" open(zip_filename...
1,306
0
46
38e031fb87b91426c92e51eed33e29d1f187058b
6,347
py
Python
gallery/test_models.py
guzalv/myks-gallery
7944edfcaf12233a5a82e42298e42428170c1e54
[ "BSD-3-Clause" ]
null
null
null
gallery/test_models.py
guzalv/myks-gallery
7944edfcaf12233a5a82e42298e42428170c1e54
[ "BSD-3-Clause" ]
null
null
null
gallery/test_models.py
guzalv/myks-gallery
7944edfcaf12233a5a82e42298e42428170c1e54
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals import datetime from django.contrib.auth.models import Group, User from django.test import TestCase from .models import Album, AlbumAccessPolicy, Photo, PhotoAccessPolicy
46.669118
96
0.728533
# coding: utf-8 from __future__ import unicode_literals import datetime from django.contrib.auth.models import Group, User from django.test import TestCase from .models import Album, AlbumAccessPolicy, Photo, PhotoAccessPolicy class AccessPolicyTests(TestCase): def setUp(self): today = datetime.date....
5,566
13
536
3fb2560ef5f528ddb57bd0876a99c324cf70c2a9
1,262
py
Python
PortScanner/bannerofport.py
saadhaxxan/Python-For-Ethical-Hacking
87ef18b2c2876bf1711442a5f00ddb7d2dacfd43
[ "MIT" ]
26
2020-09-16T18:26:00.000Z
2022-02-09T15:18:34.000Z
PortScanner/bannerofport.py
saadhaxxan/Python-For-Ethical-Hacking
87ef18b2c2876bf1711442a5f00ddb7d2dacfd43
[ "MIT" ]
null
null
null
PortScanner/bannerofport.py
saadhaxxan/Python-For-Ethical-Hacking
87ef18b2c2876bf1711442a5f00ddb7d2dacfd43
[ "MIT" ]
3
2020-11-27T20:30:22.000Z
2022-02-16T05:57:16.000Z
#!/usr/bin/python import socket from termcolor import colored print(colored("Select Option"),"blue") print(colored("1. Single Port\n2. Multi Port"),"blue") option = int(input()) if option == 1: print(colored("Enter Host IP Address:","green")) host = input() print(colored("Enter port number to scan:","gr...
26.851064
94
0.574485
#!/usr/bin/python import socket from termcolor import colored print(colored("Select Option"),"blue") print(colored("1. Single Port\n2. Multi Port"),"blue") option = int(input()) if option == 1: print(colored("Enter Host IP Address:","green")) host = input() print(colored("Enter port number to scan:","gr...
590
0
46
82d8e90703d98b7157175897677747df7c223cfb
87
py
Python
newsripper/ripper/apps.py
GriceTurrble/newsripper
c169d503433b88dda3e018c06b9e32f1407477d5
[ "MIT" ]
null
null
null
newsripper/ripper/apps.py
GriceTurrble/newsripper
c169d503433b88dda3e018c06b9e32f1407477d5
[ "MIT" ]
1
2020-05-12T17:20:09.000Z
2020-05-12T17:20:09.000Z
newsripper/ripper/apps.py
GriceTurrble/newsripper
c169d503433b88dda3e018c06b9e32f1407477d5
[ "MIT" ]
null
null
null
from django.apps import AppConfig
14.5
33
0.747126
from django.apps import AppConfig class RipperConfig(AppConfig): name = "ripper"
0
29
23
4a9bfd6938ec15c2ddff4a233a31274462f859da
1,401
py
Python
wonderbits/WBPressure.py
BigCircleLaw/wonderguy
d78a100784c414b9c3945c301d07c4e1b04aab8f
[ "MIT" ]
1
2019-07-15T10:38:48.000Z
2019-07-15T10:38:48.000Z
wonderbits/WBPressure.py
BigCircleLaw/wonderguy
d78a100784c414b9c3945c301d07c4e1b04aab8f
[ "MIT" ]
1
2019-09-11T02:33:14.000Z
2019-09-11T02:33:14.000Z
wonderbits/WBPressure.py
BigCircleLaw/wonderguy
d78a100784c414b9c3945c301d07c4e1b04aab8f
[ "MIT" ]
1
2019-07-26T03:13:18.000Z
2019-07-26T03:13:18.000Z
from .WBits import WBits from .event import Event
25.017857
80
0.552463
from .WBits import WBits from .event import Event def _format_str_type(x): if isinstance(x, str): x = str(x).replace('"', '\\"') x = "\"" + x + "\"" return x class Pressure(WBits): def __init__(self, index = 1): WBits.__init__(self) self.index = index def s...
435
1,073
49
e2cc10f2d72e46b6a67147d41bced89c93856a14
188
py
Python
Ofpp/__init__.py
Timothy-Edward-Kendon/ofpp
2c105ad74d5f0276bab38993162ec6f0b4b6b86f
[ "MIT" ]
26
2017-11-23T09:16:00.000Z
2020-03-09T13:18:35.000Z
openfoamparser/__init__.py
emanuel-raad/openfoamparser
f67031c90109932c38a299bad8f42fe34fdb8c4a
[ "MIT" ]
4
2017-11-24T10:20:11.000Z
2019-07-23T13:42:58.000Z
openfoamparser/__init__.py
emanuel-raad/openfoamparser
f67031c90109932c38a299bad8f42fe34fdb8c4a
[ "MIT" ]
12
2018-02-27T06:58:13.000Z
2019-10-23T18:47:19.000Z
from __future__ import print_function from .field_parser import parse_internal_field, parse_boundary_field, parse_field_all from .mesh_parser import FoamMesh from .utils import *
26.857143
86
0.824468
from __future__ import print_function from .field_parser import parse_internal_field, parse_boundary_field, parse_field_all from .mesh_parser import FoamMesh from .utils import *
0
0
0
0f8fa66873e3421bf1c4a1eb3dc896b2aa23c5a8
8,565
py
Python
src/evaluator.py
v1otusc/node_evaluator
37f634d77967082d6d84fe0176c1d02167b412af
[ "MIT" ]
null
null
null
src/evaluator.py
v1otusc/node_evaluator
37f634d77967082d6d84fe0176c1d02167b412af
[ "MIT" ]
null
null
null
src/evaluator.py
v1otusc/node_evaluator
37f634d77967082d6d84fe0176c1d02167b412af
[ "MIT" ]
2
2022-02-18T06:39:49.000Z
2022-02-18T07:42:23.000Z
import threading import time import psutil import rostopic import rospy from glog import logging from node_evaluator.msg import Bandwidth as BandwidthMsg @EvaluatorFactory.register('cpu') @EvaluatorFactory.register('mem') @EvaluatorFactory.register('net') @EvaluatorFactory.register('topic_bw') @EvaluatorF...
31.722222
79
0.585989
import threading import time import psutil import rostopic import rospy from glog import logging from node_evaluator.msg import Bandwidth as BandwidthMsg class EvaluatorFactory: registry = {} @classmethod def register(cls, name): def inner_wrapper(wrapped_class): if name in cls.regis...
6,869
442
864
8eb76f8a97466c7e9df2a79b721a1fbab165b740
815
py
Python
setup.py
beeware/rubicon
a2f2bd5178964b565b40033204a5b4a7ce99695e
[ "BSD-3-Clause" ]
4
2019-08-11T15:42:57.000Z
2021-08-06T19:31:19.000Z
setup.py
beeware/rubicon
a2f2bd5178964b565b40033204a5b4a7ce99695e
[ "BSD-3-Clause" ]
null
null
null
setup.py
beeware/rubicon
a2f2bd5178964b565b40033204a5b4a7ce99695e
[ "BSD-3-Clause" ]
4
2019-10-11T13:10:00.000Z
2021-06-24T02:24:53.000Z
#/usr/bin/env python import io from setuptools import setup with io.open('README.rst', encoding='utf8') as readme: long_description = readme.read() setup( name='rubicon', version='0.0.0', description='A collection of tools to bridge between Python and other language environments.', long_descripti...
29.107143
98
0.651534
#/usr/bin/env python import io from setuptools import setup with io.open('README.rst', encoding='utf8') as readme: long_description = readme.read() setup( name='rubicon', version='0.0.0', description='A collection of tools to bridge between Python and other language environments.', long_descripti...
0
0
0
446aa28009d7caad9abca1127944ceab51f5a88f
5,479
py
Python
pp-cdmx/public_account/migrations/0001_initial.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2020-08-31T21:08:54.000Z
2020-08-31T21:08:54.000Z
pp-cdmx/public_account/migrations/0001_initial.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2021-06-10T23:09:45.000Z
2021-06-10T23:09:45.000Z
pp-cdmx/public_account/migrations/0001_initial.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2021-07-16T19:32:04.000Z
2021-07-16T19:32:04.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-05-24 18:30 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
64.458824
191
0.616901
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-05-24 18:30 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('geographic', '0001_initial'), ...
0
5,266
23
f758de11235ecd17f99ee62e8dff7e421c650588
306
py
Python
contests/pythonist_3/capitalize.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
1
2017-07-02T01:35:39.000Z
2017-07-02T01:35:39.000Z
contests/pythonist_3/capitalize.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
null
null
null
contests/pythonist_3/capitalize.py
delaanthonio/hackerrank
b1f2e1e93b3260be90eb3b8cb8e86e9a700acf27
[ "MIT" ]
1
2018-04-03T15:11:56.000Z
2018-04-03T15:11:56.000Z
""" Capitalize! :author: Dela Anthonio :hackerrank: https://hackerrank.com/delaanthonio :problem: https://www.hackerrank.com/contests/pythonist3/challenges/capitalize """ print(solve('hi jake hj '))
23.538462
78
0.696078
""" Capitalize! :author: Dela Anthonio :hackerrank: https://hackerrank.com/delaanthonio :problem: https://www.hackerrank.com/contests/pythonist3/challenges/capitalize """ def solve(s: str): words = [word.capitalize() for word in s.split(' ')] return " ".join(words) print(solve('hi jake hj '))
81
0
23
c8cf2fde919819d05af708ce20ebdb58e566f6f9
621
py
Python
solstice/bootstrap/houdini/userSetup.py
Solstice-Short-Film/solstice-bootstrap
ace828e00d3f10ff3e8a70d23170f138e4633ff8
[ "MIT" ]
null
null
null
solstice/bootstrap/houdini/userSetup.py
Solstice-Short-Film/solstice-bootstrap
ace828e00d3f10ff3e8a70d23170f138e4633ff8
[ "MIT" ]
null
null
null
solstice/bootstrap/houdini/userSetup.py
Solstice-Short-Film/solstice-bootstrap
ace828e00d3f10ff3e8a70d23170f138e4633ff8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Initialization for Solstice Tools """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" print('=' * 100) print('| Solstice Pipeline | > L...
23
70
0.705314
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Initialization for Solstice Tools """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" print('=' * 100) print('| Solstice Pipeline | > L...
0
0
0
bc641904aea7c3d83a27568f59778d62c1832186
99
py
Python
inheritance/exercise/project_restaurant/beverage/cold_beverage.py
ivan-yosifov88/python_oop
82b210e427cb80dbab3b9a5c3fceab431ee60164
[ "MIT" ]
1
2021-05-21T20:28:55.000Z
2021-05-21T20:28:55.000Z
inheritance/exercise/project_restaurant/beverage/cold_beverage.py
ivan-yosifov88/python_oop
82b210e427cb80dbab3b9a5c3fceab431ee60164
[ "MIT" ]
null
null
null
inheritance/exercise/project_restaurant/beverage/cold_beverage.py
ivan-yosifov88/python_oop
82b210e427cb80dbab3b9a5c3fceab431ee60164
[ "MIT" ]
null
null
null
from project_restaurant.beverage.beverage import Beverage
16.5
57
0.818182
from project_restaurant.beverage.beverage import Beverage class ColdBeverage(Beverage): pass
0
17
23
f72f8089cc89101fe7a243dfe2b57fdf92cb7ad2
22,912
py
Python
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
1
2019-07-13T12:04:04.000Z
2019-07-13T12:04:04.000Z
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
null
null
null
LLDBagility/stubvm.py
killvxk/LLDBagility
6cc0df91bd49e43997b77048611d1b73f43f7b29
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import re import threading import lldbagilityutils from PyFDP.FDP import FDP from VMSN import VMSN logger = lldbagilityutils.create_indented_logger(__name__, "/tmp/stubvm.log") NULL = 0x0 # https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/eflags.h EF...
37.255285
148
0.659043
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import re import threading import lldbagilityutils from PyFDP.FDP import FDP from VMSN import VMSN logger = lldbagilityutils.create_indented_logger(__name__, "/tmp/stubvm.log") NULL = 0x0 # https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/eflags.h EF...
17,514
3,812
159
ce4178999bf32384813f16179d3b6b0f9cff55ee
267
py
Python
src/main/spotify/get_connection.py
bhankit1410/playlist-to-youtube
74918eb74698e0f543fe86e2f760478ee4e407cf
[ "MIT" ]
null
null
null
src/main/spotify/get_connection.py
bhankit1410/playlist-to-youtube
74918eb74698e0f543fe86e2f760478ee4e407cf
[ "MIT" ]
1
2021-09-18T18:24:41.000Z
2021-09-18T18:24:41.000Z
src/main/spotify/get_connection.py
bhankit1410/playlist-to-youtube
74918eb74698e0f543fe86e2f760478ee4e407cf
[ "MIT" ]
null
null
null
import spotipy from spotipy.oauth2 import SpotifyClientCredentials spotify = spotipy.Spotify(auth_manager=SpotifyClientCredentials()) url = "http://httpbin.org/post" payload = dict(key1='value1', key2='value2') res = requests.post(url, data=payload) print(res.text)
29.666667
66
0.786517
import spotipy from spotipy.oauth2 import SpotifyClientCredentials spotify = spotipy.Spotify(auth_manager=SpotifyClientCredentials()) url = "http://httpbin.org/post" payload = dict(key1='value1', key2='value2') res = requests.post(url, data=payload) print(res.text)
0
0
0
e512aa0599158cc149792421975a951cc3e855ba
4,485
py
Python
Detector/elk.py
KJ-black/Detecting-Alternate-Authentication-Based-APT-Attack-via-MITRE-Techniques-Correlation
e8ee9dcb28261a69d0534580c08a4620595978df
[ "MIT" ]
null
null
null
Detector/elk.py
KJ-black/Detecting-Alternate-Authentication-Based-APT-Attack-via-MITRE-Techniques-Correlation
e8ee9dcb28261a69d0534580c08a4620595978df
[ "MIT" ]
null
null
null
Detector/elk.py
KJ-black/Detecting-Alternate-Authentication-Based-APT-Attack-via-MITRE-Techniques-Correlation
e8ee9dcb28261a69d0534580c08a4620595978df
[ "MIT" ]
null
null
null
import json import requests from elasticsearch.connection import create_ssl_context from elasticsearch import Elasticsearch from getpass import getpass class ElasticSearch: """Wrapper of Elasticsearch module. This module is designed for using elastic search more friendly. """ def _set_condition_func...
32.737226
74
0.547826
import json import requests from elasticsearch.connection import create_ssl_context from elasticsearch import Elasticsearch from getpass import getpass class ElasticSearch: """Wrapper of Elasticsearch module. This module is designed for using elastic search more friendly. """ def __init__(self, host...
2,109
0
273
878095fc229590aae383c04cea6968024bcbfd7d
422
py
Python
manage.py
ukch/betternamecoming
05a7dde27099f7bea7d5fe6711279bb1fbecfc47
[ "MIT" ]
1
2021-06-02T15:12:21.000Z
2021-06-02T15:12:21.000Z
manage.py
ukch/betternamecoming
05a7dde27099f7bea7d5fe6711279bb1fbecfc47
[ "MIT" ]
48
2016-01-17T00:00:17.000Z
2022-01-13T00:45:01.000Z
manage.py
ryanmrubin/refugeedata
d71bedb0895e8011f3b67245c17df3422553820c
[ "MIT" ]
4
2015-09-14T09:25:43.000Z
2015-12-29T19:13:23.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "refugeedata.app.settings") try: from refugeedata.app import local_settings except ImportError: pass else: os.environ.update(local_settings.SETTINGS_DICT) ...
23.444444
79
0.729858
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "refugeedata.app.settings") try: from refugeedata.app import local_settings except ImportError: pass else: os.environ.update(local_settings.SETTINGS_DICT) ...
0
0
0
eb50898ebb54ac7bbd12256db154af27efab9bda
2,490
py
Python
aiodec.py
cjrh/aiodec
ca5b0759e2c1d48a36b29a2c6eabb3af3b5b2c68
[ "Apache-2.0" ]
1
2018-05-23T21:53:26.000Z
2018-05-23T21:53:26.000Z
aiodec.py
cjrh/aiodec
ca5b0759e2c1d48a36b29a2c6eabb3af3b5b2c68
[ "Apache-2.0" ]
3
2018-03-15T22:50:08.000Z
2018-10-19T10:55:56.000Z
aiodec.py
cjrh/aiodec
ca5b0759e2c1d48a36b29a2c6eabb3af3b5b2c68
[ "Apache-2.0" ]
1
2018-08-08T03:33:37.000Z
2018-08-08T03:33:37.000Z
""" aiodec ====== Decorators for coroutines """ import time import logging from functools import wraps from string import Template import inspect from inspect import Signature from typing import Callable, Optional, Mapping, Any __version__ = '2018.10.1' logger = logging.getLogger(__name__) Callback = Callable[[Sig...
27.362637
82
0.6249
""" aiodec ====== Decorators for coroutines """ import time import logging from functools import wraps from string import Template import inspect from inspect import Signature from typing import Callable, Optional, Mapping, Any __version__ = '2018.10.1' logger = logging.getLogger(__name__) Callback = Callable[[Sig...
2,088
0
46
bde72676fc6a653ae2aa94f9c37e0a4e416f13e4
12,438
py
Python
config/CConfig.py
ngoan1608/robotframework-testsuitesmanagement
b5288de09d6df08ec718a4d3b9ae1efb0c67f103
[ "Apache-2.0" ]
null
null
null
config/CConfig.py
ngoan1608/robotframework-testsuitesmanagement
b5288de09d6df08ec718a4d3b9ae1efb0c67f103
[ "Apache-2.0" ]
null
null
null
config/CConfig.py
ngoan1608/robotframework-testsuitesmanagement
b5288de09d6df08ec718a4d3b9ae1efb0c67f103
[ "Apache-2.0" ]
null
null
null
# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
46.58427
191
0.61698
# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
9,393
-5
204
087adbc91f50918dfe69281c5dc4021695d07c99
2,491
py
Python
specio/core/tests/test_request.py
Maxwell0001/specio
a660f690ea98058bce818415fe85736a9cdaa0f5
[ "BSD-3-Clause" ]
13
2019-03-11T12:32:00.000Z
2021-11-16T14:22:29.000Z
specio/core/tests/test_request.py
Maxwell0001/specio
a660f690ea98058bce818415fe85736a9cdaa0f5
[ "BSD-3-Clause" ]
37
2017-12-08T13:01:58.000Z
2021-11-09T08:49:06.000Z
specio/core/tests/test_request.py
Maxwell0001/specio
a660f690ea98058bce818415fe85736a9cdaa0f5
[ "BSD-3-Clause" ]
10
2017-12-08T13:03:37.000Z
2022-03-03T13:55:36.000Z
"""Test the Request class""" # Copyright (c) 2017 # Authors: Guillaume Lemaitre <guillaume.lemaitre@inria.fr> # License: BSD 3 clause import shutil import os from os.path import dirname, join, sep, expanduser import pytest from pytest import raises from specio import core from specio.core import Request DATA_PATH ...
27.988764
73
0.668005
"""Test the Request class""" # Copyright (c) 2017 # Authors: Guillaume Lemaitre <guillaume.lemaitre@inria.fr> # License: BSD 3 clause import shutil import os from os.path import dirname, join, sep, expanduser import pytest from pytest import raises from specio import core from specio.core import Request DATA_PATH ...
1,625
-8
221
53a23c8f4b7b8aea7a12aefbf04f21c2efcbc97b
1,391
py
Python
plugins/ctags_generator/test_ctags_generator.py
likev/gauravssnl.github.io
2bb17e0e5621c1f03d782b762694f999cc62d4d0
[ "MIT" ]
2
2021-01-12T14:55:55.000Z
2021-03-24T11:52:44.000Z
plugins/ctags_generator/test_ctags_generator.py
likev/gauravssnl.github.io
2bb17e0e5621c1f03d782b762694f999cc62d4d0
[ "MIT" ]
1
2021-12-13T20:50:25.000Z
2021-12-13T20:50:25.000Z
plugins/ctags_generator/test_ctags_generator.py
likev/gauravssnl.github.io
2bb17e0e5621c1f03d782b762694f999cc62d4d0
[ "MIT" ]
3
2021-03-24T11:58:31.000Z
2022-01-12T16:03:06.000Z
# -*- coding: utf-8 -*- import os, shutil from pelican.generators import ArticlesGenerator from pelican.tests.support import get_settings, unittest from pelican.writers import Writer from ctags_generator import generate_ctags CUR_DIR = os.path.dirname(__file__) TEST_CONTENT_DIR = os.path.join(CUR_DIR, 'test_content...
33.119048
104
0.660676
# -*- coding: utf-8 -*- import os, shutil from pelican.generators import ArticlesGenerator from pelican.tests.support import get_settings, unittest from pelican.writers import Writer from ctags_generator import generate_ctags CUR_DIR = os.path.dirname(__file__) TEST_CONTENT_DIR = os.path.join(CUR_DIR, 'test_content...
1,008
23
50
92c84247c3383168159a1c235a6ad78fa43a77c5
5,169
py
Python
fsic/plot.py
olliethomas/fsic-test
8372d46d56d1340432fb7bffe3662e9cb6f4f56e
[ "MIT" ]
13
2017-01-09T16:23:05.000Z
2022-03-18T14:29:10.000Z
fsic/plot.py
afcarl/fsic-test
8372d46d56d1340432fb7bffe3662e9cb6f4f56e
[ "MIT" ]
null
null
null
fsic/plot.py
afcarl/fsic-test
8372d46d56d1340432fb7bffe3662e9cb6f4f56e
[ "MIT" ]
6
2016-11-06T09:59:45.000Z
2022-03-13T19:21:08.000Z
"""Module containing convenient functions for plotting""" __author__ = 'wittawat' import fsic.ex.exglobal as exglo import fsic.glo as glo import matplotlib.pyplot as plt import numpy as np def plot_2d_data(pdata): """ pdata: an instance of PairedData Return a figure handle """ X, Y = pdata.xy() ...
35.163265
96
0.639969
"""Module containing convenient functions for plotting""" __author__ = 'wittawat' import fsic.ex.exglobal as exglo import fsic.glo as glo import matplotlib.pyplot as plt import numpy as np def plot_2d_data(pdata): """ pdata: an instance of PairedData Return a figure handle """ X, Y = pdata.xy() ...
1,813
0
50
c4fc0d93b3f5a09645da6bbf503d6d4d11acefb1
918
py
Python
tests/GroupStatisticsTest.py
amygreen/Pyhack
2f950b73943309c321811282491cb3adde2b81c3
[ "MIT" ]
1
2018-07-13T01:39:18.000Z
2018-07-13T01:39:18.000Z
tests/GroupStatisticsTest.py
amygreen/Pyhack
2f950b73943309c321811282491cb3adde2b81c3
[ "MIT" ]
null
null
null
tests/GroupStatisticsTest.py
amygreen/Pyhack
2f950b73943309c321811282491cb3adde2b81c3
[ "MIT" ]
2
2018-06-28T09:09:49.000Z
2018-06-28T09:14:42.000Z
from PythonHackathon.PythonHackathon_Mos.GroupStatistics import *
26.228571
65
0.734205
from PythonHackathon.PythonHackathon_Mos.GroupStatistics import * class TestGroupStatistics(): def test_invalid_run_inp1(self): self.GroupStatistics = GroupStatistics(data_folder='.') try: result = GroupStatistics.run(mean='@', std=True) except TypeError: print('Input mean value must be True or False') ...
750
7
95
1854c4cfedb02ac45bd303d9df4ffa04df7201e9
12,595
py
Python
src/test/rgw/rgw_multi/tests_es.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
4
2020-04-08T03:42:02.000Z
2020-10-01T20:34:48.000Z
src/test/rgw/rgw_multi/tests_es.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
93
2020-03-26T14:29:14.000Z
2020-11-12T05:54:55.000Z
src/test/rgw/rgw_multi/tests_es.py
rpratap-bot/ceph
9834961a66927ae856935591f2fd51082e2ee484
[ "MIT" ]
23
2020-03-24T10:28:44.000Z
2020-09-24T09:42:19.000Z
import json import logging import boto import boto.s3.connection import datetime import dateutil from nose.tools import eq_ as eq from six.moves import range from .multisite import * from .tests import * from .zone_es import * log = logging.getLogger(__name__)
45.634058
164
0.597142
import json import logging import boto import boto.s3.connection import datetime import dateutil from nose.tools import eq_ as eq from six.moves import range from .multisite import * from .tests import * from .zone_es import * log = logging.getLogger(__name__) def check_es_configured(): realm = get_realm() ...
12,121
0
207
b970a0e6615c83cf1e5b12238ee629561c077642
3,921
py
Python
blender-add-on/xrs/render.py
MikeFesta/3xr
e4b8a7a0db61c9247d590f293f67c9baacf77a7f
[ "Apache-2.0" ]
7
2021-11-16T14:26:47.000Z
2021-12-22T13:27:24.000Z
blender-add-on/xrs/render.py
MikeFesta/3xr
e4b8a7a0db61c9247d590f293f67c9baacf77a7f
[ "Apache-2.0" ]
null
null
null
blender-add-on/xrs/render.py
MikeFesta/3xr
e4b8a7a0db61c9247d590f293f67c9baacf77a7f
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- """ Render related functions """ import bpy import threading import xrs.collection import xrs.material def add_render_camera(): """ Adds one render camera that can have base settings in one place """ bpy.ops.object.camera_add() renderCam = bpy.data.ca...
34.394737
100
0.729406
# SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- """ Render related functions """ import bpy import threading import xrs.collection import xrs.material def add_render_camera(): """ Adds one render camera that can have base settings in one place """ bpy.ops.object.camera_add() renderCam = bpy.data.ca...
45
0
23
8bcdbd197b18cd7d102389feb825c01ea13c01e6
3,038
py
Python
queue/scheduler.py
alexanderrichard/queueing-tool
c8858565497b4367b2f3a8ea3f9ea5140e5d00fc
[ "MIT" ]
21
2016-04-28T11:00:21.000Z
2021-05-21T21:10:27.000Z
queue/scheduler.py
alexanderrichard/queueing-tool
c8858565497b4367b2f3a8ea3f9ea5140e5d00fc
[ "MIT" ]
3
2017-01-13T21:29:00.000Z
2019-07-25T22:29:04.000Z
queue/scheduler.py
alexanderrichard/queueing-tool
c8858565497b4367b2f3a8ea3f9ea5140e5d00fc
[ "MIT" ]
10
2016-11-05T08:18:38.000Z
2021-05-07T15:01:32.000Z
#!/usr/bin/python2.7 import datetime
44.676471
152
0.648453
#!/usr/bin/python2.7 import datetime class Resources(object): def __init__(self, gpus, threads, memory): self.gpus = gpus self.threads = threads self.memory = memory def __add__(self, other): return Resources(self.gpus + other.gpus, self.threads + other.threads, self.memo...
2,693
12
293
49e8e76dd53fa2af96bbbae5e869db3118668d98
8,689
py
Python
cogs/general.py
jgayfer/Spirit
024bc60727f92fb742daf0d28a3465a56820a7c0
[ "MIT" ]
34
2017-08-28T18:57:55.000Z
2021-06-12T18:04:20.000Z
cogs/general.py
jgayfer/Spirit
024bc60727f92fb742daf0d28a3465a56820a7c0
[ "MIT" ]
75
2017-07-27T22:26:58.000Z
2019-06-30T06:20:43.000Z
cogs/general.py
jgayfer/Spirit
024bc60727f92fb742daf0d28a3465a56820a7c0
[ "MIT" ]
24
2017-08-28T00:27:02.000Z
2022-03-02T22:31:00.000Z
from datetime import datetime import discord from discord.ext import commands import psutil import pytz from cogs.utils.message_manager import MessageManager from cogs.utils import constants
43.445
143
0.615491
from datetime import datetime import discord from discord.ext import commands import psutil import pytz from cogs.utils.message_manager import MessageManager from cogs.utils import constants class General: def __init__(self, bot): self.bot = bot self.process = psutil.Process() @commands.c...
935
7,537
23
2b624a3a8bc3c9a72ad660ec8393a4ba93e2669f
2,020
py
Python
code/networks/cifar/lenet.py
shashankkotyan/RepresentationMetrics
782c0ba727c523b7a159c497d2b91ef75aa9f201
[ "MIT" ]
3
2019-06-18T04:37:52.000Z
2020-12-17T08:05:34.000Z
code/networks/cifar/lenet.py
shashankkotyan/DualQualityAssessment
1b4fba13f14b0b6770b060081c3d0d1c3ea4a1c6
[ "MIT" ]
5
2020-05-13T16:47:36.000Z
2022-02-10T01:38:57.000Z
code/networks/cifar/lenet.py
shashankkotyan/RepresentationMetrics
782c0ba727c523b7a159c497d2b91ef75aa9f201
[ "MIT" ]
null
null
null
#!/usr/bin/env python from networks.cifar.cifar_model import CifarModel class LeNet(CifarModel): """ TODO: Write Comment """ def __init__(self, args): """ TODO: Write Comment """ self.name = 'LeNet' CifarModel.__init__(self, args) def network(se...
31.076923
180
0.606436
#!/usr/bin/env python from networks.cifar.cifar_model import CifarModel class LeNet(CifarModel): """ TODO: Write Comment """ def __init__(self, args): """ TODO: Write Comment """ self.name = 'LeNet' CifarModel.__init__(self, args) def network(se...
0
0
0
ad5fc7cc875336bb8f74bd9b88a9dbe5cc61dabc
938
py
Python
scripts/send_msg.py
VladislavYU/OPIoT
ebe242eb214b05d9e34a2afd063cbe6e3a13f1bd
[ "Apache-2.0" ]
null
null
null
scripts/send_msg.py
VladislavYU/OPIoT
ebe242eb214b05d9e34a2afd063cbe6e3a13f1bd
[ "Apache-2.0" ]
null
null
null
scripts/send_msg.py
VladislavYU/OPIoT
ebe242eb214b05d9e34a2afd063cbe6e3a13f1bd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from optparse import OptionParser import locale from gsmmodem.modem import GsmModem import logging parser = OptionParser() parser.add_option("-a", "--address", action="store", dest="ip", type="string", help="Cureent ip address") PORT = '/dev/modem0' BAUDRATE = 115200 PIN = "...
28.424242
146
0.680171
#!/usr/bin/python # -*- coding: utf-8 -*- from optparse import OptionParser import locale from gsmmodem.modem import GsmModem import logging parser = OptionParser() parser.add_option("-a", "--address", action="store", dest="ip", type="string", help="Cureent ip address") PORT = '/dev/modem0' BAUDRATE = 115200 PIN = "...
0
0
0
dc7612dddef8c21ce0f90436648cb22d667ceb8b
869
py
Python
molecule/default/tests/test_default.py
while-true-do/ansible-role-srv_tftp
14f242b3e600cfe9e3f5e68eed217da91440d05a
[ "BSD-3-Clause" ]
2
2019-08-07T17:11:11.000Z
2021-04-16T12:12:13.000Z
molecule/default/tests/test_default.py
while-true-do/ansible-role-srv_tftp
14f242b3e600cfe9e3f5e68eed217da91440d05a
[ "BSD-3-Clause" ]
8
2019-09-02T07:55:00.000Z
2019-09-18T14:47:58.000Z
molecule/default/tests/test_default.py
while-true-do/ansible-role-srv_tftp
14f242b3e600cfe9e3f5e68eed217da91440d05a
[ "BSD-3-Clause" ]
null
null
null
# Some examples are given below. import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
18.891304
63
0.731876
# Some examples are given below. import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_tftp_package(host): pkg = host.package('tftp-server') assert pkg.is_installed def test_tft...
517
0
138
990b056b1cfe2f15252ddc2e1505d55d79fdb056
3,808
py
Python
lib/pgdb.py
5H4D0W-C0D3R/epic_store_bot
6af28cee968d7911fb07b1c4bfe886cba7e83a82
[ "MIT" ]
13
2020-12-20T17:28:55.000Z
2022-03-27T18:40:01.000Z
lib/pgdb.py
5H4D0W-C0D3R/epic_store_bot
6af28cee968d7911fb07b1c4bfe886cba7e83a82
[ "MIT" ]
2
2021-02-08T21:07:51.000Z
2022-02-21T06:28:40.000Z
lib/pgdb.py
5H4D0W-C0D3R/epic_store_bot
6af28cee968d7911fb07b1c4bfe886cba7e83a82
[ "MIT" ]
8
2021-06-07T00:29:26.000Z
2022-03-31T13:51:46.000Z
import psycopg2 from .config import Config config = Config()
31.733333
127
0.448267
import psycopg2 from .config import Config config = Config() class Dtabase: def __init__(self): try: self.con = psycopg2.connect( host=config['db']['host'], database=config['db']['database'], user=config['db']['user'], password=co...
3,550
-7
201
2e85ecead62cc62f882a9e24cb13656903cdbd2a
659
py
Python
scm/style.py
rookiebulls/scm
f9baa225e049ff178d281ccb1709648bcc739228
[ "MIT" ]
3
2017-06-02T15:42:19.000Z
2017-08-17T15:02:56.000Z
scm/style.py
rookiebulls/scm
f9baa225e049ff178d281ccb1709648bcc739228
[ "MIT" ]
null
null
null
scm/style.py
rookiebulls/scm
f9baa225e049ff178d281ccb1709648bcc739228
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from pygments.style import Style from pygments.token import Token from pygments.styles.default import DefaultStyle
26.36
72
0.646434
# -*- coding: utf-8 -*- from pygments.style import Style from pygments.token import Token from pygments.styles.default import DefaultStyle class DocumentStyle(Style): styles = { Token.Menu.Completions.Completion.Current: 'bg:#00aaaa #000000', Token.Menu.Completions.Completion: 'bg:#008888 #ffffff...
85
386
46
f86cda3548eba5900a9f51680381b27a4158cba6
498
py
Python
qepy/tests/test_pw.py
QU-XIAO/yambopy
ff65a4f90c1bfefe642ebc61e490efe781709ff9
[ "BSD-3-Clause" ]
21
2016-04-07T20:53:29.000Z
2021-05-14T08:06:02.000Z
qepy/tests/test_pw.py
alexmoratalla/yambopy
8ec0e1e18868ccaadb3eab36c55e6a47021e257d
[ "BSD-3-Clause" ]
22
2016-06-14T22:29:47.000Z
2021-09-16T15:36:26.000Z
qepy/tests/test_pw.py
alexmoratalla/yambopy
8ec0e1e18868ccaadb3eab36c55e6a47021e257d
[ "BSD-3-Clause" ]
15
2016-06-14T18:40:57.000Z
2021-08-07T13:17:43.000Z
# Copyright (C) 2018 Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of yambopy # import unittest import os from qepy.pw import PwIn from yambopy.data.structures import Si if __name__ == '__main__': unittest.main()
20.75
55
0.654618
# Copyright (C) 2018 Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of yambopy # import unittest import os from qepy.pw import PwIn from yambopy.data.structures import Si class TestPwIn(unittest.TestCase): def test_pwin(self): pwi = PwIn.from_structure_dict(Si) pwi....
185
13
50
6a5ac2b74841eacadd02a3f5c77be89965e5f5bc
3,768
py
Python
instrumentor/exposition.py
u9n/instrumenter
2571288248b07eabe0711ae8f1b44565110d47bd
[ "BSD-3-Clause" ]
1
2019-07-12T14:22:30.000Z
2019-07-12T14:22:30.000Z
instrumentor/exposition.py
u9n/instrumenter
2571288248b07eabe0711ae8f1b44565110d47bd
[ "BSD-3-Clause" ]
null
null
null
instrumentor/exposition.py
u9n/instrumenter
2571288248b07eabe0711ae8f1b44565110d47bd
[ "BSD-3-Clause" ]
null
null
null
from itertools import groupby import attr import typing @attr.s @attr.s @attr.s class ExpositionClient: """ Very simple implementation of client that will get all available metrics from a namespace and expose a string formatted accoring to Prometheus expositions format. """ def _get_data(se...
27.304348
87
0.52707
from itertools import groupby import attr import typing @attr.s class RedisKeyValuePair: key = attr.ib() value = attr.ib() @attr.s class MetricValue: type = attr.ib() labels = attr.ib() value = attr.ib() @attr.s class MetricSet: name: str = attr.ib() description: str = attr.ib(default...
1,378
360
93
d7feab2e2f3e0891add361cee28583deeb6349eb
3,229
py
Python
v1/tnb_faucet/core/fb_post.py
picko1990/Bank
d35b0a76c1dd6ceb37155b6af32e3043c63d33f5
[ "MIT" ]
1
2021-07-24T06:54:11.000Z
2021-07-24T06:54:11.000Z
v1/tnb_faucet/core/fb_post.py
picko1990/Bank
d35b0a76c1dd6ceb37155b6af32e3043c63d33f5
[ "MIT" ]
4
2021-10-01T20:23:14.000Z
2021-10-01T20:57:42.000Z
v1/tnb_faucet/core/fb_post.py
picko1990/Bank
d35b0a76c1dd6ceb37155b6af32e3043c63d33f5
[ "MIT" ]
3
2021-02-23T01:09:05.000Z
2021-09-12T15:52:56.000Z
# # Author: Nikhil Taneja (taneja.nikhil03@gmail.com) # fb_post.py (c) 2021 # Desc: description # Created: Fri Jan 08 2021 04:19:09 GMT+0530 (India Standard Time) # Modified: Fri Jan 08 2021 18:19:22 GMT+0530 (India Standard Time) # import logging import re from urllib.parse import parse_qs, unquote, urlparse import...
28.324561
68
0.589347
# # Author: Nikhil Taneja (taneja.nikhil03@gmail.com) # fb_post.py (c) 2021 # Desc: description # Created: Fri Jan 08 2021 04:19:09 GMT+0530 (India Standard Time) # Modified: Fri Jan 08 2021 18:19:22 GMT+0530 (India Standard Time) # import logging import re from urllib.parse import parse_qs, unquote, urlparse import...
2,719
0
23
2c9ffada9418e48bf12fc704d93927d8756f9602
25,034
py
Python
analyzer/data/dataset.py
frommwonderland/EManalysis
2787f063e2e83521fd6439d06a07f5521e43dc94
[ "MIT" ]
null
null
null
analyzer/data/dataset.py
frommwonderland/EManalysis
2787f063e2e83521fd6439d06a07f5521e43dc94
[ "MIT" ]
null
null
null
analyzer/data/dataset.py
frommwonderland/EManalysis
2787f063e2e83521fd6439d06a07f5521e43dc94
[ "MIT" ]
null
null
null
import glob import json import math import multiprocessing import os import re import time import h5py import imageio import numpy as np import pandas as pd from numpyencoder import NumpyEncoder from skimage.measure import label, regionprops from skimage.transform import resize from sklearn.cluster import KMeans from ...
44.544484
168
0.548694
import glob import json import math import multiprocessing import os import re import time import h5py import imageio import numpy as np import pandas as pd from numpyencoder import NumpyEncoder from skimage.measure import label, regionprops from skimage.transform import resize from sklearn.cluster import KMeans from ...
6,874
0
81
8d81df8b8a0d792596b854b43fce0630aa70773e
17,812
py
Python
Knowledge Graphs/code/train.py
shravyagupta/BoltBio
28d10e0a22af69f389cc2320d1d5c558165ff185
[ "Apache-2.0" ]
null
null
null
Knowledge Graphs/code/train.py
shravyagupta/BoltBio
28d10e0a22af69f389cc2320d1d5c558165ff185
[ "Apache-2.0" ]
9
2021-11-16T05:22:45.000Z
2022-02-01T10:34:07.000Z
Knowledge Graphs/code/train.py
shravyagupta/BoltBio
28d10e0a22af69f389cc2320d1d5c558165ff185
[ "Apache-2.0" ]
3
2021-11-19T11:38:22.000Z
2022-01-10T09:29:16.000Z
import argparse import yaml import datetime import os import torch import torch.nn.functional as F import wandb import random import numpy as np import utils import graph import dgl import models from dgl import DGLError from utils import pbar import torchmetrics import pickle as pkl if __name__ == "__mai...
33.671078
189
0.515439
import argparse import yaml import datetime import os import torch import torch.nn.functional as F import wandb import random import numpy as np import utils import graph import dgl import models from dgl import DGLError from utils import pbar import torchmetrics import pickle as pkl class EmbCriterion(): def __i...
15,531
161
258
17e56847093136b88693a5589e3a97a1dccbe751
1,169
py
Python
tests/test_text/test_base.py
mrtrkmn/yellowbrick
efd942063455f1c148c3c691d8100d726b09ac90
[ "Apache-2.0" ]
3,662
2016-05-19T19:16:28.000Z
2022-03-30T00:25:19.000Z
tests/test_text/test_base.py
mrtrkmn/yellowbrick
efd942063455f1c148c3c691d8100d726b09ac90
[ "Apache-2.0" ]
1,047
2016-05-18T15:20:59.000Z
2022-03-30T16:12:49.000Z
tests/test_text/test_base.py
mrtrkmn/yellowbrick
efd942063455f1c148c3c691d8100d726b09ac90
[ "Apache-2.0" ]
602
2016-05-18T15:02:35.000Z
2022-03-27T16:57:11.000Z
# tests.test_text.test_base # Tests for the text visualization base classes # # Author: Benjamin Bengfort # Created: Mon Feb 20 06:34:50 2017 -0500 # # Copyright (C) 2016 The scikit-yb developers # For license information, see LICENSE.txt # # ID: test_base.py [6aa9198] benjamin@bengfort.com $ """ Tests for the text...
29.974359
74
0.540633
# tests.test_text.test_base # Tests for the text visualization base classes # # Author: Benjamin Bengfort # Created: Mon Feb 20 06:34:50 2017 -0500 # # Copyright (C) 2016 The scikit-yb developers # For license information, see LICENSE.txt # # ID: test_base.py [6aa9198] benjamin@bengfort.com $ """ Tests for the text...
0
325
23
15613916ffc71646e56348b60ef0100a02307c60
538
py
Python
Max_product_subarray in Python/max_subarray.py
Hacktoberfest-2021/problem_on-_programming
1e041a8238d91e1fc27e20a8174fcaaf8ed40ded
[ "Apache-2.0" ]
null
null
null
Max_product_subarray in Python/max_subarray.py
Hacktoberfest-2021/problem_on-_programming
1e041a8238d91e1fc27e20a8174fcaaf8ed40ded
[ "Apache-2.0" ]
1
2021-10-04T08:31:37.000Z
2021-10-07T00:16:30.000Z
Max_product_subarray in Python/max_subarray.py
Hacktoberfest-2021/problem_on-_programming
1e041a8238d91e1fc27e20a8174fcaaf8ed40ded
[ "Apache-2.0" ]
3
2021-10-04T08:54:03.000Z
2021-10-07T04:32:23.000Z
# -*- coding: utf-8 -*- """ Created on Thu Oct 7 09:42:38 2021 @author: VISHAKHA V """ arr=list(map(int,input().split())) result=max_subarray_product(arr) print("The maximum sub_array product =",result) #Take the input as [6,-3,-10,0,2] if you want, then the output will be 180
18.551724
75
0.552045
# -*- coding: utf-8 -*- """ Created on Thu Oct 7 09:42:38 2021 @author: VISHAKHA V """ def max_subarray_product(arr): n=len(arr) res=arr[0] for i in range(n): m=arr[i] for j in range(i+1,n): res=max(m,res) m = m * arr[j] res=max(res,m) ...
230
0
23
202b8971ca0d5dd05229ac896ef2fad5cff12756
702
py
Python
QBG/DataLoader/tools/scripts/compress_intra_data.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
3
2021-11-21T04:35:04.000Z
2022-03-04T09:19:53.000Z
QBG/DataLoader/tools/scripts/compress_intra_data.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
null
null
null
QBG/DataLoader/tools/scripts/compress_intra_data.py
GYMS-PKU/Daily-Frequency-Quant
808eda9930efecff04ecf98abf617404cadd0003
[ "MIT" ]
5
2021-10-03T00:00:22.000Z
2022-03-07T09:02:00.000Z
# Copyright (c) 2022 Dai HBG """ 该脚本用于将1分钟数据中不在市的部分删除 """ import os import pandas as pd if __name__ == '__main__': main()
24.206897
103
0.618234
# Copyright (c) 2022 Dai HBG """ 该脚本用于将1分钟数据中不在市的部分删除 """ import os import pandas as pd def main(): data_path = 'D:/Documents/AutoFactoryData' intra_path = 'E:/Backups/AutoFactoryData/StockIntraDayData/1m' dates = os.listdir(intra_path) for date in dates: all_securities = pd.read_csv('{}/S...
546
0
23
a3c5eb7f64ffed2be27901164c889f549988b7a6
6,123
py
Python
vision/nn/FairNAS_B.py
lippman1125/pytorch-ssd
d2c31b0d69e82ab2c46f2eecbbf9c12f3dd73309
[ "MIT" ]
15
2019-05-28T06:47:50.000Z
2021-02-21T18:16:46.000Z
vision/nn/FairNAS_B.py
lippman1125/pytorch-ssd
d2c31b0d69e82ab2c46f2eecbbf9c12f3dd73309
[ "MIT" ]
null
null
null
vision/nn/FairNAS_B.py
lippman1125/pytorch-ssd
d2c31b0d69e82ab2c46f2eecbbf9c12f3dd73309
[ "MIT" ]
6
2019-05-28T07:39:31.000Z
2021-02-21T18:16:52.000Z
import math import torch.nn as nn import torch.nn.functional as F # class InvertedResidual(nn.Module): # def __init__(self, inp, oup, kernel_size, stride, expand_ratio): # super(InvertedResidual, self).__init__() # assert stride in [1, 2] # self.stride = stride # padding = ker...
34.016667
117
0.526049
import math import torch.nn as nn import torch.nn.functional as F def stem(inp, oup, stride): return nn.Sequential( nn.Conv2d(inp, oup, 3, stride, 1, bias=False), nn.BatchNorm2d(oup), nn.ReLU6(inplace=True) ) def separable_conv(inp, oup): return nn.Sequential( nn.Conv2d(...
4,614
18
248
0fb1c11e373b2420a9445fa755cd0d170d59f89e
3,707
py
Python
samples/core/get_started/premade_estimator.py
mumingwu/models
c439119e990784e5fd60b2adb869ee06663d7806
[ "Apache-2.0" ]
5
2018-05-30T03:14:00.000Z
2022-03-09T09:42:41.000Z
samples/core/get_started/premade_estimator.py
devzhui/models
4364390adbf16b57c093a05217897831f48da7d3
[ "Apache-2.0" ]
null
null
null
samples/core/get_started/premade_estimator.py
devzhui/models
4364390adbf16b57c093a05217897831f48da7d3
[ "Apache-2.0" ]
8
2020-04-14T13:46:54.000Z
2022-02-21T05:18:11.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
34.971698
79
0.691664
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
1,656
0
69
1cdd4d3893e2e7a540e5721f281a59389fbbcdab
5,033
py
Python
itest/testing/testbase.py
Koos85/siridb-server
e245cec21f29fd649fb5c363d197012cdd5992f6
[ "MIT" ]
null
null
null
itest/testing/testbase.py
Koos85/siridb-server
e245cec21f29fd649fb5c363d197012cdd5992f6
[ "MIT" ]
null
null
null
itest/testing/testbase.py
Koos85/siridb-server
e245cec21f29fd649fb5c363d197012cdd5992f6
[ "MIT" ]
null
null
null
import unittest import time import asyncio import random import math import collections from .siridb import SiriDB from .server import Server from .client import Client
37.007353
79
0.468707
import unittest import time import asyncio import random import math import collections from .siridb import SiriDB from .server import Server from .client import Client def default_test_setup(nservers=1, **kwargs): def wrapper(func): async def wrapped(self): self.db = SiriDB(**kwargs) ...
4,667
149
46
f84a2e516b70afc34fcba7bb626975d57d29a5d2
30,312
py
Python
degraph/entity.py
aljabr0/degraph
ac44a1c979da7605ed424853e7fef8ffa8790b27
[ "Apache-2.0" ]
31
2020-02-01T23:25:23.000Z
2021-11-16T07:24:03.000Z
degraph/entity.py
aljabr0/degraph
ac44a1c979da7605ed424853e7fef8ffa8790b27
[ "Apache-2.0" ]
null
null
null
degraph/entity.py
aljabr0/degraph
ac44a1c979da7605ed424853e7fef8ffa8790b27
[ "Apache-2.0" ]
4
2020-02-01T23:25:28.000Z
2020-02-27T04:41:18.000Z
from .types import StaticShape, RBF, Adjacency from .math import tf_hgrid_coords, hgrid_normalize, bezier_multi, tri_ones_lower, tf_repeat_1d from .math import piecewise_linear_curve_closest_pts from .math import random_uniform_hypersphere, mutual_sq_distances, gauss_rbf, rbf_factory, crbf_wendland_d3c2 from .config im...
39.366234
120
0.654097
from .types import StaticShape, RBF, Adjacency from .math import tf_hgrid_coords, hgrid_normalize, bezier_multi, tri_ones_lower, tf_repeat_1d from .math import piecewise_linear_curve_closest_pts from .math import random_uniform_hypersphere, mutual_sq_distances, gauss_rbf, rbf_factory, crbf_wendland_d3c2 from .config im...
12,304
714
1,022
8287ee5acde6360cef61dda364580736932901e4
3,397
py
Python
tests/test_driver.py
highlight-slm/Draytek-Web-Auto-Configuration
0b3e96b892fb332a1252fc231b30561b2374071f
[ "MIT" ]
null
null
null
tests/test_driver.py
highlight-slm/Draytek-Web-Auto-Configuration
0b3e96b892fb332a1252fc231b30561b2374071f
[ "MIT" ]
2
2020-02-13T07:41:55.000Z
2020-03-02T21:56:12.000Z
tests/test_driver.py
highlight-slm/Draytek-Web-Auto-Configuration
0b3e96b892fb332a1252fc231b30561b2374071f
[ "MIT" ]
2
2019-07-05T15:09:07.000Z
2021-09-06T23:50:33.000Z
# import unittest # from unittest.mock import patch # from selenium.common.exceptions import WebDriverException # from draytekwebadmin.driver import load_driver, unload_driver # class TestDriver(unittest.TestCase): # def setUp(self): # pass # def tearDown(self): # pass # @patch("seleniu...
43
88
0.707683
# import unittest # from unittest.mock import patch # from selenium.common.exceptions import WebDriverException # from draytekwebadmin.driver import load_driver, unload_driver # class TestDriver(unittest.TestCase): # def setUp(self): # pass # def tearDown(self): # pass # @patch("seleniu...
0
0
0
fa662ee8b73ba35f56d3832035f14a2107cb7243
632
py
Python
tests/unit/test_cli.py
gtmanfred/teststack
c7f671b45b81a036abcb21df6f1ef26c8a138e93
[ "Apache-2.0" ]
1
2021-11-09T18:44:40.000Z
2021-11-09T18:44:40.000Z
tests/unit/test_cli.py
gtmanfred/teststack
c7f671b45b81a036abcb21df6f1ef26c8a138e93
[ "Apache-2.0" ]
2
2021-11-11T17:43:42.000Z
2022-03-08T19:26:31.000Z
tests/unit/test_cli.py
gtmanfred/teststack
c7f671b45b81a036abcb21df6f1ef26c8a138e93
[ "Apache-2.0" ]
null
null
null
import sys import toml import pytest from teststack import cli from teststack import import_commands from teststack.errors import IncompatibleVersionError
26.333333
70
0.707278
import sys import toml import pytest from teststack import cli from teststack import import_commands from teststack.errors import IncompatibleVersionError def test_import_commands(): import_commands() assert "teststack.commands.containers" in sys.modules assert "teststack.commands.environment" in sys.m...
426
0
46
48eaecb36e577e897f08a2f2794bd1322961e4b1
3,689
py
Python
Models/Segmentation_Models/Unet2d_Vertebrae/utils/save_fig.py
BIMCV-CSUSP/BIMCV-MIDAS-PROJECT
ef7311873fc29416c7caa8babdf341c058404ec4
[ "CC-BY-4.0" ]
null
null
null
Models/Segmentation_Models/Unet2d_Vertebrae/utils/save_fig.py
BIMCV-CSUSP/BIMCV-MIDAS-PROJECT
ef7311873fc29416c7caa8babdf341c058404ec4
[ "CC-BY-4.0" ]
null
null
null
Models/Segmentation_Models/Unet2d_Vertebrae/utils/save_fig.py
BIMCV-CSUSP/BIMCV-MIDAS-PROJECT
ef7311873fc29416c7caa8babdf341c058404ec4
[ "CC-BY-4.0" ]
2
2021-07-14T09:59:16.000Z
2021-07-14T10:01:29.000Z
#! /usr/bin/python # -*- coding: utf8 -*- from __future__ import print_function # Description: """ plot or save MRI images / masks in a screenshot ------- Types of sequences in the data = ['Sag_T2' 'Sag_T1' 'Sag_Stir'] """ # Imports import os, time import glob import random import pandas as pd import numpy as np im...
32.9375
124
0.596639
#! /usr/bin/python # -*- coding: utf8 -*- from __future__ import print_function # Description: """ plot or save MRI images / masks in a screenshot ------- Types of sequences in the data = ['Sag_T2' 'Sag_T1' 'Sag_Stir'] """ # Imports import os, time import glob import random import pandas as pd import numpy as np im...
1,160
0
23
43402eb70cf833f3e370cecf3e2c8e835252e1a4
103
py
Python
src/hpp/corbaserver/romeo/__init__.py
florent-lamiraux/hpp_romeo
71ed7143e3ffe1eaeeeedb49b81f147fa2e18027
[ "BSD-2-Clause" ]
null
null
null
src/hpp/corbaserver/romeo/__init__.py
florent-lamiraux/hpp_romeo
71ed7143e3ffe1eaeeeedb49b81f147fa2e18027
[ "BSD-2-Clause" ]
null
null
null
src/hpp/corbaserver/romeo/__init__.py
florent-lamiraux/hpp_romeo
71ed7143e3ffe1eaeeeedb49b81f147fa2e18027
[ "BSD-2-Clause" ]
2
2018-12-19T15:19:16.000Z
2019-12-06T16:25:11.000Z
#!/usr/bin/env python # Copyright (c) 2014 CNRS # Author: Florent Lamiraux # from .robot import Robot
14.714286
26
0.718447
#!/usr/bin/env python # Copyright (c) 2014 CNRS # Author: Florent Lamiraux # from .robot import Robot
0
0
0
01fec71a21a3dc4ae1e01434284b6e698cc857a1
912
py
Python
narcissistic.py
GGSimmons1992/CodewarsPython
795e1e38cc9043f2228c7d5a4bf94c8446ae2727
[ "MIT" ]
1
2019-03-01T00:15:36.000Z
2019-03-01T00:15:36.000Z
narcissistic.py
GGSimmons1992/CodewarsPython
795e1e38cc9043f2228c7d5a4bf94c8446ae2727
[ "MIT" ]
null
null
null
narcissistic.py
GGSimmons1992/CodewarsPython
795e1e38cc9043f2228c7d5a4bf94c8446ae2727
[ "MIT" ]
null
null
null
""" Gary Simmons March 2018 Kata Prompt Description: A Narcissistic Number is a number which is the sum of its own digits, each raised to the power of the number of digits in a given base. In this Kata, we will restrict ourselves to decimal (base 10). For example, take 153 (3 digits): 1^3 + 5^3 + 3^3 = 1 + 125 +...
31.448276
223
0.701754
""" Gary Simmons March 2018 Kata Prompt Description: A Narcissistic Number is a number which is the sum of its own digits, each raised to the power of the number of digits in a given base. In this Kata, we will restrict ourselves to decimal (base 10). For example, take 153 (3 digits): 1^3 + 5^3 + 3^3 = 1 + 125 +...
221
0
22
ff73cfec6bbcc04feed5f59b9ae989efec03fae8
1,552
py
Python
core/utils/Worker.py
xingfeT/mirageMan
7443bce072817adc843c5e34468f1dab32cb48ae
[ "Apache-2.0" ]
null
null
null
core/utils/Worker.py
xingfeT/mirageMan
7443bce072817adc843c5e34468f1dab32cb48ae
[ "Apache-2.0" ]
null
null
null
core/utils/Worker.py
xingfeT/mirageMan
7443bce072817adc843c5e34468f1dab32cb48ae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import logging from daemonize import Daemonize from rq import Connection, Worker from core.utils.Executor import check_output __workers__ = [ 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'eta', 'theta', 'iota', 'kappa', 'lambda', 'mu', ...
18.046512
71
0.567655
#!/usr/bin/env python import logging from daemonize import Daemonize from rq import Connection, Worker from core.utils.Executor import check_output __workers__ = [ 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'eta', 'theta', 'iota', 'kappa', 'lambda', 'mu', ...
483
0
23
b6c42ddd52e84260db5a55b47c1d05b955befeb3
7,371
py
Python
solution/data/processors/prep.py
taeukkkim/temp
91c90fe5da4678424d8aacacbf15773dc624021d
[ "MIT" ]
null
null
null
solution/data/processors/prep.py
taeukkkim/temp
91c90fe5da4678424d8aacacbf15773dc624021d
[ "MIT" ]
null
null
null
solution/data/processors/prep.py
taeukkkim/temp
91c90fe5da4678424d8aacacbf15773dc624021d
[ "MIT" ]
null
null
null
import re import numpy as np from solution.utils.constant import ( QUESTION_COLUMN_NAME, CONTEXT_COLUMN_NAME, ANSWER_COLUMN_NAME, ) def get_extractive_features(tokenizer, mode, data_args): """ Get extractive features for train, eval and test. Args: tokenizer (BERT Tokenizer): tokenizer fo...
36.671642
84
0.60114
import re import numpy as np from solution.utils.constant import ( QUESTION_COLUMN_NAME, CONTEXT_COLUMN_NAME, ANSWER_COLUMN_NAME, ) def get_extractive_features(tokenizer, mode, data_args): """ Get extractive features for train, eval and test. Args: tokenizer (BERT Tokenizer): tokenizer fo...
26
0
27
71b44fa14fddd3b9884847de5e274d8e96e1a0ae
4,258
py
Python
tests/screensize.py
alex1712/kms-core
d197c971693738df39e33e3ecf9dff40ce7fa861
[ "Apache-2.0" ]
287
2015-01-03T18:27:51.000Z
2022-03-24T13:48:24.000Z
tests/screensize.py
alex1712/kms-core
d197c971693738df39e33e3ecf9dff40ce7fa861
[ "Apache-2.0" ]
22
2015-06-05T10:32:16.000Z
2022-03-14T07:24:02.000Z
tests/screensize.py
alex1712/kms-core
d197c971693738df39e33e3ecf9dff40ce7fa861
[ "Apache-2.0" ]
217
2015-01-05T14:24:57.000Z
2022-02-24T07:14:09.000Z
#!/usr/bin/python3 import sys import gi gi.require_version('Gst', '1.0') from gi.repository import Gst from gi.repository import GLib from gi.repository import Gtk if __name__ == "__main__": main(sys.argv) #self.pipe = Gst.parse_launch ("videotestsrc is-live=true ! capsfilter name=caps ! x264enc speed-preset...
36.706897
319
0.716534
#!/usr/bin/python3 import sys import gi gi.require_version('Gst', '1.0') from gi.repository import Gst from gi.repository import GLib from gi.repository import Gtk def bus_callback(bus, message, not_used): t = message.type if t == Gst.MessageType.EOS: sys.stdout.write("End-of-stream\n") Gtk.main_quit() ...
3,710
6
169
76e4bd02018aff8b31e0e277aab69e6a94b7a230
1,902
py
Python
ChessDRF/server/views/account_views.py
Pythongor/Chess-DRF
d8dedd9fa6db85c00e6e3ee4c63729448a9bfba5
[ "MIT" ]
null
null
null
ChessDRF/server/views/account_views.py
Pythongor/Chess-DRF
d8dedd9fa6db85c00e6e3ee4c63729448a9bfba5
[ "MIT" ]
3
2021-09-08T03:38:52.000Z
2022-01-13T03:57:08.000Z
ChessDRF/server/views/account_views.py
Pythongor/Chess-DRF
d8dedd9fa6db85c00e6e3ee4c63729448a9bfba5
[ "MIT" ]
null
null
null
from os import listdir from random import choice from django.conf import settings from django.contrib.auth import login, authenticate from django.contrib.auth.views import LoginView from django.shortcuts import get_object_or_404, redirect from django.views.generic import TemplateView, DetailView from django.views.gener...
30.677419
77
0.692955
from os import listdir from random import choice from django.conf import settings from django.contrib.auth import login, authenticate from django.contrib.auth.views import LoginView from django.shortcuts import get_object_or_404, redirect from django.views.generic import TemplateView, DetailView from django.views.gener...
938
439
92
6e34695bf587cf6d83d1b845593c9f45af7b74d9
1,858
py
Python
steinerpy/abstract_algo.py
rooshm/steinerpy
777b55fa94527365322ba5fa675c8be090333715
[ "MIT" ]
3
2021-06-10T16:46:20.000Z
2022-02-11T14:24:15.000Z
steinerpy/abstract_algo.py
rooshm/steinerpy
777b55fa94527365322ba5fa675c8be090333715
[ "MIT" ]
12
2021-03-31T03:31:24.000Z
2021-11-18T21:51:18.000Z
steinerpy/abstract_algo.py
rooshm/steinerpy
777b55fa94527365322ba5fa675c8be090333715
[ "MIT" ]
1
2021-06-13T15:01:24.000Z
2021-06-13T15:01:24.000Z
"""A module with the class `AbstractAlgorithm` defined""" # from abc import ABC, abstractmethod from abc import abstractmethod from steinerpy.library.misc.abc_utils import abstract_attribute, ABC as newABC from steinerpy.library.graphs.graph import IGraph from typing import List class AbstractAlgorithm(newABC): "...
37.918367
92
0.655005
"""A module with the class `AbstractAlgorithm` defined""" # from abc import ABC, abstractmethod from abc import abstractmethod from steinerpy.library.misc.abc_utils import abstract_attribute, ABC as newABC from steinerpy.library.graphs.graph import IGraph from typing import List class AbstractAlgorithm(newABC): "...
164
0
26
5a401582065b6cfbb9f8df5ad1f1e65bd2e6695b
550
py
Python
2020/udp_server.py
aleimu/code-puzzle
1aaa86e6b49e1fe15a2a6c6be22badd783594024
[ "MIT" ]
null
null
null
2020/udp_server.py
aleimu/code-puzzle
1aaa86e6b49e1fe15a2a6c6be22badd783594024
[ "MIT" ]
null
null
null
2020/udp_server.py
aleimu/code-puzzle
1aaa86e6b49e1fe15a2a6c6be22badd783594024
[ "MIT" ]
null
null
null
from socket import * from time import ctime HOST = '' PORT = 8888 BUFSIZ = 1024 ADDRESS = (HOST, PORT) udpServerSocket = socket(AF_INET, SOCK_DGRAM) udpServerSocket.bind(ADDRESS) # 绑定客户端口和地址 while True: print("udp waiting for message...") data, addr = udpServerSocket.recvfrom(BUFSIZ) print("接收到数据:", dat...
25
73
0.678182
from socket import * from time import ctime HOST = '' PORT = 8888 BUFSIZ = 1024 ADDRESS = (HOST, PORT) udpServerSocket = socket(AF_INET, SOCK_DGRAM) udpServerSocket.bind(ADDRESS) # 绑定客户端口和地址 while True: print("udp waiting for message...") data, addr = udpServerSocket.recvfrom(BUFSIZ) print("接收到数据:", dat...
0
0
0
8210e4bf0620acb34ec328bb601ed845570d9b37
2,128
py
Python
cloudshell/devices/runners/autoload_runner.py
QualiSystems/cloudshell-networking-devices
f316cefca174975424ec21854b672335feaf8f87
[ "Apache-2.0" ]
null
null
null
cloudshell/devices/runners/autoload_runner.py
QualiSystems/cloudshell-networking-devices
f316cefca174975424ec21854b672335feaf8f87
[ "Apache-2.0" ]
34
2016-11-28T10:52:44.000Z
2019-10-01T08:52:59.000Z
cloudshell/devices/runners/autoload_runner.py
QualiSystems/cloudshell-networking-devices
f316cefca174975424ec21854b672335feaf8f87
[ "Apache-2.0" ]
1
2017-05-23T08:46:45.000Z
2017-05-23T08:46:45.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- from abc import abstractproperty, ABCMeta from cloudshell.devices.networking_utils import command_logging from cloudshell.devices.runners.interfaces.autoload_runner_interface import AutoloadOperationsInterface
32.738462
112
0.606203
#!/usr/bin/python # -*- coding: utf-8 -*- from abc import abstractproperty, ABCMeta from cloudshell.devices.networking_utils import command_logging from cloudshell.devices.runners.interfaces.autoload_runner_interface import AutoloadOperationsInterface class AutoloadRunner(AutoloadOperationsInterface): __metacla...
629
1,221
23
f134212aed556da4d00930f3d31654d7f980e384
1,019
py
Python
Chapter09/ch9_grover_ancilla.py
PacktPublishing/Quantum-Computing-in-Practice-with-IBM-Q-Experience
91423f8ff1d039b5eb3fd18fc64bbb5967fdd5c1
[ "MIT" ]
24
2020-11-21T20:33:51.000Z
2022-03-26T06:41:27.000Z
Chapter09/ch9_grover_ancilla.py
videomover/Quantum-Computing-in-Practice-with-Qiskit-and-IBM-Quantum-Experience
938123d051c5bab72110011b3a05e515bb69ca09
[ "MIT" ]
2
2021-02-07T14:32:12.000Z
2022-03-25T07:23:46.000Z
Chapter09/ch9_grover_ancilla.py
videomover/Quantum-Computing-in-Practice-with-Qiskit-and-IBM-Quantum-Experience
938123d051c5bab72110011b3a05e515bb69ca09
[ "MIT" ]
16
2020-11-03T07:49:11.000Z
2022-03-26T06:41:29.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created Nov 2020 @author: hassi """ from qiskit import QuantumCircuit, Aer, execute from IPython.core.display import display from qiskit.tools.visualization import plot_histogram print("Ch 9: Grover with ancilla qubits") print("--------------------------------") # ...
16.983333
53
0.664377
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created Nov 2020 @author: hassi """ from qiskit import QuantumCircuit, Aer, execute from IPython.core.display import display from qiskit.tools.visualization import plot_histogram print("Ch 9: Grover with ancilla qubits") print("--------------------------------") # ...
0
0
0
5ed5cc32f654e4a5cca36ab832db215acb10916a
1,703
py
Python
pythalesians/market/requests/backtestrequest.py
NunoEdgarGFlowHub/pythalesians
3ea77b9f52cc704258d55369922955f4010bf4ea
[ "Apache-2.0" ]
22
2017-06-04T21:05:18.000Z
2022-01-22T19:01:43.000Z
pythalesians/market/requests/backtestrequest.py
NunoEdgarGFlowHub/pythalesians
3ea77b9f52cc704258d55369922955f4010bf4ea
[ "Apache-2.0" ]
null
null
null
pythalesians/market/requests/backtestrequest.py
NunoEdgarGFlowHub/pythalesians
3ea77b9f52cc704258d55369922955f4010bf4ea
[ "Apache-2.0" ]
11
2016-10-06T21:25:20.000Z
2020-07-08T19:13:35.000Z
__author__ = 'saeedamen' from pythalesians.util.loggermanager import LoggerManager from pythalesians.market.requests.timeseriesrequest import TimeSeriesRequest from pythalesians.timeseries.techind.techparams import TechParams
25.80303
85
0.677041
__author__ = 'saeedamen' from pythalesians.util.loggermanager import LoggerManager from pythalesians.market.requests.timeseriesrequest import TimeSeriesRequest from pythalesians.timeseries.techind.techparams import TechParams class BacktestRequest(TimeSeriesRequest): def __init__(self): super(TimeSeriesR...
953
499
23
60f942e7943c7c823d5eaeabb57331b57170913c
2,102
py
Python
Behavioural Cloning.py
Vishal0703/Udacity_CarND_Behavioural_Cloning
02a3c2432ce46220a39ba49ec13933269d9d7c21
[ "MIT" ]
null
null
null
Behavioural Cloning.py
Vishal0703/Udacity_CarND_Behavioural_Cloning
02a3c2432ce46220a39ba49ec13933269d9d7c21
[ "MIT" ]
null
null
null
Behavioural Cloning.py
Vishal0703/Udacity_CarND_Behavioural_Cloning
02a3c2432ce46220a39ba49ec13933269d9d7c21
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[43]: import cv2 import csv from scipy import ndimage import numpy as np # In[44]: lines = [] with open("./data/driving_log.csv") as dl: reader = csv.reader(dl) for line in reader: lines.append(line) # In[45]: lines = lines[1:] corr = 0.2 source_p...
17.965812
83
0.6451
#!/usr/bin/env python # coding: utf-8 # In[43]: import cv2 import csv from scipy import ndimage import numpy as np # In[44]: lines = [] with open("./data/driving_log.csv") as dl: reader = csv.reader(dl) for line in reader: lines.append(line) # In[45]: lines = lines[1:] corr = 0.2 source_p...
0
0
0
51f18c307bfe7de9cf366c1eff9e4ea3c3bde826
4,953
py
Python
jupyterlab_translate/api.py
fcollonval/jupyterlab-translate
9c518200c39c431f91ba4c16d162e56f0253ba14
[ "BSD-3-Clause" ]
1
2020-07-11T22:54:15.000Z
2020-07-11T22:54:15.000Z
jupyterlab_translate/api.py
goanpeca/jupyterlab-translate
9c518200c39c431f91ba4c16d162e56f0253ba14
[ "BSD-3-Clause" ]
null
null
null
jupyterlab_translate/api.py
goanpeca/jupyterlab-translate
9c518200c39c431f91ba4c16d162e56f0253ba14
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """ API interface. """ import os import shutil from .constants import EXTENSIONS_FOLDER from .constants import JUPYTERLAB from .constants import LANG_PACKS_FOLDER from .constants import LC_MESSAGES from .constants impo...
28.796512
86
0.68827
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """ API interface. """ import os import shutil from .constants import EXTENSIONS_FOLDER from .constants import JUPYTERLAB from .constants import LANG_PACKS_FOLDER from .constants import LC_MESSAGES from .constants impo...
0
0
0
f87448190a9f21e196edac22d504675466d4f3e3
2,279
py
Python
advent3_triangles.py
mike10004/adventofcode2016
2d74ae23f79c9d08366516b285f3eb1e686232b9
[ "MIT" ]
null
null
null
advent3_triangles.py
mike10004/adventofcode2016
2d74ae23f79c9d08366516b285f3eb1e686232b9
[ "MIT" ]
null
null
null
advent3_triangles.py
mike10004/adventofcode2016
2d74ae23f79c9d08366516b285f3eb1e686232b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # advent3_triangles.py # import itertools import sys _KNOWN_TRUE = ((5, 12, 13), (3, 3, 3), (200, 300, 450), (2, 1, 2)) _KNOWN_FALSE = ((1, 2, 3), (5, 10, 25)) if __name__ == '__main__': assert sum(evaluate(_KNOWN_TRUE)) == len(_KNOWN_TRUE) assert sum(evalua...
34.014925
166
0.637999
#!/usr/bin/env python # -*- coding: utf-8 -*- # # advent3_triangles.py # import itertools import sys def triad(t, oddman_index): pair = tuple([t[i] for i in xrange(len(t)) if i != oddman_index]) oddman = t[oddman_index] return pair, oddman def is_triangle(t): a, b, c = t assert a > 0 and b...
1,237
0
150
41ef00c687f4ea9fe746ec56e1be8278c6eb3bf9
1,064
py
Python
ParProcCo/scheduler_mode_interface.py
DiamondLightSource/ParProcCo
75742278f567a36e7bb74bb7c00f98407270a8ac
[ "BSD-3-Clause" ]
null
null
null
ParProcCo/scheduler_mode_interface.py
DiamondLightSource/ParProcCo
75742278f567a36e7bb74bb7c00f98407270a8ac
[ "BSD-3-Clause" ]
5
2021-09-07T15:02:49.000Z
2022-03-17T20:43:00.000Z
ParProcCo/scheduler_mode_interface.py
DiamondLightSource/ParProcCo
75742278f567a36e7bb74bb7c00f98407270a8ac
[ "BSD-3-Clause" ]
1
2021-12-07T08:50:48.000Z
2021-12-07T08:50:48.000Z
from __future__ import annotations from datetime import datetime from pathlib import Path from typing import List, Optional, Tuple
38
135
0.694549
from __future__ import annotations from datetime import datetime from pathlib import Path from typing import List, Optional, Tuple class SchedulerModeInterface: def __init__(self) -> None: self.number_jobs: int self.cores: int self.program_path: Optional[Path] self.allowed_module...
164
744
23