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
611d92992de419cc5427a81b74c872d81cd71fb4
23,971
py
Python
pyraptor/model/structures.py
yfredrix/pyraptor
a00b1d5576cd4126611483409e293d283cb7917d
[ "MIT" ]
null
null
null
pyraptor/model/structures.py
yfredrix/pyraptor
a00b1d5576cd4126611483409e293d283cb7917d
[ "MIT" ]
null
null
null
pyraptor/model/structures.py
yfredrix/pyraptor
a00b1d5576cd4126611483409e293d283cb7917d
[ "MIT" ]
null
null
null
"""Datatypes""" from __future__ import annotations from itertools import compress from collections import defaultdict from operator import attrgetter from typing import List, Dict, Tuple from dataclasses import dataclass, field from copy import copy import attr import numpy as np from loguru import logger from pyrap...
29.889027
110
0.597931
"""Datatypes""" from __future__ import annotations from itertools import compress from collections import defaultdict from operator import attrgetter from typing import List, Dict, Tuple from dataclasses import dataclass, field from copy import copy import attr import numpy as np from loguru import logger from pyrap...
3,578
0
1,647
933115b74ed295a65006412c92b16ed069cfcc8d
20,509
py
Python
cardea/fhir/NutritionOrder.py
Hector-hedb12/Cardea
75c75f343796555f08c4511d6427efd04261a105
[ "MIT" ]
null
null
null
cardea/fhir/NutritionOrder.py
Hector-hedb12/Cardea
75c75f343796555f08c4511d6427efd04261a105
[ "MIT" ]
null
null
null
cardea/fhir/NutritionOrder.py
Hector-hedb12/Cardea
75c75f343796555f08c4511d6427efd04261a105
[ "MIT" ]
null
null
null
from .fhirbase import fhirbase class NutritionOrder(fhirbase): """ A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. Attributes: resourceType: This is a NutritionOrder resource identifier: Identifiers assigned to this order by ...
36.171076
97
0.624604
from .fhirbase import fhirbase class NutritionOrder(fhirbase): """ A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. Attributes: resourceType: This is a NutritionOrder resource identifier: Identifiers assigned to this order by ...
11,381
0
405
c39d8d353d6f99bd28e3afe51aff55b07c44c66f
363
py
Python
util/mqtt_db_dump.py
mgroseman/mqtt-repeater
3205d0b39036c1f782e3bb8554ebad19e5582cc0
[ "MIT" ]
3
2016-07-29T20:09:21.000Z
2022-03-24T20:27:33.000Z
util/mqtt_db_dump.py
mgroseman/mqtt-repeater
3205d0b39036c1f782e3bb8554ebad19e5582cc0
[ "MIT" ]
null
null
null
util/mqtt_db_dump.py
mgroseman/mqtt-repeater
3205d0b39036c1f782e3bb8554ebad19e5582cc0
[ "MIT" ]
null
null
null
#!/usr/bin/env python #This needs to be fully commented and have a Usage message # Copyright (c) 2016 - mgroseman - Mike Roseman # MIT License import sqlite3 SQLDB='db/mqtt_repeater.db' conn = sqlite3.connect(SQLDB) db = conn.cursor() for row in db.execute('SELECT * FROM states ORDER BY last_timestamp'): pr...
20.166667
70
0.699725
#!/usr/bin/env python #This needs to be fully commented and have a Usage message # Copyright (c) 2016 - mgroseman - Mike Roseman # MIT License import sqlite3 SQLDB='db/mqtt_repeater.db' conn = sqlite3.connect(SQLDB) db = conn.cursor() for row in db.execute('SELECT * FROM states ORDER BY last_timestamp'): pr...
0
0
0
3aff9b937003ede708026bb44e8f51b4ba682f45
7,628
py
Python
algorithms/embdi/EmbDI/schema_matching.py
Soton-Song/valentine
9a47859f912540cdbe961ed3585201d3accd07be
[ "Apache-2.0" ]
null
null
null
algorithms/embdi/EmbDI/schema_matching.py
Soton-Song/valentine
9a47859f912540cdbe961ed3585201d3accd07be
[ "Apache-2.0" ]
null
null
null
algorithms/embdi/EmbDI/schema_matching.py
Soton-Song/valentine
9a47859f912540cdbe961ed3585201d3accd07be
[ "Apache-2.0" ]
null
null
null
import argparse import warnings from operator import itemgetter import gensim.models as models import mlflow
30.882591
117
0.552832
import argparse import warnings from operator import itemgetter import gensim.models as models import mlflow def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('-i', '--input_file', action='store', required=True, type=str, help='Input embeddings file.') parser.add_argument('-d', '--...
7,302
0
207
43cc65b8437584ccacdf26fa5aeab9bce6192420
4,498
py
Python
rsi_stoch_signalmod_djcommie.py
adamje42/Binance-volatility-trading-bot
13523c82ce4e5255d3c38de8db5c2ebde053525a
[ "MIT" ]
null
null
null
rsi_stoch_signalmod_djcommie.py
adamje42/Binance-volatility-trading-bot
13523c82ce4e5255d3c38de8db5c2ebde053525a
[ "MIT" ]
null
null
null
rsi_stoch_signalmod_djcommie.py
adamje42/Binance-volatility-trading-bot
13523c82ce4e5255d3c38de8db5c2ebde053525a
[ "MIT" ]
null
null
null
# Available indicators here: https://python-tradingview-ta.readthedocs.io/en/latest/usage.html#retrieving-the-analysis from tradingview_ta import TA_Handler, Interval, Exchange # use for environment variables import os # use if needed to pass args to external modules import sys # used for directory handling import glo...
40.890909
220
0.648288
# Available indicators here: https://python-tradingview-ta.readthedocs.io/en/latest/usage.html#retrieving-the-analysis from tradingview_ta import TA_Handler, Interval, Exchange # use for environment variables import os # use if needed to pass args to external modules import sys # used for directory handling import glo...
3,385
0
46
c50af4199b3acde52f62b4fb1d0b9c1d7a9a253f
7,827
py
Python
balloon_learning_environment/env/generative_wind_field.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
balloon_learning_environment/env/generative_wind_field.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
balloon_learning_environment/env/generative_wind_field.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The Balloon Learning Environment Authors. # # 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 require...
38.940299
80
0.681743
# coding=utf-8 # Copyright 2021 The Balloon Learning Environment Authors. # # 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 require...
2,046
0
25
75369ccfbfd56359bbe939f3b80a1491d0f64ef6
125
py
Python
test/client/data_storage/生成逻辑.py
sf-fl/federatedML
6cb48525d662ba1bad12702622f2b43f67da67cf
[ "Apache-2.0" ]
null
null
null
test/client/data_storage/生成逻辑.py
sf-fl/federatedML
6cb48525d662ba1bad12702622f2b43f67da67cf
[ "Apache-2.0" ]
null
null
null
test/client/data_storage/生成逻辑.py
sf-fl/federatedML
6cb48525d662ba1bad12702622f2b43f67da67cf
[ "Apache-2.0" ]
1
2020-11-17T08:45:49.000Z
2020-11-17T08:45:49.000Z
# =IF(D2=1,IF(RAND()>0.5,NORMINV(RAND(),75,2),NORMINV(RAND(),85,2)),IF(RAND()>0.5,NORMINV(RAND(),70,2),NORMINV(RAND(),80,2)))
125
125
0.616
# =IF(D2=1,IF(RAND()>0.5,NORMINV(RAND(),75,2),NORMINV(RAND(),85,2)),IF(RAND()>0.5,NORMINV(RAND(),70,2),NORMINV(RAND(),80,2)))
0
0
0
db3d2ab438f8355542ced7df9e3b7edfb79a28a8
451
py
Python
tests/test_general_validators/test_has_no_multiple_imports_on_same_line.py
SerejkaSJ/fiasko_bro
dfb8c30109f317c1e5b6d211e002fd148695809e
[ "MIT" ]
25
2018-01-24T10:45:35.000Z
2020-12-05T21:47:20.000Z
tests/test_general_validators/test_has_no_multiple_imports_on_same_line.py
SerejkaSJ/fiasko_bro
dfb8c30109f317c1e5b6d211e002fd148695809e
[ "MIT" ]
110
2018-01-21T12:25:13.000Z
2021-06-10T19:27:22.000Z
tests/test_general_validators/test_has_no_multiple_imports_on_same_line.py
SerejkaSJ/fiasko_bro
dfb8c30109f317c1e5b6d211e002fd148695809e
[ "MIT" ]
13
2017-12-12T22:19:01.000Z
2019-01-29T18:08:05.000Z
from fiasko_bro.validators import has_multiple_imports_on_same_line
34.692308
68
0.847007
from fiasko_bro.validators import has_multiple_imports_on_same_line def test_has_no_multiple_imports_on_same_line_fails(test_repo): expected_output = 'file_with_multiple_imports_on_same_line.py:3' output = has_multiple_imports_on_same_line(test_repo) assert output == expected_output def test_has_no_muta...
335
0
46
85315571c7e446e5cdd29c10abe9c3f4b6e48628
423
py
Python
shabanipy/quantum_hall/__init__.py
ShabaniLab/DataAnalysis
e234b7d0e4ff8ecc11e58134e6309a095abcd2c0
[ "MIT" ]
6
2019-06-25T20:01:03.000Z
2022-03-25T23:15:57.000Z
shabanipy/quantum_hall/__init__.py
ShabaniLab/DataAnalysis
e234b7d0e4ff8ecc11e58134e6309a095abcd2c0
[ "MIT" ]
null
null
null
shabanipy/quantum_hall/__init__.py
ShabaniLab/DataAnalysis
e234b7d0e4ff8ecc11e58134e6309a095abcd2c0
[ "MIT" ]
5
2019-06-11T17:21:54.000Z
2021-08-24T14:45:08.000Z
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2019 by ShabaniPy Authors, see AUTHORS for more details. # # Distributed under the terms of the MIT license. # # The full license is in the file LICENCE, distributed with this software. # ----------------...
38.454545
79
0.451537
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2019 by ShabaniPy Authors, see AUTHORS for more details. # # Distributed under the terms of the MIT license. # # The full license is in the file LICENCE, distributed with this software. # ----------------...
0
0
0
f97e6091781d14277df8d8e2098f687f75cf426f
15,930
py
Python
pegasus/sih-anomalias/sih_composite_detector_outlier.py
SecexSaudeTCU/PegaSUS
0e24c00595e8a7376680dfb2e5aa42e1e9eb7770
[ "MIT" ]
null
null
null
pegasus/sih-anomalias/sih_composite_detector_outlier.py
SecexSaudeTCU/PegaSUS
0e24c00595e8a7376680dfb2e5aa42e1e9eb7770
[ "MIT" ]
null
null
null
pegasus/sih-anomalias/sih_composite_detector_outlier.py
SecexSaudeTCU/PegaSUS
0e24c00595e8a7376680dfb2e5aa42e1e9eb7770
[ "MIT" ]
1
2020-08-19T19:31:42.000Z
2020-08-19T19:31:42.000Z
from outliers.estatistica.zscore import ZScore, ZScoreModificado from outliers.estatistica.iqr import InterquartileRange from outliers.densidade.lof import LOF from outliers.proximidade.isolation_forest import IsolationForest from outliers.detector import DetectorOutlier from sih.sih_facade import SIHFacade import sys ...
47.981928
124
0.696359
from outliers.estatistica.zscore import ZScore, ZScoreModificado from outliers.estatistica.iqr import InterquartileRange from outliers.densidade.lof import LOF from outliers.proximidade.isolation_forest import IsolationForest from outliers.detector import DetectorOutlier from sih.sih_facade import SIHFacade import sys ...
14,442
30
305
59a6208aa3aa279f34787ee181cc22bd8893cd57
2,811
py
Python
frocket/common/helpers/utils.py
DynamicYieldProjects/funnel-rocket
70963fddc0881cebdc6da1af2654d412f95d660c
[ "Apache-2.0" ]
56
2021-04-04T08:15:33.000Z
2022-03-14T06:31:20.000Z
frocket/common/helpers/utils.py
DynamicYieldProjects/funnel-rocket
70963fddc0881cebdc6da1af2654d412f95d660c
[ "Apache-2.0" ]
19
2021-04-01T20:35:48.000Z
2022-03-30T22:07:27.000Z
frocket/common/helpers/utils.py
DynamicYieldProjects/funnel-rocket
70963fddc0881cebdc6da1af2654d412f95d660c
[ "Apache-2.0" ]
2
2021-07-14T13:47:00.000Z
2021-08-12T07:58:32.000Z
"""For everything but the kitchen sink.""" # Copyright 2021 The Funnel Rocket Maintainers # # 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...
30.554348
109
0.677339
"""For everything but the kitchen sink.""" # Copyright 2021 The Funnel Rocket Maintainers # # 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...
460
0
118
e13a954566afd8fd45f8e48d543bd6a3bc071277
740
py
Python
util/logo/serialize_dataset.py
yyyliu/latent-space-cartography
c731029bfe540ac9ef703e832aac6774c01f075a
[ "BSD-3-Clause" ]
59
2019-04-09T16:18:19.000Z
2021-11-29T10:44:26.000Z
util/logo/serialize_dataset.py
yyyliu/latent-space-cartography
c731029bfe540ac9ef703e832aac6774c01f075a
[ "BSD-3-Clause" ]
4
2020-08-17T12:05:28.000Z
2021-06-28T14:13:12.000Z
util/logo/serialize_dataset.py
yyyliu/latent-space-cartography
c731029bfe540ac9ef703e832aac6774c01f075a
[ "BSD-3-Clause" ]
11
2019-05-15T18:48:53.000Z
2021-08-14T10:33:22.000Z
import h5py import os import numpy as np dim = 12288 base = '/home/yliu0/data/' pin= os.path.join(base, 'logos.hdf5') out = os.path.join(base, './latent/latent{}.h5'.format(dim)) num_chns = 3 img_size = 64 if __name__ == '__main__': # clean if os.path.exists(out): os.remove(out) fin = h5py.File...
19.473684
60
0.540541
import h5py import os import numpy as np dim = 12288 base = '/home/yliu0/data/' pin= os.path.join(base, 'logos.hdf5') out = os.path.join(base, './latent/latent{}.h5'.format(dim)) num_chns = 3 img_size = 64 if __name__ == '__main__': # clean if os.path.exists(out): os.remove(out) fin = h5py.File...
0
0
0
afb5601db4ef7607fb7ef8b5a3855ab5738f8f72
446
py
Python
migrations/versions/8550c7394f4_change_commands_env_to_text.py
vault-the/changes
37e23c3141b75e4785cf398d015e3dbca41bdd56
[ "Apache-2.0" ]
443
2015-01-03T16:28:39.000Z
2021-04-26T16:39:46.000Z
migrations/versions/8550c7394f4_change_commands_env_to_text.py
vault-the/changes
37e23c3141b75e4785cf398d015e3dbca41bdd56
[ "Apache-2.0" ]
12
2015-07-30T19:07:16.000Z
2016-11-07T23:11:21.000Z
migrations/versions/8550c7394f4_change_commands_env_to_text.py
vault-the/changes
37e23c3141b75e4785cf398d015e3dbca41bdd56
[ "Apache-2.0" ]
47
2015-01-09T10:04:00.000Z
2020-11-18T17:58:19.000Z
"""change commands.env to text Revision ID: 8550c7394f4 Revises: 5844fbc9d9e4 Create Date: 2015-06-15 13:42:13.990095 """ # revision identifiers, used by Alembic. revision = '8550c7394f4' down_revision = '5844fbc9d9e4' from alembic import op import sqlalchemy as sa
18.583333
75
0.721973
"""change commands.env to text Revision ID: 8550c7394f4 Revises: 5844fbc9d9e4 Create Date: 2015-06-15 13:42:13.990095 """ # revision identifiers, used by Alembic. revision = '8550c7394f4' down_revision = '5844fbc9d9e4' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('command', 'e...
127
0
46
6c4d77141ec648d322cfa9547d8a235ae87166bc
377
py
Python
api/models.py
AbhijithGanesh/Student-Portal-CMS
2b29a4b5ee52c3e821de3e440bfbb02d12564ba4
[ "BSD-3-Clause" ]
null
null
null
api/models.py
AbhijithGanesh/Student-Portal-CMS
2b29a4b5ee52c3e821de3e440bfbb02d12564ba4
[ "BSD-3-Clause" ]
1
2021-10-11T04:36:54.000Z
2021-10-11T04:36:54.000Z
api/models.py
AbhijithGanesh/Student-Portal-CMS
2b29a4b5ee52c3e821de3e440bfbb02d12564ba4
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from pydantic import * from typing import * from django.contrib.auth.models import User from CMSLogic.models import * from asgiref.sync import sync_to_async
26.928571
50
0.72679
from django.db import models from pydantic import * from typing import * from django.contrib.auth.models import User from CMSLogic.models import * from asgiref.sync import sync_to_async def EventsProcessor(): Data = list(Events.objects.all()) # Description = Data.get("Event_Descripton") # Event...
158
0
25
2d6e51702f64e5ffa0f59ad631d68552d46f5365
733
py
Python
exercicios3/ex072.py
LuanGermano/Mundo-3-Curso-em-Video-Python
1dffda71ff769e4e901b85e4cca5595a5dbb545c
[ "MIT" ]
null
null
null
exercicios3/ex072.py
LuanGermano/Mundo-3-Curso-em-Video-Python
1dffda71ff769e4e901b85e4cca5595a5dbb545c
[ "MIT" ]
null
null
null
exercicios3/ex072.py
LuanGermano/Mundo-3-Curso-em-Video-Python
1dffda71ff769e4e901b85e4cca5595a5dbb545c
[ "MIT" ]
null
null
null
#Crie um programa que tenha uma Tupla totalmente preenchida com uma contagem por extenso, de zero ate vinte. #Seu programa deverá ler um numero pelo teclado e mostra-lo por extenso. # só catar o numero gerado e botar dentro do indice extenso = ('Zero', 'Um', 'Dois', 'Tres', 'Quatro', 'Cinco', 'Seis', 'Sete', 'Oito', '...
43.117647
108
0.620737
#Crie um programa que tenha uma Tupla totalmente preenchida com uma contagem por extenso, de zero ate vinte. #Seu programa deverá ler um numero pelo teclado e mostra-lo por extenso. # só catar o numero gerado e botar dentro do indice extenso = ('Zero', 'Um', 'Dois', 'Tres', 'Quatro', 'Cinco', 'Seis', 'Sete', 'Oito', '...
0
0
0
1be2f856e4efaebd50902b781c66bd570645c78c
24
py
Python
binding/python/mc_rbdyn/__init__.py
fkanehiro/mc_rtc
776017e46c1a4626c1d8f1fb7d51675a9b9b9cad
[ "BSD-2-Clause" ]
44
2019-12-13T08:48:02.000Z
2022-03-24T03:11:25.000Z
binding/python/mc_rbdyn/__init__.py
fkanehiro/mc_rtc
776017e46c1a4626c1d8f1fb7d51675a9b9b9cad
[ "BSD-2-Clause" ]
160
2020-01-17T20:46:23.000Z
2022-03-31T01:32:42.000Z
binding/python/mc_rbdyn/__init__.py
fkanehiro/mc_rtc
776017e46c1a4626c1d8f1fb7d51675a9b9b9cad
[ "BSD-2-Clause" ]
20
2019-12-20T04:34:00.000Z
2022-03-24T01:31:27.000Z
from .mc_rbdyn import *
12
23
0.75
from .mc_rbdyn import *
0
0
0
078501ad68ff4eeafc7889f044308e6c71e94f42
5,981
py
Python
lib/python/treadmill/cgroups.py
vrautela/treadmill
05e47fa8acdf8bad7af78e737efb26ea6488de82
[ "Apache-2.0" ]
133
2016-09-15T13:36:12.000Z
2021-01-18T06:29:13.000Z
lib/python/treadmill/cgroups.py
vrautela/treadmill
05e47fa8acdf8bad7af78e737efb26ea6488de82
[ "Apache-2.0" ]
108
2016-12-28T23:41:27.000Z
2020-03-05T21:20:37.000Z
lib/python/treadmill/cgroups.py
evreng/treadmill
05e47fa8acdf8bad7af78e737efb26ea6488de82
[ "Apache-2.0" ]
69
2016-09-23T20:38:58.000Z
2020-11-11T02:31:21.000Z
"""Common cgroups management routines. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import logging import os from treadmill import fs from treadmill.fs import linux as fs_linux #: Base directory wh...
26.582222
79
0.650393
"""Common cgroups management routines. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import logging import os from treadmill import fs from treadmill.fs import linux as fs_linux #: Base directory wh...
0
0
0
38ec51a5930087e513ed0fcc5c2b8322af6ee357
795
py
Python
fompy/util/zeros.py
kononovarseniy/fompy
2d9d1b1c75b304dd50f108568d8dcee84b9e87b1
[ "MIT" ]
5
2020-10-16T18:10:17.000Z
2020-12-18T11:35:30.000Z
fompy/util/zeros.py
kononovarseniy/fompy
2d9d1b1c75b304dd50f108568d8dcee84b9e87b1
[ "MIT" ]
17
2020-10-22T03:19:46.000Z
2020-12-15T05:33:56.000Z
fompy/util/zeros.py
kononovarseniy/fompy
2d9d1b1c75b304dd50f108568d8dcee84b9e87b1
[ "MIT" ]
null
null
null
from itertools import count, islice from scipy.optimize import bisect
25.645161
85
0.637736
from itertools import count, islice from scipy.optimize import bisect def locate_zeros(points): px = py = None for x, y in points: if px is not None and py * y < 0: yield px, x px = x py = y def locate_function_zeros(func, start, step): xs = (start + step * i for i i...
628
0
92
6949cc9dfbe6a66151419b8c802249bfffe52479
935
py
Python
Projects_in_Python/QR_Reader/main.py
pky99/Mini_Python_Projects
1cd3caa0aa48503a1f501f1ab90f34546615cf9a
[ "MIT" ]
null
null
null
Projects_in_Python/QR_Reader/main.py
pky99/Mini_Python_Projects
1cd3caa0aa48503a1f501f1ab90f34546615cf9a
[ "MIT" ]
null
null
null
Projects_in_Python/QR_Reader/main.py
pky99/Mini_Python_Projects
1cd3caa0aa48503a1f501f1ab90f34546615cf9a
[ "MIT" ]
null
null
null
import cv2 from pyzbar import pyzbar # Press the green button in the gutter to run the script. if __name__ == '__main__': readQR()
25.27027
84
0.583957
import cv2 from pyzbar import pyzbar def read_code(frame): codes = pyzbar.decode(frame) for code in codes: x, y, w, h = code.rect code_info = code.data.decode('utf-8') cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2) font = cv2.FONT_HERSHEY_DUPLEX cv2.putT...
748
0
46
fae391c60409d4e71f461ce211e8f4aed8541f56
901
py
Python
fcc_split/credo_download.py
sunlightlabs/fcc-net-neutrality-comments
56bcc6101a0dd5dcc3dc251014f30c2a2e0cde5b
[ "MIT" ]
18
2015-02-11T20:11:19.000Z
2020-11-13T23:22:47.000Z
fcc_split/credo_download.py
sunlightlabs/fcc-net-neutrality-comments
56bcc6101a0dd5dcc3dc251014f30c2a2e0cde5b
[ "MIT" ]
null
null
null
fcc_split/credo_download.py
sunlightlabs/fcc-net-neutrality-comments
56bcc6101a0dd5dcc3dc251014f30c2a2e0cde5b
[ "MIT" ]
6
2015-10-26T20:51:26.000Z
2021-04-18T16:47:30.000Z
import os, json, sys, operator, urllib, urllib2 from pyquery import PyQuery as pq credo_dir = sys.argv[1] if __name__ == "__main__": json_files = [f for f in all_files(credo_dir) if f.endswith('.json') and '-' not in os.path.basename(f)] for filename in json_files: meta = json.load(open(filename)) ...
47.421053
152
0.631521
import os, json, sys, operator, urllib, urllib2 from pyquery import PyQuery as pq def all_files(dir): return reduce(operator.add, [[os.path.join(x[0], y) for y in x[2]] for x in os.walk(dir)]) credo_dir = sys.argv[1] if __name__ == "__main__": json_files = [f for f in all_files(credo_dir) if f.endswith('.jso...
93
0
23
ed84a4b201d8276a22307f2ecf603a258673a174
3,830
py
Python
timeflux/core/node.py
HerySon/timeflux
01a5a27a3368afe8b0c1da475f84618e11ffec3b
[ "MIT" ]
123
2019-01-09T08:57:39.000Z
2022-03-18T18:59:51.000Z
timeflux/core/node.py
HerySon/timeflux
01a5a27a3368afe8b0c1da475f84618e11ffec3b
[ "MIT" ]
43
2019-03-08T10:16:39.000Z
2021-06-14T17:17:18.000Z
timeflux/core/node.py
HerySon/timeflux
01a5a27a3368afe8b0c1da475f84618e11ffec3b
[ "MIT" ]
18
2019-03-26T08:51:21.000Z
2021-10-14T23:10:33.000Z
"""Node base class.""" import re import logging from abc import ABC, abstractmethod from timeflux.core.io import Port
29.236641
93
0.547781
"""Node base class.""" import re import logging from abc import ABC, abstractmethod from timeflux.core.io import Port class Node(ABC): def __new__(cls, *args, **kwargs): """Create instance and initialize the logger.""" instance = super().__new__(cls) instance.logger = logging.getLogger( ...
0
3,687
23
ae8656f4c14d4106475af259c361d5ab27b3ce99
1,667
py
Python
cegid/apps/users/urls.py
vsoch/tcell
3c4a19e5c78f1a36a2fe5e0f3229d1d70ef3a2c6
[ "MIT" ]
null
null
null
cegid/apps/users/urls.py
vsoch/tcell
3c4a19e5c78f1a36a2fe5e0f3229d1d70ef3a2c6
[ "MIT" ]
9
2016-08-04T22:56:21.000Z
2016-08-17T20:55:57.000Z
cegid/apps/users/urls.py
vsoch/tcell
3c4a19e5c78f1a36a2fe5e0f3229d1d70ef3a2c6
[ "MIT" ]
1
2016-10-11T04:22:52.000Z
2016-10-11T04:22:52.000Z
from django.conf.urls import patterns, url from django.conf import settings from django.contrib import admin from .views import view_profile, edit_user, create_user, view_faculty, view_staff, edit_profile from django.contrib.auth import views as auth_views admin.autodiscover() urlpatterns = [ url(r'^people/facult...
61.740741
141
0.704859
from django.conf.urls import patterns, url from django.conf import settings from django.contrib import admin from .views import view_profile, edit_user, create_user, view_faculty, view_staff, edit_profile from django.contrib.auth import views as auth_views admin.autodiscover() urlpatterns = [ url(r'^people/facult...
0
0
0
ecc509661456f00ad41ada5efec4da261bcad594
328
py
Python
gpullall/tests/test_githelpers.py
0xcomposure/gpullall
77f93d9fb3eba838e5f885d41c84174f0980c64f
[ "MIT" ]
1
2021-04-13T13:33:23.000Z
2021-04-13T13:33:23.000Z
gpullall/tests/test_githelpers.py
0xcomposure/gpullall
77f93d9fb3eba838e5f885d41c84174f0980c64f
[ "MIT" ]
null
null
null
gpullall/tests/test_githelpers.py
0xcomposure/gpullall
77f93d9fb3eba838e5f885d41c84174f0980c64f
[ "MIT" ]
null
null
null
import os import unittest import sys sys.path.append("..") import githelpers # noqa: E402 if __name__ == "__main__": unittest.main()
19.294118
53
0.621951
import os import unittest import sys sys.path.append("..") import githelpers # noqa: E402 class TestGitHelpers(unittest.TestCase): def test_get_path(self): self.assertIn( os.path.abspath("../../"), githelpers.get_repositories("../../../")) if __name__ == "__main__": unittest...
119
19
49
f5fa1a321ab9f4569ec04c9bbb52bcf961dec01e
11,104
py
Python
videoProcess.py
kaleem94/CarND-Advanced-Lane-Lines
eaed810c947d534613e919b688377c87735dab5b
[ "MIT" ]
null
null
null
videoProcess.py
kaleem94/CarND-Advanced-Lane-Lines
eaed810c947d534613e919b688377c87735dab5b
[ "MIT" ]
null
null
null
videoProcess.py
kaleem94/CarND-Advanced-Lane-Lines
eaed810c947d534613e919b688377c87735dab5b
[ "MIT" ]
null
null
null
import cv2 import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt import glob import pickle line = None M = None Minv = None cameraMat = None distCoeffs = None dist_pickle = pickle.load( open( "camera_cal/wide_dist_pickle.p", "rb" ) ) objpoints = dist_pickle["objpoints"] imgpoints =...
40.231884
211
0.646884
import cv2 import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt import glob import pickle line = None M = None Minv = None cameraMat = None distCoeffs = None class Line: def __init__(self): # if the first frame of video has been processed self.first_frame_processed...
8,646
1,329
138
54d91d9ffe932c56641df845d5520675cc8f9b5a
500
py
Python
vis/latex_tables.py
dhpollack/mgc
ed1b8fb512f0b42cb8121a2809def65f232dc154
[ "MIT" ]
null
null
null
vis/latex_tables.py
dhpollack/mgc
ed1b8fb512f0b42cb8121a2809def65f232dc154
[ "MIT" ]
null
null
null
vis/latex_tables.py
dhpollack/mgc
ed1b8fb512f0b42cb8121a2809def65f232dc154
[ "MIT" ]
null
null
null
import os from tabulate import tabulate OUTPATH = "output/latex" a = [["Dataset Name", "# of Samples", "Total Length"], ["Balanced", "3,146", "8.74 hours"], ["Eval", "2,574", "7.15 hours"], ["Unbalanced", "224,155", "622.65 hours"], ["Unbalanced - Subset", "19,042", "52.89 hours"]] if not os.path.exists(OUTPATH): ...
35.714286
217
0.618
import os from tabulate import tabulate OUTPATH = "output/latex" a = [["Dataset Name", "# of Samples", "Total Length"], ["Balanced", "3,146", "8.74 hours"], ["Eval", "2,574", "7.15 hours"], ["Unbalanced", "224,155", "622.65 hours"], ["Unbalanced - Subset", "19,042", "52.89 hours"]] if not os.path.exists(OUTPATH): ...
0
0
0
e6c0bba16d38f75f94d0fd5e47e63b18ed184940
29,409
py
Python
modisco/hit_scoring/densityadapted_hitscoring.py
Bluedragon137/tfmodisco
d7c56b21e1bb58b07695ef3035f173b7d1a039e6
[ "MIT" ]
null
null
null
modisco/hit_scoring/densityadapted_hitscoring.py
Bluedragon137/tfmodisco
d7c56b21e1bb58b07695ef3035f173b7d1a039e6
[ "MIT" ]
null
null
null
modisco/hit_scoring/densityadapted_hitscoring.py
Bluedragon137/tfmodisco
d7c56b21e1bb58b07695ef3035f173b7d1a039e6
[ "MIT" ]
null
null
null
from __future__ import division, print_function from collections import defaultdict, OrderedDict, namedtuple import numpy as np import time import itertools from .. import core from .. import affinitymat from .. import util from .. import cluster from .. import aggregator from .. import seqlet_embedding from .. import ...
45.666149
81
0.622292
from __future__ import division, print_function from collections import defaultdict, OrderedDict, namedtuple import numpy as np import time import itertools from .. import core from .. import affinitymat from .. import util from .. import cluster from .. import aggregator from .. import seqlet_embedding from .. import ...
27,855
31
339
273c03d48184ab1f7f82a588a4e85ab8215354df
460
py
Python
Projetos Python/pythonexercicios/des113.py
Moyses-Nunes/Projetos-Python
71ae170fb0d7be6afea18608bca630b57b9f0dff
[ "MIT" ]
null
null
null
Projetos Python/pythonexercicios/des113.py
Moyses-Nunes/Projetos-Python
71ae170fb0d7be6afea18608bca630b57b9f0dff
[ "MIT" ]
null
null
null
Projetos Python/pythonexercicios/des113.py
Moyses-Nunes/Projetos-Python
71ae170fb0d7be6afea18608bca630b57b9f0dff
[ "MIT" ]
null
null
null
num = leiaInt('Digite um valor: ') print(f'Você digitou o número {num}')
21.904762
76
0.554348
def leiaInt(msg): while True: try: n = int(input(msg)) except (ValueError, TypeError): print('\033[31mERRO: Digite um número inteiro válido.\033[m') continue except KeyboardInterrupt: print('\n\033[31mERRO: O usuário interrompeu o programa.\033...
362
0
22
df9d10b687bbbe0ed587c3c1a23fb3e7ada4e76a
427
py
Python
Zarooni/gopro/src/openfromsocket.py
AV-Lab/SNAIL
c07ff9a9a8ca1e171c83d10011d037cf6844cfc7
[ "MIT" ]
1
2021-11-21T12:54:12.000Z
2021-11-21T12:54:12.000Z
Zarooni/gopro/src/openfromsocket.py
majid-khonji/SNAIL
c07ff9a9a8ca1e171c83d10011d037cf6844cfc7
[ "MIT" ]
3
2021-09-15T21:19:23.000Z
2021-12-19T20:34:12.000Z
Zarooni/gopro/src/openfromsocket.py
majid-khonji/SNAIL
c07ff9a9a8ca1e171c83d10011d037cf6844cfc7
[ "MIT" ]
1
2021-11-21T12:56:47.000Z
2021-11-21T12:56:47.000Z
#!/usr/bin/env python3 # import rospy import socket import cv2 import numpy as np import time cap = cv2.VideoCapture("udp://10.5.5.9:10000", cv2.CAP_FFMPEG) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) last_message = time.time() while True: # Get an image ret, img = cap.read() # Do something ...
18.565217
62
0.702576
#!/usr/bin/env python3 # import rospy import socket import cv2 import numpy as np import time cap = cv2.VideoCapture("udp://10.5.5.9:10000", cv2.CAP_FFMPEG) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) last_message = time.time() while True: # Get an image ret, img = cap.read() # Do something ...
0
0
0
a2135f0efcd8f453d9288597d6319a5e4b435fe5
1,219
py
Python
tf_autoaugment/transforms/rotate.py
sebastian-sz/tf-autoaugment
6807f5095df1b842a8a17265dc2361165f5d1658
[ "MIT" ]
null
null
null
tf_autoaugment/transforms/rotate.py
sebastian-sz/tf-autoaugment
6807f5095df1b842a8a17265dc2361165f5d1658
[ "MIT" ]
null
null
null
tf_autoaugment/transforms/rotate.py
sebastian-sz/tf-autoaugment
6807f5095df1b842a8a17265dc2361165f5d1658
[ "MIT" ]
null
null
null
"""Code for Rotate Transform.""" import tensorflow as tf import tensorflow_addons as tfa from tf_autoaugment.transforms.base_transform import BaseTransform class Rotate(BaseTransform): """Transform for Rotate op.""" def __call__(self, images: tf.Tensor, level: tf.Tensor) -> tf.Tensor: """Run rotate ...
35.852941
84
0.673503
"""Code for Rotate Transform.""" import tensorflow as tf import tensorflow_addons as tfa from tf_autoaugment.transforms.base_transform import BaseTransform class Rotate(BaseTransform): """Transform for Rotate op.""" def __init__(self, fill_value=128, tf_function: bool = False): super().__init__(tf_f...
327
0
54
5847f016de6efae3149713498e64bdc415dafa59
572
py
Python
recipe_recommender/tests/test_scraping_and_processing.py
lisamnash/recipe_recommender
f02ea57c36b39f4965625d90f6d6f73a4131b449
[ "BSD-3-Clause" ]
1
2019-01-07T19:56:40.000Z
2019-01-07T19:56:40.000Z
recipe_recommender/tests/test_scraping_and_processing.py
lisamnash/recipe_recommender
f02ea57c36b39f4965625d90f6d6f73a4131b449
[ "BSD-3-Clause" ]
7
2018-12-28T21:22:15.000Z
2019-01-08T22:07:26.000Z
recipe_recommender/tests/test_scraping_and_processing.py
lisamnash/recipe_recommender
f02ea57c36b39f4965625d90f6d6f73a4131b449
[ "BSD-3-Clause" ]
1
2018-12-26T23:19:59.000Z
2018-12-26T23:19:59.000Z
""" Tests for scraping and processing """ import pytest import recipe_recommender as rr @pytest.fixture() def test_bodybuilding_scrape(testing_data): """ Test that pulling single recipe from bodybuilding database works. """ data = testing_data # Write more tests here to see this data is what we ...
19.724138
71
0.70979
""" Tests for scraping and processing """ import pytest import recipe_recommender as rr @pytest.fixture() def testing_data(): data = rr.scraping_and_processing.bodybuilding.scrape_db(test=True) return data def test_bodybuilding_scrape(testing_data): """ Test that pulling single recipe from bodybuildi...
86
0
22
cc37cfc49a0a2389cc7757855f918ffec9cc417c
1,302
py
Python
recipe-search/recipe/urls.py
talpor/recipe-search-hackathon
7471f08e1067317f3bb1f35b4ebd4b3cd96e0580
[ "BSD-3-Clause" ]
null
null
null
recipe-search/recipe/urls.py
talpor/recipe-search-hackathon
7471f08e1067317f3bb1f35b4ebd4b3cd96e0580
[ "BSD-3-Clause" ]
null
null
null
recipe-search/recipe/urls.py
talpor/recipe-search-hackathon
7471f08e1067317f3bb1f35b4ebd4b3cd96e0580
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import patterns, url, include from rest_framework.routers import DefaultRouter from serializers import RecipeViewSet, IngredientViewSet, \ RecipeSearchIngTimeViewSet, RecipeRandomIngTimeViewSet router = DefaultRouter() router....
23.672727
68
0.715822
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import patterns, url, include from rest_framework.routers import DefaultRouter from serializers import RecipeViewSet, IngredientViewSet, \ RecipeSearchIngTimeViewSet, RecipeRandomIngTimeViewSet router = DefaultRouter() router....
0
0
0
c2150ce62ffd47c29665cff5b2c8493e916833e2
1,432
py
Python
pytest/speed_tests/conftest.py
ribuild/delphin_6_automation
12024381fc1042b46314c55d88b6349229ea33b7
[ "MIT" ]
2
2017-11-08T18:37:36.000Z
2018-01-09T12:10:58.000Z
pytest/speed_tests/conftest.py
ribuild/delphin_6_automation
12024381fc1042b46314c55d88b6349229ea33b7
[ "MIT" ]
111
2018-02-26T08:25:44.000Z
2021-03-31T19:17:19.000Z
pytest/speed_tests/conftest.py
thp44/delphin_6_automation
12024381fc1042b46314c55d88b6349229ea33b7
[ "MIT" ]
3
2017-11-06T10:01:25.000Z
2018-02-14T09:45:28.000Z
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import pytest import datetime import os # RiBuild Modules from delphin_6_automation.backend import simulation_worker fro...
31.130435
120
0.594274
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import pytest import datetime import os # RiBuild Modules from delphin_6_automation.backend import simulation_worker fro...
836
0
44
2550ad92d37eed2fc01a6851b66824b9b3d88803
7,728
py
Python
bookclub/bookclub/bookclub_server/accountsettingscontroller.py
bookclubapp/bookclub_server
be6cf974373eb8aac436c9b3812864dcb53cdc89
[ "MIT" ]
null
null
null
bookclub/bookclub/bookclub_server/accountsettingscontroller.py
bookclubapp/bookclub_server
be6cf974373eb8aac436c9b3812864dcb53cdc89
[ "MIT" ]
null
null
null
bookclub/bookclub/bookclub_server/accountsettingscontroller.py
bookclubapp/bookclub_server
be6cf974373eb8aac436c9b3812864dcb53cdc89
[ "MIT" ]
1
2019-07-05T12:46:18.000Z
2019-07-05T12:46:18.000Z
import hashlib from django.core.serializers.json import DjangoJSONEncoder from django.forms import model_to_dict from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.utils import json from .models import User, Match, TradeList, Suggestion, WishList, Book, Acco...
35.944186
107
0.654891
import hashlib from django.core.serializers.json import DjangoJSONEncoder from django.forms import model_to_dict from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.utils import json from .models import User, Match, TradeList, Suggestion, WishList, Book, Acco...
6,837
0
242
0401599b259c818b191c532022ed908f5a7a63b2
1,155
py
Python
__manifest__.py
danieldemedziuk/odoo12-work_schedule
67f583472926e81aaf84d90aa5cff5a38a0149ef
[ "MIT" ]
null
null
null
__manifest__.py
danieldemedziuk/odoo12-work_schedule
67f583472926e81aaf84d90aa5cff5a38a0149ef
[ "MIT" ]
1
2021-07-01T11:45:58.000Z
2021-07-07T13:40:09.000Z
__manifest__.py
danieldemedziuk/odoo12-work_schedule
67f583472926e81aaf84d90aa5cff5a38a0149ef
[ "MIT" ]
3
2020-11-05T14:06:26.000Z
2021-03-20T00:43:40.000Z
# -*- coding: utf-8 -*- { 'name': 'Work schedule', 'version': '1.0', 'author': 'Daniel Demedziuk', 'sequence': 110, 'summary': 'Projects, Employees, Schedule', 'company': 'Daniel Demedziuk', 'description': """ Work schedule of employees ================================== This module provides...
30.394737
201
0.624242
# -*- coding: utf-8 -*- { 'name': 'Work schedule', 'version': '1.0', 'author': 'Daniel Demedziuk', 'sequence': 110, 'summary': 'Projects, Employees, Schedule', 'company': 'Daniel Demedziuk', 'description': """ Work schedule of employees ================================== This module provides...
0
0
0
efd0c534c43c8dd2eba0992804b750104c674229
874
py
Python
backend/config/views/graphql.py
hovedstyret/indok-web
598e9ca0b5f3a5e776a85dec0a8694b9bcd5a159
[ "MIT" ]
3
2021-11-18T09:29:14.000Z
2022-01-13T20:12:11.000Z
backend/config/views/graphql.py
rubberdok/indok-web
598e9ca0b5f3a5e776a85dec0a8694b9bcd5a159
[ "MIT" ]
277
2022-01-17T18:16:44.000Z
2022-03-31T19:44:04.000Z
backend/config/views/graphql.py
hovedstyret/indok-web
598e9ca0b5f3a5e776a85dec0a8694b9bcd5a159
[ "MIT" ]
null
null
null
from graphene_django.views import GraphQLView from sentry_sdk.api import start_transaction
36.416667
112
0.6373
from graphene_django.views import GraphQLView from sentry_sdk.api import start_transaction class CustomGraphQLView(GraphQLView): def execute_graphql_request(self, request, data, query, variables, operation_name, show_graphiql=False): """ Enables performance tracing for GraphQL calls """ ...
0
759
23
0d357d0608fbe266eec21e0bf22de150016a09bf
838
py
Python
tests/gen_test.py
nim65s/mdmail
10c9f4c422ea5bcdf3e687eb8c500ec4906ae9f9
[ "BSD-2-Clause" ]
56
2017-11-13T23:40:55.000Z
2022-03-19T19:37:17.000Z
tests/gen_test.py
nim65s/mdmail
10c9f4c422ea5bcdf3e687eb8c500ec4906ae9f9
[ "BSD-2-Clause" ]
4
2019-07-08T10:47:20.000Z
2021-04-03T15:10:27.000Z
tests/gen_test.py
nim65s/mdmail
10c9f4c422ea5bcdf3e687eb8c500ec4906ae9f9
[ "BSD-2-Clause" ]
9
2018-02-07T20:59:40.000Z
2021-01-01T14:28:28.000Z
#!/usr/bin/env python """ A tool to generate html and txt file for a markdown file. This is mainly used to generate test cases. """ import argparse import os from io import open import mdmail if __name__ == '__main__': main()
27.032258
104
0.682578
#!/usr/bin/env python """ A tool to generate html and txt file for a markdown file. This is mainly used to generate test cases. """ import argparse import os from io import open import mdmail def main(): parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawTextHelpFormatter) par...
581
0
23
244e7eb5f0e54c2259e9480dae8cf5e1507a7e4b
12,077
py
Python
train.py
RecoHut-Stanzas/S168471
7e0ac621c36f839e1df6876ec517d0ad00672790
[ "BSD-3-Clause" ]
37
2020-06-15T02:04:37.000Z
2022-02-09T06:26:42.000Z
train.py
RecoHut-Stanzas/S168471
7e0ac621c36f839e1df6876ec517d0ad00672790
[ "BSD-3-Clause" ]
5
2020-08-06T13:16:34.000Z
2022-02-04T07:29:29.000Z
train.py
RecoHut-Stanzas/S168471
7e0ac621c36f839e1df6876ec517d0ad00672790
[ "BSD-3-Clause" ]
11
2020-09-01T23:08:51.000Z
2022-02-09T06:26:44.000Z
import argparse import time import gc import os import numpy as np import torch from torch.utils.data import DataLoader from models.models import GroupIM from utils.user_utils import TrainUserDataset, EvalUserDataset from utils.group_utils import TrainGroupDataset, EvalGroupDataset from eval.evaluate import evaluate_u...
50.112033
120
0.655212
import argparse import time import gc import os import numpy as np import torch from torch.utils.data import DataLoader from models.models import GroupIM from utils.user_utils import TrainUserDataset, EvalUserDataset from utils.group_utils import TrainGroupDataset, EvalGroupDataset from eval.evaluate import evaluate_u...
0
0
0
4400bb9e558de4f185705262b447d2c53bc2baf3
3,163
py
Python
run_test.py
2gunsu/SPL2021-FEN
a674df75da71290b8ab8ed330a453b1b2e94512c
[ "MIT" ]
3
2021-05-25T05:15:09.000Z
2021-12-30T07:04:45.000Z
run_test.py
2gunsu/SPL2021-FEN
a674df75da71290b8ab8ed330a453b1b2e94512c
[ "MIT" ]
null
null
null
run_test.py
2gunsu/SPL2021-FEN
a674df75da71290b8ab8ed330a453b1b2e94512c
[ "MIT" ]
null
null
null
import os import yaml import warnings from argparse import ArgumentParser from typing import Any, Union, Tuple from detectron2.config import get_cfg, CfgNode from detectron2.data import build_detection_test_loader from detectron2.data.datasets import register_coco_instances from detectron2.evaluation import COCOEvalu...
41.077922
138
0.668037
import os import yaml import warnings from argparse import ArgumentParser from typing import Any, Union, Tuple from detectron2.config import get_cfg, CfgNode from detectron2.data import build_detection_test_loader from detectron2.data.datasets import register_coco_instances from detectron2.evaluation import COCOEvalu...
0
0
0
8314e2fc53745a40853791c109169353cd164e28
290
py
Python
projects/code_combat/7_Sarven_Desert/329-Wandering_Souls/wandering_souls.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
projects/code_combat/7_Sarven_Desert/329-Wandering_Souls/wandering_souls.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
projects/code_combat/7_Sarven_Desert/329-Wandering_Souls/wandering_souls.py
only-romano/junkyard
b60a25b2643f429cdafee438d20f9966178d6f36
[ "MIT" ]
null
null
null
while True: enemies = hero.findEnemies() for enemy in enemies: while enemy.health > 0: hero.attack(enemy) items = hero.findItems() for item in items: while hero.distanceTo(item) > 2: hero.moveXY(item.pos.x, item.pos.y)
26.363636
48
0.558621
while True: enemies = hero.findEnemies() for enemy in enemies: while enemy.health > 0: hero.attack(enemy) items = hero.findItems() for item in items: while hero.distanceTo(item) > 2: hero.moveXY(item.pos.x, item.pos.y)
0
0
0
5f7bb77c03d84cef4b75a27947110c8f7f0b244d
806
py
Python
2017/day01/day01.py
icemanblues/advent-of-code
eac937ac2762d1c8b8cec358a13af352e339446c
[ "Apache-2.0" ]
null
null
null
2017/day01/day01.py
icemanblues/advent-of-code
eac937ac2762d1c8b8cec358a13af352e339446c
[ "Apache-2.0" ]
2
2020-04-06T18:56:13.000Z
2022-03-30T20:32:50.000Z
2017/day01/day01.py
icemanblues/advent-of-code
eac937ac2762d1c8b8cec358a13af352e339446c
[ "Apache-2.0" ]
null
null
null
from typing import List day_num = "01" day_title = "Inverse Captcha" if __name__ == '__main__': main()
17.911111
56
0.533499
from typing import List day_num = "01" day_title = "Inverse Captcha" def read_input(filename: str) -> List[str]: with open(filename) as f: content = [x.strip('\n') for x in f.readlines()] return content def part1(): line = read_input("input.txt")[0] curr = line[len(line)-1] count = 0 ...
600
0
92
c8c7a5fce1bb23b8ac543706dc01171394f29335
3,686
py
Python
src/py_spm/_meeg.py
evanr70/py_spm
81055bb0df098d0210587e55d93731e2a285afd5
[ "MIT" ]
null
null
null
src/py_spm/_meeg.py
evanr70/py_spm
81055bb0df098d0210587e55d93731e2a285afd5
[ "MIT" ]
null
null
null
src/py_spm/_meeg.py
evanr70/py_spm
81055bb0df098d0210587e55d93731e2a285afd5
[ "MIT" ]
null
null
null
from dataclasses import dataclass import numpy as np from scipy.io import loadmat from ._channel import Channel, chan_types from ._data import Data from ._trial import Trial from .utils import check_lowered_string @dataclass
33.207207
86
0.655724
from dataclasses import dataclass import numpy as np from scipy.io import loadmat from ._channel import Channel, chan_types from ._data import Data from ._trial import Trial from .utils import check_lowered_string class MEEG: def __init__(self, filename): D = loadmat(filename, simplify_cells=True)["D"] ...
3,049
362
45
242925589fb185a5ed756cf0b989e7439c3fdd36
1,777
py
Python
mriseqplot/shapes.py
Sibgatulin/MRISeqPlot
0ca93ac5ab6c4aba6e8f56fd12d5df416df2939c
[ "MIT" ]
null
null
null
mriseqplot/shapes.py
Sibgatulin/MRISeqPlot
0ca93ac5ab6c4aba6e8f56fd12d5df416df2939c
[ "MIT" ]
2
2020-06-23T15:07:06.000Z
2020-06-23T15:08:39.000Z
mriseqplot/shapes.py
Sibgatulin/MRISeqPlot
0ca93ac5ab6c4aba6e8f56fd12d5df416df2939c
[ "MIT" ]
null
null
null
import numpy as np def trapezoid(t, t_start, t_flat_out, t_ramp_down): """ A symmetrical trapezoid of unit height Parameters ---------- t : array_like, 1D Vector of time values, specifying the entire domain of the sequence t_start : float Moment in time when the gradient is switc...
34.843137
86
0.631964
import numpy as np def rf_sinc(t, t_start, duration, side_lobes): y = np.zeros_like(t) idx_rf = (t > t_start) & (t < t_start + duration) t_rf = t[idx_rf] - t_start - duration / 2 y[idx_rf] = np.sin(t_rf / duration * 2 * np.pi * (side_lobes + 1)) / t_rf y[idx_rf] = y[idx_rf] / np.max(y[idx_rf]) ...
578
0
46
7affea990ac37fd96e99bc875bf3e170057bccc1
6,733
py
Python
template.py
knightReigh/SinaSpider
dca7cd5e66c32866e2e697603dbfb2ecbb8a62d0
[ "MIT" ]
4
2018-03-02T11:11:53.000Z
2019-01-20T00:05:58.000Z
template.py
knightReigh/SinaSpider
dca7cd5e66c32866e2e697603dbfb2ecbb8a62d0
[ "MIT" ]
null
null
null
template.py
knightReigh/SinaSpider
dca7cd5e66c32866e2e697603dbfb2ecbb8a62d0
[ "MIT" ]
null
null
null
def tempalte_PinkElegance(timecards, ignore_retweet=True): """ A builder for template body: PinkElegance Abandoned for incomplet js generation Source: https://codepen.io/mo7hamed/pen/dRoMwo """ # build body body_string = "" for i in range(0, len(timecards.content)): ...
61.209091
157
0.477499
def tempalte_PinkElegance(timecards, ignore_retweet=True): """ A builder for template body: PinkElegance Abandoned for incomplet js generation Source: https://codepen.io/mo7hamed/pen/dRoMwo """ # build body body_string = "" for i in range(0, len(timecards.content)): ...
0
0
0
581abe937af4b9203e2451f8eb92730dc67f08f0
347
py
Python
setup.py
thiagodk/python-event-emitter
3767f852a8151a918a44572af679dfc00d3bff5c
[ "MIT" ]
null
null
null
setup.py
thiagodk/python-event-emitter
3767f852a8151a918a44572af679dfc00d3bff5c
[ "MIT" ]
null
null
null
setup.py
thiagodk/python-event-emitter
3767f852a8151a918a44572af679dfc00d3bff5c
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name="event-emitter-js", version="0.1.2", description="JavaScript-like EventEmitter class for Python 3", author="Thiago Costa", author_email="admin@rootbsd.info", url="https://github.com/thiagodk/python-event-emitter", package_dir={"": "src"}, pa...
24.785714
66
0.680115
from distutils.core import setup setup( name="event-emitter-js", version="0.1.2", description="JavaScript-like EventEmitter class for Python 3", author="Thiago Costa", author_email="admin@rootbsd.info", url="https://github.com/thiagodk/python-event-emitter", package_dir={"": "src"}, pa...
0
0
0
49dddc3c965ea40abf0f046e4452d7ddf809ce42
8,931
py
Python
apps/core/files/base.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
null
null
null
apps/core/files/base.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
null
null
null
apps/core/files/base.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance ...
40.049327
115
0.624006
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance ...
374
8,124
69
3fb636122c6c24f5d484d3cabf472d868ae882bf
2,562
py
Python
make_alignment_mapper.py
leejz/scripts
ab23af0bac5a5051df83fb9f59f23e7c413fd81a
[ "MIT" ]
1
2021-05-24T06:15:16.000Z
2021-05-24T06:15:16.000Z
make_alignment_mapper.py
leejz/misc-scripts
ab23af0bac5a5051df83fb9f59f23e7c413fd81a
[ "MIT" ]
1
2015-09-08T16:40:49.000Z
2015-09-08T16:40:49.000Z
make_alignment_mapper.py
leejz/misc-scripts
ab23af0bac5a5051df83fb9f59f23e7c413fd81a
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ -------------------------------------------------------------------------------- Created: Jackson Lee 2012 This script reads in the ecoli reference alignment in a particular format and generates a mapping file which assigns a sequential count of each base pair to the current alignment posi...
32.846154
87
0.556987
#!/usr/bin/env python """ -------------------------------------------------------------------------------- Created: Jackson Lee 2012 This script reads in the ecoli reference alignment in a particular format and generates a mapping file which assigns a sequential count of each base pair to the current alignment posi...
0
0
0
08b20c4bcadfbb49f301222e13604c78dd4fc6ca
290
py
Python
jaxns/prior_transforms/__init__.py
fehiepsi/jaxns
9cf9366f11ace564e21f938edf4d090fb5de137d
[ "Apache-2.0" ]
null
null
null
jaxns/prior_transforms/__init__.py
fehiepsi/jaxns
9cf9366f11ace564e21f938edf4d090fb5de137d
[ "Apache-2.0" ]
null
null
null
jaxns/prior_transforms/__init__.py
fehiepsi/jaxns
9cf9366f11ace564e21f938edf4d090fb5de137d
[ "Apache-2.0" ]
null
null
null
from jaxns.prior_transforms.common import * from jaxns.prior_transforms.deterministic import * from jaxns.prior_transforms.identifiable import * from jaxns.prior_transforms.levy import * from jaxns.prior_transforms.mixture import * from jaxns.prior_transforms.prior_chain import PriorChain
41.428571
57
0.858621
from jaxns.prior_transforms.common import * from jaxns.prior_transforms.deterministic import * from jaxns.prior_transforms.identifiable import * from jaxns.prior_transforms.levy import * from jaxns.prior_transforms.mixture import * from jaxns.prior_transforms.prior_chain import PriorChain
0
0
0
551165f70f57801d8c76d23d9c5de24e83f6ba2f
2,004
py
Python
adat/2010/scrape.py
korenmiklos/106
9925a2bda18915eb43d7bdd2b54d4d7aa113bc66
[ "MIT" ]
1
2018-04-07T20:44:45.000Z
2018-04-07T20:44:45.000Z
adat/2010/scrape.py
korenmiklos/106
9925a2bda18915eb43d7bdd2b54d4d7aa113bc66
[ "MIT" ]
null
null
null
adat/2010/scrape.py
korenmiklos/106
9925a2bda18915eb43d7bdd2b54d4d7aa113bc66
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests import re import csv OEVK_URL = 'http://www.valasztas.hu/dyn/pv10vt/vertaj-static/pv10vt/v11.html' TELEPULES_URL = 'http://www.valasztas.hu/dyn/pv10vt/vertaj-static/pv10vt/maz/{}/oevk/{}/v12.html' SZAVAZOKOR_URL = 'http://www.valasztas.hu/dyn/pv10vt/vertaj-...
37.811321
116
0.708084
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests import re import csv OEVK_URL = 'http://www.valasztas.hu/dyn/pv10vt/vertaj-static/pv10vt/v11.html' TELEPULES_URL = 'http://www.valasztas.hu/dyn/pv10vt/vertaj-static/pv10vt/maz/{}/oevk/{}/v12.html' SZAVAZOKOR_URL = 'http://www.valasztas.hu/dyn/pv10vt/vertaj-...
349
0
69
1e7d873b2c2edc1720e0fa2326aef58203fab3fc
6,280
py
Python
tests/types/test_threshold.py
Chuseuiti/cryptoconditions
9cee492d4a792205b29824399224861841a785b0
[ "MIT" ]
null
null
null
tests/types/test_threshold.py
Chuseuiti/cryptoconditions
9cee492d4a792205b29824399224861841a785b0
[ "MIT" ]
null
null
null
tests/types/test_threshold.py
Chuseuiti/cryptoconditions
9cee492d4a792205b29824399224861841a785b0
[ "MIT" ]
null
null
null
from pytest import mark, raises
47.938931
75
0.721019
from pytest import mark, raises class TestThresholdSha256: @mark.parametrize('threshold', (0, 0.1, 'a')) def test_init_with_invalid_threshold(self, threshold): from cryptoconditions.types.threshold import ThresholdSha256 with raises(ValueError) as exc: ThresholdSha256(threshold=th...
5,818
406
23
6170a11e553d643013561b1917d8cbf1a3dc6612
1,679
py
Python
pyjwt_key_fetcher/http_client.py
danmichaelo/pyjwt-key-fetcher
627faafa6c5f36fbab3ccf9fb77fcbb1917d4109
[ "BSD-3-Clause" ]
3
2021-05-24T09:47:47.000Z
2021-06-21T08:07:47.000Z
pyjwt_key_fetcher/http_client.py
danmichaelo/pyjwt-key-fetcher
627faafa6c5f36fbab3ccf9fb77fcbb1917d4109
[ "BSD-3-Clause" ]
1
2021-06-21T07:51:34.000Z
2021-06-21T08:23:31.000Z
pyjwt_key_fetcher/http_client.py
danmichaelo/pyjwt-key-fetcher
627faafa6c5f36fbab3ccf9fb77fcbb1917d4109
[ "BSD-3-Clause" ]
2
2021-06-19T18:41:47.000Z
2021-09-02T16:19:32.000Z
import abc from json import JSONDecodeError from typing import Any, Dict import aiohttp from pyjwt_key_fetcher.errors import JWTHTTPFetchError class HTTPClient(abc.ABC): """ Abstract base class for HTTP Clients used to fetch the openid-configuration and JWKs in JSON format. """ @abc.abstractmet...
29.982143
85
0.628946
import abc from json import JSONDecodeError from typing import Any, Dict import aiohttp from pyjwt_key_fetcher.errors import JWTHTTPFetchError class HTTPClient(abc.ABC): """ Abstract base class for HTTP Clients used to fetch the openid-configuration and JWKs in JSON format. """ @abc.abstractmet...
45
0
27
f3c22e64e7835364d57dd7dacad8aa4de8cdaf49
458
py
Python
src/lewd_cog.py
jupytergirl/Lewdbot
1044fd08424bd6367e7a8b1a2ed33ed2b9330c1b
[ "MIT" ]
2
2021-08-12T02:03:23.000Z
2021-08-12T02:19:44.000Z
src/lewd_cog.py
jupytergirl/Lewdbot
1044fd08424bd6367e7a8b1a2ed33ed2b9330c1b
[ "MIT" ]
null
null
null
src/lewd_cog.py
jupytergirl/Lewdbot
1044fd08424bd6367e7a8b1a2ed33ed2b9330c1b
[ "MIT" ]
null
null
null
from buttplug.client import ButtplugClient import discord from discord.ext import commands import lewd_manager as lm
25.444444
57
0.676856
from buttplug.client import ButtplugClient import discord from discord.ext import commands import lewd_manager as lm class LewdCog(commands.Cog): def __init__(self, bot): self.bot = bot self.buttplug_client = ButtplugClient("Lewd Bot") @commands.command() async def ping(self, ctx: command...
175
143
23
61b7ad7324ad24b52a4494738a06ea629b0d5dc9
2,052
py
Python
example.py
neural-dialogue-metrics/rouge
0cecc508dfef0415c2611b21ed32629481a0b3f4
[ "MIT" ]
18
2019-03-18T15:35:18.000Z
2022-03-23T04:30:12.000Z
example.py
ibrahim85/rouge
0cecc508dfef0415c2611b21ed32629481a0b3f4
[ "MIT" ]
1
2019-04-15T07:57:45.000Z
2019-04-15T07:57:45.000Z
example.py
ibrahim85/rouge
0cecc508dfef0415c2611b21ed32629481a0b3f4
[ "MIT" ]
6
2019-04-14T21:57:09.000Z
2021-03-06T18:05:02.000Z
#!/usr/bin/env python3 """Examples.""" from rouge import rouge_n_sentence_level from rouge import rouge_l_sentence_level from rouge import rouge_n_summary_level from rouge import rouge_l_summary_level from rouge import rouge_w_sentence_level from rouge import rouge_w_summary_level if __name__ == '__main__': # The ...
38
85
0.714425
#!/usr/bin/env python3 """Examples.""" from rouge import rouge_n_sentence_level from rouge import rouge_l_sentence_level from rouge import rouge_n_summary_level from rouge import rouge_l_summary_level from rouge import rouge_w_sentence_level from rouge import rouge_w_summary_level if __name__ == '__main__': # The ...
0
0
0
73c1352f66fe4d329735eed601197bbae418e7bb
8,123
py
Python
scripts/sisc/paper_plot_thread_scaling_7_pt_const_coeff.py
tareqmalas/girih
0c126788937d189147be47115703b752235e585c
[ "BSD-3-Clause" ]
7
2015-07-14T08:29:14.000Z
2021-07-30T14:53:13.000Z
scripts/sisc/paper_plot_thread_scaling_7_pt_const_coeff.py
tareqmalas/girih
0c126788937d189147be47115703b752235e585c
[ "BSD-3-Clause" ]
null
null
null
scripts/sisc/paper_plot_thread_scaling_7_pt_const_coeff.py
tareqmalas/girih
0c126788937d189147be47115703b752235e585c
[ "BSD-3-Clause" ]
3
2016-08-30T01:25:40.000Z
2017-06-22T05:50:05.000Z
#!/usr/bin/env python if __name__ == "__main__": main()
31.854902
231
0.538102
#!/usr/bin/env python def main(): import sys raw_data = load_csv(sys.argv[1]) k_l = set() for k in raw_data: k_l.add(get_stencil_num(k)) k_l = list(k_l) # for ts in ['Naive', 'Dynamic-Intra-Diamond'] for k in k_l: for is_dp in [1]: for t in [0, 1]: ...
7,948
0
104
a8f155a92d85688ba2dfde64076b6a238ae4f072
4,646
py
Python
mbp99/man-meet-woman.py
wang0618/ascii-art
7ce6f152541716034bf0a22d341a898b17e2865f
[ "MIT" ]
1
2021-08-29T09:52:06.000Z
2021-08-29T09:52:06.000Z
mbp99/man-meet-woman.py
wang0618/ascii-art
7ce6f152541716034bf0a22d341a898b17e2865f
[ "MIT" ]
null
null
null
mbp99/man-meet-woman.py
wang0618/ascii-art
7ce6f152541716034bf0a22d341a898b17e2865f
[ "MIT" ]
null
null
null
# Man meets Woman --mpb99 # https://web.archive.org/web/20000529140001/http://www.geocities.com/Tokyo/Market/4878/animman.htm duration = 350 name = "Man meets Woman" a = "\n" frames = [ " "+a+ " "+a+ " (5)"+a+ " "+a+ " mpb99 "+a, " "+a+ " "+a+ " (4)"+a+ " "+a+ " ...
13.951952
99
0.174774
# Man meets Woman --mpb99 # https://web.archive.org/web/20000529140001/http://www.geocities.com/Tokyo/Market/4878/animman.htm duration = 350 name = "Man meets Woman" a = "\n" frames = [ " "+a+ " "+a+ " (5)"+a+ " "+a+ " mpb99 "+a, " "+a+ " "+a+ " (4)"+a+ " "+a+ " ...
0
0
0
b4a7e404253c8083fa334300d6e317a0aa8193a2
2,511
py
Python
examples/component.py
YiuRULE/nats.py
3a78ba4c385e2069daf5ff560aadc30968af1ccd
[ "Apache-2.0" ]
184
2016-02-04T13:51:52.000Z
2019-05-10T02:36:48.000Z
examples/component.py
YiuRULE/nats.py
3a78ba4c385e2069daf5ff560aadc30968af1ccd
[ "Apache-2.0" ]
48
2016-01-31T11:45:05.000Z
2019-05-05T22:00:07.000Z
examples/component.py
YiuRULE/nats.py
3a78ba4c385e2069daf5ff560aadc30968af1ccd
[ "Apache-2.0" ]
35
2016-01-04T23:03:43.000Z
2019-04-05T17:56:30.000Z
import asyncio import time import os import signal import nats if __name__ == '__main__': try: asyncio.run(main()) except: pass
25.363636
91
0.562724
import asyncio import time import os import signal import nats class Component: def __init__(self): self._nc = None self._done = asyncio.Future() async def connect(self, *args, **kwargs): self._nc = await nats.connect(*args, **kwargs) async def run_forever(self): await se...
2,155
-5
207
dadda3883a72630c7414a7827f85e4bab08a89e0
11,096
py
Python
gcloud/tests/taskflow3/models/taskflow/test_is_manual_intervention_required.py
DomineCore/bk-sops
1461d7d80d979778cf9dafb62819c3234387fabc
[ "Apache-2.0" ]
881
2019-03-25T02:45:42.000Z
2022-03-30T09:10:49.000Z
gcloud/tests/taskflow3/models/taskflow/test_is_manual_intervention_required.py
DomineCore/bk-sops
1461d7d80d979778cf9dafb62819c3234387fabc
[ "Apache-2.0" ]
3,303
2019-03-25T04:18:03.000Z
2022-03-31T11:52:03.000Z
gcloud/tests/taskflow3/models/taskflow/test_is_manual_intervention_required.py
DomineCore/bk-sops
1461d7d80d979778cf9dafb62819c3234387fabc
[ "Apache-2.0" ]
395
2019-03-25T02:53:36.000Z
2022-03-31T08:37:28.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
40.794118
120
0.523342
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
9,683
443
23
b18bc123d4ddc09fe79be6fe8745b752b8c62111
341
py
Python
example1/data/analyse.py
eocarragain/bagit-ro
f5fca3abad60c86b3c4f95948b5d64c3bc8e51c6
[ "BSD-2-Clause" ]
18
2016-03-01T14:57:37.000Z
2020-06-07T08:01:57.000Z
example1/data/analyse.py
eocarragain/bagit-ro
f5fca3abad60c86b3c4f95948b5d64c3bc8e51c6
[ "BSD-2-Clause" ]
2
2016-04-22T09:45:24.000Z
2017-04-21T08:43:55.000Z
example1/data/analyse.py
ResearchObject/bagit-ro-ex1
7f6daf3eaa3350e6b448ef051654ace56b962432
[ "BSD-2-Clause" ]
7
2016-05-09T23:00:12.000Z
2020-06-07T08:01:59.000Z
#!/usr/bin/env python import csv,sys numbers = csv.reader(open(sys.argv[1])) drinkers = [] for row in numbers: if row[0] == "Name": continue # header row.. right? name = row[0] cups = sum(map(int, row[1:])) drinkers.append([cups, name]) drinkers.sort() drinkers.reverse() for (cups, name) in drinkers: ...
21.3125
55
0.639296
#!/usr/bin/env python import csv,sys numbers = csv.reader(open(sys.argv[1])) drinkers = [] for row in numbers: if row[0] == "Name": continue # header row.. right? name = row[0] cups = sum(map(int, row[1:])) drinkers.append([cups, name]) drinkers.sort() drinkers.reverse() for (cups, name) in drinkers: ...
0
0
0
430cc71029ad99febeeaf34c105278f118d09773
4,596
py
Python
tests/test_feature_extractor.py
sassy/budoux
e2a3698b529b1d748d0c4268b7628fb6210c42fc
[ "Apache-2.0" ]
null
null
null
tests/test_feature_extractor.py
sassy/budoux
e2a3698b529b1d748d0c4268b7628fb6210c42fc
[ "Apache-2.0" ]
null
null
null
tests/test_feature_extractor.py
sassy/budoux
e2a3698b529b1d748d0c4268b7628fb6210c42fc
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
29.461538
79
0.6151
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
3,513
25
148
39160b61fde98578e8fd5227bd652487216405b5
89,488
py
Python
CGATReport/Plugins/Plotter.py
AndreasHeger/CGATReport
681e198cd13ef533f1c496645a1754b2e0829232
[ "MIT" ]
9
2015-02-14T16:53:58.000Z
2022-01-03T20:22:42.000Z
CGATReport/Plugins/Plotter.py
AndreasHeger/CGATReport
681e198cd13ef533f1c496645a1754b2e0829232
[ "MIT" ]
26
2015-01-29T15:39:02.000Z
2018-02-14T09:04:21.000Z
CGATReport/Plugins/Plotter.py
AndreasHeger/CGATReport
681e198cd13ef533f1c496645a1754b2e0829232
[ "MIT" ]
4
2015-11-25T17:11:11.000Z
2022-01-03T20:22:45.000Z
"""Mixin classes for Renderers that plot. """ from __future__ import unicode_literals import os import re import math import itertools import datetime import pandas from CGATReport.ResultBlock import ResultBlock, ResultBlocks from CGATReport.Plugins.Renderer import Renderer, NumpyMatrix, TableMatrix from CGATReport....
32.120603
88
0.530663
"""Mixin classes for Renderers that plot. """ from __future__ import unicode_literals import os import re import math import itertools import datetime import pandas from CGATReport.ResultBlock import ResultBlock, ResultBlocks from CGATReport.Plugins.Renderer import Renderer, NumpyMatrix, TableMatrix from CGATReport....
36,708
0
1,331
f41d2d839f67d0ab2bd7e5f804f893ad192a9523
13,544
py
Python
numba/cfg.py
teoliphant/numba
a2a05737b306853c86c61ef6620c2cc43cb28c18
[ "BSD-2-Clause" ]
3
2015-08-28T21:13:58.000Z
2022-01-21T17:02:14.000Z
numba/cfg.py
teoliphant/numba
a2a05737b306853c86c61ef6620c2cc43cb28c18
[ "BSD-2-Clause" ]
null
null
null
numba/cfg.py
teoliphant/numba
a2a05737b306853c86c61ef6620c2cc43cb28c18
[ "BSD-2-Clause" ]
null
null
null
#! /usr/bin/env python # ______________________________________________________________________ '''cfg Defines the ControlFlowGraph class, which is used by the Numba translator to perform accurate phi node generation. When used as the main module, displays the control flow graph for arguments of the form <module.modu...
38.477273
79
0.589929
#! /usr/bin/env python # ______________________________________________________________________ '''cfg Defines the ControlFlowGraph class, which is used by the Numba translator to perform accurate phi node generation. When used as the main module, displays the control flow graph for arguments of the form <module.modu...
5,023
7,561
46
923ab395a5c0601130854e6eccfcfcd208cb917c
1,814
py
Python
local/unblind.py
pscott/stardrop
738c95f633bf79a53e99c4ba2c244c52c87b49a1
[ "Apache-2.0" ]
7
2021-07-30T04:19:46.000Z
2022-02-07T16:12:54.000Z
local/unblind.py
pscott/stardrop
738c95f633bf79a53e99c4ba2c244c52c87b49a1
[ "Apache-2.0" ]
9
2021-07-24T16:34:21.000Z
2021-07-29T11:01:26.000Z
local/unblind.py
pscott/stardrop
738c95f633bf79a53e99c4ba2c244c52c87b49a1
[ "Apache-2.0" ]
2
2021-11-13T14:49:43.000Z
2022-03-06T11:48:50.000Z
from starkware.crypto.signature.signature import ( pedersen_hash, private_to_stark_key, private_key_to_ec_point_on_stark_curve, get_random_private_key, verify, inv_mod_curve_size, EC_GEN, ALPHA, FIELD_PRIME, EC_ORDER, get_y_coordinate) from starkware.crypto.signature.math_utils import ( ECPoint, div_mod, ec_ad...
50.388889
188
0.676406
from starkware.crypto.signature.signature import ( pedersen_hash, private_to_stark_key, private_key_to_ec_point_on_stark_curve, get_random_private_key, verify, inv_mod_curve_size, EC_GEN, ALPHA, FIELD_PRIME, EC_ORDER, get_y_coordinate) from starkware.crypto.signature.math_utils import ( ECPoint, div_mod, ec_ad...
1,420
0
23
da48c7f7496da7a3d15867e8be8af33d4faf7561
1,636
py
Python
tests/test_redict.py
julianirwin/redict
d75bf3c03b481cb41211898f438fdb693e199155
[ "MIT" ]
null
null
null
tests/test_redict.py
julianirwin/redict
d75bf3c03b481cb41211898f438fdb693e199155
[ "MIT" ]
null
null
null
tests/test_redict.py
julianirwin/redict
d75bf3c03b481cb41211898f438fdb693e199155
[ "MIT" ]
null
null
null
from nose.tools import assert_equal, assert_is_none from redict import ReDict, update_with_redict
32.078431
67
0.600856
from nose.tools import assert_equal, assert_is_none from redict import ReDict, update_with_redict class TestRedict: @classmethod def setup(cls): d = {'.*foo.*': 1, '.*bar.*': 2, '.*baz.*': 3} cls.rd = ReDict(d) def test_get_no_match(self): assert_is_none(self.rd.re_get('asdf_biz_a...
1,187
304
46
83ca1dfbb90537bc2bfe3983b8e555fa672c0f0a
548
py
Python
tests/device/test_read_measured_value.py
Sensirion/python-shdlc-sfc5xxx
f9bd288a996ad969ee5bbb7f52b6e8f00fdf47e5
[ "BSD-3-Clause" ]
null
null
null
tests/device/test_read_measured_value.py
Sensirion/python-shdlc-sfc5xxx
f9bd288a996ad969ee5bbb7f52b6e8f00fdf47e5
[ "BSD-3-Clause" ]
null
null
null
tests/device/test_read_measured_value.py
Sensirion/python-shdlc-sfc5xxx
f9bd288a996ad969ee5bbb7f52b6e8f00fdf47e5
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # (c) Copyright 2020 Sensirion AG, Switzerland from __future__ import absolute_import, division, print_function from sensirion_shdlc_sfc5xxx import Sfc5xxxScaling import pytest @pytest.mark.needs_device @pytest.mark.parametrize("scaling", [ (Sfc5xxxScaling.NORMALIZED), (Sfc5xxxScaling...
26.095238
64
0.739051
# -*- coding: utf-8 -*- # (c) Copyright 2020 Sensirion AG, Switzerland from __future__ import absolute_import, division, print_function from sensirion_shdlc_sfc5xxx import Sfc5xxxScaling import pytest @pytest.mark.needs_device @pytest.mark.parametrize("scaling", [ (Sfc5xxxScaling.NORMALIZED), (Sfc5xxxScaling...
0
0
0
3bd27665cdf5971e208ac1c0357146113ac4758c
3,376
py
Python
bot/admin_handlers.py
svirepovden/tg_support_bot
6c3d163514722ca28ec20e17d8aea4deccba51fb
[ "BSD-3-Clause" ]
null
null
null
bot/admin_handlers.py
svirepovden/tg_support_bot
6c3d163514722ca28ec20e17d8aea4deccba51fb
[ "BSD-3-Clause" ]
null
null
null
bot/admin_handlers.py
svirepovden/tg_support_bot
6c3d163514722ca28ec20e17d8aea4deccba51fb
[ "BSD-3-Clause" ]
null
null
null
from .actions import is_admin, get_messages, save_message, change_chat_status from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, CallbackContext, ConversationHandler) # TODO get questions in realtime while answering chat_id = None # used for storing to what c...
37.511111
97
0.651066
from .actions import is_admin, get_messages, save_message, change_chat_status from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, CallbackContext, ConversationHandler) def admin(update, context: CallbackContext): if is_admin(update.message): context.bot.se...
2,260
0
161
7e6a5b3702a2080dcb8f11f87a82a64d967ae80f
2,922
py
Python
tests/unit/test_protocol.py
NicolasEhrhardt/python-driver
ead86ea5e01b94d09c9022a2f01348bd147f8af0
[ "Apache-2.0" ]
null
null
null
tests/unit/test_protocol.py
NicolasEhrhardt/python-driver
ead86ea5e01b94d09c9022a2f01348bd147f8af0
[ "Apache-2.0" ]
null
null
null
tests/unit/test_protocol.py
NicolasEhrhardt/python-driver
ead86ea5e01b94d09c9022a2f01348bd147f8af0
[ "Apache-2.0" ]
null
null
null
try: import unittest2 as unittest except ImportError: import unittest # noqa from mock import Mock from cassandra import ProtocolVersion from cassandra.protocol import PrepareMessage, QueryMessage, ExecuteMessage
31.76087
114
0.592402
try: import unittest2 as unittest except ImportError: import unittest # noqa from mock import Mock from cassandra import ProtocolVersion from cassandra.protocol import PrepareMessage, QueryMessage, ExecuteMessage class MessageTest(unittest.TestCase): def test_prepare_message(self): """ T...
571
2,105
23
2ce6dab9da58e48ce193bc42999fa7752904e8ff
448,678
py
Python
tests/functional/basic/db/test_26.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/functional/basic/db/test_26.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/functional/basic/db/test_26.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: functional.basic.db.26 # title: Empty DB - RDB$SECURITY_CLASSES # decription: Check for correct content of RDB$SECURITY_CLASSES in empty database. # tracker_id: # min_versions: ['2.5.7'] # versions: 3.0, 4.0 # qmid: functional.basic.db.db_26 import pytest from fi...
56.544171
288
0.292785
#coding:utf-8 # # id: functional.basic.db.26 # title: Empty DB - RDB$SECURITY_CLASSES # decription: Check for correct content of RDB$SECURITY_CLASSES in empty database. # tracker_id: # min_versions: ['2.5.7'] # versions: 3.0, 4.0 # qmid: functional.basic.db.db_26 import pytest from fi...
264
0
44
a1068525133ef72aa06682794691f21e5c9d6339
394
py
Python
lean_bundle/h5_backend/datatypes.py
d-schiffner/lean-bundle
1d83f2f5b84ba9480a5a07fe45b7e5b6c48e0dca
[ "MIT" ]
null
null
null
lean_bundle/h5_backend/datatypes.py
d-schiffner/lean-bundle
1d83f2f5b84ba9480a5a07fe45b7e5b6c48e0dca
[ "MIT" ]
null
null
null
lean_bundle/h5_backend/datatypes.py
d-schiffner/lean-bundle
1d83f2f5b84ba9480a5a07fe45b7e5b6c48e0dca
[ "MIT" ]
null
null
null
import h5py import numpy as np from ..utils.datatypes import * REF_DT = h5py.special_dtype(ref=h5py.Reference) KEY_VALUE_DT = np.dtype([('key', h5py.special_dtype(vlen=str)), ('value', h5py.special_dtype(vlen=str))]) #special type for actor object types USER_TYPE_DT = h5py.special_dtype(enum=('i', ACTOR_TYPE_MAP)) IN...
35.818182
105
0.769036
import h5py import numpy as np from ..utils.datatypes import * REF_DT = h5py.special_dtype(ref=h5py.Reference) KEY_VALUE_DT = np.dtype([('key', h5py.special_dtype(vlen=str)), ('value', h5py.special_dtype(vlen=str))]) #special type for actor object types USER_TYPE_DT = h5py.special_dtype(enum=('i', ACTOR_TYPE_MAP)) IN...
0
0
0
391a2bc3c09ffeb77290ec40e2ea8ac7ffb27dff
574
py
Python
fgt_transposer/write.py
MoAl78741/FortiGate-Config-Merger
9e5b4829e2deae24c62e5b12902ec0120fe3d557
[ "MIT" ]
null
null
null
fgt_transposer/write.py
MoAl78741/FortiGate-Config-Merger
9e5b4829e2deae24c62e5b12902ec0120fe3d557
[ "MIT" ]
null
null
null
fgt_transposer/write.py
MoAl78741/FortiGate-Config-Merger
9e5b4829e2deae24c62e5b12902ec0120fe3d557
[ "MIT" ]
null
null
null
from fgt_transposer.exceptions import BackupException from os import path import logging log_msg = logging.getLogger(f"priLogger.{__name__}")
30.210526
81
0.689895
from fgt_transposer.exceptions import BackupException from os import path import logging log_msg = logging.getLogger(f"priLogger.{__name__}") def write_config(newfile_name, files): with open(newfile_name, "w") as nn: newfile = files lst_of_keys = newfile.keys() for i in lst_of_keys: ...
407
0
23
02719cc7b780d80317e269a27b4ec57c792c3aa5
362
py
Python
mopidy/m3u/backend.py
stekern/mopidy
94509cf70f2bd35ebb13e746dde135bfbe35ce0e
[ "Apache-2.0" ]
2
2019-02-13T15:16:55.000Z
2019-02-18T08:47:29.000Z
mopidy/m3u/backend.py
stekern/mopidy
94509cf70f2bd35ebb13e746dde135bfbe35ce0e
[ "Apache-2.0" ]
40
2019-02-13T09:33:00.000Z
2019-02-19T13:21:12.000Z
mopidy/m3u/backend.py
stekern/mopidy
94509cf70f2bd35ebb13e746dde135bfbe35ce0e
[ "Apache-2.0" ]
1
2021-10-01T17:26:30.000Z
2021-10-01T17:26:30.000Z
from __future__ import absolute_import, unicode_literals import pykka from mopidy import backend from . import playlists
22.625
69
0.748619
from __future__ import absolute_import, unicode_literals import pykka from mopidy import backend from . import playlists class M3UBackend(pykka.ThreadingActor, backend.Backend): uri_schemes = ['m3u'] def __init__(self, config, audio): super(M3UBackend, self).__init__() self.playlists = pla...
126
88
23
b640ae3248e940a8341e0a31d9cb75d1327f5d4b
1,884
py
Python
Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/exercicios/ex0094Unindo_dict_listas.py
AlamoVinicius/code-pratice
924a3ff782caf3695bbeeac39fa02fb23781cd75
[ "MIT" ]
null
null
null
Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/exercicios/ex0094Unindo_dict_listas.py
AlamoVinicius/code-pratice
924a3ff782caf3695bbeeac39fa02fb23781cd75
[ "MIT" ]
null
null
null
Curso Em Video-python/PYTHON (MUNDO 1, MUNDO 2 E MUNDO 3)/exercicios/ex0094Unindo_dict_listas.py
AlamoVinicius/code-pratice
924a3ff782caf3695bbeeac39fa02fb23781cd75
[ "MIT" ]
null
null
null
""" Crie um programa que leia nome, sexo e idade de várias pessoas, guardando os dados de cada pessoa em um dicionário e todos os dicionários em uma lista. No final, msotre: a - quantas pessoas foram cadastradas/ b - a média de idade do grupo/ c- uma lista com todas as mulheres. d - uma lista com todas as pessoas com i...
37.68
115
0.66242
""" Crie um programa que leia nome, sexo e idade de várias pessoas, guardando os dados de cada pessoa em um dicionário e todos os dicionários em uma lista. No final, msotre: a - quantas pessoas foram cadastradas/ b - a média de idade do grupo/ c- uma lista com todas as mulheres. d - uma lista com todas as pessoas com i...
0
0
0
7286eb32f766700e67aec25ff5e57a270360fdf5
3,329
py
Python
toolbox/data_handler.py
mlelarge/graph_neural_net
bd4ade9312d945b8baadc7709d134ea6af0fc0bb
[ "Apache-2.0" ]
36
2020-03-18T18:56:20.000Z
2022-03-31T13:39:09.000Z
toolbox/data_handler.py
mlelarge/graph_neural_net
bd4ade9312d945b8baadc7709d134ea6af0fc0bb
[ "Apache-2.0" ]
11
2020-02-25T18:46:23.000Z
2022-02-07T11:01:37.000Z
toolbox/data_handler.py
mlelarge/graph_neural_net
bd4ade9312d945b8baadc7709d134ea6af0fc0bb
[ "Apache-2.0" ]
17
2020-02-25T18:29:48.000Z
2022-03-31T13:39:42.000Z
import pandas as pd import os from toolbox.utils import check_file from collections import namedtuple,deque Task = namedtuple('Task',['column_name','value'])
31.40566
120
0.572244
import pandas as pd import os from toolbox.utils import check_file from collections import namedtuple,deque class DataHandler(): def __init__(self,filepath) -> None: self.filepath = filepath self.data = pd.DataFrame() self.read(filepath) def write(self,filepath=''): if...
2,487
334
348
22e43818268c9c794932435f41c2180cf9b3e7db
14,201
py
Python
comtypes/server/register.py
junkmd/comtypes
3be0028fad7ac414a43af592484b7608381e0615
[ "MIT" ]
1
2022-02-25T13:46:54.000Z
2022-02-25T13:46:54.000Z
comtypes/server/register.py
junkmd/comtypes
3be0028fad7ac414a43af592484b7608381e0615
[ "MIT" ]
null
null
null
comtypes/server/register.py
junkmd/comtypes
3be0028fad7ac414a43af592484b7608381e0615
[ "MIT" ]
1
2022-02-25T13:47:47.000Z
2022-02-25T13:47:47.000Z
"""comtypes.server.register - register and unregister a COM object. Exports the UseCommandLine function. UseCommandLine is called with the COM object classes that a module exposes. It parses the Windows command line and takes the appropriate actions. These command line options are supported: /regserver - register t...
37.469657
117
0.594958
"""comtypes.server.register - register and unregister a COM object. Exports the UseCommandLine function. UseCommandLine is called with the COM object classes that a module exposes. It parses the Windows command line and takes the appropriate actions. These command line options are supported: /regserver - register t...
3,789
0
191
0db440d4886e1de9666e887db833f804e052aceb
428
py
Python
src/waldur_rancher/tests/utils.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
26
2017-10-18T13:49:58.000Z
2021-09-19T04:44:09.000Z
src/waldur_rancher/tests/utils.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
14
2018-12-10T14:14:51.000Z
2021-06-07T10:33:39.000Z
src/waldur_rancher/tests/utils.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
32
2017-09-24T03:10:45.000Z
2021-10-16T16:41:09.000Z
import copy import json import pkg_resources from django.conf import settings from django.test import override_settings backend_node_response = json.loads( pkg_resources.resource_stream(__name__, 'backend_node.json').read().decode() )
25.176471
80
0.806075
import copy import json import pkg_resources from django.conf import settings from django.test import override_settings backend_node_response = json.loads( pkg_resources.resource_stream(__name__, 'backend_node.json').read().decode() ) def override_plugin_settings(**kwargs): os_settings = copy.deepcopy(setti...
163
0
23
7bed7bac0864f20a192d2398a2fa808183443d70
427
py
Python
Physics250-ME21/conductingRing.py
illusion173/Physics250
69f2ffdb8af013e8b0739779861c1455b579ddaf
[ "MIT" ]
null
null
null
Physics250-ME21/conductingRing.py
illusion173/Physics250
69f2ffdb8af013e8b0739779861c1455b579ddaf
[ "MIT" ]
null
null
null
Physics250-ME21/conductingRing.py
illusion173/Physics250
69f2ffdb8af013e8b0739779861c1455b579ddaf
[ "MIT" ]
null
null
null
import numpy as np import math Esubo = 8.854 * pow(10,-12) k = 8.988 * pow(10,9) chargeconstant = 1.602 * pow(10,-19) conductingRing()
21.35
93
0.613583
import numpy as np import math Esubo = 8.854 * pow(10,-12) k = 8.988 * pow(10,9) chargeconstant = 1.602 * pow(10,-19) def conductingRing(): charge = float(input("Input Charge: ")) radius = float(input("Radius: ")) distance = float(input("Distance: ")) electricField = ((k * charge * dis...
264
0
23
ac35996dba9afde822b77d1b4ba444f9662895aa
2,437
py
Python
ben_ten_adventure/ui.py
Ben-10-Secret-of-the-Omnitrix-Game/Ben-10-Adventure
ede699de0369e6614665acc06b872f81bbb124c8
[ "MIT" ]
1
2021-01-16T21:48:32.000Z
2021-01-16T21:48:32.000Z
ben_ten_adventure/ui.py
Ben-10-Secret-of-the-Omnitrix-Game/Ben-10-Adventure
ede699de0369e6614665acc06b872f81bbb124c8
[ "MIT" ]
null
null
null
ben_ten_adventure/ui.py
Ben-10-Secret-of-the-Omnitrix-Game/Ben-10-Adventure
ede699de0369e6614665acc06b872f81bbb124c8
[ "MIT" ]
null
null
null
import pygame_gui import pygame from pygame.transform import scale from .game_engine import RESOLUTION, ga, manager HD = (1280, 720) FULL_HD = (1920, 1080) def vertical(size, startcolor, endcolor): """ Draws a vertical linear gradient filling the entire surface. Returns a surface filled with the gradie...
40.616667
111
0.61387
import pygame_gui import pygame from pygame.transform import scale from .game_engine import RESOLUTION, ga, manager HD = (1280, 720) FULL_HD = (1920, 1080) def vertical(size, startcolor, endcolor): """ Draws a vertical linear gradient filling the entire surface. Returns a surface filled with the gradie...
1,503
0
23
e75405f656394553bba9f371073eac1ef69a8ee7
2,979
py
Python
routes/internal_routes.py
Madpilot0/FlaskDashboard
73fddbee9f04da415ffdbf6f4062d17dc777aed5
[ "MIT" ]
2
2018-12-15T03:55:23.000Z
2021-03-23T09:23:25.000Z
routes/internal_routes.py
Madpilot0/FlaskDashboard
73fddbee9f04da415ffdbf6f4062d17dc777aed5
[ "MIT" ]
2
2018-08-31T19:13:03.000Z
2021-02-04T12:41:31.000Z
routes/internal_routes.py
Madpilot0/FlaskDashboard
73fddbee9f04da415ffdbf6f4062d17dc777aed5
[ "MIT" ]
3
2020-08-21T02:19:16.000Z
2021-03-10T19:15:07.000Z
from flask import Blueprint, render_template, abort, session, redirect, url_for, request from functools import wraps from lib.Users import Users from lib.Groups import Groups from lib.Database import Database import json internal_routes = Blueprint('internal_routes', __name__, template_folder='templates') users = User...
27.841121
88
0.772071
from flask import Blueprint, render_template, abort, session, redirect, url_for, request from functools import wraps from lib.Users import Users from lib.Groups import Groups from lib.Database import Database import json def requires_auth(f): @wraps(f) def decorated_auth(*args, **kwargs): if 'username' not in sess...
1,263
0
288
cb3a583cba047c6edf4fadbc326270db7a1780ab
829
py
Python
setup.py
akaariai/drf-fast-serializer
ff286e58f1a073a4fe6f256fe2279e9fb39bbcee
[ "MIT" ]
27
2015-03-01T19:15:55.000Z
2022-01-13T22:57:43.000Z
setup.py
akaariai/drf-fast-serializer
ff286e58f1a073a4fe6f256fe2279e9fb39bbcee
[ "MIT" ]
1
2015-03-01T19:19:00.000Z
2015-03-01T19:19:00.000Z
setup.py
akaariai/drf-fast-serializer
ff286e58f1a073a4fe6f256fe2279e9fb39bbcee
[ "MIT" ]
8
2015-07-10T08:24:12.000Z
2020-10-05T19:54:45.000Z
# -*- encoding: utf-8 -*- import os from setuptools import setup setup( name="drf-fast-serializer", version="0.1-dev", description="A fast serializer mixin for Django request framework", long_description=read('readme.md'), url='https://github.com/akaariai/drf-fast-serializer', license='MIT', ...
31.884615
71
0.640531
# -*- encoding: utf-8 -*- import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="drf-fast-serializer", version="0.1-dev", description="A fast serializer mixin for Django request framework", long_description=read('readme...
66
0
22
102046e68e582ec40bf3e5235359ef4f4a81ca45
1,088
py
Python
src/arbies/workers/image.py
broiledmeat/arbies
29f3ce498dbd3265b1181dde62629df3deda0440
[ "MIT" ]
null
null
null
src/arbies/workers/image.py
broiledmeat/arbies
29f3ce498dbd3265b1181dde62629df3deda0440
[ "MIT" ]
null
null
null
src/arbies/workers/image.py
broiledmeat/arbies
29f3ce498dbd3265b1181dde62629df3deda0440
[ "MIT" ]
null
null
null
from __future__ import annotations from PIL import Image from typing import Optional from arbies import drawing from arbies.drawing import HorizontalAlignment, VerticalAlignment from arbies.manager import Manager, ConfigDict from arbies.workers import Worker
32
78
0.651654
from __future__ import annotations from PIL import Image from typing import Optional from arbies import drawing from arbies.drawing import HorizontalAlignment, VerticalAlignment from arbies.manager import Manager, ConfigDict from arbies.workers import Worker class ImageWorker(Worker): def __init__(self, manager: ...
703
102
23
3c626024e40ae3dde1f4925204274dc99f9dec89
138
py
Python
my/reading/goodreads.py
aluhrs13/HPI
e750666e30e8987f3a4c46755857dc85dd64446c
[ "MIT" ]
1,026
2020-03-16T16:53:29.000Z
2022-03-29T16:03:38.000Z
my/reading/goodreads.py
aluhrs13/HPI
e750666e30e8987f3a4c46755857dc85dd64446c
[ "MIT" ]
102
2020-03-18T22:53:29.000Z
2022-03-22T00:34:46.000Z
my/reading/goodreads.py
aluhrs13/HPI
e750666e30e8987f3a4c46755857dc85dd64446c
[ "MIT" ]
50
2020-03-17T21:00:34.000Z
2022-03-28T08:37:13.000Z
from my.core import warnings warnings.medium('my.reading.goodreads is deprecated! Use my.goodreads instead!') from ..goodreads import *
23
80
0.782609
from my.core import warnings warnings.medium('my.reading.goodreads is deprecated! Use my.goodreads instead!') from ..goodreads import *
0
0
0
db28497c5293e87aa7f5a3bd4a943451b7e89387
4,551
py
Python
flod_organisations/alembic/versions/20140123-0821-56aa02f54e74_converting_brreg_activity_codes_from_fixture_.py
Trondheim-kommune/Tilskuddsbasen
4f8ce270ef7296069f8e43bfb4bf6a570a7a35d4
[ "BSD-2-Clause-FreeBSD" ]
1
2017-10-17T12:15:28.000Z
2017-10-17T12:15:28.000Z
flod_organisations/alembic/versions/20140123-0821-56aa02f54e74_converting_brreg_activity_codes_from_fixture_.py
Trondheim-kommune/Bookingbasen
58235a5a1fd6ad291cb237e6ec9a67bfe8c463c6
[ "BSD-2-Clause-FreeBSD" ]
6
2021-03-22T17:15:52.000Z
2022-01-13T00:39:58.000Z
flod_organisations/alembic/versions/20140123-0821-56aa02f54e74_converting_brreg_activity_codes_from_fixture_.py
Trondheim-kommune/Tilskuddsbasen
4f8ce270ef7296069f8e43bfb4bf6a570a7a35d4
[ "BSD-2-Clause-FreeBSD" ]
1
2019-09-09T13:35:03.000Z
2019-09-09T13:35:03.000Z
# -*- coding: utf-8 -*- """Converting brreg_activity_codes from fixture to alembic migration Revision ID: 56aa02f54e74 Revises: 357cc9fc466b Create Date: 2014-01-23 08:21:22.953015 """ # revision identifiers, used by Alembic. from sqlalchemy.sql import table, column from sqlalchemy import String revision = '56aa02f...
27.920245
78
0.390024
# -*- coding: utf-8 -*- """Converting brreg_activity_codes from fixture to alembic migration Revision ID: 56aa02f54e74 Revises: 357cc9fc466b Create Date: 2014-01-23 08:21:22.953015 """ # revision identifiers, used by Alembic. from sqlalchemy.sql import table, column from sqlalchemy import String revision = '56aa02f...
4,131
0
46
d48aa0eeb406712e8546275fb2e2aae57dc24dde
159
py
Python
Python Fundamentals/2. Data Types and Variables/More Exercises/03. Decrypting Messages.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python Fundamentals/2. Data Types and Variables/More Exercises/03. Decrypting Messages.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python Fundamentals/2. Data Types and Variables/More Exercises/03. Decrypting Messages.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
key = int(input()) lines = int(input()) decrypted = "" for _ in range(lines): letter = input() decrypted += chr(ord(letter) + key) print(decrypted)
14.454545
39
0.616352
key = int(input()) lines = int(input()) decrypted = "" for _ in range(lines): letter = input() decrypted += chr(ord(letter) + key) print(decrypted)
0
0
0
4c6f5a8d2924c4754159ef0ebec519f1097c6303
1,594
py
Python
XML/pycopia/XML/SVG.py
kdart/pycopia
1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d
[ "Apache-2.0" ]
89
2015-03-26T11:25:20.000Z
2022-01-12T06:25:14.000Z
XML/pycopia/XML/SVG.py
kdart/pycopia
1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d
[ "Apache-2.0" ]
1
2015-07-05T03:27:43.000Z
2015-07-11T06:21:20.000Z
XML/pycopia/XML/SVG.py
kdart/pycopia
1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d
[ "Apache-2.0" ]
30
2015-04-30T01:35:54.000Z
2022-01-12T06:19:49.000Z
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 ...
24.151515
82
0.71079
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 ...
236
59
92
fb384f229420aa34cb7f12e50bd7903777f0a193
381
py
Python
day3/day3.py
partridgems/advent2018
c5b447a4df1f0ee3e28a656ee6597f605f2d7b79
[ "MIT" ]
null
null
null
day3/day3.py
partridgems/advent2018
c5b447a4df1f0ee3e28a656ee6597f605f2d7b79
[ "MIT" ]
null
null
null
day3/day3.py
partridgems/advent2018
c5b447a4df1f0ee3e28a656ee6597f605f2d7b79
[ "MIT" ]
null
null
null
import sys import numpy import re main()
14.111111
66
0.551181
import sys import numpy import re def main(): fabric = numpy.zeros((1000,1000)) for claim in sys.stdin.readlines(): nums = [int(x) for x in re.split(' @ |,|: |x',claim)[1:]] if len(nums) < 4: continue (b,l,t,r) = (nums[0],nums[1],nums[0]+nums[2],nums[1]+nums[3]) # print(b,t,l,r) fabric[b:...
307
0
23
5ab6f2c817b76a5338a950b54956ecb1e442d955
1,917
py
Python
keystone/cmd/doctor/ldap.py
dtroyer/keystone
ba21db422d4f58c185e1b4414e118f723c33b959
[ "Apache-2.0" ]
null
null
null
keystone/cmd/doctor/ldap.py
dtroyer/keystone
ba21db422d4f58c185e1b4414e118f723c33b959
[ "Apache-2.0" ]
null
null
null
keystone/cmd/doctor/ldap.py
dtroyer/keystone
ba21db422d4f58c185e1b4414e118f723c33b959
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
36.169811
77
0.745436
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
0
0
0
3f409adad054046b5315883c8e55c4733338b896
450
py
Python
Arrangement/5568.py
miiiingi/algorithmstudy
75eaf97e2c41d7edf32eb4a57d4d7685c9218aba
[ "MIT" ]
null
null
null
Arrangement/5568.py
miiiingi/algorithmstudy
75eaf97e2c41d7edf32eb4a57d4d7685c9218aba
[ "MIT" ]
null
null
null
Arrangement/5568.py
miiiingi/algorithmstudy
75eaf97e2c41d7edf32eb4a57d4d7685c9218aba
[ "MIT" ]
null
null
null
import itertools list_num = list() n = int(input()) k = int(input()) for _ in range(n) : number = input() list_num.append(number) cat_num = itertools.combinations(list_num, k) _answer = list() for nums in cat_num : num = itertools.permutations(nums, k) for n in num : str_sum = '' for...
21.428571
45
0.595556
import itertools list_num = list() n = int(input()) k = int(input()) for _ in range(n) : number = input() list_num.append(number) cat_num = itertools.combinations(list_num, k) _answer = list() for nums in cat_num : num = itertools.permutations(nums, k) for n in num : str_sum = '' for...
0
0
0
f0b9c3a404369231c434674735d3e6ae78005ca9
261,031
py
Python
instances/passenger_demand/pas-20210422-1717-int16e/29.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210422-1717-int16e/29.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210422-1717-int16e/29.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
""" PASSENGERS """ numPassengers = 30558 passenger_arriving = ( (11, 2, 10, 9, 2, 7, 2, 5, 2, 1, 1, 0, 0, 9, 8, 6, 8, 2, 5, 1, 5, 4, 1, 1, 1, 0), # 0 (9, 12, 9, 9, 8, 2, 1, 4, 2, 0, 1, 2, 0, 8, 6, 8, 5, 2, 5, 7, 3, 3, 1, 0, 2, 0), # 1 (4, 3, 8, 10, 7, 5, 1, 6, 4, 4, 1, 0, 0, 15, 10, 4, 8, 4, 5, 3, 2, 5, 1, 2, 1...
279.17754
491
0.771966
""" PASSENGERS """ numPassengers = 30558 passenger_arriving = ( (11, 2, 10, 9, 2, 7, 2, 5, 2, 1, 1, 0, 0, 9, 8, 6, 8, 2, 5, 1, 5, 4, 1, 1, 1, 0), # 0 (9, 12, 9, 9, 8, 2, 1, 4, 2, 0, 1, 2, 0, 8, 6, 8, 5, 2, 5, 7, 3, 3, 1, 0, 2, 0), # 1 (4, 3, 8, 10, 7, 5, 1, 6, 4, 4, 1, 0, 0, 15, 10, 4, 8, 4, 5, 3, 2, 5, 1, 2, 1...
0
0
0
6a1661feb3eadbed22acb7a1f2831cbf3dc0a31f
6,002
py
Python
tests/test_ghdl_testsuite.py
lionheart117/hdlConvertor
935941471fbb592942776d2c46af2be0b14b9b06
[ "MIT" ]
1
2022-02-17T23:32:46.000Z
2022-02-17T23:32:46.000Z
tests/test_ghdl_testsuite.py
curiousTauseef/hdlConvertor
5041c2cca2d14f47237dc4e91fd3228a88bd01df
[ "MIT" ]
null
null
null
tests/test_ghdl_testsuite.py
curiousTauseef/hdlConvertor
5041c2cca2d14f47237dc4e91fd3228a88bd01df
[ "MIT" ]
null
null
null
# import sys import os import sys import unittest from hdlConvertorAst.language import Language from tests.extern_test_utils import generate_external_testcase_class, \ ExternTestSpec, check_git_submodule from tests.file_utils import find_files from tests.time_logging_test_runner import TimeLoggingTestRunner if sy...
40.281879
100
0.623292
# import sys import os import sys import unittest from hdlConvertorAst.language import Language from tests.extern_test_utils import generate_external_testcase_class, \ ExternTestSpec, check_git_submodule from tests.file_utils import find_files from tests.time_logging_test_runner import TimeLoggingTestRunner if sy...
4,356
0
23
57081792105256d9dd6d7742e02c6fbe86c8f49f
601
py
Python
python-questions-for-pratices/Question-88.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
python-questions-for-pratices/Question-88.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
python-questions-for-pratices/Question-88.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
""" Question 88 : With a given list [12, 24,35, 24, 88,120, 155, 88, 120, 155], write a program to print this list after removing all duplicate values with original order reserved. Hints : Use set() to store a number of values without duplicate. """ # Solution : li = [12, 24,35, 24, 88,120, 155, 88,...
20.033333
74
0.603993
""" Question 88 : With a given list [12, 24,35, 24, 88,120, 155, 88, 120, 155], write a program to print this list after removing all duplicate values with original order reserved. Hints : Use set() to store a number of values without duplicate. """ # Solution : def remove_duplicate(li): new_lis...
171
0
23
a69b107084d776967e5e8d71a7570a2c2abdcf48
5,591
py
Python
src/schnetpack/datasets/omdb.py
sxie22/schnetpack
a421e7c121c7bdb2838fb30f887812110ecfa3c6
[ "MIT" ]
null
null
null
src/schnetpack/datasets/omdb.py
sxie22/schnetpack
a421e7c121c7bdb2838fb30f887812110ecfa3c6
[ "MIT" ]
null
null
null
src/schnetpack/datasets/omdb.py
sxie22/schnetpack
a421e7c121c7bdb2838fb30f887812110ecfa3c6
[ "MIT" ]
1
2022-02-10T17:39:11.000Z
2022-02-10T17:39:11.000Z
import logging import os import tarfile from typing import List, Optional, Dict from ase.io import read import numpy as np import torch from schnetpack.data import * from schnetpack.data import AtomsDataModuleError, AtomsDataModule __all__ = ["OrganicMaterialsDatabase"] class OrganicMaterialsDatabase(AtomsDataMod...
38.826389
107
0.630478
import logging import os import tarfile from typing import List, Optional, Dict from ase.io import read import numpy as np import torch from schnetpack.data import * from schnetpack.data import AtomsDataModuleError, AtomsDataModule __all__ = ["OrganicMaterialsDatabase"] class OrganicMaterialsDatabase(AtomsDataMod...
456
0
27
bb22e5b12a23cf9898a8b386b4ed12add15908fc
4,879
py
Python
km3pipe/cmd.py
kabartay/km3pipe
491c425486553e8986682d2b0614918dd23cc964
[ "MIT" ]
2
2017-01-19T17:22:49.000Z
2020-04-18T14:00:38.000Z
km3pipe/cmd.py
kabartay/km3pipe
491c425486553e8986682d2b0614918dd23cc964
[ "MIT" ]
null
null
null
km3pipe/cmd.py
kabartay/km3pipe
491c425486553e8986682d2b0614918dd23cc964
[ "MIT" ]
null
null
null
# coding=utf-8 # Filename: cmd.py """ KM3Pipe command line utility. Usage: km3pipe test km3pipe update [GIT_BRANCH] km3pipe detx DET_ID [-m] [-t T0_SET] [-c CALIBR_ID] km3pipe runtable [-n RUNS] [-s REGEX] [--temporary] DET_ID km3pipe runinfo [--temporary] DET_ID RUN km3pipe retrieve DET_ID RUN...
30.685535
96
0.589465
# coding=utf-8 # Filename: cmd.py """ KM3Pipe command line utility. Usage: km3pipe test km3pipe update [GIT_BRANCH] km3pipe detx DET_ID [-m] [-t T0_SET] [-c CALIBR_ID] km3pipe runtable [-n RUNS] [-s REGEX] [--temporary] DET_ID km3pipe runinfo [--temporary] DET_ID RUN km3pipe retrieve DET_ID RUN...
2,553
0
115
5fc233a9c384203a775a4a15b2f31cc660ce4031
11,803
py
Python
parse_config.py
jdeuschel/DistrShiftsOnFacialData
577c89ca0f9a31be0031f90990f0efe7548550f7
[ "Apache-2.0" ]
null
null
null
parse_config.py
jdeuschel/DistrShiftsOnFacialData
577c89ca0f9a31be0031f90990f0efe7548550f7
[ "Apache-2.0" ]
null
null
null
parse_config.py
jdeuschel/DistrShiftsOnFacialData
577c89ca0f9a31be0031f90990f0efe7548550f7
[ "Apache-2.0" ]
null
null
null
import os import logging from pathlib import Path from functools import reduce, partial from operator import getitem from datetime import datetime # from logger import setup_logging from utils import read_yml, write_yml import collections import json # helper functions to update config dict with custom cli options ...
45.222222
142
0.61908
import os import logging from pathlib import Path from functools import reduce, partial from operator import getitem from datetime import datetime # from logger import setup_logging from utils import read_yml, write_yml import collections import json class Singleton(type): _instances = {} def __call__(cls, *a...
1,314
9,733
114
e9fad6bdb4159e681b3eac8d471935bffe95ee70
20,457
py
Python
alf/utils/data_buffer.py
Haichao-Zhang/alf_randperm_reproduce
d5223b7534ab20ca725aac940ad274ef806d1d3e
[ "Apache-2.0" ]
null
null
null
alf/utils/data_buffer.py
Haichao-Zhang/alf_randperm_reproduce
d5223b7534ab20ca725aac940ad274ef806d1d3e
[ "Apache-2.0" ]
null
null
null
alf/utils/data_buffer.py
Haichao-Zhang/alf_randperm_reproduce
d5223b7534ab20ca725aac940ad274ef806d1d3e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
39.114723
93
0.588698
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
1,246
0
217
7e08175ea5c98010a48c0c4126af4cb1ccc72874
852
py
Python
bytenet/utils.py
tindzk/bsnlp
5b3e7ca746506e426b399490f9da6a31aee83f9e
[ "MIT" ]
1
2017-03-31T08:50:30.000Z
2017-03-31T08:50:30.000Z
bytenet/utils.py
tindzk/bsnlp
5b3e7ca746506e426b399490f9da6a31aee83f9e
[ "MIT" ]
null
null
null
bytenet/utils.py
tindzk/bsnlp
5b3e7ca746506e426b399490f9da6a31aee83f9e
[ "MIT" ]
null
null
null
import json import codecs import itertools import numpy as np # If length -1, no validation data
28.4
71
0.639671
import json import codecs import itertools import numpy as np # If length -1, no validation data def loadDataSet(file, length = -1): with codecs.open(file, encoding = 'utf-8') as f: arr = json.load(f) if length == -1: return arr, [] else: assert(length * 2 <= len(arr)) ...
663
0
91
d5e00b75ff7eee48d6500ffb6e36796e8a82f344
8,836
py
Python
sciencebeam_gym/tools/calculate_class_weights.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
25
2017-07-25T12:44:55.000Z
2020-09-30T22:16:50.000Z
sciencebeam_gym/tools/calculate_class_weights.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
192
2017-11-29T08:57:03.000Z
2022-03-29T18:44:41.000Z
sciencebeam_gym/tools/calculate_class_weights.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
6
2019-02-01T18:49:33.000Z
2020-07-26T08:18:46.000Z
from __future__ import division from __future__ import print_function import argparse import logging import json import numpy as np import tensorflow as tf from tensorflow.python.lib.io import file_io # pylint: disable=E0611 from tqdm import tqdm from sciencebeam_gym.preprocess.color_map import ( parse_color_ma...
31.44484
99
0.69081
from __future__ import division from __future__ import print_function import argparse import logging import json import numpy as np import tensorflow as tf from tensorflow.python.lib.io import file_io # pylint: disable=E0611 from tqdm import tqdm from sciencebeam_gym.preprocess.color_map import ( parse_color_ma...
6,873
0
460
02261c29290fe4010d7d7e887e89a38b7ba6e5d7
7,129
py
Python
hring/src/Script/eval_test.py
anderson1008/Noculator
411964ce333c3bd587840554efef6e61c0b9b4d5
[ "MIT" ]
null
null
null
hring/src/Script/eval_test.py
anderson1008/Noculator
411964ce333c3bd587840554efef6e61c0b9b4d5
[ "MIT" ]
null
null
null
hring/src/Script/eval_test.py
anderson1008/Noculator
411964ce333c3bd587840554efef6e61c0b9b4d5
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import os import re import fnmatch import string import my_print import matplotlib.pyplot as plt import get work_dir = "/Users/Anderson/GoogleDrive/NOCulator/hring/src/bin" #work_dir = "//Users/Anderson/Desktop/SweepAll_8x8/results/homo/8x8/design/17" input_file = "bs_homo_8x...
35.292079
399
0.612007
#!/usr/bin/python import sys import os import re import fnmatch import string import my_print import matplotlib.pyplot as plt import get work_dir = "/Users/Anderson/GoogleDrive/NOCulator/hring/src/bin" #work_dir = "//Users/Anderson/Desktop/SweepAll_8x8/results/homo/8x8/design/17" input_file = "bs_homo_8x...
3,485
0
288
6c8f3c447a3418d5e3deacb73b0d781480bd55fa
1,291
py
Python
slybot/slybot/linkextractor/ecsv.py
hackrush01/portia
c7414034361fecada76e1693666674c274b0421a
[ "BSD-3-Clause" ]
6,390
2015-01-01T17:05:13.000Z
2022-03-31T08:20:12.000Z
slybot/slybot/linkextractor/ecsv.py
hackrush01/portia
c7414034361fecada76e1693666674c274b0421a
[ "BSD-3-Clause" ]
442
2015-01-04T17:32:20.000Z
2022-03-15T21:21:23.000Z
slybot/slybot/linkextractor/ecsv.py
hackrush01/portia
c7414034361fecada76e1693666674c274b0421a
[ "BSD-3-Clause" ]
1,288
2015-01-09T05:54:20.000Z
2022-03-31T03:21:51.000Z
from __future__ import absolute_import import csv from six import string_types, StringIO, PY2 from scrapy.link import Link from .base import BaseLinkExtractor # see http://docs.python.org/2/library/csv.html#csv-fmt-params _FORMAT_PARAMETERS = ( ('delimiter', ','), ('quotechar', '"'), ('doublequote', True...
32.275
69
0.605732
from __future__ import absolute_import import csv from six import string_types, StringIO, PY2 from scrapy.link import Link from .base import BaseLinkExtractor # see http://docs.python.org/2/library/csv.html#csv-fmt-params _FORMAT_PARAMETERS = ( ('delimiter', ','), ('quotechar', '"'), ('doublequote', True...
754
21
76
b9fa5361dc7fe07bf7df8f28be4364d5c13ef73e
4,251
py
Python
tests/unit2/test_sprite_list.py
mlr07/arcade
70a7046f094a05be1bf0935edeff0ccfb391e01c
[ "MIT" ]
null
null
null
tests/unit2/test_sprite_list.py
mlr07/arcade
70a7046f094a05be1bf0935edeff0ccfb391e01c
[ "MIT" ]
null
null
null
tests/unit2/test_sprite_list.py
mlr07/arcade
70a7046f094a05be1bf0935edeff0ccfb391e01c
[ "MIT" ]
null
null
null
from array import array import struct import pytest import arcade def test_setitem(ctx): """Testing __setitem__""" num_sprites = 10 spritelist = make_named_sprites(num_sprites) # Assign the same item to the same slot for i in range(num_sprites): spritelist[i] = spritelist[i] ...
29.93662
108
0.673253
from array import array import struct import pytest import arcade def make_named_sprites(amount): spritelist = arcade.SpriteList() sprites = [] for i in range(amount): c = i + 1 sprite = arcade.SpriteSolidColor(16, 16, (c, c, c, 1)) sprite.name = i sprites.append(sprite) ...
2,987
0
161
ec6c9ce6553ffbcbcafb4ba7323398e1655d6082
5,835
py
Python
chibi_gob_mx_elasticsearch/cli.py
dem4ply/chibi_gob_mx_elasticsearch
7b4a5b35ad79817db0f5d5cc6705f085b4708a1d
[ "WTFPL" ]
null
null
null
chibi_gob_mx_elasticsearch/cli.py
dem4ply/chibi_gob_mx_elasticsearch
7b4a5b35ad79817db0f5d5cc6705f085b4708a1d
[ "WTFPL" ]
null
null
null
chibi_gob_mx_elasticsearch/cli.py
dem4ply/chibi_gob_mx_elasticsearch
7b4a5b35ad79817db0f5d5cc6705f085b4708a1d
[ "WTFPL" ]
null
null
null
# -*- coding: utf-8 -*- """Console script for chibi_gob_mx_elasticsearch.""" import random import argparse import sys import argparse import sys from chibi.config import basic_config from chibi.file import Chibi_path from chibi.config import configuration from chibi_gob_mx.open_data import Open_data from chibi_gob_mx....
34.94012
79
0.53916
# -*- coding: utf-8 -*- """Console script for chibi_gob_mx_elasticsearch.""" import random import argparse import sys import argparse import sys from chibi.config import basic_config from chibi.file import Chibi_path from chibi.config import configuration from chibi_gob_mx.open_data import Open_data from chibi_gob_mx....
4,244
0
46
64baa5dcca37c50df6335c3f376ec65a202444ae
2,116
py
Python
tests/test_buyback_two_hop.py
speraxdev/USDs
8ff2dfaf2173fadacf49619473d681707fc8507c
[ "MIT" ]
null
null
null
tests/test_buyback_two_hop.py
speraxdev/USDs
8ff2dfaf2173fadacf49619473d681707fc8507c
[ "MIT" ]
null
null
null
tests/test_buyback_two_hop.py
speraxdev/USDs
8ff2dfaf2173fadacf49619473d681707fc8507c
[ "MIT" ]
null
null
null
import pytest from brownie import Wei, Contract, reverts, interface from brownie.test import given, strategy import time
21.814433
72
0.5931
import pytest from brownie import Wei, Contract, reverts, interface from brownie.test import given, strategy import time def test_swap(sperax, owner_l2, weth): ( spa, usds_proxy, core_proxy, vault_proxy, oracle_proxy, strategies, buybacks, bancor ...
1,924
0
69
c1cf043a5b16063a92106928d163cd1776b47fcb
4,657
py
Python
datasets/dataset_utils.py
suddhu/MinkLoc3D
11a2d2d3a96e74133b4aff635d456e22133babcd
[ "MIT" ]
null
null
null
datasets/dataset_utils.py
suddhu/MinkLoc3D
11a2d2d3a96e74133b4aff635d456e22133babcd
[ "MIT" ]
null
null
null
datasets/dataset_utils.py
suddhu/MinkLoc3D
11a2d2d3a96e74133b4aff635d456e22133babcd
[ "MIT" ]
null
null
null
# Author: Jacek Komorowski # Warsaw University of Technology import numpy as np import torch from torch.utils.data import DataLoader import MinkowskiEngine as ME from datasets.tactileDataset import tactileDataset from datasets.augmentation import TrainCloudTransform, TrainCloudSetTransform from datasets.samplers impo...
46.108911
142
0.708825
# Author: Jacek Komorowski # Warsaw University of Technology import numpy as np import torch from torch.utils.data import DataLoader import MinkowskiEngine as ME from datasets.tactileDataset import tactileDataset from datasets.augmentation import TrainCloudTransform, TrainCloudSetTransform from datasets.samplers impo...
2,574
0
69