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
6776cf0bd080254a676d541e382d4eb2f31a05f5
7,640
py
Python
pymatgen/analysis/tests/test_diffusion_analyzer.py
rajeshprasanth/pymatgen
eb6cd95230c11ac761a96ebf82b98f71177bb71f
[ "MIT" ]
null
null
null
pymatgen/analysis/tests/test_diffusion_analyzer.py
rajeshprasanth/pymatgen
eb6cd95230c11ac761a96ebf82b98f71177bb71f
[ "MIT" ]
null
null
null
pymatgen/analysis/tests/test_diffusion_analyzer.py
rajeshprasanth/pymatgen
eb6cd95230c11ac761a96ebf82b98f71177bb71f
[ "MIT" ]
1
2018-10-28T01:41:38.000Z
2018-10-28T01:41:38.000Z
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import unittest2 as unittest import os import json import random import numpy as np import csv import scipy.constants as const from pymatgen.analysis.diffusio...
41.978022
85
0.610602
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import unittest2 as unittest import os import json import random import numpy as np import csv import scipy.constants as const from pymatgen.analysis.diffusio...
6,595
34
127
d94e383e015801e9caaa411360f5d5c3c970581d
9,511
py
Python
checker/logic.py
ucam-cl-dtg/equality_checker
6a31d3dd360f821e36c4742e1d5139d7292f8319
[ "Apache-2.0" ]
7
2020-07-18T08:04:27.000Z
2022-03-07T06:46:17.000Z
checker/logic.py
ucam-cl-dtg/equality_checker
6a31d3dd360f821e36c4742e1d5139d7292f8319
[ "Apache-2.0" ]
1
2022-03-18T17:05:54.000Z
2022-03-18T17:05:54.000Z
checker/logic.py
ucam-cl-dtg/equality_checker
6a31d3dd360f821e36c4742e1d5139d7292f8319
[ "Apache-2.0" ]
1
2020-07-18T08:04:28.000Z
2020-07-18T08:04:28.000Z
import sympy from .utils import known_equal_pair, contains_incorrect_symbols from .utils import EqualityType from .parsing import logic_parser, UnsafeInputException __all__ = ["check"] KNOWN_PAIRS = dict() def parse_expression(expression_str, *, local_dict=None): """Take a string containing a mathematical ex...
40.819742
114
0.66134
import sympy from .utils import known_equal_pair, contains_incorrect_symbols from .utils import EqualityType from .parsing import logic_parser, UnsafeInputException __all__ = ["check"] KNOWN_PAIRS = dict() def parse_expression(expression_str, *, local_dict=None): """Take a string containing a mathematical ex...
0
0
0
559890790ae2649fffcbdb6731e70ef5186638d7
222
py
Python
Kattis/How Many Digits/howmanydigits.py
DeepSpace2/Comptitive-Programming
13212d9dbc73ab87519b0596fdb0147d40c7eaa8
[ "MIT" ]
1
2021-11-12T16:39:40.000Z
2021-11-12T16:39:40.000Z
Kattis/How Many Digits/howmanydigits.py
DeepSpace2/Comptitive-Programming
13212d9dbc73ab87519b0596fdb0147d40c7eaa8
[ "MIT" ]
null
null
null
Kattis/How Many Digits/howmanydigits.py
DeepSpace2/Comptitive-Programming
13212d9dbc73ab87519b0596fdb0147d40c7eaa8
[ "MIT" ]
3
2021-07-01T11:46:19.000Z
2021-09-12T13:49:04.000Z
from math import e, log10, pi while True: try: n = int(input()) except EOFError: break if n == 0: print(1) else: print(int(n * log10(n / e) + log10(2 * pi * n) / 2) + 1)
20.181818
64
0.463964
from math import e, log10, pi while True: try: n = int(input()) except EOFError: break if n == 0: print(1) else: print(int(n * log10(n / e) + log10(2 * pi * n) / 2) + 1)
0
0
0
72eb43c27020f9c97d40a6a12b90946e9a888bc7
10,665
py
Python
game24/gameconsole.py
Adoyan-Grigor/game24
4619e953ed94248669759850b9efb812ecf54786
[ "Apache-2.0" ]
null
null
null
game24/gameconsole.py
Adoyan-Grigor/game24
4619e953ed94248669759850b9efb812ecf54786
[ "Apache-2.0" ]
null
null
null
game24/gameconsole.py
Adoyan-Grigor/game24
4619e953ed94248669759850b9efb812ecf54786
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division import sys import argparse import readline import random import traceback try: import builtins raw_input = getattr(builtins, 'input') except ImportError: pass from game24 import calc, game MSG_ME...
30.913043
83
0.509048
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division import sys import argparse import readline import random import traceback try: import builtins raw_input = getattr(builtins, 'input') except ImportError: pass from game24 import calc, game MSG_ME...
6,449
2,524
69
ce74a3c506ce96d7da83678be3ac5f3605bd112f
839
py
Python
dynamodb-serverless/functions/put/handler.py
koki-nakamura22/serverless-framework-practice
b6fb96cc97ecb7a1fa167c7cccb143510466d350
[ "MIT" ]
null
null
null
dynamodb-serverless/functions/put/handler.py
koki-nakamura22/serverless-framework-practice
b6fb96cc97ecb7a1fa167c7cccb143510466d350
[ "MIT" ]
null
null
null
dynamodb-serverless/functions/put/handler.py
koki-nakamura22/serverless-framework-practice
b6fb96cc97ecb7a1fa167c7cccb143510466d350
[ "MIT" ]
null
null
null
import json import os import boto3 from faker import Faker # DynamoDB object dynamodb = boto3.resource('dynamodb') table = dynamodb.Table(f"TestUsersTable-{os.environ['STAGE']}")
20.463415
95
0.588796
import json import os import boto3 from faker import Faker # DynamoDB object dynamodb = boto3.resource('dynamodb') table = dynamodb.Table(f"TestUsersTable-{os.environ['STAGE']}") def __truncate(): response = table.scan() key_names = [ x["AttributeName"] for x in table.key_schema ] delete_keys = [ { k:v ...
586
0
69
8411765f0f08514141bd4c621bce5644bb0156cd
398
py
Python
Chapter07/4985_07_01-logs.py
mapenthusiast/QGIS-Python-Programming-Cookbook-Second-Edition
1b2fefdb09f614a2005976a451f882a198c6c9c5
[ "MIT" ]
43
2017-03-27T18:58:26.000Z
2022-03-25T15:29:45.000Z
Chapter07/4985_07_01-logs.py
mapenthusiast/QGIS-Python-Programming-Cookbook-Second-Edition
1b2fefdb09f614a2005976a451f882a198c6c9c5
[ "MIT" ]
2
2018-07-02T09:23:47.000Z
2018-08-23T13:57:41.000Z
Chapter07/4985_07_01-logs.py
mapenthusiast/QGIS-Python-Programming-Cookbook-Second-Edition
1b2fefdb09f614a2005976a451f882a198c6c9c5
[ "MIT" ]
31
2017-03-08T06:37:22.000Z
2021-12-17T21:51:30.000Z
# Using Log Files # Settings/Options/System/Environment (use custom variables) # QGIS_LOG_FILE=/qgis_data/log.txt # Restart QGIS # Message to log file: QgsLogger.logMessageToFile("This is a message to a log file.") # Message to QGIS Log Window ( yellow triangle icon in the lower right) QgsMessageLog.logMessage("Thi...
36.181818
107
0.776382
# Using Log Files # Settings/Options/System/Environment (use custom variables) # QGIS_LOG_FILE=/qgis_data/log.txt # Restart QGIS # Message to log file: QgsLogger.logMessageToFile("This is a message to a log file.") # Message to QGIS Log Window ( yellow triangle icon in the lower right) QgsMessageLog.logMessage("Thi...
0
0
0
fad016a754f61df9c72c04956901d978db0b6df6
1,500
py
Python
paddleslim/nas/ofa/utils/utils.py
zhuguiqian/PaddleSlim
c363c91c36bb9ada41f755c0ec4df3282ccdd6f0
[ "Apache-2.0" ]
null
null
null
paddleslim/nas/ofa/utils/utils.py
zhuguiqian/PaddleSlim
c363c91c36bb9ada41f755c0ec4df3282ccdd6f0
[ "Apache-2.0" ]
null
null
null
paddleslim/nas/ofa/utils/utils.py
zhuguiqian/PaddleSlim
c363c91c36bb9ada41f755c0ec4df3282ccdd6f0
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
31.914894
74
0.692667
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
793
0
92
9e42668859a3e942dd8cf341d42cb36a048ac54f
3,715
py
Python
backend/openbd.py
n-yU/shisho
dc99a2d90dde3599af62a6a59a4aabf6b5a72011
[ "MIT" ]
1
2021-08-20T05:34:31.000Z
2021-08-20T05:34:31.000Z
backend/openbd.py
n-yU/shisho
dc99a2d90dde3599af62a6a59a4aabf6b5a72011
[ "MIT" ]
null
null
null
backend/openbd.py
n-yU/shisho
dc99a2d90dde3599af62a6a59a4aabf6b5a72011
[ "MIT" ]
null
null
null
from logging import getLogger, StreamHandler, DEBUG, Formatter from typing import Dict, Union import re import json import requests import MeCab from neologdn import normalize # ロガー設定 logger = getLogger(__name__) handler = StreamHandler() handler.setLevel(DEBUG) logger.setLevel(DEBUG) logger.addHandler(handler) logger...
35.04717
155
0.602692
from logging import getLogger, StreamHandler, DEBUG, Formatter from typing import Dict, Union import re import json import requests import MeCab from neologdn import normalize # ロガー設定 logger = getLogger(__name__) handler = StreamHandler() handler.setLevel(DEBUG) logger.setLevel(DEBUG) logger.addHandler(handler) logger...
2,650
1,378
23
f7fe38c9a4b8c5796670a8aa33b5cb1b8bbd7c39
5,246
py
Python
src/jetson/Sensors/sensors_simple.py
ichalkiad/VW_challenge
333222010ecf3d1ca4a0e181239f761c975453e9
[ "Apache-2.0" ]
1
2017-08-16T08:42:49.000Z
2017-08-16T08:42:49.000Z
src/jetson/Sensors/sensors_simple.py
ichalkiad/VW_challenge
333222010ecf3d1ca4a0e181239f761c975453e9
[ "Apache-2.0" ]
4
2017-08-09T23:01:30.000Z
2017-08-24T16:44:13.000Z
src/jetson/Sensors/sensors_simple.py
yhalk/vw_challenge_ECR
c1ff50070d0f7367ccfbf473c69e90fd2be5e85e
[ "Apache-2.0" ]
null
null
null
import paho.mqtt.client as mqtt import ev3dev.ev3 as ev3 import ctypes import numpy as np import sys import cv2 from Sensors.mpu6050.mpu6050 import MPU6050 import smbus from Sensors.odometry import Odometry import sys, serial from serial.tools import list_ports #Create camera sensor object camera = OnBoardCamera() ...
43
280
0.609989
import paho.mqtt.client as mqtt import ev3dev.ev3 as ev3 import ctypes import numpy as np import sys import cv2 from Sensors.mpu6050.mpu6050 import MPU6050 import smbus from Sensors.odometry import Odometry import sys, serial from serial.tools import list_ports class Sensor(object): def __init__(self, *args, **kwa...
3,558
1,012
355
790f64346cac505157953135acdaf67a66ffe6fe
23,905
py
Python
mphys/integrated_forces.py
timryanb/mphys
74560a163034a0006a17811ba1206bab00f1f775
[ "Apache-2.0" ]
8
2022-02-22T18:08:56.000Z
2022-03-14T13:32:46.000Z
mphys/integrated_forces.py
timryanb/mphys
74560a163034a0006a17811ba1206bab00f1f775
[ "Apache-2.0" ]
15
2022-02-22T15:10:15.000Z
2022-03-23T16:15:09.000Z
mphys/integrated_forces.py
timryanb/mphys
74560a163034a0006a17811ba1206bab00f1f775
[ "Apache-2.0" ]
8
2022-02-22T18:08:35.000Z
2022-03-17T16:21:08.000Z
import numpy as np import openmdao.api as om if __name__ == '__main__': check_integrated_surface_force_partials()
53.004435
110
0.474001
import numpy as np import openmdao.api as om class IntegratedSurfaceForces(om.ExplicitComponent): def setup(self): self.add_input('aoa',desc = 'angle of attack', units='rad',tags=['mphys_input']) self.add_input('yaw',desc = 'yaw angle',units='rad',tags=['mphys_input']) self.add_input('ref_a...
23,629
31
126
7c3b77cba219a97b12762ac1a37f632c5f68d380
11,331
py
Python
platformio/project/commands/init.py
ufo2011/platformio-core
0ceae62701731f8b32c34d7993a34dea34aea59c
[ "Apache-2.0" ]
null
null
null
platformio/project/commands/init.py
ufo2011/platformio-core
0ceae62701731f8b32c34d7993a34dea34aea59c
[ "Apache-2.0" ]
null
null
null
platformio/project/commands/init.py
ufo2011/platformio-core
0ceae62701731f8b32c34d7993a34dea34aea59c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
31.828652
119
0.662519
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
9,248
0
252
c91b624711d1778d78556d13356f05fa1dcaaef7
701
py
Python
exercise_monitoring_camera.py
Guvalif/aidor-acceleration-02
afa7aa45bf26f1c2b7f189b6320599357f1e17d3
[ "MIT" ]
1
2018-08-20T02:14:24.000Z
2018-08-20T02:14:24.000Z
exercise_monitoring_camera.py
Guvalif/imedio_0801
afa7aa45bf26f1c2b7f189b6320599357f1e17d3
[ "MIT" ]
null
null
null
exercise_monitoring_camera.py
Guvalif/imedio_0801
afa7aa45bf26f1c2b7f189b6320599357f1e17d3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'Kazuyuki TAKASE' __copyright__ = 'PLEN Project Company Inc, and all authors.' __license__ = 'The MIT License (http://opensource.org/licenses/mit-license.php)' # 外部プログラムの読み込み # ============================================================================= from time import sle...
23.366667
82
0.476462
# -*- coding: utf-8 -*- __author__ = 'Kazuyuki TAKASE' __copyright__ = 'PLEN Project Company Inc, and all authors.' __license__ = 'The MIT License (http://opensource.org/licenses/mit-license.php)' # 外部プログラムの読み込み # ============================================================================= from time import sle...
0
0
0
4cc967e9e9d1ac88abda9c1076b57abe84fc47bc
32,902
py
Python
src/timeseries.py
AmberCrafter/pythonlib_statistic
0fd49283c8dd75c5d1ade064be3318eabf74bdfe
[ "MIT" ]
null
null
null
src/timeseries.py
AmberCrafter/pythonlib_statistic
0fd49283c8dd75c5d1ade064be3318eabf74bdfe
[ "MIT" ]
null
null
null
src/timeseries.py
AmberCrafter/pythonlib_statistic
0fd49283c8dd75c5d1ade064be3318eabf74bdfe
[ "MIT" ]
null
null
null
#!/bin/python3 # if used ubuntu 20.10 or later, interpreter set as #!/bin/python and use pip instead of pip3 # =================================================================== # # platfrom check # dateutil check and import try: from dateutil.relativedelta import relativedelta except: import os,sys,subproces...
43.578808
159
0.554951
#!/bin/python3 # if used ubuntu 20.10 or later, interpreter set as #!/bin/python and use pip instead of pip3 # =================================================================== # # platfrom check # dateutil check and import try: from dateutil.relativedelta import relativedelta except: import os,sys,subproces...
595
0
106
3d40cc9af82e7caa1ec12b7d4fdc7c7db383ac10
701
py
Python
Ago-Dic-2021/diaz-delabra-erick/carpeta-practica-3/calculator.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ago-Dic-2021/diaz-delabra-erick/carpeta-practica-3/calculator.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ago-Dic-2021/diaz-delabra-erick/carpeta-practica-3/calculator.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
import math
24.172414
50
0.510699
import math class Calculator: def __init__(self, a: int, b: int) -> None: self.a = a self.b = b def suma(self) -> int: return self.a + self.b def resta(self) -> int: return self.a - self.b def multiplicacion(self) -> int: return self.a * self.b def...
476
-4
218
f191d89902854c6a45383db6b705fc612cf47791
784
py
Python
mmdet/models/__init__.py
FelixZhang7/miemiedetection
ca44f33255e0bb9d6150044983a344fb9a288c08
[ "Apache-2.0" ]
null
null
null
mmdet/models/__init__.py
FelixZhang7/miemiedetection
ca44f33255e0bb9d6150044983a344fb9a288c08
[ "Apache-2.0" ]
null
null
null
mmdet/models/__init__.py
FelixZhang7/miemiedetection
ca44f33255e0bb9d6150044983a344fb9a288c08
[ "Apache-2.0" ]
1
2022-02-16T08:35:00.000Z
2022-02-16T08:35:00.000Z
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. from .backbones.darknet import CSPDarknet, Darknet from .backbones.resnet_vd import Resnet18Vd, Resnet50Vd from .backbones.resnet_vb import Resnet50Vb from .losses.yolov3_loss import YOLOv3Loss from .losses.losse...
27.034483
63
0.811224
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. from .backbones.darknet import CSPDarknet, Darknet from .backbones.resnet_vd import Resnet18Vd, Resnet50Vd from .backbones.resnet_vb import Resnet50Vb from .losses.yolov3_loss import YOLOv3Loss from .losses.losse...
0
0
0
0468d6c246b239a4fae46a385cc87c22edb5790e
282
py
Python
egs/voxceleb/v2.voxceleb1/scp_ark2npy.py
zeek-han/kaldi
e3ed0812db7abd3c266d5616babfd0adff8260ac
[ "Apache-2.0" ]
null
null
null
egs/voxceleb/v2.voxceleb1/scp_ark2npy.py
zeek-han/kaldi
e3ed0812db7abd3c266d5616babfd0adff8260ac
[ "Apache-2.0" ]
null
null
null
egs/voxceleb/v2.voxceleb1/scp_ark2npy.py
zeek-han/kaldi
e3ed0812db7abd3c266d5616babfd0adff8260ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import numpy as np import kaldiio id2mfcc = kaldiio.load_scp('/home/sangjik/kaldi/egs/voxceleb/v2.smallest/mfcc/raw_mfcc_train.10.scp') for utt_id, mfcc in id2mfcc.items(): #print(utt_id, mfcc.shape) np.save('./tmp_mfcc/{}.npy'.format(utt_id), mfcc)
28.2
101
0.72695
#!/usr/bin/env python import numpy as np import kaldiio id2mfcc = kaldiio.load_scp('/home/sangjik/kaldi/egs/voxceleb/v2.smallest/mfcc/raw_mfcc_train.10.scp') for utt_id, mfcc in id2mfcc.items(): #print(utt_id, mfcc.shape) np.save('./tmp_mfcc/{}.npy'.format(utt_id), mfcc)
0
0
0
b75db27a80b0122a92a95241b891c75aed56b87b
38,348
py
Python
pipeline/publication.py
Yi-61/map-ephys
8eacd84f67678b05bcc379c7d5a9560ea7a87e46
[ "MIT" ]
null
null
null
pipeline/publication.py
Yi-61/map-ephys
8eacd84f67678b05bcc379c7d5a9560ea7a87e46
[ "MIT" ]
null
null
null
pipeline/publication.py
Yi-61/map-ephys
8eacd84f67678b05bcc379c7d5a9560ea7a87e46
[ "MIT" ]
null
null
null
import logging import pathlib import re import os from fnmatch import fnmatch from textwrap import dedent from collections import defaultdict import datajoint as dj from . import lab from . import experiment from . import ephys from . import tracking from .ingest.tracking import TrackingIngest from pipeline.globu...
34.861818
80
0.49854
import logging import pathlib import re import os from fnmatch import fnmatch from textwrap import dedent from collections import defaultdict import datajoint as dj from . import lab from . import experiment from . import ephys from . import tracking from .ingest.tracking import TrackingIngest from pipeline.globu...
11,374
13,905
243
4d8532ecf10ba04d9280c47b5810edf61e1c76f0
311
py
Python
sftp/__init__.py
hiaoxui/span-finder
c5f9886eae12921796b33bdb84ffcb6bfa905cb4
[ "Apache-2.0" ]
3
2021-05-08T15:35:21.000Z
2022-01-24T02:52:55.000Z
sftp/__init__.py
hiaoxui/span-finder
c5f9886eae12921796b33bdb84ffcb6bfa905cb4
[ "Apache-2.0" ]
null
null
null
sftp/__init__.py
hiaoxui/span-finder
c5f9886eae12921796b33bdb84ffcb6bfa905cb4
[ "Apache-2.0" ]
1
2021-09-07T22:31:40.000Z
2021-09-07T22:31:40.000Z
from .data_reader import ( BetterDatasetReader, SRLDatasetReader ) from .metrics import SRLMetric, BaseF, ExactMatch, FBetaMixMeasure from .models import SpanModel from .modules import ( MLPSpanTyping, SpanTyping, SpanFinder, BIOSpanFinder ) from .predictor import SpanPredictor from .utils import Span
28.272727
66
0.807074
from .data_reader import ( BetterDatasetReader, SRLDatasetReader ) from .metrics import SRLMetric, BaseF, ExactMatch, FBetaMixMeasure from .models import SpanModel from .modules import ( MLPSpanTyping, SpanTyping, SpanFinder, BIOSpanFinder ) from .predictor import SpanPredictor from .utils import Span
0
0
0
31ae962fdd5c782121ff85fe6854a2b889e2cbfd
2,334
py
Python
docs/source/examples/7/sample.py
kumar-pratik/hi-ml
a108cf4ea244a76127adedc0ca60f0a5afdfb3e8
[ "MIT" ]
34
2021-08-18T13:27:36.000Z
2022-03-26T01:25:36.000Z
docs/source/examples/7/sample.py
kumar-pratik/hi-ml
a108cf4ea244a76127adedc0ca60f0a5afdfb3e8
[ "MIT" ]
111
2021-08-18T13:19:46.000Z
2022-03-30T05:57:01.000Z
docs/source/examples/7/sample.py
kumar-pratik/hi-ml
a108cf4ea244a76127adedc0ca60f0a5afdfb3e8
[ "MIT" ]
6
2021-09-13T12:07:58.000Z
2022-03-24T16:31:06.000Z
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
39.559322
169
0.654242
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
1,536
0
23
6599733b0213579573a907d9fc5ab78c8a716ed8
510
py
Python
tests/test_cli.py
vfranca/pp
db9e15a490e5b28a177cdcd8f448d21fd5bec8d7
[ "MIT" ]
null
null
null
tests/test_cli.py
vfranca/pp
db9e15a490e5b28a177cdcd8f448d21fd5bec8d7
[ "MIT" ]
null
null
null
tests/test_cli.py
vfranca/pp
db9e15a490e5b28a177cdcd8f448d21fd5bec8d7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from click.testing import CliRunner from pivotpoint import pp from pivotpoint import cli
26.842105
74
0.668627
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from click.testing import CliRunner from pivotpoint import pp from pivotpoint import cli class TestPivotPoint(unittest.TestCase): def setUp(self): self.runner = CliRunner() def tearDown(self): """Tear down test fixtures, if any."""...
191
144
23
6c59951f383e22b4b6dd672512b717c4ad1ef094
1,086
py
Python
rackio/dao/controls.py
crivero7/rackio-framework
d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c
[ "MIT" ]
null
null
null
rackio/dao/controls.py
crivero7/rackio-framework
d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c
[ "MIT" ]
null
null
null
rackio/dao/controls.py
crivero7/rackio-framework
d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """rackio/dao/controls.py This module implements Controls Data Objects Access. """ from .core import RackioDAO
18.40678
52
0.57919
# -*- coding: utf-8 -*- """rackio/dao/controls.py This module implements Controls Data Objects Access. """ from .core import RackioDAO class ControlsDAO(RackioDAO): def get_all(self): app = self.get_app() manager = app.get_manager("control") result = list() for control in ...
777
13
158
b3ba1dada5fdca8c0505e224c5e297d351338eaf
721
py
Python
AddPDFBookmarks/handle_pdf.py
wanghuohuo0716/py-project
b771b8005d72843df1653ce68ddb67ccf77a57a8
[ "MIT" ]
92
2018-02-26T07:59:27.000Z
2022-03-31T08:57:51.000Z
AddPDFBookmarks/handle_pdf.py
Linkeer365/py-project
b771b8005d72843df1653ce68ddb67ccf77a57a8
[ "MIT" ]
2
2020-08-19T00:55:52.000Z
2021-03-08T07:37:32.000Z
AddPDFBookmarks/handle_pdf.py
Linkeer365/py-project
b771b8005d72843df1653ce68ddb67ccf77a57a8
[ "MIT" ]
53
2018-09-07T14:26:33.000Z
2022-03-31T08:57:53.000Z
# coding:utf-8 # 添加PDF书签 from pdf_utils import MyPDFHandler,PDFHandleMode as mode import ConfigParser import sys reload(sys) sys.setdefaultencoding('utf-8') if __name__ == '__main__': main()
31.347826
88
0.71706
# coding:utf-8 # 添加PDF书签 from pdf_utils import MyPDFHandler,PDFHandleMode as mode import ConfigParser import sys reload(sys) sys.setdefaultencoding('utf-8') def main(): # 从配置文件中读取配置信息 cf = ConfigParser.SafeConfigParser() cf.read('./info.conf') pdf_path = cf.get('info','pdf_path') bookm...
516
0
25
28cd58401f73165d35b3541ef644b2fdcb572816
1,638
py
Python
openff/utilities/testing.py
openforcefield/openff-utilities
89255d6cc9513df6ad5293841e86ab1f968f7e3b
[ "MIT" ]
null
null
null
openff/utilities/testing.py
openforcefield/openff-utilities
89255d6cc9513df6ad5293841e86ab1f968f7e3b
[ "MIT" ]
17
2021-06-09T06:46:20.000Z
2022-03-02T00:30:41.000Z
openff/utilities/testing.py
openforcefield/openff-utilities
89255d6cc9513df6ad5293841e86ab1f968f7e3b
[ "MIT" ]
null
null
null
from typing import List, Optional, Union import pytest from openff.utilities.utilities import has_executable, has_package def skip_if_missing(package_name: str, reason: Optional[str] = None): """ Helper function to generate a pytest.mark.skipif decorator for any package. This allows tests to be skipped ...
32.117647
87
0.681319
from typing import List, Optional, Union import pytest from openff.utilities.utilities import has_executable, has_package def skip_if_missing(package_name: str, reason: Optional[str] = None): """ Helper function to generate a pytest.mark.skipif decorator for any package. This allows tests to be skipped ...
0
0
0
8ef5b889f2b72b0ee8d71a6019e587e98cab7064
5,122
py
Python
projects/Show me the Data Structures/problem_1.py
gmendozah/Data-Structures-and-Algorithms
07474db45acfe42855cc0f4cc968c0564b2cb91a
[ "MIT" ]
5
2021-10-08T11:21:08.000Z
2022-01-24T22:40:03.000Z
projects/Show me the Data Structures/problem_1.py
gmendozah/Data-Structures-and-Algorithms
07474db45acfe42855cc0f4cc968c0564b2cb91a
[ "MIT" ]
null
null
null
projects/Show me the Data Structures/problem_1.py
gmendozah/Data-Structures-and-Algorithms
07474db45acfe42855cc0f4cc968c0564b2cb91a
[ "MIT" ]
3
2021-12-13T06:50:58.000Z
2022-02-05T03:38:49.000Z
if __name__ == '__main__': test_case_1() test_case_2() test_case_3()
31.423313
115
0.557595
class Node: def __init__(self, key=None, value=None): self.key = key self.value = value self.next = None self.prev = None class LRU_Cache(object): def __init__(self, capacity): if capacity < 1: print('LRUCache should have capacity > 0') return ...
3,821
1,075
151
8246e38f21bcb46e020f248157401bcc92b6f2e7
45,802
py
Python
hydrus/tests/test_app.py
vcode11/hydrus
4ed8ada7ed8fd7d8897e744bae410b312f4cfb83
[ "MIT" ]
1
2019-12-04T12:54:21.000Z
2019-12-04T12:54:21.000Z
hydrus/tests/test_app.py
vcode11/hydrus
4ed8ada7ed8fd7d8897e744bae410b312f4cfb83
[ "MIT" ]
3
2019-12-21T04:15:23.000Z
2020-04-07T05:11:05.000Z
hydrus/tests/test_app.py
vcode11/hydrus
4ed8ada7ed8fd7d8897e744bae410b312f4cfb83
[ "MIT" ]
null
null
null
"""Test for checking if the response format is proper. Run test_crud before running this.""" import unittest import random import string import json import re import uuid from hydrus.app_factory import app_factory from hydrus.socketio_factory import create_socket from hydrus.utils import set_session, set_doc, ...
51.929705
100
0.550696
"""Test for checking if the response format is proper. Run test_crud before running this.""" import unittest import random import string import json import re import uuid from hydrus.app_factory import app_factory from hydrus.socketio_factory import create_socket from hydrus.utils import set_session, set_doc, ...
10,272
0
203
c06b33ca0266576dd77b1443051d6971f9e82077
801
py
Python
environment.py
LCBRU/hic_covid
eb5a37339185ed71246235e307a81d91dc91f9ec
[ "MIT" ]
null
null
null
environment.py
LCBRU/hic_covid
eb5a37339185ed71246235e307a81d91dc91f9ec
[ "MIT" ]
null
null
null
environment.py
LCBRU/hic_covid
eb5a37339185ed71246235e307a81d91dc91f9ec
[ "MIT" ]
null
null
null
"""Environment Variables """ import os from dotenv import load_dotenv load_dotenv() HIC_DB_USERNAME = os.environ["HIC_DB_USERNAME"] HIC_DB_PASSWORD = os.environ["HIC_DB_PASSWORD"] HIC_DB_HOST = os.environ["HIC_DB_HOST"] HIC_DB_DATABASE = os.environ["HIC_DB_DATABASE"] MS_SQL_ODBC_DRIVER = os.environ["MS...
30.807692
64
0.781523
"""Environment Variables """ import os from dotenv import load_dotenv load_dotenv() HIC_DB_USERNAME = os.environ["HIC_DB_USERNAME"] HIC_DB_PASSWORD = os.environ["HIC_DB_PASSWORD"] HIC_DB_HOST = os.environ["HIC_DB_HOST"] HIC_DB_DATABASE = os.environ["HIC_DB_DATABASE"] MS_SQL_ODBC_DRIVER = os.environ["MS...
0
0
0
f0682b750b96bf2f312eb6ff9f2bea5aef2c5958
390
py
Python
nbd_app/migrations/0007_alter_socialamenities_hotline_number.py
Kevson102/Nbd-Phoenix
509a9cf026d24827dccc9a5ec67819ecd86fbf03
[ "MIT" ]
null
null
null
nbd_app/migrations/0007_alter_socialamenities_hotline_number.py
Kevson102/Nbd-Phoenix
509a9cf026d24827dccc9a5ec67819ecd86fbf03
[ "MIT" ]
null
null
null
nbd_app/migrations/0007_alter_socialamenities_hotline_number.py
Kevson102/Nbd-Phoenix
509a9cf026d24827dccc9a5ec67819ecd86fbf03
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2022-01-03 14:32 from django.db import migrations, models
20.526316
47
0.605128
# Generated by Django 3.2.9 on 2022-01-03 14:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nbd_app', '0006_generalposts'), ] operations = [ migrations.AlterField( model_name='socialamenities', name='hotline_...
0
276
23
a68bccebe211588992d72d7335645e18121c4bf1
1,039
py
Python
python/icp.py
nowtechnologies/ridi_imu
2d8a8e54d0491c44de7edac662b101db47ad3cfc
[ "MIT" ]
140
2018-05-27T16:11:40.000Z
2022-03-28T15:49:28.000Z
python/icp.py
nowtechnologies/ridi_imu
2d8a8e54d0491c44de7edac662b101db47ad3cfc
[ "MIT" ]
13
2018-07-16T20:59:58.000Z
2021-12-09T08:35:43.000Z
python/icp.py
nowtechnologies/ridi_imu
2d8a8e54d0491c44de7edac662b101db47ad3cfc
[ "MIT" ]
58
2018-02-14T03:53:51.000Z
2022-03-07T15:59:41.000Z
import numpy as np def fit_transformation(source, target): """ This function computes the best rigid transformation between two point sets. It assumes that "source" and "target" are with the same length and "source[i]" corresponds to "target[i]". :param source: Nxd array. :param target: Nxd ...
33.516129
109
0.627526
import numpy as np def fit_transformation(source, target): """ This function computes the best rigid transformation between two point sets. It assumes that "source" and "target" are with the same length and "source[i]" corresponds to "target[i]". :param source: Nxd array. :param target: Nxd ...
0
0
0
d22e0e78871a5ab8c68a346843dd049461897cb0
1,887
py
Python
codechef/long-challenge/may21/MODEQ.py
ramanaditya/data-structure-and-algorithms
8dcfeb011e76b2b38b54842e8ccc7a59728141f8
[ "MIT" ]
81
2020-05-22T14:22:04.000Z
2021-12-18T10:11:23.000Z
codechef/long-challenge/may21/MODEQ.py
techhub-community/data-structure-and-algorithms
8dcfeb011e76b2b38b54842e8ccc7a59728141f8
[ "MIT" ]
4
2020-08-06T21:08:00.000Z
2021-03-31T16:07:50.000Z
codechef/long-challenge/may21/MODEQ.py
techhub-community/data-structure-and-algorithms
8dcfeb011e76b2b38b54842e8ccc7a59728141f8
[ "MIT" ]
37
2020-05-22T14:25:21.000Z
2021-12-30T03:13:13.000Z
""" [Modular Equation](https://www.codechef.com/MAY21C/problems/MODEQ) Given integers N and M, find the number of ordered pairs (a,b) such that 1≤a<b≤N and ((M mod a) mod b)=((M mod b) mod a). Input The first line contains an integer T, the number of test cases. Then the test cases follow. The only line of each test ...
19.255102
91
0.569687
""" [Modular Equation](https://www.codechef.com/MAY21C/problems/MODEQ) Given integers N and M, find the number of ordered pairs (a,b) such that 1≤a<b≤N and ((M mod a) mod b)=((M mod b) mod a). Input The first line contains an integer T, the number of test cases. Then the test cases follow. The only line of each test ...
0
0
0
836b1d1ef0eb551fa9e79cfab6310f6344d73c36
1,870
py
Python
invana_bot/manifests/single.py
subhead/invana-bot
c60883986acd1baf279ccbe74dfe06435680fba9
[ "MIT" ]
23
2019-01-31T08:04:39.000Z
2021-12-20T15:55:27.000Z
invana_bot/manifests/single.py
subhead/invana-bot
c60883986acd1baf279ccbe74dfe06435680fba9
[ "MIT" ]
12
2019-02-13T04:59:38.000Z
2021-12-13T20:43:07.000Z
invana_bot/manifests/single.py
subhead/invana-bot
c60883986acd1baf279ccbe74dfe06435680fba9
[ "MIT" ]
4
2019-02-10T18:27:33.000Z
2019-07-12T17:52:36.000Z
import sys import os import yaml class SingleCrawlerManifestManager(object): """ """ required_files = ["spider_manifest.json", "spider_manifest.py"]
35.283019
109
0.661497
import sys import os import yaml class SingleCrawlerManifestManager(object): """ """ required_files = ["spider_manifest.json", "spider_manifest.py"] def __init__(self, config_path=None): print("Setting ETI path as: {}".format(config_path)) self.config_path = config_path def im...
1,569
0
135
ba156beb04b99754b5ff29ec37e1bcc01509b22c
2,838
py
Python
swam/src/mavros_set_home.py
donghee/swam-indoor-flight
bad8adce428e0adacb0f4110ca5739f31a9a11f8
[ "Apache-2.0" ]
null
null
null
swam/src/mavros_set_home.py
donghee/swam-indoor-flight
bad8adce428e0adacb0f4110ca5739f31a9a11f8
[ "Apache-2.0" ]
null
null
null
swam/src/mavros_set_home.py
donghee/swam-indoor-flight
bad8adce428e0adacb0f4110ca5739f31a9a11f8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ## # # Send SET_GPS_GLOBAL_ORIGIN and SET_HOME_POSITION messages # ## import rospy from pymavlink.dialects.v10 import ardupilotmega as MAV_APM from mavros.mavlink import convert_to_rosmsg from mavros_msgs.msg import Mavlink class fifo(object): """ A simple buffer """ def send_message(msg,...
22.704
76
0.582805
#!/usr/bin/env python ## # # Send SET_GPS_GLOBAL_ORIGIN and SET_HOME_POSITION messages # ## import rospy from pymavlink.dialects.v10 import ardupilotmega as MAV_APM from mavros.mavlink import convert_to_rosmsg from mavros_msgs.msg import Mavlink class fifo(object): """ A simple buffer """ def __init__(self)...
674
0
101
c71a1bff4f3192e1d1ec8a670f9e040c334dc954
3,344
py
Python
tests/clims/api/serializers/models/test_process_definition.py
commonlims/commonlims
36a02ed244c7b59ee1f2523e64e4749e404ab0f7
[ "BSD-3-Clause" ]
4
2019-05-27T13:55:07.000Z
2021-03-30T07:05:09.000Z
tests/clims/api/serializers/models/test_process_definition.py
commonlims/commonlims
36a02ed244c7b59ee1f2523e64e4749e404ab0f7
[ "BSD-3-Clause" ]
99
2019-05-20T14:16:33.000Z
2021-01-19T09:25:15.000Z
tests/clims/api/serializers/models/test_process_definition.py
commonlims/commonlims
36a02ed244c7b59ee1f2523e64e4749e404ab0f7
[ "BSD-3-Clause" ]
1
2020-08-10T07:55:40.000Z
2020-08-10T07:55:40.000Z
from __future__ import absolute_import from tests.clims.models.test_substance import SubstanceTestCase from clims.plugins.demo.dnaseq.workflows.sequence import SequenceSimple from clims.api.serializers.models.process_definition import ProcessDefinitionSerializer expected_sequence_simple = { 'id': u'clims.pl...
32.466019
87
0.566089
from __future__ import absolute_import from tests.clims.models.test_substance import SubstanceTestCase from clims.plugins.demo.dnaseq.workflows.sequence import SequenceSimple from clims.api.serializers.models.process_definition import ProcessDefinitionSerializer class ProcessDefinitionSerializerTest(SubstanceTestCas...
153
36
49
6ce3cc168aa038a313b9bba66d4ce994e8318fc9
2,306
py
Python
app/__init__.py
x14119641/tracker
bd16897848c23c461d5d4b7a353eedd8f17367a6
[ "MIT" ]
null
null
null
app/__init__.py
x14119641/tracker
bd16897848c23c461d5d4b7a353eedd8f17367a6
[ "MIT" ]
null
null
null
app/__init__.py
x14119641/tracker
bd16897848c23c461d5d4b7a353eedd8f17367a6
[ "MIT" ]
null
null
null
from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import LoginManager from logging.handlers import SMTPHandler,RotatingFileHandler from flask_mail import Mail, Message import logging,os, smtplib from threading import Thread app...
36.603175
183
0.666522
from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import LoginManager from logging.handlers import SMTPHandler,RotatingFileHandler from flask_mail import Mail, Message import logging,os, smtplib from threading import Thread app...
276
0
26
10521b97d7d1e032daf03879ad3e7c6638f79485
1,526
py
Python
Python Fundamentals/Regular Expressions/More Exercises/Task02_3.py
DonikaChervenkova/SoftUni
bff579c037ec48f39ed193b34bc3502a32e90732
[ "MIT" ]
1
2022-03-16T10:23:04.000Z
2022-03-16T10:23:04.000Z
Python Fundamentals/Regular Expressions/More Exercise/Task02_02.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
Python Fundamentals/Regular Expressions/More Exercise/Task02_02.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
1
2021-12-04T12:30:57.000Z
2021-12-04T12:30:57.000Z
import re data = input() total_income = 0 while data != "end of shift": pattern_customer = r"\%(?P<customer>[A-Z][a-z]+)\%" customer = re.finditer(pattern_customer, data) is_customer = bool([c.group(0) for c in customer]) pattern_product = r"\<(?P<product>[0-9a-zA-Z\_]+)\>" product = re.finditer(...
31.791667
100
0.619921
import re data = input() total_income = 0 while data != "end of shift": pattern_customer = r"\%(?P<customer>[A-Z][a-z]+)\%" customer = re.finditer(pattern_customer, data) is_customer = bool([c.group(0) for c in customer]) pattern_product = r"\<(?P<product>[0-9a-zA-Z\_]+)\>" product = re.finditer(...
0
0
0
3655fbbcf0aa34a78e5e06dada0505806b450706
789
py
Python
drawShapes.py
Shubhra1906/OpenCV
dc2b3291562bab54506380c52ac74ecb06adb8d3
[ "MIT" ]
null
null
null
drawShapes.py
Shubhra1906/OpenCV
dc2b3291562bab54506380c52ac74ecb06adb8d3
[ "MIT" ]
null
null
null
drawShapes.py
Shubhra1906/OpenCV
dc2b3291562bab54506380c52ac74ecb06adb8d3
[ "MIT" ]
null
null
null
import cv2 as cv import numpy as np from matplotlib import pyplot as plt if __name__ == '__main__': drawShapes()
27.206897
71
0.567807
import cv2 as cv import numpy as np from matplotlib import pyplot as plt def drawShapes(): image = cv.imread('./img/sea.jpg') # img = np.zeros([600, 800, 3], np.uint8) # line image = cv.line(image, (40, 100), (255, 255), (0, 0, 255), 5) # Arrowed Line image = cv.arrowedLine(image, (0, 255), (5...
646
0
23
57b3acfb96da7afb637bdd2beedbb9da791d379a
3,352
py
Python
tests/test_util.py
willkg/francis
c727fa5eaa77662277f95fbf000f7afc71cbbed4
[ "MIT" ]
2
2018-07-26T07:18:54.000Z
2018-09-06T16:47:18.000Z
tests/test_util.py
willkg/francis
c727fa5eaa77662277f95fbf000f7afc71cbbed4
[ "MIT" ]
6
2016-07-22T15:09:18.000Z
2016-07-22T23:25:39.000Z
tests/test_util.py
willkg/francis
c727fa5eaa77662277f95fbf000f7afc71cbbed4
[ "MIT" ]
null
null
null
import datetime import pytest from francis.util import ( parse_date, parse_rc, prettytable, ) # FIXME: test multiple > 40 columns
29.928571
83
0.488962
import datetime import pytest from francis.util import ( parse_date, parse_rc, prettytable, ) class Test_parse_rc: def test_empty(self): assert parse_rc('') == {} def test_key_val(self): assert parse_rc('foo=bar') == {'foo': 'bar'} assert parse_rc('\n foo = bar ') == {'f...
2,205
685
310
cd5c17b028d7e8b3a56676c62432707a97d11c80
247
py
Python
ML/newton.py
siriusctrl/UniPublic
9df7f8bb9d1209de2af8ac4b5f57ada38587ad50
[ "Apache-2.0" ]
8
2021-03-14T14:19:10.000Z
2021-07-13T12:35:26.000Z
ML/newton.py
Sirius-ctrl/UniPublic
9df7f8bb9d1209de2af8ac4b5f57ada38587ad50
[ "Apache-2.0" ]
2
2018-05-29T04:28:20.000Z
2018-06-09T04:55:19.000Z
ML/newton.py
Sirius-ctrl/UniPublic
9df7f8bb9d1209de2af8ac4b5f57ada38587ad50
[ "Apache-2.0" ]
4
2019-01-10T10:30:33.000Z
2019-05-30T09:33:20.000Z
import math
16.466667
43
0.493927
import math def newton(n, e): theta = n/2 error = 99999 count = 0 while(error > e): theta -= (theta**2 - n) / (2*theta) error = theta**2 - n count += 1 print("guess", count, "times") return theta
212
0
23
7eedddac8d7d9c1d55b9ac6e1b3b84147bbbd112
28
py
Python
storedisagg/example/__init__.py
mcsoini/storedisagg
3fa360234995cdee897122ea8d85bc8658229053
[ "MIT" ]
null
null
null
storedisagg/example/__init__.py
mcsoini/storedisagg
3fa360234995cdee897122ea8d85bc8658229053
[ "MIT" ]
null
null
null
storedisagg/example/__init__.py
mcsoini/storedisagg
3fa360234995cdee897122ea8d85bc8658229053
[ "MIT" ]
null
null
null
__all__ = ['example_data']
9.333333
26
0.678571
__all__ = ['example_data']
0
0
0
a39283f2f128ca0dec249a7d9063c5194c19d4e4
3,090
py
Python
loanPrediction3/src_old/ensemble.py
MayukhSobo/AnalyticsVidya_Contests
a21079f8d217a35e88e72e88233c7ef0b8dd348b
[ "BSD-3-Clause" ]
11
2017-09-22T08:12:04.000Z
2021-10-30T14:30:44.000Z
loanPrediction3/src_old/ensemble.py
Manish041997/AnalyticsVidya_Contests
a21079f8d217a35e88e72e88233c7ef0b8dd348b
[ "BSD-3-Clause" ]
null
null
null
loanPrediction3/src_old/ensemble.py
Manish041997/AnalyticsVidya_Contests
a21079f8d217a35e88e72e88233c7ef0b8dd348b
[ "BSD-3-Clause" ]
5
2017-10-03T12:09:11.000Z
2019-08-03T14:05:47.000Z
from xgboost.sklearn import XGBClassifier # from xgb_model import xgb_model_fit # from sklearn.grid_search import GridSearchCV from sklearn.ensemble import VotingClassifier from sklearn.metrics import accuracy_score import pandas as pd from sklearn.model_selection import train_test_split import numpy as np from sklearn...
27.589286
122
0.733333
from xgboost.sklearn import XGBClassifier # from xgb_model import xgb_model_fit # from sklearn.grid_search import GridSearchCV from sklearn.ensemble import VotingClassifier from sklearn.metrics import accuracy_score import pandas as pd from sklearn.model_selection import train_test_split import numpy as np from sklearn...
0
0
0
442885ee6cfa521582e9f66dbef3c77656fe3fce
11,656
py
Python
data/format_wikibio.py
KaijuML/dtt-multi-branch
a49850a95034e58d387b9d48c647cfc2b83c45b5
[ "Apache-2.0" ]
8
2021-02-25T08:19:55.000Z
2022-03-12T06:25:36.000Z
data/format_wikibio.py
KaijuML/dtt-multi-branch
a49850a95034e58d387b9d48c647cfc2b83c45b5
[ "Apache-2.0" ]
5
2021-05-20T19:11:58.000Z
2021-07-14T07:46:33.000Z
data/format_wikibio.py
KaijuML/dtt-multi-branch
a49850a95034e58d387b9d48c647cfc2b83c45b5
[ "Apache-2.0" ]
null
null
null
from utils import nwise import pkg_resources import re, time, os import itertools import argparse import numpy import json DELIM = u"│" # delim used by onmt def split_infobox(dataset_folder, destination_folder): """ extract box content, field type and position information from infoboxes from original_data ...
41.187279
105
0.573267
from utils import nwise import pkg_resources import re, time, os import itertools import argparse import numpy import json DELIM = u"│" # delim used by onmt def split_infobox(dataset_folder, destination_folder): """ extract box content, field type and position information from infoboxes from original_data ...
4,711
0
115
26cc0c3344909259086172abac7c8974633f63f8
6,039
py
Python
recalibration.py
DanielAndreasen/pymoog
1d4042705c5180a6e609d08e7455d3d893e86392
[ "MIT" ]
null
null
null
recalibration.py
DanielAndreasen/pymoog
1d4042705c5180a6e609d08e7455d3d893e86392
[ "MIT" ]
3
2015-01-31T15:36:38.000Z
2015-07-06T22:11:42.000Z
recalibration.py
DanielAndreasen/pymoog
1d4042705c5180a6e609d08e7455d3d893e86392
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- # My imports from __future__ import division import numpy as np import pandas as pd import argparse from utils import _update_par as updateBatch from utils import _run_moog as runMoog from utils import Readmoog from interpolation import interpolator import os def solar_ab...
37.04908
133
0.560689
#!/usr/bin/env python # -*- coding: utf8 -*- # My imports from __future__ import division import numpy as np import pandas as pd import argparse from utils import _update_par as updateBatch from utils import _run_moog as runMoog from utils import Readmoog from interpolation import interpolator import os def solar_ab...
1,357
0
50
1b7145ed8bd88d7082cc74667eb42dcf2d744fe3
3,103
py
Python
armi/bookkeeping/db/database.py
celikten/armi
4e100dd514a59caa9c502bd5a0967fd77fdaf00e
[ "Apache-2.0" ]
1
2021-05-29T16:02:31.000Z
2021-05-29T16:02:31.000Z
armi/bookkeeping/db/database.py
celikten/armi
4e100dd514a59caa9c502bd5a0967fd77fdaf00e
[ "Apache-2.0" ]
null
null
null
armi/bookkeeping/db/database.py
celikten/armi
4e100dd514a59caa9c502bd5a0967fd77fdaf00e
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
34.865169
88
0.682565
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
404
0
188
eb785d59f66731316d04178e89fe3c2b7adfe88a
7,697
py
Python
src/kogniserver/adm.py
aleneum/rsb-wamp-bridge
4c6401f9f1997294b5891fa814e700986612ebdb
[ "MIT" ]
null
null
null
src/kogniserver/adm.py
aleneum/rsb-wamp-bridge
4c6401f9f1997294b5891fa814e700986612ebdb
[ "MIT" ]
2
2016-08-05T13:52:45.000Z
2016-08-05T14:16:42.000Z
src/kogniserver/adm.py
aleneum/kogniserver
4c6401f9f1997294b5891fa814e700986612ebdb
[ "MIT" ]
null
null
null
import argparse from os import makedirs from os.path import abspath, exists, join, dirname, expanduser import re import subprocess import time import json import threading import socket import sys CONFIG_JSON = """ { "version": 2, "controller": {}, "workers": [ { "transports": [ { ...
33.176724
121
0.509809
import argparse from os import makedirs from os.path import abspath, exists, join, dirname, expanduser import re import subprocess import time import json import threading import socket import sys def run_crossbar(config_path, keep_alive): ret = subprocess.call(['crossbar', 'status']) if ret == 0 and not keep...
5,950
0
69
d0fce2cb257f939d5dd37e46b222ea6b9fa3b758
369
py
Python
LeetcodeAlgorithms/315. Count of Smaller Numbers After Self/count-of-smaller-numbers-after-self.py
Fenghuapiao/PyLeetcode
d804a62643fe935eb61808196a2c093ea9583654
[ "MIT" ]
3
2019-08-20T06:54:38.000Z
2022-01-07T12:56:46.000Z
LeetcodeAlgorithms/315. Count of Smaller Numbers After Self/count-of-smaller-numbers-after-self.py
yhangf/PyLeetcode
d804a62643fe935eb61808196a2c093ea9583654
[ "MIT" ]
null
null
null
LeetcodeAlgorithms/315. Count of Smaller Numbers After Self/count-of-smaller-numbers-after-self.py
yhangf/PyLeetcode
d804a62643fe935eb61808196a2c093ea9583654
[ "MIT" ]
2
2018-11-01T16:10:34.000Z
2020-06-02T03:24:43.000Z
import bisect
26.357143
47
0.468835
import bisect class Solution(object): def countSmaller(self, nums): """ :type nums: List[int] :rtype: List[int] """ ans = [] bst = [] for num in reversed(nums): idx = bisect.bisect_left(bst, num) ans.append(idx) ...
0
333
22
8c8034428e29fd160cf8e41c0c7d98c8aa53bb4b
1,867
py
Python
10205/10205.py
Keilan/uva
4218328466c3ab2fdf34cdf45fc7a8dea90964bc
[ "MIT" ]
null
null
null
10205/10205.py
Keilan/uva
4218328466c3ab2fdf34cdf45fc7a8dea90964bc
[ "MIT" ]
null
null
null
10205/10205.py
Keilan/uva
4218328466c3ab2fdf34cdf45fc7a8dea90964bc
[ "MIT" ]
null
null
null
import sys shuffle()
28.723077
99
0.547938
import sys class Card: def __init__(self, rank, suit): self.rank = rank self.suit = suit @classmethod def from_position(cls, position): """ Given a number from 1 to 52, creates the card in the correct position assuming the deck is sorted by alphabetical suits and t...
1,243
553
46
4f1c141f04a988a04635609952303d8c99c330a8
1,275
py
Python
design-patterns/ddbreplica_lambda.py
weisisheng/amazon-dynamodb-labs
76b9b72b3d16bb7b93e313c48dc8efcd981e18f7
[ "Apache-2.0" ]
109
2020-01-17T05:24:10.000Z
2022-03-18T18:31:10.000Z
design-patterns/ddbreplica_lambda.py
weisisheng/amazon-dynamodb-labs
76b9b72b3d16bb7b93e313c48dc8efcd981e18f7
[ "Apache-2.0" ]
41
2020-01-22T21:18:08.000Z
2022-02-16T19:49:43.000Z
design-patterns/ddbreplica_lambda.py
weisisheng/amazon-dynamodb-labs
76b9b72b3d16bb7b93e313c48dc8efcd981e18f7
[ "Apache-2.0" ]
74
2020-01-16T23:07:46.000Z
2022-03-31T11:39:31.000Z
import json import time import urllib import boto3 import traceback from lab_config import boto_args from boto3.dynamodb.types import TypeDeserializer
29.651163
79
0.676863
import json import time import urllib import boto3 import traceback from lab_config import boto_args from boto3.dynamodb.types import TypeDeserializer class StreamTypeDeserializer(TypeDeserializer): def _deserialize_n(self, value): return int(value) def _deserialize_b(self, value): return value...
954
26
144
803f3c5cd78d87ab3c97e23ccd0aab8fcc148c64
10,172
py
Python
networking_f5_ml2/plugins/ml2/drivers/mech_f5/agent/f5_agent.py
sapcc/networking-f5-ml2
03739c1362df80510739afbdc937b5ec68591c52
[ "Apache-2.0" ]
null
null
null
networking_f5_ml2/plugins/ml2/drivers/mech_f5/agent/f5_agent.py
sapcc/networking-f5-ml2
03739c1362df80510739afbdc937b5ec68591c52
[ "Apache-2.0" ]
null
null
null
networking_f5_ml2/plugins/ml2/drivers/mech_f5/agent/f5_agent.py
sapcc/networking-f5-ml2
03739c1362df80510739afbdc937b5ec68591c52
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 SAP SE # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
36.855072
122
0.608238
# Copyright 2016 SAP SE # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
8,131
484
23
1a75c8a8fd2beddcfde21f65f430272b0cbb7ae4
1,732
py
Python
lstm.py
KT12/hands_on_machine_learning
6de2292b43d7c34b6509ad61dab2da4f7ec04894
[ "MIT" ]
null
null
null
lstm.py
KT12/hands_on_machine_learning
6de2292b43d7c34b6509ad61dab2da4f7ec04894
[ "MIT" ]
null
null
null
lstm.py
KT12/hands_on_machine_learning
6de2292b43d7c34b6509ad61dab2da4f7ec04894
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np tf.set_random_seed(5) n_inputs = 28 n_neurons = 150 n_layers = 3 n_steps = 28 n_outputs = 10 learning_rate = 0.001 from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/tmp/data/") X_test = mnist.test.images.reshape((-1, n_steps, n_...
33.960784
111
0.732102
import tensorflow as tf import numpy as np tf.set_random_seed(5) n_inputs = 28 n_neurons = 150 n_layers = 3 n_steps = 28 n_outputs = 10 learning_rate = 0.001 from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/tmp/data/") X_test = mnist.test.images.reshape((-1, n_steps, n_...
0
0
0
22230bd8b1f3797e8dc3f1afa43c1e2179290ce4
19,313
py
Python
dygiepp/dygie/models/dygie.py
feiLinX/SciREX
768c869af746f4a61b3d58b15897e03caa5e2d32
[ "Apache-2.0" ]
99
2020-05-04T11:07:00.000Z
2022-03-30T12:55:00.000Z
dygiepp/dygie/models/dygie.py
feiLinX/SciREX
768c869af746f4a61b3d58b15897e03caa5e2d32
[ "Apache-2.0" ]
13
2020-08-05T18:22:44.000Z
2021-05-06T21:35:05.000Z
dygiepp/dygie/models/dygie.py
feiLinX/SciREX
768c869af746f4a61b3d58b15897e03caa5e2d32
[ "Apache-2.0" ]
24
2020-07-09T13:37:42.000Z
2022-03-26T09:56:43.000Z
from os import path import logging from typing import Dict, List, Optional import copy import torch import torch.nn.functional as F from overrides import overrides from allennlp.data import Vocabulary from allennlp.common.params import Params from allennlp.models.model import Model from allennlp.modules import Seq2Se...
47.68642
166
0.622741
from os import path import logging from typing import Dict, List, Optional import copy import torch import torch.nn.functional as F from overrides import overrides from allennlp.data import Vocabulary from allennlp.common.params import Params from allennlp.models.model import Model from allennlp.modules import Seq2Se...
3,981
0
53
665c07f5066184b2d353592c7cd71270f8ccbf8a
4,245
py
Python
utils.py
vdumoulin/espresso-shot
b8113b52e8468c659bd762f7d22243269bef3984
[ "MIT" ]
null
null
null
utils.py
vdumoulin/espresso-shot
b8113b52e8468c659bd762f7d22243269bef3984
[ "MIT" ]
null
null
null
utils.py
vdumoulin/espresso-shot
b8113b52e8468c659bd762f7d22243269bef3984
[ "MIT" ]
null
null
null
"""Utility functions.""" import enum import json import struct import subprocess import time import numpy as np # Measurements contain 5 floats (elapsed_time, basket_resistance, # group_resistance, basket_temperature, and group_temperature) and an int # (state, for which 0, 1, 2, and 3 map to START, RUNNING, STOP, an...
30.106383
79
0.673027
"""Utility functions.""" import enum import json import struct import subprocess import time import numpy as np # Measurements contain 5 floats (elapsed_time, basket_resistance, # group_resistance, basket_temperature, and group_temperature) and an int # (state, for which 0, 1, 2, and 3 map to START, RUNNING, STOP, an...
1,557
56
73
d63c354c403a2f8213840fefd6b381f385a4e15a
239
py
Python
setup.py
jangroth/gtit-cv
6c912dcd11ced9f6613a36697a99eac86bf6480e
[ "MIT" ]
2
2021-09-27T17:55:54.000Z
2021-11-15T11:43:02.000Z
setup.py
jangroth/git-cv
6c912dcd11ced9f6613a36697a99eac86bf6480e
[ "MIT" ]
null
null
null
setup.py
jangroth/git-cv
6c912dcd11ced9f6613a36697a99eac86bf6480e
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="gitcv", version="0.1", packages=find_packages(), author="Jan Groth", license="MIT License", setup_requires=['pytest-runner'], tests_require=['pytest'] )
19.916667
43
0.661088
from setuptools import setup, find_packages setup( name="gitcv", version="0.1", packages=find_packages(), author="Jan Groth", license="MIT License", setup_requires=['pytest-runner'], tests_require=['pytest'] )
0
0
0
a573cae0a3b0113b03c43c3f97dc1f74f8754061
1,653
py
Python
sine_attractors.py
dcxSt/attractors
7df0fc593ca7bc2dbc05d488b1742fc359cf6c7f
[ "MIT" ]
1
2021-11-07T11:56:53.000Z
2021-11-07T11:56:53.000Z
sine_attractors.py
dcxSt/attractors
7df0fc593ca7bc2dbc05d488b1742fc359cf6c7f
[ "MIT" ]
null
null
null
sine_attractors.py
dcxSt/attractors
7df0fc593ca7bc2dbc05d488b1742fc359cf6c7f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # http://paulbourke.net/fractals/clifford/?curius=373 # In[13]: import numpy as np import math as m import matplotlib.pyplot as plt # In[65]: a = -1.5 b = 1.6 c = 1.2 d = 0.7 # In[66]: # In[ ]: # In[77]: sidelength = 8192 center = (sidelength // 2 , sidelength ...
17.967391
75
0.586812
#!/usr/bin/env python # coding: utf-8 # http://paulbourke.net/fractals/clifford/?curius=373 # In[13]: import numpy as np import math as m import matplotlib.pyplot as plt # In[65]: a = -1.5 b = 1.6 c = 1.2 d = 0.7 # In[66]: def update(x,y): # takes floats, returns updated floats xnew = m.sin(a * y) ...
146
0
23
0f36567e3c2d414731c0ed12a4624896fc40e0c8
4,105
py
Python
bot.py
MistyScene/AutoForms
e5391e95acfc1aaeae5bec635845203f7ff6b027
[ "MIT" ]
null
null
null
bot.py
MistyScene/AutoForms
e5391e95acfc1aaeae5bec635845203f7ff6b027
[ "MIT" ]
null
null
null
bot.py
MistyScene/AutoForms
e5391e95acfc1aaeae5bec635845203f7ff6b027
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import discord from discord import Embed from discord.ext import tasks from datetime import datetime import os import requests import random import json TOKEN = os.environ["TOKEN"] client = discord.Client(intents=discord.Intents.all()) # 次回送信予定時刻を06:00-8:30までの間でランダムに設定 ti...
34.208333
120
0.625335
# -*- coding: utf-8 -*- import discord from discord import Embed from discord.ext import tasks from datetime import datetime import os import requests import random import json TOKEN = os.environ["TOKEN"] client = discord.Client(intents=discord.Intents.all()) # 次回送信予定時刻を06:00-8:30までの間でランダムに設定 def sett...
3,883
0
190
5609448a8b557b5dc9ac459a5689d4f1819a5e51
4,141
py
Python
exam.py
mfshiu/dog-siamese
3e9077f2231d9cc9ac8eea5ac246901d2d5e6729
[ "MIT" ]
null
null
null
exam.py
mfshiu/dog-siamese
3e9077f2231d9cc9ac8eea5ac246901d2d5e6729
[ "MIT" ]
null
null
null
exam.py
mfshiu/dog-siamese
3e9077f2231d9cc9ac8eea5ac246901d2d5e6729
[ "MIT" ]
null
null
null
import os import sys import torch from config import Config from train3 import image_size from model import SiameseNetwork from evaluate3 import TestDataset from torch.utils.data import DataLoader use_gpu = False register_dir = "./data/ct0202a/" threshold = 50 siam_model = None log_lines = [] ## if __name__ == '__m...
31.853846
99
0.581744
import os import sys import torch from config import Config from train3 import image_size from model import SiameseNetwork from evaluate3 import TestDataset from torch.utils.data import DataLoader use_gpu = False register_dir = "./data/ct0202a/" threshold = 50 siam_model = None log_lines = [] ## def exam_dog(dog_id, ...
1,523
0
46
e460f5ef73e060f6a64ca12aa77375e312b5b1cf
3,974
py
Python
auxiliary/auxiliary.py
burakbalaban/student-project-burakbalaban
1b58ab1896e65937c16d9f5b4ff1a8bddc2d2db7
[ "MIT" ]
null
null
null
auxiliary/auxiliary.py
burakbalaban/student-project-burakbalaban
1b58ab1896e65937c16d9f5b4ff1a8bddc2d2db7
[ "MIT" ]
null
null
null
auxiliary/auxiliary.py
burakbalaban/student-project-burakbalaban
1b58ab1896e65937c16d9f5b4ff1a8bddc2d2db7
[ "MIT" ]
null
null
null
"""This module contains auxiliary function which we use in the example notebook.""" import json import matplotlib.patches as mpatches import matplotlib.pyplot as plt from scipy.stats import norm import pandas as pd import numpy as np from grmpy.estimate.estimate_output import calculate_mte from grmpy.read.read import...
36.458716
92
0.657776
"""This module contains auxiliary function which we use in the example notebook.""" import json import matplotlib.patches as mpatches import matplotlib.pyplot as plt from scipy.stats import norm import pandas as pd import numpy as np from grmpy.estimate.estimate_output import calculate_mte from grmpy.read.read import...
0
0
0
375be2219b434f699514d5dfd0f487eacc8beb7f
8,132
py
Python
dataentry/models.py
louisdijkstra/kumbhmela-metadata
59c6f22d0d5b307617ff03e3700c089f209788bf
[ "MIT" ]
null
null
null
dataentry/models.py
louisdijkstra/kumbhmela-metadata
59c6f22d0d5b307617ff03e3700c089f209788bf
[ "MIT" ]
null
null
null
dataentry/models.py
louisdijkstra/kumbhmela-metadata
59c6f22d0d5b307617ff03e3700c089f209788bf
[ "MIT" ]
null
null
null
from django.db import models from django.utils.encoding import python_2_unicode_compatible """ Contains the models/tables for the kumbhmela_db.sqlite3 database. Every field has (when necessary) a 'help_text' that explains the meaning of the field. """ __author__ = "Louis Dijkstra" @python_2_unicode_compatib...
33.883333
107
0.688269
from django.db import models from django.utils.encoding import python_2_unicode_compatible """ Contains the models/tables for the kumbhmela_db.sqlite3 database. Every field has (when necessary) a 'help_text' that explains the meaning of the field. """ __author__ = "Louis Dijkstra" @python_2_unicode_compatib...
231
0
195
7cbb4eae4e6ffdbfc230e0a6bca2576aecfb51ea
8,954
py
Python
generalexam/plotting/front_plotting.py
thunderhoser/GeneralExam
95b99a16fdaa67dae69586c7f7c76e27ccd4b89a
[ "MIT" ]
4
2019-05-10T11:03:48.000Z
2020-10-19T08:04:09.000Z
generalexam/plotting/front_plotting.py
thunderhoser/GeneralExam
95b99a16fdaa67dae69586c7f7c76e27ccd4b89a
[ "MIT" ]
null
null
null
generalexam/plotting/front_plotting.py
thunderhoser/GeneralExam
95b99a16fdaa67dae69586c7f7c76e27ccd4b89a
[ "MIT" ]
3
2020-11-19T08:16:31.000Z
2021-03-04T02:30:15.000Z
"""Plotting methods for warm and cold fronts.""" import numpy import matplotlib matplotlib.use('agg') import matplotlib.colors from gewittergefahr.gg_utils import longitude_conversion as lng_conversion from gewittergefahr.gg_utils import error_checking from generalexam.ge_utils import front_utils from generalexam.plot...
42.436019
80
0.742573
"""Plotting methods for warm and cold fronts.""" import numpy import matplotlib matplotlib.use('agg') import matplotlib.colors from gewittergefahr.gg_utils import longitude_conversion as lng_conversion from gewittergefahr.gg_utils import error_checking from generalexam.ge_utils import front_utils from generalexam.plot...
0
0
0
8688bd25c08e7e8ca794f9c3a84a55b513d0107f
20,875
py
Python
propara/evaluation/evalQA.py
keisks/propara
49fa8fe0481291df18b2c7b48e7ba1dafaad48e2
[ "Apache-2.0" ]
84
2018-06-02T02:00:53.000Z
2022-03-13T12:17:42.000Z
propara/evaluation/evalQA.py
keisks/propara
49fa8fe0481291df18b2c7b48e7ba1dafaad48e2
[ "Apache-2.0" ]
3
2018-10-31T00:28:31.000Z
2020-05-12T01:06:53.000Z
propara/evaluation/evalQA.py
keisks/propara
49fa8fe0481291df18b2c7b48e7ba1dafaad48e2
[ "Apache-2.0" ]
13
2018-09-14T20:37:51.000Z
2021-03-23T09:24:49.000Z
import sys, collections, pylev from stemming.porter2 import stem #-------------------------------------------------------------- # Author: Scott Wen-tau Yih # Usage: evalQA.py para-ids gold-labels system-predictions # example usage: python propara/eval/evalQA.py tests/fixtures/eval/para_id.test.txt tests/fixtures/eval...
42.689162
179
0.57988
import sys, collections, pylev from stemming.porter2 import stem #-------------------------------------------------------------- # Author: Scott Wen-tau Yih # Usage: evalQA.py para-ids gold-labels system-predictions # example usage: python propara/eval/evalQA.py tests/fixtures/eval/para_id.test.txt tests/fixtures/eval...
16,649
0
541
deae37deb80e55431aeffc4a40f5e13cb6af2f86
2,360
py
Python
peerlyApp/peerlyWS.py
z4m0/peerly
187275822dcb6f35cc798c277ec43287e778a049
[ "MIT" ]
null
null
null
peerlyApp/peerlyWS.py
z4m0/peerly
187275822dcb6f35cc798c277ec43287e778a049
[ "MIT" ]
null
null
null
peerlyApp/peerlyWS.py
z4m0/peerly
187275822dcb6f35cc798c277ec43287e778a049
[ "MIT" ]
null
null
null
from gevent import monkey; monkey.patch_all() import gevent from socketio import socketio_manage from socketio.server import SocketIOServer from socketio.namespace import BaseNamespace from socketio.mixins import RoomsMixin, BroadcastMixin from twisted.internet import reactor, task, defer from twisted.python import ...
27.764706
71
0.587288
from gevent import monkey; monkey.patch_all() import gevent from socketio import socketio_manage from socketio.server import SocketIOServer from socketio.namespace import BaseNamespace from socketio.mixins import RoomsMixin, BroadcastMixin from twisted.internet import reactor, task, defer from twisted.python import ...
1,774
5
127
9134aff78215faf06e32eb3662c9a17d4dfcc14c
13,671
py
Python
ppr-api/src/ppr_api/resources/searches.py
cameron-freshworks/ppr
01d6f5d300c791aebad5e58bb4601e9be2ccfc46
[ "Apache-2.0" ]
null
null
null
ppr-api/src/ppr_api/resources/searches.py
cameron-freshworks/ppr
01d6f5d300c791aebad5e58bb4601e9be2ccfc46
[ "Apache-2.0" ]
null
null
null
ppr-api/src/ppr_api/resources/searches.py
cameron-freshworks/ppr
01d6f5d300c791aebad5e58bb4601e9be2ccfc46
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # 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 agr...
47.634146
116
0.684661
# Copyright © 2019 Province of British Columbia # # 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 agr...
0
0
0
a7efbeae0499e8157828f5c76354ddc9e5702563
71
py
Python
airbyte-integrations/connectors/source-smartsheets/source_smartsheets/__init__.py
rajatariya21/airbyte
11e70a7a96e2682b479afbe6f709b9a5fe9c4a8d
[ "MIT" ]
6,215
2020-09-21T13:45:56.000Z
2022-03-31T21:21:45.000Z
airbyte-integrations/connectors/source-smartsheets/source_smartsheets/__init__.py
rajatariya21/airbyte
11e70a7a96e2682b479afbe6f709b9a5fe9c4a8d
[ "MIT" ]
8,448
2020-09-21T00:43:50.000Z
2022-03-31T23:56:06.000Z
airbyte-integrations/connectors/source-smartsheets/source_smartsheets/__init__.py
rajatariya21/airbyte
11e70a7a96e2682b479afbe6f709b9a5fe9c4a8d
[ "MIT" ]
1,251
2020-09-20T05:48:47.000Z
2022-03-31T10:41:29.000Z
from .source import SourceSmartsheets __all__ = ["SourceSmartsheets"]
17.75
37
0.802817
from .source import SourceSmartsheets __all__ = ["SourceSmartsheets"]
0
0
0
0c5b8758ff761fbeb2d01ca908ca3c7ef55e1e5d
8,198
py
Python
multiplayer-rl/mprl/rl/evaluation/payoff_table_gen.py
oslumbers/pipeline-psro
479ca386bf43a99fe7db372ce0017b6d3c4b7949
[ "MIT" ]
26
2020-11-04T13:50:58.000Z
2022-03-11T08:09:00.000Z
multiplayer-rl/mprl/rl/evaluation/payoff_table_gen.py
JBLanier/distributed-rl-for-imperfect-info-games
e150e99e433cadae27aa3ae5f6c7134f7e5c6fda
[ "MIT" ]
null
null
null
multiplayer-rl/mprl/rl/evaluation/payoff_table_gen.py
JBLanier/distributed-rl-for-imperfect-info-games
e150e99e433cadae27aa3ae5f6c7134f7e5c6fda
[ "MIT" ]
13
2020-12-07T11:39:37.000Z
2021-11-04T15:59:17.000Z
from mprl.rl.envs.stratego.stratego_spatial_multiagent_env import SpatialStrategoMultiAgentEnv from progress.bar import Bar import numpy as np import dill from multiprocessing.pool import Pool from multiprocessing import cpu_count
35.489177
138
0.636863
from mprl.rl.envs.stratego.stratego_spatial_multiagent_env import SpatialStrategoMultiAgentEnv from progress.bar import Bar import numpy as np import dill from multiprocessing.pool import Pool from multiprocessing import cpu_count def run_dill_encoded(payload): fun, args = dill.loads(payload) return fun(*args)...
7,849
0
115
abcc03631da5d5f6c8a14d3e8de962d1222734b2
123
py
Python
backend/todoList/admin.py
crowdbotics-apps/basic-todo-app-28878
c84718ed616ec508eeb948caa78413f964f560b6
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/todoList/admin.py
crowdbotics-apps/basic-todo-app-28878
c84718ed616ec508eeb948caa78413f964f560b6
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/todoList/admin.py
crowdbotics-apps/basic-todo-app-28878
c84718ed616ec508eeb948caa78413f964f560b6
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.contrib import admin from .models import ToDoItem admin.site.register(ToDoItem) # Register your models here.
17.571429
32
0.804878
from django.contrib import admin from .models import ToDoItem admin.site.register(ToDoItem) # Register your models here.
0
0
0
b39943285433efe684d03e8d444f09fad241a11d
439
py
Python
bitirmetezi/venv/Lib/site-packages/where/__main__.py
busraltun/IMPLEMENTATIONOFEYECONTROLLEDVIRTUALKEYBOARD
fa3a9b150419a17aa82f41b068a5d69d0ff0d0f3
[ "MIT" ]
null
null
null
bitirmetezi/venv/Lib/site-packages/where/__main__.py
busraltun/IMPLEMENTATIONOFEYECONTROLLEDVIRTUALKEYBOARD
fa3a9b150419a17aa82f41b068a5d69d0ff0d0f3
[ "MIT" ]
null
null
null
bitirmetezi/venv/Lib/site-packages/where/__main__.py
busraltun/IMPLEMENTATIONOFEYECONTROLLEDVIRTUALKEYBOARD
fa3a9b150419a17aa82f41b068a5d69d0ff0d0f3
[ "MIT" ]
null
null
null
from __future__ import absolute_import import sys import argparse import where if __name__ == "__main__": sys.exit(main())
19.086957
110
0.708428
from __future__ import absolute_import import sys import argparse import where def main(): parser = argparse.ArgumentParser( description="Find the locations of a file in the environment's paths." ) parser.add_argument("filename", type=str, help="The filename to be found") args = parser.parse_args() ...
283
0
23
9c840b83d5f099c8dd509d91b19bea7595c02e13
907
py
Python
rulesets/apps/class-b/on-location-change-notifier-slack/__deploy__.py
airspot-dev/iot-demo
5f8c1877192043f4118b102ad1f71326d40de858
[ "Apache-2.0" ]
1
2021-06-22T10:26:54.000Z
2021-06-22T10:26:54.000Z
rulesets/apps/class-b/on-location-change-notifier-slack/__deploy__.py
airspot-dev/iot-demo
5f8c1877192043f4118b102ad1f71326d40de858
[ "Apache-2.0" ]
null
null
null
rulesets/apps/class-b/on-location-change-notifier-slack/__deploy__.py
airspot-dev/iot-demo
5f8c1877192043f4118b102ad1f71326d40de858
[ "Apache-2.0" ]
1
2021-09-20T11:56:50.000Z
2021-09-20T11:56:50.000Z
name = "on-location-change-notifier-slack" add_files = ( "ruleset.py", ) add_modules = True # find modules in directory (folders having __init__.py file) and add them to container extra_commands = ( # ("RUN", "pip install my-wonderful-lib==1.0"), ) labels = { "networking.knative.dev/visibility": "clust...
21.093023
107
0.627343
name = "on-location-change-notifier-slack" add_files = ( "ruleset.py", ) add_modules = True # find modules in directory (folders having __init__.py file) and add them to container extra_commands = ( # ("RUN", "pip install my-wonderful-lib==1.0"), ) labels = { "networking.knative.dev/visibility": "clust...
0
0
0
2dbb7cad82088c634a4e4ad958527162927d1e63
4,171
py
Python
qmpy/analysis/debye/sound_waves.py
JosephMontoya-TRI/qmpy
5a5aa7b25b1231801969ea042bbd2309cacc7859
[ "MIT" ]
1
2019-11-15T20:54:04.000Z
2019-11-15T20:54:04.000Z
qmpy/analysis/debye/sound_waves.py
JosephMontoya-TRI/qmpy_py3
5a5aa7b25b1231801969ea042bbd2309cacc7859
[ "MIT" ]
null
null
null
qmpy/analysis/debye/sound_waves.py
JosephMontoya-TRI/qmpy_py3
5a5aa7b25b1231801969ea042bbd2309cacc7859
[ "MIT" ]
null
null
null
#!/usr/bin/python # sound_waves.py v1.1 12-3-2011 Jeff Doak jeff.w.doak@gmail.com import sys import scipy as sp from scipy import linalg from scipy.integrate import dblquad import read_file BOLTZCONST = 1.381e-23 # J/K PLANCKCONST = 6.626e-34 # J*s AVONUM = 6.022e23 # things/mol def dir_cosines(dir,coords=sp.ide...
33.368
83
0.587389
#!/usr/bin/python # sound_waves.py v1.1 12-3-2011 Jeff Doak jeff.w.doak@gmail.com import sys import scipy as sp from scipy import linalg from scipy.integrate import dblquad import read_file BOLTZCONST = 1.381e-23 # J/K PLANCKCONST = 6.626e-34 # J*s AVONUM = 6.022e23 # things/mol def dir_cosines(dir,coords=sp.ide...
1,089
0
49
c5b7670fef4ed19a20f598574ac6006d29d5300e
6,275
py
Python
bokeh/core/json_encoder.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
bokeh/core/json_encoder.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
bokeh/core/json_encoder.py
teresafds/bokeh
95b2a74ff463cfabdf9e3390951fa380166e6691
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
35.055866
112
0.530837
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
600
13
76
42858455a9d8d1c85110f33472d486a90e93cd08
129
py
Python
answers/Utkarsh Srivastava/Day 11/Question 2.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
22
2021-03-16T14:07:47.000Z
2021-08-13T08:52:50.000Z
answers/Utkarsh Srivastava/Day 11/Question 2.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
174
2021-03-16T21:16:40.000Z
2021-06-12T05:19:51.000Z
answers/Utkarsh Srivastava/Day 11/Question 2.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
135
2021-03-16T16:47:12.000Z
2021-06-27T14:22:38.000Z
s = input() c = 0 n = int(input()) a = [0]*3 c = 0 for i in range(n): a[i] = input() for i in (a): print(s.count(i))
12.9
25
0.465116
s = input() c = 0 n = int(input()) a = [0]*3 c = 0 for i in range(n): a[i] = input() for i in (a): print(s.count(i))
0
0
0
894d4c7667d1425ee76f58054c9c118df88cf99b
3,334
py
Python
bag_serdes_ec-master/BagModules/bag_serdes_ec/sense_amp_strongarm.py
tinapiao/Software-IC-Automation
74b23cd94aa6e4658b110e93b5deb635e014f3a6
[ "BSD-3-Clause" ]
null
null
null
bag_serdes_ec-master/BagModules/bag_serdes_ec/sense_amp_strongarm.py
tinapiao/Software-IC-Automation
74b23cd94aa6e4658b110e93b5deb635e014f3a6
[ "BSD-3-Clause" ]
null
null
null
bag_serdes_ec-master/BagModules/bag_serdes_ec/sense_amp_strongarm.py
tinapiao/Software-IC-Automation
74b23cd94aa6e4658b110e93b5deb635e014f3a6
[ "BSD-3-Clause" ]
1
2020-01-07T04:53:53.000Z
2020-01-07T04:53:53.000Z
# -*- coding: utf-8 -*- from typing import Dict, Any import os import pkg_resources from bag.design import Module yaml_file = pkg_resources.resource_filename(__name__, os.path.join('netlist_info', 'sense_amp_strongarm.yaml')) # noinspection PyPep...
37.460674
95
0.520996
# -*- coding: utf-8 -*- from typing import Dict, Any import os import pkg_resources from bag.design import Module yaml_file = pkg_resources.resource_filename(__name__, os.path.join('netlist_info', 'sense_amp_strongarm.yaml')) # noinspection PyPep...
2,698
0
106
771589f652cba1494d3ee1702e46549bfb1750de
261
py
Python
example/parse_space_to_tab.py
pflans/edge
d84de02bd9b334212b7405ecc4e68d3a209add99
[ "MIT" ]
32
2017-05-15T06:03:46.000Z
2022-02-18T08:30:19.000Z
example/parse_space_to_tab.py
pflans/edge
d84de02bd9b334212b7405ecc4e68d3a209add99
[ "MIT" ]
36
2017-05-11T01:29:14.000Z
2022-02-10T07:31:24.000Z
example/parse_space_to_tab.py
pflans/edge
d84de02bd9b334212b7405ecc4e68d3a209add99
[ "MIT" ]
4
2017-09-19T18:10:45.000Z
2019-11-29T03:38:08.000Z
# flake8: noqa # Converting GFF format with space in lines starting with gi to tab import sys import re fn = sys.argv[1] f = open(fn, "r") for l in f.read().split("\n"): if l.startswith("gi"): print re.sub(" ", "\t", l) else: print l
17.4
67
0.586207
# flake8: noqa # Converting GFF format with space in lines starting with gi to tab import sys import re fn = sys.argv[1] f = open(fn, "r") for l in f.read().split("\n"): if l.startswith("gi"): print re.sub(" ", "\t", l) else: print l
0
0
0
674346ea0686745d41b14badeff5ce6bb87c69bf
4,514
py
Python
sat_solver.py
mrolinek/alpha_skat
d045d5680829d9b70f710608d1a0dff2a43a89a2
[ "MIT" ]
null
null
null
sat_solver.py
mrolinek/alpha_skat
d045d5680829d9b70f710608d1a0dff2a43a89a2
[ "MIT" ]
null
null
null
sat_solver.py
mrolinek/alpha_skat
d045d5680829d9b70f710608d1a0dff2a43a89a2
[ "MIT" ]
null
null
null
import random from itertools import islice from pysat.solvers import Minicard import numpy as np # from numba import njit, int16 from utils import np_one_hot, softmax # @njit(int16[:,:](int16[:]))
37
100
0.696721
import random from itertools import islice from pysat.solvers import Minicard import numpy as np # from numba import njit, int16 from utils import np_one_hot, softmax def add_equal(solver, literals, k): solver.add_atmost(literals, k=k) solver.add_atmost([-lit for lit in literals], k=len(literals) - k) def...
4,195
0
114
da76f995d11bd28ae523a0312bda5e882e405910
18
py
Python
vapetool/__init__.py
vape-tool/VapeTool-BatteriesParser
54281efd489152367d1270b385c5dbef355bb4f3
[ "MIT" ]
null
null
null
vapetool/__init__.py
vape-tool/VapeTool-BatteriesParser
54281efd489152367d1270b385c5dbef355bb4f3
[ "MIT" ]
null
null
null
vapetool/__init__.py
vape-tool/VapeTool-BatteriesParser
54281efd489152367d1270b385c5dbef355bb4f3
[ "MIT" ]
null
null
null
name = "vapetool"
9
17
0.666667
name = "vapetool"
0
0
0
d79c076c8011693447d6fb2aef7d47c679a26d5d
95
py
Python
pdd_sdk/api/__init__.py
ymj4023/pdd_sdk
a8ab114542e5f450b7ea32fb3c0564dfbb2f4e36
[ "MIT" ]
1
2020-07-07T06:47:15.000Z
2020-07-07T06:47:15.000Z
pdd_sdk/api/__init__.py
ymj4023/pdd_sdk
a8ab114542e5f450b7ea32fb3c0564dfbb2f4e36
[ "MIT" ]
null
null
null
pdd_sdk/api/__init__.py
ymj4023/pdd_sdk
a8ab114542e5f450b7ea32fb3c0564dfbb2f4e36
[ "MIT" ]
null
null
null
""" __init__.py.py: """ from pdd_sdk.api.rest import * from pdd_sdk.api.base import FileItem
11.875
37
0.715789
""" __init__.py.py: """ from pdd_sdk.api.rest import * from pdd_sdk.api.base import FileItem
0
0
0
55c34f1cedaab14c52d32e5d7def43998f4cfbac
51,214
py
Python
robot/EDA/resources/locators_54.py
eclemmer/EDA
3a6d2b86acfdca47c450a34ba9bd7a73cd299b62
[ "BSD-3-Clause" ]
null
null
null
robot/EDA/resources/locators_54.py
eclemmer/EDA
3a6d2b86acfdca47c450a34ba9bd7a73cd299b62
[ "BSD-3-Clause" ]
null
null
null
robot/EDA/resources/locators_54.py
eclemmer/EDA
3a6d2b86acfdca47c450a34ba9bd7a73cd299b62
[ "BSD-3-Clause" ]
1
2022-02-25T18:23:49.000Z
2022-02-25T18:23:49.000Z
""" Locators for Spring '22 """ eda_lex_locators = { "app_tile": "//one-app-launcher-modal//one-app-launcher-app-tile//a[.='{}']", "app_item": "//a[@data-label='{}']", "frame": "//iframe[contains(@id, '{}') or contains(@title, '{}') or contains(@name, '{}')]", "input_placeholder": "//input[contains(@pl...
123.407229
692
0.674484
""" Locators for Spring '22 """ eda_lex_locators = { "app_tile": "//one-app-launcher-modal//one-app-launcher-app-tile//a[.='{}']", "app_item": "//a[@data-label='{}']", "frame": "//iframe[contains(@id, '{}') or contains(@title, '{}') or contains(@name, '{}')]", "input_placeholder": "//input[contains(@pl...
0
0
0
6f6d746b9a3ce48ddba1228adbb0c0e61ec61582
876
py
Python
keylogger.py
SailikhithGunda/Keylogger
007e57a15cdcf07303a7082c2cdbe3e043ccc481
[ "MIT" ]
null
null
null
keylogger.py
SailikhithGunda/Keylogger
007e57a15cdcf07303a7082c2cdbe3e043ccc481
[ "MIT" ]
null
null
null
keylogger.py
SailikhithGunda/Keylogger
007e57a15cdcf07303a7082c2cdbe3e043ccc481
[ "MIT" ]
null
null
null
''' Things to do: An exe / chrome extension automatically run the script Automatically export the text file to a server/client. ''' from pynput.keyboard import Key, Listener count = 0 keys = [] with Listener(on_press = on_press, on_release = on_release) as listener: listener.join(...
19.909091
73
0.509132
''' Things to do: An exe / chrome extension automatically run the script Automatically export the text file to a server/client. ''' from pynput.keyboard import Key, Listener count = 0 keys = [] def on_press(key): global keys, count keys.append(key) count += 1 if coun...
477
0
74
1981ec4ebe0a96c972dacd81ff0a61b27a12c7ff
1,707
py
Python
Lists.py
tourloukisg/Python_Tutorial
a5a05e38aa88a0d3878fd6530f9952002755e0ae
[ "MIT" ]
null
null
null
Lists.py
tourloukisg/Python_Tutorial
a5a05e38aa88a0d3878fd6530f9952002755e0ae
[ "MIT" ]
null
null
null
Lists.py
tourloukisg/Python_Tutorial
a5a05e38aa88a0d3878fd6530f9952002755e0ae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Mar 6 21:10:57 2021 @author: geoto """ #clear list item=mylist3.clear() print(item) print('-----------------------------------------------') #reverse list print(mylist) list_rev=mylist.reverse()#reverse() used inplace=True so the change takes ...
19.848837
101
0.663152
# -*- coding: utf-8 -*- """ Created on Sat Mar 6 21:10:57 2021 @author: geoto """ #clear list item=mylist3.clear() print(item) print('-----------------------------------------------') #reverse list print(mylist) list_rev=mylist.reverse()#reverse() used inplace=True so the change takes ...
0
0
0
1cad44a594c7e9036bfadb91940e424ec03efd2b
5,209
py
Python
bihar/bihar_backtest.py
COVID-IWG/epimargin-studies
7d4a78e2e6713c6a0aea2cd2440529153e9a635d
[ "MIT" ]
null
null
null
bihar/bihar_backtest.py
COVID-IWG/epimargin-studies
7d4a78e2e6713c6a0aea2cd2440529153e9a635d
[ "MIT" ]
null
null
null
bihar/bihar_backtest.py
COVID-IWG/epimargin-studies
7d4a78e2e6713c6a0aea2cd2440529153e9a635d
[ "MIT" ]
null
null
null
from pathlib import Path from typing import Dict, Optional, Sequence, Tuple from warnings import simplefilter import matplotlib.pyplot as plt import numpy as np import pandas as pd from statsmodels.regression.linear_model import OLS from statsmodels.tools import add_constant from tqdm import tqdm import etl from epim...
42.349593
300
0.730275
from pathlib import Path from typing import Dict, Optional, Sequence, Tuple from warnings import simplefilter import matplotlib.pyplot as plt import numpy as np import pandas as pd from statsmodels.regression.linear_model import OLS from statsmodels.tools import add_constant from tqdm import tqdm import etl from epim...
267
0
23
bc77493303e5ad9f2e8d68e8426387e82ce4266d
1,136
py
Python
tests/get_test_name_and_number.py
steverpalmer/GenericTesting
89dd9a7bf6bed74b009a0cdeaeef445993608162
[ "BSD-3-Clause" ]
null
null
null
tests/get_test_name_and_number.py
steverpalmer/GenericTesting
89dd9a7bf6bed74b009a0cdeaeef445993608162
[ "BSD-3-Clause" ]
null
null
null
tests/get_test_name_and_number.py
steverpalmer/GenericTesting
89dd9a7bf6bed74b009a0cdeaeef445993608162
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2021 Steve Palmer """Generate a complete list of test numbers and names.""" import collections import inspect import generic_testing TestRecord = collections.namedtuple("TestRecord", ["class_", "testname", "test_number"]) if __name__ == "__main__": Main()
32.457143
111
0.582746
#!/usr/bin/env python3 # Copyright 2021 Steve Palmer """Generate a complete list of test numbers and names.""" import collections import inspect import generic_testing TestRecord = collections.namedtuple("TestRecord", ["class_", "testname", "test_number"]) class Main: def __init__(self): alltests = []...
795
-10
49
9c0d04b816acc96817c632107ea912ad5acdddcd
4,708
py
Python
sdks/python/apache_beam/examples/cookbook/group_with_coder.py
szewi/beam
ae0de1bb5f44ab39969442932c662ecde668bce3
[ "Apache-2.0" ]
4
2020-10-09T01:46:55.000Z
2020-10-09T02:12:19.000Z
python/dataflow_examples/cookbook/group_with_coder.py
yufengzh/DataflowSDK-examples
3727e986e5835286d5bdf5bc679af5e0be090097
[ "Apache-2.0" ]
12
2019-11-13T04:59:52.000Z
2021-12-14T21:13:47.000Z
python/dataflow_examples/cookbook/group_with_coder.py
yufengzh/DataflowSDK-examples
3727e986e5835286d5bdf5bc679af5e0be090097
[ "Apache-2.0" ]
2
2017-09-23T14:41:17.000Z
2018-08-29T02:57:03.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
37.967742
80
0.731308
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
511
0
97
38cf8917ebc220ff8754786994efb4af03ae9a65
644
py
Python
forum/threads/migrations/0011_thread_followers.py
successIA/Forum
08de91a033da2c3779acbf95dfe0210eb1276a26
[ "MIT" ]
null
null
null
forum/threads/migrations/0011_thread_followers.py
successIA/Forum
08de91a033da2c3779acbf95dfe0210eb1276a26
[ "MIT" ]
6
2020-08-13T18:54:33.000Z
2021-06-10T20:20:16.000Z
forum/threads/migrations/0011_thread_followers.py
successIA/ClassicForum
08de91a033da2c3779acbf95dfe0210eb1276a26
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-11-21 23:29 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models
28
141
0.68323
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-11-21 23:29 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
0
431
23
650a8c743c76ea9bb108b7bc46a8f2beb0a59150
2,024
py
Python
buyer/tests/test_views.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
2
2017-06-02T09:09:08.000Z
2021-01-18T10:26:53.000Z
buyer/tests/test_views.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
629
2016-10-10T09:35:52.000Z
2022-03-25T15:04:04.000Z
buyer/tests/test_views.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
5
2017-06-22T10:02:22.000Z
2022-03-14T17:55:21.000Z
import http from unittest.mock import Mock, patch import pytest from django.conf import settings from django.test import override_settings from django.urls import reverse from rest_framework import status from buyer import models from core.tests.test_views import reload_module, reload_urlconf @pytest.mark.django_db...
37.481481
100
0.736166
import http from unittest.mock import Mock, patch import pytest from django.conf import settings from django.test import override_settings from django.urls import reverse from rest_framework import status from buyer import models from core.tests.test_views import reload_module, reload_urlconf @pytest.mark.django_db...
1,296
0
44
1cb01409585916ebaaa745f459bc65177a6e04ff
44,690
py
Python
src/config/svc-monitor/svc_monitor/tests/test_f5_lb.py
UbuntuEvangelist/contrail-controller
4e8a992230f8f8e91e4f753e19b5442d9e1b446d
[ "Apache-2.0" ]
null
null
null
src/config/svc-monitor/svc_monitor/tests/test_f5_lb.py
UbuntuEvangelist/contrail-controller
4e8a992230f8f8e91e4f753e19b5442d9e1b446d
[ "Apache-2.0" ]
null
null
null
src/config/svc-monitor/svc_monitor/tests/test_f5_lb.py
UbuntuEvangelist/contrail-controller
4e8a992230f8f8e91e4f753e19b5442d9e1b446d
[ "Apache-2.0" ]
18
2017-01-12T09:28:44.000Z
2019-04-18T20:47:42.000Z
import mock from mock import patch import unittest from cfgm_common.vnc_db import DBBase from svc_monitor import config_db from svc_monitor import loadbalancer_agent from vnc_api.vnc_api import * import argparse import ConfigParser # end setUp # end tearDown # end create_pool #end create_hm_obj #...
47.643923
318
0.637055
import mock from mock import patch import unittest from cfgm_common.vnc_db import DBBase from svc_monitor import config_db from svc_monitor import loadbalancer_agent from vnc_api.vnc_api import * import argparse import ConfigParser class F5LBTest(unittest.TestCase): def setUp(self): self.vnc_lib = mock.Moc...
42,768
13
777
c50ba6b8e1ade4d4df84686b6b1fc92c6b818a1b
2,307
py
Python
vendor-local/src/python-nose/scripts/mkindex.py
mozilla/sheriffs
9e3a837e0115252e01c9bcd5c9d56d11af760875
[ "BSD-3-Clause" ]
null
null
null
vendor-local/src/python-nose/scripts/mkindex.py
mozilla/sheriffs
9e3a837e0115252e01c9bcd5c9d56d11af760875
[ "BSD-3-Clause" ]
null
null
null
vendor-local/src/python-nose/scripts/mkindex.py
mozilla/sheriffs
9e3a837e0115252e01c9bcd5c9d56d11af760875
[ "BSD-3-Clause" ]
1
2019-11-02T23:29:13.000Z
2019-11-02T23:29:13.000Z
#!/usr/bin/env python from docutils.core import publish_string, publish_parts from docutils.readers.standalone import Reader from nose.config import Config from nose.plugins.manager import BuiltinPluginManager import nose import nose.commands import nose.tools import os import re import time doc_word.priority = 100 ...
28.8375
77
0.674902
#!/usr/bin/env python from docutils.core import publish_string, publish_parts from docutils.readers.standalone import Reader from nose.config import Config from nose.plugins.manager import BuiltinPluginManager import nose import nose.commands import nose.tools import os import re import time def doc_word(node): p...
231
49
46
270ee543b329ffc1200cf23a84edbb417e93fe3f
722
py
Python
biserici_inlemnite/app/migrations/0012_descrierepage_gabarit_exterior_al_talpilor.py
ck-tm/biserici-inlemnite
c9d12127b92f25d3ab2fcc7b4c386419fe308a4e
[ "MIT" ]
null
null
null
biserici_inlemnite/app/migrations/0012_descrierepage_gabarit_exterior_al_talpilor.py
ck-tm/biserici-inlemnite
c9d12127b92f25d3ab2fcc7b4c386419fe308a4e
[ "MIT" ]
null
null
null
biserici_inlemnite/app/migrations/0012_descrierepage_gabarit_exterior_al_talpilor.py
ck-tm/biserici-inlemnite
c9d12127b92f25d3ab2fcc7b4c386419fe308a4e
[ "MIT" ]
null
null
null
# Generated by Django 3.1.13 on 2021-09-21 15:33 from django.db import migrations, models import django.db.models.deletion
34.380952
240
0.695291
# Generated by Django 3.1.13 on 2021-09-21 15:33 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0023_add_choose_permissions'), ('app', '0011_remove_descrierepage_gabarit_exterior_al_talpilor'), ...
0
579
23
4e2e7c10c7e9a5d0b6ea8f2706b2f2759257445a
2,047
py
Python
examples/collectibles_simple.py
TheoLvs/westworld
7fb435f3a028ff3d3156bf2a023b44ee06aa9f8b
[ "MIT" ]
null
null
null
examples/collectibles_simple.py
TheoLvs/westworld
7fb435f3a028ff3d3156bf2a023b44ee06aa9f8b
[ "MIT" ]
3
2021-09-06T23:12:23.000Z
2021-09-17T01:04:34.000Z
examples/collectibles_simple.py
TheoLvs/westworld
7fb435f3a028ff3d3156bf2a023b44ee06aa9f8b
[ "MIT" ]
null
null
null
"""Simulation where an agent will get all collectibles spawn randomly """ import sys sys.path.append("../") from westworld.environment import GridEnvironment from westworld.agents import BaseGridAgent from westworld.objects import BaseObstacle,BaseTrigger,BaseCollectible from westworld.simulation import Simulation ...
26.934211
99
0.50171
"""Simulation where an agent will get all collectibles spawn randomly """ import sys sys.path.append("../") from westworld.environment import GridEnvironment from westworld.agents import BaseGridAgent from westworld.objects import BaseObstacle,BaseTrigger,BaseCollectible from westworld.simulation import Simulation ...
636
20
147
91da93d1a3454065294d6224dce2fef0ad33aa04
1,053
py
Python
gmit--exercise04--problem02--fibonacci-even-values-under-4million--code--20180224.py
g00364787/52167assessments
65318102196fbbf40b764cd189edc4e31963ecf5
[ "Apache-2.0" ]
null
null
null
gmit--exercise04--problem02--fibonacci-even-values-under-4million--code--20180224.py
g00364787/52167assessments
65318102196fbbf40b764cd189edc4e31963ecf5
[ "Apache-2.0" ]
null
null
null
gmit--exercise04--problem02--fibonacci-even-values-under-4million--code--20180224.py
g00364787/52167assessments
65318102196fbbf40b764cd189edc4e31963ecf5
[ "Apache-2.0" ]
null
null
null
# AUTHOR = PAUL KEARNEY # STUDENT ID = G00364787 # DATE = 2018-02-24 # # STUDENT ID = G00364787 # EXERCISE 04 # projectEuler problem 2 # references used # http://www.tutorialspoint.com/python/python_basic_operators.htm # https://www.tutorialspoint.com/python/python_strings.htm # https://stackoverflow.co...
21.06
73
0.595442
# AUTHOR = PAUL KEARNEY # STUDENT ID = G00364787 # DATE = 2018-02-24 # # STUDENT ID = G00364787 # EXERCISE 04 # projectEuler problem 2 # references used # http://www.tutorialspoint.com/python/python_basic_operators.htm # https://www.tutorialspoint.com/python/python_strings.htm # https://stackoverflow.co...
0
0
0
16c23eeac2b96f412b198365c9cccb8c69ca1254
2,567
py
Python
tutorials/W3D4_DeepLearning1/solutions/W3D4_Tutorial3_Solution_fba5d745.py
liuxiaomiao123/NeuroMathAcademy
16a7969604a300bf9fbb86f8a5b26050ebd14c65
[ "CC-BY-4.0" ]
2
2020-07-03T04:39:09.000Z
2020-07-12T02:08:31.000Z
tutorials/W3D4_DeepLearning1/solutions/W3D4_Tutorial3_Solution_fba5d745.py
NinaHKivanani/course-content
3c91dd1a669cebce892486ba4f8086b1ef2e1e49
[ "CC-BY-4.0" ]
1
2020-06-22T22:57:03.000Z
2020-06-22T22:57:03.000Z
tutorials/W3D4_DeepLearning1/solutions/W3D4_Tutorial3_Solution_fba5d745.py
NinaHKivanani/course-content
3c91dd1a669cebce892486ba4f8086b1ef2e1e49
[ "CC-BY-4.0" ]
1
2021-03-29T21:08:26.000Z
2021-03-29T21:08:26.000Z
def plot_tuning_curve(resp, ori, ax=None): """Plot single neuron responses as a function of stimulus orientation Args: resp (numpy array): n_stimuli x n_neurons matrix with responses of each neuron whose tuning curve to plot. Can also be a 1D array of length n_stimuli to plot tuning curve of a sin...
34.226667
99
0.706272
def plot_tuning_curve(resp, ori, ax=None): """Plot single neuron responses as a function of stimulus orientation Args: resp (numpy array): n_stimuli x n_neurons matrix with responses of each neuron whose tuning curve to plot. Can also be a 1D array of length n_stimuli to plot tuning curve of a sin...
0
0
0
048379005b2b62f1b01faadba6f978d4f3ede30a
3,116
py
Python
tst/inet/ssl/ssl_suite.py
ivankravets/pumbaa
2a1869cc204e3128516ed6fa9f89529aedec1702
[ "MIT" ]
69
2016-09-04T18:36:18.000Z
2021-07-04T21:51:54.000Z
tst/inet/ssl/ssl_suite.py
ivankravets/pumbaa
2a1869cc204e3128516ed6fa9f89529aedec1702
[ "MIT" ]
42
2016-09-02T20:10:19.000Z
2020-07-01T05:54:01.000Z
tst/inet/ssl/ssl_suite.py
ivankravets/pumbaa
2a1869cc204e3128516ed6fa9f89529aedec1702
[ "MIT" ]
11
2016-09-29T14:33:23.000Z
2021-02-28T19:30:49.000Z
# # @section License # # The MIT License (MIT) # # Copyright (c) 2016-2017, Erik Moqvist # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation ...
30.252427
69
0.675225
# # @section License # # The MIT License (MIT) # # Copyright (c) 2016-2017, Erik Moqvist # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation ...
1,636
0
69
34408d0df213d02bbeba41e708fedfed3c63febc
9,443
py
Python
xbmanIntegrated/SCMS/tasks.py
suntao789/Aclsm
2202201c8279391386a4569e69f93d90eca5b96a
[ "Apache-2.0" ]
38
2018-01-17T03:32:25.000Z
2021-03-05T03:10:13.000Z
xbmanIntegrated/SCMS/tasks.py
suntao789/Aclsm
2202201c8279391386a4569e69f93d90eca5b96a
[ "Apache-2.0" ]
null
null
null
xbmanIntegrated/SCMS/tasks.py
suntao789/Aclsm
2202201c8279391386a4569e69f93d90eca5b96a
[ "Apache-2.0" ]
17
2018-05-29T06:50:10.000Z
2021-07-08T01:47:22.000Z
#!/usr/bin/env python #-*- coding:utf-8 -*- __author__ = 'weihaoxuan' from celery import task from confile_process import process import models import os # import ansible_api @task @task @task @task @task @task @task @task @task
43.92093
122
0.595785
#!/usr/bin/env python #-*- coding:utf-8 -*- __author__ = 'weihaoxuan' from celery import task from confile_process import process import models import os # import ansible_api @task def nginxdev_push(file,pclist,puthdir): iplist = [] log = [] confname, path = process().nginx_conf(id=file) for i in pcli...
9,317
0
198
1d057d22f7e979ae15ce1bdc1772f344ee6c4a54
9,204
py
Python
readthedocs/builds/querysets.py
shazelquist/readthedocs.org
25c0f5d9528bd92db3c62db91e8eed8032d01b01
[ "MIT" ]
null
null
null
readthedocs/builds/querysets.py
shazelquist/readthedocs.org
25c0f5d9528bd92db3c62db91e8eed8032d01b01
[ "MIT" ]
1
2022-03-02T11:55:37.000Z
2022-03-02T11:55:37.000Z
readthedocs/builds/querysets.py
shazelquist/readthedocs.org
25c0f5d9528bd92db3c62db91e8eed8032d01b01
[ "MIT" ]
null
null
null
"""Build and Version QuerySet classes.""" import datetime import logging from django.db import models from django.db.models import Q from django.utils import timezone from readthedocs.builds.constants import ( BUILD_STATE_FINISHED, BUILD_STATE_TRIGGERED, EXTERNAL, ) from readthedocs.core.permissions impor...
32.638298
98
0.609518
"""Build and Version QuerySet classes.""" import datetime import logging from django.db import models from django.db.models import Q from django.utils import timezone from readthedocs.builds.constants import ( BUILD_STATE_FINISHED, BUILD_STATE_TRIGGERED, EXTERNAL, ) from readthedocs.core.permissions impor...
1,629
66
185
70697284aed98a0a1ec55f4830a7d80f5a7ab937
14,978
py
Python
homeassistant/config/custom_components/smartthinq_sensors/climate.py
yuvalabou/homeassistant
e25885db33d2144455928d07d7e9b044278ba291
[ "Unlicense" ]
14
2020-03-25T17:14:17.000Z
2020-04-19T02:03:48.000Z
homeassistant/config/custom_components/smartthinq_sensors/climate.py
yuvalabou/homeassistant
e25885db33d2144455928d07d7e9b044278ba291
[ "Unlicense" ]
16
2020-03-26T03:32:03.000Z
2020-04-18T21:28:54.000Z
homeassistant/config/custom_components/smartthinq_sensors/climate.py
yuvalabou/homeassistant
e25885db33d2144455928d07d7e9b044278ba291
[ "Unlicense" ]
6
2020-03-28T19:41:18.000Z
2020-04-13T14:04:18.000Z
"""Platform for LGE climate integration.""" from __future__ import annotations from dataclasses import dataclass from datetime import timedelta import logging from typing import Any, Awaitable, Callable, List, Tuple from .wideq import ( FEAT_HUMIDITY, FEAT_OUT_WATER_TEMP, UNIT_TEMP_FAHRENHEIT, DeviceT...
34.196347
85
0.664975
"""Platform for LGE climate integration.""" from __future__ import annotations from dataclasses import dataclass from datetime import timedelta import logging from typing import Any, Awaitable, Callable, List, Tuple from .wideq import ( FEAT_HUMIDITY, FEAT_OUT_WATER_TEMP, UNIT_TEMP_FAHRENHEIT, DeviceT...
168
0
52
bc9f8efdc0e855ffa8421ab4eb5c22778be09608
34,764
py
Python
model.py
xuefei1/Graph-Seq2Attn
336c69877e483c95d9996ee205d2a005342f08af
[ "MIT" ]
1
2020-01-06T07:49:46.000Z
2020-01-06T07:49:46.000Z
model.py
xuefei1/Graph-Seq2Attn
336c69877e483c95d9996ee205d2a005342f08af
[ "MIT" ]
1
2020-04-16T10:15:27.000Z
2020-04-16T16:41:42.000Z
model.py
xuefei1/Graph-Seq2Attn
336c69877e483c95d9996ee205d2a005342f08af
[ "MIT" ]
null
null
null
import copy import math import time import torch import torch.nn as nn import numpy as np from constants import * from embeddings import * from tqdm import tqdm from utils.model_utils import device, model_checkpoint from utils.misc_utils import write_line_to_file from utils.lang_utils import make_std_mask from evaluate...
45.984127
156
0.631544
import copy import math import time import torch import torch.nn as nn import numpy as np from constants import * from embeddings import * from tqdm import tqdm from utils.model_utils import device, model_checkpoint from utils.misc_utils import write_line_to_file from utils.lang_utils import make_std_mask from evaluate...
28,108
1,790
1,263
fbbd84be295788a69019c863fff3289b27d4892b
4,707
py
Python
main.py
mode9/xlsxstyle
6311c6088672d6a39555bd735e1b443583692289
[ "MIT" ]
null
null
null
main.py
mode9/xlsxstyle
6311c6088672d6a39555bd735e1b443583692289
[ "MIT" ]
null
null
null
main.py
mode9/xlsxstyle
6311c6088672d6a39555bd735e1b443583692289
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 import os import sys import time from PyQt5 import QtCore from PySide2.QtCore import QFile from PySide2.QtUiTools import QUiLoader from PySide2.QtWidgets import QApplication, QWidget, QFileDialog, \ QPushButton, QLineEdit, QMessageBox, QTextBrowser, QProgressBa...
39.554622
104
0.670066
# This Python file uses the following encoding: utf-8 import os import sys import time from PyQt5 import QtCore from PySide2.QtCore import QFile from PySide2.QtUiTools import QUiLoader from PySide2.QtWidgets import QApplication, QWidget, QFileDialog, \ QPushButton, QLineEdit, QMessageBox, QTextBrowser, QProgressBa...
3,917
5
319
22fa8e5db0048c1973b20aac2f2d4320e6b5679e
2,812
py
Python
CalibTracker/SiPixelQuality/test/step3_SiPixelStatusAlCaRecoProducer.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
1
2019-08-09T08:42:11.000Z
2019-08-09T08:42:11.000Z
CalibTracker/SiPixelQuality/test/step3_SiPixelStatusAlCaRecoProducer.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
CalibTracker/SiPixelQuality/test/step3_SiPixelStatusAlCaRecoProducer.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
1
2020-01-10T13:36:46.000Z
2020-01-10T13:36:46.000Z
import os import FWCore.ParameterSet.Config as cms from Configuration.StandardSequences.Eras import eras process = cms.Process('PCL',eras.Run2_2017) # ---------------------------------------------------------------------- process.load("FWCore.MessageLogger.MessageLogger_cfi") process.MessageLogger.cerr.threshold = 'IN...
39.605634
121
0.771693
import os import FWCore.ParameterSet.Config as cms from Configuration.StandardSequences.Eras import eras process = cms.Process('PCL',eras.Run2_2017) # ---------------------------------------------------------------------- process.load("FWCore.MessageLogger.MessageLogger_cfi") process.MessageLogger.cerr.threshold = 'IN...
0
0
0
f82068383fbfa605535716b59dcbcbea370cb469
1,020
py
Python
Python/staircase.py
nickhaynes/HackerRank-Challenges
12be5518251ffde5d19f6ef42795e1c48b6623bd
[ "MIT" ]
null
null
null
Python/staircase.py
nickhaynes/HackerRank-Challenges
12be5518251ffde5d19f6ef42795e1c48b6623bd
[ "MIT" ]
null
null
null
Python/staircase.py
nickhaynes/HackerRank-Challenges
12be5518251ffde5d19f6ef42795e1c48b6623bd
[ "MIT" ]
null
null
null
# Consider a staircase of size : # # # # ## # ### # #### # # Observe that its base and height are both equal to , and the image is drawn using # symbols and spaces. The last line is not preceded by any spaces. # # Write a program that prints a staircase of size . # # Input Format # # A single integer, , deno...
16.721311
150
0.590196
# Consider a staircase of size : # # # # ## # ### # #### # # Observe that its base and height are both equal to , and the image is drawn using # symbols and spaces. The last line is not preceded by any spaces. # # Write a program that prints a staircase of size . # # Input Format # # A single integer, , deno...
102
0
22
0023e4346495fa3d50aeae59ada722870a812388
271
py
Python
Algorithm/coding_interviews/Python/sword-for-offer/64_sum_n.py
ck76/awesome-cs
48cba4081dc5290f07e305850b9a3a7e8a590b64
[ "Apache-2.0" ]
1
2021-11-16T13:37:41.000Z
2021-11-16T13:37:41.000Z
Algorithm/coding_interviews/Python/sword-for-offer/64_sum_n.py
ck76/awesome-cs
48cba4081dc5290f07e305850b9a3a7e8a590b64
[ "Apache-2.0" ]
null
null
null
Algorithm/coding_interviews/Python/sword-for-offer/64_sum_n.py
ck76/awesome-cs
48cba4081dc5290f07e305850b9a3a7e8a590b64
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python3 # -*- coding: utf-8 -*- # @Time : 2019/3/10 8:10 PM # @Author : xiaoliji # @Email : yutian9527@gmail.com """ 求1+...n, 不能用循环等。 >>> sum_solution(10) 55 """
15.941176
38
0.546125
#! /usr/bin/python3 # -*- coding: utf-8 -*- # @Time : 2019/3/10 8:10 PM # @Author : xiaoliji # @Email : yutian9527@gmail.com """ 求1+...n, 不能用循环等。 >>> sum_solution(10) 55 """ def sum_solution(n: int) -> int: return n and (n+sum_solution(n-1))
50
0
23
4336232382e90a34670de18f1e14b8984535e17e
4,799
py
Python
docs/plot_visualise.py
vishalbelsare/pycobra
2af4faa681b412b8508d3043ccaff8e98c1d4368
[ "MIT" ]
119
2017-03-26T12:11:52.000Z
2022-03-20T15:17:46.000Z
docs/plot_visualise.py
chrinide/pycobra
2af4faa681b412b8508d3043ccaff8e98c1d4368
[ "MIT" ]
7
2017-03-27T12:08:37.000Z
2018-09-22T10:43:24.000Z
docs/plot_visualise.py
chrinide/pycobra
2af4faa681b412b8508d3043ccaff8e98c1d4368
[ "MIT" ]
22
2017-04-12T07:44:09.000Z
2022-01-13T06:35:29.000Z
""" COBRA Visualisations -------------------- This notebook will cover the visulaisation and plotting offered by pycobra. """ # %matplotlib inline import numpy as np from pycobra.cobra import Cobra from pycobra.ewa import Ewa from pycobra.visualisation import Visualisation from pycobra.diagnostics import Diagnostics...
27.739884
119
0.604501
""" COBRA Visualisations -------------------- This notebook will cover the visulaisation and plotting offered by pycobra. """ # %matplotlib inline import numpy as np from pycobra.cobra import Cobra from pycobra.ewa import Ewa from pycobra.visualisation import Visualisation from pycobra.diagnostics import Diagnostics...
0
0
0
5eae38782b76e9b037188eec504064586659d814
384
py
Python
app/__init__.py
xujl930/crawl_metro
99c52f183fbf52a43847d98c2d0e666197a73287
[ "MIT" ]
null
null
null
app/__init__.py
xujl930/crawl_metro
99c52f183fbf52a43847d98c2d0e666197a73287
[ "MIT" ]
null
null
null
app/__init__.py
xujl930/crawl_metro
99c52f183fbf52a43847d98c2d0e666197a73287
[ "MIT" ]
null
null
null
# -*- coding:utf8 -*- from flask import Flask from flask_mongoengine import MongoEngine from config import config db = MongoEngine()
21.333333
60
0.739583
# -*- coding:utf8 -*- from flask import Flask from flask_mongoengine import MongoEngine from config import config db = MongoEngine() def create_app(config_name): app = Flask(__name__) app.config.from_object(config[config_name]) db.init_app(app) from .api_0_1 import api as api_blueprint app.regi...
227
0
23
e0f740a7c9719c8085d1dc80c3e3e99aaf3c64b3
2,120
py
Python
practice projects/chap 09/delete unneeded files chap 9/delete unneeded files.py
alperpaksoy/automatetheboringstuff
6bdb7297c25e2c6588accaea00abcac6872f6df2
[ "MIT" ]
null
null
null
practice projects/chap 09/delete unneeded files chap 9/delete unneeded files.py
alperpaksoy/automatetheboringstuff
6bdb7297c25e2c6588accaea00abcac6872f6df2
[ "MIT" ]
null
null
null
practice projects/chap 09/delete unneeded files chap 9/delete unneeded files.py
alperpaksoy/automatetheboringstuff
6bdb7297c25e2c6588accaea00abcac6872f6df2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # This program finds files that are above a specified size within # a specified folder and its subfolders ''' Write a program that walks through a folder tree and searches for exceptionally large files or folders—say, ones that have a file size of more than 100MB. (Remember, to get a file’s siz...
32.615385
71
0.651887
#!/usr/bin/env python3 # This program finds files that are above a specified size within # a specified folder and its subfolders ''' Write a program that walks through a folder tree and searches for exceptionally large files or folders—say, ones that have a file size of more than 100MB. (Remember, to get a file’s siz...
25
0
22
abbcc95a49709a058b3c9645b94868fe5c4bb1f5
7,973
py
Python
custom_components/sensor/car_milage_per_month.py
mar-schmidt/home-assistant-sensor-car-milage
b329b0e1fb26f211d909c747624b502f51017de7
[ "MIT" ]
null
null
null
custom_components/sensor/car_milage_per_month.py
mar-schmidt/home-assistant-sensor-car-milage
b329b0e1fb26f211d909c747624b502f51017de7
[ "MIT" ]
null
null
null
custom_components/sensor/car_milage_per_month.py
mar-schmidt/home-assistant-sensor-car-milage
b329b0e1fb26f211d909c747624b502f51017de7
[ "MIT" ]
null
null
null
""" Configuration: To use the car_milage_per_month component you will need to add the following to your configuration.yaml file: car_milage_per_month: odometer_sensor: sensor.ete123_odometer (the sensor that holds the total amount of km) """ import json import logging import calendar import os import voluptuous as...
35.435556
135
0.658723
""" Configuration: To use the car_milage_per_month component you will need to add the following to your configuration.yaml file: car_milage_per_month: odometer_sensor: sensor.ete123_odometer (the sensor that holds the total amount of km) """ import json import logging import calendar import os import voluptuous as...
2,922
0
80